implement registration in backend
This commit is contained in:
@@ -66,7 +66,7 @@ class CollectionController extends Controller
|
||||
$accounts = Account::read();
|
||||
$accountMap = Account::toAccaountMap($accounts);
|
||||
|
||||
$totals = Transfer::mkTotals($model->start, $model->end, $model->id_user, null, $model->id_account, $accounts, $accountMap);
|
||||
$totals = Transfer::mkTotals($model->start, $model->end, $model->id_user, null, $model->id_account, $accounts);
|
||||
|
||||
return $this->render('view', [
|
||||
'model' => $model,
|
||||
@@ -106,7 +106,7 @@ class CollectionController extends Controller
|
||||
if ( $model->load(Yii::$app->request->post()) && $model->save() ) {
|
||||
return $this->redirect(['view', 'id' => $model->id_collection]);
|
||||
} else {
|
||||
$model->totals = Transfer::mkTotals($model->timestampStart, $model->timestampEnd, $model->user->id, null, $model->account->id_account, $model->accounts, $model->accountMap);
|
||||
$model->totals = Transfer::mkTotals($model->timestampStart, $model->timestampEnd, $model->user->id, null, $model->account->id_account, $model->accounts );
|
||||
return $this->render('create', [
|
||||
'model' => $model,
|
||||
]);
|
||||
|
||||
@@ -122,6 +122,7 @@ class TicketController extends FrontendController
|
||||
$model->usage_count = 0;
|
||||
$model->id_card = $receptionForm->card->id_card;
|
||||
$model->id_account = Account::readDefault();
|
||||
|
||||
|
||||
if ($model->load(Yii::$app->request->post()) && $model->save()) {
|
||||
Yii::$app->session->setFlash('success', Yii::t('frontend/ticket', 'Ticket added to customer') );
|
||||
@@ -139,7 +140,12 @@ class TicketController extends FrontendController
|
||||
'receptionForm' => $receptionForm,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return string|\yii\web\Response
|
||||
* @throws NotFoundHttpException
|
||||
*/
|
||||
public function actionUpdate($id){
|
||||
|
||||
/** @var \frontend\models\TicketUpdate $model */
|
||||
@@ -156,12 +162,14 @@ class TicketController extends FrontendController
|
||||
return $this->render('update',['model' => $model]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deletes an existing Transfer model.
|
||||
* If deletion is successful, the browser will be redirected to the 'index' page.
|
||||
* @param integer $id
|
||||
* @return mixed
|
||||
* @throws NotFoundHttpException
|
||||
* @throws \yii\db\Exception
|
||||
*/
|
||||
public function actionDelete($id)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user