当前位置: 首页>>代码示例>>PHP>>正文


PHP Application_Model_GlobalClass::getProductOption方法代码示例

本文整理汇总了PHP中Application_Model_GlobalClass::getProductOption方法的典型用法代码示例。如果您正苦于以下问题:PHP Application_Model_GlobalClass::getProductOption方法的具体用法?PHP Application_Model_GlobalClass::getProductOption怎么用?PHP Application_Model_GlobalClass::getProductOption使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Application_Model_GlobalClass的用法示例。


在下文中一共展示了Application_Model_GlobalClass::getProductOption方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkInAction

 public function checkInAction()
 {
     try {
         $db = new Application_Model_DbTable_DbGlobal();
         if ($this->getRequest()->isPost()) {
             $data = $this->getRequest()->getPost();
             $recieve_order = new purchase_Model_DbTable_DbPurchaseVendor();
             if (isset($data['SaveNew'])) {
                 try {
                     $recieve_order->RecievedPurchaseOrder($data);
                     Application_Form_FrmMessage::message("Purchase has been received!");
                 } catch (Exception $e) {
                     echo $e->getMessage();
                 }
                 //Application_Form_FrmMessage::redirectUrl("/purchase/index/check-in");
                 //$this->_redirect("purchase/index/add-purchase");
             } else {
                 $recieve_order->RecievedPurchaseOrder($data);
                 $this->_redirect("/purchase/index/index");
             }
             //not yet use in this version
             // 				elseif(@$data['Save']=='Save'){
             // 					$payment_purchase_order = new purchase_Model_DbTable_DbPurchaseVendor();
             // 					$payment_purchase_order -> VendorOrder($data);
             // 					$this->_redirect("purchase/index/index");
             // 				}
             // 				elseif(@$data['New']=='New'){
             // 					$this->_redirect("purchase/index/add-purchase");
             // 				}
         }
         $user = $this->GetuserInfoAction();
         if ($user["level"] != 1 and $user["level"] != 2) {
             $this->_redirect("purchase/index/index");
         }
         $frm_purchase = new Application_Form_FrmCheckIn(null);
         $form_add_purchase = $frm_purchase->productOrder(null);
         Application_Model_Decorator::removeAllDecorator($form_add_purchase);
         $this->view->form_purchase = $form_add_purchase;
         // item option in select
         $items = new Application_Model_GlobalClass();
         $itemRows = $items->getProductOption();
         $this->view->items = $itemRows;
         //get control
         $formControl = new Application_Form_FrmAction(null);
         $formViewControl = $formControl->AllAction(null);
         Application_Model_Decorator::removeAllDecorator($formViewControl);
         $this->view->control = $formViewControl;
         // 		//for search
         // 		$search = new purchase_Form_FrmSearch();
         // 		$frmsearch= $search->formSearch();
         // 		Application_Model_Decorator::removeAllDecorator($frmsearch);
         // 		$this->view->get_frmsearch= $frmsearch;
         //for view left purchase order
         $vendor_sql = "SELECT p.order, p.all_total,p.paid,p.balance\n\t\tFROM tb_purchase_order AS p INNER JOIN tb_vendor AS v ON v.vendor_id=p.vendor_id ORDER BY p.timestamp DESC ";
         $rows = $db->getGlobalDb($vendor_sql);
         $this->view->list = $rows;
         //for add product;
         $formpopup = new Application_Form_FrmPopup(null);
         $formproduct = $formpopup->popuProduct(null);
         Application_Model_Decorator::removeAllDecorator($formproduct);
         $this->view->form = $formproduct;
         //for add vendor
         $formStockAdd = $formpopup->popupVendor(null);
         Application_Model_Decorator::removeAllDecorator($formStockAdd);
         $this->view->form_vendor = $formStockAdd;
         //for add location
         $formAdd = $formpopup->popuLocation(null);
         Application_Model_Decorator::removeAllDecorator($formAdd);
         $this->view->form_addstock = $formAdd;
     } catch (Exception $e) {
         Application_Form_FrmMessage::messageError("INSERT_ERROR", $err = $e->getMessage());
     }
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:73,代码来源:IndexController.php

示例2: updateItemalertAction

 public function updateItemalertAction()
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $id = $this->getRequest()->getParam("id");
     $dbprice = new Product_Model_DbTable_DbPrice();
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         try {
             $post = $this->getRequest()->getPost();
             $post["id"] = $id;
             $dbprice = new Product_Model_DbTable_DbPrice();
             $dbprice->updateAlertItem($post);
             $this->_redirect("/product/index/itemalert");
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("update alert message update failed !");
         }
     }
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->items = $itemRows;
     $rows = $dbprice->getAlertbyItem($id);
     $this->view->rowalert = $rows;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:23,代码来源:IndexController.php

示例3: updateSalesAction

 public function updateSalesAction()
 {
     $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0';
     if ($this->getRequest()->isPost()) {
         //just block only but can use other version
         $data = $this->getRequest()->getPost();
         // 			if($data["status"]!=="Paid"){
         // 				if(@$data['payment']!==''){
         // 					$update_payment_order = new sales_Model_DbTable_DbSalesOrder();
         // 					$update_payment_order->updateCustomerOrderPayment($data);
         // 				}
         // 				elseif(@$data['Update']=='Update'){
         // 					$update_order = new sales_Model_DbTable_DbSalesOrder();
         // 					//not yet dork stock in table inventory
         // 					$update_order->updateCustomerOrder($data);
         // 				}
         // 			}
         // 			else{
         // 				Application_Form_FrmMessage::message("Cann't Edit!Sales Order Has Been Payment Already");
         // 				Application_Form_FrmMessage::redirectUrl("/sales/sales-order/index");
         // 			}
         //for new version
         $sale_order = new sales_Model_DbTable_DbCustomerOrder();
         if (isset($data["payment"])) {
             if ($data["oldStatus"] == 6) {
                 $addOrder = new sales_Model_DbTable_DbSalesOrder();
                 $addOrder->CustomerAddOrderPayment($data);
                 Application_Form_FrmMessage::message("You has been Re-Order successe!");
                 Application_Form_FrmMessage::redirectUrl("/sales/sales-order/index");
             } else {
                 $sale_order->updateCustomerOrder($data);
                 Application_Form_FrmMessage::message("You have been Update customer order success! ");
                 Application_Form_FrmMessage::redirectUrl("/sales/sales-order/index");
             }
         } elseif (isset($data["cancel_order"])) {
             //for cancel customer order
             if ($data["oldStatus"] != 6) {
                 $sale_order->cancelCustomerOrder($data);
                 Application_Form_FrmMessage::message("You have been cancel customer order success! ");
                 Application_Form_FrmMessage::redirectUrl("/sales/sales-order/index");
             } else {
                 Application_Form_FrmMessage::message("Can not cancel again!Becuase You have been cancel customer order already!");
                 Application_Form_FrmMessage::redirectUrl("/sales/sales-order/index");
             }
             // 				$sale_order->cancelCustomerOrder($data);
             // 				Application_Form_FrmMessage::message("You have been cancel customer order success! ");
             // 				Application_Form_FrmMessage::redirectUrl("/sales/sales-order/index");
         }
     }
     $user = $this->GetuserInfoAction();
     if ($user["level"] != 1 and $user["level"] != 2) {
         $gb = new Application_Model_DbTable_DbGlobal();
         $exist = $gb->userSaleOrderExist($id, $user["location_id"]);
         if ($exist == "") {
             $this->_redirect("sales/sales-order/index");
         }
     }
     $sql = "SELECT o.order_id,o.customer_id,o.LocationId,o.order,o.sales_ref,o.date_order,o.status,o.payment_method,o.currency_id,\n\t\t\to.remark,o.net_total,o.discount_type,o.discount_value,o.paid,o.all_total,o.balance,\n\t\t\tc.contact_name,c.phone,c.add_name,c.add_remark\n\t\t\tFROM tb_sales_order AS o\n\t\t\tINNER JOIN tb_customer AS c ON c.customer_id= o.customer_id\n\t\t\tINNER JOIN tb_sales_order_item AS so ON so.order_id=o.order_id\n\t\t\tWHERE o.order_id=" . $id;
     $db = new Application_Model_DbTable_DbGlobal();
     $row = $db->getGlobalDbRow($sql);
     $formStock = new Application_Form_purchase();
     $formStockEdit = $formStock->SalesOrder($row);
     Application_Model_Decorator::removeAllDecorator($formStockEdit);
     // omit default zend html tag
     $this->view->form = $formStockEdit;
     $this->view->status_so = $row['status'];
     if ($row['status'] == 1) {
         $this->_redirect("sales/sales-order/update-customer-quote/id/{$id}");
     }
     //get item of this lost
     $orderModel = new sales_Model_DbTable_DbOrder();
     $orderDetail = $orderModel->getSalesOderID($id);
     $this->view->rowsOrder = $orderDetail;
     // item option in select
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->itemsOption = $itemRows;
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->items = $itemRows;
     // 		$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_product = $formproduct;
     //for customer
     $formpopup = $formpopup->popupCustomer(null);
     Application_Model_Decorator::removeAllDecorator($formpopup);
     $this->view->form_customer = $formpopup;
     //for add location
     $formAdd = $formpopup->popuLocation(null);
     Application_Model_Decorator::removeAllDecorator($formAdd);
     $this->view->form_addstock = $formAdd;
     $form_agent = $formpopup->popupSaleAgent(null);
     Application_Model_Decorator::removeAllDecorator($form_agent);
     $this->view->form_agent = $form_agent;
//.........这里部分代码省略.........
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:101,代码来源:SalesOrderTestController.php

示例4: adjustPriceAction

 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;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:25,代码来源:AdjustStockController.php

示例5: updateReturnItemInAction

 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();
     }
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:59,代码来源:ReturnController.php

示例6: advanceAction

 public function advanceAction()
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0';
     // 		$r = new purchase_Model_DbTable_DbPurchaseVendor();
     // 		$r->updatePurcaheToInProgress($id);
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         //print_r($data);
         if (isset($data["payment"]) == "UPDATE") {
             $update_purchase = new purchase_Model_DbTable_DbAdvance();
             $get_result = $update_purchase->updatePurchaseOrder($data);
         } elseif (isset($data["recieve_paid"])) {
             $recieve_paid = new purchase_Model_DbTable_DbAdvance();
             $result = $recieve_paid->receivePaidOrder($data);
             Application_Form_FrmMessage::message("Product have been recieved Success!!");
             Application_Form_FrmMessage::redirectUrl("/purchase/advance/advance/id/" . $id);
         } elseif (isset($data["reorder"])) {
             $reorder = new purchase_Model_DbTable_DbAdvance();
             $update_reoder = $reorder->rePurchaseOrder($data);
             Application_Form_FrmMessage::message("Product have been reoder Success!!");
         }
     }
     ///link left not yet get from DbpurchaseOrder
     // 		$session_vendor_info = new Zend_Session_Namespace('vendor_info');
     // 		$rows= $session_vendor_info->vendorinfo;
     //		print_r($rows);exit();
     $purchase = new purchase_Model_DbTable_DbPurchaseOrder();
     $rows = $purchase->purchaseInfo($id);
     $formStock = new Application_Form_purchase();
     $formpurchase_info = $formStock->productOrder($rows);
     Application_Model_Decorator::removeAllDecorator($formpurchase_info);
     // omit default zend html tag
     $this->view->form_purchase = $formpurchase_info;
     $this->view->status = $rows["status"];
     //get item of this order
     // 		$orderModel = new purchase_Model_DbTable_DbPurchaseOrder();
     // 		$orderDetail = $orderModel->getPurchaseID($id);
     // 		$this->view->rowsOrder = $orderDetail;
     $session_record_order = new Zend_Session_Namespace('record_order');
     //create in update purchase order in page indexcontroller action update
     $orderDetail = $session_record_order->orderDetail;
     $this->view->rowsOrder = $orderDetail;
     $sql = "SELECT si.order_id,CONCAT(p.item_name,' (',p.item_code,' )') AS item_name,p.qty_perunit ,p.pro_id,si.remark as pi_remark,si.qty_order,si.price,si.total_befor,si.disc_type,\n\t\tsi.disc_value,si.is_free,si.sub_total,s.discount_value,s.`remark`,s.`discount_value`,s.`paid`,s.net_total,s.`all_total`,s.`balance`\n\t\tFROM tb_purchase_order_item AS si,tb_product AS p ,tb_purchase_order AS s\n\t\t WHERE p.pro_id = si.pro_id AND si.order_id = s.order_id AND  si.order_id={$id}";
     $result = $db->getGlobalDb($sql);
     $this->view->orderItem = $result;
     // 		 if($rows['status']==4){
     // 		 	Application_Form_FrmMessage::message("You Can't Access Advance! Order Is Payment Already");
     // 		 	//$this->_redirect("/purchase/index/detail-purchase-order/id/".$id);
     // 		 }
     //for get item receive qty order
     $qty_receive = new purchase_Model_DbTable_DbPurchaseAdvance();
     $row_receive = $qty_receive->getProductReceived($id);
     //print_r($row_receive);
     $this->view->rowsreceived = $row_receive;
     // item option in select
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->itemsOption = $itemRows;
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->items = $itemRows;
     //get control
     $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 = $formproduct;
     //for add vendor
     $formStockAdd = $formpopup->popupVendor(null);
     Application_Model_Decorator::removeAllDecorator($formStockAdd);
     $this->view->form_vendor = $formStockAdd;
     //for add location
     $formAdd = $formpopup->popuLocation(null);
     Application_Model_Decorator::removeAllDecorator($formAdd);
     $this->view->form_addstock = $formAdd;
     // item option in select
     // 		$items = new Application_Model_GlobalClass();
     // 		$itemRows = $items->getProductOption();
     // 		$this->view->itemsOption = $itemRows;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:85,代码来源:AdvanceController.php

示例7: advanceTestAction

 public function advanceTestAction()
 {
     $db = new Application_Model_DbTable_DbGlobal();
     $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0';
     $r = new purchase_Model_DbTable_DbPurchaseVendor();
     $r->updatePurcaheToInProgress($id);
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
     }
     ///link left not yet get from DbpurchaseOrder
     $session_vendor_info = new Zend_Session_Namespace('vendor_info');
     $rows = $session_vendor_info->vendorinfo;
     //		print_r($rows);exit();
     // 		$purchase = new purchase_Model_DbTable_DbPurchaseOrder();
     // 		$rows = $purchase->purchaseInfo($id);
     $formStock = new Application_Form_purchase();
     $formpurchase_info = $formStock->productOrder($rows);
     Application_Model_Decorator::removeAllDecorator($formpurchase_info);
     // omit default zend html tag
     $this->view->form_purchase = $formpurchase_info;
     //get item of this order
     // 		$orderModel = new purchase_Model_DbTable_DbPurchaseOrder();
     // 		$orderDetail = $orderModel->getPurchaseID($id);
     // 		$this->view->rowsOrder = $orderDetail;
     $session_record_order = new Zend_Session_Namespace('record_order');
     //create in update purchase order in page indexcontroller action update
     $orderDetail = $session_record_order->orderDetail;
     $this->view->rowsOrder = $orderDetail;
     if ($rows['status'] == 4) {
         Application_Form_FrmMessage::message("You Can't Access Advance! Order Is Payment Already");
         //$this->_redirect("/purchase/index/detail-purchase-order/id/".$id);
     }
     //for get item receive qty order
     $qty_receive = new purchase_Model_DbTable_DbPurchaseAdvance();
     $row_receive = $qty_receive->getProductReceived($id);
     //print_r($row_receive);
     $this->view->rowsreceived = $row_receive;
     // item option in select
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->itemsOption = $itemRows;
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->items = $itemRows;
     //get control
     $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 = $formproduct;
     //for add vendor
     $formStockAdd = $formpopup->popupVendor(null);
     Application_Model_Decorator::removeAllDecorator($formStockAdd);
     $this->view->form_vendor = $formStockAdd;
     //for add location
     $formAdd = $formpopup->popuLocation(null);
     Application_Model_Decorator::removeAllDecorator($formAdd);
     $this->view->form_addstock = $formAdd;
     // item option in select
     $items = new Application_Model_GlobalClass();
     $itemRows = $items->getProductOption();
     $this->view->itemsOption = $itemRows;
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:67,代码来源:AdvanceTestController.php


注:本文中的Application_Model_GlobalClass::getProductOption方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。