00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class Mage_Adminhtml_Block_Report_Sales_Tax_Grid extends Mage_Adminhtml_Block_Report_Grid
00035 {
00036
00037 public function __construct()
00038 {
00039 parent::__construct();
00040 $this->setId('gridTax');
00041 }
00042
00043 protected function _prepareCollection()
00044 {
00045 parent::_prepareCollection();
00046 $this->getCollection()->initReport('reports/tax_collection');
00047 }
00048
00049 protected function _prepareColumns()
00050 {
00051 $this->addColumn('code', array(
00052 'header' =>Mage::helper('reports')->__('Tax'),
00053 'index' =>'code',
00054 'type' =>'string'
00055 ));
00056
00057 $this->addColumn('percent', array(
00058 'header' =>Mage::helper('reports')->__('Rate'),
00059 'index' =>'percent',
00060 'type' =>'number',
00061 'renderer' =>'adminhtml/report_grid_column_renderer_blanknumber',
00062 'width' =>'100'
00063 ));
00064
00065 $this->addColumn('orders', array(
00066 'header' =>Mage::helper('reports')->__('Number of Orders'),
00067 'index' =>'orders',
00068 'total' =>'sum',
00069 'type' =>'number',
00070 'width' =>'100'
00071 ));
00072
00073 $this->addColumn('tax', array(
00074 'header' =>Mage::helper('reports')->__('Tax Amount'),
00075 'type' =>'currency',
00076 'currency_code'=>$this->getCurrentCurrencyCode(),
00077 'index' =>'tax',
00078 'total' =>'sum',
00079 'renderer' =>'adminhtml/report_grid_column_renderer_currency'
00080 ));
00081
00082 $this->addExportType('*/*/exportTaxCsv', Mage::helper('reports')->__('CSV'));
00083 $this->addExportType('*/*/exportTaxExcel', Mage::helper('reports')->__('Excel'));
00084
00085 return parent::_prepareColumns();
00086 }
00087 }