fix small bugs

This commit is contained in:
2016-01-17 08:23:48 +01:00
parent 4f255ad93d
commit abb69ce92d
7 changed files with 9 additions and 7 deletions

View File

@@ -227,7 +227,7 @@ class AccountState extends \common\models\BaseFitnessActiveRecord
$this->prev_money = 0;
if ( $this->type == AccountState::TYPE_CLOSE){
$lastOpen = AccountState::readLast(AccountState::TYPE_OPEN,null, $this->id_account);
$lastOpen = AccountState::readLast(AccountState::TYPE_OPEN,\Yii::$app->user->id, $this->id_account);
if ( $lastOpen != null ){
$start = $lastOpen->created_at;
$this->prev_state = $lastOpen->id_account_state;