add payment method
This commit is contained in:
@@ -5,6 +5,7 @@ use yii\widgets\ActiveForm;
|
||||
use frontend\components\HtmlHelper;
|
||||
use kartik\widgets\DatePicker;
|
||||
use common\models\Account;
|
||||
use common\models\Transfer;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Ticket */
|
||||
@@ -43,7 +44,9 @@ use common\models\Account;
|
||||
|
||||
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
|
||||
|
||||
<?php //echo $form->field($model, 'id_discount')->dropDownList($discountOptions) ?>
|
||||
<?php echo $form->field($model,'payment_method')->dropDownList(Transfer::paymentMethods()) ?>
|
||||
|
||||
<?php echo $form->field($model, 'id_discount')->dropDownList($discountOptions) ?>
|
||||
|
||||
<?= $form->field($model, 'start')->widget(DatePicker::classname(), [
|
||||
'pluginOptions' => [
|
||||
|
||||
@@ -40,6 +40,15 @@ if ( isset($receptionForm->card) ){
|
||||
$options['customer_cart'] = $model->customerCart;
|
||||
}
|
||||
|
||||
$discountItems = [];
|
||||
foreach ($discounts as $d){
|
||||
$item = [];
|
||||
$item['id_discount'] = $d->id_discount;
|
||||
$item['value'] = $d->value;
|
||||
$discountItems[] = $item;
|
||||
}
|
||||
$options['discounts'] = $discountItems;
|
||||
|
||||
$this->registerJs ( 'new TicketSell( '. json_encode($options).');' );
|
||||
?>
|
||||
<div class="ticket-create">
|
||||
|
||||
Reference in New Issue
Block a user