FIX accolade et gestion fk_unit
This commit is contained in:
parent
44caf380cf
commit
ab2b445b53
1 changed files with 11 additions and 8 deletions
|
|
@ -183,7 +183,7 @@ if ($action == 'addline' && $user->rights->bom->write) {
|
|||
}
|
||||
|
||||
if (!$error) {
|
||||
$result = $object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id, null);
|
||||
$result = $object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id, null, $fk_unit);
|
||||
|
||||
if ($result <= 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
|
@ -195,10 +195,11 @@ if ($action == 'addline' && $user->rights->bom->write) {
|
|||
unset($_POST['qty_frozen']);
|
||||
unset($_POST['disable_stock_change']);
|
||||
|
||||
$object->fetchLines();
|
||||
|
||||
$object->calculateCosts();
|
||||
}
|
||||
|
||||
$object->fetchLines();
|
||||
|
||||
$object->calculateCosts();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -223,7 +224,7 @@ if ($action == 'updateline' && $user->rights->bom->write) {
|
|||
$bomline = new BOMLine($db);
|
||||
$bomline->fetch($lineid);
|
||||
|
||||
$result = $object->updateLine($lineid, $qty, (int) $qty_frozen, (int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key);
|
||||
$result = $object->updateLine($lineid, $qty, (int) $qty_frozen, (int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key, $fk_unit);
|
||||
|
||||
if ($result <= 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
|
@ -235,10 +236,11 @@ if ($action == 'updateline' && $user->rights->bom->write) {
|
|||
unset($_POST['qty_frozen']);
|
||||
unset($_POST['disable_stock_change']);
|
||||
|
||||
$object->fetchLines();
|
||||
|
||||
$object->calculateCosts();
|
||||
}
|
||||
|
||||
$object->fetchLines();
|
||||
|
||||
$object->calculateCosts();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -619,6 +621,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
|
|||
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
if (empty($reshook))
|
||||
$object->formAddObjectLine(1, $mysoc, null, '/bom/tpl');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue