-1

I'd like to know how to add the customer's EU VAT number as well as a fixed message saying "Reverse Charge" to PDF invoices - and only for the customer group which is called EU Zero VAT. Magento ver. 1.8.1.0

This is the law for UK firms to display this reverse charge message along with the customer's EU VAT number - wish Magento had this built-in.

Any ideas?

PizzaGeek
  • 1
  • 1

1 Answers1

0

The PDF is generated in Mage_Sales_Model_Order_Pdf_Invoice - unfortunately the standard Magento PDF creation is a little bit irritating and U have to lets say 'draw' it. It's based on Zend_PDF from Zend Framework 1.

miszyman
  • 131
  • 4
  • Thanks. Yes, I've been trying to edit Invoice.php in there but to no avail. When I add something like $this->drawText('Reverse Charge'); I'm not sure where to add it and when I do so, printing a pdf throws an error. I don't mind playing with the draw function for Zend for final positioning, I just want to know what code and where. – PizzaGeek Nov 27 '14 at 20:29
  • I will not give U the entire code ... it is not the idea of this place.. and for starters the usage of drawText is `drawText($text, $x, $y, $charEncoding = '')` so for example: `drawText('test', 10, 20, 'UTF-8')` will result in placing 'test' starting from 10 pixel from the left and 20 pixel from top, with usage of UTF-8 as encoding... – miszyman Nov 27 '14 at 20:46
  • Thanks for the info, appreciate it. I'm not after someone doing my homework for me, I just need pointing in the right direction. Cheers. – PizzaGeek Nov 27 '14 at 22:24
  • VATIN should be a part of the billing address so have a look at the `app\code\core\Mage\Sales\Model\Order\Pdf\Abstract.php` file around line 312 where the billing address is processed and attached to the PDF, as for the 'Reverse charge' I dont knwo where do U want to place it. If U find this helpful pls +1 – miszyman Nov 28 '14 at 09:53