<td align="right">' . ($detail['deb_montant'] > 0 ? nbm($detail['deb_montant']) : '') . '</td> <td align="right">' . ($detail['cred_montant'] > 0 ? nbm($detail['cred_montant']) : '') . '</td> <td align="right">' . nbm(abs($solde)) . $side . '</td> <td style="text-align:right;color:red">' . $html_let . '</td> </tr>'; } echo '<tr class="highlight"> <td>' . $current_exercice . '</td> <td>' . '' . '</td> <td>' . '<b>' . 'Total du compte ' . $poste_id['pcm_val'] . '</b>' . '</td> <td>' . '' . '</td> <td align="right">' . '<b>' . ($solde_d > 0 ? nbm($solde_d) : '') . '</b>' . '</td> <td align="right">' . '<b>' . ($solde_c > 0 ? nbm($solde_c) : '') . '</b>' . '</td> <td align="right">' . '<b>' . nbm(abs($solde_c - $solde_d)) . '</b>' . '</td> <td>'; if ($solde_c > $solde_d) { echo "Crédit"; } if ($solde_c < $solde_d) { echo "Débit"; } if ($solde_c == $solde_d) { echo "="; } echo '</td>' . '</tr>'; } echo '</table>'; echo Acc_Account_Ledger::HtmlTableHeader("gl_comptes"); echo "</div>"; exit; }
echo '<table style="width:100%;margin-left:0%">'; foreach ($a_poste as $poste_id) { $Poste = new Acc_Account_Ledger($cn, $poste_id['pcm_val']); $Poste->load(); $Poste->get_row_date($_GET['from_periode'], $_GET['to_periode'], $_GET['ople']); if (empty($Poste->row)) { continue; } echo '<tr><td class="mtitle" style="width:auto" colspan="6"><h2 class="title">' . $poste_id['pcm_val'] . ' ' . h($Poste->label) . '</h2></td></tr>'; $detail = $Poste->row[0]; $old = array(); foreach ($Poste->row as $detail) { /* avoid duplicates */ if (in_array($detail['jr_id'], $old) == TRUE) { continue; } $old[] = $detail['jr_id']; echo tr(td("Journal :" . $detail['jrn_def_name'], ''), 'style="width:auto" colspan="6"'); echo '<tr><td class="mtitle" style="width:auto" colspan="6">' . $detail['j_date'] . ' ' . $detail['jr_internal'] . ' ' . hb($detail['description']) . ' ' . hi($detail['jr_pj_number']) . '</td></tr>'; $op = new Acc_Operation($cn); $op->poste = $poste_id['pcm_val']; $op->jr_id = $detail['jr_id']; echo $op->display_jrnx_detail(1); } } echo '</table>'; echo Acc_Account_Ledger::HtmlTableHeader(); } exit; } }