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_Invoiced_Grid extends Mage_Adminhtml_Block_Report_Grid
00035 {
00036
00037 public function __construct()
00038 {
00039 parent::__construct();
00040 $this->setId('gridInvoiced');
00041 }
00042
00043 protected function _prepareCollection()
00044 {
00045 parent::_prepareCollection();
00046 $this->getCollection()->initReport('reports/invoiced_collection');
00047 }
00048
00049 protected function _prepareColumns()
00050 {
00051 $this->addColumn('orders', array(
00052 'header' =>Mage::helper('reports')->__('Number of Orders'),
00053 'index' =>'orders',
00054 'total' =>'sum',
00055 'type' =>'number'
00056 ));
00057
00058 $this->addColumn('orders_invoiced', array(
00059 'header' =>Mage::helper('reports')->__('Number of Ivoiced Orders'),
00060 'index' =>'orders_invoiced',
00061 'total' =>'sum',
00062 'type' =>'number'
00063 ));
00064
00065 $currency_code = $this->getCurrentCurrencyCode();
00066
00067 $this->addColumn('invoiced', array(
00068 'header' =>Mage::helper('reports')->__('Total Invoiced'),
00069 'type' =>'currency',
00070 'currency_code'=>$currency_code,
00071 'index' =>'invoiced',
00072 'total' =>'sum',
00073 'renderer' =>'adminhtml/report_grid_column_renderer_currency'
00074 ));
00075
00076 $this->addColumn('invoiced_captured', array(
00077 'header' =>Mage::helper('reports')->__('Total Invoiced Captured'),
00078 'type' =>'currency',
00079 'currency_code'=>$currency_code,
00080 'index' =>'invoiced_captured',
00081 'total' =>'sum',
00082 'renderer' =>'adminhtml/report_grid_column_renderer_currency'
00083 ));
00084
00085 $this->addColumn('invoiced_not_captured', array(
00086 'header' =>Mage::helper('reports')->__('Total Invoiced not Captured'),
00087 'type' =>'currency',
00088 'currency_code'=>$currency_code,
00089 'index' =>'invoiced_not_captured',
00090 'total' =>'sum',
00091 'renderer' =>'adminhtml/report_grid_column_renderer_currency'
00092 ));
00093
00094 $this->addExportType('*/*/exportInvoicedCsv', Mage::helper('reports')->__('CSV'));
00095 $this->addExportType('*/*/exportInvoicedExcel', Mage::helper('reports')->__('Excel'));
00096
00097 return parent::_prepareColumns();
00098 }
00099 }