From cfdbef6bc30f38b8a945bb9e5a826d05854b66d0 Mon Sep 17 00:00:00 2001 From: Marc de Lima Lucio Date: Wed, 21 Feb 2018 09:31:01 +0100 Subject: [PATCH] NEW: supplier credit notes: display supplier discounts in supplier card --- htdocs/fourn/card.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 588c13ca849..60f745d95c7 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -255,6 +255,28 @@ if ($object->id > 0) } print ""; print ''; + + if($conf->global->MAIN_FEATURES_LEVEL > 0) { + // Absolute discounts (Discounts-Drawbacks-Rebates) + print ''; + print ''; + print '
'; + print $langs->trans("CustomerAbsoluteDiscountShort"); + print ''; + if ($user->rights->societe->creer && !$user->societe_id > 0) + { + print ''.img_edit($langs->trans("Modify")).''; + } + print '
'; + print ''; + print ''; + $amount_discount=$object->getAvailableDiscounts('', '', 0, 1); + if ($amount_discount < 0) dol_print_error($db,$object->error); + if ($amount_discount > 0) print ''.price($amount_discount,1,$langs,1,-1,-1,$conf->currency).''; + //else print $langs->trans("DiscountNone"); + print ''; + print ''; + } print ''; print '';