From d823bb73c020d3b587b96b709643fd16061868f3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Jul 2020 01:01:40 +0200 Subject: [PATCH] Change order of fields for mass stock movement --- htdocs/langs/en_US/stocks.lang | 2 +- htdocs/product/stock/massstockmove.php | 41 +++++++++++++------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 9ce03f64942..1c0e6e5df5f 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -143,7 +143,7 @@ Replenishments=Replenishments NbOfProductBeforePeriod=Quantity of product %s in stock before selected period (< %s) NbOfProductAfterPeriod=Quantity of product %s in stock after selected period (> %s) MassMovement=Mass movement -SelectProductInAndOutWareHouse=Select a product, a quantity, a source warehouse and a target warehouse, then click "%s". Once this is done for all required movements, click onto "%s". +SelectProductInAndOutWareHouse=Select a source warehouse and a target warehouse, a product and a quantity then click "%s". Once this is done for all required movements, click onto "%s". RecordMovement=Record transfer ReceivingForSameOrder=Receipts for this order StockMovementRecorded=Stock movements recorded diff --git a/htdocs/product/stock/massstockmove.php b/htdocs/product/stock/massstockmove.php index ab14bbb6e9a..bc7949f5a1b 100644 --- a/htdocs/product/stock/massstockmove.php +++ b/htdocs/product/stock/massstockmove.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2013-2020 Laurent Destaileur * Copyright (C) 2014 Regis Houssin * * This program is free software: you can redistribute it and/or modify @@ -122,7 +122,7 @@ if ($action == 'addline') } // TODO Check qty is ok for stock move. Note qty may not be enough yet, but we make a check now to report a warning. - // What is important is to have qty when doing action 'createmovements' + // What is more important is to have qty when doing action 'createmovements' if (!$error) { // Warning, don't forget lines already added into the $_SESSION['massstockmove'] @@ -139,9 +139,10 @@ if ($action == 'addline') $listofdata[$id] = array('id'=>$id, 'id_product'=>$id_product, 'qty'=>$qty, 'id_sw'=>$id_sw, 'id_tw'=>$id_tw, 'batch'=>$batch); $_SESSION['massstockmove'] = json_encode($listofdata); - unset($id_product); //unset($id_sw); //unset($id_tw); + unset($id_product); + unset($batch); unset($qty); } } @@ -338,18 +339,26 @@ print ''; $param = ''; print ''; +print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); +print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); print getTitleFieldOfList($langs->trans('ProductRef'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); if ($conf->productbatch->enabled) { print getTitleFieldOfList($langs->trans('Batch'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); } -print getTitleFieldOfList($langs->trans('WarehouseSource'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); -print getTitleFieldOfList($langs->trans('WarehouseTarget'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'tagtd maxwidthonsmartphone '); print getTitleFieldOfList($langs->trans('Qty'), 0, $_SERVER["PHP_SELF"], '', $param, '', '', $sortfield, $sortorder, 'center tagtd maxwidthonsmartphone '); print getTitleFieldOfList('', 0); print ''; print ''; +// From warehouse +print ''; +// To warehouse +print ''; // Product print ''; // Batch number if ($conf->productbatch->enabled) @@ -369,14 +378,6 @@ if ($conf->productbatch->enabled) print ''; print ''; } -// In warehouse -print ''; -// Out warehouse -print ''; // Qty print ''; // Button to add line @@ -393,6 +394,12 @@ foreach ($listofdata as $key => $val) print ''; print ''; + print ''; + print ''; if ($conf->productbatch->enabled) @@ -401,12 +408,6 @@ foreach ($listofdata as $key => $val) print $val['batch']; print ''; } - print ''; - print ''; print ''; print '';
'; +print $formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); +print ''; +print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); +print ''; $filtertype = 0; @@ -360,7 +369,7 @@ if ($conf->global->PRODUIT_LIMIT_SIZE <= 0) { $limit = $conf->global->PRODUIT_LIMIT_SIZE; } -$form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 0, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1); +$form->select_produits($id_product, 'productid', $filtertype, $limit, 0, -1, 2, '', 1, array(), 0, '1', 0, 'minwidth200imp maxwidth300', 1); print ''; -print $formproduct->selectWarehouses($id_sw, 'id_sw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); -print ''; -print $formproduct->selectWarehouses($id_tw, 'id_tw', 'warehouseopen,warehouseinternal', 1, 0, 0, '', 0, 0, array(), 'minwidth200imp maxwidth200'); -print '
'; + print $warehousestatics->getNomUrl(1); + print ''; + print $warehousestatict->getNomUrl(1); + print ''; print $productstatic->getNomUrl(1).' - '.$productstatic->label; print ''; - print $warehousestatics->getNomUrl(1); - print ''; - print $warehousestatict->getNomUrl(1); - print ''.$val['qty'].''.img_delete($langs->trans("Remove")).'