add transfer#list pdf download, fix helper#fixascii function
This commit is contained in:
@@ -16,7 +16,7 @@ use yii\helpers\Html;
|
||||
</a>
|
||||
|
||||
<div class="navbar-header">
|
||||
<a class="navbar-brand" href="#">Web Recepció</a>
|
||||
<a class="navbar-brand" href="#">Adminisztráció</a>
|
||||
</div>
|
||||
|
||||
<div class="navbar-custom-menu">
|
||||
|
||||
61
backend/views/transfer/_list_pdf_head.php
Normal file
61
backend/views/transfer/_list_pdf_head.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
use common\components\RoleDefinition;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ( $searchModel->output == 'pdf'){
|
||||
?>
|
||||
<link rel='stylesheet' href='<?php echo \Yii::getAlias('@vendor'.'/bower/bootstrap/dist/css/bootstrap.css')?>'>
|
||||
<style>
|
||||
|
||||
.item-transfer {
|
||||
border: 1px solid #b4b4b4;
|
||||
margin-top: 12px;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.table td{
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
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>
|
||||
<?php if ( isset($searchModel->outputView ) || $type == 'full' ){?>
|
||||
<h1><?php echo $label ?></h1>
|
||||
<?php }?>
|
||||
<?php
|
||||
if ( $searchModel->outputView == 'easy'){
|
||||
echo $this->render('_view_search_list',['searchModel'=>$searchModel]);
|
||||
}
|
||||
else if ( $searchModel->outputView == 'medium'){
|
||||
echo $this->render('_view_search_list',['searchModel'=>$searchModel]);
|
||||
}
|
||||
else if ( $searchModel->outputView == 'detailed'){
|
||||
echo $this->render('_view_search_list',['searchModel'=>$searchModel]);
|
||||
}else if ( $type == 'full'){
|
||||
echo $this->render('_view_search_list',['searchModel'=>$searchModel]);
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
63
backend/views/transfer/_search_list_user_grouped.php
Normal file
63
backend/views/transfer/_search_list_user_grouped.php
Normal file
@@ -0,0 +1,63 @@
|
||||
<?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');
|
||||
?>
|
||||
|
||||
<div class="transfer-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['list'],
|
||||
'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="form-group">
|
||||
<?= Html::submitButton(Yii::t('frontend/transfer', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
9
backend/views/transfer/_total_content.php
Normal file
9
backend/views/transfer/_total_content.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<div role="tabpanel" class="tab-pane active" id="easy">
|
||||
<?php echo $this->render('_total_easy', ['searchModel' => $searchModel]); ?>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="medium">
|
||||
<?php echo $this->render('_total_medium', ['searchModel' => $searchModel]); ?>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="detailed">
|
||||
<?php echo $this->render('_total_detailed', ['searchModel' => $searchModel]); ?>
|
||||
</div>
|
||||
8
backend/views/transfer/_total_content_pdf.php
Normal file
8
backend/views/transfer/_total_content_pdf.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
echo $this->render('_list_pdf_head',[ 'searchModel' =>$searchModel, 'label' => 'Napi bevételek','type' =>'full']);
|
||||
?>
|
||||
<?php echo $this->render('_total_easy', ['searchModel' => $searchModel]); ?>
|
||||
<pagebreak />
|
||||
<?php echo $this->render('_total_medium', ['searchModel' => $searchModel]); ?>
|
||||
<pagebreak />
|
||||
<?php echo $this->render('_total_detailed', ['searchModel' => $searchModel]); ?>
|
||||
175
backend/views/transfer/_total_detailed.php
Normal file
175
backend/views/transfer/_total_detailed.php
Normal file
@@ -0,0 +1,175 @@
|
||||
<?php
|
||||
use common\components\RoleDefinition;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
<?php
|
||||
echo $this->render('_list_pdf_head',[ 'searchModel' =>$searchModel, 'label' => 'Napi bevételek - Rézsletes','type' =>'detailed']);
|
||||
?>
|
||||
<h2>Részletes összesítés</h2>
|
||||
<?php
|
||||
//////////////////////////
|
||||
// Bérletek
|
||||
////////////////////////
|
||||
?>
|
||||
<h3>Bérletek</h3>
|
||||
<?php
|
||||
|
||||
if ( !isset($searchModel->output) ){
|
||||
$pdfUrl = Url::current([ Html::getInputName($searchModel, 'output') => 'pdf']);
|
||||
echo Html::a("Teljes PDF letöltése", $pdfUrl,['class' => 'btn btn-primary btn-all' ]);
|
||||
|
||||
$pdfUrl = Url::current([ Html::getInputName($searchModel, 'output') => 'pdf', Html::getInputName($searchModel, 'outputView') => 'detailed']);
|
||||
echo Html::a("Egyszerű összesítő Pdf", $pdfUrl,['class' => 'btn btn-primary' ]);
|
||||
}
|
||||
?>
|
||||
<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>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['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
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->ticketMoney; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<pagebreak />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
//////////////////////////
|
||||
// Termék eladás
|
||||
////////////////////////
|
||||
?>
|
||||
<h3>Termék eladások</h3>
|
||||
<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>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['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
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->productMoney; ?> Ft
|
||||
</div>
|
||||
</div>
|
||||
<pagebreak />
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
//////////////////////////
|
||||
// Pénzmozgások
|
||||
////////////////////////
|
||||
?>
|
||||
<h3>Pénzmozgások</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dátum</th>
|
||||
<th>Kassza</th>
|
||||
<th>Felhasználó</th>
|
||||
<th>Név</th>
|
||||
<th>Típus</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($searchModel->moneyMovements as $p ){?>
|
||||
<tr>
|
||||
<td><?php echo $p['money_movement_created_at']?> </td>
|
||||
<td><?php echo $p['account_name']?> </td>
|
||||
<td><?php echo $p['user_name']?> </td>
|
||||
<td><?php echo $p['money_movement_name'] ?></td>
|
||||
<td><?php echo $p['money_movement_type_name'] ?></td>
|
||||
<td class='money'><?php echo $p['signed_money']?> Ft</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ( count($searchModel->moneyMovements ) == 0 ) {
|
||||
?>
|
||||
Nincs találat
|
||||
<?php
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->moneyMovementMoneis; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline; font-weight: bold;">
|
||||
Végösszeg: <?php echo $searchModel->total; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
69
backend/views/transfer/_total_easy.php
Normal file
69
backend/views/transfer/_total_easy.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
use common\components\RoleDefinition;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
|
||||
<?php
|
||||
echo $this->render('_list_pdf_head',[ 'searchModel' =>$searchModel, 'label' => 'Napi bevételek - Egyszerű','type' =>'easy']);
|
||||
?>
|
||||
|
||||
<h2>Egyszerű összesítés</h2>
|
||||
<?php
|
||||
|
||||
if ( !isset($searchModel->output) ){
|
||||
|
||||
$pdfUrl = Url::current([ Html::getInputName($searchModel, 'output') => 'pdf']);
|
||||
echo Html::a("Teljes PDF letöltése", $pdfUrl,['class' => 'btn btn-primary btn-all' ]);
|
||||
|
||||
$pdfUrl = Url::current([ Html::getInputName($searchModel, 'output') => 'pdf', Html::getInputName($searchModel, 'outputView') => 'easy']);
|
||||
echo Html::a("Egyszerű összesítő Pdf", $pdfUrl,['class' => 'btn btn-primary' ]);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<h3>Bruttó</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Bérletek</th>
|
||||
<td class="money"><?php echo $searchModel->ticketMoney?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Termékek</th>
|
||||
<td class="money"><?php echo $searchModel->productMoney?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pénzmozgások</th>
|
||||
<td class="money"><?php echo $searchModel->moneyMovementMoneis?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Végösszeg bruttó</th>
|
||||
<td class="money"><span style='border-bottom: 1px solid black'><?php echo $searchModel->total?> FT</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<?php if( RoleDefinition::isAdmin() ) {?>
|
||||
<h3>Nettó</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Bérletek</th>
|
||||
<td class="money"><?php echo $searchModel->ticketMoney?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Termékek</th>
|
||||
<td class="money"><?php echo $searchModel->productMoneyNetto?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pénzmozgások</th>
|
||||
<td class="money"><?php echo $searchModel->moneyMovementMoneis?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Végösszeg nettó</th>
|
||||
<td class="money"><span style='border-bottom: 1px solid black'><?php echo $searchModel->totalNetto?> FT</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php }?>
|
||||
158
backend/views/transfer/_total_medium.php
Normal file
158
backend/views/transfer/_total_medium.php
Normal file
@@ -0,0 +1,158 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
<?php
|
||||
echo $this->render('_list_pdf_head',[ 'searchModel' =>$searchModel, 'label' => 'Napi bevételek - Közepes', 'type' =>'medium']);
|
||||
?>
|
||||
<h2>Közepes összesítés</h2>
|
||||
|
||||
<?php
|
||||
|
||||
if ( !isset($searchModel->output) ){
|
||||
$pdfUrl = Url::current([ Html::getInputName($searchModel, 'output') => 'pdf']);
|
||||
echo Html::a("Teljes PDF letöltése", $pdfUrl,['class' => 'btn btn-primary btn-all' ]);
|
||||
$pdfUrl = Url::current([ Html::getInputName($searchModel, 'output') => 'pdf', Html::getInputName($searchModel, 'outputView') => 'medium']);
|
||||
echo Html::a("Közepes összesítő Pdf", $pdfUrl,['class' => 'btn btn-primary' ]);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<h3>Bérletek típus szerint</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bérlet típus</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( $searchModel->ticketStats as $ticketStat ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="name"><?php echo $ticketStat['ticket_type_name'] ?></td>
|
||||
<td class="count"><?php echo $ticketStat['ticket_count']?> Db</td>
|
||||
<td class="money"><?php echo $ticketStat['ticket_money']?> FT</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->ticketMoney; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h3>Termékek kategória szerint</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Termék kategória</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( $searchModel->productMoneies as $pm ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="name"><?php echo $pm['category_name'] ?></td>
|
||||
<td class="count"><?php echo $pm['category_count']?> Db</td>
|
||||
<td class="money"><?php echo $pm['product_money']?> FT</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->productMoney; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Termékek kategória szerint részletes</h3>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
foreach($searchModel->productsByCategory['categories'] as $categoryHolder ){
|
||||
|
||||
$products = $categoryHolder['products'];
|
||||
?>
|
||||
<h4><?php echo $categoryHolder['category']['name']?></h4>
|
||||
|
||||
<table class="table table-bordered table-striped table-summary table-category-product">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Termék</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ( $products as $p){?>
|
||||
|
||||
<tr>
|
||||
<td class='name'><?php echo $p['product_name'] ?></td>
|
||||
<td class='count'><?php echo $p['product_count'] ?> Db</td>
|
||||
<td class='money'><?php echo $p['product_money']?> FT</td>
|
||||
</tr>
|
||||
|
||||
<?php }?>
|
||||
<tr class="warning">
|
||||
<td><?php echo "Összesen" ?></td>
|
||||
<td><?php ?></td>
|
||||
<td class='money'><?php echo $categoryHolder['total']?> FT</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen:
|
||||
<?php
|
||||
echo $searchModel->productsByCategory['total'];
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Pénzmozgások típus szerint</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pénzmozgás típus</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( $searchModel->moneyMovementsByType as $mmStat ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="name"><?php echo $mmStat['name'] ?></td>
|
||||
<td class="count"><?php echo $mmStat['money_movement_count']?> Db</td>
|
||||
<td class="money"><?php echo $mmStat['money_movement_money']?> FT</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->moneyMovementMoneis; ?> Ft
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline; font-weight: bold;">
|
||||
Végösszeg: <?php echo $searchModel->total; ?> Ft
|
||||
</div>
|
||||
</div>
|
||||
21
backend/views/transfer/_view_easy_total.php
Normal file
21
backend/views/transfer/_view_easy_total.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Bérletek</th>
|
||||
<td class="money"><?php echo $ticketMoney?> FT
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Termékek</th>
|
||||
<td class="money"><?php echo $productMoney?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pénzmozgások</th>
|
||||
<td class="money"><?php echo $moneyMovementMoneis?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Végösszeg bruttó</th>
|
||||
<td class="money"><span style='border-bottom: 1px solid black'><?php echo $total?> FT</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
45
backend/views/transfer/_view_search_list.php
Normal file
45
backend/views/transfer/_view_search_list.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<table class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>
|
||||
Időszak kezdete
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $searchModel->start?>
|
||||
</td>
|
||||
<th>
|
||||
Időszak vége
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $searchModel->end?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
Kassza
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
if ( isset($searchModel->currentAccount)){
|
||||
echo $searchModel->currentAccount->name;
|
||||
}else{
|
||||
echo "Mind";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<th>
|
||||
Felhasználó
|
||||
</th>
|
||||
<td>
|
||||
<?php
|
||||
if ( isset($searchModel->currentUser)){
|
||||
echo $searchModel->currentUser->username;
|
||||
}else{
|
||||
echo "Mind";
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
@@ -3,9 +3,11 @@ use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\widgets\ListView;
|
||||
use yii\base\Widget;
|
||||
use common\components\RoleDefinition;
|
||||
use yii\helpers\Url;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel common\models\TransferSearch */
|
||||
/* @var $searchModel common\models\TransferListSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t ( 'frontend/transfer', 'Daily transfers' );
|
||||
@@ -42,6 +44,10 @@ td.name{
|
||||
.table-category-product td.money{
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.btn-all{
|
||||
margin-right: 6px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="transfer-index">
|
||||
@@ -49,347 +55,43 @@ td.name{
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php echo $this->render('_search_list', ['model' => $searchModel]); ?>
|
||||
|
||||
<?php
|
||||
if ( isset($searchModel->currentUser) ){
|
||||
?>
|
||||
|
||||
<table class='table table-striped'>
|
||||
<tr>
|
||||
<th>
|
||||
Felhasználó:
|
||||
</th>
|
||||
<td>
|
||||
<?php echo $searchModel->currentUser->username?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
|
||||
<div>
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="active"><a href="#big"
|
||||
aria-controls="big" role="tab" data-toggle="tab">Egyszerű összesítő</a></li>
|
||||
<li role="presentation" class="active"><a href="#easy"
|
||||
aria-controls="easy" role="tab" data-toggle="tab">Egyszerű összesítő</a></li>
|
||||
<li role="presentation"><a href="#medium" aria-controls="medium"
|
||||
role="tab" data-toggle="tab">Közepes összesítő</a></li>
|
||||
<li role="presentation"><a href="#detailed" aria-controls="detailed"
|
||||
role="tab" data-toggle="tab">Részletes összesítő</a></li>
|
||||
</ul>
|
||||
|
||||
|
||||
<!-- Tab panes -->
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane active" id="big">
|
||||
<h2>Egyszerű összesítés</h2>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Bérletek</th>
|
||||
<td class="money"><?php echo $searchModel->ticketMoney?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Termékek</th>
|
||||
<td class="money"><?php echo $searchModel->productMoney?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pénzmozgások</th>
|
||||
<td class="money"><?php echo $searchModel->moneyMovementMoneis?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Végösszeg</th>
|
||||
<td class="money"><span style='border-bottom: 1px solid black'><?php echo $searchModel->total?> FT</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="medium">
|
||||
<h2>Közepes összesítés</h2>
|
||||
|
||||
<h3>Bérletek típus szerint</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bérlet típus</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( $searchModel->ticketStats as $ticketStat ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="name"><?php echo $ticketStat['ticket_type_name'] ?></td>
|
||||
<td class="count"><?php echo $ticketStat['ticket_count']?> Db</td>
|
||||
<td class="money"><?php echo $ticketStat['ticket_money']?> FT</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->ticketMoney; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h3>Termékek kategória szerint</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Termék kategória</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( $searchModel->productMoneies as $pm ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="name"><?php echo $pm['category_name'] ?></td>
|
||||
<td class="count"><?php echo $pm['category_count']?> Db</td>
|
||||
<td class="money"><?php echo $pm['product_money']?> FT</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->productMoney; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Termékek kategória szerint részletes</h3>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
foreach($searchModel->productsByCategory['categories'] as $categoryHolder ){
|
||||
|
||||
$products = $categoryHolder['products'];
|
||||
?>
|
||||
<h4><?php echo $categoryHolder['category']['name']?></h4>
|
||||
|
||||
<table class="table table-bordered table-striped table-summary table-category-product">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Termék</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ( $products as $p){?>
|
||||
|
||||
<tr>
|
||||
<td class='name'><?php echo $p['product_name'] ?></td>
|
||||
<td class='count'><?php echo $p['product_count'] ?> Db</td>
|
||||
<td class='money'><?php echo $p['product_money']?> FT</td>
|
||||
</tr>
|
||||
|
||||
<?php }?>
|
||||
<tr class="warning">
|
||||
<td><?php echo "Összesen" ?></td>
|
||||
<td><?php ?></td>
|
||||
<td class='money'><?php echo $categoryHolder['total']?> FT</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen:
|
||||
<?php
|
||||
echo $searchModel->productsByCategory['total'];
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h3>Pénzmozgások típus szerint</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pénzmozgás típus</th>
|
||||
<th>Mennyiség</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
foreach ( $searchModel->moneyMovementsByType as $mmStat ) {
|
||||
?>
|
||||
<tr>
|
||||
<td class="name"><?php echo $mmStat['name'] ?></td>
|
||||
<td class="count"><?php echo $mmStat['money_movement_count']?> Db</td>
|
||||
<td class="money"><?php echo $mmStat['money_movement_money']?> FT</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->moneyMovementMoneis; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline; font-weight: bold;">
|
||||
Végösszeg: <?php echo $searchModel->total; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane" id="detailed">
|
||||
<h2>Részletes összesítés</h2>
|
||||
<?php
|
||||
//////////////////////////
|
||||
// Bérletek
|
||||
////////////////////////
|
||||
?>
|
||||
<h3>Bérletek</h3>
|
||||
<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>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['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
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->ticketMoney; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
//////////////////////////
|
||||
// Termék eladás
|
||||
////////////////////////
|
||||
?>
|
||||
<h3>Termék eladások</h3>
|
||||
<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>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['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
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->productMoney; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
//////////////////////////
|
||||
// Pénzmozgások
|
||||
////////////////////////
|
||||
?>
|
||||
<h3>Pénzmozgások</h3>
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Dátum</th>
|
||||
<th>Kassza</th>
|
||||
<th>Felhasználó</th>
|
||||
<th>Név</th>
|
||||
<th>Típus</th>
|
||||
<th>Összeg</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($searchModel->moneyMovements as $p ){?>
|
||||
<tr>
|
||||
<td><?php echo $p['money_movement_created_at']?> </td>
|
||||
<td><?php echo $p['account_name']?> </td>
|
||||
<td><?php echo $p['user_name']?> </td>
|
||||
<td><?php echo $p['money_movement_name'] ?></td>
|
||||
<td><?php echo $p['money_movement_type_name'] ?></td>
|
||||
<td class='money'><?php echo $p['signed_money']?> Ft</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ( count($searchModel->moneyMovements ) == 0 ) {
|
||||
?>
|
||||
Nincs találat
|
||||
<?php
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo $searchModel->moneyMovementMoneis; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline; font-weight: bold;">
|
||||
Végösszeg: <?php echo $searchModel->total; ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php echo $this->render('_total_content', ['searchModel' => $searchModel]); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
66
backend/views/transfer/list_user_grouped.php
Normal file
66
backend/views/transfer/list_user_grouped.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\widgets\ListView;
|
||||
use yii\base\Widget;
|
||||
use common\components\RoleDefinition;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel backend\models\TransferListUserGroupedSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t ( 'frontend/transfer', 'Daily transfers' );
|
||||
$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_list_user_grouped', ['model' => $searchModel]); ?>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
foreach ($searchModel->ticketMoneyByUser as $user){
|
||||
echo "<h3>".$user['username']."</h3>";
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user