kb12345 Posted July 25, 2019 Share Posted July 25, 2019 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 ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 26, 2019 Share Posted July 26, 2019 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. 0 Quote Link to comment Share on other sites More sharing options...
kb12345 Posted July 26, 2019 Author Share Posted July 26, 2019 it is working great, thank you very much! 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.