Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 ?>
00029 <table class="result">
00030 <tr>
00031 <?php
00032 echo th(_('Poste Comptable'));
00033 echo th(_('Quick Code'));
00034 echo th(_('Libellé'));
00035 echo th(_('Débit'), 'style="text-align:right"');
00036 echo th(_('Crédit'), 'style="text-align:right"');
00037 echo '</tr>';
00038 $amount_idx=0;
00039 for ($e = 0; $e < count($obj->det->array); $e++)
00040 {
00041 $row = '';
00042 $q = $obj->det->array;
00043 $view_history = sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:view_history_account(\'%s\',\'%s\')" >%s</A>', $q[$e]['j_poste'], $gDossier, $q[$e]['j_poste']);
00044
00045 $row.=td($view_history);
00046
00047 if ($q[$e]['j_qcode'] != '')
00048 {
00049 $fiche = new Fiche($cn);
00050 $fiche->get_by_qcode($q[$e]['j_qcode']);
00051 $view_history = sprintf('<A class="detail" style="text-decoration:underline" HREF="javascript:view_history_card(\'%s\',\'%s\')" >%s</A>', $fiche->id, $gDossier, $q[$e]['j_qcode']);
00052 }
00053 else
00054 $view_history = '';
00055 $row.=td($view_history);
00056 $l_lib = $q[$e]['j_text'];
00057
00058 if ($l_lib != '')
00059 {
00060 $l_lib = $q[$e]['j_text'];
00061 }
00062 else if ($q[$e]['j_qcode'] != '')
00063 {
00064
00065 $ff = new Fiche($cn);
00066 $ff->get_by_qcode($q[$e]['j_qcode']);
00067 $l_lib = $ff->strAttribut(ATTR_DEF_NAME);
00068 }
00069 else
00070 {
00071
00072 $name = $cn->get_value('select pcm_lib from tmp_pcmn where pcm_val=$1', array($q[$e]['j_poste']));
00073 $l_lib = $name;
00074 }
00075 $l_lib = strip_tags($l_lib);
00076 $input = new ISpan("e_march" . $q[$e]['j_id'] . "_label");
00077 $input->value = $l_lib;
00078 $hidden = HtmlInput::hidden("j_id[]", $q[$e]['j_id']);
00079 $row.=td($input->input() . $hidden);
00080 $montant = td(nbm($q[$e]['j_montant']), 'class="num"');
00081 $row.=($q[$e]['j_debit'] == 't') ? $montant : td('');
00082 $row.=($q[$e]['j_debit'] == 'f') ? $montant : td('');
00083 echo tr($row);
00084 }
00085 ?>
00086 </table>