add contract
This commit is contained in:
@@ -101,6 +101,7 @@ td,th{
|
||||
<tr>
|
||||
<th>T</th>
|
||||
<th>Kiadva</th>
|
||||
<th>F. mód</th>
|
||||
<th>Fizetve</th>
|
||||
<th>Kassza</th>
|
||||
<th>Felhasználó</th>
|
||||
@@ -117,6 +118,7 @@ td,th{
|
||||
<tr>
|
||||
<td><?php echo "#".$p['id_transfer']?> </td>
|
||||
<td><?php echo $p['product_created_at']?> </td>
|
||||
<td><?php echo Transfer::toPaymentMethodName( $p['transfer_payment_method'] )?> </td>
|
||||
<td><?php echo $p['product_paid_at']?> </td>
|
||||
<td><?php echo $p['account_name']?> </td>
|
||||
<td><?php echo $p['user_name']?> </td>
|
||||
|
||||
13
frontend/views/transfer/_user_cart_item.php
Normal file
13
frontend/views/transfer/_user_cart_item.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md4">
|
||||
<?php echo $model->objectName;?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md4">
|
||||
<?php echo $model->transferTypeName;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3,6 +3,7 @@ use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
use yii\widgets\ListView;
|
||||
use yii\base\Widget;
|
||||
use common\models\Transfer;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel common\models\TransferSearch */
|
||||
@@ -66,8 +67,9 @@ td.name {
|
||||
<table class="table table-bordered table-striped table-summary">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tranzakció</th>
|
||||
<th>ID</th>
|
||||
<th>Kiadva</th>
|
||||
<th>F. mód</th>
|
||||
<th>Fizetve</th>
|
||||
<th>Kassza</th>
|
||||
<th>Felhasználó</th>
|
||||
@@ -84,6 +86,7 @@ td.name {
|
||||
<tr>
|
||||
<td><?php echo "#".$p['id_transfer']?> </td>
|
||||
<td><?php echo ( $p['product_created_at'])?> </td>
|
||||
<td><?php echo Transfer::toPaymentMethodName( $p['transfer_payment_method'] )?> </td>
|
||||
<td><?php echo $p['product_paid_at']?> </td>
|
||||
<td><?php echo $p['account_name']?> </td>
|
||||
<td><?php echo $p['user_name']?> </td>
|
||||
|
||||
90
frontend/views/transfer/usercart.php
Normal file
90
frontend/views/transfer/usercart.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
use yii\data\ArrayDataProvider;
|
||||
use yii\widgets\ListView;
|
||||
use yii\base\Widget;
|
||||
use yii\grid\GridView;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\helpers\Html;
|
||||
use common\models\Transfer;
|
||||
use yii\grid\CheckboxColumn;
|
||||
use frontend\assets\TransferUserCartAsset;
|
||||
?>
|
||||
<?php
|
||||
TransferUserCartAsset::register($this);
|
||||
|
||||
$options = [];
|
||||
|
||||
$this->registerJs ( 'new TransferUserCart( '. json_encode($options).');' );
|
||||
$dp = new ArrayDataProvider(
|
||||
[
|
||||
'allModels' => $model->transfers,
|
||||
'pagination' => false
|
||||
|
||||
]
|
||||
);
|
||||
|
||||
?>
|
||||
<h1>Kosár</h1>
|
||||
<div class="transfer-form">
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
<?php echo $form->field($model, 'payment_method')->dropDownList( ['' => 'Aktuális'] + Transfer::paymentMethods())->label("Fizetése mód") ?>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<span>Összesen:</span>
|
||||
<span class="selected-money"><?php echo $model->money ?></span>
|
||||
<span> Ft</span>
|
||||
<?php echo $form->field($model, "money" , [ ])->hiddenInput(); ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
$formModel = $model;
|
||||
|
||||
echo GridView::widget([
|
||||
"dataProvider" => $dp,
|
||||
'columns' =>[
|
||||
[
|
||||
'label' => '',
|
||||
'value' => function ($model, $key, $index, $column) use (&$form, &$formModel){
|
||||
|
||||
return Html::checkbox(Html::getInputName($formModel, 'selected[]') , in_array($model->id_transfer, $formModel->selected) , [ 'data-money' => $model->money, 'class' => 'cart-item', 'value' => $model->id_transfer] );
|
||||
},
|
||||
'format' => 'raw'
|
||||
],
|
||||
[
|
||||
'value' => 'transferTypeName',
|
||||
'label' => 'Típus'
|
||||
],
|
||||
[
|
||||
'value' => 'objectName',
|
||||
'label' => 'Megnevezés'
|
||||
],
|
||||
[
|
||||
'value' => 'item_price',
|
||||
'label' => 'Egység ár'
|
||||
],
|
||||
[
|
||||
'value' => 'count',
|
||||
'label' => 'Mennyiség'
|
||||
],
|
||||
[
|
||||
'value' => 'money',
|
||||
'label' => 'Összesen'
|
||||
],
|
||||
[
|
||||
'value' => 'paymentMethodName',
|
||||
'label' => 'Fizetési mód'
|
||||
],
|
||||
]
|
||||
]);
|
||||
|
||||
|
||||
?>
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton( "Kiválasztott elemek fizetve", ['class' => 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
</div>
|
||||
Reference in New Issue
Block a user