/** * @return \yii\db\ActiveQuery */ public function getGlDetails() { return $this->hasMany(GlDetail::className(), ['header_id' => 'id']); }
$this->registerJs("var biz = {$opts};", View::POS_HEAD); $this->registerJs($this->render('_script.js')); ?> <div class="col-lg-12 no-padding no-margin"> <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 .= Html::tag('th', '#', ['style' => 'width:5%;']); $inputArea .= Html::endTag('tr'); $inputArea .= Html::beginTag('tr'); $inputArea .= Html::tag('td', Html::hiddenInput('did', '', ['id' => 'did']) . Html::textInput('dcode', '', ['id' => 'dcode', 'class' => 'form-control'])); $inputArea .= Html::tag('td', Html::hiddenInput('dbalance', '', ['id' => 'dbalance']) . Html::textInput('dname', '', ['id' => 'dname', 'class' => 'form-control'])); $inputArea .= Html::tag('td', Html::input('number', 'debit', '', ['id' => 'ddebit', 'class' => 'form-control'])); $inputArea .= Html::tag('td', Html::input('number', 'credit', '', ['id' => 'dcredit', 'class' => 'form-control'])); $inputArea .= Html::tag('td', Html::a('<i class="fa fa-plus"></i>', '#', ['id' => 'journal_add', 'class' => 'btn btn-default text-green'])); $inputArea .= Html::endTag('tr'); $inputArea .= Html::endTag('thead'); echo $inputArea; ?> <?php echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $model->glDetails, 'model' => GlDetail::className(), 'tag' => 'tbody', 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail', 'clientOptions' => []]); ?> </table> </div>