Avoid silly assignment

This commit is contained in:
Raphaël Doursenaud 2013-09-05 17:19:30 +02:00
parent 9046d620e1
commit fa51e310b8

View File

@ -405,10 +405,9 @@ class Paiement extends CommonObject
$acc = new Account($this->db);
$result=$acc->fetch($this->fk_account);
$totalamount=$this->amount;
if (empty($totalamount)) $totalamount=$this->total; // For backward compatibility
if ($mode == 'payment') $totalamount=$totalamount;
if ($mode == 'payment_supplier') $totalamount=-$totalamount;
if (empty($this->amount)) $totalamount=$this->total; // For backward compatibility
if ($mode == 'payment') $totalamount=$this->amount;
if ($mode == 'payment_supplier') $totalamount=-$this->amount;
// Insert payment into llx_bank
$bank_line_id = $acc->addline(