<?php
use app\models\Unit;
use kartik\select2\Select2;
use yii\helpers\ArrayHelper;
use yii\helpers\Html;
use yii\web\JqueryAsset;
use yii\web\View;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\Product */
/* @var $form yii\widgets\ActiveForm */
$js = <<<JS
$("body").on("keyup",".product-price1",function() {
var count_item =$(this).parent().parent().prev().prev().children().find(".product-price1") ;
var total_item = $(this).parent().parent().next().children("em");
total_item.html(($(this).val() * count_item.val()).toFixed(0));
var money = addCommas($(this).val());
$(this).parent().find('.help-block').html(money);
updateMoney();
});
$(document).on('focus', '.select2', function() {
$(this).siblings('select').select2('open');
});
JS;
$this->registerJs($js, $this::POS_END);
$this->registerJsFile(Yii::$app->request->baseUrl . '/js/common.js', ['depends' => [JqueryAsset::className()]]);
$this->registerJsFile(Yii::$app->request->baseUrl . '/js/dynamicform.js', ['depends' => [\yii\web\JqueryAsset::className()], 'position' => View::POS_END]);
?>
$parameters = array("product_id"=>$product_id,"name"=>$name,"unit"=>$unit,"specification"=>$specification,"cost"=>$cost,"price" => $price, "quantity" => $quantity,"yearmonth"=>$yearmonth);
xxxx
Yii::$app->db->createCommand()->insert('product_month', $parameters)->execute();
xxxxx
$commanRun = Yii::$app->db->createCommand($myQuery);
$commanRun->bindValue(':username', Yii::$app->user->username);
$product= $commanRun->queryAll();
foreach ($data as $myitem=>$one) {// $productid= $myitem['productid'];$data1[]= array_values($one) ;}
xxxxx
$parameters = array("unit_name" => $nameUpdate);
Yii::$app->db->createCommand()->update('unit',$parameters,'id='.$idUpdate)->execute();
Hotline
0988935230
Combo 2 Dây đai tập yoga sợi cotton
100,000 đ
58,000 đ
32,000 đ