From cf6dac2d1ffc3d2b07d668865712ea904f774ef4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 31 Oct 2023 11:50:07 +0100 Subject: [PATCH] css if stock negative --- htdocs/product/reassortlot.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 649e468cc6d..3b2588bf752 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -830,11 +830,17 @@ while ($i < $imaxinloop) { //if ($objp->seuil_stock_alerte && ($objp->stock_physique < $objp->seuil_stock_alerte)) print img_warning($langs->trans("StockTooLow")).' '; if (is_null($objp->stock_physique)) { if (!empty($objp->reel)) { - print price2num($objp->reel, 'MS').($objp->stock_physique < 0 ? ' '.img_warning() : ''); + if ($objp->reel < 0) { print ''; } + print price2num($objp->reel, 'MS'); + if ($objp->reel < 0) { print ''; } + print ($objp->stock_physique < 0 ? ' '.img_warning() : ''); } } else { if (!empty($objp->stock_physique)) { - print price2num($objp->stock_physique, 'MS').($objp->stock_physique < 0 ? ' '.img_warning() : (($objp->stock_physique > 1 && $objp->tobatch == 2) ? ' '.img_warning($langs->trans('IlligalQtyForSerialNumbers')): '')); + if ($objp->stock_physique < 0) { print ''; } + print price2num($objp->stock_physique, 'MS'); + if ($objp->stock_physique < 0) { print ''; } + print ($objp->stock_physique < 0 ? ' '.img_warning() : (($objp->stock_physique > 1 && $objp->tobatch == 2) ? ' '.img_warning($langs->trans('IlligalQtyForSerialNumbers')): '')); } } print '';