add editable account on reception/customer-cart, add towel handling

This commit is contained in:
2016-10-21 20:39:02 +02:00
parent 8585286150
commit 90c598f8c6
26 changed files with 649 additions and 37 deletions

View File

@@ -401,6 +401,11 @@ class TransferController extends Controller
return $this->redirect(['account/select']);
}
$hiddenAccounts = Account::find()
->andWhere(['type' => Account::TYPE_VALUE_HIDDEN])
->andWhere(['status' => Account::STATUS_ACTIVE])->all();
$customer = null;
$card = Card::findOne($id_card);
if ($card != null )
@@ -413,6 +418,7 @@ class TransferController extends Controller
$model = new CustomerCartForm();
$model->customer = $customer;
$model->hiddenAccounts = $hiddenAccounts;
if ($model->load(Yii::$app->request->post()) && $model->payout()) {
return $this->redirect(['customer-cart','id_card' => $model->customer->card->id_card]);
}