add transfer-moneymovement

This commit is contained in:
2015-10-19 17:22:50 +02:00
parent ab40f937a3
commit 71384b6453
12 changed files with 341 additions and 71 deletions

View File

@@ -0,0 +1,29 @@
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\Transfer */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="transfer-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'id_object')->textInput() ?>
<?= $form->field($model, 'item_price')->textInput() ?>
<?= $form->field($model, 'money')->textInput() ?>
<?= $form->field($model, 'comment')->textInput(['maxlength' => true]) ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? Yii::t('frontend/transfer', 'Create') : Yii::t('frontend/transfer', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>

View File

@@ -0,0 +1,21 @@
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\Transfer */
$this->title = Yii::t('frontend/transfer', 'Create Money Movement');
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/transfer', 'Transfers'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="transfer-create">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form_money_movement', [
'model' => $model,
]) ?>
</div>

View File

@@ -0,0 +1,46 @@
<?php
use yii\helpers\Html;
use yii\grid\GridView;
/* @var $this yii\web\View */
/* @var $searchModel common\models\TransferSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$this->title = Yii::t('frontend/transfer', 'Transfers');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="transfer-index">
<h1><?= Html::encode($this->title) ?></h1>
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<?= Html::a(Yii::t('frontend/transfer', 'Create Money Movement'), ['money-movement-create'], ['class' => 'btn btn-success']) ?>
</p>
<?= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
'id_transfer',
'id_discount',
'id_currency',
'id_object',
'status',
// 'type',
// 'item_price',
// 'count',
// 'money',
// 'money_currency',
// 'rate',
// 'id_user',
// 'comment',
// 'created_at',
// 'updated_at',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
</div>