Skip to content

Commit

Permalink
Merge pull request #286 from ministryofjustice/emp-512-defect-disburs…
Browse files Browse the repository at this point in the history
…ement

EMP-512 and EMP-515 - Defect Fix
  • Loading branch information
gpjustice committed Sep 17, 2024
2 parents f80ee1c + 0d49c59 commit f04c1ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
20 changes: 11 additions & 9 deletions server/views/components/customDisplay/crm7/crm7Disbursements.njk
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
{ text: "Disbursement"},
{ text: "Details" },
{ text: "Miles" },
{ text: "Net Value" },
{ text: "Net" },
{ text: "VAT Rate" },
{ text: "VAT Value" },
{ text: "Total" }
{ text: "VAT" },
{ text: "Total" },
{ text: "Official use only" }
],
rows: []
} %}
Expand All @@ -21,10 +22,11 @@
{ text: item.disbursement | safe, attributes: { 'data-header': 'Disbursement' } },
{ text: item.details | safe, attributes: { 'data-header': 'Details' } },
{ text: item.miles | safe, attributes: { 'data-header': 'Miles' } },
{ text: item.netValue | safe | formatCurrency, attributes: { 'data-header': 'Net Value' } },
{ text: item.netValue | safe | formatCurrency, attributes: { 'data-header': 'Net' } },
{ text: item.vatRate | safe, attributes: { 'data-header': 'VAT Rate' } },
{ text: item.vatValue | safe | formatCurrency, attributes: { 'data-header': 'VAT Value' } },
{ text: item.total | safe | formatCurrency, attributes: { 'data-header': 'Total' } }
{ text: item.vatValue | safe | formatCurrency, attributes: { 'data-header': 'VAT' } },
{ text: item.total | safe | formatCurrency, attributes: { 'data-header': 'Total' } },
{ text: item.officialUseOnly | safe | formatCurrency, attributes: { 'data-header': 'Official use only' } }
] -%}
{% set list = tableData.rows.push(tableRow) %}
{% endfor %}
Expand All @@ -35,17 +37,17 @@
{% set fields = [
{ label: "Total Net", value: data.totals.net | formatCurrency},
{ label: "Total VAT", value: data.totals.vat | formatCurrency},
{ label: "Grand Total", value: data.totals.total | formatCurrency, class: "govuk-brand-colour govuk-!-font-weight-bold"}
{ label: "Grand Total", value: data.totals.total | formatCurrency}

] %}
{{ formSubsection('Disbursements total', fields) }}
{{ formSubsection('Disbursements Total', fields) }}


{# Render "Office Use Only" subsection #}
{% set fields = [
{ label: "Total Net", value: data.officeUse.net | formatCurrency},
{ label: "Total VAT", value: data.officeUse.vat | formatCurrency},
{ label: "Grand Total", value: data.officeUse.total | formatCurrency, class: "govuk-brand-colour govuk-!-font-weight-bold"}
{ label: "Grand Total", value: data.officeUse.total | formatCurrency}
] %}
{{ formSubsection('Office Use', fields) }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@
{ label: "Signed Authority", value: data.Authority.signedAuth },
{ label: "Decision Date", value: data.Authority.signedAuthDate | formatDate }
] %}
{{ formSubsection('Authority', fieldsAuthority) }}
{{ formSubsection('Authority Signed', fieldsAuthority) }}

{% endmacro %}

0 comments on commit f04c1ae

Please sign in to comment.