Ejemplo n.º 1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEntriSheetDtls()
 {
     return $this->hasMany(EntriSheetDtl::className(), ['cd_esheet' => 'cd_esheet']);
 }
Ejemplo n.º 2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getEntriSheetDtls()
 {
     return $this->hasMany(EntriSheetDtl::className(), ['id_coa' => 'id_coa']);
 }
Ejemplo n.º 3
0
        <div class="col-lg-7">
        </div>
    </div>
    <table class ="table table-striped" id="tbl-entryheader">
        <thead>
            <tr>
                <th>No</th>
                <th>NM Detail Entry</th>
                <th>Account</th>
                <th>
                    <a href="#" data-action="append"><span class="glyphicon glyphicon-plus"></span></a>
                </th>
            </tr>
        </thead>
        <?php 
echo TabularInput::widget(['id' => 'tbl-entrydetail', 'allModels' => $model->entriSheetDtls, 'modelClass' => EntriSheetDtl::className(), 'itemView' => '_detail', 'options' => ['tag' => 'tbody'], 'itemOptions' => ['tag' => 'tr'], 'clientOptions' => ['afterAddRow' => new yii\web\JsExpression('biz.config.entryAfterAddRow')]]);
?>
    </table>
    <div class="box-footer">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
</div>
<?php 
ActiveForm::end();
yii\jui\AutoCompleteAsset::register($this);
yii\jui\ThemeAsset::register($this);
biz\app\assets\BizAsset::register($this);
$jsFunc = <<<JS
function (\$row) {
Ejemplo n.º 4
0
    \$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-entrydetail', 'allModels' => $model->entriSheetDtls, 'modelClass' => EntriSheetDtl::className(), 'itemView' => '_detail', '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);
yii\jui\ThemeAsset::register($this);