Example #1
0
 public function actionSalesordercreate()
 {
     $model = new SalesOrder();
     $this->layout = $this->CheckSession();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['warehouse/salesorderindex', 'id' => $model->ID_SO]);
     } else {
         $id = $model->getLastIdSO();
         $model->Kode_SO = $id + 1;
         return $this->render('sales-order/create', ['model' => $model]);
     }
 }