';
/*
* Let you change the exercice
*/
echo '';
// Show the form for period
echo '';
echo '';
//-----------------------------------------------------
// Form
//-----------------------------------------------------
// Show the export button
if ( isset ($_GET['view'] ) )
{
$hid=new IHidden();
echo "
";
echo '
';
echo '
";
echo '
";
echo '
';
echo HtmlInput::print_window();
echo '
';
echo "
";
echo "
";
}
//-----------------------------------------------------
// Display result
//-----------------------------------------------------
if ( isset($_GET['view'] ) )
{
$bal=new Acc_Balance($cn);
if ( $_GET['p_filter']==1)
{
for ($e=0;$ejrn[]=$selected[$e];
}
if ( $_GET['p_filter'] == 0 )
{
$bal->jrn=null;
}
if ( $_GET['p_filter'] == 2 && isset ($_GET['r_cat']))
{
$bal->filter_cat($_GET['r_cat']);
}
$bal->from_poste=$_GET['from_poste'];
$bal->to_poste=$_GET['to_poste'];
if ( isset($_GET['unsold'])) $bal->unsold=true;
$previous=(isset($_GET['previous_exc']))?1:0;
$row=$bal->get_row($_GET['from_periode'],
$_GET['to_periode'],
$previous);
$previous= (isset ($row[0]['sum_cred_previous']))?1:0;
$periode=new Periode($cn);
$a=$periode->get_date_limit($_GET['from_periode']);
$b=$periode->get_date_limit($_GET['to_periode']);
echo "
';
${'lvl'.$ind.'_old'}=mb_substr($r['poste'],0,$ind);
foreach($a_sum as $a)
{
${'lvl'.$ind}[$a]=0;
}
}
}
foreach($a_sum as $a)
{
$lvl1[$a]=bcadd($lvl1[$a],$r[$a]);
$lvl2[$a]=bcadd($lvl2[$a],$r[$a]);
$lvl3[$a]=bcadd($lvl3[$a],$r[$a]);
}
// For the Total row , there is no accounting
if ( $r['poste'] == "") {
$tr="highlight";
}
echo '