Author: danydb
Date: 2014-02-07 21:03:54 +0100 (Fri, 07 Feb 2014)
New Revision: 691

Modified:
   trunk/transform/raw.php
Log:
add representative only if needed

Modified: trunk/transform/raw.php
===================================================================
--- trunk/transform/raw.php     2014-02-07 20:01:57 UTC (rev 690)
+++ trunk/transform/raw.php     2014-02-07 20:03:54 UTC (rev 691)
@@ -23,7 +23,7 @@
 
 switch ($act)
 {
-    case 'listing_assujetti':
+    case 'listing_assujetti_xml':
         $request_id = HtmlInput::default_value_get('r_id', null);
 
         if ($request_id == null)
@@ -43,7 +43,9 @@
         $xml = new Transform_Intervat;
 
         $xml->append_root();
-        $xml->append_representative($representative);
+        if ( $representative->name != "") {
+            $xml->append_representative($representative);
+        }
         $xml->append_client_listing($declarant);
         $file = "listing_assujetti" . date('d.m.y.hi') . ".xml";
         $ref = $_ENV['TMP'] . "/" . $file;



---
PhpCompta est un logiciel de comptabilité libre en ligne (full web)
Projet opensource http://www.phpcompta.eu

_______________________________________________
Phpcompta  est un logiciel libre de comptabilité en ligne 
(http://www.phpcompta.eu)
Phpcompta-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/phpcompta-dev

Reply via email to