We are running a 1.9.0.1 install and need to display the grand total base currency value on invoices that have been generated using other currencies than base. Even better if all the values on the PDF invoice could be displayed in both currencies.
1 Answer
I did a quick check on the Models used in the PDF generation and it looks like the following is needed to get what you need:
- Extend
Mage_Sales_Model_Order_Pdf_Items_Invoice_Default
and rewritegetItemPricesForDisplay
function, that will give you the option to change the price and subtotal for every line in the invoice. - Extend
Mage_Tax_Model_Sales_Pdf_Grandtotal
and rewrite 'getTotalsForDisplay' function in order to add base currency to grandtotal
Your rewrite bit in config.xml
may look like this:
...
<global>
<models>
<yourmodule>
<class>Your_Module_Model</class>
</yourmodule>
<sales>
<rewrite>
<order_pdf_items_invoice_default>Your_Module_Model_Order_Pdf_Items_Invoice_Default</order_pdf_items_invoice_default>
</rewrite>
</sales>
<tax>
<rewrite>
<sales_pdf_grandtotal>Your_Module_Model_Sales_Pdf_Grandtotal</sales_pdf_grandtotal>
</rewrite>
</tax>
</models>
</global>
...