add transfer unstorno
This commit is contained in:
@@ -57,6 +57,9 @@ use kartik\widgets\DateTimePicker;
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'payment_method')->dropDownList( ['' => "Mind"] + Transfer::paymentMethods() ) ?>
|
||||
</div>
|
||||
<div class='col-md-3'>
|
||||
<?= $form->field($model, 'customer_name')->label("Vendég") ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
|
||||
@@ -1,56 +1,61 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
use common\components\RoleDefinition;
|
||||
use common\models\Ticket;
|
||||
use common\models\Transfer;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Transfer */
|
||||
|
||||
$this->title = $model->id_transfer;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/transfer', 'Transfers'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
$this->params ['breadcrumbs'] [] = [
|
||||
'label' => Yii::t ( 'frontend/transfer', 'Transfers' ),
|
||||
'url' => [
|
||||
'index'
|
||||
]
|
||||
];
|
||||
$this->params ['breadcrumbs'] [] = $this->title;
|
||||
?>
|
||||
<div class="transfer-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
[
|
||||
'attribute' => 'id_transfer',
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_account',
|
||||
'value' => $model->accountName
|
||||
],
|
||||
[
|
||||
'attribute' => 'type',
|
||||
'value' => $model->transferTypeName,
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_object',
|
||||
'value' => $model->objectName,
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_user',
|
||||
'value' => $model->userName,
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_discount',
|
||||
'value' => $model->discountName,
|
||||
],
|
||||
[
|
||||
'attribute' => 'payment_method',
|
||||
'value' => $model->paymentMethodName,
|
||||
],
|
||||
'item_price',
|
||||
'count',
|
||||
'money',
|
||||
'comment',
|
||||
'created_at',
|
||||
'paid_at',
|
||||
],
|
||||
]) ?>
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<?=DetailView::widget (
|
||||
[ 'model' => $model,
|
||||
'attributes' => [
|
||||
[ 'attribute' => 'id_transfer' ],
|
||||
[ 'attribute' => 'id_account','value' => $model->accountName ],
|
||||
[ 'attribute' => 'type','value' => $model->transferTypeName ],
|
||||
[ 'attribute' => 'id_object','value' => $model->objectName ],
|
||||
[ 'attribute' => 'id_user','value' => $model->userName ],
|
||||
[ 'attribute' => 'id_discount','value' => $model->discountName ],
|
||||
[ 'attribute' => 'payment_method','value' => $model->paymentMethodName ],
|
||||
[ 'attribute' => 'status','value' => $model->statusName ],
|
||||
'item_price',
|
||||
'count',
|
||||
'money',
|
||||
'comment',
|
||||
'created_at',
|
||||
'paid_at' ] ] )?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
if (RoleDefinition::isAdmin ()) {
|
||||
if ($model->status == Transfer::STATUS_STORNO) {
|
||||
echo Html::a ( "Bérlet fizetetlennek jelölése és vásárló kosarába helyezése", [
|
||||
'transfer/unstorno',
|
||||
'id' => $model->id_transfer
|
||||
], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data-confirm' => "Figyelem, a bérlet fizetetlennek lesz jelölve !!",
|
||||
'data-method' => 'post'
|
||||
] );
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user