gutterboy Posted August 19, 2014 Report Posted August 19, 2014 Just wondering with regards to the email templates, I notice for example with the "Email Template Invoice Delivery (Unpaid)" template you have the following tags available: {contact.first_name} {contact.last_name} {invoices} {autodebit} {client_url} Just wondering is there an easy way to make other data available to the template such as: Users Address Last Invoice Amount Payments/Adjustments (payments since last invoice) Also, is there a page that explains what those tags contain - I know most are self explanatory. Thanks! Quote
0 Michael Posted August 19, 2014 Report Posted August 19, 2014 That's a feature request for more tags, but I believe you can do what you like using the current tags {invoices.______} the guys will be able to tell you. If you would like to know now, you can use {% debug %} and email yourself that template and you will get all the tags you can use. PauloV 1 Quote
0 gutterboy Posted August 19, 2014 Author Report Posted August 19, 2014 Awesome - thanks. Is there anywhere that explains the tags? Quote
0 Michael Posted August 19, 2014 Report Posted August 19, 2014 Awesome - thanks. Is there anywhere that explains the tags? Not yet mate they've got a lot to do still on the documentation http://docs.blesta.com/display/user/Email+Template+Tags Quote
0 gutterboy Posted August 19, 2014 Author Report Posted August 19, 2014 How can I do the email myself the template thing? Quote
0 Michael Posted August 19, 2014 Report Posted August 19, 2014 How can I do the email myself the template thing? Create a test account and create a invoice and tick email box. Quote
0 gutterboy Posted August 19, 2014 Author Report Posted August 19, 2014 How can you get it to send? The status of the invoice shows as "Unsent". Quote
0 Michael Posted August 19, 2014 Report Posted August 19, 2014 How can you get it to send? The status of the invoice shows as "Unsent". If you have a cron set up 5 minutes either **:x5 or **.x0 Quote
0 gutterboy Posted August 19, 2014 Author Report Posted August 19, 2014 If you have a cron set up 5 minutes either **:x5 or **.x0 We have cron turned off - is there a way to send it without cron? Quote
0 Michael Posted August 19, 2014 Report Posted August 19, 2014 We have cron turned off - is there a way to send it without cron? Nope, you can run the cron manually (/settings/system/automation/). Why would you have the cron off? Daniel B 1 Quote
0 gutterboy Posted August 19, 2014 Author Report Posted August 19, 2014 Nope, you can run the cron manually (/settings/system/automation/). Why would you have the cron off? Ok thanks. Cron is off because we send the invoices ourselves via our main system via the API. Quote
0 Michael Posted August 19, 2014 Report Posted August 19, 2014 Ok thanks. Cron is off because we send the invoices ourselves via our main system via the API. Ah have you only disabled the deliver invoices on: /settings/company/automation/ (Deliver Invoices) Quote
0 gutterboy Posted August 19, 2014 Author Report Posted August 19, 2014 Ah have you only disabled the deliver invoices on: /settings/company/automation/ (Deliver Invoices) Well, this is all still on a test site atm....... so I think all of them are disabled as no crons have been setup. Quote
0 gutterboy Posted August 19, 2014 Author Report Posted August 19, 2014 I had a look at the tags available and it doesn't seem these two are: Last Invoice Amount Payments/Adjustments (payments since last invoice) Anyone know if it's easy to add your own tags? Quote
0 Michael Posted August 19, 2014 Report Posted August 19, 2014 I had a look at the tags available and it doesn't seem these two are: Last Invoice Amount Payments/Adjustments (payments since last invoice) Anyone know if it's easy to add your own tags? Best to open a feature request for such tags as they need to some how be made into the core. gutterboy 1 Quote
0 Tyson Posted August 19, 2014 Report Posted August 19, 2014 How can you get it to send? The status of the invoice shows as "Unsent". Invoices are unsent unless they have been queued and delivered via cron. Sending them manually would not update this status. Just wondering with regards to the email templates, I notice for example with the "Email Template Invoice Delivery (Unpaid)" template you have the following tags available: {contact.first_name} {contact.last_name} {invoices} {autodebit} {client_url} Just wondering is there an easy way to make other data available to the template such as: Users Address Last Invoice Amount Payments/Adjustments (payments since last invoice) The list of tags are generally a subset of those available, usually showing those most-likely-to-be-used. We haven't yet updated the tag listing to better list each tag in the UI. Users Address - The address information is available in the {contact} tag, i.e. {contact.address_1}, {contact.address_2}, {contact.city}, {contact.state}, {contact.zip}, {contact.country} Last Invoice Amount - Blesta doesn't include information on the 'last invoice'. I'm not sure what the 'last invoice' would be, however, the included list of {invoices} have a "previous_due" amount available for each invoice. But since {invoices} is a list of 1 or more invoices, you would likely loop over them to show the amount. e.g. ---- {% for invoice in invoices} When this invoice was created, this amount was still outstanding: {invoice.previous_due | currency_format invoice.currency}. {% endfor %} ---- Payments/Adjustments (payments since last invoice) - Maybe you should clarify this one, but it sounds like all transaction data should be available, which could be an extraordinary amount of information, and I don't see why that would be useful. However, each invoice in the given {invoices} contains the amount that has already been paid toward it. e.g. ---- {% for invoice in invoices} This invoice already has already had {invoice.paid | currency_format invoice.currency} paid toward it. {% endfor %} ---- Michael and Daniel B 2 Quote
0 Daniel B Posted August 19, 2014 Report Posted August 19, 2014 Last Invoice Amount - Blesta doesn't include information on the 'last invoice'. I'm not sure what the 'last invoice' would be, however, the included list of {invoices} have a "previous_due" amount available for each invoice. But since {invoices} is a list of 1 or more invoices, you would likely loop over them to show the amount. e.g. ---- {% for invoice in invoices} When this invoice was created, this amount was still outstanding: {invoice.previous_due | currency_format invoice.currency}. {% endfor %} ---- Payments/Adjustments (payments since last invoice) - Maybe you should clarify this one, but it sounds like all transaction data should be available, which could be an extraordinary amount of information, and I don't see why that would be useful. However, each invoice in the given {invoices} contains the amount that has already been paid toward it. e.g. ---- {% for invoice in invoices} This invoice already has already had {invoice.paid | currency_format invoice.currency} paid toward it. {% endfor %} ---- This sounds like an excellent way to include overdue balances in invoice emails. Though I just wanted to clarify before I add it... below code will calculate to sum total of all outstanding unpaid invoices? {% for invoice in invoices} When this invoice was created, this amount was still outstanding: {invoice.previous_due | currency_format invoice.currency}. {% endfor %} and this will only show what amount has been paid to a specific invoice? {% for invoice in invoices} This invoice already has already had {invoice.paid | currency_format invoice.currency} paid toward it. {% endfor %} I don't quite understand why one would apply to all invoices, and the other would only apply to the specific invoice, since they are both using {% for invoice in invoices} Quote
0 gutterboy Posted August 20, 2014 Author Report Posted August 20, 2014 Thanks for the great post Tyson! Invoices are unsent unless they have been queued and delivered via cron. Sending them manually would not update this status. Ok thanks. I think I was getting confused with the "adding" of invoices and the "sending" of them. We may have to enable the cron for some things, still to get to that point of working it all out. Blesta doesn't include information on the 'last invoice'. I'm not sure what the 'last invoice' would be Last invoice meaning the previous new invoice they received before this one. Maybe you should clarify this one, but it sounds like all transaction data should be available, which could be an extraordinary amount of information, and I don't see why that would be useful. However, each invoice in the given {invoices} contains the amount that has already been paid toward it. Well I guess what we're trying to show is something like.. Outstanding Balance - $95.00 Payments/Adjustments - $40.00 This Invoice - $15.00 Total Due - $70.00 Quote
0 Tyson Posted August 20, 2014 Report Posted August 20, 2014 This sounds like an excellent way to include overdue balances in invoice emails. Though I just wanted to clarify before I add it... below code will calculate to sum total of all outstanding unpaid invoices? {% for invoice in invoices} When this invoice was created, this amount was still outstanding: {invoice.previous_due | currency_format invoice.currency}. {% endfor %} No, this does not calculate a sum. This only displays each invoice's previous due amount, e.g. {% for invoice in invoices} Invoice: #{invoice.id_code} Invoice Total: {invoice.due | currency_format invoice.currency} Previous Due: {invoice.previous_due | currency_format invoice.currency} {% endfor %} -- Invoice: #1003 Invoice Total: $20.00 Previous Due: $50.00 Invoice: #1002 Invoice Total: $40.00 Previous Due: $10.00 Invoice: #1001 Invoice Total: $10.00 Previous Due: $0.00 and this will only show what amount has been paid to a specific invoice? {% for invoice in invoices} This invoice already has already had {invoice.paid | currency_format invoice.currency} paid toward it. {% endfor %} Yes, it will show how much was paid to each invoice, e.g. This invoice already has already had $0.00 paid toward it. This invoice already has already had $10.00 paid toward it. This invoice already has already had $15.25 paid toward it. Well I guess what we're trying to show is something like.. Outstanding Balance - $95.00 Payments/Adjustments - $40.00 This Invoice - $15.00 Total Due - $70.00 Sounds like you're going for kind-of a "invoices summary/overview", which may be better suited to a new email template instead. The scope of the Invoice Delivery (Unpaid) template is mainly to notify a client of that specific invoice (or set of invoices). But I can see how additional outstanding/paid/due totals might be useful as well. gutterboy and Daniel B 2 Quote
0 Daniel B Posted August 20, 2014 Report Posted August 20, 2014 No, this does not calculate a sum. This only displays each invoice's previous due amount, e.g. Thanks, that makes more sense, must have just misread what it did when you mentioned it the first time . Quote
Question
gutterboy
Just wondering with regards to the email templates, I notice for example with the "Email Template Invoice Delivery (Unpaid)" template you have the following tags available:
{contact.first_name} {contact.last_name} {invoices} {autodebit} {client_url}
Just wondering is there an easy way to make other data available to the template such as:
Users Address
Last Invoice Amount
Payments/Adjustments (payments since last invoice)
Also, is there a page that explains what those tags contain - I know most are self explanatory.
Thanks!
20 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.