예제 #1
0
                </h3>
            </div>
        </div>
    </div>

    <div class="col-lg-8">
        <?php 
echo $this->render('_detail');
?>
        <div>
            <?php 
Html::a('Save', '', ['class' => 'btn btn-primary', 'id' => 'btn-save']);
?>
&nbsp;
            <?php 
Html::a('New Session', '', ['class' => 'btn btn-success', 'id' => 'new-session']);
?>
        </div>
    </div>
    <?php 
echo $this->render('_dialog', ['form' => $form]);
?>
    <?php 
ActiveForm::end();
?>
</div>
<?php 
PosAsset::register($this);
BizDataAsset::register($this, ['master' => [], 'config' => ['pushUrl' => Url::toRoute(['save-pos']), 'newDrawerUrl' => Url::toRoute(['open-new-drawer']), 'checkDrawerUrl' => Url::toRoute(['check-drawer']), 'pullMasterUrl' => Url::toRoute(['masters']), 'delay' => 1000, 'pushInterval' => 10000]]);
$js_ready = '$("#product").data("ui-autocomplete")._renderItem = yii.global.renderItemPos;';
$this->registerJs($js_ready);
예제 #2
0
use yii\jui\AutoComplete;
use biz\inventory\models\TransferDtl;
use mdm\widgets\TabularInput;
use biz\app\assets\BizDataAsset;
use biz\master\components\Helper as MasterHelper;
?>
<div class="box box-info">
    <div class="box-header" style="padding: 10px;">
        Product :
        <?php 
echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('yii.global.sourceProduct'), 'select' => new JsExpression('yii.transfer.onProductSelect'), 'delay' => 100], 'options' => ['class' => 'form-control']]);
?>
    </div>
    <div class="box-body no-padding">
        <table class="table table-striped">
            <?php 
echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $model->transferDtls, 'modelClass' => TransferDtl::className(), 'itemView' => '_item_detail', 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'clientOptions' => ['initRow' => new JsExpression('yii.transfer.initRow')]]);
?>
        </table>
    </div>
</div>

<?php 
$js = $this->render('_script', [], $this->context);
$this->registerJs($js, yii\web\View::POS_END);
BizDataAsset::register($this, ['master' => MasterHelper::getMasters('product, barcode, product_stock')]);
$js_ready = <<<JS
\$("#product").data("ui-autocomplete")._renderItem = yii.global.renderItem;
yii.transfer.onReady();
JS;
$this->registerJs($js_ready);
예제 #3
0
?>
<div class="col-lg-9" style="padding-left: 0px;">
    <div class="panel panel-info">
        <div class="panel-heading">
            Product :
            <?php 
echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('yii.global.sourceProduct'), 'select' => new JsExpression('yii.standart.onProductSelect'), 'delay' => 100]]);
?>
        </div>
        <div class="panel-body" style="text-align: right;">
            <h2>Rp<span id="total-price"></h2></span>
            <?php 
echo Html::activeHiddenInput($model, 'sales_value', ['id' => 'total-price-inp']);
?>
        </div>
        <table class="table table-striped">
            <?php 
echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $model->salesDtls, 'modelClass' => SalesDtl::className(), 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail', 'clientOptions' => ['initRow' => new JsExpression('yii.standart.initRow')]]);
?>
        </table>
    </div>
</div>

<?php 
$js = $this->render('_script', ['price' => $price], $this->context);
$this->registerJs($js, \yii\web\View::POS_END);
BizDataAsset::register($this, ['master' => MasterHelper::getMasters('product, barcode, price, customer'), 'config' => ['price_ct' => $price]]);
$js_ready = <<<JS
yii.standart.onReady();
JS;
$this->registerJs($js_ready);