Ejemplo n.º 1
0
 public function actionPurchaseordercreate()
 {
     $model = new PurchaseOrder();
     $this->layout = $this->CheckSession();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['warehouse/purchaseorderindex', 'id' => $model->ID_PO]);
     } else {
         $id = $model->getLastIdPO();
         $model->Kode_PO = $id + 1;
         return $this->render('purchase-order/create', ['model' => $model]);
     }
 }