noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/09: Ajout du code stock


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/09: Ajout du code stock
Date: Sat, 06 Dec 2014 18:57:37 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit e097ac58f4d11ae4d3c2445b167d4eba2f179c55
Author: Dany De Bontridder <address@hidden>
Date:   Fri Dec 5 21:50:48 2014 +0100

    Ajout du code stock
---
 include/class_document.php |   21 ++++++++++++++++++---
 1 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/include/class_document.php b/include/class_document.php
index 281cc29..bf95e14 100644
--- a/include/class_document.php
+++ b/include/class_document.php
@@ -508,7 +508,6 @@ class Document
      *  - [VEN_ART_PRICE]
      *  - [VEN_ART_QUANT]
      *  - [VEN_ART_TVA_CODE]
-     *  - [VEN_ART_TVA_AMOUNT]
      *  - [VEN_ART_STOCK_CODE]
      *  - [VEN_HTVA]
      *  - [VEN_TVAC]
@@ -818,7 +817,6 @@ class Document
              *  - [VEN_ART_PRICE]
              *  - [VEN_ART_QUANT]
              *  - [VEN_ART_TVA_CODE]
-             *  - [VEN_ART_TVA_AMOUNT]
              *  - [VEN_ART_STOCK_CODE]
              *  - [VEN_HTVA]
              *  - [VEN_TVAC]
@@ -883,7 +881,24 @@ class Document
                 else
                     $r=${'e_march'.$this->counter.'_label'};
             break;
-
+        case 'VEN_ART_STOCK_CODE':
+            extract ($p_array);
+                    $id = 'e_march' . $this->counter;
+                    // check if the march exists
+                    if (!isset(${$id}))
+                        $r= "";
+                    else 
+                    {
+                    // check that something is sold
+                        if (${'e_march' . $this->counter . '_price'} != 0 && 
${'e_quant' . $this->counter} != 0)
+                        {
+                            $f = new Fiche($this->db);
+                            $f->get_by_qcode(${$id}, false);
+                            $r = $f->strAttribut(ATTR_DEF_STOCK);
+                            $r=($r == NOTFOUND)?'':$r;
+                        } 
+                    }
+            break;
         case 'VEN_ART_PRICE':
             extract ($p_array);
             $id='e_march'.$this->counter.'_price' ;



reply via email to

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