Example #1
0
 public function loginformsa_saved()
 {
     if ($this->validate()) {
         $saHeader = Salesorder::find()->where(['KD_SA' => $this->kdsa])->one();
         $profile = Yii::$app->getUserOpt->Profile_user();
         $saHeader->STATUS = $this->status;
         $saHeader->SIG2_SVGBASE64 = $profile->emp->SIGSVGBASE64;
         $saHeader->SIG2_SVGBASE30 = $profile->emp->SIGSVGBASE30;
         $saHeader->SIG2_NM = $profile->emp->EMP_NM . ' ' . $profile->emp->EMP_NM_BLK;
         $saHeader->SIG2_TGL = date('Y-m-d');
         if ($saHeader->save()) {
             return $saHeader;
         }
         return $saHeader;
     }
     return null;
 }
Example #2
0
 public function getParentsa()
 {
     return $this->hasOne(Salesorder::className(), ['KD_SA' => 'KD_SA']);
 }
Example #3
0
 /**
  * Finds the Salesorder model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return Salesorder the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Salesorder::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Example #4
0
 public function carisa($params)
 {
     $query = Salesorder::find()->where("sa0001.status <> 3 and sa0001.status <> 0");
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $dataProvider->setSort(['attributes' => ['KD_SA']]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['like', 'KD_SA', $this->KD_SA]);
     return $dataProvider;
 }