From 3e6fa613fed64cc2a6c81cfa86f2d0535c9f847d Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 21 Jan 2011 10:04:32 +0000 Subject: [PATCH] Remove useless file : experimental listing in XML for VAT, must be done by the plugin --- html/listing_client.php | 60 -------------------------- include/decla.BE.inc.php | 93 ---------------------------------------- 2 files changed, 153 deletions(-) delete mode 100644 html/listing_client.php delete mode 100644 include/decla.BE.inc.php diff --git a/html/listing_client.php b/html/listing_client.php deleted file mode 100644 index 6e950e9d5..000000000 --- a/html/listing_client.php +++ /dev/null @@ -1,60 +0,0 @@ - experimental - */ -//----------------------------------------------------- -// Check User -include ('class_user.php'); -/* Admin. Dossier */ -require_once('class_dossier.php'); -$gDossier=dossier::id(); - -$cn=new Database($gDossier); - -$User=new User($cn); -$User->Check(); - -// TODO a specific level of security for the "bilan" ??? -// Change must be done here -$User->can_request($cn,IMP); - -header('Content-type: application/bin'); -header('Content-Disposition: attachment;filename="declaration.bin"',FALSE); - -//----------------------------------------------------- -// Submit for a magnetic declaration -// Belgium only -//----------------------------------------------------- -if ( isset($_POST['bt_disk'])) -{ - require_once("class_customer.php"); - $customer=new Customer($cn); - $a_Res=$customer->VatListing($_POST['year']); - - require_once("decla.BE.inc.php"); - $a=MakeListingVat($cn,$a_Res,$_POST['year']); - echo "$a"; - return; -} -?> diff --git a/include/decla.BE.inc.php b/include/decla.BE.inc.php deleted file mode 100644 index 326c73ea3..000000000 --- a/include/decla.BE.inc.php +++ /dev/null @@ -1,93 +0,0 @@ -MY_NAME); - $b=$my->MY_STREET.",".$my->MY_NUMBER; - $a.=sprintf("% 24s",$b); - $b=$my->MY_CP." ".$my->MY_COMMUNE; - $a.=sprintf("% 27s",$b); - $a.="BE"; - $a.=sprintf("%9s",$my->MY_TVA); - // special zone - $a.=sprintf("% 20s",' '); - // - $a.="E"; - $a.=$p_year; - $a.="\n"; - // customer record - $rec_id=0; - $tot_amount=0; - $tot_tva=0; - foreach ($p_array as $client) - { - if ( strlen(trim($client['tva'])) != 0 ) - { - $rec_id++; - $a.=sprintf("%06d",$rec_id); - $a.=sprintf("% 32s",$client['name']); - $a.=str_repeat(" ",51); - $a.=sprintf("BE%s",$client['vat_number']); - $a.=sprintf("%010d",$client['amount']*100); - $a.=sprintf("%010d",$client['tva']*100); - $a.=str_repeat(" ",10); - $a.="\n"; - $tot_amount=+$client['amount']*100; - $tot_tva+=$client['tva']*100; - } - } - //Last Record - $a.="999999"; - $a.=sprintf("%016d",$tot_amount); - $a.=sprintf("%016d",$tot_tva); - $a.=str_repeat(" ",51); - $a.="BE"; - $a.=$my->MY_TVA; - $a.=str_repeat(" ",28); - $a.="\r\n"; - return $a; -}