From fa51e310b8b6ad99a4d40e372721b017007b4418 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Thu, 5 Sep 2013 17:19:30 +0200 Subject: [PATCH] Avoid silly assignment --- htdocs/compta/paiement/class/paiement.class.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 7ef5f44fb88..f7aff519bb6 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -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(