</table> </div> </td> </tr> </tfoot> --> </table> <?php // var_dump($move_set_printed); foreach ($move_set_printed as $set => $childs) { $consist[$set] = []; $setTo = ''; foreach ($childs as $child) { $moveChild = app\models\StockMove::findOne($child); // echo $moveChild->product->name_template; $setTo .= '<li>[' . $moveChild->product->default_code . '] ' . $moveChild->product->name_template . ' (' . $moveChild->product_qty . ' ' . $moveChild->productUom->name . ')</li>'; } $scr = ' jQuery(\'#listConsistOf' . $set . '\').html(\'' . $setTo . '\') '; $this->registerJs($scr, yii\web\View::POS_END); } ?> <?php echo $renderedRow; $this->registerJsFile(Url::base() . '/js/ckeditor/ckeditor.js', ['position' => \yii\web\View::POS_HEAD]); // $this->registerJsFile(Url::base().'/js/ckeditor/adapters/jquery.js',['position'=>\yii\web\View::POS_END]); $scr = "";
<div class="mrp-bom-view"> <h1><?php echo Html::encode($this->title); ?> </h1> <p> <?php echo Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']); ?> <?php echo Html::a('Delete', ['delete', 'id' => $model->id], ['class' => 'btn btn-danger', 'data' => ['confirm' => 'Are you sure you want to delete this item?', 'method' => 'post']]); ?> </p> <?php echo DetailView::widget(['model' => $model, 'attributes' => ['id', 'product_qty', 'product_efficiency', 'name', 'product.name_template', 'type']]); ?> <?php echo yii\grid\GridView::widget(['dataProvider' => $moves['dataProvider'], 'filterModel' => $moves['searchModel'], 'columns' => [['class' => 'yii\\grid\\SerialColumn'], 'id', 'picking_id', 'product_uom', 'product_uos_qty', 'product_qty', 'name', 'product_id', ['header' => 'Childs', 'value' => function ($data) { $check = app\models\StockMove::find()->where(['move_dest_id' => $data->id])->count(); return $check; }], ['class' => 'yii\\grid\\ActionColumn', 'buttons' => ['view' => function ($url, $model, $Key) { return Html::a('<span class="glyphicon glyphicon-eye-open"></span>', Yii::$app->urlManager->createUrl(['moves/view-move-childs', 'id' => $model->id])); }]]]]); ?> </div>