Go to the documentation of this file.
4 ?><TABLE
class=
"result">
6 <
th><?php echo _(
"Pièce")?></
th>
7 <
th><?php echo _(
"Date")?></
th>
8 <
th><?php echo _(
"Paiement")?></
th>
9 <
th><?php echo _(
"Ref")?></
th>
10 <
th><?php echo _(
"Client").
"/"._(
"Fournisseur")?></
th>
11 <
th><?php echo _(
"Description")?></
th>
20 if (
$own->MY_TVA_USE==
'Y')
22 echo
'<th style="text-align:right">TVA ND</th>';
23 $a_Tva=
$cn->get_array(
"select tva_id,tva_label from tva_rate where tva_rate != 0.0000 order by tva_rate");
24 foreach($a_Tva as $line_tva)
26 $col_tva.=
'<th style="text-align:right">Tva '.$line_tva[
'tva_label'].
'</th>';
32 <
th><?php echo _(
"Opérations rapprochées")?></
th>
36 $cn->prepare(
'reconcile_date',
'select * from jrn where jr_id in (select jra_concerned from jrn_rapt where jr_id = $1 union all select jr_id from jrn_rapt where jra_concerned=$1)');
50 $class = (
$i % 2 == 0) ?
' class="even" ' :
' class="odd" ';
54 echo
"<TD>" .
h(
$line[
'jr_pj_number']) .
"</TD>";
68 echo
"<TD>" .
h(
$line[
'comment']) .
"</TD>";
71 $dep_priv=(
$line[
'dep_priv']==0)?
"":
nbm(round(
$line[
'dep_priv'],2),2);
72 $tot[
'dep_priv']=bcadd(
$tot[
'dep_priv'], floatval(
$line[
'dep_priv']));
76 $tot[
'dna']=bcadd(
$tot[
'dna'],round(floatval(
$line[
'dna'])),2);
79 echo
"<TD class=\"num\">" .
nbm(round(
$line[
'HTVA'],2),2) .
"</TD>";
80 $tot[
'htva']=bcadd(
$tot[
'htva'], round(floatval(
$line[
'HTVA']),2));
82 echo
"<TD class=\"num\">" .$dep_priv .
"</TD>";
83 echo
"<TD class=\"num\">" . $dna .
"</TD>";
88 if (
$own->MY_TVA_USE ==
'Y' )
90 $tva_dna=(
$line[
'tva_dna']==0)?
"":
nbm(round(
$line[
'tva_dna']),2);
91 $tot[
'tva_nd']=bcadd(
$tot[
'tva_nd'], round(floatval(
$line[
'tva_dna']),2));
92 echo
"<TD class=\"num\">" . $tva_dna.
"</TD>";
93 $a_tva_amount=array();
95 foreach (
$line[
'TVA'] as $lineTVA)
97 foreach ($a_Tva as
$idx=>$line_tva)
100 if ($line_tva[
'tva_id'] == $lineTVA[1][0])
102 $a=$line_tva[
'tva_id'];
103 $a_tva_amount[
$a]=$lineTVA[1][2];
107 foreach ($a_Tva as $line_tva)
109 $a=$line_tva[
'tva_id'];
110 if ( isset($a_tva_amount[
$a]) && $a_tva_amount[
$a] != 0) {
111 echo
'<td class="num">'.nb(round($a_tva_amount[
$a],2)).
'</td>';
112 $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);
115 printf(
"<td class=\"num\"></td>");
119 echo
'<td class="num">'.round(
$line[
'TVAC'],2).
'</td>';
120 $tot[
'tvac']=bcadd(
$tot[
'tvac'], round(floatval(
$line[
'TVAC']),2));
130 echo
$sep.HtmlInput::detail_op(
$row[
'jr_id'],
$row[
'jr_date'].
' '.
$row[
'jr_internal']);
141 <
tr class=
"highlight">
143 <?php echo _(
'Totaux')?>
150 <
td class=
"num"><?php echo
nbm(
$tot[
'htva']); ?></
td>
151 <
td class=
"num"><?php echo
nbm(
$tot[
'dep_priv']) ?></
td>
153 <?php
if (
$own->MY_TVA_USE ==
'Y' ): ?>
155 <?php
foreach ($a_Tva as $line_tva) :
156 $a=$line_tva[
'tva_id'];
167 <
td class=
"num"><?php echo
nbm(
$tot[
'tvac'])?></
td>
nbm($p_number, $p_dec=2)
format the number with a sep.
h( $row[ 'oa_description'])
tr($p_string, $p_extra='')
static fetch_array($ret, $p_indice=0)
wrapper for the function pg_fetch_array
if(isset( $tot[ 'tva'][ $a]))($tot['tva'][$a])?></td ><?php else endforeach
static num_row($ret)
wrapper for the function pg_num_rows
smaller_date($p_date)
shrink the date, make a date shorter for the printing
th($p_string, $p_extra='', $raw='')
td($p_string='', $p_extra='')
surround the string with td