add frontend collection
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use frontend\components\TransferTotalWidget;
|
||||
use frontend\components\AccountStatisticWidget;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
@@ -20,10 +21,10 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<dd><?php echo isset($model->lastCollection) ? Yii::$app->formatter->asDatetime($model->lastCollection->end) : Yii::t('frontend/collection', "No collection found") ?></dd>
|
||||
|
||||
<dt><?= Yii::t('frontend/collection', "Start of interval")?></dt>
|
||||
<dd><?php echo Yii::$app->formatter->asDatetime($model->timestampStart) ?></dd>
|
||||
<dd><?php echo Yii::$app->formatter->asDatetime($model->timestampStart,'yyyy-MM-dd HH:mm:ss') ?> (inkluzív)</dd>
|
||||
|
||||
<dt><?= Yii::t('frontend/collection', "End of interval")?></dt>
|
||||
<dd><?php echo Yii::$app->formatter->asDatetime($model->timestampEnd) ?></dd>
|
||||
<dd><?php echo Yii::$app->formatter->asDatetime($model->timestampEnd,'yyyy-MM-dd HH:mm:ss') ?> (exkluzív)</dd>
|
||||
</dl>
|
||||
|
||||
<p>
|
||||
@@ -31,78 +32,23 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= Html::a(Yii::t('frontend/collection', 'Select another account'), ['select-account' ], ['class' => 'btn btn-primary']) ?>
|
||||
</p>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-4'>
|
||||
<?php
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['created_at'],
|
||||
'panelHeading' => 'Kiadva',
|
||||
]
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['created_at_paid'],
|
||||
'panelHeading' => 'Kiadva/fizetve',
|
||||
]
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['created_at_not_paid'],
|
||||
'panelHeading' => 'Kiadva/nem fizetve (Hitel)',
|
||||
'panel-type' => 'panel-danger'
|
||||
]
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div class='row'>
|
||||
<div class='col-md-4'>
|
||||
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php
|
||||
if ( $model->userCartTotal > 0){
|
||||
?>
|
||||
<p class="bg-danger">
|
||||
Figyelem! A recepció kassza tartalmaz még fizetetlen elemeket!
|
||||
</p>
|
||||
<?php
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['paid_at_not_created_at'],
|
||||
'panelHeading' => 'Adósság (Hitel)/Fizetve' ,
|
||||
]
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-md-4'>
|
||||
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
<?php
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['paid_at'],
|
||||
'panelHeading' => 'Fizetve' ,
|
||||
'panel-type' => 'panel-success'
|
||||
]
|
||||
]);
|
||||
?>
|
||||
</div>
|
||||
<div class='col-md-4'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo AccountStatisticWidget::widget([
|
||||
'totals' => $model->totals
|
||||
]);
|
||||
?>
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use common\components\AccountTotalWidget;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel frontend\models\CollectionSearch */
|
||||
@@ -19,15 +20,42 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?= Html::a(Yii::t('frontend/collection', 'Create Collection'), ['select-account'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 ">
|
||||
<?php
|
||||
echo AccountTotalWidget::widget([
|
||||
'statistic' => $searchModel->totals
|
||||
])?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'columns' => [
|
||||
'id_collection',
|
||||
'id_user',
|
||||
'id_account',
|
||||
'money',
|
||||
'start:datetime',
|
||||
'end:datetime',
|
||||
[
|
||||
'attribute' => 'id_user',
|
||||
'value' => 'userName',
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_account',
|
||||
'value' => 'accountName',
|
||||
],
|
||||
'money:integer',
|
||||
[
|
||||
'attribute' => 'start',
|
||||
'value' => function($model){
|
||||
return Yii::$app->formatter->asDatetime($model->start,'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
],
|
||||
[
|
||||
'attribute' => 'end',
|
||||
'value' => function($model){
|
||||
return Yii::$app->formatter->asDatetime($model->end,'yyyy-MM-dd HH:mm:ss');
|
||||
}
|
||||
],
|
||||
'created_at:datetime',
|
||||
|
||||
['class' => 'yii\grid\ActionColumn',
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
use frontend\components\AccountStatisticWidget;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Collection */
|
||||
|
||||
$this->title = $model->id_collection;
|
||||
$this->title = Yii::t('frontend/collection','Reception collection') . ' #'. $model->id_collection;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/collection', 'Collections'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
@@ -34,4 +35,11 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?php
|
||||
echo AccountStatisticWidget::widget([
|
||||
'totals' => $totals
|
||||
]);
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user