From 41db9abff8a8155fe465b81c1800814281205703 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 7 Apr 2021 12:46:28 +0200 Subject: [PATCH 1/3] Close #17145 : add link to autofill with expected qty --- htdocs/langs/en_US/stocks.lang | 3 ++- htdocs/product/inventory/inventory.php | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 59f510a6bf2..4d1713266f6 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -253,4 +253,5 @@ LabelOfInventoryMovemement=Inventory %s ReOpen=Reopen ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. ObjectNotFound=%s not found -MakeMovementsAndClose=Generate movements and close \ No newline at end of file +MakeMovementsAndClose=Generate movements and close +AutofillWithExpected=Auto-fill with real quantity expected quantity \ No newline at end of file diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 8d3378fb779..764c1bd78c9 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -466,6 +466,20 @@ if ($object->id > 0) { } else { print ''.$langs->trans("Save").''."\n"; } + if ($permissiontoadd && $conf->use_javascript_ajax) { + print ' '; + print ''; + print ''.$langs->trans('AutofillWithExpected').''; + } print '
'; print '
'; print ''; @@ -603,13 +617,13 @@ if ($object->id > 0) { print ''; } - print ''; + print ''; print $obj->qty_stock; print ''; print ''; if ($object->status == $object::STATUS_VALIDATED) { $qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view; - print ''; + print ''; print ''; print ''; print ''.img_delete().''; From 843882c7c799dbe62216fcce89615a1f93b73fae Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 7 Apr 2021 12:46:51 +0200 Subject: [PATCH 2/3] update stock.lang --- htdocs/langs/en_US/stocks.lang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang index 4d1713266f6..b3f01b00cf7 100644 --- a/htdocs/langs/en_US/stocks.lang +++ b/htdocs/langs/en_US/stocks.lang @@ -254,4 +254,4 @@ ReOpen=Reopen ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock. ObjectNotFound=%s not found MakeMovementsAndClose=Generate movements and close -AutofillWithExpected=Auto-fill with real quantity expected quantity \ No newline at end of file +AutofillWithExpected=Auto-fill expected quantity with real quantity \ No newline at end of file From 482b4e808b68f89ebc7755db464f18c6694ef114 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Thu, 8 Apr 2021 16:21:50 +0200 Subject: [PATCH 3/3] chnages with eldy's advices --- htdocs/product/inventory/inventory.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php index 764c1bd78c9..0bdd203caf0 100644 --- a/htdocs/product/inventory/inventory.php +++ b/htdocs/product/inventory/inventory.php @@ -468,17 +468,17 @@ if ($object->id > 0) { } if ($permissiontoadd && $conf->use_javascript_ajax) { print ' '; + print ''; print ''; - print ''.$langs->trans('AutofillWithExpected').''; } print '
'; print '
'; @@ -623,7 +623,7 @@ if ($object->id > 0) { print ''; if ($object->status == $object::STATUS_VALIDATED) { $qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view; - print ''; + print ''; print ''; print ''; print ''.img_delete().'';