Display delta quantity in inventories.
This commit is contained in:
parent
fc850609e8
commit
02ad8b8858
@ -564,6 +564,11 @@ if ($object->id > 0) {
|
||||
print '<td class="center">';
|
||||
print $form->textwithpicto($langs->trans("RealQty"), $langs->trans("InventoryRealQtyHelp"));
|
||||
print '</td>';
|
||||
|
||||
print '<td class="right">';
|
||||
print $form->textwithpicto($langs->trans("Delta"), $langs->trans("InventoryRealQtyHelp"));
|
||||
print '</td>';
|
||||
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
// Actions
|
||||
print '<td class="center">';
|
||||
@ -590,6 +595,7 @@ if ($object->id > 0) {
|
||||
print '<input type="text" name="qtytoadd" class="maxwidth75" value="">';
|
||||
print '</td>';
|
||||
// Actions
|
||||
print '<td></td>';
|
||||
print '<td class="center">';
|
||||
print '<input type="submit" class="button paddingright" name="addline" value="'.$langs->trans("Add").'">';
|
||||
print '</td>';
|
||||
@ -657,13 +663,20 @@ if ($object->id > 0) {
|
||||
print $obj->qty_stock;
|
||||
print '</td>';
|
||||
|
||||
// Real quantity
|
||||
// Delta quantity
|
||||
print '<td class="center">';
|
||||
if ($object->status == $object::STATUS_VALIDATED) {
|
||||
$qty_view = GETPOST("id_".$obj->rowid) && price2num(GETPOST("id_".$obj->rowid), 'MS') >= 0 ? GETPOST("id_".$obj->rowid) : $obj->qty_view;
|
||||
$totalfound += price2num($qty_view, 'MS');
|
||||
print '<input type="text" class="maxwidth75 right realqty" name="id_'.$obj->rowid.'" id="id_'.$obj->rowid.'_input" value="'.$qty_view.'">';
|
||||
print '</td>';
|
||||
|
||||
// Delta quantity
|
||||
$dt = $obj->qty_view - $obj->qty_stock;
|
||||
print '<td class="maxwidth75 right deltaqty" id="id_'.$obj->rowid.'">';
|
||||
if($dt != 0) print $dt;
|
||||
print '</td>';
|
||||
|
||||
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 '</td>';
|
||||
@ -671,7 +684,16 @@ if ($object->id > 0) {
|
||||
print $obj->qty_view;
|
||||
$totalfound += $obj->qty_view;
|
||||
print '</td>';
|
||||
|
||||
// Delta quantity
|
||||
$dt = $obj->qty_view - $obj->qty_stock;
|
||||
print '<td class="right expectedqty" id="id_'.$obj->rowid.'">';
|
||||
if($dt != 0) print $dt;
|
||||
print '</td>';
|
||||
|
||||
}
|
||||
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user