Jump to content

Vat on pdf in prestashop ?


bsrweb

Recommended Posts

http://www.prestashop.com/forums/topic/57538-solved-how-to-insert-vat-number-in-pdf-invoice/

 

--------------------------

You'll need to edit classes/PDF.php. You can add your VAT number on lines 193-197 of Footer() function:

$this->Cell(0, 5, $conf['PS_SHOP_NAME_UPPER'].(!empty($conf['PS_SHOP_ADDR1']) ? ' - '.self::l('Headquarters:').' '.$conf['PS_SHOP_ADDR1'].(!empty($conf['PS_SHOP_ADDR2']) ? ' '.$conf['PS_SHOP_ADDR2'] : '').' '.$conf['PS_SHOP_CODE'].' '.$conf['PS_SHOP_CITY'].((isset($conf['PS_SHOP_STATE']) AND !empty($conf['PS_SHOP_STATE'])) ? (', '.$conf['PS_SHOP_STATE']) : '').' '.$conf['PS_SHOP_COUNTRY'] : ''), 0, 1, 'C', 1);$this->Cell(0, 5,(!empty($conf['PS_SHOP_DETAILS']) ? self::l('Details:').' '.$conf['PS_SHOP_DETAILS'].' - ' : '').(!empty($conf['PS_SHOP_PHONE']) ? self::l('PHONE:').' '.$conf['PS_SHOP_PHONE'] : ''), 0, 1, 'C', 1);

For example:

$this->Cell(0, 5, $conf['PS_SHOP_NAME_UPPER'].(!empty($conf['PS_SHOP_ADDR1']) ? ' - VAT Number: 12345678 - '.self::l('Headquarters:').' '.$conf['PS_SHOP_ADDR1'].(!empty($conf['PS_SHOP_ADDR2']) ? ' '.$conf['PS_SHOP_ADDR2'] : '').' '.$conf['PS_SHOP_CODE'].' '.$conf['PS_SHOP_CITY'].((isset($conf['PS_SHOP_STATE']) AND !empty($conf['PS_SHOP_STATE'])) ? (', '.$conf['PS_SHOP_STATE']) : '').' '.$conf['PS_SHOP_COUNTRY'] : ''), 0, 1, 'C', 1);$this->Cell(0, 5,(!empty($conf['PS_SHOP_DETAILS']) ? self::l('Details:').' '.$conf['PS_SHOP_DETAILS'].' - ' : '').(!empty($conf['PS_SHOP_PHONE']) ? self::l('PHONE:').' '.$conf['PS_SHOP_PHONE'] : ''), 0, 1, 'C', 1);

Change 12345678 to your VAT number.

---------------------------------

 

Found this solution on pdf & vat - but cant find the classes/PDF.php anywhere?
Can anybody help...

 

My prestashop is PrestaShop™ 1.5.4.1

 

Yours bjarke

Edited by bsrweb (see edit history)
Link to comment
Share on other sites

classes/PDF.php is for v1.4. You cannot use that recipe in v1.5 because invoices are created in completely other way.

 

classes/PDF.php is for v1.4. You cannot use that recipe in v1.5 because invoices are created in completely other way.

 

Hi maddock - could you help me sort this problem then...? How do I do it then?

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...