00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 include_once("class_widget.php");
00025
00026
00027
00028
00029
00030
00031
00032 if ( isset($_POST['bt_html'] )) {
00033 require_once("class_customer.php");
00034 $customer=new Customer($cn);
00035 $a_Res=$customer->VatListing($_POST['year']);
00036
00037 echo "
00038 <div class=\"u_redcontent\"
00039 <form method=\"post\" action=\"listing_client.php\">
00040 <input type=\"submit\" name=\"bt_disk\" value=\"expérimental !! déclaration magnétique\" disable>
00041 <input type=\"hidden\" name=\"year\" value=\"".$_POST['year']."\">
00042 </form>
00043 <Table class=\"result\">
00044 <tr>
00045 <th> Nom </th>
00046 <th> Numéro TVA </th>
00047 <th> Montant HTVA </th>
00048 <th> Montant TVA </th>
00049 </tr>
00050 ";
00051 foreach ($a_Res as $key=>$elt) {
00052 echo "<tr>".
00053 "<td>".$elt['name']."</td>".
00054 "<td>".$elt['vat_number']."</td>".
00055 "<td align=\"right\">".sprintf("% 8.2f",$elt['amount'])."</td>".
00056 "<td align=\"right\">".sprintf("% 8.2f",$elt['tva'])."</td>".
00057 "</tr>";
00058 }
00059 echo "</table>";
00060 echo "</div>";
00061 return;
00062 }
00063
00064
00065
00066
00067 $w=new widget("select");
00068 $w->table=1;
00069
00070 echo '<div class="u_redcontent">';
00071 echo '<FORM ACTION="user_impress.php?type=list_client" METHOD="POST">';
00072 echo '<TABLE>';
00073
00074 print '<TR>';
00075 $year=make_array($cn,"select distinct extract(year from jr_date), extract(year from jr_date) from jrn");
00076 if ( sizeof($year) == 0 )
00077 {
00078 echo "Aucun enregistrement dans les journaux";
00079 exit();
00080 }
00081 $w->label="Année concernée";
00082 print $w->IOValue('year',$year);
00083 print "</TR>";
00084 echo '</TABLE>';
00085 print $w->Submit('bt_html','Impression');
00086
00087 echo '</FORM>';
00088
00089 echo '</div>';
00090
00091 ?>