63 lines
1.7 KiB
PHP
63 lines
1.7 KiB
PHP
<?php
|
|
|
|
use frontend\components\ReceptionMenuWidget;
|
|
use frontend\components\ReceptionCardNumberWidget;
|
|
use yii\helpers\Html;
|
|
use common\models\Product;
|
|
use frontend\assets\ProductSellAsset;
|
|
use yii\helpers\Url;
|
|
use yii\bootstrap\ActiveForm;
|
|
use yii\helpers\ArrayHelper;
|
|
|
|
/* @var $this yii\web\View */
|
|
/* @var $form yii\bootstrap\ActiveForm */
|
|
/* @var $currencies common\models\Currency[] */
|
|
|
|
ProductSellAsset::register($this);
|
|
|
|
$options = [];
|
|
|
|
$options['lookup_product_url'] = Url::toRoute(['product/lookup']);
|
|
$options['sold_items'] = $userTransfers;
|
|
|
|
|
|
$this->registerJs ( 'new ProductSell( '. json_encode($options).');' );
|
|
|
|
?>
|
|
|
|
<style>
|
|
/*
|
|
.product-form input, .product-form select, .product-form textarea{
|
|
width: 100%;
|
|
}
|
|
*/
|
|
.product-count{
|
|
text-align: right;
|
|
}
|
|
|
|
.form-group{
|
|
margin-bottom: 3px;
|
|
}
|
|
|
|
</style>
|
|
|
|
<div class='row'>
|
|
<div class='col-md-3'>
|
|
<?php echo ReceptionMenuWidget::widget( [ 'customer' => $customer, 'card' => $card] ) ?>
|
|
</div>
|
|
<div class='col-md-4'>
|
|
<?php echo ReceptionCardNumberWidget::widget( [ 'customer' => $customer, 'card' =>$card, 'route' => ['product/sale'] ] )?>
|
|
</div>
|
|
</div>
|
|
<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>
|