Merge branch 'NEW_MoBom_AddLine_DefaultWorkstation' of github.com:atm-lena/dolibarr into NEW_MoBom_AddLine_DefaultWorkstation
This commit is contained in:
commit
c0da9cb50e
@ -174,7 +174,7 @@ if (empty($reshook)) {
|
||||
if(!empty($idprod) && $conf->workstation->enabled){
|
||||
$product = new Product($db);
|
||||
$res = $product->fetch($idprod);
|
||||
if($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation;
|
||||
if ($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation;
|
||||
}
|
||||
|
||||
if ($qty == '') {
|
||||
|
||||
@ -741,7 +741,7 @@ class Mo extends CommonObject
|
||||
$moline->position = $line->position;
|
||||
$moline->qty_frozen = $line->qty_frozen;
|
||||
$moline->disable_stock_change = $line->disable_stock_change;
|
||||
if(!empty($line->fk_default_workstation)) $moline->fk_default_workstation = $line->fk_default_workstation;
|
||||
if (!empty($line->fk_default_workstation)) $moline->fk_default_workstation = $line->fk_default_workstation;
|
||||
|
||||
$resultline = $moline->create($user, false); // Never use triggers here
|
||||
if ($resultline <= 0) {
|
||||
@ -1721,7 +1721,7 @@ class MoLine extends CommonObjectLine
|
||||
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>-1, 'notnull'=>1, 'position'=>170),
|
||||
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>-1, 'position'=>175),
|
||||
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-1, 'position'=>180),
|
||||
'fk_default_workstation' =>array('type'=>'integer', 'label'=>'DefaultWorkstation', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'position'=>185)
|
||||
'fk_default_workstation' =>array('type'=>'integer', 'label'=>'DefaultWorkstation', 'enabled'=>1, 'visible'=>1, 'notnull'=>0, 'position'=>185)
|
||||
);
|
||||
|
||||
public $rowid;
|
||||
|
||||
@ -169,10 +169,10 @@ if (empty($reshook)) {
|
||||
$moline->origin_type = 'free'; // free consume line
|
||||
$moline->position = 0;
|
||||
|
||||
if(!empty($moline->fk_product)){
|
||||
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;
|
||||
if ($product->type == Product::TYPE_SERVICE) $moline->fk_default_workstation = $product->fk_default_workstation;
|
||||
}
|
||||
|
||||
$resultline = $moline->create($user, false); // Never use triggers here
|
||||
|
||||
Loading…
Reference in New Issue
Block a user