phpcompta-dev
[Top][All Lists]
Advanced

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

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


From: phpcompta-dev
Subject: [Phpcompta-dev] r5308 - phpcompta/trunk/include
Date: Thu, 23 May 2013 20:43:23 +0200 (CEST)

Author: danydb
Date: 2013-05-23 20:43:22 +0200 (Thu, 23 May 2013)
New Revision: 5308

Modified:
   phpcompta/trunk/include/class_acc_ledger.php
   phpcompta/trunk/include/class_acc_ledger_purchase.php
   phpcompta/trunk/include/class_acc_ledger_sold.php
   phpcompta/trunk/include/class_pre_op_ach.php
   phpcompta/trunk/include/class_pre_op_ven.php
Log:
task #0000804: Nombre de ligne par d?\195?\169faut

Correction pour ACH et VEN le journal par d?\195?\169faut n'avait pas le bon 
nombre de lignes

Modified: phpcompta/trunk/include/class_acc_ledger.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger.php        2013-05-22 21:48:41 UTC 
(rev 5307)
+++ phpcompta/trunk/include/class_acc_ledger.php        2013-05-23 18:43:22 UTC 
(rev 5308)
@@ -3371,11 +3371,11 @@
                $this->jrn_def_id = $p_jrn;
                $this->jrn_def_name = $p_jrn_name;
                $this->jrn_def_ech_lib = $p_ech_lib;
-               $this->jrn_def_max_line_deb = $p_jrn_deb_max_line;
+               $this->jrn_def_max_line_deb = 
($p_jrn_deb_max_line<1)?1:$p_jrn_deb_max_line;
                $this->jrn_def_type = $p_jrn_type;
                $this->jrn_def_pj_pref = $jrn_def_pj_pref;
                $this->jrn_def_fiche_deb = (isset($FICHEDEB)) ? join($FICHEDEB, 
',') : "";
-               $this->jrn_deb_max_line=$min_row;
+               $this->jrn_deb_max_line=($min_row<1)?1:$min_row;
                switch ($this->jrn_def_type)
                {
                        case 'ACH':

Modified: phpcompta/trunk/include/class_acc_ledger_purchase.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger_purchase.php       2013-05-22 
21:48:41 UTC (rev 5307)
+++ phpcompta/trunk/include/class_acc_ledger_purchase.php       2013-05-23 
18:43:22 UTC (rev 5308)
@@ -1074,12 +1074,14 @@
 
 
         // Record the current number of article
-        $Hid=new IHidden();
-        $p_article= ( isset ($nb_item))?$nb_item:MAX_ARTICLE;
-        $r.=$Hid->input("nb_item",$p_article);
+
         $e_comment=(isset($e_comment))?$e_comment:"";
-        $max=($p_article < MAX_ARTICLE)?MAX_ARTICLE:$p_article;
+               $p_article= ( isset ($nb_item))?$nb_item:$this->get_min_row();
+        $max=($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++)

Modified: phpcompta/trunk/include/class_acc_ledger_sold.php
===================================================================
--- phpcompta/trunk/include/class_acc_ledger_sold.php   2013-05-22 21:48:41 UTC 
(rev 5307)
+++ phpcompta/trunk/include/class_acc_ledger_sold.php   2013-05-23 18:43:22 UTC 
(rev 5308)
@@ -1209,9 +1209,9 @@
 
         // Record the current number of article
         $Hid=new IHidden();
-        $p_article= ( isset ($nb_item))?$nb_item:MAX_ARTICLE;
+        $p_article= ( isset ($nb_item))?$nb_item:$this->get_min_row();
         $r.=$Hid->input("nb_item",$p_article);
-        $max=($p_article < MAX_ARTICLE)?MAX_ARTICLE:$p_article;
+        $max=($p_article < 
$this->get_min_row())?$this->get_min_row():$p_article;
 
 
         $f_legend_detail=_("Détail articles vendus");

Modified: phpcompta/trunk/include/class_pre_op_ach.php
===================================================================
--- phpcompta/trunk/include/class_pre_op_ach.php        2013-05-22 21:48:41 UTC 
(rev 5307)
+++ phpcompta/trunk/include/class_pre_op_ach.php        2013-05-23 18:43:22 UTC 
(rev 5308)
@@ -238,12 +238,13 @@
 
 
         // Record the current number of article
+               $min=$ledger->get_min_row();
+        $p_article= ( isset ($nb_item))?$nb_item:$min;
+        $max=($p_article < $min)?$min:$p_article;
+
+        $e_comment=(isset($e_comment))?$e_comment:"";
         $Hid=new IHidden();
-        $p_article= ( isset ($nb_item))?$nb_item:MAX_ARTICLE;
         $r.=$Hid->input("nb_item",$p_article);
-        $e_comment=(isset($e_comment))?$e_comment:"";
-        $max=($p_article < MAX_ARTICLE)?MAX_ARTICLE:$p_article;
-
         // For each article
         //--
         for ($i=0;$i< $max ;$i++)

Modified: phpcompta/trunk/include/class_pre_op_ven.php
===================================================================
--- phpcompta/trunk/include/class_pre_op_ven.php        2013-05-22 21:48:41 UTC 
(rev 5307)
+++ phpcompta/trunk/include/class_pre_op_ven.php        2013-05-23 18:43:22 UTC 
(rev 5308)
@@ -146,7 +146,7 @@
         if ( $p_array != null ) extract($p_array);
         require_once 'class_acc_ledger_sold.php';
         $ledger=new Acc_Ledger_Sold($this->db,$this->jrn_def_id);
-         
+
         $flag_tva=$g_parameter->MY_TVA_USE;
         /* Add button */
         $f_add_button=new IButton('add_card');
@@ -171,14 +171,14 @@
                 $str_add_button=$f_add_button->input();
                 $str_add_button2=$f_add_button2->input();
         }
-       
+
         $r='';
         $r.=dossier::hidden();
         $f_legend=_('En-tête facture client');
 
-        
+
         /* if we suggest the next pj, then we need a javascript */
-       
+
         // Display the customer
         //--
         $fiche='deb';
@@ -231,12 +231,14 @@
 
 
         // Record the current number of article
+               $min=$ledger->get_min_row();
+        $p_article= ( isset ($nb_item))?$nb_item:$min;
+        $max=($p_article < $min)?$min:$p_article;
+
+        $e_comment=(isset($e_comment))?$e_comment:"";
         $Hid=new IHidden();
-        $p_article= ( isset ($nb_item))?$nb_item:MAX_ARTICLE;
         $r.=$Hid->input("nb_item",$p_article);
-        $max=($p_article < MAX_ARTICLE)?MAX_ARTICLE:$p_article;
 
-
         $f_legend_detail=_("Détail articles vendus");
 
         // For each article



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



reply via email to

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