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

@@ -209,4 +209,21 @@ class User extends ActiveRecord implements IdentityInterface
];
}
/**
* $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 = User::find()->andWhere(['status' => User::STATUS_ACTIVE])->all();
}else{
$warehouses = User::find()->andWhere( ['or', ['status' => User::STATUS_ACTIVE], ['id' => $forceIncludeObjectWithId ] ])->all();
}
return $warehouses;
}
}