From c9bdefbbe0dc3ee046d4c92f53591375cc2226ef Mon Sep 17 00:00:00 2001 From: Bahfir Abbes Date: Fri, 20 Mar 2020 19:08:24 +0100 Subject: [PATCH] fix: delete redundant test+fix condition test+display units type if products in warehouse of same nature --- htdocs/product/stock/card.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 47d8775b163..af0703a119e 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -628,16 +628,13 @@ else print ''; print $langs->trans("StockCorrection"); print ""; - } - - if ($user->rights->stock->creer) { print ''; print $langs->trans("StockCorrection"); print ""; } if(!empty($conf->global->PRODUCT_USE_UNITS)) { if ($i == 0) $units = $productstatic->fk_unit; - elseif($productstatic->fk_unit !== $units) $sameunits = false; + elseif($productstatic->fk_unit != $units) $sameunits = false; } print ""; $i++; @@ -649,7 +646,9 @@ else $valtoshow=price2num($totalunit, 'MS'); if(empty($conf->global->PRODUCT_USE_UNITS) || $sameunits) print empty($valtoshow)?'0':$valtoshow; print ''; - print ' '; + print ''; + if(empty($conf->global->PRODUCT_USE_UNITS) && $sameunits) print $langs->trans($productstatic->getLabelOfUnit()); + print ''; print ''.price(price2num($totalvalue, 'MT')).''; if (empty($conf->global->PRODUIT_MULTIPRICES)) {