Posted: May 10, 2015 at 11:18 am
|
Hi, I used the Invoice payment gateway as a way to generate a receipt that the customer can download for their bookkeeping. As my customers only have PayPal as an payment option, and I am not letting PayPal generate my receipts, instead using the invoice option, so that the customers easily can download once their payment has been confirmed via PayPal IPN. My problem now, which I discovered today, is that the receipts (invoices) are using the DATE when they click the download invoice button. This makes it wrong for the bookkeeping. I want the DATE displayed on the downloaded receipt (invoice) to show the actual date when PayPal received the payment from my customer. As this is being transfered from PayPal via IPN to my website and the Event Espresso 3 installation. Can someone help me out with this? Thank you very much in advance for support! Sincerely, |
|
Hi, The invoice in EE3 was not intended to be used in that way, which is why the dates are displayed differently, but it can be changed relatively easily. OK, you will need to modify the Invoice gateway template, but it’s not too hard, just some file copying and a single line of editing. The easiest way to do this is to copy the entire Invoice folder (wp-content/plugins/event-espresso/gateways/invoice) over to the wp-uploads/espresso/gateways folder (if the gateways folder doesn’t exist here, create it). Then edit the wp-content/uploads/espresso/gateways/invoice/template.php file. On line 115 you should see:
Change this to read:
This will then use the attendees registration date for the invoice date. |
|
Thank you very much for the quick reply! Is it possible to instead put in the date when the payment was confirmed from PayPal? Sincerely, |
Andreas, Here’s some example code for the invoice that you can use. It will first check to see if there is a payment date (in case payment hasn’t been made yet), then print the date if a payment was applied: //Set the payment date if (!empty($payment_date)) { $pdf->Cell(180, 0, pdftext(__('Payment Date: ', 'event_espresso') . $payment_date), 0, 1, 'R'); } else { $pdf->Ln(10); } |
|
|
Thank you very much Josh! Where shall I put the code? Also, is it a big trick to add the unique ticket ID number below the “Primary attende-ID”? Thank you in advance! Sincerely, |
Hi Andreas, the sample code that Josh shared would replace the code around line 115. Your code editor may have the line as a little different so just check for the sample code that Dean shared and then replace it. — |
|
Re:
It is tricky to add it there because there can be more than one unique ticket ID number for a transaction. Instead of adding it there, you can change the section where it displays the event name and attendee name. You find this in your invoice template:
Then change it to:
What that will do is display the unique ticket ID (or registration ID) for each attendee in the transaction, next to the attendee name. |
|
The support post ‘Noticed that Invoice changes date every time it is being downloaded’ 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.