87 lines
2.4 KiB
PHP
87 lines
2.4 KiB
PHP
<?php
|
|
|
|
use yii\helpers\Html;
|
|
use yii\widgets\ActiveForm;
|
|
use frontend\components\HtmlHelper;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $model common\models\AccountState */
|
|
/* @var $account common\models\Account the default account */
|
|
/* @var $form yii\widgets\ActiveForm */
|
|
?>
|
|
|
|
<div class="account-state-form">
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<?php echo Html::activeHiddenInput($model, "prev_state") ?>
|
|
|
|
<div class='row'>
|
|
<div class='col-md-8'>
|
|
<div class="form-group field-accountstate-money required">
|
|
<label class="control-label" for="accountstate-money">Kassza</label><br>
|
|
<?php echo ( isset($account) ? $account->name : 'Nincs alapértelmezett kassza kiválasztva!' )?>
|
|
</div>
|
|
|
|
<?php //echo $form->field($model, 'id_account')->dropDownList( HtmlHelper::mkAccountOptions($accounts) ) ?>
|
|
</div>
|
|
<div class='col-md-4'>
|
|
<?= $form->field($model, 'money')->textInput(['class' => 'form-control text-right']); ?>
|
|
</div>
|
|
</div>
|
|
|
|
<?php echo $this->render('_notes',[ 'form' => $form, 'model' => $model])?>
|
|
|
|
<table class="table table-striped">
|
|
<tr>
|
|
<th class="text-left">
|
|
<?php echo $model->getAttributeLabel('money') ?>
|
|
</th>
|
|
<td class="text-right">
|
|
<span class="money "></span> Ft
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="text-left">
|
|
<?php echo Yii::t('frontend/account-state', "Notes total")?>
|
|
</th>
|
|
<td class="text-right">
|
|
<span class="notes-total "></span> Ft
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="text-left">
|
|
<?php echo Yii::t('frontend/account-state', "Difference total")?>
|
|
</th>
|
|
<td class="text-right">
|
|
<span class="diff-total "></span> Ft
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="text-left">
|
|
<?php echo Yii::t("frontend/account-state", "Last closing money")?>
|
|
</th>
|
|
<td class="text-right">
|
|
<span class="last-closing-money "></span> Ft
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th class="text-left">
|
|
<?php echo Yii::t('frontend/account-state', "Difference closing money")?>
|
|
</th>
|
|
<td class="text-right">
|
|
<span class="diff-closing "></span> Ft
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<?= $form->field($model, 'comment')->textarea() ?>
|
|
|
|
<div class="form-group">
|
|
<?= Html::submitButton($model->isNewRecord ? Yii::t('frontend/account-state', 'Create') : Yii::t('frontend/account-state', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|