Go to the source code of this file.
Functions | |
MakeListingVat ($p_cn, $p_array, $p_year) | |
Créer le fichier à déposer pour la TVA voir le fichier BE_fr_list_client_nonpapier.pdf. |
|
Créer le fichier à déposer pour la TVA voir le fichier BE_fr_list_client_nonpapier.pdf. parm : -array gen : -none return:
Definition at line 36 of file decla.BE.inc.php. References $a, $b, $client, $my, and name. 00036 { 00037 // declarant 00038 //-- 00039 require_once("class_own.php"); 00040 // load the data 00041 $my=new Own($p_cn); 00042 //Make the first record 00043 $a="000000"; 00044 $a.=sprintf("% 32s",$my->MY_NAME); 00045 $b=$my->MY_STREET.",".$my->MY_NUMBER; 00046 $a.=sprintf("% 24s",$b); 00047 $b=$my->MY_CP." ".$my->MY_COMMUNE; 00048 $a.=sprintf("% 27s",$b); 00049 $a.="BE"; 00050 $a.=sprintf("%9s",$my->MY_TVA); 00051 // special zone 00052 $a.=sprintf("% 20s",' '); 00053 // 00054 $a.="E"; 00055 $a.=$p_year; 00056 $a.="\n"; 00057 // customer record 00058 $rec_id=0; 00059 $tot_amount=0; 00060 $tot_tva=0; 00061 foreach ($p_array as $client) { 00062 if ( strlen(trim($client['tva'])) != 0 ) { 00063 $rec_id++; 00064 $a.=sprintf("%06d",$rec_id); 00065 $a.=sprintf("% 32s",$client['name']); 00066 $a.=str_repeat(" ",51); 00067 $a.=sprintf("BE%s",$client['vat_number']); 00068 $a.=sprintf("%010d",$client['amount']*100); 00069 $a.=sprintf("%010d",$client['tva']*100); 00070 $a.=str_repeat(" ",10); 00071 $a.="\n"; 00072 $tot_amount=+$client['amount']*100; 00073 $tot_tva+=$client['tva']*100; 00074 } 00075 } 00076 //Last Record 00077 $a.="999999"; 00078 $a.=sprintf("%016d",$tot_amount); 00079 $a.=sprintf("%016d",$tot_tva); 00080 $a.=str_repeat(" ",51); 00081 $a.="BE"; 00082 $a.=$my->MY_TVA; 00083 $a.=str_repeat(" ",28); 00084 $a.="\r\n"; 00085 return $a; 00086 }
|