I asked a similar question but I did not provide sufficient details and I got no answers so I will try again.
The main task is to add fields to the CSV file that is exported under the magento admin sales->invoices. I found the main file to edit:
app/code/core/Mage/Adminhtml/Block/Sales/Invoice/Grid.php
This has the options to addColumn's like so:
$this->addColumn('increment_id', array(
'header' => Mage::helper('sales')->__('Invoice #'),
'index' => 'increment_id',
'type' => 'text',
));
Now when I try to add new Column's I change the index to the appropriate database field, lets say 'tax amount' for example. The only problem is that this new value is not in my Magento collection, so it simply populates an empty column in the table.
I am quite new to Magento so I don't fully understand how the Magento collection works or how I can access it for the scope of grid.php. Could someone please give me some direction in how to add to the collection?
I'm really stuck and would appreciate the help.