From ea69506e5335f2152d0e9078395fb827defefb0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 24 Jan 2026 13:54:57 +0100 Subject: [PATCH] Fix code action --- htdocs/product/stock/movement_list.php | 20 +++++++++---------- htdocs/product/stock/product.php | 10 +++++----- .../product/stock/tpl/stocktransfer.tpl.php | 4 ++-- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index d8313ca1a3c..08c0da989ce 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -461,22 +461,22 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { if (!(GETPOSTINT("id_entrepot_destination") > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } if (empty($product_id)) { $error++; setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors'); - $action = 'transfert'; + $action = 'transfer'; } if (!GETPOSTFLOAT("nbpiece")) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } if ($id == GETPOSTINT("id_entrepot_destination")) { setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } if (isModEnabled('productbatch')) { @@ -486,7 +486,7 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { if ($product->hasbatch() && !GETPOST("batch_number")) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } } @@ -609,7 +609,7 @@ if ($action == "transfert_stock" && $permissiontoadd && !$cancel) { } else { setEventMessages($product->error, $product->errors, 'errors'); $db->rollback(); - $action = 'transfert'; + $action = 'transfer'; } } } @@ -871,7 +871,7 @@ if ($warehouse->id > 0) { // Project if (isModEnabled('project') && $formproject !== null) { $langs->load("projects"); - $morehtmlref .= '
'.img_picto('', 'project').' '.$langs->trans('Project').' '; + $morehtmlref .= '
'.img_picto('', 'project', 'class="pictofixedwidth"').$langs->trans('Project').' '; if ($usercancreate && 1 == 2) { // @phan-suppress-current-line PhanPluginBothLiteralsBinaryOp if ($action != 'classify') { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; @@ -998,7 +998,7 @@ if ($action == "correction") { } // Transfer of units -if ($action == "transfert") { +if ($action == "transfer") { $d_eatby = GETPOSTDATE('eatby'); // used by the tpl $d_sellby = GETPOSTDATE('sellby'); // used by the tpl include DOL_DOCUMENT_ROOT.'/product/stock/tpl/stocktransfer.tpl.php'; @@ -1015,7 +1015,7 @@ if ((empty($action) || $action == 'list') && $id > 0) { // modified by hook if (empty($reshook)) { if ($user->hasRight('stock', 'mouvement', 'creer')) { - print ''.$langs->trans("TransferStock").''; + print ''.$langs->trans("TransferStock").''; } if ($user->hasRight('stock', 'mouvement', 'creer')) { @@ -1531,9 +1531,7 @@ while ($i < $imaxinloop) { // Id movement if (!empty($arrayfields['m.rowid']['checked'])) { print ''; - //print img_picto($langs->trans("StockMovement"), 'movement', 'class="pictofixedwidth"'); print $object->getNomUrl(1); - ; print ''; // This is primary not movement id } // Date diff --git a/htdocs/product/stock/product.php b/htdocs/product/stock/product.php index 6d044292f22..1bb392bc33a 100644 --- a/htdocs/product/stock/product.php +++ b/htdocs/product/stock/product.php @@ -370,17 +370,17 @@ if ($action == "transfert_stock" && !$cancel && $usercanupdatestock) { if (!(GETPOSTINT("id_entrepot") > 0) || !(GETPOSTINT("id_entrepot_destination") > 0)) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } if (!GETPOST("nbpiece")) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("NumberOfUnit")), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } if (GETPOSTINT("id_entrepot") == GETPOSTINT("id_entrepot_destination")) { setEventMessages($langs->trans("ErrorSrcAndTargetWarehouseMustDiffers"), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } if (isModEnabled('productbatch')) { $object = new Product($db); @@ -389,7 +389,7 @@ if ($action == "transfert_stock" && !$cancel && $usercanupdatestock) { if ($object->hasbatch() && !$batchnumber) { setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("batch_number")), null, 'errors'); $error++; - $action = 'transfert'; + $action = 'transfer'; } } $batch = ''; @@ -524,7 +524,7 @@ if ($action == "transfert_stock" && !$cancel && $usercanupdatestock) { } else { setEventMessages($object->error, $object->errors, 'errors'); $db->rollback(); - $action = 'transfert'; + $action = 'transfer'; } } } diff --git a/htdocs/product/stock/tpl/stocktransfer.tpl.php b/htdocs/product/stock/tpl/stocktransfer.tpl.php index f95e6099608..0bca5126eb7 100644 --- a/htdocs/product/stock/tpl/stocktransfer.tpl.php +++ b/htdocs/product/stock/tpl/stocktransfer.tpl.php @@ -92,7 +92,7 @@ if ($object->element == 'product') { /** @var Product $object */ print ''.$langs->trans("WarehouseSource").''; print ''; - print img_picto('', 'stock'); + print img_picto('', 'stock', 'class="pictofixedwidth"'); $selected = (GETPOST("dwid") ? GETPOSTINT("dwid") : (GETPOST('id_entrepot') ? GETPOSTINT('id_entrepot') : ($object->element == 'product' && $object->fk_default_warehouse ? $object->fk_default_warehouse : 'ifone'))); $warehousestatus = 'warehouseopen,warehouseinternal'; print $formproduct->selectWarehouses($selected, 'id_entrepot', $warehousestatus, 1, 0, 0, '', 0, 0, array(), 'minwidth75 maxwidth300 widthcentpercentminusx'); @@ -102,7 +102,7 @@ if ($object->element == 'stockmouvement') { /** @var MouvementStock $object */ print ''.$langs->trans("Product").''; print ''; - print img_picto('', 'product'); + print img_picto('', 'product', 'class="pictofixedwidth"'); $form->select_produits(GETPOSTINT('product_id'), 'product_id', (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') ? '0' : ''), 0, 0, -1, 2, '', 0, array(), 0, 1, 0, 'maxwidth500'); print ''; }