diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index 759c313cd3c..d448551c95e 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -167,7 +167,7 @@ if (empty($reshook)) { $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); $efficiency = price2num(GETPOST('efficiency', 'alpha')); - + $duration_unit = GETPOST('duration_unit','alphanohtml'); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); $error++; @@ -191,6 +191,7 @@ if (empty($reshook)) { $bomline->qty_frozen = (int) $qty_frozen; $bomline->disable_stock_change = (int) $disable_stock_change; $bomline->efficiency = $efficiency; + $bomline->duration_unit = $duration_unit; // Rang to use $rangmax = $object->line_max(0); @@ -225,6 +226,7 @@ if (empty($reshook)) { $qty_frozen = price2num(GETPOST('qty_frozen', 'alpha'), 'MS'); $disable_stock_change = GETPOST('disable_stock_change', 'int'); $efficiency = price2num(GETPOST('efficiency', 'alpha')); + $duration_unit = GETPOST('duration_unit','alphanohtml'); if ($qty == '') { setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Qty')), null, 'errors'); @@ -237,6 +239,7 @@ if (empty($reshook)) { $bomline->qty_frozen = (int) $qty_frozen; $bomline->disable_stock_change = (int) $disable_stock_change; $bomline->efficiency = $efficiency; + $bomline->duration_unit = $duration_unit; $result = $bomline->update($user); if ($result <= 0) { @@ -577,7 +580,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // Form to add new line if ($object->status == 0 && $permissiontoadd && $action != 'selectlines') { if ($action != 'editline') { - // Add products/services form + // Add products form $parameters = array(); @@ -601,7 +604,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea $filtertype = 1; - $res = $object->fetchLinesbytype(1); $object->calculateCosts(); @@ -609,7 +611,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print load_fiche_titre($langs->trans('BOMServicesList'), '', 'service'); - print '