noalyss Version-9
impress_reconciliation_detail.php
Go to the documentation of this file.
1<?php
2//This file is part of NOALYSS and is under GPL
3//see licence.txt
4?><table class="result">
5 <tr>
6 <th>
7
8 </th>
9 <th style="text-align:right">
10 <?php echo _("Prix HTVA")?>
11 </th>
12 <th style="text-align:right">
13 <?php echo _("Non Deductible")?>
14 </th>
15 <th style="text-align:right" >
16 <?php echo _("code tva")?>
17 </th>
18 <th style="text-align:right">
19 <?php echo _("TVA")?>
20 </th>
21 <th style="text-align:right">
22 <?php echo _("Tva ND")?>
23 </th>
24 <th style="text-align:right">
25 <?php echo _("Autoliquidation")?>
26 </th>
27 <th style="text-align:right">
28 <?php echo _("TVAC")?>
29 </th>
30 </tr>
31<?php
32$nb_record=Database::num_row($p_ret);
33bcscale(2);
40for ($i=0;$i < $nb_record;$i++) :
42 $tot_cum_price=bcadd($tot_cum_price,$row['price']);
43
44 $tot_cum_vat=bcadd($tot_cum_vat,$row['vat_amount']);
45
46
47?>
48
49 <tr>
50 <td>
51
52 </td>
53 <td class="num">
54 <?php echo nbm($row['price']); ?>
55 </td>
56 <td class="num">
57 <?php $tot_price=bcadd($row['nd_amount'],$row['dep_priv']);
59 echo nbm($tot_price); ?>
60 </td>
61 <td class="num">
62 <?php echo $row['tva_label']; ?>
63 </td>
64 <td class="num">
65 <?php echo nbm($row['vat_amount']); ?>
66 </td>
67 <td class="num">
68 <?php $tot_vat=bcadd($row['nd_tva'],$row['nd_tva_recup']);
70 echo nbm($tot_vat); ?>
71 </td>
72 <td class="num">
73 <?php
75 echo nbm($row['vat_sided']);
76 ?>
77 </td>
78 <td class="num">
79 <?php
80 $tot=bcadd($tot_vat,$row['price']);
81 $tot=bcadd($tot,$row['vat_amount']);
82 $tot=bcsub($tot,$row['vat_sided']);
84 echo nbm($tot);
85 ?>
86 </td>
87 </tr>
88<?php
90?>
91 <tfoot>
92 <td>
93 Totaux
94 </td>
95 <td class="num">
96 <?php echo nbm($tot_cum_price); ?>
97 </td>
98 <td class="num">
99 <?php echo nbm($tot_cum_nd); ?>
100 </td>
101 <td>
102
103 </td>
104 <td class="num">
105 <?php echo nbm($tot_cum_vat); ?>
106 </td>
107 <td class="num">
108 <?php echo nbm($tot_cum_nd_tva); ?>
109 </td>
110 <td class="num">
111 <?php echo nbm($tot_autoliquidation); ?>
112 </td>
113 <td class="num">
114 <?php
115 echo nbm($tot_cum_tvac); ?>
116 </td>
117 </tfoot>
118</table>
th($p_string, $p_extra='', $raw='')
Definition: ac_common.php:58
tr($p_string, $p_extra='')
Definition: ac_common.php:88
td($p_string='', $p_extra='')
surround the string with td
Definition: ac_common.php:83
nbm($p_number, $p_dec=2)
format the number with a sep.
Definition: ac_common.php:137
$opd_description style
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
$all table