noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 03/06: Correct the number of rows with predef


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 03/06: Correct the number of rows with predefined operations
Date: Mon, 29 Feb 2016 21:32:48 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit bdfb364b7ec092f620d2e57fbdb427b5135e60c1
Author: Dany De Bontridder <address@hidden>
Date:   Mon Feb 29 21:42:54 2016 +0100

    Correct the number of rows with predefined operations
---
 include/class/class_pre_op_ach.php |    8 ++++++--
 include/class/class_pre_op_ven.php |    8 ++++++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/include/class/class_pre_op_ach.php 
b/include/class/class_pre_op_ach.php
index 4b51271..34d40c6 100644
--- a/include/class/class_pre_op_ach.php
+++ b/include/class/class_pre_op_ach.php
@@ -126,14 +126,18 @@ class Pre_op_ach extends Pre_operation_detail
             }
             else
             {
-                $array+=array("e_march".$count=>$row['opd_poste'],
+                if ( trim($row['opd_poste']) !="" )
+                {
+                    $array+=array("e_march".$count=>$row['opd_poste'],
                               "e_march".$count."_price"=>$row['opd_amount'],
                               "e_march".$count."_tva_id"=>$row['opd_tva_id'],
                               
"e_march".$count."_tva_amount"=>$row['opd_tva_amount'],
                               "e_quant".$count=>$row['opd_quantity']
                              );
-                $count++;
+                    $count++;
+                }
             }
+            $array['nb_item']=$count;
         }
         return $array;
     }
diff --git a/include/class/class_pre_op_ven.php 
b/include/class/class_pre_op_ven.php
index 5c386a5..26e322d 100644
--- a/include/class/class_pre_op_ven.php
+++ b/include/class/class_pre_op_ven.php
@@ -124,16 +124,20 @@ class Pre_op_ven extends Pre_operation_detail
             }
             else
             {
-                $array+=array("e_march".$count=>$row['opd_poste'],
+                if ( trim($row['opd_poste']) != "")
+                {
+                    $array+=array("e_march".$count=>$row['opd_poste'],
                               "e_march".$count."_price"=>$row['opd_amount'],
                               "e_march".$count."_tva_id"=>$row['opd_tva_id'],
                               "e_quant".$count=>$row['opd_quantity'],
                               "e_march".$count."_label"=>$row['opd_comment'],
                               
"e_march".$count."_tva_amount"=>$row['opd_tva_amount'],
                              );
-                $count++;
+                    $count++;
+                }
             }
         }
+        $array['nb_item']=$count;
         return $array;
     }
     /*!\brief load the data from the database and return an array



reply via email to

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