New cron job for bills.

This commit is contained in:
James Cole
2022-03-28 12:23:46 +02:00
parent e5a08d2cf1
commit f2849c8058
29 changed files with 714 additions and 142 deletions

View File

@@ -0,0 +1,25 @@
{% include 'emails.header-html' %}
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
{% if field == 'end_date' and diff != 0 %}
{{ trans('email.bill_warning_end_date_html', {name: bill.name|escape, date: bill.end_date.isoFormat(trans('config.month_and_day_js')), diff: diff})|raw }}
{% endif %}
{% if field == 'extension_date' and diff != 0 %}
{{ trans('email.bill_warning_extension_date_html', {name: bill.name|escape, date: bill.extension_date.isoFormat(trans('config.month_and_day_js')), diff: diff})|raw }}
{% endif %}
{% if field == 'end_date' and diff == 0 %}
{{ trans('email.bill_warning_end_date_html_zero', {name: bill.name|escape, date: bill.end_date.isoFormat(trans('config.month_and_day_js'))})|raw }}
{% endif %}
{% if field == 'extension_date' and diff == 0 %}
{{ trans('email.bill_warning_extension_date_html_zero', {name: bill.name|escape, date: bill.end_date.isoFormat(trans('config.month_and_day_js'))})|raw }}
{% endif %}
</p>
<p style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;">
Please take the appropriate action.
</p>
{% include 'emails.footer-html' %}

View File

@@ -0,0 +1,17 @@
{% include 'emails.header-text' %}
{% if field == 'end_date' and diff != 0 %}
{{ trans('email.bill_warning_end_date_text', {name: bill.name, date: bill.end_date.isoFormat(trans('config.month_and_day_js')), diff: diff})|raw }}
{% endif %}
{% if field == 'extension_date' and diff != 0 %}
{{ trans('email.bill_warning_extension_date_text', {name: bill.name|escape, date: bill.extension_date.isoFormat(trans('config.month_and_day_js')), diff: diff})|raw }}
{% endif %}
{% if field == 'end_date' and diff == 0 %}
{{ trans('email.bill_warning_end_date_text_zero', {name: bill.name|escape, date: bill.end_date.isoFormat(trans('config.month_and_day_js'))})|raw }}
{% endif %}
{% if field == 'extension_date' and diff == 0 %}
{{ trans('email.bill_warning_extension_date_text_zero', {name: bill.name|escape, date: bill.end_date.isoFormat(trans('config.month_and_day_js'))})|raw }}
{% endif %}
{{ trans('email.bill_warning_please_action') }}
{% include 'emails.footer-text' %}