Пример #1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getItems()
 {
     return $this->hasMany(PurchaseDtl::className(), ['purchase_id' => 'id']);
 }
Пример #2
0
        <tr>
            <th style="width: 10%">#</th>
            <th>
                Product Name
            </th>
            <th class="items" style="width: 25%">
                Qty
            </th>
            <th class="items" style="width: 25%">
                Price
            </th>
            <th style="width: 20%">
                Uom
            </th>
        </tr>
        <tr>
            <td colspan="2">
                <div class="input-group" style="width:100%;">
                    <span class="input-group-addon">
                        <i class="fa fa-search"></i>
                    </span>
                    <input id="input-product" class="form-control" placeholder="Search Product..">
                </div>
            </td>
        </tr>
    </thead>
    <?php 
echo TabularInput::widget(['id' => 'detail-grid', 'allModels' => $model->items, 'model' => PurchaseDtl::className(), 'tag' => 'tbody', 'itemOptions' => ['tag' => 'tr'], 'itemView' => '_item_detail', 'clientOptions' => []]);
?>
</table>