From 25dcca301f38c986feef2beebc4b3800913da1a8 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Tue, 12 Apr 2016 09:47:35 +0200 Subject: [PATCH] Fix VAT amount on credit note was > 0 when manually entered --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ae368b3870b..333f71806c6 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2392,7 +2392,7 @@ class Facture extends CommonInvoice $this->line->date_start = $date_start; $this->line->date_end = $date_end; $this->line->total_ht = (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ht):$total_ht); // For credit note and if qty is negative, total is negative - $this->line->total_tva = $total_tva; + $this->line->total_tva = (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_tva):$total_tva); $this->line->total_localtax1 = $total_localtax1; $this->line->total_localtax2 = $total_localtax2; $this->line->total_ttc = (($this->type==self::TYPE_CREDIT_NOTE||$qty<0)?-abs($total_ttc):$total_ttc);