22if (!defined(
'ALLOWED'))
23 die(
'Appel direct ne sont pas permis');
31echo \HtmlInput::filter_table(
"tb_print_ledger",
"0,1,2,3,4,5,6", 1);
35 <
th><?php echo _(
"Pièce")?></
th>
36 <
th><?php echo _(
"Date")?></
th>
37 <
th><?php echo _(
"Paiement")?></
th>
38 <
th><?php echo _(
"Ref")?></
th>
39 <
th><?php echo _(
"Client")?></
th>
40 <
th><?php echo _(
"Description")?></
th>
47 if (
$own->MY_TVA_USE==
'Y')
49 $a_Tva=$this->
db->get_array(
"select tva_id,tva_label from tva_rate where tva_rate != 0.0000 order by tva_id");
50 foreach($a_Tva as $line_tva)
52 $col_tva.=
'<th style="text-align:right">Tva '.$line_tva[
'tva_label'].
'</th>';
58 <
th><?php echo _(
"Opérations rapprochées")?></
th>
75 $class = (
$i % 2 == 0) ?
' class="even" ' :
' class="odd" ';
79 echo
"<TD>" .
h(
$line[
'jr_pj_number']) .
"</TD>";
94 echo
"<TD>" .
h(
$line[
'jr_comment']) .
"</TD>";
98 echo
"<TD class=\"num\">" .
nbm(round(
$line[
'novat'],2),2) .
"</TD>";
99 $tot[
'htva']=bcadd(
$tot[
'htva'], round(floatval(
$line[
'novat']),2));
104 if (
$own->MY_TVA_USE ==
'Y' )
106 $a_tva_amount=array();
108 foreach (
$line[
'detail_vat'] as $lineTVA)
110 foreach ($a_Tva as
$idx=>$line_tva)
113 if ($line_tva[
'tva_id'] == $lineTVA[
'qs_vat_code'])
115 $a=$line_tva[
'tva_id'];
116 $a_tva_amount[
$a]=$lineTVA[
"vat_amount"];
120 foreach ($a_Tva as $line_tva)
122 $a=$line_tva[
'tva_id'];
123 if ( isset($a_tva_amount[
$a]) && $a_tva_amount[
$a] != 0) {
124 echo
'<td class="num">'.nbm(round($a_tva_amount[
$a],2)).
'</td>';
125 $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);
128 printf(
"<td class=\"num\"></td>");
132 echo
'<td class="num">'.nbm(
$line[
'tvac'],2).
'</td>';
133 $tot[
'tvac']=bcadd(
$tot[
'tvac'], round(floatval(
$line[
'tvac']),2));
143 $msg=(
$row[
'qcode_bank'] !=
"")?
"[".
$row[
'qcode_bank'].
"]":
$row[
'jr_internal'];
155 <
tr class=
"highlight">
157 <?php echo _(
'Totaux')?>
164 <
td class=
"num"><?php echo
nbm(
$tot[
'htva']); ?></
td>
165 <?php
if (
$own->MY_TVA_USE ==
'Y' ): ?>
166 <?php
foreach ($a_Tva as $line_tva) :
167 $a=$line_tva[
'tva_id'];
168 if ( isset(
$tot[
'tva'][
$a])) :
178 <
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( $own->MY_TVA_USE=='Y')( $a_Tva as $line_tva) 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