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);
$this->registerJs($this->render('_script-by-template.js')); $detailFunc = function ($model, $key) { $result = Html::activeHiddenInput($model, "[{$key}]id", ['data-field' => 'id']); $result .= Html::tag('td', Html::tag('span', Html::getAttributeValue($model, "[{$key}]es[name]"), ['data-field' => 'name'])); $result .= Html::tag('td', Html::activeTextInput($model, "[{$key}]amount", ['data-field' => 'amount', 'class' => 'form-control'])); $result .= Html::tag('td', Html::tag('a', '<i class="fa fa-minus"></i>'), ['data-action' => 'delete']); return $result; }; ?> <div class="col-lg-12 no-padding no-margin"> <table class="table table-hover" id="table-templates"> <thead> <tr> <th>Template</th> <th>Amount</th> <th style="width: 5%">#</th> </tr> <tr> <th><input type="hidden" id="inp-template-id"> <input class="form-control" id="inp-template"></th> <th><input class="form-control" id="inp-amount"></th> <th ><a class="btn btn-default text-green" id="add-template"><i class="fa fa-plus"></i></a></th> </tr> </thead> <?php echo TabularInput::widget(['id' => 'template-grid', 'allModels' => $templates, 'model' => GlTemplate::className(), 'tag' => 'tbody', 'itemOptions' => ['tag' => 'tr'], 'itemView' => $detailFunc, 'clientOptions' => []]); ?> </table> </div>
<thead> <tr> <th style="width: 5%">#</th> <th style="width: 10%"> Number </th> <th> Vendor </th> <th class="items" style="width: 10%"> Date </th> <th class="items" style="width: 10%"> Time to Due </th> <th style="width: 10%;"> Invoice Value </th> <th style="width: 10%;"> Payment Value </th> <th class="items" style="width: 20%"> Sisa </th> </tr> </thead> <?php echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $model->items, 'model' => PaymentDtl::className(), 'tag' => 'tbody', 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail_view', 'clientOptions' => []]); ?> </table>
<div class="detail-pane-body col-lg-12"> <table class="tabular table-striped"> <thead> <th class="col-lg-4">Product</th> <th class="col-lg-1">Qty Trans</th> <?php if (!$model->isNewRecord) { ?> <th class="col-lg-1">Issued</th> <th class="col-lg-1">Received</th> <?php } ?> <th class="col-lg-2">Uom</th> <th class="col-lg-1"> </th> </thead> <?php echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $details, 'modelClass' => TransferDtl::className(), 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail', 'clientOptions' => []]); ?> </table> </div> </div> <div class="tab-pane col-lg-12" id="delivery-pane"> <div class="box box-solid"> <?php echo ListView::widget(['dataProvider' => $gmovement, 'layout' => '{items}', 'itemView' => '_gissue']); ?> </div> </div> </div> </div>
</div> <table class ="table table-striped" id="tbl-glheader"> <thead> <tr> <th>No</th> <th>Account</th> <th>Debit</th> <th>Credit</th> <th><a class="fa fa-plus-square" href="#" data-action="append"> <span class="glyphicon glyphicon-plus"></span> </a> </th> </tr> </thead> <?php echo TabularInput::widget(['id' => 'tbl-gldetail', 'allModels' => $model->glDetails, 'itemView' => '_detail', 'modelClass' => GlDetail::className(), 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'clientOptions' => ['afterAddRow' => new yii\web\JsExpression('biz.config.glAfterAddRow')]]); ?> </table> <div class="panel-footer"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end(); ?> </div> <?php yii\jui\AutoCompleteAsset::register($this);
<?php use yii\web\JsExpression; use yii\jui\AutoComplete; use mdm\widgets\TabularInput; ?> <div class="box box-info"> <div class="box-header"> <div class="form-group" style="padding: 15px;"> <label for="product">Product :</label> <?php echo AutoComplete::widget(['name' => 'product', 'id' => 'product', 'clientOptions' => ['source' => new JsExpression('yii.global.sourceProduct'), 'select' => new JsExpression('yii.pos.onSelectProduct'), 'delay' => 500], 'options' => ['class' => 'form-control']]); ?> </div> <div class="box-body" style="text-align: right; padding-top: 0px; padding-bottom: 0px;"> <input type="hidden" id="h-total-price"><h2>Rp<span id="total-price"></span></h2> </div> </div> <table id="detail-grid" class="table table-striped no-padding" style="padding: 0px;"> <?php echo TabularInput::widget(['id' => 'detail-grid', 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail', 'clientOptions' => ['initRow' => new JsExpression('yii.standart.initRow')]]); ?> </table> </div>
<div class="row"> <div class="col-md-6"> <div class="form-group field-sales-value required"> <label class="control-label">Value</label> <input type="text" style="width:40%;" readonly="" class="form-control" id="payment-value"> </div> <table class="table table-striped"> <thead> <tr> <th><?php echo Html::dropDownList('', null, Payment::enums('METHOD_'), ['class' => 'form-control', 'id' => 'inp-payment-method']); ?> </th> <th><input class="form-control" id="inp-payment-value"></th> <th><a class="btn" id="add-payment"><span class="glyphicon glyphicon-plus"></span></a></th> </tr> </thead> </table> </div> <div class="col-md-6"> <div class="form-group field-sales-value required"> <label class="control-label">Total</label> <input type="text" style="width:40%;" readonly="" class="form-control" id="payment-total"> </div> <table class="table table-striped"> <?php echo TabularInput::widget(['id' => 'payment-grid', 'allModels' => $payments, 'model' => Payment::className(), 'tag' => 'tbody', 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_payment_detail', 'clientOptions' => []]); ?> </table> </div> </div>
?> </th> <th class="items" style="width: 10%"> Qty Trans </th> <th style="width: 10%"> Uom </th> <th style="width: 10%"> Total Line </th> </tr> </thead> <tbody> <?php echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $model->items, 'viewParams' => ['is_issue' => $model->type == $model::TYPE_ISSUE], 'model' => GoodsMovementDtl::className(), 'tag' => 'tbody', 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail', 'clientOptions' => []]); ?> </tbody> </table> <!-- Modal --> <div class="modal fade" id="listPO" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title" id="myModalLabel">Modal title</h4> </div> <div class="modal-body"> ... </div>
\$row.find('.nm_account').autocomplete({ source: biz.master.coas, select: function (event, ui) { var \$row = \$(event.target).closest('tr'); \$row.find('.id_account').val(ui.item.id); \$row.find('.cd_account').text(ui.item.cd_coa); \$row.find('.nm_account').val(ui.item.value); return false; } }); } JS; ?> <?php echo TabularInput::widget(['id' => 'tbl-gldetail', 'allModels' => $model->glDetails, 'itemView' => '_detail', 'modelClass' => GlDetail::className(), 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'clientOptions' => ['afterAddRow' => new yii\web\JsExpression($jsFunc), 'btnAddSelector' => '#append-row']]); ?> </table> <div class="panel-footer"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> </div> <?php ActiveForm::end(); ?> </div> <?php yii\jui\AutoCompleteAsset::register($this);
<table class="table table-hover"> <?php $inputArea = Html::beginTag('thead'); $inputArea .= Html::beginTag('tr'); $inputArea .= Html::tag('th', 'Code', ['style' => 'width:20%;']); $inputArea .= Html::tag('th', 'Account Name'); $inputArea .= Html::tag('th', 'Debit', ['style' => 'width:16%;']); $inputArea .= Html::tag('th', 'Credit', ['style' => 'width:16%;']); $inputArea .= $model_journal->isNewRecord ? Html::tag('th', '#', ['style' => 'width:5%;']) : ''; $inputArea .= Html::endTag('tr'); if ($model_journal->isNewRecord) { $inputArea .= Html::beginTag('tr'); $inputArea .= '<td colspan="2"> <div class="input-group" style="width: 100%; z-index: "> <div class="input-group-btn"> <button type="button" class="btn btn-default" id="selected_type"><i class="fa fa-search"></i></button>--> </div> <input id="dname" data-field="item_search" class="form-control" placeholder="Search Account.."> </div> </td>'; $inputArea .= Html::endTag('tr'); } $inputArea .= Html::endTag('thead'); echo $inputArea; ?> <?php echo TabularInput::widget(['id' => 'detail-grid-journal', 'allModels' => $model_journal->glDetails, 'model' => GlDetail::className(), 'tag' => 'tbody', 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail_journal', 'clientOptions' => []]); ?> </table>
?> <?php echo $form->field($model, 'description')->textInput(); ?> <table style="width: 98%"> <thead> <tr> <th style="width: 40%">Akun</th> <th>Debit</th> <th>Kredit</th> </tr> </thead> <?php echo TabularInput::widget(['id' => 'gl-detail', 'allModels' => $model->glDetails, 'modelClass' => GlDetail::className(), 'itemView' => '_detail', 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'viewParams' => ['form' => $form]]); ?> </table> <div class="form-group"> <?php echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']); ?> </div> <?php ActiveForm::end(); ?> </div> <?php $url = \yii\helpers\Url::toRoute(['create']);
if ($allow_edit) { ?> <th class="col-lg-2">Sub Total</th> <th class="col-lg-1"> </th> <?php } else { ?> <th class="col-lg-3">Sub Total</th> <?php } ?> </thead> <?php echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $model->salesDtls, 'modelClass' => SalesDtl::className(), 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail', 'clientOptions' => [], 'viewParams' => ['parent' => $model]]); ?> </table> <?php echo Html::activeHiddenInput($model, 'value', ['id' => 'sales-value']); ?> </div> </div> <div class="tab-pane col-lg-12" id="delivery-pane"> <div class="box box-solid"> <?php echo ListView::widget(['dataProvider' => new ActiveDataProvider(['query' => $model->getGis()]), 'layout' => '{items}', 'itemView' => '_greceipt']); ?> </div> </div> <div class="tab-pane col-lg-12" id="payments-pane">