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


PHP Application_Model_GlobalClass::getStatusType方法代码示例

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


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

示例1: indexAction

 public function indexAction()
 {
     $formFilter = new Application_Form_Frmsearch();
     $this->view->formFilter = $formFilter;
     Application_Model_Decorator::removeAllDecorator($formFilter);
     $list = new Application_Form_Frmlist();
     $db = new Application_Model_DbTable_DbGlobal();
     // 		$vendor_sql = "SELECT p.order_id, p.order, p.date_order, p.status, v.v_name, p.all_total,u.username
     // 						FROM tb_purchase_order AS p ,
     // 						tb_vendor AS v,rsv_acl_user u
     // 		                WHERE v.vendor_id=p.vendor_id AND u.user_id = p.user_mod ";
     $vendor_sql = "SELECT \n\t\t\t\t  p.order_id,\n\t\t\t\t  p.order,\n\t\t\t\t  p.date_order,\n\t\t\t\t  p.status,\n\t\t\t\t  (SELECT v.v_name FROM tb_vendor AS v WHERE v.vendor_id = p.vendor_id) AS VendorName,\n\t\t\t\t  p.all_total,\n\t\t\t\t  (SELECT u.username FROM rsv_acl_user AS u WHERE u.user_id = p.user_mod) AS userName\n\t\t\t\t  FROM tb_purchase_order AS p WHERE 1";
     $user = $this->GetuserInfoAction();
     $str_condition = " AND p.LocationId";
     $vendor_sql .= $db->getAccessPermission($user["level"], $str_condition, $user["location_id"]);
     $this->view->level = $user["level"];
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         //echo $post["order"];
         if ($post['order'] != '') {
             $vendor_sql .= " AND p.order LIKE '%" . $post['order'] . "%'";
         }
         if ($post['vendor_name'] != '' and $post['vendor_name'] != 0) {
             $vendor_sql .= " AND p.vendor_id =" . $post['vendor_name'];
         }
         // 				if($post['phone'] !=''){
         // 					$vendor_sql .= " AND v.phone LIKE '%".$post['phone']."%'";
         // 				}
         if ($post['status'] != '') {
             $vendor_sql .= " AND p.status =" . $post['status'];
         }
         $start_date = $post['search_start_date'];
         $end_date = $post['search_end_date'];
         if ($start_date != "" && $end_date != "" && strtotime($end_date) >= strtotime($start_date)) {
             $vendor_sql .= " AND p.date_order BETWEEN '{$start_date}' AND '{$end_date}'";
         }
     } else {
         $vendor_sql .= " AND p.status=4 ";
     }
     //echo $vendor_sql;exit();
     $vendor_sql .= " ORDER BY p.order_id DESC";
     //**************************************
     $rows = $db->getGlobalDb($vendor_sql);
     //print_r($rows);exit();
     $glClass = new Application_Model_GlobalClass();
     $rows = $glClass->getStatusType($rows, BASE_URL, true);
     $columns = array("PURCHASE_ORDER_CAP", "ORDER_DATE_CAP", "STATUS_CAP", "VENDOR_NAME_CAP", "TOTAL_CAP_DOLLAR", strtoupper("BY_USER_CAP"));
     $link = array('module' => 'purchase', 'controller' => 'index', 'action' => 'detail-purchase-order');
     // url link to update purchase order
     $urlEdit = BASE_URL . "/purchase/index/update-purchase-order";
     $this->view->list = $list->getCheckList(1, $columns, $rows, array('order' => $link), $urlEdit);
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:52,代码来源:IndexController.php

示例2: indexAction

 public function indexAction()
 {
     $formFilter = new Application_Form_Frmsearch();
     $this->view->formFilter = $formFilter;
     $list = new Application_Form_Frmlist();
     $db = new Application_Model_DbTable_DbGlobal();
     $sale_order_sql = "SELECT o.order_id,o.order,o.date_order, o.status,c.cust_name, o.all_total, u.username\n\t\t\t\t\t  FROM tb_sales_order AS o ,tb_customer AS c, rsv_acl_user AS u\n\t\t\t\t\t  WHERE c.customer_id=o.customer_id AND o.user_mod = u.user_id ";
     // 		$sale_order_sql = "SELECT o.order_id,o.order,o.date_order, o.status,c.cust_name, o.all_total, o.paid,o.balance
     // 		FROM tb_sales_order AS o INNER JOIN tb_customer AS c ON c.customer_id=o.customer_id";
     $user = $this->GetuserInfoAction();
     $str_condition = " AND o.LocationId";
     $sale_order_sql .= $db->getAccessPermission($user["level"], $str_condition, $user["location_id"]);
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         //echo $post["order"];
         if ($post['order'] != '') {
             $sale_order_sql .= " AND o.order LIKE '%" . $post['order'] . "%'";
         }
         // 			if($post['customer_id'] !=''){
         // 				$sale_order_sql .= " AND c.customer_id LIKE '%".$post['customer_id']."%'";
         // 			}
         if ($post['sale_agent_id'] != '' and $post['sale_agent_id'] != 0) {
             $sale_order_sql .= " AND o.sales_ref = " . $post['sale_agent_id'];
         }
         if ($post['status'] != '') {
             $sale_order_sql .= " AND o.status =" . $post['status'];
         }
         $start_date = $post['search_start_date'];
         $end_date = $post['search_end_date'];
         if ($start_date != "" && $end_date != "" && strtotime($end_date) >= strtotime($start_date)) {
             $sale_order_sql .= " AND o.date_order BETWEEN '{$start_date}' AND '{$end_date}'";
         }
     } else {
         //$sale_order_sql.="";
     }
     $sale_order_sql .= " ORDER BY o.order_id DESC";
     $rows = $db->getGlobalDb($sale_order_sql);
     $glClass = new Application_Model_GlobalClass();
     $rows = $glClass->getStatusType($rows, BASE_URL, true);
     $columns = array("ORDER_ADD_CAP", "ORDER_DATE_CAP", "STATUS_CAP", "CON_NAME_CAP", "TOTAL_CAP_DOLLAR", "BY_USER_CAP");
     //$columns=array("ORDER_ADD_CAP","ORDER_DATE_CAP","STATUS_CAP", "CON_NAME_CAP","TOTAL_CAP_DOLLAR","PAID_DOLLAR_CAP","BALANCE_CAP");
     $link = array('module' => 'sales', 'controller' => 'sales-order', 'action' => 'detail-sales-order');
     $urlEdit = BASE_URL . "/sales/sales-order/update-sales";
     $this->view->list = $list->getCheckList(1, $columns, $rows, array('order' => $link, 'cust_name' => $link, 'contact_name' => $link), $urlEdit);
     Application_Model_Decorator::removeAllDecorator($formFilter);
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:46,代码来源:SalesOrderTestController.php

示例3: indexAction

 public function indexAction()
 {
     $formFilter = new Application_Form_Frmsearch();
     $this->view->formFilter = $formFilter;
     Application_Model_Decorator::removeAllDecorator($formFilter);
     $list = new Application_Form_Frmlist();
     $db = new Application_Model_DbTable_DbGlobal();
     $vendor_sql = "SELECT p.order_id, p.order, p.date_order, p.status, v.v_name, p.all_total,p.paid,p.balance\n\t\t\t\t\t\tFROM tb_purchase_order AS p INNER JOIN tb_vendor AS v ON v.vendor_id=p.vendor_id ";
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         //echo $post["order"];
         if ($post['order'] != '') {
             $vendor_sql .= " AND p.order LIKE '%" . $post['order'] . "%'";
         }
         if ($post['vendor_name'] != '') {
             $vendor_sql .= " AND v.vendor_id =" . $post['vendor_name'];
         }
         if ($post['phone'] != '') {
             $vendor_sql .= " AND v.phone LIKE '%" . $post['phone'] . "%'";
         }
         if ($post['status'] != '') {
             $vendor_sql .= " AND p.status =" . $post['status'];
         }
         $start_date = $post['search_start_date'];
         $end_date = $post['search_end_date'];
         if ($start_date != "" && $end_date != "" && strtotime($end_date) >= strtotime($start_date)) {
             $vendor_sql .= " AND p.date_order BETWEEN '{$start_date}' AND '{$end_date}'";
         }
     }
     $vendor_sql .= " ORDER BY p.timestamp DESC";
     $rows = $db->getGlobalDb($vendor_sql);
     $glClass = new Application_Model_GlobalClass();
     $rows = $glClass->getStatusType($rows, BASE_URL, true);
     $columns = array("PURCHASE_ORDER_CAP", "ORDER_DATE_CAP", "STATUS_CAP", "VENDOR_NAME_CAP", "TOTAL_CAP_DOLLAR", "PAID_DOLLAR_CAP", "BALANCE_CAP");
     $link = array('module' => 'purchase', 'controller' => 'index', 'action' => 'detail-purchase-order');
     $urlEdit = BASE_URL . "/purchase/index/update-purchase-order";
     $this->view->list = $list->getCheckList(1, $columns, $rows, array('order' => $link), $urlEdit);
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:38,代码来源:AdvanceController.php

示例4: productDetailAction

 public function productDetailAction()
 {
     if ($this->getRequest()->getParam('id')) {
         $id = $this->getRequest()->getParam('id') ? $this->getRequest()->getParam('id') : '0';
         //if user type wrong url
         $user = $this->GetuserInfoAction();
         $gb = new Application_Model_DbTable_DbGlobal();
         if ($user["level"] != 1 and $user["level"] != 2) {
             $exist = $gb->productLocation($id, $user["location_id"]);
             if ($exist == "") {
                 $this->_redirect("product/index/index");
             }
         } else {
             $pro_exist = $gb->myProductExist($id);
             if (!$pro_exist) {
                 $this->_redirect("product/index/index");
             }
         }
         $session_stock = new Zend_Session_Namespace('stock');
         $productinfo = new Product_Model_DbTable_DbProduct();
         //get product info detail
         $getpro_info_rows = $productinfo->getProductInfoDetail($id);
         if ($getpro_info_rows['photo'] == "") {
             $getpro_info_rows['photo'] = "no-img.gif";
         }
         $this->view->photo = $getpro_info_rows['photo'];
         $this->view->form = $getpro_info_rows;
         //for view product loaction 22/8/13
         $orderDetail = $productinfo->getOrderItemVeiw($id);
         $this->view->lostItemDetail = $orderDetail;
         //for product in stock 22/8/13
         if ($user["level"] == 1 or $user["level"] == 2) {
             $rowproduct = $productinfo->getProductStock($id);
             $this->view->pro_qty = $rowproduct;
         }
         //get product move history 23/8/13
         $rows = $productinfo->moveproduct($id);
         $list = new Application_Form_Frmlist();
         $glClass = new Application_Model_GlobalClass();
         $rows = $glClass->getTransactionType($rows, BASE_URL, true);
         $columns = array("TRANSACTION_TYPE_CAP", "DATE_CAP", "LOCATION_NAME_CAP", "QTY_CAP", "QTY_BEFORE_CAP", "QTY_AFTER_CAP", "REMARK_CAP", "BY_USER_CAP");
         $link = array('module' => 'product', 'controller' => 'index', 'action' => 'update');
         $this->view->list_history = $list->getCheckList(1, $columns, $rows);
         //view sale order history
         $row_sale_history = $productinfo->getSaleHistory($id);
         $glClass = new Application_Model_GlobalClass();
         $row_sale_history = $glClass->getTypeHistory($row_sale_history, BASE_URL, true);
         $row_sale_history = $glClass->getStatusType($row_sale_history, BASE_URL, true);
         $columns1 = array("TYPE_CAP", "ORDER_ADD_CAP", "CUSTOMER_CAP", "ORDER_DATE_CAP", "ORDER_STATUS_CAP", "TOTAL_PRICE_CAP", "QTY_CAP", "UNIT_PRICE_CAP", "SUB_TOTAL_CAP");
         $link1 = array('module' => 'product', 'controller' => 'index', 'action' => 'update');
         $list = new Application_Form_Frmlist();
         $this->view->list_order_history = $list->getCheckList(1, $columns1, $row_sale_history, array('item_name' => $link1, 'Name' => $link1), "", "items", "left", false, "move_history");
         //for purchase history
         $row_purchase_history = $productinfo->getPurchaseHistory($id);
         $glClass = new Application_Model_GlobalClass();
         $row_purchase_history = $glClass->getTypeHistory($row_purchase_history, BASE_URL, true);
         $row_purchase_history = $glClass->getStatusType($row_purchase_history, BASE_URL, true);
         $columns1 = array("TYPE_CAP", "ORDER_ADD_CAP", "VENDOR_CAP", "ORDER_DATE_CAP", "ORDER_STATUS_CAP", "TOTAL_PRICE_CAP", "QTY_CAP", "UNIT_PRICE_CAP", "SUB_TOTAL_CAP");
         $link_pur = array('module' => 'product', 'controller' => 'index', 'action' => 'update');
         $list = new Application_Form_Frmlist();
         $this->view->list_purchase_history = $list->getCheckList(1, $columns1, $row_purchase_history, array('item_name' => $link_pur, 'Name' => $link_pur), "", "items", "left", false, "purchase_history");
     }
 }
开发者ID:pingitgroup,项目名称:stockpingitgroup,代码行数:63,代码来源:IndexController.php


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