Beispiel #1
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('a0001.CORP_NM LIKE "%' . $this->nmgroup . '%"');
     }]);
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $dataProvider->setSort(['attributes' => ['KD_SUPPLIER', 'NM_SUPPLIER', 'ALAMAT', 'KOTA', 'nmgroup' => ['asc' => ['a0001.CORP_NM' => SORT_ASC], 'desc' => ['a0001.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;
 }
Beispiel #2
0
?>

<style type="text/css">
    td {vertical-align: top; padding: 2px;}
</style>

<div class="purchaseorder-view" style="margin:0px 20px;">
<br/><br/>

    <?php 
echo Html::a('<i class="fa fa-print fa-fw"></i> PDF', ['cetakpdf', 'kdpo' => $model->KD_PO], ['target' => '_blank', 'class' => 'btn btn-warning']);
?>


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

    <center>
        <h3 style="margin:0px;"><u>Purchase Order</u></h3>
        <h4 style="margin:0px;">No. <?php 
echo $model->KD_PO;
?>
</h4>
    </center>

    <br/>
    <div class="row">
      <div class="col-xs-12 col-sm-6 col-md-6">
Beispiel #3
0
	<?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()->where(['STATUS' => 1])->all(), 'KD_UNIT', 'NM_UNIT');
?>
    <?php 
echo $form->field($model, 'KD_UNIT')->dropDownList($drop, ['prompt' => ' -- Pilih Salah Satu --'])->label('Unit');
?>

	<?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');
?>

    <?php 
echo $form->field($model, 'PARENT')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'HPP')->textInput();
?>

    <?php 
echo $form->field($model, 'HARGA')->textInput();
Beispiel #4
0
	? -->
<form  id="cpo" method="post" action="../purchaseorder/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;
Beispiel #5
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']);
 }