fitness-web/common/views/account-state/account_state_pdf.php

102 lines
2.9 KiB
PHP

<?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>