Add line mo : fk_default_workstation
This commit is contained in:
parent
2582866fbe
commit
ff33e3c367
1 changed files with 6 additions and 0 deletions
|
|
@ -169,6 +169,12 @@ if (empty($reshook)) {
|
|||
$moline->origin_type = 'free'; // free consume line
|
||||
$moline->position = 0;
|
||||
|
||||
if(!empty($moline->fk_product)){
|
||||
$product = new Product($db);
|
||||
$product->fetch($moline->fk_product);
|
||||
if($product->type == Product::TYPE_SERVICE) $moline->fk_default_workstation = $product->fk_default_workstation;
|
||||
}
|
||||
|
||||
$resultline = $moline->create($user, false); // Never use triggers here
|
||||
if ($resultline <= 0) {
|
||||
$error++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue