public function adjustPriceAction()
 {
     $db = new Application_Model_DbTable_DbGlobal();
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         if ($post['save'] !== "") {
             $adjust_price = new Product_Model_DbTable_DbAdjustStock();
             $db_result = $adjust_price->adjustPricing($post);
         }
         $this->_redirect("product/index/index");
     }
     $session_stock = new Zend_Session_Namespace('stock');
     ///view on select location form table
     $getOption = new Application_Model_GlobalClass();
     $locationRows = $getOption->getLocationOption($session_stock->stockID);
     $this->view->locationOption = $locationRows;
     ///view on select location form table
     $itemRows = $getOption->getProductOption($session_stock->stockID);
     $this->view->productOption = $itemRows;
     //for add product;
     $formpopup = new Application_Form_FrmPopup(null);
     $formproduct = $formpopup->popuProduct(null, $session_stock->stockID);
     Application_Model_Decorator::removeAllDecorator($formproduct);
     $this->view->form_product = $formproduct;
 }
 public function testAction()
 {
     //echo "this is testing only ";
     // $this->_helper->layout()->disableLayout();
     if ($this->getRequest()->getPost()) {
         $data = $this->getRequest()->getPost();
         print_r($data);
         exit;
     }
     $formProduct = new Application_Form_FrmProduct(null);
     $formStockAdd = $formProduct->AddProductForm(null);
     Application_Model_Decorator::removeAllDecorator($formStockAdd);
     $this->view->form = $formStockAdd;
     //control
     $formAddProdcut = new Application_Form_FrmAction(null);
     $FrmAdd = $formAddProdcut->AllAction(null);
     Application_Model_Decorator::removeAllDecorator($FrmAdd);
     $this->view->control = $FrmAdd;
     ///view on select form
     $items = new Application_Model_GlobalClass();
     $locationRows = $items->getLocationOption();
     $this->view->locations = $locationRows;
     //for add location
     $formpopup = new Application_Form_FrmPopup(null);
     $formAdd = $formpopup->popuLocation(null);
     Application_Model_Decorator::removeAllDecorator($formAdd);
     $this->view->form_addstock = $formAdd;
     $form_catory = $formpopup->popupCategory(null);
     Application_Model_Decorator::removeAllDecorator($form_catory);
     $this->view->form_category = $form_catory;
 }
 public function updateReturnItemInAction()
 {
     try {
         $session_stock = new Zend_Session_Namespace('stock');
         $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0';
         if ($this->getRequest()->isPost()) {
             $data = $this->getRequest()->getPost();
             if ($data['Save']) {
                 $update_return = new purchase_Model_DbTable_DbReturnItem();
                 $update_return->updateReturnItemIn($data);
                 $this->_redirect("/purchase/return/return-in");
                 Application_Form_FrmMessage::message("Update Success full");
             }
         }
         // 		$purchase = new purchase_Model_DbTable_DbPurchaseOrder();
         // 		$rows = $purchase->purchaseInfo($id);
         // 		$db = new Application_Model_DbTable_DbGlobal();
         $returnModel = new purchase_Model_DbTable_DbSQLReturnItem();
         $row_info = $returnModel->returnVendorInfoIn($id);
         $get_form = new Application_Form_FrmReturnItem();
         $session_stock = new Zend_Session_Namespace('stock');
         $frm_return = $get_form->returnItemInFrm($row_info);
         Application_Model_Decorator::removeAllDecorator($frm_return);
         $this->view->form_return = $frm_return;
         //get qty of return item
         $getReturnItem = $returnModel->getReturnItemIn($id);
         $this->view->returnItemDetail = $getReturnItem;
         //print_r($getReturnItem);exit();
         //get return item
         $getOption = new Application_Model_GlobalClass();
         $locationRows = $getOption->getLocationOption();
         $this->view->locationOption = $locationRows;
         //print_r($locationRows);exit();
         $itemRows = $getOption->getProductOption();
         $this->view->productOption = $itemRows;
         //print_r($itemRows);exit();
         $formControl = new Application_Form_FrmAction(null);
         $formViewControl = $formControl->AllAction(null);
         Application_Model_Decorator::removeAllDecorator($formViewControl);
         $this->view->control = $formViewControl;
         //for add product;
         $formpopup = new Application_Form_FrmPopup(null);
         $formproduct = $formpopup->popuProduct(null);
         Application_Model_Decorator::removeAllDecorator($formproduct);
         $this->view->form_add_product = $formproduct;
         //for add vendor
         $formvendor = $formpopup->popupVendor(null);
         Application_Model_Decorator::removeAllDecorator($formvendor);
         $this->view->form_vendor = $formvendor;
         //for add location
         $formAdd = $formpopup->popuLocation(null);
         Application_Model_Decorator::removeAllDecorator($formAdd);
         $this->view->form_addstock = $formAdd;
         //for link advane
         $this->view->getorder_id = $id;
     } catch (Exception $e) {
         echo $e->getMessage();
     }
 }