/**
  * Index
  * @author ptrnov  <*****@*****.**>
  * @since 1.1
  */
 public function actionIndex()
 {
     $searchModelHeader = new SoHeaderSearch();
     $dataProvider = $searchModelHeader->searchHeader(Yii::$app->request->queryParams);
     $dataProviderInbox = $searchModelHeader->searchHeaderInbox(Yii::$app->request->queryParams);
     $dataProviderOutbox = $searchModelHeader->searchHeaderOutbox(Yii::$app->request->queryParams);
     $dataProviderHistory = $searchModelHeader->searchHeaderHistory(Yii::$app->request->queryParams);
     return $this->render('index', ['apSoHeaderInbox' => $dataProviderInbox, 'apSoHeaderOutbox' => $dataProviderOutbox, 'apSoHeaderHistory' => $dataProviderHistory]);
 }
 /**
  * Index
  * @author ptrnov  <*****@*****.**>
  * @since 1.1
  */
 public function actionIndex()
 {
     if (self::getPermission()->BTN_CREATE) {
         $searchModelHeader = new SoHeaderSearch();
         $dataProvider = $searchModelHeader->searchHeader(Yii::$app->request->queryParams);
         $dataProviderInbox = $searchModelHeader->searchHeaderInbox(Yii::$app->request->queryParams);
         $dataProviderOutbox = $searchModelHeader->searchHeaderOutbox(Yii::$app->request->queryParams);
         $dataProviderHistory = $searchModelHeader->searchHeaderHistory(Yii::$app->request->queryParams);
         return $this->render('index', ['apSoHeaderInbox' => $dataProviderInbox, 'apSoHeaderOutbox' => $dataProviderOutbox, 'apSoHeaderHistory' => $dataProviderHistory]);
     } else {
         $this->redirect(array('/site/validasi'));
         //
     }
 }
 /**
  * Index
  * @author ptrnov  <*****@*****.**>
  * @since 1.1
  */
 public function actionIndex()
 {
     /* $apSalemanOrderInbox= new ArrayDataProvider([
     			'allModels'=>Yii::$app->db_esm->createCommand("
     				SELECT x1.ID,x1.TGL,x1.WAKTU_INPUT_INVENTORY,x1.CUST_KD,x1.CUST_NM,x1.KD_BARANG,x1.NM_BARANG,x1.SO_QTY,x1.SO_TYPE,x1.POS,x1.STATUS,x1.ID_GROUP,
     					#x1.HARGA_PABRIK,x1.HARGA_DIS,x1.HARGA_LG,x1.HARGA_SALES,
     					x1.KODE_REF,x1.USER_ID,x2.username,x3.NM_FIRST,x1.SUBMIT_QTY,x1.SUBMIT_PRICE,x1.NOTED,x4.ISI_MESSAGES,x5.CHECKIN_TIME,x5.CHECKOUT_TIME,
     					x6.PIC,x6.TLP1,x6.KTP,x6.NPWP,x6.SIUP,x6.ALAMAT,x6.JOIN_DATE,x6.TLP1,x6.TLP2,x8.NM_UNIT,x8.QTY AS UNIT_QTY,x7.HARGA_SALES,
     					x1.KODE_REF
     				FROM so_t2 x1 
     					LEFT JOIN dbm001.user x2 ON x2.id=x1.USER_ID
     					LEFT JOIN dbm_086.user_profile x3 ON x3.ID_USER=x2.id
     					LEFT JOIN c0014 x4 on x4.TGL=x1.TGL AND x4.ID_USER=x1.USER_ID
     					LEFT JOIN c0002scdl_detail x5 on x5.TGL=x1.TGL AND x5.CUST_ID=x1.CUST_KD
     					LEFT JOIN c0001 x6 on x6.CUST_KD=x1.CUST_KD
     					LEFT JOIN b0001 x7 on x7.KD_BARANG=x1.KD_BARANG
     					LEFT JOIN ub0001 x8 on x8.KD_UNIT=x7.KD_UNIT
     					LEFT JOIN so_0001 x9 on x9.KD_SO=x1.KODE_REF
     				WHERE x1.SO_TYPE=10
     				GROUP BY x1.TGL,x1.USER_ID,x1.CUST_KD
     			")->queryAll(),
     			'pagination' => [
     				'pageSize' => 1000,
     			]
     		]); */
     //print_r($aryProviderSalemanOrder);
     //die();
     $searchModelHeader = new SoHeaderSearch();
     $dataProvider = $searchModelHeader->searchHeader(Yii::$app->request->queryParams);
     return $this->render('index', ['apSoHeaderInbox' => $dataProvider, 'apSoHeaderOutbox' => $dataProvider, 'apSoHeaderHistory' => $dataProvider]);
 }