Jump to content

Add customer VAT number to invoices


stormy

Recommended Posts

Maybe this has been posted elsewhere, but I couldn't find it.

 

Amongst the legal requirements for invoices in my country, a VAT number for the customer must be displayed. You need to edit viewinvoice.tpl and invoicepdf.tpl so you can include it. Here's what I did, assuming the VAT number is a custom field and it's the first one.

 

If your custom field has another number, change the code accordingly.

 

viewinvoice.tpl

 

After:

{$clientsdetails.country}<br />

add:

VAT #: {$clientsdetails.customfields1}

 

Easy enough! Now for:

 

invoicepdf.tpl

 

After:

$pdf->Cell(0,4,$clientsdetails["country"],0,1,'L');

add:

$pdf->Cell(0,4,"VAT #: ".$clientsdetails["customfields1"],0,1,'L');

 

It's the same thing but with different syntax.

 

I hope this is useful for someone!

Link to comment
Share on other sites

I have added the vat field in custom fields and the above works fine. However the vat number field can be updated in the members my details section which is also fine. The problem I have us that it is not a field that is requested upon signing up or registering on the site. How do I make this field appear on the register.php screen so it is obtained at that point.

Link to comment
Share on other sites

  • 11 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated