Show inventory in table toConsume

Add a column with the reel inventory to the production screen of manufacturing orders.
This gives the user an indication if production is possible.
This commit is contained in:
mschamp 2021-09-18 12:51:32 +02:00 committed by GitHub
parent 35f3742d08
commit 018dbca5c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -721,6 +721,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $langs->trans("Warehouse");
}
print '</td>';
// Available
print '<td>';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Available");
}
print '</td>';
// Lot - serial
if ($conf->productbatch->enabled) {
print '<td>';
@ -864,6 +870,12 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '</td>';
print '<td>'; // Warehouse
print '</td>';
print '<td>';
if ($tmpproduct->stock_reel < ($line->qty-$alreadyconsumed)) {
print img_warning($langs->trans('StockTooLow')).' ';
}
print $tmpproduct->stock_reel; // Available
print '</td>';
if ($conf->productbatch->enabled) {
print '<td></td>'; // Lot
}