task #0000804: Nombre de ligne par défaut

Correction pour ACH et VEN le journal par défaut n'avait pas le bon nombre de lignes
This commit is contained in:
Dany De Bontridder 2013-05-23 18:43:22 +00:00
parent 64415817ac
commit c176a7367e
5 changed files with 26 additions and 21 deletions

View file

@ -3371,11 +3371,11 @@ class Acc_Ledger extends jrn_def_sql
$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':

View file

@ -1074,11 +1074,13 @@ class Acc_Ledger_Purchase extends Acc_Ledger
// 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
//--

View file

@ -1209,9 +1209,9 @@ class Acc_Ledger_Sold extends Acc_Ledger
// 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");

View file

@ -238,12 +238,13 @@ class Pre_op_ach extends Pre_operation_detail
// 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;
$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();
$r.=$Hid->input("nb_item",$p_article);
// For each article
//--
for ($i=0;$i< $max ;$i++)

View file

@ -146,7 +146,7 @@ class Pre_op_ven extends Pre_operation_detail
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 @@ class Pre_op_ven extends Pre_operation_detail
$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,11 +231,13 @@ class Pre_op_ven extends Pre_operation_detail
// 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);
$max=($p_article < MAX_ARTICLE)?MAX_ARTICLE:$p_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();
$r.=$Hid->input("nb_item",$p_article);
$f_legend_detail=_("Détail articles vendus");