From bcb39e57fb45ad0a85875e4bcae6eba18cef1799 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Tue, 20 Feb 2018 10:08:55 +0100 Subject: [PATCH] FIX: supplier credit notes: wrong credit note filter --- htdocs/fourn/facture/card.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index fa046a7a97c..d9fcf57a4a6 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2147,7 +2147,7 @@ else $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL"; // If we want deposit to be substracted to payments only and not to total of final invoice } else { $filterabsolutediscount = "fk_invoice_supplier_source IS NULL OR (description LIKE '(DEPOSIT)%' AND description NOT LIKE '(EXCESS PAID)%')"; - $filtercreditnote = "fk_invoice_supplier_source NOT IS NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS PAID)%')"; + $filtercreditnote = "fk_invoice_supplier_source IS NOT NULL AND (description NOT LIKE '(DEPOSIT)%' OR description LIKE '(EXCESS PAID)%')"; } $absolute_discount = $societe->getAvailableDiscounts('', $filterabsolutediscount, 0, 1); @@ -2426,6 +2426,7 @@ else print $langs->trans("CompanyHasNoRelativeDiscount"); // print ' ('.$addrelativediscount.')'; */ + // Is there is commercial discount or down payment available ? if ($absolute_discount > 0) { // print '. ';