$m = $array[$i]->get_solde_detail($filter_year);
    $solde = $m['debit'] - $m['credit'];
    // print the result if the saldo is not equal to 0
    if ($m['debit'] != 0.0 || $m['credit'] != 0.0) {
        /*  get saldo for not reconcilied operations  */
        $saldo_not_reconcilied = $array[$i]->get_bk_balance($filter_year . " and (trim(jr_pj_number) ='' or jr_pj_number is null)");
        /*  get saldo for reconcilied operation  */
        $saldo_reconcilied = $array[$i]->get_bk_balance($filter_year . " and ( trim(jr_pj_number) != '' and jr_pj_number is not null)");
        if ($idx % 2 != 0) {
            $odd = "odd";
        } else {
            $odd = "even";
        }
        $idx++;
        echo "<tr class=\"{$odd}\">";
        echo "<TD >" . IButton::history_card($array[$i]->id, $array[$i]->strAttribut(ATTR_DEF_QUICKCODE)) . "</TD>";
        $saldo_rec = bcsub($saldo_reconcilied['debit'], $saldo_reconcilied['credit']);
        $diff = bcsub($saldo_not_reconcilied['debit'], $saldo_not_reconcilied['credit']);
        echo "<TD >" . $array[$i]->strAttribut(ATTR_DEF_NAME) . "</TD>" . td(h($array[$i]->ledger_name)) . td(h($array[$i]->ledger_description)) . '<TD class="sorttable_numeric" sorttable_customkey="' . $solde . '"  style="text-align:right">' . nbm($solde) . "</TD>" . '<TD class="sorttable_numeric" sorttable_customkey="' . $saldo_rec . '"  style="text-align:right">' . nbm($saldo_rec) . "</TD>" . '<TD class="sorttable_numeric" sorttable_customkey="' . $diff . '"  style="text-align:right">' . nbm($diff) . "</TD>" . "</TR>";
        $tot_extrait = bcadd($tot_extrait, $solde);
        $tot_operation = bcadd($tot_operation, $saldo_rec);
        $tot_diff = bcadd($tot_diff, $diff);
    }
}
// for
echo '<tfoot>';
echo '<tr class="highlight">';
echo td('');
echo td('');
echo td('');
echo td(' TOTAUX ', 'style="font-weight:bold"');