sell product list

This commit is contained in:
2015-10-05 17:24:26 +02:00
parent 203dfeac72
commit 2610749305
15 changed files with 373 additions and 40 deletions

View File

@@ -69,6 +69,7 @@ $discountOptions = mkOptions( ArrayHelper::map($discounts, 'id_discount', 'name'
]
); ?>
<?php echo Html::activeHiddenInput($model, 'id_product') ?>
<?php echo Html::activeHiddenInput($model, 'append_to_sold_list') ?>
<div class="row">
<div class='col-md-12'>

View File

@@ -5,7 +5,8 @@ use yii\bootstrap\Html;
<div class="row">
<div class='col-md-12'>
<div class='col-md-12 '>
<div class="sold-items-container">
<table class="table table-bordered table-striped">
<thead>
<tr>
@@ -29,5 +30,6 @@ use yii\bootstrap\Html;
<tbody>
</tbody>
</table>
</div>
</div>
</div>

View File

@@ -1,6 +1,6 @@
<?php
?>
<table class="table table-bordered table-striped">
<table class="table table-bordered table-striped table-product">
<tbody>
<tr>
<th>

View File

@@ -18,11 +18,11 @@ ProductSellAsset::register($this);
$options = [];
$options['lookup_product_url'] = Url::toRoute(['product/lookup']);
$options['sold_items'] = $userTransfers;
$this->registerJs ( 'new ProductSell( '. json_encode($options).');' );
?>
<style>
@@ -49,12 +49,14 @@ $this->registerJs ( 'new ProductSell( '. json_encode($options).');' );
<?php echo ReceptionCardNumberWidget::widget( [ 'customer' => $customer, 'card' =>$card, 'route' => ['product/sale'] ] )?>
</div>
</div>
<h1><?php echo Yii::t('frontend/product','Sell product')?></h1>
<div class='row '>
<div class='col-md-6 product-form'>
<h1><?php echo Yii::t('frontend/product','Sell product')?></h1>
<?php echo $this->render('_sale_form' ,['model' =>$model , 'lookupModel' =>$lookupModel, 'currencies' => $currencies, 'accounts' => $accounts,'discounts' => $discounts,]) ?>
</div>
<div class='col-md-6'>
<h1><?php echo Yii::t('frontend/product','Sold')?></h1>
<?php echo $this->render('_sold_items' ) ?>
<?php echo Html::a(Yii::t('frontend/product', "Paid"),null,[ 'class' => 'btn btn-primary' ]) ?>
</div>
</div>