/**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $supplier = new Supplier('searchwstatus');
     $supplier->unsetAttributes();
     // clear any default values
     if (isset($_GET['Supplier'])) {
         $supplier->attributes = $_GET['Supplier'];
     }
     $product = new Product('searchwstatus');
     $product->unsetAttributes();
     // clear any default values
     if (isset($_GET['Product'])) {
         $product->attributes = $_GET['Product'];
     }
     $purchasinggroup = new Purchasinggroup('searchwstatus');
     $purchasinggroup->unsetAttributes();
     // clear any default values
     if (isset($_GET['Purchasinggroup'])) {
         $purchasinggroup->attributes = $_GET['Purchasinggroup'];
     }
     $currency = new Currency('searchwstatus');
     $currency->unsetAttributes();
     // clear any default values
     if (isset($_GET['Currency'])) {
         $currency->attributes = $_GET['Currency'];
     }
     $model = new Purchinforec();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'supplier' => $supplier, 'product' => $product, 'purchasinggroup' => $purchasinggroup, 'currency' => $currency), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $model = new Maritalstatus();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Company();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'currency' => $this->currency, 'city' => $this->city), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Onleavetype();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'snro' => $this->snro, 'absstatus' => $this->absstatus), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $model = new Userfav();
     $this->lookupdata();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'menuaccess' => $this->menuaccess, 'useraccess' => $this->useraccess), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Jobs();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'orgstructure' => $this->orgstructure, 'position' => $this->position), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Catalogsys();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'language' => $this->language), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Accounttype();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'parentaccounttype' => $this->parentaccounttype), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Wfgroup();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'workflow' => $this->workflow, 'groupaccess' => $this->groupaccess), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $model = new Tax();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Employeeschedule();
     $model->recordstatus = 1;
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'employee' => $this->employee), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Productdetail();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'product' => $this->product, 'currency' => $this->currency, 'unitofmeasure' => $this->unitofmeasure, 'sloc' => $this->sloc, 'materialstatus' => $this->materialstatus, 'ownership' => $this->ownership), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Giheader();
     $model->recordstatus = 1;
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'giheaderid' => $model->giheaderid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'gidetail' => $this->gidetail), true)));
             Yii::app()->end();
         }
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Prheader();
     $model->recordstatus = Wfgroup::model()->findstatusbyuser('inspr');
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'prheaderid' => $model->prheaderid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'prmaterial' => $this->prmaterial), true)));
             Yii::app()->end();
         }
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Deliveryadvice();
     $model->recordstatus = Wfgroup::model()->findstatusbyuser('insda');
     $model->useraccessid = Useraccess::model()->findbysql("select * from useraccess \n        where upper(username)=upper('" . Yii::app()->user->name . "')")->useraccessid;
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'deliveryadviceid' => $model->deliveryadviceid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'deliveryadvicedetail' => $this->deliveryadvicedetail), true)));
             Yii::app()->end();
         }
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Genjournal();
     $model->journaldate = new CDbExpression('NOW()');
     $model->postdate = new CDbExpression('NOW()');
     $model->recordstatus = Wfgroup::model()->findstatusbyuser('insjournal');
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'genjournalid' => $model->genjournalid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'journaldetail' => $this->journaldetail), true)));
             Yii::app()->end();
         }
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $this->lookupdata();
     $model = new Soheader();
     $model->recordstatus = Wfgroup::model()->findstatusbyuser('insso');
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'soheaderid' => $model->soheaderid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'sodetail' => $this->sodetail), true)));
             Yii::app()->end();
         }
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $purchasingorg = new Purchasingorg('searchwstatus');
     $purchasingorg->unsetAttributes();
     // clear any default values
     if (isset($_GET['Purchasingorg'])) {
         $purchasingorg->attributes = $_GET['Purchasingorg'];
     }
     $model = new Purchasinggroup();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'purchasingorg' => $purchasingorg), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $subdistrict = new Subdistrict('searchwstatus');
     $subdistrict->unsetAttributes();
     // clear any default values
     if (isset($_GET['Subdistrict'])) {
         $subdistrict->attributes = $_GET['Subdistrict'];
     }
     $model = new Kelurahan();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'subdistrict' => $subdistrict), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $snro = new Snro('searchwstatus');
     $snro->unsetAttributes();
     // clear any default values
     if (isset($_GET['Snro'])) {
         $snro->attributes = $_GET['Snro'];
     }
     $model = new Permitin();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'div' => $this->renderPartial('_form', array('model' => $model, 'snro' => $snro), true)));
         Yii::app()->end();
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $grdetail = new Grdetail('search');
     $grdetail->unsetAttributes();
     // clear any default values
     if (isset($_GET['Grdetail'])) {
         $grdetail->attributes = $_GET['Grdetail'];
     }
     $model = new Grheader();
     $model->recordstatus = Wfgroup::model()->findstatusbyuser('insgr');
     if (Yii::app()->request->isAjaxRequest) {
         if ($model->save()) {
             echo CJSON::encode(array('status' => 'success', 'grheaderid' => $model->grheaderid, 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'grdetail' => $grdetail), true)));
             Yii::app()->end();
         }
     }
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     parent::actionCreate();
     $parentmatgroup = new Materialgroup('searchwstatus');
     $parentmatgroup->unsetAttributes();
     // clear any default values
     if (isset($_GET['Parentmatgroup'])) {
         $parentmatgroup->attributes = $_GET['Parentmatgroup'];
     }
     $materialtype = new Materialtype('searchwstatus');
     $materialtype->unsetAttributes();
     // clear any default values
     if (isset($_GET['Materialtype'])) {
         $materialtype->attributes = $_GET['Materialtype'];
     }
     $model = new Materialgroup();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_form', array('model' => $model, 'parentmatgroup' => $parentmatgroup, 'materialtype' => $materialtype), true)));
         Yii::app()->end();
     }
 }
 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate()
 {
     parent::actionCreate();
     $id = $_POST['id'];
     $model = $this->loadModel($id[0]);
     $this->lookupdata();
     // Uncomment the following line if AJAX validation is needed
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'cashbankid' => $model->cashbankid, 'invoiceid' => $model->invoiceid, 'transdate' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->transdate)), 'invoiceno' => $model->invoice !== null ? $model->invoice->invoiceno : "", 'amount' => $model->amount, 'description' => $model->description, 'currencyid' => $model->currencyid, 'currencyname' => $model->currency !== null ? $model->currency->currencyname : "", 'currencyrate' => $model->currencyrate, 'div' => $this->renderPartial('_form', array('model' => $model, 'cashbankacc' => $this->cashbankacc), true)));
         Yii::app()->end();
     }
 }
 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate()
 {
     parent::actionCreate();
     $id = $_POST['id'];
     $model = $this->loadModel($id[0]);
     $this->lookupdata();
     // Uncomment the following line if AJAX validation is needed
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'employeeid' => $model->employeeid, 'addressbookid' => $model->addressbookid, 'fullname' => $model->fullname, 'oldnik' => $model->oldnik, 'orgstructureid' => $model->orgstructureid, 'structurename' => $model->orgstructure !== null ? $model->orgstructure->structurename : "", 'positionid' => $model->positionid, 'positionname' => $model->position !== null ? $model->position->positionname : "", 'employeetypeid' => $model->employeetypeid, 'employeetypename' => $model->employeetype !== null ? $model->employeetype->employeetypename : "", 'sexid' => $model->sexid, 'sexname' => $model->sex !== null ? $model->sex->sexname : "", 'birthcityid' => $model->birthcityid, 'birthcityname' => $model->birthcity !== null ? $model->birthcity->cityname : "", 'birthdate' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->birthdate)), 'religionid' => $model->religionid, 'religionname' => $model->religion !== null ? $model->religion->religionname : "", 'maritalstatusid' => $model->maritalstatusid, 'maritalstatusname' => $model->maritalstatus !== null ? $model->maritalstatus->maritalstatusname : "", 'referenceby' => $model->referenceby, 'joindate' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->joindate)), 'employeestatusid' => $model->employeestatusid, 'employeestatusname' => $model->employeestatus !== null ? $model->employeestatus->employeestatusname : "", 'istrial' => $model->istrial, 'resigndate' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->resigndate)), 'levelorgid' => $model->levelorgid, 'levelorgname' => $model->levelorg !== null ? $model->levelorg->levelorgname : "", 'taxno' => $model->taxno, 'accountno' => $model->accountno, 'div' => $this->renderPartial('_form', array('model' => $model, 'employeeaddress' => $this->employeeaddress, 'employeeeducation' => $this->employeeeducation, 'employeeinformal' => $this->employeeinformal, 'employeewo' => $this->employeewo, 'employeefamily' => $this->employeefamily), true)));
         Yii::app()->end();
     }
 }
 public function actionCreatecontact()
 {
     parent::actionCreate();
     $this->lookupdata();
     $insurancecontact = new Insurancecontact();
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'divcreate' => $this->renderPartial('_formcontact', array('model' => $insurancecontact), true)));
         Yii::app()->end();
     }
 }
 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate()
 {
     parent::actionCreate();
     $id = $_POST['id'];
     $model = $this->loadModel($id[0]);
     $this->lookupdata();
     // Uncomment the following line if AJAX validation is needed
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'invoiceid' => $model->invoiceid, 'addressbookid' => $model->addressbookid, 'invoicedate' => date(Yii::app()->params['dateviewfromdb'], strtotime($model->invoicedate)), 'fullname' => $model->customer !== null ? $model->customer->fullname : "", 'amount' => $model->amount, 'invoiceno' => $model->invoiceno, 'pono' => $model->pono, 'headernote' => $model->headernote, 'currencyid' => $model->currencyid, 'currencyname' => $model->currency !== null ? $model->currency->currencyname : "", 'taxid' => $model->taxid, 'taxcode' => $model->tax !== null ? $model->tax->taxcode : "", 'paymentmethodid' => $model->paymentmethodid, 'paycode' => $model->paymentmethod !== null ? $model->paymentmethod->paycode : "", 'rate' => $model->rate, 'div' => $this->renderPartial('_form', array('model' => $model, 'invoicedet' => $this->invoicedet, 'invoiceacc' => $this->invoiceacc), true)));
         Yii::app()->end();
     }
 }
 /**
  * Updates a particular model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id the ID of the model to be updated
  */
 public function actionUpdate()
 {
     parent::actionCreate();
     $id = $_POST['id'];
     $model = $this->loadModel($id[0]);
     $this->lookupdata();
     // Uncomment the following line if AJAX validation is needed
     if (Yii::app()->request->isAjaxRequest) {
         echo CJSON::encode(array('status' => 'success', 'productid' => $model->productid, 'productname' => $model->productname, 'isstock' => $model->isstock, 'recordstatus' => $model->recordstatus, 'div' => $this->renderPartial('_form', array('model' => $model, 'productacc' => $this->productacc, 'productbasic' => $this->productbasic, 'productconversion' => $this->productconversion, 'productplant' => $this->productplant, 'productpurchase' => $this->productpurchase), true)));
         Yii::app()->end();
     }
 }