add reception collection basics
This commit is contained in:
50
frontend/views/collection/_create_select_account.php
Normal file
50
frontend/views/collection/_create_select_account.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use frontend\components\HtmlHelper;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Collection */
|
||||
|
||||
$this->title = Yii::t('frontend/collection', 'Create Collection - Select Account');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/collection', 'Collections'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
$accountOptions = HtmlHelper::mkAccountOptions($model->accounts);
|
||||
|
||||
?>
|
||||
<div class="collection-create select-account">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<div class="collection-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(
|
||||
[
|
||||
'method' => 'post',
|
||||
'action' => ['collection/select-account'],
|
||||
]
|
||||
|
||||
); ?>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<?= $form->field($model, 'id_account')->dropDownList($accountOptions) ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton( Yii::t('frontend/collection', 'Next') ,['class' =>'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -2,26 +2,23 @@
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use frontend\components\HtmlHelper;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Collection */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<div class="collection-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
|
||||
<?= $form->field($model, 'id_account')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'money')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'start')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'end')->textInput() ?>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('frontend/collection', 'Create') : Yii::t('frontend/collection', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use frontend\components\TransferTotalWidget;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
@@ -15,13 +16,41 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<dl class='dl-horizontal'>
|
||||
<dt>Utolsó zárás</dt>
|
||||
<dd>asdf</dd>
|
||||
<dt></dt>
|
||||
<dd></dd>
|
||||
<dt></dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
<dt><?= Yii::t('frontend/collection', "Last collection")?></dt>
|
||||
<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->start) ?></dd>
|
||||
|
||||
<dt><?= Yii::t('frontend/collection', "End of interval")?></dt>
|
||||
<dd><?php echo Yii::$app->formatter->asDatetime($model->end) ?></dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['paid_at'],
|
||||
'panelHeading' => 'Fizetve' ,
|
||||
]
|
||||
]);
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['created_at'],
|
||||
'panelHeading' => 'Kiadva',
|
||||
]
|
||||
]);
|
||||
echo TransferTotalWidget::widget([
|
||||
'options' => [
|
||||
'statistic' => $model->totals['created_at_paid'],
|
||||
'panelHeading' => 'Kiadva és fizetve',
|
||||
]
|
||||
]);
|
||||
|
||||
|
||||
|
||||
?>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
|
||||
@@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('frontend/collection', 'Create Collection'), ['create'], ['class' => 'btn btn-success']) ?>
|
||||
<?= Html::a(Yii::t('frontend/collection', 'Create Collection'), ['select-account'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
|
||||
Reference in New Issue
Block a user