Fix small bugs payment method by ledger

This commit is contained in:
Dany De Bontridder 2011-11-15 20:55:45 +00:00
parent 8910c69842
commit 125b577ef1
3 changed files with 12 additions and 8 deletions

View file

@ -733,7 +733,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
/* jrnx */
$acseq=$this->db->get_next_seq('s_grpt');
$acjrn=new Acc_Ledger($this->db,$mp->get_parameter('ledger'));
$acjrn=new Acc_Ledger($this->db,$mp->get_parameter('ledger_target'));
$acinternal=$acjrn->compute_internal_code($acseq);
/* Insert paid by */
@ -757,7 +757,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$acc_pay->amount=abs(round($cust_amount,2));
$acc_pay->desc=$e_comm;
$acc_pay->grpt=$acseq;
$acc_pay->jrn=$mp->get_parameter('ledger');
$acc_pay->jrn=$mp->get_parameter('ledger_target');
$acc_pay->periode=$tperiode;
$acc_pay->type=($cust_amount>=0)?'c':'d';
$acc_pay->insert_jrnx();
@ -770,7 +770,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger
$acc_pay->amount=abs(round($cust_amount,2));
$acc_pay->desc=$e_comm;
$acc_pay->grpt=$acseq;
$acc_pay->jrn=$mp->get_parameter('ledger');
$acc_pay->jrn=$mp->get_parameter('ledger_target');
$acc_pay->periode=$tperiode;
$acc_pay->type=($cust_amount>=0)?'d':'c';
$let_other=$acc_pay->insert_jrnx();
@ -819,7 +819,8 @@ class Acc_Ledger_Purchase extends Acc_Ledger
echo '<span class="error">'.
'Erreur dans l\'enregistrement '.
__FILE__.':'.__LINE__.' '.
$e->getMessage().$e->getTrace();
$e->getMessage().$e->getTraceAsString();
$this->db->rollback();
exit();
}

View file

@ -493,7 +493,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
/* jrnx */
$acseq=$this->db->get_next_seq('s_grpt');
$acjrn=new Acc_Ledger($this->db,$mp->get_parameter('ledger'));
$acjrn=new Acc_Ledger($this->db,$mp->get_parameter('ledger_target'));
$acinternal=$acjrn->compute_internal_code($acseq);
/* Insert paid by */
@ -517,7 +517,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
$acc_pay->amount=abs(round($cust_amount,2));
$acc_pay->desc=$e_comm;
$acc_pay->grpt=$acseq;
$acc_pay->jrn=$mp->get_parameter('ledger');
$acc_pay->jrn=$mp->get_parameter('ledger_target');
$acc_pay->periode=$tperiode;
$acc_pay->type=($cust_amount>=0)?'d':'c';
$acc_pay->insert_jrnx();
@ -530,7 +530,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
$acc_pay->amount=abs(round($cust_amount,2));
$acc_pay->desc=$e_comm;
$acc_pay->grpt=$acseq;
$acc_pay->jrn=$mp->get_parameter('ledger');
$acc_pay->jrn=$mp->get_parameter('ledger_target');
$acc_pay->periode=$tperiode;
$acc_pay->type=($cust_amount>=0)?'c':'d';
$let_other=$acc_pay->insert_jrnx();
@ -1284,7 +1284,7 @@ class Acc_Ledger_Sold extends Acc_Ledger
$r.="</DIV>";
return $r;
}
/*!\brief test function
*/
static function test_me($p_string='')

View file

@ -69,7 +69,10 @@ class Acc_Payment
return $this->$idx;
}
else
{
throw new Exception("Attribut inexistant $p_string");
exit (__FILE__.":".__LINE__.'Erreur attribut inexistant');
}
}
public function set_parameter($p_string,$p_value)
{