add changes to procurement
This commit is contained in:
@@ -110,4 +110,19 @@ class Product extends \common\models\BaseFitnessActiveRecord {
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* $param int $forceIncludeAccount id warehouse, that should be included in list, even if it is inactive
|
||||
* */
|
||||
public static function read($forceIncludeObjectWithId = null){
|
||||
$warehouses = null;
|
||||
|
||||
if ( $forceIncludeObjectWithId == null){
|
||||
$warehouses = Product::find()->andWhere(['status' => Product::STATUS_ACTIVE])->all();
|
||||
}else{
|
||||
$warehouses = Product::find()->andWhere( ['or', ['status' => Product::STATUS_ACTIVE], ['id_product' => $forceIncludeObjectWithId ] ])->all();
|
||||
}
|
||||
|
||||
return $warehouses;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user