22if (!defined(
'ALLOWED'))
23 die(
'Appel direct ne sont pas permis');
29echo \HtmlInput::filter_table(
"tb_print_ledger",
"0,1,2,3,4,5,6,7", 1);
33 <
th><?php echo _(
"Pièce")?></
th>
34 <
th><?php echo _(
"Date")?></
th>
35 <
th><?php echo _(
"Paiement")?></
th>
36 <
th><?php echo _(
"Ref")?></
th>
37 <
th><?php echo _(
"Fournisseur")?></
th>
38 <
th><?php echo _(
"Description")?></
th>
47 if (
$own->MY_TVA_USE==
'Y')
49 echo
'<th style="text-align:right">TVA ND</th>';
50 $a_Tva=$this->
db->get_array(
"select tva_id,tva_label from tva_rate where tva_rate != 0.0000 order by tva_id");
51 foreach($a_Tva as $line_tva)
53 $col_tva.=
'<th style="text-align:right">Tva '.$line_tva[
'tva_label'].
'</th>';
59 <
th><?php echo _(
"Opérations rapprochées")?></
th>
76 $class = (
$i % 2 == 0) ?
' class="even" ' :
' class="odd" ';
80 echo
"<TD>" .
h(
$line[
'jr_pj_number']) .
"</TD>";
93 echo
"<TD>" .
h(
$line[
'jr_comment']) .
"</TD>";
96 $private_amount=(
$line[
'private_amount']==0)?
"":
nbm(round(
$line[
'private_amount'],2),2);
97 $tot[
'private_amount']=bcadd(
$tot[
'private_amount'], floatval(
$line[
'private_amount']));
100 $noded_amount=(
$line[
'noded_amount']==0)?
"":
nbm(round(
$line[
'noded_amount'],2),2);
101 $tot[
'noded_amount']=bcadd(
$tot[
'noded_amount'],round(floatval(
$line[
'noded_amount'])),2);
104 echo
"<TD class=\"num\">" .
nbm(round(
$line[
'novat'],2),2) .
"</TD>";
105 $tot[
'htva']=bcadd(
$tot[
'htva'], round(floatval(
$line[
'novat']),2));
107 echo
"<TD class=\"num\">" .$private_amount .
"</TD>";
108 echo
"<TD class=\"num\">" . $noded_amount .
"</TD>";
113 if (
$own->MY_TVA_USE ==
'Y' )
115 $tva_dna=(
$line[
'noded_vat']==0)?
"":
nbm(round(
$line[
'noded_vat']),2);
116 $tot[
'tva_nd']=bcadd(
$tot[
'tva_nd'], round(floatval(
$line[
'noded_vat']),2));
117 echo
"<TD class=\"num\">" . $tva_dna.
"</TD>";
118 $a_tva_amount=array();
120 foreach (
$line[
'detail_vat'] as $lineTVA)
122 foreach ($a_Tva as
$idx=>$line_tva)
125 if ($line_tva[
'tva_id'] == $lineTVA[
'qp_vat_code'])
127 $a=$line_tva[
'tva_id'];
128 $a_tva_amount[
$a]=$lineTVA[
'vat_amount'];
132 foreach ($a_Tva as $line_tva)
134 $a=$line_tva[
'tva_id'];
135 if ( isset($a_tva_amount[
$a]) && $a_tva_amount[
$a] != 0) {
136 echo
'<td class="num">'.nbm(round($a_tva_amount[
$a],2)).
'</td>';
137 $tot[
'tva'][
$a]=(isset(
$tot[
'tva'][
$a]))?bcadd(
$tot[
'tva'][
$a],round(floatval($a_tva_amount[
$a]),2)):round(floatval($a_tva_amount[
$a]),2);
140 printf(
"<td class=\"num\"></td>");
144 echo
'<td class="num">'.nbm(
$line[
'tvac'],2).
'</td>';
155 $msg=(
$row[
'qcode_bank'] !=
"")?
"[".
$row[
'qcode_bank'].
"]":
$row[
'jr_internal'];
167 <
tr class=
"highlight">
169 <?php echo _(
'Totaux')?>
176 <
td class=
"num"><?php echo
nbm(
$tot[
'htva']); ?></
td>
177 <
td class=
"num"><?php echo
nbm(
$tot[
'private_amount']) ?></
td>
178 <
td class=
"num"><?php echo
nbm(
$tot[
'noded_amount'])?></
td>
179 <?php
if (
$own->MY_TVA_USE ==
'Y' ): ?>
181 <?php
foreach ($a_Tva as $line_tva) :
182 $a=$line_tva[
'tva_id'];
183 if ( isset(
$tot[
'tva'][
$a])) :
193 <
td class=
"num"><?php echo
nbm(
$tot[
'tvac'])?></
td>
th($p_string, $p_extra='', $raw='')
smaller_date($p_date)
shrink the date, make a date shorter for the printing
tr($p_string, $p_extra='')
td($p_string='', $p_extra='')
surround the string with td
nbm($p_number, $p_dec=2)
format the number with a sep.
if(isset($tot['tva'][$a]))($tot['tva'][$a])?></td ><?php else endforeach
h( $row[ 'oa_description'])
static fetch_array($ret, $p_indice=0, $p_mode=PGSQL_ASSOC)
wrapper for the function pg_fetch_array
static num_row($ret)
wrapper for the function pg_num_rows