From b85652e964e1ec4cb2049553512f1ea3724f4b56 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 18 Apr 2023 21:23:32 +0200 Subject: [PATCH] Code comment --- htdocs/product/stock/card.php | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index bc69da4ffc4..936f05c9868 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -688,6 +688,8 @@ if ($action == 'create') { $i = 0; $sameunits = true; + // TODO Create $arrayfields with all fields to show + while ($i < $num) { $objp = $db->fetch_object($resql); @@ -734,6 +736,7 @@ if ($action == 'create') { $productstatic->accountancy_code_buy_intra = $objp->accountancy_code_buy_intra; $productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export; + // Ref print ""; print $productstatic->getNomUrl(1, 'stock', 16); print ''; @@ -741,6 +744,7 @@ if ($action == 'create') { // Label print ''.dol_escape_htmltag($objp->produit).''; + // Value print ''; $valtoshow = price(price2num($objp->value, 'MS'), 0, '', 0, 0); // TODO replace with a qty() function print empty($valtoshow) ? '0' : $valtoshow; @@ -756,6 +760,7 @@ if ($action == 'create') { print $langs->trans($productstatic->getLabelOfUnit()); print ''; } + // Price buy PMP print ''.price(price2num($objp->ppmp, 'MU')).''; @@ -776,6 +781,7 @@ if ($action == 'create') { } $totalvaluesell += price2num($pricemin * $objp->value, 'MT'); + // Link to transfer if ($user->rights->stock->mouvement->creer) { print ''; print img_picto($langs->trans("TransferStock"), 'add', 'class="hideonsmartphone pictofixedwidth" style="color: #a69944"'); @@ -783,6 +789,7 @@ if ($action == 'create') { print ""; } + // Link to stock if ($user->rights->stock->creer) { print ''; print img_picto($langs->trans("CorrectStock"), 'add', 'class="hideonsmartphone pictofixedwidth" style="color: #a69944"'); @@ -790,6 +797,11 @@ if ($action == 'create') { print ""; } + print ""; + + $i++; + + // Define $unit and $sameunits if (!empty($conf->global->PRODUCT_USE_UNITS)) { if ($i == 0) { $units = $productstatic->fk_unit; @@ -797,9 +809,6 @@ if ($action == 'create') { $sameunits = false; } } - - print ""; - $i++; } $db->free($resql);