diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 3305bdc6e74..6a98976e261 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3511,7 +3511,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'bank_account', 'barcode', 'bank', 'bill', 'billa', 'billr', 'billd', 'bookmark', 'bom', 'building',
'cash-register', 'category', 'chart', 'check', 'clock', 'close_title', 'cog', 'collab', 'company', 'contact', 'country', 'contract', 'cron', 'cubes',
'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'establishment', 'external-link-alt', 'external-link-square-alt',
- 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
+ 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'autofill', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
'help', 'holiday',
'info', 'intervention', 'inventory', 'intracommreport',
'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'long-arrow-alt-right',
@@ -3558,7 +3558,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
}
$arrayconvpictotofa = array(
- 'account'=>'university', 'accountline'=>'receipt', 'accountancy'=>'search-dollar', 'action'=>'calendar-alt', 'add'=>'plus-circle', 'address'=> 'address-book', 'asset'=>'money-check-alt',
+ 'account'=>'university', 'accountline'=>'receipt', 'accountancy'=>'search-dollar', 'action'=>'calendar-alt', 'add'=>'plus-circle', 'address'=> 'address-book', 'asset'=>'money-check-alt', 'autofill'=>'fill',
'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'billr'=>'file-invoice-dollar', 'supplier_invoicea'=>'file-excel', 'billd'=>'file-medical', 'supplier_invoiced'=>'file-medical',
'bom'=>'shapes',
'chart'=>'chart-line', 'company'=>'building', 'contact'=>'address-book', 'contract'=>'suitcase', 'collab'=>'people-arrows', 'conversation'=>'comments', 'country'=>'globe-americas', 'cron'=>'business-time',
diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php
index c543ef40880..675372273f0 100644
--- a/htdocs/expedition/card.php
+++ b/htdocs/expedition/card.php
@@ -130,6 +130,7 @@ $date_delivery = dol_mktime(GETPOST('date_deliveryhour', 'int'), GETPOST('date_d
if ($user->socid) {
$socid = $user->socid;
}
+
$result = restrictedArea($user, 'expedition', $object->id, '');
@@ -1035,7 +1036,7 @@ if ($action == 'create') {
print '
'.$langs->trans("QtyShipped").' | ';
print ''.$langs->trans("QtyToShip");
if (empty($conf->productbatch->enabled)) {
- print ' '.$langs->trans("Fill").'';
+ print ' '.img_picto($langs->trans("Autofill"), 'autofill', 'class="paddingrightonly"').$langs->trans("Fill").'';
print ' / ';
} else {
print ' ';
diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php
index 809b4803ff5..cba2e14cf74 100644
--- a/htdocs/expedition/shipment.php
+++ b/htdocs/expedition/shipment.php
@@ -65,6 +65,7 @@ if (!empty($user->socid)) {
$result = restrictedArea($user, 'commande', $id);
$object = new Commande($db);
+$shipment = new Expedition($db);
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels
@@ -77,7 +78,8 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be includ
if ($user->socid) {
$socid = $user->socid;
}
-$result = restrictedArea($user, 'expedition', $object->id, '');
+
+$result = restrictedArea($user, 'expedition', 0, ''); // We use 0 for id, because there is no particular shipment on this tab, only id of order is known
@@ -94,13 +96,11 @@ if ($reshook < 0) {
if (empty($reshook)) {
// Categorisation dans projet
if ($action == 'classin') {
- $object = new Commande($db);
$object->fetch($id);
$object->setProject(GETPOST('projectid', 'int'));
}
if ($action == 'confirm_cloture' && GETPOST('confirm', 'alpha') == 'yes') {
- $object = new Commande($db);
$object->fetch($id);
$result = $object->cloture($user);
} elseif ($action == 'setref_client' && $user->rights->commande->creer) {
@@ -132,7 +132,6 @@ if (empty($reshook)) {
}
*/
if ($action == 'setmode' && $user->rights->commande->creer) {
- $object = new Commande($db);
$object->fetch($id);
$result = $object->setPaymentMethods(GETPOST('mode_reglement_id', 'int'));
if ($result < 0) {
@@ -141,7 +140,6 @@ if (empty($reshook)) {
}
if ($action == 'setavailability' && $user->rights->commande->creer) {
- $object = new Commande($db);
$object->fetch($id);
$result = $object->availability(GETPOST('availability_id'));
if ($result < 0) {
@@ -150,7 +148,6 @@ if (empty($reshook)) {
}
if ($action == 'setdemandreason' && $user->rights->commande->creer) {
- $object = new Commande($db);
$object->fetch($id);
$result = $object->demand_reason(GETPOST('demand_reason_id'));
if ($result < 0) {
@@ -159,7 +156,6 @@ if (empty($reshook)) {
}
if ($action == 'setconditions' && $user->rights->commande->creer) {
- $object = new Commande($db);
$object->fetch($id);
$result = $object->setPaymentTerms(GETPOST('cond_reglement_id', 'int'));
if ($result < 0) {
@@ -175,7 +171,6 @@ if (empty($reshook)) {
// shipping method
if ($action == 'setshippingmethod' && $user->rights->commande->creer) {
- $object = new Commande($db);
$object->fetch($id);
$result = $object->setShippingMethod(GETPOST('shipping_method_id', 'int'));
if ($result < 0) {
@@ -185,7 +180,6 @@ if (empty($reshook)) {
// warehouse
if ($action == 'setwarehouse' && $user->rights->commande->creer) {
- $object = new Commande($db);
$object->fetch($id);
$result = $object->setWarehouse(GETPOST('warehouse_id', 'int'));
if ($result < 0) {
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index b3f01b00cf7..eb238941eae 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 expected quantity with real quantity
\ No newline at end of file
+AutofillWithExpected=Fill real quantity with expected quantity
\ No newline at end of file
diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php
index cb3231389b4..bc927a06c50 100644
--- a/htdocs/product/inventory/inventory.php
+++ b/htdocs/product/inventory/inventory.php
@@ -448,23 +448,25 @@ if ($object->id > 0) {
print ''.$langs->trans('UpdateByScaningLot').'';
}*/
if (!empty($conf->barcode->enabled) || !empty($conf->productbatch->enabled)) {
- print 'id.'&action=updatebyscaning" class="">'.$langs->trans("UpdateByScaning").'';
+ print 'id.'&action=updatebyscaning" class="">'.img_picto('', 'barcode', 'class="paddingrightonly"').$langs->trans("UpdateByScaning").'';
}
} else {
- print ''.$langs->trans("Save").''."\n";
+ print ''.$langs->trans("Save").''."\n";
}
if ($permissiontoadd && $conf->use_javascript_ajax) {
- print ' ';
- print '';
+ print ''.img_picto('', 'autofill', 'class="paddingrightonly"').$langs->trans('AutofillWithExpected').'';
+
print '';
}
print ' ';
|