From 4c0b0ef4c2b37f106d0017d3fbd21258fcaea2c5 Mon Sep 17 00:00:00 2001 From: phf Date: Tue, 13 Jun 2017 11:29:12 +0200 Subject: [PATCH 1/2] Fix display on situation invoice --- htdocs/compta/facture.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index c19c521ca65..59e52ac7b5d 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3327,7 +3327,7 @@ else if ($id > 0 || ! empty($ref)) print $object->situation_counter; print ''; - print ''; + print ''; $prevsits_total_amount = 0; foreach ($prevsits as $situation) { @@ -3335,9 +3335,10 @@ else if ($id > 0 || ! empty($ref)) } $prevsits_total_amount += $object->total_ht; - print price($prevsits_total_amount); - print ''; - print '' . $langs->trans('Currency' . $conf->currency) . ''; + print price($prevsits_total_amount, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) ); + + print ''; + // Previous situation(s) deduction(s) for ($i = 0; $i < $cprevsits; $i++) { @@ -3348,10 +3349,10 @@ else if ($id > 0 || ! empty($ref)) print $prevsits[$i]->situation_counter; print ''; - print ''; - print '- ' . price($prevsits[$i]->total_ht); - print ''; - print '' . $langs->trans('Currency' . $conf->currency) . ''; + print ''; + print '- ' . price($prevsits[$i]->total_ht, 0, $langs, 1, -1, -1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency) ); + print ''; + } } } From f2961b8652dce6ff9cf86a3d1fb4c1ab042a7c3e Mon Sep 17 00:00:00 2001 From: phf Date: Tue, 13 Jun 2017 12:30:30 +0200 Subject: [PATCH 2/2] Fix 6993 - supplier propal check min price on update line --- htdocs/supplier_proposal/card.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index ea0ecc12f89..55da718cebc 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -808,11 +808,6 @@ if (empty($reshook)) $price_min = $product->multiprices_min [$object->thirdparty->price_level]; $label = ((GETPOST('update_label') && GETPOST('product_label')) ? GETPOST('product_label') : ''); - - if ($price_min && (price2num($pu_ht) * (1 - price2num(GETPOST('remise_percent')) / 100) < price2num($price_min))) { - setEventMessages($langs->trans("CantBeLessThanMinPrice", price(price2num($price_min, 'MU'), 0, $langs, 0, 0, - 1, $conf->currency)), null, 'errors'); - $error ++; - } } else { $type = GETPOST('type'); $label = (GETPOST('product_label') ? GETPOST('product_label') : '');