Esempio n. 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;
 }
Esempio n. 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">
Esempio n. 3
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;
Esempio n. 4
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();
Esempio n. 5
0
 public function getSuplier()
 {
     return $this->hasOne(Suplier::className(), ['KD_SUPPLIER' => 'KD_SUPPLIER']);
 }
Esempio n. 6
0
 /**
  * Finds the Suplier model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @param string $kd_supplier
  * @return Suplier the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($ID, $KD_SUPPLIER)
 {
     if (($model = Suplier::findOne(['ID' => $ID, 'KD_SUPPLIER' => $KD_SUPPLIER])) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }