Support

Home Forums Event Espresso Premium Edit invoice template – add date paid

Edit invoice template – add date paid

Posted: April 16, 2015 at 8:33 am


Andy Buck

April 16, 2015 at 8:33 am

Hi there,
I’ve managed to add GST to my invoice template, but I need a couple of other minor edits that I can’t seem to get right.

1) I’d like to remove the start date ( ‘start_date’ ) and the ‘ >> ‘ from the Event & Attendee box on the invoice, which I’ve narrowed down to this section:

pdftext($tmp_attendee[“event_name”] . “[” . date(‘m-d-Y’, strtotime($tmp_attendee[‘start_date’])) . “]”) . ‘ >> ‘
. pdftext(html_entity_decode($tmp_attendee[“fname”], ENT_QUOTES, “UTF-8″) . ” ” . html_entity_decode($tmp_attendee[“lname”], ENT_QUOTES, “UTF-8”)) . ‘;’

i.e. so in the pdf invoice box labelled “Event & Attendee” I just want the event name & attendee name to show up (without the date)
I’ve managed to get rid of the “>>” by just deleting the >> leaving a space, but I can’t seem to get rid of the start date (any deletions I tried just resulted the invoice not downloading – I assume it’s crashed due to an error in the code caused by my inaccurate deletion/s?)
If I do the same thing as the ‘>>’ and just delete the words ‘start date’, to leave ‘ ‘ it comes up with a date from 1970!

Any suggestions on how to remove the start date welcome.

2) I need to have the “date paid” show up somewhere on the invoice
Preferably below the billing address, but above the “Event & Attendee” box.
I can see in template.php that this info is available from the database, but I can’t see where/how to get it to show up on the invoice.

These 2 changes will save me switching over to Cvent, who have quoted me $5000 to start up a new booking system with them, who’s only additional feature that I could need is automatic payment of refunds, which I can actually live without.

But i can’t live without an invoice that shows date paid.

Using EE 3.1.37.1.P


Josh

  • Support Staff

April 16, 2015 at 9:08 am

Hi Andy,

We can get to work on this today. If it ends up taking more than 30 minutes we will let you know.


Josh

  • Support Staff

April 16, 2015 at 2:59 pm

Hi Andy,

Your requested changes were added to wp-content/plugins/event-espresso/gateways/invoice/template.php. There’s no need to make any modifications to the core plugin, they’ll only get overwritten on a software update anyway.


Andy Buck

April 16, 2015 at 5:56 pm

Thanks Josh
Thanks for the prompt reply and changes as requested – date paid now present in right position on invoice
Only problem – now the GST (that was showing up) is not showing up on invoices (even though the code is still there for it).
Do you know how I can get it to show up?

I was using this code:

$price_before_gst = $total_cost * .909090909;
$gst_total = $total_cost – $price_before_gst;
$pdf->Cell(180, 10, pdftext(‘*The total includes $’ . number_format($gst_total,2, ‘.’, ”) . ‘ GST’), 0, 1, ‘R’); // GST amount

From:
https://www.snip2code.com/Snippet/111622/Break-out-the-GST-total-for-an-Event-Esp

This gave a line on the invoice under “Total Due” that says:

*The total includes $215 GST (or whatever the correct amount is for that total)

Thanks

Andy

I’d previously used instructions here:


Andy Buck

April 16, 2015 at 5:59 pm

Oops, please ignore: “I’d previously used instructions here:”!


Josh

  • Support Staff

April 16, 2015 at 7:42 pm

Hi Andy,

My apologies, I missed copying the GST code over to the new template. It’s there now.

There’s one other little detail that I added to the date paid code: It’s wrapped in a conditional that checks if there’s a date paid value. This way, if they hadn’t actually paid yet and get a copy of this tax invoice, no date paid text will display. It only displays if there’s a date paid set for that transaction.

The support post ‘Edit invoice template – add date paid’ 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