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'); }