示例#1
0
 public function kdsupplier($crp)
 {
     $ck = Suplier::find()->where('STATUS <> 3')->where(['KD_CORP' => $crp])->max('KD_SUPPLIER');
     if (count($ck) != 0) {
         $nw = explode('.', $ck);
         $nm = $nw[2] + 1;
     } else {
         $nm = 1;
     }
     $nn = str_pad($nm, "5", "0", STR_PAD_LEFT);
     $kd = 'SPL.' . $crp . "." . $nn;
     return $kd;
 }
示例#2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Suplier::find()->where('STATUS <> 3');
     $query->joinWith(['corp' => function ($q) {
         $q->where('u0001.CORP_NM LIKE "%' . $this->nmgroup . '%"');
     }]);
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 20]]);
     $dataProvider->setSort(['attributes' => ['KD_SUPPLIER', 'NM_SUPPLIER', 'ALAMAT', 'KOTA', 'nmgroup' => ['asc' => ['u0001.CORP_NM' => SORT_ASC], 'desc' => ['u0001.CORP_NM' => SORT_DESC], 'label' => 'Group Perusahaan']]]);
     if (!($this->load($params) && $this->validate())) {
         /**
          * The following line will allow eager loading with country data 
          * to enable sorting by country on initial loading of the grid.
          */
         $query->joinWith(['corp']);
         return $dataProvider;
     }
     $query->andFilterWhere(['like', 'KD_SUPPLIER', $this->KD_SUPPLIER])->andFilterWhere(['like', 'NM_SUPPLIER', $this->NM_SUPPLIER])->andFilterWhere(['like', 'ALAMAT', $this->ALAMAT])->andFilterWhere(['like', 'KOTA', $this->KOTA]);
     return $dataProvider;
 }
示例#3
0
use yii\helpers\Url;
use lukisongroup\master\models\Suplier;
use lukisongroup\master\models\Barangumum;
use lukisongroup\master\models\Nmperusahaan;
use lukisongroup\purchasing\models\Purchasedetail;
use lukisongroup\esm\models\Barang;
/* @var $this yii\web\View */
/* @var $poHeader lukisongroup\poHeaders\esm\po\Purchaseorder */
$this->title = 'Detail PO';
$this->params['breadcrumbs'][] = ['label' => 'Purchaseorders', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
$y = 4;
?>

 <?php 
$sup = Suplier::find()->where(['KD_SUPPLIER' => $poHeader->KD_SUPPLIER])->one();
//$pod = Purchasedetail::find()->where(['KD_PO'=>$poHeader->KD_PO])->all();
$ship = Nmperusahaan::find()->where(['ID' => $poHeader->SHIPPING])->one();
$bill = Nmperusahaan::find()->where(['ID' => $poHeader->BILLING])->one();
/* $x=10;
		function ax(){
			return '10';
		}
		 */
/* function formulaAmount($summary, $data, $widget){
				//$calculate = dataCell($model, $key, $index);
				//$p = compact('model', 'key', 'index');
				return '<div>'.$summary * $this->model().',</div>
						<div>'.min($data).'</div>
						<div>'.$summary.'</div>
						<div>100,0</div>
示例#4
0
	<div class="modal fade" id="new-po" tabindex="-1" role="dialog" aria-labelledby="create-poLabel">
	  <div class="modal-dialog" role="document">
		<div class="modal-content">
		
			  <div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="create-poLabel">OPTION CREATE PO</h4>
			  </div>
			  
			<?php 
$form = ActiveForm::begin(['type' => ActiveForm::TYPE_HORIZONTAL, 'method' => 'post', 'action' => ['/purchasing/purchase-order/simpanpo']]);
?>
			  <div class="modal-body">
				
			<?php 
$drop = ArrayHelper::map(Suplier::find()->where(['STATUS' => 1])->all(), 'KD_SUPPLIER', 'NM_SUPPLIER');
?>
			<?php 
echo $form->field($model, 'KD_SUPPLIER')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Supplier');
?>
			  </div>
			  <div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
				<button type="submit" class="btn btn-primary" >Save changes</button>
			  </div> 
			<?php 
ActiveForm::end();
?>
		</div>
	  </div>
	</div>	
示例#5
0
<?php

use yii\helpers\Html;
use kartik\widgets\ActiveForm;
use kartik\widgets\DatePicker;
use yii\helpers\ArrayHelper;
use kartik\widgets\Select2;
use lukisongroup\master\models\Suplier;
$addressCorp = ArrayHelper::map(Suplier::find()->orderBy('NM_SUPPLIER')->all(), 'KD_SUPPLIER', 'NM_SUPPLIER');
?>

	<?php 
$form = ActiveForm::begin(['id' => 'frm-spl-proccess', 'enableClientValidation' => true, 'enableAjaxValidation' => true, 'method' => 'post', 'action' => ['/purchasing/purchase-order/supplier-save']]);
?>
	
		<?php 
//echo  $form->field($poHeaderVal, 'kD_SUPPLIER')->textInput()->label('Supplier');
echo $form->field($poHeaderVal, 'kD_SUPPLIER')->widget(Select2::classname(), ['data' => $addressCorp, 'options' => ['placeholder' => 'Select Address for Supplier ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
		<?php 
echo $form->field($poHeaderVal, 'kD_PO')->hiddenInput(['value' => $poHeader->KD_PO, 'maxlength' => true, 'readonly' => true])->label(false);
?>
		
		<div style="text-align: right;"">
			<?php 
echo Html::submitButton('simpan', ['class' => 'btn btn-primary']);
?>
		</div>

    
	<?php 
示例#6
0
	.tbl {
		border:1px solid #B2B2B2 !important;
	}
}
</style>

<div class="ttl">
	<center>
		<?php 
echo Html::img('@web/upload/lukison.png', ['class' => 'pnjg']);
?>
	</center>
<br/>

    <?php 
$sup = Suplier::find()->where(['KD_SUPPLIER' => $model->KD_SUPPLIER])->one();
$pod = Purchasedetail::find()->where(['KD_PO' => $model->KD_PO])->all();
?>

    <div style="font-size:12pt;">
        <center>
            <h3 style="margin:0px;"><u>Purchase Order</u></h3>
            <h4 style="margin:0px;">No. <?php 
echo $model->KD_PO;
?>
</h4>
        </center>
    </div>
    <br/><br/><br/>
</div>
示例#7
0
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]]);
?>
示例#8
0
	? -->
<form  id="cpo" method="post" action="../purchase-order/createpo">

	<div class="col-xs-12 <?php 
if ($kr == 'HR-02') {
    echo 'col-md-9';
} else {
    echo 'col-md-12';
}
?>
">
	  	<?php 
echo Yii::$app->session->getFlash('error');
?>
		<?php 
$brg = Suplier::find()->where(['KD_SUPPLIER' => $quer->KD_SUPPLIER])->one();
$kdpo = $_GET['kdpo'];
?>
	  	<br/>
		<div class="row">
		  	<div class="col-xs-6 col-sm-6 col-md-6">
		  	<b><?php 
echo $brg->NM_SUPPLIER;
?>
</b><br/>
		  	<?php 
echo $brg->ALAMAT;
?>
<br/>
		  	<?php 
echo $brg->KOTA;
示例#9
0
 /**
  * Deletes an existing Suplier model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param string $id
  * @param string $kd_supplier
  * @return mixed
  */
 public function actionDelete($ID, $KD_SUPPLIER)
 {
     $model = Suplier::find()->where(['ID' => $ID, 'KD_SUPPLIER' => $KD_SUPPLIER])->one();
     $model->STATUS = 3;
     $model->UPDATED_BY = Yii::$app->user->identity->username;
     $model->save();
     // equivalent to $model->update();
     //        $this->findModel($ID, $KD_SUPPLIER)->delete();
     return $this->redirect(['index']);
 }