noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
Loading...
Searching...
No Matches
tax_detail-html.php
Go to the documentation of this file.
1<?php
2/*
3 * This file is part of NOALYSS.
4 *
5 * NOALYSS is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * NOALYSS is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with NOALYSS; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/
19// Copyright Author Dany De Bontridder danydb@aevalys.eu 26/07/24
20/*!
21 * \file
22 * \brief display result of tax detail
23 *
24 */
25
26global $data;
27echo HtmlInput::filter_table("detail_tva_id", "0,1,2,3,4,5,6,7,8,9,10,11", 1);
28$aTotaux=array();
29foreach (array('amount','vat_amount','amount_nd_tva','amount_nd_recup','autoreverse') as $i_tva) :
30 $aTotaux[$i_tva]=0;
32?>
33<table class="result" id="detail_tva_id">
34 <tr>
35 <th>Date</th>
36 <th>Pièce</th>
37 <th>Fiche</th>
38 <th>Poste</th>
39 <th class="num">Base</th>
40 <th class="text-center">code TVA</th>
41 <th class="num">Taux</th>
42 <th class="num">Montant TVA</th>
43 <th class="num">Non déductible</th>
44 <th class="num">récupérable par impôt</th>
45
46 <th class="num">Autoliquidation</th>
47 </tr>
48<?php
49$idx=0; bcscale(4);
50foreach ($data as $item):
51 $idx++;
52 $class=($idx%2==0)?'even':'odd';
53 $receipt_number=($item['jr_pj_number']=="")?$item['jr_internal']:$item['jr_pj_number'];
54 $control=bcmul($item['tva_rate'],$item['j_montant'],4);
55 $delta_control=bcsub($control,$item['vat_amount'],2);
58 if ( $delta_control != 0 ) {
59 $w_amount=sprintf('<span tabindex="-1" style="color:red" class="icon">&#xe80e; diff. TVA calculée %s</span>',$delta_control);
60 }
61?>
62<tr class="<?=$class?>">
63 <td><?=$item['str_date']?></td>
64 <td><?=HtmlInput::detail_op($item["jr_id"], $receipt_number)?></td>
65 <td><?=$item['j_qcode']?></td>
66 <td><?=$item['j_poste']?>
67 <?=$w_amount?>
68 </td>
69 <td class="num"><?=nbm($item['j_montant'],2)?></td>
70 <td class="text-center"><?=$item['tva_code']?></td>
71 <td class="num"><?=nbm($item['tva_rate'],2)?></td>
72 <td class="num"><?=nbm($item['vat_amount'],2)?></td>
73 <td class="num"><?=nbm($item['qp_nd_tva'],2)?></td>
74 <td class="num"><?=nbm($item['qp_nd_tva_recup'],2)?></td>
75 <td class="num"><?=nbm($item['qp_vat_sided'],2)?></td>
76 <?php
77 $aTotaux['amount']=bcadd($aTotaux['amount'],$item['j_montant'],2);
78 $aTotaux['vat_amount']=bcadd($aTotaux['vat_amount'],$item['vat_amount'],2);
79 $aTotaux['amount_nd_tva']=bcadd($aTotaux['amount_nd_tva'],$item['qp_nd_tva'],2);
80 $aTotaux['amount_nd_recup']=bcadd($aTotaux['amount_nd_recup'],$item['qp_nd_tva_recup'],2);
81
82 $aTotaux['autoreverse']=bcadd($aTotaux['autoreverse'],$item['qp_vat_sided'],2);
83 ?>
84</tr>
85<?php
87?>
88<tfoot>
89<tr class="highlight">
90 <td></td>
91 <td></td>
92 <td></td>
93 <td></td>
94 <td class="num"><?=nbm($aTotaux['amount'],2)?></td>
95 <td></td>
96 <td></td>
97 <td class="num"><?=nbm($aTotaux['vat_amount'],2)?></td>
98 <td class="num"><?=nbm($aTotaux['amount_nd_tva'],2)?></td>
99 <td class="num"><?=nbm($aTotaux['amount_nd_recup'],2)?></td>
100
101 <td class="num"><?=nbm($aTotaux['autoreverse'],2)?></td>
102
103</tr>
104</tfoot>
105
106</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.
if(isset($tot['tva'][$a]))($tot['tva'][$a])?></td ><?php else endforeach
define Class fiche and fiche def, those class are using class attribut. When adding or modifing new c...
static detail_op($p_jr_id, $p_mesg)
return a string containing the html code for calling the modifyOperation
$all table
$receipt_number
$delta_control