Jump to content

help with invoicepdf.tpl


kb12345

Recommended Posts

recently WHMcs changed VAT numbers to a separate columns(tblclients.tax) and it broke our custom invoicepdf.tpl

 

I went ahead and added the following line to invoicepdf.tpl

if (array_key_exists('tax_id', $clientsdetails) && $clientsdetails['tax_id']) {
$pdf->Cell(0, 4, $clientsdetails['tax_id'], 0, 1, 'L');
}

now VAT number is shown but not in same location as before

 

VAT number is shows now, but in wrong format. It shows the following:
Invoiced To
USERNAME
ADDRESS
FR111111111

while it must be like following

USERNAME
ADDRESS

VAT Number: FR111111111

NOTE: There must be <br> after address, and "VAT Number" before it shows the number.

Any insight how can we modify code to complete this ? 

Link to comment
Share on other sites

21 hours ago, kb12345 said:

Any insight how can we modify code to complete this ? 

would have been slightly easier if you had posted your code, but if you say that you're using...

if (array_key_exists('tax_id', $clientsdetails) && $clientsdetails['tax_id']) {
	$pdf->Cell(0, 4, $clientsdetails['tax_id'], 0, 1, 'L');
}

then you could change it to...

if (array_key_exists('tax_id', $clientsdetails) && $clientsdetails['tax_id']) {
	$pdf->Ln(5);
	$pdf->Cell(0, 4, Lang::trans('tax.vatLabel') . ": " . $clientsdetails['tax_id'], 0, 1, 'L');
}

and that should show their tax details as you describe.

Link to comment
Share on other sites

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