From 34d84c6d5dde9c664fed7c8726f9df75ed8be61a Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Wed, 21 Feb 2018 17:15:16 +0100 Subject: [PATCH] FIX: supplier credit notes: display link to discount in supplier credit note card --- htdocs/fourn/facture/card.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 0344890458b..c1c04489f1d 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2409,6 +2409,13 @@ else $facthatreplace->fetch($facidnext); print ' ('.$langs->transnoentities("ReplacedByInvoice",$facthatreplace->getNomUrl(1)).')'; } + if ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE || $object->type == FactureFournisseur::TYPE_DEPOSIT) { + $discount = new DiscountAbsolute($db); + $result = $discount->fetch(0, 0, $object->id); + if ($result > 0){ + print '. '.$langs->trans("CreditNoteConvertedIntoDiscount", $object->getLibType(), $discount->getNomUrl(1, 'discount')).'
'; + } + } print ''; if ($conf->global->MAIN_FEATURES_LEVEL > 0) {