<tr> <td> <?php echo app\models\ItemVatCat::findName($model->itemVatCat_id); echo $form->field($model, "[{$i}]itemVatCat_id", ['template' => '{input}'])->hiddenInput(); ?> </td> <td> <?php echo $form->field($model, "[{$i}]account_id", ['template' => '{input}'])->widget(kartik\select2\Select2::classname(), ['data' => \yii\helpers\ArrayHelper::map(app\models\Accounts::findAllByType(3), 'id', 'name')]); ?> </td> </tr>
<button type="button" class="close md-close" data-dismiss="modal" aria-hidden="true">×</button> </div> <div class="modal-body"> <div class="nano nscroller has-scrollbar"> <div style="right: -15px;" tabindex="0" class="content"> <?php $ordenCompraDetalle = new app\modules\siap\models\OrdenCompraDetalle(); $productos = \app\modules\siap\models\Producto::find()->all(); $data = []; foreach ($productos as $producto) { $data[trim($producto->idproducto)] = trim($producto->descripcion); } $form2 = ActiveForm::begin(); echo $form2->field($ordenCompraDetalle, 'idproducto')->widget(kartik\select2\Select2::classname(), ['data' => array_merge(['' => ''], $data), 'options' => ['placeholder' => 'Seleccone un producto ...', 'onchange' => 'informacionProducto()'], 'pluginOptions' => ['allowClear' => true]])->label("Producto"); ?> <?php echo $form2->field($ordenCompraDetalle, 'cantidad', [])->input('number', ['onformchange' => 'actualizarTotalProductoAgregar()', 'class' => 'form-control', 'min' => '0', 'value' => '0', 'onkeyup' => 'actualizarTotalProductoAgregar()']); ?> <?php echo $form2->field($ordenCompraDetalle, 'punitario', [])->input('number', ['onformchange' => 'actualizarTotalProductoAgregar()', 'onkeyup' => 'actualizarTotalProductoAgregar()', 'class' => 'form-control sin-spinner', 'min' => '0', 'value' => '0']); ?> <?php echo $form2->field($ordenCompraDetalle, 'iva', [])->input('number', ['onformchange' => 'actualizarTotalProductoAgregar()', 'onkeyup' => 'actualizarTotalProductoAgregar()', 'class' => 'form-control sin-spinner', 'min' => '0', 'value' => '12']); ?> <!-- ($data->punitario * $data->iva) / 100 -->