Jump to content

[SOLUTION] For australian shops to display TAX invoice instead of INVOCE on the pdf generated invoice


Recommended Posts

Hi,
I couldn't find in the actual configuration to change the PDF generated invoice header in order to display TAX invoice instead of invoice.
In order to achieve this you have to edit the PDF.php file found in the presta shop root classes folder .

The lines to edit are 86 and 366 and you have to change self::l('INVOICE #') to self::l('TAX INVOICE #')
line 86 to change the PDF
FROM THIS
$this->Cell(80, 10, self::l('INVOICE #').Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang)).sprintf('d', self::$order->invoice_number), 0, 0, 'C');

TO THIS

$this->Cell(80, 10, self::l('TAX INVOICE #').Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang)).sprintf('d', self::$order->invoice_number), 0, 0, 'C');

and line 366 to change the display order info

FROM THIS
$pdf->Cell(0, 6, self::l('INVOICE #').Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang)).sprintf('d', self::$order->invoice_number).' '.self::l('from') . ' ' .Tools::displayDate(self::$order->invoice_date, self::$order->id_lang), 1, 2, 'L', 1);

TO THIS

$pdf->Cell(0, 6, self::l('TAX INVOICE #').Configuration::get('PS_INVOICE_PREFIX', intval($cookie->id_lang)).sprintf('d', self::$order->invoice_number).' '.self::l('from') . ' ' .Tools::displayDate(self::$order->invoice_date, self::$order->id_lang), 1, 2, 'L', 1);

I hope this helps :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...