示例#1
0
 protected function _prepareColumns()
 {
     $this->addColumn('orders', array('header' => Mage::helper('reports')->__('Number of Orders'), 'index' => 'orders', 'total' => 'sum', 'type' => 'number'));
     $this->addColumn('items', array('header' => Mage::helper('reports')->__('Items Ordered'), 'index' => 'items', 'total' => 'sum', 'type' => 'number'));
     $currency_code = $this->getCurrentCurrencyCode();
     $this->addColumn('subtotal', array('header' => Mage::helper('reports')->__('Subtotal'), 'type' => 'currency', 'currency_code' => $currency_code, 'index' => 'subtotal', 'total' => 'sum', 'renderer' => 'adminhtml/report_grid_column_renderer_currency'));
     $this->addColumn('tax', array('header' => Mage::helper('reports')->__('Tax'), 'type' => 'currency', 'currency_code' => $currency_code, 'index' => 'tax', 'total' => 'sum', 'renderer' => 'adminhtml/report_grid_column_renderer_currency'));
     $this->addColumn('shipping', array('header' => Mage::helper('reports')->__('Shipping'), 'type' => 'currency', 'currency_code' => $currency_code, 'index' => 'shipping', 'total' => 'sum', 'renderer' => 'adminhtml/report_grid_column_renderer_currency'));
     $this->addColumn('discount', array('header' => Mage::helper('reports')->__('Discounts'), 'type' => 'currency', 'currency_code' => $currency_code, 'index' => 'discount', 'total' => 'sum', 'renderer' => 'adminhtml/report_grid_column_renderer_currency'));
     $this->addColumn('total', array('header' => Mage::helper('reports')->__('Total'), 'type' => 'currency', 'currency_code' => $currency_code, 'index' => 'total', 'total' => 'sum', 'renderer' => 'adminhtml/report_grid_column_renderer_currency'));
     $this->addColumn('invoiced', array('header' => Mage::helper('reports')->__('Invoiced'), 'type' => 'currency', 'currency_code' => $currency_code, 'index' => 'invoiced', 'total' => 'sum', 'renderer' => 'adminhtml/report_grid_column_renderer_currency'));
     $this->addColumn('refunded', array('header' => Mage::helper('reports')->__('Refunded'), 'type' => 'currency', 'currency_code' => $currency_code, 'index' => 'refunded', 'total' => 'sum', 'renderer' => 'adminhtml/report_grid_column_renderer_currency'));
     $this->addExportType('*/*/exportStandardsalesCsv', Mage::helper('reports')->__('CSV'));
     $this->addExportType('*/*/exportStandardsalesExcel', Mage::helper('reports')->__('Excel'));
     return parent::_prepareColumns();
 }