More code to catch exceptions in #1238

This commit is contained in:
James Cole
2018-03-10 22:34:02 +01:00
parent dd2f3c861b
commit a55d18709c
7 changed files with 103 additions and 25 deletions

View File

@@ -66,18 +66,18 @@
<td class="hide-date">{{ transaction.date.formatLocalized(monthAndDayFormat) }}</td>
<td class="hide-book_date">
{% if transaction.transactionJournal.hasMeta('book_date') %}
{{ transaction.transactionJournal.getMeta('book_date').formatLocalized(monthAndDayFormat) }}
{{ getMetaDate(transaction.transactionJournal, 'book_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-process_date">
{% if transaction.transactionJournal.hasMeta('process_date') %}
{{ transaction.transactionJournal.getMeta('process_date').formatLocalized(monthAndDayFormat) }}
{{ getMetaDate(transaction.transactionJournal, 'process_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-interest_date">
{% if transaction.transactionJournal.hasMeta('interest_date') %}
{{ transaction.transactionJournal.getMeta('interest_date').formatLocalized(monthAndDayFormat) }}
{{ getMetaDate(transaction.transactionJournal, 'interest_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
@@ -85,19 +85,19 @@
{# new optional fields (3x) #}
<td class="hide-due_date">
{% if transaction.transactionJournal.hasMeta('due_date') %}
{{ transaction.transactionJournal.getMeta('due_date').formatLocalized(monthAndDayFormat) }}
{{ getMetaDate(transaction.transactionJournal, 'due_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-payment_date">
{% if transaction.transactionJournal.hasMeta('payment_date') %}
{{ transaction.transactionJournal.getMeta('payment_date').formatLocalized(monthAndDayFormat) }}
{{ getMetaDate(transaction.transactionJournal, 'payment_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
<td class="hide-invoice_date">
{% if transaction.transactionJournal.hasMeta('invoice_date') %}
{{ transaction.transactionJournal.getMeta('invoice_date').formatLocalized(monthAndDayFormat) }}
{{ getMetaDate(transaction.transactionJournal, 'invoice_date').formatLocalized(monthAndDayFormat) }}
{% endif %}
</td>
@@ -129,7 +129,7 @@
<td class="hide-internal_reference">
{% if transaction.transactionJournal.hasMeta('internal_reference') %}
{{ transaction.transactionJournal.getMeta('internal_reference') }}
{{ getMetaField(transaction.transactionJournal,'internal_reference') }}
{% endif %}
</td>

View File

@@ -191,7 +191,7 @@
{% if journal.hasMeta('interest_date') %}
<tr>
<td>{{ trans('list.interest_date') }}</td>
<td>{{ journal.getMeta('interest_date').formatLocalized(monthAndDayFormat) }}</td>
<td>{{ getMetaDate(journal,'interest_date').formatLocalized(monthAndDayFormat) }}</td>
</tr>
{% endif %}
@@ -199,13 +199,13 @@
{% if journal.hasMeta('book_date') %}
<tr>
<td>{{ trans('list.book_date') }}</td>
<td>{{ journal.getMeta('book_date').formatLocalized(monthAndDayFormat) }}</td>
<td>{{ getMetaDate(journal,'book_date').formatLocalized(monthAndDayFormat) }}</td>
</tr>
{% endif %}
{% if journal.hasMeta('process_date') %}
<tr>
<td>{{ trans('list.process_date') }}</td>
<td>{{ journal.getMeta('process_date').formatLocalized(monthAndDayFormat) }}</td>
<td>{{ getMetaDate(journal,'process_date').formatLocalized(monthAndDayFormat) }}</td>
</tr>
{% endif %}
@@ -213,27 +213,28 @@
{% if journal.hasMeta('due_date') %}
<tr>
<td>{{ trans('list.due_date') }}</td>
<td>{{ journal.getMeta('due_date').formatLocalized(monthAndDayFormat) }}</td>
<td>{{ getMetaDate(journal,'due_date').formatLocalized(monthAndDayFormat) }}</td>
</tr>
{% endif %}
{% if journal.hasMeta('payment_date') %}
<tr>
<td>{{ trans('list.payment_date') }}</td>
<td>{{ journal.getMeta('payment_date').formatLocalized(monthAndDayFormat) }}</td>
<td>{{ getMetaDate(journal,'payment_date').formatLocalized(monthAndDayFormat) }}</td>
</tr>
{% endif %}
{% if journal.hasMeta('invoice_date') %}
<tr>
<td>{{ trans('list.invoice_date') }}</td>
<td>{{ journal.getMeta('invoice_date').formatLocalized(monthAndDayFormat) }}</td>
<td>{{ getMetaDate(journal,'invoice_date').formatLocalized(monthAndDayFormat) }}</td>
</tr>
{% endif %}
{% if journal.hasMeta('internal_reference') and journal.getMeta('internal_reference') != "" %}
{% set intRef = getMetaField(journal, 'internal_reference') %}
{% if intRef != "" %}
<tr>
<td>{{ trans('list.internal_reference') }}</td>
<td>{{ journal.getMeta('internal_reference') }}</td>
<td>{{ intRef }}</td>
</tr>
{% endif %}
{% if journal.notes.count == 1 %}