Ejemplo n.º 1
0
 public function updatePriceByPriceId($price_id)
 {
     $priceData = $this->fetchRow("id = " . $price_id)->toArray();
     $priceItemModel = new Erp_Model_Sale_Priceitems();
     $items = $priceItemModel->getItems($price_id);
     foreach ($items as $item) {
         $priceItemModel->update(array('active' => 1), "id = " . $item['items_id']);
         $priceItemModel->inactivePrice($price_id, $priceData['customer_id'], $item['items_type'], $item['items_code']);
     }
 }
Ejemplo n.º 2
0
 public function dataAction()
 {
     $data = array();
     $request = $this->getRequest()->getParams();
     $customer_id = isset($request['customer_id']) ? $request['customer_id'] : null;
     $code = isset($request['code']) ? $request['code'] : null;
     $show_inactive = isset($request['show_inactive']) && $request['show_inactive'] == 'true' ? true : false;
     $priceListModel = new Erp_Model_Sale_Priceitems();
     $data = $priceListModel->getPriceList($customer_id, $code, $show_inactive);
     echo Zend_Json::encode($data);
     exit;
 }
Ejemplo n.º 3
0
 public function testAction()
 {
     $priceItemsModel = new Erp_Model_Sale_Priceitems();
     $itemsData = $priceItemsModel->getItems(7);
     echo '<pre>';
     print_r($itemsData);
     exit;
 }