Close #17145 : add link to autofill with expected qty
This commit is contained in:
parent
fcc6431896
commit
41db9abff8
@ -253,4 +253,5 @@ LabelOfInventoryMovemement=Inventory %s
|
|||||||
ReOpen=Reopen
|
ReOpen=Reopen
|
||||||
ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock.
|
ConfirmFinish=Do you confirm the closing of the inventory ? This will generate all stock movements to update your stock.
|
||||||
ObjectNotFound=%s not found
|
ObjectNotFound=%s not found
|
||||||
MakeMovementsAndClose=Generate movements and close
|
MakeMovementsAndClose=Generate movements and close
|
||||||
|
AutofillWithExpected=Auto-fill with real quantity expected quantity
|
||||||
@ -466,6 +466,20 @@ if ($object->id > 0) {
|
|||||||
} else {
|
} else {
|
||||||
print '<a class="classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Save").'</a>'."\n";
|
print '<a class="classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("NotEnoughPermissions")).'">'.$langs->trans("Save").'</a>'."\n";
|
||||||
}
|
}
|
||||||
|
if ($permissiontoadd && $conf->use_javascript_ajax) {
|
||||||
|
print ' ';
|
||||||
|
print '<script>';
|
||||||
|
print 'function fillWithExpected(){
|
||||||
|
$(".expectedqty").each(function(){
|
||||||
|
var object = $(this)[0]
|
||||||
|
var objecttofill = $("#"+object.id+"_input")[0]
|
||||||
|
objecttofill.value = object.innerText
|
||||||
|
})
|
||||||
|
console.log("Values filled")
|
||||||
|
}';
|
||||||
|
print '</script>';
|
||||||
|
print '<a class="butAction" onclick="fillWithExpected()">'.$langs->trans('AutofillWithExpected').'</a>';
|
||||||
|
}
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '<br>';
|
print '<br>';
|
||||||
print '</center>';
|
print '</center>';
|
||||||
@ -603,13 +617,13 @@ if ($object->id > 0) {
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print '<td class="right">';
|
print '<td class="right expectedqty" id="id_'.$obj->rowid.'">';
|
||||||
print $obj->qty_stock;
|
print $obj->qty_stock;
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
if ($object->status == $object::STATUS_VALIDATED) {
|
if ($object->status == $object::STATUS_VALIDATED) {
|
||||||
$qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view;
|
$qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view;
|
||||||
print '<input type="text" class="maxwidth75 right" name="id_'.$obj->rowid.'" value="'.$qty_view.'">';
|
print '<input type="text" class="maxwidth75 right" id="id_'.$obj->rowid.'_input" value="'.$qty_view.'">';
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td class="right">';
|
print '<td class="right">';
|
||||||
print '<a class="reposition" href="'.DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id.'&lineid='.$obj->rowid.'&action=deleteline&token='.newToken().'">'.img_delete().'</a>';
|
print '<a class="reposition" href="'.DOL_URL_ROOT.'/product/inventory/inventory.php?id='.$object->id.'&lineid='.$obj->rowid.'&action=deleteline&token='.newToken().'">'.img_delete().'</a>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user