Support

Home Forums Event Espresso Premium VAT Column on PDF invoice.

VAT Column on PDF invoice.

Posted: October 25, 2013 at 3:42 am

Viewing 4 reply threads


Aristos Polydorou

October 25, 2013 at 3:42 am

Hi!

I have the following two questions regarding the PDF invoice

a. Can can i add second column on the pdf invoice to seperatly show the percentage of VAT and the VAT amount ?

b. Under the Bill To i would also like to show the company name of the person that registered.

How can the above achieved ?

Thanks,

Ari


Dean

October 25, 2013 at 4:12 am

Hi,

There is a template file that a customer modified to include VAT, you can find a copy here, but it may need further tweaking. We are looking to have a more robust invoice in 4.0 and beyond.

https://gist.github.com/Apina/5857667

Regarding the Bill To, it could be possible but would need the invoice template editing to include that question response.


Aristos Polydorou

October 25, 2013 at 6:48 am

CAn you please let me know the command so i can edit it on the template ?

Thanks,

Ari


Aristos Polydorou

October 25, 2013 at 9:40 am

CAn you please let me know the command so i can edit it on the template ?
Thanks,

I mean regarding to add the Company name at the Bill To .

Thanks,

Ari


Sidney Harrell

October 25, 2013 at 3:50 pm

First, you would need to grab the questions and answers for that attendee (insert into the template.php at line 60 of Dean’s template file):

$questions = $wpdb->get_results("select qst.question as question, ans.answer as answer from ".EVENTS_ANSWER_TABLE." ans inner join ".EVENTS_QUESTION_TABLE." qst on ans.question_id = qst.id where ans.attendee_id = ".$attendee_id, ARRAY_A);

Then search through the questions to find the one that matches (you may need to adjust the $needle to match your question):

$needle = "Company Name";
$found = NULL;
foreach ($questions as $key=>$question) {
  if ($question['question'] == $needle) $found = $key;
}
$company_name = !empty($found) ? $questions[$found]['answer'] : '';

Then you can use $company_name in the ‘Bill to: ‘ section:

$pdf->Cell(50, 5, $company_name, 0, 1, 'L');
Viewing 4 reply threads

The support post ‘VAT Column on PDF invoice.’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso