add hidden account, cart insert/delete

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
This commit is contained in:
2016-01-03 18:29:39 +01:00
parent 62bcb7ff27
commit 595f663820
43 changed files with 2154 additions and 24 deletions

View File

@@ -100,10 +100,13 @@ $discountOptions = mkOptions( ArrayHelper::map($discounts, 'id_discount', 'name'
</div>
</div>
<div class="row">
<div class='col-md-6'>
<div class='col-md-4'>
<?php echo Html::a(Yii::t("frontend/product","Sell"),null,['class' => 'btn btn-danger btn-block', 'id' => 'btn_sell'] );?>
</div>
<div class='col-md-4'>
<?php echo Html::a(Yii::t("frontend/product","To cart"),null,['class' => 'btn btn-success btn-block', 'id' => 'btn_sell_append'] );?>
</div>
<div class='col-md-6'>
<div class='col-md-4'>
<?php
if ( $receptionForm->isCardWithCustomer() ){
echo Html::a(Yii::t("frontend/product","Write up"),null,['class' => 'btn btn-success btn-block', 'id' => 'btn_add_to_customer_cart'] );

View File

@@ -26,6 +26,9 @@ use kartik\widgets\ActiveForm;
<th>
<?php echo Yii::t('frontend/product', 'Total Price')?>
</th>
<th>
<?php echo "";?>
</th>
</tr>
</thead>
<tbody>

View File

@@ -19,6 +19,8 @@ $options = [];
$options['lookup_product_url'] = Url::toRoute(['product/lookup']);
$options['find_product_url'] = Url::toRoute(['product/find']);
$options['url_pay_user_cart'] = Url::toRoute(['product/payout-user-cart']);
$options['url_delete_transaction'] = Url::toRoute(['transfer/delete']);
$options['url_pay_transaction'] = Url::toRoute(['transfer/payout']);
$options['user_cart'] = $userTransfers;
$options['products'] = $model->products;
if ( isset($model->card) ){

View File

@@ -67,10 +67,13 @@ use common\models\Account;
<?= $form->field($model, 'comment')->textarea(['maxlength' => true]) ?>
<div class="row">
<div class='col-md-6'>
<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-6'>
<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'] );

View File

@@ -31,6 +31,8 @@ $options['types'] = TicketType::modelsToArray($ticketTypes);
$options['user_cart'] = $model->userCart;
$options['customer_cart'] = $model->customerCart;
$options['selected_type'] = count($ticketTypes) > 0 ? $ticketTypes[0]->id_ticket_type : 0;
$options['url_delete_transaction'] = Url::toRoute(['transfer/delete']);
$options['url_pay_transaction'] = Url::toRoute(['transfer/payout']);
$this->registerJs ( 'new TicketSell( '. json_encode($options).');' );
?>

View File

@@ -0,0 +1,29 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model common\models\TransferSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<?= Html::a(
Yii::t('frontend/transfer', 'Export PDF'),
Url::to(['sale-pdf' ,
Html::getInputName($model, "start") => Html::getAttributeValue($model, "start"),
Html::getInputName($model, "end") =>Html::getAttributeValue($model, "end"),
Html::getInputName($model, "id_account") => Html::getAttributeValue($model, "id_account"),
Html::getInputName($model, "id_user") => Html::getAttributeValue($model, "id_user"),
Html::getInputName($model, "category") => Html::getAttributeValue($model, "category"),
Html::getInputName($model, "id_product") => Html::getAttributeValue($model, "id_product"),
Html::getInputName($model, "status") => Html::getAttributeValue($model, "status"),
] ),
['class' => 'btn btn-primary'])
?>

View File

@@ -0,0 +1,29 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\Url;
/* @var $this yii\web\View */
/* @var $model common\models\TransferSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<?= Html::a(
Yii::t('frontend/transfer', 'Export PDF'),
Url::to(['tickets-pdf' ,
Html::getInputName($model, "start") => Html::getAttributeValue($model, "start"),
Html::getInputName($model, "end") =>Html::getAttributeValue($model, "end"),
Html::getInputName($model, "id_account") => Html::getAttributeValue($model, "id_account"),
Html::getInputName($model, "id_user") => Html::getAttributeValue($model, "id_user"),
Html::getInputName($model, "status") => Html::getAttributeValue($model, "status"),
Html::getInputName($model, "customer") => Html::getAttributeValue($model, "customer"),
Html::getInputName($model, "id_ticket_type") => Html::getAttributeValue($model, "id_ticket_type"),
] ),
['class' => 'btn btn-primary'])
?>

View File

@@ -0,0 +1,142 @@
<?php
use yii\helpers\Html;
use common\models\Account;
use common\models\User;
use common\models\ProductCategory;
use common\models\Product;
use common\models\Transfer;
?>
<style>
td,th{
padding: 3px;
}
.table-summary td.count {
text-align: right;
}
.table-summary td.money {
text-align: right;
}
.table-filter th{
text-align: left;
}
</style>
<div class="container">
<?php
// ////////////////////////
// Termék eladás
// //////////////////////
?>
<h3>Termék eladások</h3>
<table class="table-filter">
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('start')) ?></th>
<td><?php echo Html::getAttributeValue($searchModel, "start")?></td>
<th><?php echo Html::encode($searchModel->getAttributeLabel('end')) ?></th>
<td><?php echo Html::getAttributeValue($searchModel, "end")?></td>
</tr>
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('id_account')) ?></th>
<td><?php if ( empty($searchModel->id_account) ){
echo"Mind" ;
}else{
$account = Account::findOne($searchModel->id_account) ;
if ( $account != null ){
echo $account->name;
}
}?></td>
<th><?php echo Html::encode($searchModel->getAttributeLabel('id_user')) ?></th>
<td><?php if ( empty($searchModel->id_user) ){
echo"Mind" ;
}else{
$user = User::findOne($searchModel->id_user) ;
if ( $user != null ){
echo $user->username;
}
}?></td>
</tr>
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('category')) ?></th>
<td><?php if ( empty($searchModel->category) ){
echo"Mind" ;
}else{
$category = ProductCategory::findOne($searchModel->category) ;
if ( $category != null ){
echo $category->name;
}
}?></td>
<th><?php echo Html::encode($searchModel->getAttributeLabel('id_product')) ?></th>
<td><?php if ( empty($searchModel->id_product) ){
echo"Mind" ;
}else{
$product = Product::findOne($searchModel->id_product) ;
if ( $product != null ){
echo $product->name;
}
}?></td>
</tr>
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('status')) ?></th>
<td><?php if ( empty($searchModel->status) ){
echo"Mind" ;
}else{
$statuses = Transfer::statuses();
$status = "";
if (array_key_exists($searchModel->status, $statuses) ){
echo $statuses[$searchModel->status];
}
}?></td>
</tr>
</table>
<div class="row">
<div class="col-md-12 text-right" style="text-decoration: underline;">
Összesen: <?php echo $searchModel->productMoney; ?> Ft
</div>
</div>
<table class="table table-bordered table-striped table-summary">
<thead>
<tr>
<th>T</th>
<th>Kiadva</th>
<th>Fizetve</th>
<th>Kassza</th>
<th>Felhasználó</th>
<!-- <th>Vásárló</th> -->
<th>Kategória</th>
<th>Termék</th>
<th>Egység ár</th>
<th>Mennyiség</th>
<th>Összeg</th>
</tr>
</thead>
<tbody>
<?php foreach ($searchModel->products as $p ){?>
<tr>
<td><?php echo "#".$p['id_transfer']?> </td>
<td><?php echo $p['product_created_at']?> </td>
<td><?php echo $p['product_paid_at']?> </td>
<td><?php echo $p['account_name']?> </td>
<td><?php echo $p['user_name']?> </td>
<td><?php echo $p['product_category_name'] ?></td>
<td><?php echo $p['product_name'] ?></td>
<td class='money'><?php echo $p['product_item_price']?> Ft</td>
<td class='count'><?php echo $p['product_count']?> Db</td>
<td class='money'><?php echo $p['product_money']?> FT</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php
if (count ( $searchModel->products ) == 0) {
?>
Nincs találat
<?php
}
?>
</div>

View File

@@ -0,0 +1,136 @@
<?php
use yii\helpers\Html;
use common\models\Account;
use common\models\User;
use common\models\ProductCategory;
use common\models\Product;
use common\models\Transfer;
use common\models\TicketType;
?>
<style>
td,th{
padding: 3px;
}
.table-summary td.count {
text-align: right;
}
.table-summary td.money {
text-align: right;
}
.table-filter th{
text-align: left;
}
</style>
<div class="container">
<?php
// ////////////////////////
// Termék eladás
// //////////////////////
?>
<h3>Termék eladások</h3>
<table class="table-filter">
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('start')) ?></th>
<td><?php echo Html::getAttributeValue($searchModel, "start")?></td>
<th><?php echo Html::encode($searchModel->getAttributeLabel('end')) ?></th>
<td><?php echo Html::getAttributeValue($searchModel, "end")?></td>
</tr>
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('id_account')) ?></th>
<td><?php if ( empty($searchModel->id_account) ){
echo"Mind" ;
}else{
$account = Account::findOne($searchModel->id_account) ;
if ( $account != null ){
echo $account->name;
}
}?></td>
<th><?php echo Html::encode($searchModel->getAttributeLabel('id_user')) ?></th>
<td><?php if ( empty($searchModel->id_user) ){
echo"Mind" ;
}else{
$user = User::findOne($searchModel->id_user) ;
if ( $user != null ){
echo $user->username;
}
}?></td>
</tr>
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('id_ticket_type')) ?></th>
<td><?php if ( empty($searchModel->id_ticket_type) ){
echo"Mind" ;
}else{
$ticketType = TicketType::findOne($searchModel->id_ticket_type) ;
if ( $ticketType != null ){
echo $ticketType->name;
}
}?></td>
<th><?php echo Html::encode($searchModel->getAttributeLabel('customer')) ?></th>
<td><?php if ( empty($searchModel->customer) ){
echo"" ;
}else{
echo Html::encode($searchModel->customer) ;
}?></td>
</tr>
<tr>
<th><?php echo Html::encode($searchModel->getAttributeLabel('status')) ?></th>
<td><?php if ( empty($searchModel->status) ){
echo"Mind" ;
}else{
$statuses = Transfer::statuses();
$status = "";
if (array_key_exists($searchModel->status, $statuses) ){
echo $statuses[$searchModel->status];
}
}?></td>
</tr>
</table>
<div class="row">
<div class="col-md-12 text-right" style="text-decoration: underline; ">
Összesen: <?php echo $searchModel->ticketMoney; ?> Ft
</div>
</div>
<table class="table table-bordered table-striped table-summary">
<thead>
<tr>
<th>Kiadva</th>
<th>Fizetve</th>
<th>Kassza</th>
<th>Felhasználó</th>
<th>Vendég</th>
<th>Bérlet típus</th>
<th>Egység ár</th>
<th>Mennyiség</th>
<th>Összeg</th>
</tr>
</thead>
<tbody>
<?php foreach ($searchModel->tickets as $t ){?>
<tr>
<td><?php echo $t['ticket_created_at']?> </td>
<td><?php echo $t['ticket_paid_at']?> </td>
<td><?php echo $t['account_name']?> </td>
<td><?php echo $t['user_name']?> </td>
<td><?php echo $t['customer_name']?> </td>
<td><?php echo $t['ticket_type_name'] ?></td>
<td class='money'><?php echo $t['ticket_item_price']?> Ft</td>
<td class='count'><?php echo $t['ticket_count']?> Db</td>
<td class='money'><?php echo $t['ticket_money']?> FT</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php
if (count ( $searchModel->tickets ) == 0) {
?>
Nincs találat
<?php
}
?>
</div>

View File

@@ -0,0 +1,77 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\widgets\DatePicker;
use frontend\components\HtmlHelper;
use common\models\Transfer;
use kartik\widgets\DateTimePicker;
/* @var $this yii\web\View */
/* @var $model common\models\TransferSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
$accountOptions = ['' =>'Mind']+ HtmlHelper::mkAccountOptions( $model->accounts );
$userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->users,'id','username');
$productOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productOptions,'id_product','name');
$productCategoryOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productCategories,'id_product_category','name');
$transferStatusOptions = ['' => 'Mind'] + Transfer::statuses();
?>
<div class="transfer-search">
<?php $form = ActiveForm::begin([
'action' => ['sale'],
'method' => 'get',
]); ?>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
]) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
]) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'id_user')->dropDownList($userOptions) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'category')->dropDownList($productCategoryOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'id_product')->dropDownList($productOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'status')->dropDownList($transferStatusOptions) ?>
</div>
</div>
<div class="form-group">
<?= Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,78 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\widgets\DatePicker;
use frontend\components\HtmlHelper;
use common\models\Transfer;
use kartik\widgets\DateTimePicker;
/* @var $this yii\web\View */
/* @var $model common\models\TransferSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
$accountOptions = ['' =>'Mind']+ HtmlHelper::mkAccountOptions( $model->accounts );
$userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->users,'id','username');
$transferStatusOptions = ['' => 'Mind'] + Transfer::statuses();
$ticketTypeOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->ticketTypes,'id_ticket_type','name');
?>
<div class="transfer-search">
<?php $form = ActiveForm::begin([
'action' => ['tickets'],
'method' => 'get',
]); ?>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
]) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
]) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'id_user')->dropDownList($userOptions) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'id_ticket_type')->dropDownList($ticketTypeOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'status')->dropDownList($transferStatusOptions) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'customer')->textInput() ?>
</div>
</div>
<div class="form-group">
<?= Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -245,6 +245,7 @@ td.name{
<th>Fizetve</th>
<th>Kassza</th>
<th>Felhasználó</th>
<th>Vendég</th>
<th>Bérlet típus</th>
<th>Egység ár</th>
<th>Mennyiség</th>
@@ -258,6 +259,7 @@ td.name{
<td><?php echo $t['ticket_paid_at']?> </td>
<td><?php echo $t['account_name']?> </td>
<td><?php echo $t['user_name']?> </td>
<td><?php echo $t['customer_name']?> </td>
<td><?php echo $t['ticket_type_name'] ?></td>
<td class='money'><?php echo $t['ticket_item_price']?> Ft</td>
<td class='count'><?php echo $t['ticket_count']?> Db</td>

View File

@@ -0,0 +1,115 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\ListView;
use yii\base\Widget;
/* @var $this yii\web\View */
/* @var $searchModel common\models\TransferSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t ( 'frontend/transfer', 'Product sale detailed' );
$this->params ['breadcrumbs'] [] = $this->title;
?>
<style>
.dl-transfer {
margin-bottom: 0px;
}
.item-transfer {
border: 1px solid #b4b4b4;
margin-top: 12px;
padding-top: 6px;
padding-bottom: 6px;
}
td.count, td.money {
text-align: right;
}
td.name {
width: 600px;
}
.table-category-product td.name {
width: 600px;
}
.table-category-product td.count {
text-align: right;
}
.table-category-product td.money {
text-align: right;
}
</style>
<div class="transfer-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search_sale', ['model' => $searchModel]); ?>
<?php echo $this->render('_export_btn_sale', ['model' => $searchModel]); ?>
<div>
<?php
// ////////////////////////
// Termék eladás
// //////////////////////
?>
<h3>Termék eladások</h3>
<div class="row">
<div class="col-md-12 text-right" style="text-decoration: underline;">
Összesen: <?php echo $searchModel->productMoney; ?> Ft
</div>
</div>
<table class="table table-bordered table-striped table-summary">
<thead>
<tr>
<th>Tranzakció</th>
<th>Kiadva</th>
<th>Fizetve</th>
<th>Kassza</th>
<th>Felhasználó</th>
<th>Vásárló</th>
<th>Kategória</th>
<th>Termék</th>
<th>Egység ár</th>
<th>Mennyiség</th>
<th>Összeg</th>
</tr>
</thead>
<tbody>
<?php foreach ($searchModel->products as $p ){?>
<tr>
<td><?php echo "#".$p['id_transfer']?> </td>
<td><?php echo ( $p['product_created_at'])?> </td>
<td><?php echo $p['product_paid_at']?> </td>
<td><?php echo $p['account_name']?> </td>
<td><?php echo $p['user_name']?> </td>
<td><?php echo $p['customer_name']?> </td>
<td><?php echo $p['product_category_name'] ?></td>
<td><?php echo $p['product_name'] ?></td>
<td class='money'><?php echo $p['product_item_price']?> Ft</td>
<td class='count'><?php echo $p['product_count']?> Db</td>
<td class='money'><?php echo $p['product_money']?> FT</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php
if (count ( $searchModel->products ) == 0) {
?>
Nincs találat
<?php
}
?>
</div>
</div>

View File

@@ -0,0 +1,77 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use kartik\widgets\DatePicker;
use frontend\components\HtmlHelper;
use common\models\Transfer;
use kartik\widgets\DateTimePicker;
/* @var $this yii\web\View */
/* @var $model common\models\TransferSearch */
/* @var $form yii\widgets\ActiveForm */
?>
<?php
$accountOptions = ['' =>'Mind']+ HtmlHelper::mkAccountOptions( $model->accounts );
$userOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->users,'id','username');
$productOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productOptions,'id_product','name');
$productCategoryOptions = ['' => 'Mind'] + HtmlHelper::mkOptions($model->productCategories,'id_product_category','name');
$transferStatusOptions = ['' => 'Mind'] + Transfer::statuses();
?>
<div class="transfer-search">
<?php $form = ActiveForm::begin([
'action' => ['sale'],
'method' => 'get',
]); ?>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'start')->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
]) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'end') ->widget(DateTimePicker::classname(), [
'pluginOptions' => [
'autoclose'=>true,
'format' => 'yyyy.mm.dd hh:ii'
]
]) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'id_user')->dropDownList($userOptions) ?>
</div>
</div>
<div class="row">
<div class="col-md-4">
<?= $form->field($model, 'category')->dropDownList($productCategoryOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'id_product')->dropDownList($productOptions) ?>
</div>
<div class="col-md-4">
<?= $form->field($model, 'status')->dropDownList($transferStatusOptions) ?>
</div>
</div>
<div class="form-group">
<?= Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,111 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\ListView;
use yii\base\Widget;
/* @var $this yii\web\View */
/* @var $searchModel common\models\TransferSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t ( 'frontend/transfer', 'Ticket sale detailed' );
$this->params ['breadcrumbs'] [] = $this->title;
?>
<style>
.dl-transfer {
margin-bottom: 0px;
}
.item-transfer {
border: 1px solid #b4b4b4;
margin-top: 12px;
padding-top: 6px;
padding-bottom: 6px;
}
td.count, td.money {
text-align: right;
}
td.name {
width: 600px;
}
.table-category-product td.name {
width: 600px;
}
.table-category-product td.count {
text-align: right;
}
.table-category-product td.money {
text-align: right;
}
</style>
<div class="transfer-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php echo $this->render('_search_ticket', ['model' => $searchModel]); ?>
<?php echo $this->render('_export_btn_ticket', ['model' => $searchModel]); ?>
<div>
<?php
// ////////////////////////
// Termék eladás
// //////////////////////
?>
<h3>Bérlet eladások</h3>
<div class="row">
<div class="col-md-12 text-right" style="text-decoration: underline;">
Összesen: <?php echo $searchModel->ticketMoney; ?> Ft
</div>
</div>
<table class="table table-bordered table-striped table-summary">
<thead>
<tr>
<th>Kiadva</th>
<th>Fizetve</th>
<th>Kassza</th>
<th>Felhasználó</th>
<th>Vendég</th>
<th>Bérlet típus</th>
<th>Egység ár</th>
<th>Mennyiség</th>
<th>Összeg</th>
</tr>
</thead>
<tbody>
<?php foreach ($searchModel->tickets as $t ){?>
<tr>
<td><?php echo $t['ticket_created_at']?> </td>
<td><?php echo $t['ticket_paid_at']?> </td>
<td><?php echo $t['account_name']?> </td>
<td><?php echo $t['user_name']?> </td>
<td><?php echo $t['customer_name']?> </td>
<td><?php echo $t['ticket_type_name'] ?></td>
<td class='money'><?php echo $t['ticket_item_price']?> Ft</td>
<td class='count'><?php echo $t['ticket_count']?> Db</td>
<td class='money'><?php echo $t['ticket_money']?> FT</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php
if (count ( $searchModel->tickets ) == 0) {
?>
Nincs találat
<?php
}
?>
</div>
</div>