Support

Home Forums Event Espresso Premium How to modify the Invoice

How to modify the Invoice

Posted: April 22, 2015 at 11:36 am


Andreas

April 22, 2015 at 11:36 am

Hi,

I need to modify the invoice to instead state receipt as in Sweden, an invoice is for something that you send and the customer can pay after the number of days you let them. As a receipt is more equal to be given to the customer when they have paid directly, which they in my case will do directly after registration via PayPal.

I also need to add information like VAT number (Value Added Tax) and my company’s business number in order to be compliant with the Swedish tax laws.

Where and how do I do this?

I am running EE3.

Thank you very much for a urgent reply as I must launch my site in a couple of days…

Regards,
Andreas


Josh

  • Support Staff

April 23, 2015 at 8:14 pm

Hi Andreas,

You can modify the title of the Invoice and add your VAT info by going into Event Espresso > Payment Settings, then activate Invoice Payment Settings. There you’ll see over to the right side PDF Settings, where you can change the PDF Title and add your VAT info to the Invoice Instructions.

You’ll like want to set Show as an option on the payment page? to no since you’re sending the link to download the receipt in a notification after they pay with PayPal.


Andreas

April 23, 2015 at 9:12 pm

Hi Josh!

Thank you so much for your reply!
How do I show and automatically calculate the tax on the downloadable receipt/invoice?

For the tickets that I am selling, there is a 25% tax on the net total.
Example:
Ticket price: $100
TAX/VAT: $25 (25% of $100)

Total to pay: $125

This is so important that it is there as the Swedish TAX authority demands it.

Appreciate a urgent reply as I must go live with my site and sell tickets today Friday (or at least Saturday).

Thank you in advance!

Regards,
Andreas


Josh

  • Support Staff

April 24, 2015 at 11:09 am

Hi Andreas,

Adding a tax amount will require going in and adding some PHP to the invoice template. Are you or is someone on your team familiar with PHP programming?


Andreas

April 24, 2015 at 11:40 am

Hi Josh,

I am a little bit familiar with PHP programming.


Andreas

April 24, 2015 at 2:49 pm

What PHP file should I edit?


Andreas

April 26, 2015 at 12:34 am

Anyone who can help me out and/or give me directions?

//Andreas


Josh

  • Support Staff

April 27, 2015 at 5:00 pm

Hi Andreas,

With EE3 you copy the invoice gateway (which contains the invoice template) to wp-content and modify the invoice template there.
Copy /event-espresso/gateways/invoice/
to wp-content/uploads/espresso/gateways/
This way you end up with a copy of the ‘Invoice’ directory within the above.
Within that directory you will find a template.php file, this file is used to build the invoices.

There, you can add some PHP code to display the VAT tax.

One approach that works well is price the ticket out at $125.00, then in the template you can break out the VAT and display the inclusive VAT amount with this code:

$price_before_vat = $total_cost * .80;
$vat_total = $total_cost - $price_before_vat;
$pdf->Cell(180, 10, pdftext('*The total includes $' . number_format($vat_total,2, '.', '') . ' VAT'), 0, 1, 'R'); // VAT amount


Matt

May 1, 2015 at 2:43 am

I need to show VAT at 20%, can you help me with what the code would be?

Also, within the template.php file in the invoice directory, where do I add the code? Is there a particular line?


Josh

  • Support Staff

May 1, 2015 at 12:12 pm

Hi Matt,

The code is the same as above, with one change for the percent:

$price_before_vat = $total_cost * .833333333;
$vat_total = $total_cost - $price_before_vat;
$pdf->Cell(180, 10, pdftext('*The total includes $' . number_format($vat_total,2, '.', '') . ' VAT'), 0, 1, 'R'); // VAT amount

One good place to put the code is right after line 200 in the template file. This will display the VAT amount right after the total on the invoice.

The support post ‘How to modify the 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