add reception account state view and pdf export
This commit is contained in:
102
common/views/account-state/account_state_pdf.php
Normal file
102
common/views/account-state/account_state_pdf.php
Normal file
@@ -0,0 +1,102 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
use common\components\total\TotalEasyWidget;
|
||||
use common\components\total\TotalDetailedProductsWidget;
|
||||
use common\components\total\TotalDetailedTicketsWidget;
|
||||
use common\components\total\TotalDetailedMoneyMovementWidget;
|
||||
use common\components\accountstate\BankNotesWidget;
|
||||
use common\components\total\TotalMediumTicketsWidget;
|
||||
use common\components\total\TotalMediumProductsWidget;
|
||||
use common\components\total\TotalMediumMoneyMovementsWidget;
|
||||
use common\components\total\TotalDifferenceWidget;
|
||||
use common\models\AccountState;
|
||||
use common\components\accountstate\AccountStateWidget;
|
||||
use yii\base\Widget;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\AccountState */
|
||||
if ( $model ->type == AccountState::TYPE_OPEN ){
|
||||
$this->title = "Kassza nyitás";
|
||||
}else{
|
||||
$this->title = "Kassza zárás";
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<link rel='stylesheet' href='<?php echo \Yii::getAlias('@vendor'.'/bower/bootstrap/dist/css/bootstrap.css')?>'>
|
||||
|
||||
<style>
|
||||
td,th{
|
||||
padding: 3px;
|
||||
}
|
||||
td.note-name{
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
td.money{
|
||||
text-align: right;
|
||||
}
|
||||
</style>
|
||||
<div class="account-state-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?php
|
||||
if ( $model->hasDifferenceToPrevState() ){
|
||||
if ( $model->hasMinus()){
|
||||
?>
|
||||
<div class="alert alert-danger" role="alert">Negatív különbözet</div>
|
||||
<?php
|
||||
}else{
|
||||
?>
|
||||
<div class="alert alert-success" role="alert">Pozitív különbözet</div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
echo AccountStateWidget::widget(['model' => $model]);
|
||||
?>
|
||||
|
||||
<?php if ( $model->hasDifferenceToPrevState() ){
|
||||
?>
|
||||
<h2>Különbözet</h2>
|
||||
<?php
|
||||
echo TotalDifferenceWidget::widget(['model' => $model] );
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
<?php if ( $model ->type == AccountState::TYPE_CLOSE ){?>
|
||||
<pagebreak />
|
||||
<?php echo TotalEasyWidget::widget(['dailyListing' => $details]);?>
|
||||
<pagebreak />
|
||||
<h2>Közepes összesítés</h2>
|
||||
<h3>Bérletek típus szerint</h3>
|
||||
<?php echo TotalMediumTicketsWidget::widget(['dailyListing' => $details]);?>
|
||||
<h3>Termékek név szerint</h3>
|
||||
<?php echo TotalMediumProductsWidget::widget(['dailyListing' => $details]);?>
|
||||
<h3>Pénzmozgások típus szerint</h3>
|
||||
<?php echo TotalMediumMoneyMovementsWidget::widget(['dailyListing' => $details]);?>
|
||||
<pagebreak />
|
||||
<h2>Részletek</h2>
|
||||
<?php echo TotalDetailedTicketsWidget::widget(['dailyListing' => $details]);?>
|
||||
<?php echo TotalDetailedProductsWidget::widget(['dailyListing' => $details]);?>
|
||||
<?php echo TotalDetailedMoneyMovementWidget::widget(['dailyListing' => $details]);?>
|
||||
<pagebreak />
|
||||
<h2>Címletek</h2>
|
||||
<?php echo BankNotesWidget::widget(['model' => $model]);?>
|
||||
|
||||
</div>
|
||||
<?php }else{?>
|
||||
<pagebreak />
|
||||
<h2>Címletek</h2>
|
||||
<?php echo BankNotesWidget::widget(['model' => $model]);?>
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
41
common/views/total/total_detailed_money_movement.php
Normal file
41
common/views/total/total_detailed_money_movement.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<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 ($model->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 \Yii::$app->formatter->asInteger( $p['signed_money'])?> Ft</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ( count($model->moneyMovements ) == 0 ) {
|
||||
?>
|
||||
Nincs találat
|
||||
<?php
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo \Yii::$app->formatter->asInteger( $model->moneyMovementMoneis); ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
51
common/views/total/total_detailed_product.php
Normal file
51
common/views/total/total_detailed_product.php
Normal file
@@ -0,0 +1,51 @@
|
||||
<?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 ($model->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 \Yii::$app->formatter->asInteger( $p['product_money'])?> FT</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ( count($model->products ) == 0 ) {
|
||||
?>
|
||||
Nincs találat
|
||||
<?php
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo \Yii::$app->formatter->asInteger( $model->productMoney); ?> Ft
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
46
common/views/total/total_detailed_ticket.php
Normal file
46
common/views/total/total_detailed_ticket.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<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 ($model->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 \Yii::$app->formatter->asInteger( $t['ticket_money'])?> FT</td>
|
||||
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if ( count($model->tickets ) == 0 ) {
|
||||
?>
|
||||
Nincs találat
|
||||
<?php
|
||||
}else{?>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right" style="text-decoration: underline;">
|
||||
Összesen: <?php echo \Yii::$app->formatter->asInteger( $model->ticketMoney); ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
1
common/views/total/total_difference.php
Normal file
1
common/views/total/total_difference.php
Normal file
@@ -0,0 +1 @@
|
||||
<?php
|
||||
26
common/views/total/total_medium_money_movement.php
Normal file
26
common/views/total/total_medium_money_movement.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<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 ( $model->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 \Yii::$app->formatter->asInteger( $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 \Yii::$app->formatter->asInteger( $model->moneyMovementMoneis); ?> Ft
|
||||
</div>
|
||||
</div>
|
||||
|
||||
45
common/views/total/total_medium_product.php
Normal file
45
common/views/total/total_medium_product.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
foreach ( $model->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 \Yii::$app->formatter->asInteger( $p['product_money'])?> FT</td>
|
||||
</tr>
|
||||
|
||||
<?php }?>
|
||||
<tr class="warning">
|
||||
<td><?php echo "Összesen" ?></td>
|
||||
<td><?php ?></td>
|
||||
<td class='money'><?php echo \Yii::$app->formatter->asInteger( $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 \Yii::$app->formatter->asInteger( $model->productsByCategory ['total']);
|
||||
?> Ft
|
||||
</div>
|
||||
</div>
|
||||
27
common/views/total/total_medium_ticket.php
Normal file
27
common/views/total/total_medium_ticket.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<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 ( $model->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 \Yii::$app->formatter->asInteger( $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 \Yii::$app->formatter->asInteger( $model->ticketMoney); ?> Ft
|
||||
|
||||
</div>
|
||||
</div>
|
||||
46
common/views/total/totaleasy.php
Normal file
46
common/views/total/totaleasy.php
Normal file
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
use common\components\RoleDefinition;
|
||||
use yii\helpers\Html;
|
||||
use yii\helpers\Url;
|
||||
?>
|
||||
|
||||
<?php
|
||||
//echo $this->render('_list_pdf_head',[ 'searchModel' =>$model, 'label' => 'Napi bevételek - Egyszerű','type' =>'easy']);
|
||||
?>
|
||||
|
||||
<h2>Egyszerű összesítés</h2>
|
||||
<?php
|
||||
|
||||
// if ( !isset($model->output) ){
|
||||
|
||||
// $pdfUrl = Url::current([ Html::getInputName($model, 'output') => 'pdf']);
|
||||
// echo Html::a("Teljes PDF letöltése", $pdfUrl,['class' => 'btn btn-primary btn-all' ]);
|
||||
|
||||
// $pdfUrl = Url::current([ Html::getInputName($model, 'output') => 'pdf', Html::getInputName($model, '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 \Yii::$app->formatter->asInteger( $model->ticketMoney)?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Termékek</th>
|
||||
<td class="money"><?php echo \Yii::$app->formatter->asInteger( $model->productMoney)?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Pénzmozgások</th>
|
||||
<td class="money"><?php echo \Yii::$app->formatter->asInteger( $model->moneyMovementMoneis)?> FT</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Végösszeg bruttó</th>
|
||||
<td class="money"><span style='border-bottom: 1px solid black'><?php echo \Yii::$app->formatter->asInteger( $model->total)?> FT</span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user