Merge pull request #1 from Humml87/develop_Clean_dopple_Code
Develop clean dopple code
This commit is contained in:
commit
351b4ee236
@ -181,24 +181,10 @@ if (empty($reshook)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$bomline = new BOMLine($db);
|
$result = $object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id, null);
|
||||||
$bomline->fk_bom = $id;
|
|
||||||
$bomline->fk_product = $idprod;
|
|
||||||
$bomline->fk_bom_child = $bom_child_id;
|
|
||||||
$bomline->qty = $qty;
|
|
||||||
$bomline->qty_frozen = (int) $qty_frozen;
|
|
||||||
$bomline->disable_stock_change = (int) $disable_stock_change;
|
|
||||||
$bomline->efficiency = $efficiency;
|
|
||||||
|
|
||||||
// Rang to use
|
|
||||||
$rangmax = $object->line_max(0);
|
|
||||||
$ranktouse = $rangmax + 1;
|
|
||||||
|
|
||||||
$bomline->position = ($ranktouse + 1);
|
|
||||||
|
|
||||||
$result = $bomline->create($user);
|
|
||||||
if ($result <= 0) {
|
if ($result <= 0) {
|
||||||
setEventMessages($bomline->error, $bomline->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$action = '';
|
$action = '';
|
||||||
} else {
|
} else {
|
||||||
unset($_POST['idprod']);
|
unset($_POST['idprod']);
|
||||||
@ -207,8 +193,6 @@ if (empty($reshook)) {
|
|||||||
unset($_POST['disable_stock_change']);
|
unset($_POST['disable_stock_change']);
|
||||||
|
|
||||||
$object->fetchLines();
|
$object->fetchLines();
|
||||||
|
|
||||||
$object->calculateCosts();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user