<th class=\"FacetFieldCaptionTD\">".$script_transl['doc_type']."</th> <th class=\"FacetFieldCaptionTD\">N.</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['customer']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['taxable']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['vat']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['stamp']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['tot']."</th>\n"; foreach($rs as $k=>$v) { // calcolo i totali $stamp=false; $round=0; if($v['tes']['tippag']=='T') { $stamp=$v['tes']['stamp']; $round=$v['tes']['numrat']*$v['tes']['round_stamp']; } $tot=computeTot($v['vat'],$v['car']-$v['rit'],$stamp,$round); //fine calcolo totali echo "<tr class=\"FacetDataTD\"> <td align=\"center\">".gaz_format_date($v['tes']['datfat'])."</td> <td>".$v['tes']['protoc']."</td> <td>".$v['tes']['tipdoc']."</td> <td>".$v['tes']['numfat']."</td> <td>".$v['tes']['ragsoc']."</td> <td align=\"right\">".gaz_format_number($tot['taxable'])."</td> <td align=\"right\">".gaz_format_number($tot['vat'])."</td> <td align=\"right\">".gaz_format_number($tot['stamp'])."</td> <td align=\"right\">".gaz_format_number($tot['tot'])."</td> </tr>\n"; } if (count($rs) > 0) { echo "\t<tr class=\"FacetFieldCaptionTD\">\n";
//mostro l'anteprima if (isset($_POST['preview'])) { $rs=getDocumentsAccounts($form['type'],$form['vat_section'],strftime("%Y%m%d",$uts_this_date),$form['profin']); echo "<div align=\"center\"><b>".$script_transl['preview']."</b></div>"; echo "<table class=\"Tlarge\">"; echo "<th class=\"FacetFieldCaptionTD\">".$script_transl['date_reg']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['protoc']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['doc_type']."</th> <th class=\"FacetFieldCaptionTD\">N.</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['customer']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['taxable']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['vat']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['tot']."</th>\n"; foreach($rs as $k=>$v) { $tot=computeTot($v['vat']); //fine calcolo totali echo "<tr class=\"FacetDataTD\"> <td align=\"center\">".gaz_format_date($v['tes']['datfat'])."</td> <td>".$v['tes']['protoc']."</td> <td>".$v['tes']['tipdoc']."</td> <td>".$v['tes']['numfat']."</td> <td>".$v['tes']['ragsoc']."</td> <td align=\"right\">".gaz_format_number($tot['taxable'])."</td> <td align=\"right\">".gaz_format_number($tot['vat'])."</td> <td align=\"right\">".gaz_format_number($tot['tot'])."</td> </tr>\n"; } if (count($rs) > 0) { echo "\t<tr class=\"FacetFieldCaptionTD\">\n"; echo '<td colspan="9" align="right"><input type="submit" name="submit" value="';
<th class=\"FacetFieldCaptionTD\">".$script_transl['protoc']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['doc_type']."</th> <th class=\"FacetFieldCaptionTD\">N.</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['customer']."</th> <th class=\"FacetFieldCaptionTD\">".$script_transl['tot']."</th>\n"; $ctrl_date=''; $tot_type=array('B'=>0,'T'=>0,'V'=>0); foreach($rs as $k=>$v) { if($ctrl_date <> substr($v['tes']['datfat'],0,4)) { $n=getReceiptNumber($v['tes']['datfat']); } // calcolo i totali $stamp=false; $round=0; $tot=computeTot($v['vat'],$v['car']-$v['rit']); //fine calcolo totali echo "<tr class=\"FacetDataTD\"> <td align=\"center\">".gaz_format_date($v['tes']['datfat'])."</td> <td align=\"center\">".$v['tes']['protoc'].'/'.$v['tes']['seziva']."</td> <td>".$script_transl['doc_type_value'][$v['tes']['tipdoc']]."</td> <td>".$v['tes']['numfat']."</td> <td>".$v['tes']['ragsoc']."</td> <td align=\"right\">".gaz_format_number($tot['tot'])."</td> </tr>\n"; $rate = CalcolaScadenze($tot['tot'],substr($v['tes']['datfat'],8,2),substr($v['tes']['datfat'],5,2),substr($v['tes']['datfat'],0,4),$v['tes']['tipdec'],$v['tes']['giodec'],$v['tes']['numrat'],$v['tes']['tiprat'],$v['tes']['mesesc'],$v['tes']['giosuc']); foreach($rate['import'] as $k_r=>$v_r) { $n_type=$v['tes']['tippag']; $tot_type[$v['tes']['tippag']]+=$v_r; if ($n_type == 'B'){ $n_type = 'R';