Posted: January 21, 2014 at 10:52 am
|
Hi, Prior to purchase, I’m trying to find out how well UK VAT is handled by EE. I understand there is a custom template which can be added but I’m a bit of a (advanced) novice when it comes to PHP so wouldn’t want to purchase and then not be able to implement it. Will I also have a copy so that I can send them a copy as a reminder? Thanks, Tim Thanks, |
|
I believe this is the template with VAT support: |
|
Hi Sidney, Thanks for the reply. I’ve added this to a test site but I don’t think it’s working. When you click the link from the registration confirmation page, the PDF file has no name and hasn’t pulled any information through (date, attendee number, etc). However, when you view the PDF from the back end by the link you mentioned, it looks good. I’d like to be confident it works before purchase so any advice you could offer would be much appreciated. Thanks. |
|
Sorry – I have it working. I didn’t click the link, just searched through google and found a different version of the file. Which file do I edit to change the formatting of the invoice? Thanks again – it’s now a plugin that seems to do everything I need so a purchase will be made later today. |
|
Sorry – me again!! On testing it would seem that the VAT invoice template works great for set prices but when you add early booking discounts and/or coupon codes, the invoice reverts to the standard price. Is there a fix for this? Thanks, Tim |
|
Hi Tim, Not currently, it is on our to do list, but our current focus in on Event Espresso 4 which will be a more robust platform. |
|
Thanks Dean. If I was to purchase now, would I be eligible for an upgrade to 4 or am I better waiting? VAT is obviously a legal requirement in the UK so unfortunately it means that to implement it I would be lacking core functionality of EE (discounts) that attracted me to you guys in the first place. |
Hi Tim, Current support license holders of Event Espresso 3 will have access to upgrade to EE4. EE4 will have early bird type discount functionality right away, and the ability to sell a set quantity of discounted tickets for an event, just not the promo code discounts on its initial release. |
|
|
Thanks Josh. I’ve purchased a personal license. I’ve got one final question before my site goes live which I’ve added to the forums. I just need to know how to add a CC to the admin email. I’m guessing I need to add/amend a line in includes/functions/email.php but I can’t figure out how you’ve formatted the headers. I’m a much better “copy and paster” than I am a coder! If you could help or point someone towards the forum that would be great. |
Hi Tim, It turns out that you can cc the admin notification to additional email addresses by entering them in the Alternate email address field under event options in the event editor. |
|
|
Hi Josh, Thanks for coming back to me but that’s not quite what I asked. I know I was brief on this post. I want the admin email to also go to the person booking the event (the training courses I run are often booked by administrators). I’ve created a custom question which I can reference but I need to add the CC to email.php file as it will be dynamic. Adding an additional static email address unfortunately doesn’t help me. I just couldn’t figure out the code used to create the header so if someone could just explain it, that would be a huge help. Thanks. |
|
Hi, In email.php about line 554 there is a function called event_espresso_send_email There are two code blocks there that show the From and Reply-To headers, just add below both of them $headers .= "Cc: " . $variable_with_the_email . "\r\n"; |
|
Thanks Dean but would this not send EVERY email to (lets call them) the booking administrator? I appreciate I haven’t explained myself too well… What I’m looking to achieve is: Booking Confirmation Email (admin email) – sent to WP Admin AND (client) Booking Admin with payment instructions. I’ve collected the email address in a custom question on the registration form. Confirmation Email – sent to each delegate registered from the event with instructions/address etc. You can seem my reg form on my test site at http://hire-education.co.uk/blog/all-events/?ee=2 |
|
I think where I need to add the line is in the “espresso_prepare_admin_email” function but I couldn’t figure out how to structure the code… <pre class=”brush: php; gutter: true; first-line: 1; highlight: []; html-script: false”> //Build the headers |
|
Sorry – my brain doesn’t work too well first thing in the morning. I’ve set the CC header as you suggested and now realise I just need to declare the variable in the Admin Email function. Doh! However – I’m stuck! How can I pull the custom question answer through? I assumed I could use the custom answers shortcode but obviously not. |
|
Hi Tim, Well the data you need wont be in event_espresso_send_email, but should be in espresso_prepare_admin_email, but you will need to pull it out of the $data array there. But that could be messy as its embedded in a string, so you would need to go further back to where $data is actually defined, which I cannot trace currently. Either that or use the $data in the admin email function and use something like the attendee id to pull the email from the database. As you can tell it’s not going to be simple. |
|
Thanks I appreciate the email. I don’t really care how messy the code appears – I just need to get it working. It’s the final thing I need complete before I can put the site live and actually start earning a living again. It’s got to be possible as the functions already exist to add custom questions to an email AND add a CC. How do we go about linking them? |
|
How about we break it down together?! I know that the system first looks for an alternative admin email address (you can set this option on the event page) and if it doesn’t find one, it sets the organisation email address as the recipient. To me that looks like this line found in espresso_prepare_admin_email: However, I don’t understand what’s happening and therefore how to manipulate the code to achieve what I want. Do you know how I could change that code to add an additional recipient to the “send to” section of espresso_prepare_admin_email? I understand that WPmail can send to multiple addresses separated by a comma but the way the current code is written is beyond me. Let’s start simple and just add a static email address by text? Once we’ve figured out how to add multiple addresses to that string, it should be relatively straightforward to query the database to collect the email address that’s stored at a custom question answer (in this case it’s ID is “14”). We could build a brand new query if necessary? Unfortunately, the only coding training I’ve has was on ASP back in 2002 so while I can just about understand what’s going on, I can’t figure out how to write in new stuff! I’d really value your help… |
|
In includes/functions/email.php, at line 461, stick in: $sql = "SELECT ea.answer FROM " . EVENTS_ANSWER_TABLE . " ea "; $sql .= " WHERE ea.question_id=39 AND ea.attendee_id=%d"; global $wpdb; $add_email = $wpdb->get_var($wpdb->prepare($sql, $data->attendee->id)); Then change line 465 to be: 'send_to' => $data->event->alt_email == '' ? $org_options['contact_email'] . ',' . $add_email: $data->event->alt_email . ',' . $org_options['contact_email'] . ',' . $add_email, |
|
Oh, note that in the sql query, where I have ’39’, you’ll need to substitute in the id for your custom additional email question. I just picked ’39’ at random. |
|
I’ve just noticed that this template file doesn’t seem to work when more than one delegate are on the same booking… I had edited the file to display different information but just to be sure I re-installed the original and for some reason it doesn’t work. Even in the back-end, if I click the invoice, you get a value for just one delegate but if I click the payment link, it adds all delegates on the same registration ID. I’m a bit frustrated as I went ahead and bought the plugin and it’s only now that I’m fully testing everything before going live that I’ve spotted the issue. Some urgent help would be much appreciated. Thanks, Tim |
|
Just to be super clear: original template.php bundled with 3.1.36.4: template.php from github (https://gist.github.com/Apina/5857667): Unless I can get things supported, I’ll be looking for a refund as detailing VAT is a legal requirement here in the UK. |
|
Hi, I followed the tutorial to add the modified UK VAT template.php file (from Github) to uploads/espresso/gateway/invoice/ and thought I had it working but on further testing, it would seem it doesn’t allow for multiple delegates on the same booking. In the back-office attendee view, the payments are linked when I click the “payments” icon but the invoice only ever shows one booking. I really need a fix as I purchased EE after being told about this template for VAT. If it doesn’t work, I’ll need a refund I’m afraid. |
Hi Tim, You’re welcome try this out on EE4 by signing up for early access to EE4. EE4 has built in support for taxes and it allows for multiple ticket prices for an event. This way different prices can be charged for an event based on ticket sale date ranges (so you can offer an early registration discount). If EE4 doesn’t meet your needs, then please send an email to sales@eventespresso.com to request a refund. |
|
|
Hi Josh, I’ve spent 3 weeks manipulating code for EE3 and implementing it on my site. I’m at final testing stages having thought we’d already rectified the VAT issue. I just can’t invest any more time and money in this – it should have been a week long job and unfortunately I just haven’t had the answers I needed. |
The support post ‘UK VAT Support on PDF Invoices’ 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.