add changes sell product

This commit is contained in:
2015-10-01 17:31:48 +02:00
parent e3d6c0b902
commit e9f9567618
7 changed files with 323 additions and 144 deletions

View File

@@ -0,0 +1,85 @@
<?php
use yii\helpers\Html;
?>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Product name'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product product-name']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Product price'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product product-price']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Product number'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product product-number']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Barcode'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product barcode']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Count'))?>
</div>
<div class='col-md-6'>
<?php echo Html::textInput('count') ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Currency'))?>
</div>
<div class='col-md-6'>
<?php echo Html::dropDownList('currency',null,[],[]); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Account'))?>
</div>
<div class='col-md-6'>
<?php echo Html::dropDownList('account',null,[],[]); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Discount'))?>
</div>
<div class='col-md-6'>
<?php echo Html::dropDownList('discount',null,[],[]); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Comment'))?>
</div>
</div>
<div class="row">
<div class='col-md-10'>
<?php echo Html::textarea('comment', ''); ?>
</div>
</div>
<div class="row">
<div class='col-md-3'>
<?php echo Html::a(Yii::t("frontend/product","Sell product"),null,['class' => 'btn btn-success'] );?>
</div>
<div class='col-md-7'>
<?php echo Html::a(Yii::t("frontend/product","Sell product and add to total"),null,['class' => 'btn btn-success'] );?>
</div>
</div>

View File

@@ -0,0 +1,64 @@
<?php
use yii\bootstrap\Html;
?>
<div class="row">
<div class='col-md-10'>
<?php echo Html::label(Yii::t('frontend/product', 'Bill'))?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Debit'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag("span",'0,00',['sale', 'sale-debit'])?>
</div>
</div>
<div class="row">
<div class='col-md-12'>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<?php echo Yii::t('frontend/product', 'Product name')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Count')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Currency')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Item Price')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Total Price')?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>

View File

@@ -3,6 +3,20 @@
use frontend\components\ReceptionMenuWidget;
use frontend\components\ReceptionCardNumberWidget;
use yii\helpers\Html;
use common\models\Product;
use frontend\assets\ProductSellAsset;
use yii\helpers\Url;
ProductSellAsset::register($this);
$options = [];
$options['lookup_product_url'] = Url::toRoute(['product/lookup']);
$this->registerJs ( 'new ProductSell( '. json_encode($options).');' );
?>
<style>
@@ -21,160 +35,22 @@ use yii\helpers\Html;
<div class='col-md-4'>
</div>
</div>
<h1><?php echo Yii::t('frontend/product','Sell product')?></h1>
<div class='row'>
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Product'))?>
<?php echo Html::textInput('filter_text')?>
<?php echo Html::textInput('filter_text','', ['id'=>'filter_text'])?>
</div>
<div class='col-md-4'>
</div>
<div class='col-md-4'>
</div>
</div>
<div class='row product-form'>
<div class='col-md-6'>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Product name'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product product-name']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Product price'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product product-price']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Product number'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product product-number']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Barcode'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag('span','',[ 'class' => 'product barcode']); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Count'))?>
</div>
<div class='col-md-6'>
<?php echo Html::textInput('count') ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Currency'))?>
</div>
<div class='col-md-6'>
<?php echo Html::dropDownList('currency',null,[],[]); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Account'))?>
</div>
<div class='col-md-6'>
<?php echo Html::dropDownList('account',null,[],[]); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Discount'))?>
</div>
<div class='col-md-6'>
<?php echo Html::dropDownList('discount',null,[],[]); ?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Comment'))?>
</div>
</div>
<div class="row">
<div class='col-md-10'>
<?php echo Html::textarea('comment', ''); ?>
</div>
</div>
<div class='row '>
<div class='col-md-6 product-form'>
<?php echo $this->render('_sale_form' ) ?>
</div>
<div class='col-md-6'>
<div class="row">
<div class='col-md-10'>
<?php echo Html::label(Yii::t('frontend/product', 'Bill'))?>
</div>
</div>
<div class="row">
<div class='col-md-4'>
<?php echo Html::label(Yii::t('frontend/product', 'Debit'))?>
</div>
<div class='col-md-6'>
<?php echo Html::tag("span",'0,00',['sale', 'sale-debit']) ?>
</div>
</div>
<div class="row">
<div class='col-md-12'>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>
<?php echo Yii::t('frontend/product', 'Product name')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Count')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Currency')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Item Price')?>
</th>
<th>
<?php echo Yii::t('frontend/product', 'Total Price')?>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
</div>
</div>
<?php echo $this->render('_sold_items' ) ?>
</div>
</div>
</div>