mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
can edit bomline workstation
This commit is contained in:
parent
24d03009e9
commit
f413a7b6d8
|
|
@ -266,7 +266,12 @@ if (empty($reshook)) {
|
|||
$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, $fk_unit, $array_options);
|
||||
$fk_default_workstation = $bomline->fk_default_workstation;
|
||||
if (isModEnabled('workstation') && GETPOSTISSET('idworkstations')) {
|
||||
$fk_default_workstation = GETPOST('idworkstations', 'int');
|
||||
}
|
||||
|
||||
$result = $object->updateLine($lineid, $qty, (int) $qty_frozen, (int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key, $fk_unit, $array_options, $fk_default_workstation);
|
||||
|
||||
if ($result <= 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
|
|
|||
|
|
@ -708,9 +708,10 @@ class BOM extends CommonObject
|
|||
* @param string $import_key Import Key
|
||||
* @param int $fk_unit Unit of line
|
||||
* @param array $array_options extrafields array
|
||||
* @param int $fk_default_workstation Default workstation
|
||||
* @return int <0 if KO, Id of updated BOM-Line if OK
|
||||
*/
|
||||
public function updateLine($rowid, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $import_key = null, $fk_unit = 0, $array_options = 0)
|
||||
public function updateLine($rowid, $qty, $qty_frozen = 0, $disable_stock_change = 0, $efficiency = 1.0, $position = -1, $import_key = null, $fk_unit = 0, $array_options = 0, $fk_default_workstation = null)
|
||||
{
|
||||
global $mysoc, $conf, $langs, $user;
|
||||
|
||||
|
|
@ -789,6 +790,9 @@ class BOM extends CommonObject
|
|||
$line->array_options[$key] = $array_options[$key];
|
||||
}
|
||||
}
|
||||
if ($line->fk_default_workstation != $fk_default_workstation) {
|
||||
$line->fk_default_workstation = $fk_default_workstation;
|
||||
}
|
||||
|
||||
$result = $line->update($user);
|
||||
|
||||
|
|
|
|||
|
|
@ -155,6 +155,7 @@ if ($filtertype != 1) {
|
|||
|
||||
$coldisplay++;
|
||||
print '<td class="nobottom nowrap linecolworkstation right">';
|
||||
print $formproduct->selectWorkstations($line->fk_default_workstation, 'idworkstations', 1);
|
||||
print '</td>';
|
||||
|
||||
$coldisplay++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user