noalyss-commit
[Top][All Lists]
Advanced

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

[Noalyss-commit] [noalyss] 01/02: Ledger & predefined operation : proble


From: Dany De Bontridder
Subject: [Noalyss-commit] [noalyss] 01/02: Ledger & predefined operation : problem if number of rows is different
Date: Sat, 19 Mar 2016 12:57:09 +0000

sparkyx pushed a commit to branch master
in repository noalyss.

commit 799457785cdc7c5a72b07497a382a04fd67c2c02
Author: Dany De Bontridder <address@hidden>
Date:   Sat Mar 19 12:52:53 2016 +0100

    Ledger & predefined operation : problem if number of rows is different
---
 include/class/class_acc_ledger_purchase.php |    6 +++---
 include/class/class_acc_ledger_sold.php     |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/include/class/class_acc_ledger_purchase.php 
b/include/class/class_acc_ledger_purchase.php
index 24e16ca..b656bb7 100644
--- a/include/class/class_acc_ledger_purchase.php
+++ b/include/class/class_acc_ledger_purchase.php
@@ -1139,15 +1139,15 @@ class  Acc_Ledger_Purchase extends Acc_Ledger
         // Record the current number of article
 
         $e_comment=(isset($e_comment))?$e_comment:"";
-               $p_article= ( isset ($nb_item))?$nb_item:$this->get_min_row();
-        $max=($p_article < 
$this->get_min_row())?$this->get_min_row():$p_article;
+       $p_article= ( isset ($nb_item))?$nb_item:$this->get_min_row();
+        $p_article=($p_article < 
$this->get_min_row())?$this->get_min_row():$p_article;
 
         $Hid=new IHidden();
                $r.=$Hid->input("nb_item",$p_article);
 
         // For each article
         //--
-        for ($i=0;$i< $max ;$i++)
+        for ($i=0;$i< $p_article ;$i++)
         {
             // Code id, price & vat code
             //--
diff --git a/include/class/class_acc_ledger_sold.php 
b/include/class/class_acc_ledger_sold.php
index 0fea043..6358679 100644
--- a/include/class/class_acc_ledger_sold.php
+++ b/include/class/class_acc_ledger_sold.php
@@ -1170,14 +1170,14 @@ EOF;
         $Hid = new IHidden();
         $p_article = ( isset($nb_item)) ? $nb_item : $this->get_min_row();
         $r.=$Hid->input("nb_item", $p_article);
-        $max = ($p_article < $this->get_min_row()) ? $this->get_min_row() : 
$p_article;
+        $p_article = ($p_article < $this->get_min_row()) ? 
$this->get_min_row() : $p_article;
 
 
         $f_legend_detail = _("Détail articles vendus");
 
         // For each article
         //--
-        for ($i = 0; $i < $max; $i++) {
+        for ($i = 0; $i < $p_article; $i++) {
             // Code id, price & vat code
             //--
             $march = (isset(${"e_march$i"})) ? ${"e_march$i"} : "";



reply via email to

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