FilipeJPS Posted June 3, 2010 Share Posted June 3, 2010 How to insert Store VAT number in PDF invoice? In Portugal the invoice is valid only if it includes store vat number. Link to comment Share on other sites More sharing options...
rocky Posted June 4, 2010 Share Posted June 4, 2010 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. Link to comment Share on other sites More sharing options...
FilipeJPS Posted June 6, 2010 Author Share Posted June 6, 2010 Hi,It would be better if one could edit this using the web interface, however it's working this way and, the most important, it solved my problem.Thank you very much. Link to comment Share on other sites More sharing options...
rocky Posted June 7, 2010 Share Posted June 7, 2010 Please edit your first post and add [sOLVED] to the front of the title. Link to comment Share on other sites More sharing options...
Daan Tol Posted September 6, 2010 Share Posted September 6, 2010 Hi, Does anyone of you also know if it is possible to add: customer ID & e-mail address of customer on the invoice? Thanks in advance for the help! Link to comment Share on other sites More sharing options...
rocky Posted September 7, 2010 Share Posted September 7, 2010 Yes, it is possible. The invoice() function of classes/PDF.php gets the customer information on line 379: $invoice_customer = new Customer(intval($invoice_address->id_customer)); Anywhere after that line in the function, you can use intval($invoice_customer->id) to get the customer ID and $invoice_customer->email to get the email. You just have to decide where you want it displayed. Link to comment Share on other sites More sharing options...
Daan Tol Posted September 7, 2010 Share Posted September 7, 2010 Rocky > > YOU ARE A HERO! thanks for your contribution to the forum. You help me out big time!I donated to you >> I wanted yo buy you at least a beer or two for the work! Link to comment Share on other sites More sharing options...
rocky Posted September 7, 2010 Share Posted September 7, 2010 Thanks, I appreciate it. Link to comment Share on other sites More sharing options...
Stefand Posted November 19, 2010 Share Posted November 19, 2010 And how can I display the Identication number on the invoice what my customer fill in when it order something? Link to comment Share on other sites More sharing options...
salko Posted April 28, 2011 Share Posted April 28, 2011 And how can I display the Identication number on the invoice what my customer fill in when it order something? Have you find out how to add a customers VAT number on invoice? Link to comment Share on other sites More sharing options...
salko Posted August 28, 2011 Share Posted August 28, 2011 And how can I display the Identication number on the invoice what my customer fill in when it order something?<br/><br/>Have you find out how to add a customers VAT number on invoice? Any news about how to show customers VAT number on invoice (below the address)?? Thank you! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now