Merge branch 'develop_NEW_Service_DefaultWorkstation' of github.com:atm-lena/dolibarr into develop_NEW_Service_DefaultWorkstation

This commit is contained in:
atm-lena 2022-08-24 11:56:04 +02:00
commit 44caf380cf

View File

@ -147,7 +147,7 @@ if (empty($reshook)) {
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
// Add line // Add line
if ($action == 'addline' && $user->rights->bom->write) { if ($action == 'addline' && $user->rights->bom->write) {
$langs->load('errors'); $langs->load('errors');
$error = 0; $error = 0;
@ -183,7 +183,7 @@ if (empty($reshook)) {
} }
if (!$error) { if (!$error) {
$result = $object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id, null, $fk_unit); $result = $object->addLine($idprod, $qty, $qty_frozen, $disable_stock_change, $efficiency, -1, $bom_child_id, null);
if ($result <= 0) { if ($result <= 0) {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
@ -200,10 +200,10 @@ if (empty($reshook)) {
$object->calculateCosts(); $object->calculateCosts();
} }
} }
} }
// Update line // Update line
if ($action == 'updateline' && $user->rights->bom->write) { if ($action == 'updateline' && $user->rights->bom->write) {
$langs->load('errors'); $langs->load('errors');
$error = 0; $error = 0;
@ -223,7 +223,7 @@ if (empty($reshook)) {
$bomline = new BOMLine($db); $bomline = new BOMLine($db);
$bomline->fetch($lineid); $bomline->fetch($lineid);
$result = $object->updateLine($lineid, $qty, (int) $qty_frozen, (int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key, $fk_unit); $result = $object->updateLine($lineid, $qty, (int) $qty_frozen, (int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key);
if ($result <= 0) { if ($result <= 0) {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
@ -234,7 +234,6 @@ if (empty($reshook)) {
unset($_POST['qty']); unset($_POST['qty']);
unset($_POST['qty_frozen']); unset($_POST['qty_frozen']);
unset($_POST['disable_stock_change']); unset($_POST['disable_stock_change']);
}
$object->fetchLines(); $object->fetchLines();