fix merge conflicts

This commit is contained in:
2016-01-16 19:11:01 +01:00
11 changed files with 65 additions and 31 deletions

View File

@@ -74,12 +74,14 @@ class AccountStateController extends Controller {
$lastStates = AccountState::readLastForUser ( AccountState::TYPE_CLOSE );
$lastStates = AccountState::modelsToArray ( $lastStates );
// \Yii::$app->session->setFlash('error','ok');
$model = new AccountState ();
$model->type = AccountState::TYPE_OPEN;
$model->id_user = Yii::$app->user->id;
$model->id_account = Account::readDefault ();
$account = Account::readDefaultObject();
if ($model->load ( Yii::$app->request->post () ) && $model->save ()) {
// return $this->redirect(['view', 'id' => $model->id_account_state]);
@@ -98,7 +100,8 @@ class AccountStateController extends Controller {
return $this->render ( 'open', [
'model' => $model,
'accounts' => $accounts,
'lastStates' => $lastStates
'lastStates' => $lastStates,
'account' => $account
] );
}
}
@@ -115,6 +118,7 @@ class AccountStateController extends Controller {
$model->type = AccountState::TYPE_CLOSE;
$model->id_user = Yii::$app->user->id;
$model->id_account = Account::readDefault ();
$account = Account::readDefaultObject();
$lastCassaState = AccountState::readLast(null,null, Account::readDefault());
@@ -143,6 +147,7 @@ class AccountStateController extends Controller {
return $this->render ( 'close', [
'model' => $model,
'accounts' => $accounts,
'account' => $account,
'lastStates' => $lastStates ,
'lastCassaState' => $lastCassaState,
] );