예제 #1
0
                if(\$tr.next().length > 0){
                    \$tr.next().children().eq(\$td.index()).find('input').focus();
                }
            break;
            // up
            case 38:
                if(\$tr.prev().length > 0){
                    \$tr.prev().children().eq(\$td.index()).find('input').focus();
                }
            break;
            // left
            case 37:
                if(\$td.index() > 3){
                    \$td.prev().find('input').focus();
                }
            break;
            // right
            case 39:
                if(\$td.next().length > 0){
                    \$td.next().find('input').focus();
                }
            break;
        }
    });
    \$('input.price').focus(function(){
        \$(this).select();
    });
JS;
$this->registerJs($js);
app\assets\BizWidget::widget(['config' => [], 'scripts' => [View::POS_END => $this->render('_script'), View::POS_READY => 'biz.price.onReady();']]);
예제 #2
0
/* @var $form yii\widgets\ActiveForm */
/* @var $model Sales */
?>

<div class="sales-hdr-form">
    <?php 
$form = ActiveForm::begin(['id' => 'sales-form']);
?>
    <?php 
$models = $model->salesDtls;
$models[] = $model;
echo $form->errorSummary($models);
?>
    
    <div class="col-lg-12">
        <?php 
echo $this->render('_header', ['form' => $form, 'model' => $model]);
?>
    </div>
    <div class="col-lg-12">
        <?php 
echo $this->render('_detail', ['model' => $model]);
?>
    </div>
    <?php 
ActiveForm::end();
?>
</div>
<?php 
app\assets\BizWidget::widget(['config' => ['masters' => ['products', 'customers', 'barcodes'], 'storageClass' => new JsExpression('DLocalStorage')], 'scripts' => [View::POS_END => $this->render('_script'), View::POS_READY => 'biz.sales.onReady();']]);
예제 #3
0
  
    <?php 
echo $form->errorSummary($model);
?>
    <?php 
echo !$model->getErrors() ? $form->errorSummary($details) : '';
?>
    <?php 
$models = $details;
$models[] = $model;
echo $form->errorSummary($models);
?>
    
    <section class="col-lg-12">
        <?php 
echo $this->render('_header', ['form' => $form, 'model' => $model, 'config' => isset($config) ? $config : []]);
?>
    </section>
    <section class="col-lg-12">
        <?php 
echo $this->context->action->id == 'view' ? $this->render('_vdetail', ['model' => $model, 'details' => $details]) : $this->render('_detail', ['model' => $model, 'details' => $details]);
?>
    </section>
    <?php 
ActiveForm::end();
?>
</div>

<?php 
app\assets\BizWidget::widget(['scripts' => [View::POS_END => $this->render('_script'), View::POS_READY => 'biz.movement.onReady();']]);
예제 #4
0
                        <?php 
//                        echo ListView::widget([
//                            'dataProvider' => $greceipt,
//                            'layout' => '{items}',
//                            'itemView' => '_greceipt',
//                                //'options' => ['class' => 'box-body']
//                        ]);
?>
                        <?php 
echo yii\grid\GridView::widget(['tableOptions' => ['class' => 'table table-striped'], 'layout' => '{items}', 'dataProvider' => $greceipt, 'columns' => [['class' => 'yii\\grid\\SerialColumn'], ['label' => 'Receipt Number', 'format' => 'raw', 'value' => function ($data) {
    return Html::a($data->number, ['inventory/movement/view', 'id' => $data->id]);
}], 'date:date', ['attribute' => 'warehouse_id', 'value' => 'warehouse.name', 'filter' => Warehouse::selectOptions()], ['attribute' => 'status', 'format' => 'raw', 'filter' => [GoodsMovement::STATUS_DRAFT => 'Draft', GoodsMovement::STATUS_PROCESS => 'Proccess', GoodsMovement::STATUS_CLOSE => 'Closed'], 'value' => function ($data) {
    $color = $data->status == GoodsMovement::STATUS_DRAFT ? 'danger' : 'success';
    $color = $data->status == GoodsMovement::STATUS_PROCESS ? 'info' : $color;
    $color = $data->status == GoodsMovement::STATUS_CLOSE ? 'success' : $color;
    return Html::tag('small', $data->nmStatus, ['class' => 'label label-' . $color]);
}]]]);
?>
                    </div>            
                </div>
                <div class="tab-pane col-lg-12" id="payments-pane">
                    Payments
                </div>
            </div>
        </div>
    </section>
</div>
<?php 
ActiveForm::end();
app\assets\BizWidget::widget(['config' => ['masters' => ['suppliers']], 'scripts' => [View::POS_END => $this->render('_script'), View::POS_READY => 'biz.purchase.onComplete();']]);
예제 #5
0
        <br>
        <?php 
echo $form->field($model, 'code')->textInput(['maxlength' => 16], ['style' => 'width:200px;']);
?>

        <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => 64]);
?>

        <?php 
echo $form->field($model, 'normal_balance')->dropDownList(['D' => 'Debit', 'K' => 'Kredit'], ['style' => 'width:120px;']);
?>

        <?php 
echo '';
?>

    </div>
    <div class="box-footer">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
    <?php 
ActiveForm::end();
?>
</div>

<?php 
app\assets\BizWidget::widget(['config' => ['masters' => ['coa']], 'scripts' => [View::POS_END => $this->render('_script')]]);