/**
  * Lists all CustomercallExpired models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new CustomercallExpiredSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Esempio n. 2
0
 $searchModelStock = new ReviewInventorySearch(['TGL' => $model['TGL'], 'USER_ID' => $model['USER_ID'], 'SO_TYPE' => '5']);
 $searchModelRequest = new ReviewInventorySearch(['TGL' => $model['TGL'], 'USER_ID' => $model['USER_ID'], 'SO_TYPE' => '9']);
 $searchModelReture = new ReviewInventorySearch(['TGL' => $model['TGL'], 'USER_ID' => $model['USER_ID'], 'SO_TYPE' => '8']);
 $searchModelSellIN = new ReviewInventorySearch(['TGL' => $model['TGL'], 'USER_ID' => $model['USER_ID'], 'SO_TYPE' => '6']);
 $searchModelSellOut = new ReviewInventorySearch(['TGL' => $model['TGL'], 'USER_ID' => $model['USER_ID'], 'SO_TYPE' => '7']);
 $dataProvider = $searchModelTime->search(Yii::$app->request->queryParams);
 // USER INFO
 $dataProviderInfo = $dataProvider->getModels();
 //VISIT TIME
 $dataProviderTime = $dataProvider;
 // IMAGE VISIT
 $dataProviderImage = $dataProvider;
 // IVENTORY STOCK|RETURE|REQUEST|SELL_IN|SELL_OUT
 $inventoryProvider = new ArrayDataProvider(['allModels' => Yii::$app->db_esm->createCommand("\n\t\t\t\t\t\t\tSELECT (SELECT DISTINCT NM_BARANG FROM b0001 WHERE KD_BARANG=so_t2.KD_BARANG) AS NAME_ITEM, \n\t\t\t\t\t\t\t\t\t\t SUM(CASE WHEN SO_TYPE=5 THEN (CASE WHEN  SO_QTY<>-1 THEN SO_QTY ELSE 0 END) ELSE 0 END) as STOCK,\t\t\t\t\t\t\t\t    \n\t\t\t\t\t\t\t\t\t\t SUM(CASE WHEN SO_TYPE=6 THEN SO_QTY ELSE 0 END) as SELL_IN,\n\t\t\t\t\t\t\t\t\t\t SUM(CASE WHEN SO_TYPE=7 THEN SO_QTY ELSE 0 END) as SELL_OUT,\n\t\t\t\t\t\t\t\t\t\t SUM(CASE WHEN SO_TYPE=8 THEN SO_QTY ELSE 0 END) as RETURE,\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\t SUM(CASE WHEN SO_TYPE=9 THEN SO_QTY ELSE 0 END) as REQUEST\t\n\t\t\t\t\t\t\tFROM so_t2\n\t\t\t\t\t\t\tWHERE TGL='" . $model['TGL'] . "' AND USER_ID='" . $model['USER_ID'] . "'  GROUP BY\t KD_BARANG\n\t\t\t\t\t\t")->queryAll(), 'pagination' => ['pageSize' => 50]]);
 //EXPIRED DETAIL
 $searchModelExpired = new CustomercallExpiredSearch(['TGL_KJG' => $model['TGL'], 'USER_ID' => $model['USER_ID']]);
 $dataProviderExpired = $searchModelExpired->searchReport(Yii::$app->request->queryParams);
 //MEMO DETAIL
 $searchModelMemo = new CustomercallMemoSearch(['TGL' => $model['TGL'], 'ID_USER' => $model['USER_ID']]);
 $dataProviderMemo = $searchModelMemo->search(Yii::$app->request->queryParams);
 /* DETAIL & SUMMARY */
 //'SUMMARY_ALL','2016-05-31','','30','1'
 $aryProviderDetailSummary = '';
 // $aryProviderDetailSummary= new ArrayDataProvider([
 ////'allModels'=>Yii::$app->db_esm->createCommand("REPORT_CUSTOMERCALL_DETAIL_INVENTORY('SUMMARY_ALL','".$model['TGL']."','','".$model['USER_ID']."','1')")->queryAll(),
 // 'allModels'=>Yii::$app->db_esm->createCommand("CALL MOBILE_CUSTOMER_VISIT_inventory_summary('SUMMARY_ALL','2016-05-31','','30','1');")->queryAll(),
 // 'pagination' => [
 // 'pageSize' =>50,
 // ]
 // ]);
 /**