From c1e6d884422187bd589eb8baa7f56740a0b2ff71 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 4 Feb 2018 08:55:51 +0100 Subject: [PATCH] Fix: use product_type instead special_code --- htdocs/compta/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 3a1ee89b366..fe061cb2e3b 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -636,7 +636,7 @@ if (empty($reshook)) $i = 0; foreach ($object->lines as $line) { - if (empty($line->special_code) && $line->total_ht != 0) // Remove lines with special code + if (empty($line->product_type >= 9) && $line->total_ht != 0) // Remove lines with product_type greater than or equal to 9 { // no need to create discount if amount is null $amount_ht[$line->tva_tx] += $line->total_ht; $amount_tva[$line->tva_tx] += $line->total_tva;