add hidden account support add delete/payout buttons to carts add backend product sales with pdf export add frontend product sales with pdf export add frontend ticket sales with pdf export
88 lines
2.6 KiB
PHP
88 lines
2.6 KiB
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\widgets\ActiveForm;
|
|
use frontend\components\HtmlHelper;
|
|
use kartik\widgets\DatePicker;
|
|
use common\models\Account;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model common\models\Ticket */
|
|
/* @var $accounts common\models\Account[] */
|
|
/* @var $ticketTypes common\models\TicketType[] */
|
|
/* @var $discounts common\models\Discount[] */
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
?>
|
|
|
|
<?php
|
|
|
|
$accountOptions = [];
|
|
$discountOptions= [];
|
|
$ticketTypeOptions= [];
|
|
|
|
$accountOptions = HtmlHelper::mkAccountOptions($accounts);
|
|
$discountOptions = ['' => ''] + HtmlHelper::mkDiscountOptions($discounts, [ 'emptyOption' => true] );
|
|
$ticketTypeOptions = HtmlHelper::mkTicketTypeOptions($ticketTypes);
|
|
|
|
// echo "default kassza: " . Account::readDefault();
|
|
// echo " kassza: " . $model->id_account;
|
|
|
|
?>
|
|
|
|
<div class="row" >
|
|
<div class="col-md-12" >
|
|
<div class="ticket-form">
|
|
|
|
<?php $form = ActiveForm::begin([
|
|
'id' => 'ticket_form',
|
|
]); ?>
|
|
|
|
<?= Html::activeHiddenInput($model, 'cart')?>
|
|
|
|
<?= $form->field($model, 'id_ticket_type')->dropDownList($ticketTypeOptions) ?>
|
|
|
|
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
|
|
|
|
<?php //echo $form->field($model, 'id_discount')->dropDownList($discountOptions) ?>
|
|
|
|
<?= $form->field($model, 'start')->widget(DatePicker::classname(), [
|
|
'pluginOptions' => [
|
|
'autoclose'=>true,
|
|
'format' => 'yyyy.mm.dd'
|
|
]
|
|
]) ?>
|
|
|
|
|
|
<?= $form->field($model, 'end')->widget(DatePicker::classname(), [
|
|
'pluginOptions' => [
|
|
'autoclose'=>true,
|
|
'format' => 'yyyy.mm.dd'
|
|
]
|
|
]) ?>
|
|
|
|
<?= $form->field($model, 'max_usage_count')->input('number') ?>
|
|
|
|
<?= $form->field($model, 'price_brutto')->input('number') ?>
|
|
|
|
<?= $form->field($model, 'comment')->textarea(['maxlength' => true]) ?>
|
|
|
|
<div class="row">
|
|
<div class='col-md-4'>
|
|
<?php echo Html::a(Yii::t("frontend/ticket","Sell"),null,['class' => 'btn btn-danger btn-block', 'id' => 'btn_sell'] );?>
|
|
</div>
|
|
<div class='col-md-4'>
|
|
<?php echo Html::a(Yii::t("frontend/ticket","To cart"),null,['class' => 'btn btn-success btn-block', 'id' => 'btn_add_to_user_cart'] );?>
|
|
</div>
|
|
<div class='col-md-4'>
|
|
<?php
|
|
if ( $receptionForm->isCardWithCustomer() ){
|
|
echo Html::a(Yii::t("frontend/ticket","Write up"),null,['class' => 'btn btn-success btn-block', 'id' => 'btn_add_to_customer_cart'] );
|
|
}
|
|
?>
|
|
</div>
|
|
</div>
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|