phpcompta-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpcompta-dev] r4632 - phpcompta/trunk/include


From: phpcompta-dev
Subject: [Phpcompta-dev] r4632 - phpcompta/trunk/include
Date: Tue, 20 Dec 2011 15:39:33 +0100 (CET)

Author: danydb
Date: 2011-12-20 15:39:32 +0100 (Tue, 20 Dec 2011)
New Revision: 4632

Modified:
   phpcompta/trunk/include/class_document.php
Log:
#315 D?\195?\169tail article 
VENT_ART_LABEL si vide on renvoie VEN_ART_NAME

Modified: phpcompta/trunk/include/class_document.php
===================================================================
--- phpcompta/trunk/include/class_document.php  2011-12-20 14:16:52 UTC (rev 
4631)
+++ phpcompta/trunk/include/class_document.php  2011-12-20 14:39:32 UTC (rev 
4632)
@@ -806,6 +806,20 @@
             // check if the march exists
             if ( ! isset (${$id})) return "";
             $r=${'e_march'.$counter.'_label'};
+            if (strlen(trim($r)) == 0)
+                {
+                    $id = 'e_march' . $counter;
+                    // check if the march exists
+                    if (!isset(${$id}))
+                        return "";
+                    // check that something is sold
+                    if (${'e_march' . $counter . '_price'} != 0 && ${'e_quant' 
. $counter} != 0)
+                    {
+                        $f = new Fiche($this->db);
+                        $f->get_by_qcode(${$id}, false);
+                        $r = $f->strAttribut(ATTR_DEF_NAME);
+                    }
+                }
             break;
 
         case 'VEN_ART_PRICE':




reply via email to

[Prev in Thread] Current Thread [Next in Thread]