public function addAction() { if ($this->getRequest()->isPost()) { $_data = $this->getRequest()->getPost(); $_model = new Registrar_Model_DbTable_DbwuRegister(); //print_r($_data);exit(); $_model->AddNewStudent($_data); } $frm = new Registrar_Form_FrmRegister(); $frm_register = $frm->FrmRegistarWU(); Application_Model_Decorator::removeAllDecorator($frm_register); $this->view->frm_register = $frm_register; // $_marjor =array(); // $this->view->marjorlist = $_marjor; // $model = new Application_Model_DbTable_DbGlobal(); // $_marjorlist = $model->getMarjorById(); // $this->view->marjorlist = $_marjorlist; $key = new Application_Model_DbTable_DbKeycode(); $this->view->keycode = $key->getKeyCodeMiniInv(TRUE); $model = new Application_Form_FrmGlobal(); $this->view->footer = $model->getReceiptFooter(); $this->view->invoice_no = Application_Model_GlobalClass::getInvoiceNo(); // echo Application_Model_GlobalClass::getInvoiceNo(); $__student_card = array(); $this->view->student_card = $__student_card; $db = new Registrar_Model_DbTable_DbwuRegister(); $this->view->invoice_num = $db->getGaneratInvoiceWU(); // echo $db->getGaneratInvoiceWU(); }
public function wuRegisterAction() { $frm = new Registrar_Form_FrmRegister(); $frm_register = $frm->FrmRegistarWU(); Application_Model_Decorator::removeAllDecorator($frm_register); $this->view->frm_register = $frm_register; // $_marjor = array(); // array_unshift($_marjor, array ( 'id' => -1, 'name' => 'បន្ថែមអ្នកទទួលថ្មី') ); // $this->view->marjorlist = $_marjor; $key = new Application_Model_DbTable_DbKeycode(); $this->view->keycode = $key->getKeyCodeMiniInv(TRUE); $model = new Application_Form_FrmGlobal(); $this->view->footer = $model->getReceiptFooter(); }
public function addBrandAction() { $category = new Product_Model_DbTable_DbProduct(); if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); //print_r($data);exit(); $addcategory = $category->addBrand($data); Application_Form_FrmMessage::message("Brand Name Has Been Saved !"); Application_Form_FrmMessage::redirectUrl('/product/index/brand'); } $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0'; if ($id) { //view update if get id $rows = $category->getBrandName($id); $frmcategory = new Application_Form_FrmInclude($rows); $frmcate = $frmcategory->addBrand($rows); $action = BASE_URL . "/product/index/update-brand"; } else { $frmcategory = new Application_Form_FrmInclude(null); $frmcate = $frmcategory->addBrand(null); $action = BASE_URL . "/product/index/add-brand"; } Application_Model_Decorator::removeAllDecorator($frmcate); $method = "post"; $url_cancel = BASE_URL . "/product/index/brand"; $frm = new Application_Form_FrmGlobal(); $this->view->formVendor = $frm->getForm1($action, $method, $url_cancel, $frmcate, 'MENU_PRODUCT_INDEX_ADD_BRAND'); }
public function addTypePriceAction() { $dbprice = new Product_Model_DbTable_DbPrice(); if ($this->getRequest()->isPost()) { $data = $this->getRequest()->getPost(); $dbprice->addPriceType($data); Application_Form_FrmMessage::message("Price type has been saved! "); } $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0'; $frm = new Product_Form_FrmItemPrice(null); if ($id) { $row = $dbprice->getTypePrice($id); $frmpricetype = $frm->AddClassPrice($row); //Application_Form_FrmMessage::message("Price type has been saved! "); $action = BASE_URL . "/product/adjust-stock/update-type-price"; } else { $frmpricetype = $frm->AddClassPrice(null); $action = BASE_URL . "/product/adjust-stock/add-type-price"; } Application_Model_Decorator::removeAllDecorator($frmpricetype); $method = "post"; $url_cancel = BASE_URL . "/product/adjust-stock/type-price"; $frmgenerate = new Application_Form_FrmGlobal(); $this->view->formVendor = $frmgenerate->getForm1($action, $method, $url_cancel, $frmpricetype, 'TYPE_PRICE'); }