本文整理汇总了PHP中lukisongroup\master\models\Unitbarang类的典型用法代码示例。如果您正苦于以下问题:PHP Unitbarang类的具体用法?PHP Unitbarang怎么用?PHP Unitbarang使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Unitbarang类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: actionIndex
/**
* ACTION INDEX
*/
public function actionIndex()
{
/*CNT Barang Prodak*/
$cntBrgProdak = "SELECT COUNT(KD_BARANG) As KD_BARANG FROM b0001 WHERE PARENT=1";
$cntBrgPrdk = Barang::findBySql($cntBrgProdak)->one();
/*CNT Barang Umum*/
$cntBrgUmum = "SELECT COUNT(KD_BARANG) As KD_BARANG FROM b0001 WHERE PARENT=0";
$cntBrgUmn = Barang::findBySql($cntBrgUmum)->one();
/*CNT Barang Type*/
$cntType = "SELECT COUNT(NM_TYPE) as NM_TYPE FROM b1001";
$cntTyp = Tipebarang::findBySql($cntType)->one();
/*CNT Barang Kategori*/
$cntCategory = "SELECT COUNT(NM_KATEGORI) as NM_KATEGORI FROM b1002";
$cntCtg = Kategori::findBySql($cntCategory)->one();
/*CNT Barang Unit*/
$cntUnit = "SELECT COUNT(KD_UNIT) as KD_UNIT FROM ub0001";
$cntUnt = Unitbarang::findBySql($cntUnit)->one();
/*CNT Supplier*/
$cntSupplier = "SELECT COUNT(KD_SUPPLIER) as KD_SUPPLIER FROM s1000";
$cntSpl = Suplier::findBySql($cntSupplier)->one();
/*CNT Distributor*/
$cntDistributor = "SELECT COUNT(KD_DISTRIBUTOR) as KD_DISTRIBUTOR FROM d0001";
$cntDist = Distributor::findBySql($cntDistributor)->one();
/*CNT Customer*/
$cntCustomer = "SELECT COUNT(CUST_KD) as CUST_KD FROM c0001";
$cntCst = Customers::findBySql($cntCustomer)->one();
//print_r($cntBrgPrdk->KD_BARANG);
return $this->render('index', ['cntBrgPrdk' => $cntBrgPrdk->KD_BARANG, 'cntBrgUmn' => $cntBrgUmn->KD_BARANG, 'cntTyp' => $cntTyp->NM_TYPE, 'cntCtg' => $cntCtg->NM_KATEGORI, 'cntUnt' => $cntUnt->KD_UNIT, 'cntSpl' => $cntSpl->KD_SUPPLIER, 'cntDist' => $cntDist->KD_DISTRIBUTOR, 'cntCst' => $cntCst->CUST_KD]);
}
开发者ID:adem-team,项目名称:advanced,代码行数:32,代码来源:MasterBarangController.php
示例2: search
/**
* Creates data provider instance with search query applied
*
* @param array $params
*
* @return ActiveDataProvider
*/
public function search($params)
{
$query = Unitbarang::find();
$dataProvider = new ActiveDataProvider(['query' => $query]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
$query->andFilterWhere(['ID' => $this->ID, 'QTY' => $this->QTY, 'SIZE' => $this->SIZE, 'WEIGHT' => $this->WEIGHT, 'STATUS' => $this->STATUS]);
$query->andFilterWhere(['like', 'KD_UNIT', $this->KD_UNIT])->andFilterWhere(['like', 'NM_UNIT', $this->NM_UNIT])->andFilterWhere(['like', 'COLOR', $this->COLOR])->andFilterWhere(['like', 'NOTE', $this->NOTE])->andFilterWhere(['like', 'CREATED_BY', $this->CREATED_BY])->andFilterWhere(['like', 'CREATED_AT', $this->CREATED_AT])->andFilterWhere(['like', 'UPDATED_AT', $this->UPDATED_AT]);
return $dataProvider;
}
开发者ID:adem-team,项目名称:advanced,代码行数:21,代码来源:UnitbarangSearch.php
示例3: function
use kartik\helpers\Html;
use kartik\grid\GridView;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\widgets\Select2;
use kartik\widgets\DepDrop;
use yii\helpers\Url;
use kartik\builder\Form;
use kartik\widgets\TouchSpin;
use yii\web\JsExpression;
use yii\data\ActiveDataProvider;
use lukisongroup\master\models\Barangumum;
use lukisongroup\esm\models\Barang;
use lukisongroup\master\models\Kategori;
use lukisongroup\master\models\Unitbarang;
$brgUnit = ArrayHelper::map(Unitbarang::find()->orderBy('NM_UNIT')->all(), 'KD_UNIT', 'NM_UNIT');
$brgKtg = ArrayHelper::map(Kategori::find()->orderBy('NM_KATEGORI')->all(), 'KD_KATEGORI', 'NM_KATEGORI');
$brgUmum = ArrayHelper::map(Barangumum::find()->orderBy('NM_BARANG')->all(), 'KD_BARANG', 'NM_BARANG');
/* $this->registerJs("
$.fn.modal.Constructor.prototype.enforceFocus = function() {};
",$this::POS_HEAD);
*/
?>
<?php
$form = ActiveForm::begin(['id' => 'roInput', 'enableClientValidation' => true, 'method' => 'post', 'action' => ['/purchasing/request-order/simpanfirst']]);
?>
<?php
//= $form->errorSummary($model);
?>
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_formItem.php
示例4: function
<dd>:
<?php
if (count($dept) != 0) {
echo $dept->DEP_NM;
} else {
echo 'Dept Set';
}
?>
</dd>
</dl>
</div>
<!-- Table Grid List RO Detail !-->
<div>
<?php
echo GridView::widget(['id' => 'ro-process', 'dataProvider' => $dataProvider, 'headerRowOptions' => ['style' => 'background-color:rgba(126, 189, 188, 0.3); align:center'], 'filterRowOptions' => ['style' => 'background-color:rgba(126, 189, 188, 0.3); align:center'], 'beforeHeader' => [['columns' => [['content' => '', 'options' => ['colspan' => 2, 'class' => 'text-center info']], ['content' => 'Quantity', 'options' => ['colspan' => 3, 'class' => 'text-center info', 'style' => ['width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['content' => 'Remark', 'options' => ['colspan' => 2, 'class' => 'text-center info', 'style' => ['width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]]]], 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'hAlign' => 'center', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['label' => 'Items', 'attribute' => 'NM_BARANG', 'mergeHeader' => true, 'format' => 'raw', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '200px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.3)']], 'contentOptions' => ['style' => ['width' => '200px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'RQTY', 'label' => 'R.Qty', 'vAlign' => 'middle', 'hAlign' => 'center', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '40px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.3)']], 'contentOptions' => ['style' => ['width' => '40px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'SQTY', 'label' => 'S.Qty', 'mergeHeader' => true, 'vAlign' => 'middle', 'hAlign' => 'center', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '40px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.3)']], 'contentOptions' => ['style' => ['width' => '40px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'UNIT', 'mergeHeader' => true, 'label' => 'Unit', 'vAlign' => 'middle', 'hAlign' => 'right', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.3)']], 'contentOptions' => ['style' => ['width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']], 'value' => function ($model) {
$model = Unitbarang::find()->where('KD_UNIT="' . $model->UNIT . '"')->one();
if (count($model) != 0) {
$UnitNm = $model->NM_UNIT;
} else {
$UnitNm = 'Not Set';
}
return $UnitNm;
}], ['attribute' => 'NOTE', 'label' => 'Noted', 'hAlign' => 'left', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '200px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.3)']], 'contentOptions' => ['style' => ['width' => '200px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'STATUS', 'options' => ['id' => 'test-ro'], 'label' => '#', 'hAlign' => 'center', 'vAlign' => 'middle', 'mergeHeader' => true, 'contentOptions' => ['style' => 'width: 100px'], 'format' => 'html', 'value' => function ($model, $key, $index, $widget) {
return statusProcessRo($model);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(126, 189, 188, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '8pt']]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'ro-process']], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false]);
?>
</div>
<div>
<?php
$tgl1 = explode(' ', $roHeader->CREATED_AT);
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:pdfview.php
示例5: actionCreate
public function actionCreate($kdpo)
{
$searchModel = new RequestorderSearch();
$dataProviderRo = $searchModel->cariHeaderRO_SendPO(Yii::$app->request->queryParams);
$searchModel = new SalesorderSearch();
$dataProviderSo = $searchModel->cariHeaderSO_SendPO(Yii::$app->request->queryParams);
$poHeader = Purchaseorder::find()->where(['KD_PO' => $kdpo])->one();
$supplier = $poHeader->suplier;
$bill = $poHeader->bill;
$ship = $poHeader->ship;
$employee = $poHeader->employe;
$poDetail = Purchasedetail::find()->where(['KD_PO' => $kdpo])->andWhere('STATUS <> 3')->all();
$poDetailProvider = new ArrayDataProvider(['key' => 'ID', 'allModels' => $poDetail, 'pagination' => ['pageSize' => 20]]);
/*
* Edit PO Quantity | Validation max Jumlah RO/SA
* @author ptrnov <[email protected]>
* @since 1.2
*/
if (Yii::$app->request->post('hasEditable')) {
$id = Yii::$app->request->post('editableKey');
Yii::$app->response->format = Response::FORMAT_JSON;
$model = Purchasedetail::findOne($id);
$currentQty = $model->QTY;
$currentKdPo = $model->KD_PO;
$currentKdRo = $model->KD_RO;
$currentKdBrg = $model->KD_BARANG;
/* $iendPoQtyValidation = new SendPoQtyValidation();
$iendPoQtyValidation->findOne($id); */
$out = Json::encode(['output' => '', 'message' => '']);
$post = [];
$posted = current($_POST['Purchasedetail']);
$post['Purchasedetail'] = $posted;
/* $posted = current($_POST['SendPoQtyValidation']);
$post['SendPoQtyValidation'] = $posted; */
if ($model->load($post)) {
$output = '';
/*
* Split PO Plus dan PO Normal
* PO Plus=POA.*
* PO Plus=POB.*
* @author ptrnov [piter@lukison]
* @since 1.2
*/
$kdPo = explode('.', $currentKdPo);
if ($kdPo[0] != 'POA') {
if (isset($posted['QTY'])) {
/*
* QTY RO-PO VALIDATION
* QTY PO tidak boleh lebih dari SQTY Request Order
*/
/*Find SQTY RoDetail*/
$roDetail = Rodetail::find()->where(['KD_RO' => $currentKdRo, 'KD_BARANG' => $currentKdBrg])->one();
//if(!$roDetail){
$roQty = $roDetail->SQTY != 0 ? $roDetail->SQTY : 0;
//}else{$roQty=0;}
/*Sum QTY PoDetail */
$pqtyTaken = "SELECT SUM(QTY) as QTY FROM p0002 WHERE KD_RO='" . $roDetail->KD_RO . "' AND KD_BARANG='" . $roDetail->KD_BARANG . "' GROUP BY KD_BARANG";
//$pqtyTaken= 'SELECT SUM(QTY) as QTY FROM p0002 WHERE KD_RO="RO.2015.12.000001" AND KD_BARANG="BRGU.LG.03.06.E07.0001"';
$poDetailQtySum = Purchasedetail::findBySql($pqtyTaken)->one();
$poQty = $poDetailQtySum->QTY != 0 ? $poDetailQtySum->QTY : 0;
/* Calculate SQTY RO - QTY PO + Current QTY | minus current record QTY */
$ttlPQTY = $roQty - $poQty + $currentQty;
if ($posted['QTY'] <= $ttlPQTY) {
$model->save();
$output = Yii::$app->formatter->asDecimal($model->QTY, 0);
} else {
return ['output' => '', 'message' => 'Request Order QTY Limited, Greater than RO QTY ! please insert free Qty, Check Request Order'];
}
}
if (isset($posted['HARGA'])) {
$model->save();
$output = Yii::$app->formatter->asDecimal($model->HARGA, 2);
}
if (isset($posted['UNIT'])) {
$modelUnit = Unitbarang::find()->where('KD_UNIT="' . $posted['UNIT'] . '"')->one();
$model->NM_UNIT = $modelUnit->NM_UNIT;
$model->UNIT_QTY = $modelUnit->QTY;
$model->UNIT_WIGHT = $modelUnit->WEIGHT;
$model->save();
$output = $model->UNIT;
}
/*
if (isset($posted['NOTE'])) {
// $output = Yii::$app->formatter->asDecimal($model->EMP_NM, 2);
$output = $model->NOTE;
} */
} elseif ($kdPo[0] != 'PO') {
/* PO Plus=POB.*/
if (isset($posted['QTY'])) {
$model->save();
$output = Yii::$app->formatter->asDecimal($model->QTY, 0);
}
if (isset($posted['HARGA'])) {
$model->save();
$output = Yii::$app->formatter->asDecimal($model->HARGA, 2);
}
if (isset($posted['UNIT'])) {
$model->save();
$output = $model->UNIT;
}
//.........这里部分代码省略.........
开发者ID:adem-team,项目名称:advanced,代码行数:101,代码来源:PurchaseOrderController.php
示例6: getCunit
public function getCunit()
{
return $this->hasOne(Unitbarang::className(), ['KD_UNIT' => 'UNIT']);
}
开发者ID:adem-team,项目名称:advanced,代码行数:4,代码来源:Rodetail.php
示例7: function
}
}], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(247, 245, 64, 0.6)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(247, 245, 64, 0.6)']]], ['attribute' => 'STATUS', 'options' => ['id' => 'test-ro'], 'label' => 'Status', 'hAlign' => 'center', 'vAlign' => 'middle', 'mergeHeader' => true, 'contentOptions' => ['style' => 'width: 100px'], 'format' => 'html', 'value' => function ($model, $key, $index, $widget) {
return statusProcessRo($model);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(247, 245, 64, 0.6)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '50px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(247, 245, 64, 0.6)']]], ['class' => 'kartik\\grid\\SerialColumn', 'width' => '10px', 'header' => 'No.', 'hAlign' => 'center', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-right' => '0px']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'KD_COSTCENTER', 'label' => 'Cost.Center', 'vAlign' => 'middle', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '60px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '60px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-left' => '0px', 'border-right' => '0px']], 'editableOptions' => ['header' => 'Cost Center', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'md', 'options' => ['data' => ArrayHelper::map(Costcenter::find()->all(), 'KD_COSTCENTER', 'NM_COSTCENTER'), 'pluginOptions' => ['allowClear' => true, 'class' => 'pull-top dropup']], 'displayValueConfig' => ArrayHelper::map(Costcenter::find()->all(), 'KD_COSTCENTER', 'KD_COSTCENTER')]], ['attribute' => 'KD_BARANG', 'label' => 'SKU', 'hAlign' => 'left', 'vAlign' => 'middle', 'mergeHeader' => true, 'format' => 'raw', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-left' => '0px', 'border-right' => '0px']]], ['label' => 'Items Name', 'attribute' => 'NM_BARANG', 'hAlign' => 'center', 'vAlign' => 'middle', 'mergeHeader' => true, 'format' => 'raw', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '200px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '200px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-left' => '0px', 'border-right' => '0px']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'QTY', 'label' => 'Qty', 'vAlign' => 'middle', 'hAlign' => 'center', 'mergeHeader' => true, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '60px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'right', 'width' => '60px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'pageSummaryOptions' => ['style' => ['border-left' => '0px', 'border-right' => '0px']], 'editableOptions' => ['header' => 'Update Quantity', 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'size' => 'sm', 'options' => ['pluginOptions' => ['min' => 0, 'max' => 50000]]]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'UNIT', 'mergeHeader' => true, 'label' => 'UoM', 'vAlign' => 'middle', 'hAlign' => 'right', 'readonly' => function ($model, $key, $index, $widget) use($poHeader) {
//return (102=$model->STATUS || 0<> $headerStatus); // Allow Status Process = 0;
return 102 == $poHeader->STATUS;
// Allow Status Process = 0;
}, 'value' => function ($model) {
$model = Unitbarang::find()->where('KD_UNIT="' . $model->UNIT . '"')->one();
if (count($model) != 0) {
$UnitNm = $model->NM_UNIT;
} else {
$UnitNm = 'Not Set';
}
return $UnitNm;
}, 'editableOptions' => ['header' => 'Update Unit', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'md', 'options' => ['data' => ArrayHelper::map(Unitbarang::find()->orderBy('NM_UNIT')->all(), 'KD_UNIT', 'NM_UNIT'), 'pluginOptions' => ['allowClear' => true, 'class' => 'pull-top dropup']], 'displayValueConfig' => ArrayHelper::map(Unitbarang::find()->orderBy('NM_UNIT')->all(), 'KD_UNIT', 'NM_UNIT')], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '150px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'border-left' => '0px']], 'pageSummaryOptions' => ['style' => ['border-left' => '0px', 'border-right' => '0px']], 'pageSummary' => function ($summary, $data, $widget) {
return '<div>Sub Total :</div>
<div>Discount :</div>
<div>TAX :</div>
<div>Delevery.Cost :</div>
<div><b>GRAND TOTAL :</b></div>';
}, 'pageSummaryOptions' => ['style' => ['font-family' => 'tahoma', 'font-size' => '8pt', 'text-align' => 'right', 'border-left' => '0px', 'border-right' => '0px']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'HARGA', 'value' => function ($model) {
return round($model->HARGA * $model->UNIT_QTY, 0, PHP_ROUND_HALF_UP);
}, 'mergeHeader' => true, 'label' => 'Price', 'vAlign' => 'middle', 'hAlign' => 'right', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'tahoma', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'right', 'width' => '100px', 'font-family' => 'tahoma', 'font-size' => '8pt']], 'editableOptions' => ['header' => 'Update Price', 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'size' => 'sm', 'options' => ['pluginOptions' => ['min' => 0, 'max' => 10000000000]]], 'format' => ['decimal', 2], 'pageSummary' => function ($summary, $data, $widget) use($poHeader) {
$discountModal = $poHeader->DISCOUNT != 0 ? $poHeader->DISCOUNT : '0.00';
$pajakModal = $poHeader->PAJAK != 0 ? $poHeader->PAJAK : '0.00';
return '<div>IDR</div >
<div>
' . Html::a($discountModal, Url::toRoute(['/purchasing/purchase-order/discount-view', 'kdpo' => $poHeader->KD_PO]), ['id' => 'discount', 'data-toggle' => 'modal', 'data-target' => '#frm-discount']) . '
%</div >
<div>
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_buat_poa.php
示例8: findModel
/**
* Finds the Unitbarang model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param string $id
* @return Unitbarang the loaded model
* @throws NotFoundHttpException if the model cannot be found
*/
protected function findModel($ID)
{
if (($model = Unitbarang::findOne($ID)) !== null) {
return $model;
} else {
throw new NotFoundHttpException('The requested page does not exist.');
}
}
开发者ID:adem-team,项目名称:advanced,代码行数:15,代码来源:UnitbarangController.php
示例9: function
echo GridView::widget(['id' => 'ro-process', 'dataProvider' => $dataProvider, 'filterModel' => '', 'filterRowOptions' => ['style' => 'background-color:rgba(0, 95, 218, 0.3); align:center'], 'beforeHeader' => [['columns' => [['content' => '', 'options' => ['colspan' => 2, 'class' => 'text-center info']], ['content' => 'Quantity', 'options' => ['colspan' => 3, 'class' => 'text-center info']], ['content' => 'Remark', 'options' => ['colspan' => 2, 'class' => 'text-center info']]]]], 'columns' => [['class' => 'kartik\\grid\\SerialColumn', 'contentOptions' => ['class' => 'kartik-sheet-style'], 'width' => '10px', 'header' => 'No.', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '10px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt']]], ['label' => 'Items', 'attribute' => 'NM_BARANG', 'hAlign' => 'left', 'vAlign' => 'middle', 'mergeHeader' => true, 'format' => 'raw', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '200px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '200px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'RQTY', 'label' => 'Qty.Request', 'vAlign' => 'middle', 'hAlign' => 'center', 'mergeHeader' => true, 'readonly' => function ($model, $key, $index, $widget) use($headerStatus) {
//return (101 == $model->STATUS || 10 == $model->STATUS || 3 == $model->STATUS || 4 == $model->STATUS);// or 101 == $roHeader->STATUS);
return 0 != $model->STATUS || 0 != $headerStatus;
// Allow Status Process = 0);
}, 'editableOptions' => ['header' => 'Update Quantity', 'inputType' => \kartik\editable\Editable::INPUT_TEXT, 'size' => 'sm', 'options' => ['pluginOptions' => ['min' => 0, 'max' => 50000]]], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '60px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '60px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'SQTY', 'label' => 'Qty.Submit', 'mergeHeader' => true, 'vAlign' => 'middle', 'hAlign' => 'center', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '60px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '60px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'UNIT', 'label' => 'Unit', 'hAlign' => 'left', 'vAlign' => 'middle', 'mergeHeader' => true, 'readonly' => function ($model, $key, $index, $widget) use($headerStatus) {
return 0 != $model->STATUS || 0 != $headerStatus;
// Allow Status Process = 0;
}, 'value' => function ($model) {
$model = Unitbarang::find()->where('KD_UNIT="' . $model->UNIT . '"')->one();
if (count($model) != 0) {
$UnitNm = $model->NM_UNIT;
} else {
$UnitNm = 'Not Set';
}
return $UnitNm;
}, 'editableOptions' => ['header' => 'Update Quantity', 'inputType' => \kartik\editable\Editable::INPUT_SELECT2, 'size' => 'md', 'options' => ['data' => ArrayHelper::map(Unitbarang::find()->orderBy('NM_UNIT')->all(), 'KD_UNIT', 'NM_UNIT'), 'pluginOptions' => ['min' => 0, 'max' => 50000, 'allowClear' => true]], 'displayValueConfig' => ArrayHelper::map(Unitbarang::find()->orderBy('NM_UNIT')->all(), 'KD_UNIT', 'NM_UNIT')], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '120px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '120px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt']]], ['class' => 'kartik\\grid\\EditableColumn', 'attribute' => 'NOTE', 'label' => 'Notes', 'hAlign' => 'left', 'mergeHeader' => true, 'readonly' => function ($model, $key, $index, $widget) use($headerStatus) {
return 0 != $model->STATUS || 0 != $headerStatus;
// Allow Status Process = 0;
}, 'editableOptions' => ['header' => 'Update Quantity', 'inputType' => \kartik\editable\Editable::INPUT_TEXTAREA, 'size' => 'md', 'options' => ['pluginOptions' => ['min' => 0, 'max' => 50000]]], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '200px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(0, 95, 218, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '200px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt']]], ['attribute' => 'STATUS', 'label' => 'Status', 'hAlign' => 'center', 'vAlign' => 'middle', 'mergeHeader' => true, 'contentOptions' => ['style' => 'width: 100px'], 'format' => 'html', 'value' => function ($model, $key, $index, $widget) {
return statusProcessRo($model);
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt', 'background-color' => 'rgba(0, 15, 118, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '100px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '8pt']]]], 'pjax' => true, 'pjaxSettings' => ['options' => ['enablePushState' => false, 'id' => 'ro-process']], 'hover' => true, 'responsive' => true, 'responsiveWrap' => true, 'bordered' => true, 'striped' => '4px', 'autoXlFormat' => true, 'export' => false]);
?>
</div>
</div>
<!-- Signature !-->
<div class="col-md-11">
<?php
$tgl1 = explode(' ', $roHeader->CREATED_AT);
$awl1 = explode('-', $tgl1[0]);
$blnAwl1 = date("F", mktime(0, 0, 0, $awl1[1], 1));
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:edit.php
示例10: function
echo $form->field($roDetail, 'NOTE')->textarea(array('rows' => 2, 'cols' => 5))->label('Informasi');
?>
<div class="form-group">
<?php
echo Html::submitButton($roDetail->isNewRecord ? 'Add' : 'Update', ['class' => $roDetail->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
</div>
<?php
ActiveForm::end();
?>
</div>
<?php
echo GridView::widget(['id' => 'ro-form', 'dataProvider' => $dataProvider, 'columns' => [['attribute' => 'KD_RO'], ['label' => 'Tanggal Pembuatan', 'attribute' => 'CREATED_AT'], ['label' => 'Nama Barang', 'attribute' => 'NM_BARANG'], ['label' => 'Qty', 'attribute' => 'RQTY'], ['attribute' => 'UNIT', 'mergeHeader' => true, 'value' => function ($model, $key, $index, $widget) {
$masterUnit = Unitbarang::find()->where(['KD_UNIT' => $model->UNIT])->one();
if (count($masterUnit) != 0) {
return $masterUnit->NM_UNIT;
} else {
return "Not Set";
}
}], ['header' => 'Action', 'class' => 'yii\\grid\\ActionColumn', 'template' => '{tambah} {link} {edit} {delete} {cetak}', 'buttons' => ['delete' => function ($url, $model) {
if ($model->STATUS == 0) {
return Html::a('', ['hapusro', 'id' => $model->KD_RO], ['class' => 'fa fa-trash-o fa-lg', 'title' => 'Hapus RO', 'data-confirm' => 'Anda yakin ingin menghapus RO ini?']);
}
}]]], 'export' => false, 'toggleData' => false, 'panel' => ['type' => 'success']]);
?>
</div>
开发者ID:adem-team,项目名称:advanced,代码行数:29,代码来源:_update.php
示例11:
use yii\helpers\Html;
use kartik\form\ActiveForm;
use yii\helpers\ArrayHelper;
use kartik\widgets\Select2;
use kartik\widgets\FileInput;
use kartik\widgets\DepDrop;
use yii\helpers\Url;
use lukisongroup\master\models\Tipebarang;
use lukisongroup\master\models\Kategori;
use lukisongroup\master\models\Unitbarang;
use lukisongroup\master\models\Suplier;
use lukisongroup\hrd\models\Corp;
$drop = ArrayHelper::map(Corp::find()->where('CORP_STS=1 AND CORP_ID="GSN"')->all(), 'CORP_ID', 'CORP_NM');
$droptype = ArrayHelper::map(Tipebarang::find()->where('STATUS<>3 and PARENT=1')->all(), 'KD_TYPE', 'NM_TYPE');
$dropkat = ArrayHelper::map(Kategori::find()->where('STATUS<>3 and PARENT=1')->all(), 'KD_KATEGORI', 'NM_KATEGORI');
$dropunit = ArrayHelper::map(Unitbarang::find()->all(), 'KD_UNIT', 'NM_UNIT');
$dropsup = ArrayHelper::map(Suplier::find()->all(), 'KD_SUPPLIER', 'NM_SUPPLIER');
?>
<div class="barang-form">
<?php
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'id' => 'form-prodak-id', 'enableClientValidation' => true, 'options' => ['enctype' => 'multipart/form-data']]);
?>
<?php
echo $form->field($model, 'PARENT')->hiddenInput(['value' => 1, 'maxlength' => true])->label(false);
?>
<?php
echo $form->field($model, 'KD_CORP')->dropDownList($drop, ['id' => 'barang-kd_corp', 'readonly' => true])->label('Perusahaan');
echo $form->field($model, 'KD_TYPE')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $droptype, 'options' => ['id' => 'barang-kd_type'], 'pluginOptions' => ['depends' => ['barang-kd_corp'], 'url' => Url::to(['/dashboard/gsn-product/prodak-corp-type']), 'initialize' => true]]);
echo $form->field($model, 'KD_KATEGORI')->widget(DepDrop::classname(), ['type' => DepDrop::TYPE_SELECT2, 'data' => $dropkat, 'options' => ['id' => 'barang-kd_kategori'], 'pluginOptions' => ['depends' => ['barang-kd_corp', 'barang-kd_type'], 'url' => Url::to(['/dashboard/gsn-product/prodak-type-kat']), 'initialize' => true]]);
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_form.php
示例12: getUnitb
public function getUnitb()
{
return $this->hasOne(Unitbarang::className(), ['ID' => 'KD_UNIT']);
}
开发者ID:adem-team,项目名称:advanced,代码行数:4,代码来源:Barang.php
示例13: ary_unit
public function ary_unit()
{
return ArrayHelper::map(Unitbarang::find()->all(), 'NM_UNIT', 'NM_UNIT');
}
开发者ID:adem-team,项目名称:advanced,代码行数:4,代码来源:SopSalesController.php
示例14: getUnitTbl
public function getUnitTbl()
{
return $this->hasOne(Unitbarang::className(), ['KD_UNIT' => 'KD_UNIT'])->via('barangTbl');
}
开发者ID:adem-team,项目名称:advanced,代码行数:4,代码来源:ImportView.php
示例15:
<?php
$drop = ArrayHelper::map(Tipebarang::find()->where(['STATUS' => 1])->all(), 'KD_TYPE', 'NM_TYPE');
?>
<?php
echo $form->field($model, 'KD_TYPE')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Type Barang');
?>
<?php
$drop = ArrayHelper::map(Kategori::find()->where(['STATUS' => 1])->all(), 'KD_KATEGORI', 'NM_KATEGORI');
?>
<?php
echo $form->field($model, 'KD_KATEGORI')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Kategori');
?>
<?php
$drop = ArrayHelper::map(Unitbarang::find()->all(), 'ID', 'NM_UNIT');
?>
<?php
echo $form->field($model, 'KD_UNIT')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --']);
?>
<?php
/* $drop = ArrayHelper::map(Distributor::find()->all(), 'KD_DISTRIBUTOR', 'NM_DISTRIBUTOR'); */
?>
<?php
/* $form->field($model, 'KD_DISTRIBUTOR')->dropDownList($drop,['prompt'=>' -- Pilih Salah Satu --']) */
?>
<?php
echo $form->field($model, 'image')->widget(FileInput::classname(), ['options' => ['accept' => 'image/*'], 'pluginOptions' => ['allowedFileExtensions' => ['jpg', 'gif', 'png']]]);
?>
开发者ID:adem-team,项目名称:advanced,代码行数:31,代码来源:_update.php
注:本文中的lukisongroup\master\models\Unitbarang类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论