Mage_GoogleCheckout_Model_Mysql4_Tax Class Reference

Inheritance diagram for Mage_GoogleCheckout_Model_Mysql4_Tax:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract

List of all members.

Public Member Functions

 fetchRuleRatesForCustomerTaxClass ($customerTaxClass)

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 27 of file Tax.php.


Member Function Documentation

_construct (  )  [protected]

Resource initialization

Reimplemented from Mage_Core_Model_Resource_Abstract.

Definition at line 29 of file Tax.php.

00030     {
00031         $this->_init('tax/tax_rule', 'rule_id');
00032     }

fetchRuleRatesForCustomerTaxClass ( customerTaxClass  ) 

Definition at line 34 of file Tax.php.

00035     {
00036         $read = $this->_getReadAdapter();
00037         $select = $read->select()
00038             ->from(array('rule'=>$this->getTable('tax/tax_rule')))
00039             ->join(array('rd'=>$this->getTable('tax/tax_rate_data')), "rd.rate_type_id=rule.tax_rate_type_id", array('value'=>new Zend_Db_Expr('rate_value/100')))
00040             ->join(array('r'=>$this->getTable('tax/tax_rate')), "r.tax_rate_id=rd.tax_rate_id", array('country'=>'tax_country_id', 'postcode'=>'tax_postcode'))
00041             ->joinLeft(array('reg'=>$this->getTable('directory/country_region')), "reg.region_id=r.tax_region_id", array('state'=>'code'))
00042             ->where('rule.tax_customer_class_id=?', $customerTaxClass);
00043         $rows = $read->fetchAll($select);
00044 
00045         return $rows;
00046     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:17 2009 for Magento by  doxygen 1.5.8