Ejemplo n.º 1
0
 /**
  * Get count sql
  * 
  * @return Zend_DB_Select
  */
 public function getSelectCountSql()
 {
     if ($this->_isGroupSql) {
         $this->_renderFilters();
         $countSelect = clone $this->getSelect();
         $countSelect->reset(Zend_Db_Select::ORDER);
         $countSelect->reset(Zend_Db_Select::LIMIT_COUNT);
         $countSelect->reset(Zend_Db_Select::LIMIT_OFFSET);
         $countSelect->reset(Zend_Db_Select::COLUMNS);
         if (count($this->getSelect()->getPart(Zend_Db_Select::GROUP)) > 0) {
             //$countSelect->reset(Zend_Db_Select::GROUP);
             if ($this->_resetHaving) {
                 $countSelect->reset(Zend_Db_Select::HAVING);
             }
             //$countSelect->distinct(true);
             $group = $this->getSelect()->getPart(Zend_Db_Select::GROUP);
             $countSelect->columns("COUNT(DISTINCT " . implode(", ", $group) . ")");
         } else {
             $countSelect->columns('COUNT(*)');
         }
         return $countSelect;
     }
     return parent::getSelectCountSql();
 }
Ejemplo n.º 2
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('inventorysupplyneeds/draftpo_product');
 }
Ejemplo n.º 3
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('inventoryplus/transaction_product');
 }
Ejemplo n.º 4
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('inventorypurchasing/purchaseorder');
 }
Ejemplo n.º 5
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('inventoryplus/warehouse_shipment');
 }
Ejemplo n.º 6
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('inventorywarehouse/requeststock');
 }
Ejemplo n.º 7
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('inventorywarehouse/transaction');
 }
Ejemplo n.º 8
0
 public function _construct()
 {
     parent::_construct();
     $this->_init('inventorypurchasing/supplier_product');
 }