add display money to account state close, delete ticket on customer tickets

This commit is contained in:
2016-01-10 15:25:25 +01:00
parent 5a98d128bc
commit 7c584a0779
21 changed files with 291 additions and 19 deletions

View File

@@ -7,6 +7,7 @@ use frontend\components\HtmlHelper;
/* @var $this yii\web\View */
/* @var $model common\models\AccountState */
/* @var $form yii\widgets\ActiveForm */
/* @var $lastCassaState common\models\AccountState */
?>
@@ -57,7 +58,6 @@ use frontend\components\HtmlHelper;
<div class="form-group">
<?= Html::submitButton( Yii::t('frontend/account-state', 'Close account'), ['class' => 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -22,6 +22,7 @@ $this->registerJs ( 'new AccountState( '. json_encode($options).');' );
<?= $this->render('_form_close', [
'model' => $model,
'accounts' => $accounts,
'lastCassaState' => $lastCassaState,
]) ?>
</div>

View File

@@ -8,11 +8,25 @@ use frontend\components\ReceptionTicketWidget;
use frontend\components\ReceptionCustomerWidget;
use yii\widgets\ActiveForm;
use yii\helpers\Html;
/** @var $model frontend\models\ReceptionForm */
?>
<?php
$alertClass = "info";
$cassaMessage = "Nyitva";
if ( $model->isCassaClose() ){
$alertClass = "danger";
$cassaMessage = "Zárva";
}else if ( !$model->hasCassa() ){
$alertClass = "danger";
$cassaMessage = "Nincs kassza kiválasztva";
}
?>
<div class='row'>
<div class='col-md-4'>
<div class="alert alert-info">
Aktuális kassza: <?php echo $model->getDefaultAccountName();?>
<div class="alert alert-<?php echo $alertClass;?>">
Aktuális kassza: <?php echo $model->getDefaultAccountName();?> -
<?php echo $cassaMessage;?>
</div>
</div>
<?php $form = ActiveForm::begin([

View File

@@ -32,6 +32,10 @@ $this->params['breadcrumbs'][] = $this->title;
'name',
'money',
'created_at:datetime',
[
'attribute' => 'comment',
'format' => 'html'
],
['class' => 'yii\grid\ActionColumn',
'template' => '{view}'

View File

@@ -59,11 +59,9 @@ $this->params['breadcrumbs'][] = $this->title;
*/
'price_brutto',
'created_at:datetime',
/*
['class' => 'yii\grid\ActionColumn',
'template' =>'{view} {update}',
'template' =>'{delete}',
],
*/
],
]); ?>

View File

@@ -3,9 +3,11 @@ use yii\helpers\Html;
use yii\grid\GridView;
use yii\widgets\ListView;
use yii\base\Widget;
use yii\helpers\Url;
use common\components\Helper;
/* @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' );
@@ -82,10 +84,31 @@ td.name{
</tr>
<tr>
<th>Végösszeg</th>
<td class="money"><span style='border-bottom: 1px solid black'><?php echo $searchModel->total?> FT</span></td>
<td class="money"><span style='border-bottom: 1px solid black'><?php echo \Yii::$app->formatter->asInteger($searchModel->total)?> FT</span></td>
</tr>
</tbody>
</table>
<?php if ( $searchModel->isModeReception() && Helper::isAccountStateClosePreloadMoney()){?>
<h2>Aktuális záró összeg</h2>
<table class="table table-bordered table-striped table-summary">
<tbody>
<tr>
<th>Kasszanyitás</th>
<td class="money"><span style=' '><?php echo isset($searchModel->cassaOpen) ? \Yii::$app->formatter->asInteger( $searchModel->cassaOpen->money ) : ""?> FT</span></td>
</tr>
<tr>
<th>Végösszeg</th>
<td class="money"><span style=' '><?php echo \Yii::$app->formatter->asInteger($searchModel->total)?> FT</span></td>
</tr>
<tr>
<th>Kasszában lévő összeg</th>
<td class="money"><span style='border-bottom: 1px solid black'><?php echo \Yii::$app->formatter->asInteger( $searchModel->totalWithCassa ) ?> FT</span></td>
</tr>
</tbody>
</table>
<?php echo Html::a("Ugrás kassza zárásra",Url::toRoute([ 'account-state/close', 'money' => $searchModel->totalWithCassa ]), ['class' =>'btn btn-primary'])?>
<?php }?>
</div>
<div role="tabpanel" class="tab-pane" id="medium">
<h2>Közepes összesítés</h2>
@@ -351,6 +374,7 @@ td.name{
<th>Név</th>
<th>Típus</th>
<th>Összeg</th>
<th>Megjegyzés</th>
</tr>
</thead>
<tbody>
@@ -362,6 +386,7 @@ td.name{
<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>
<td><?php echo $p['money_movement_comment'] ?></td>
</tr>
<?php } ?>