add changes to procurement

This commit is contained in:
2015-09-25 17:25:16 +02:00
parent 28caac03dc
commit 5c9db98110
14 changed files with 1478 additions and 87 deletions

View File

@@ -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;
}
}