Debug MRP feature

This commit is contained in:
Laurent Destailleur 2021-05-06 21:34:59 +02:00
parent 36d50c940a
commit e791f9b863
3 changed files with 24 additions and 2 deletions

View File

@ -63,6 +63,7 @@ ConsumeAndProduceAll=Consume and Produce All
Manufactured=Manufactured
TheProductXIsAlreadyTheProductToProduce=The product to add is already the product to produce.
ForAQuantityOf=For a quantity to produce of %s
ForAQuantityToConsumeOf=For a quantity to disassemble of %s
ConfirmValidateMo=Are you sure you want to validate this Manufacturing Order?
ConfirmProductionDesc=By clicking on '%s', you will validate the consumption and/or production for the quantities set. This will also update the stock and record stock movements.
ProductionForRef=Production of %s

View File

@ -1280,7 +1280,13 @@ class Mo extends CommonObject
print '<tr class="liste_titre">';
print '<td>'.$langs->trans('Ref').'</td>';
print '<td class="right">'.$langs->trans('Qty').' <span class="opacitymedium">('.$langs->trans("ForAQuantityOf", $this->bom->qty).')</span></td>';
print '<td class="right">'.$langs->trans('Qty');
if ($this->bom->bomtype == 0) {
print ' <span class="opacitymedium">('.$langs->trans("ForAQuantityOf", $this->bom->qty).')</span>';
} else {
print ' <span class="opacitymedium">('.$langs->trans("ForAQuantityToConsumeOf", $this->bom->qty).')</span>';
}
print '</td>';
print '<td class="center">'.$langs->trans('QtyFrozen').'</td>';
print '<td class="center">'.$langs->trans('DisableStockChange').'</td>';
//print '<td class="right">'.$langs->trans('Efficiency').'</td>';

View File

@ -707,16 +707,21 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Product").'</td>';
// Qty
print '<td class="right">'.$langs->trans("Qty").'</td>';
// Cost price
if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) {
print '<td class="right">'.$langs->trans("UnitCost").'</td>';
}
// Qty already consumed
print '<td class="right">'.$langs->trans("QtyAlreadyConsumed").'</td>';
// Warehouse
print '<td>';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Warehouse");
}
print '</td>';
// Lot - serial
if ($conf->productbatch->enabled) {
print '<td>';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
@ -724,6 +729,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
print '</td>';
}
// Action
if ($permissiontodelete) {
print '<td></td>';
}
@ -735,17 +741,26 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print '<td>';
print $form->select_produits('', 'productidtoadd', '', 0, 0, -1, 2, '', 0, array(), 0, '1', 0, 'maxwidth300');
print '</td>';
// Qty
print '<td class="right"><input type="text" name="qtytoadd" value="1" class="width50 right"></td>';
// Cost price
if ($permissiontoupdatecost && !empty($conf->global->MRP_SHOW_COST_FOR_CONSUMPTION)) {
print '<td></td>';
}
print '<td class="right"></td>';
// Qty already consumed
print '<td></td>';
// Warehouse
print '<td>';
print '<input type="submit" class="button buttongen" name="addconsumelinebutton" value="'.$langs->trans("Add").'">';
print '</td>';
// Lot - serial
if ($conf->productbatch->enabled) {
print '<td></td>';
}
// Action
if ($permissiontodelete) {
print '<td></td>';
}
print '</tr>';
}