Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amend licence holder display two-part tariff review pages #1199

Merged
merged 3 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ function _prepareChargeData (licence, billRun) {
reviewChargeVersion.chargePeriodStartDate,
reviewChargeVersion.chargePeriodEndDate
),
licenceHolderName: licence[0].licenceHolder,
chargeElementCount: _chargeElementCount(reviewChargeVersion),
billingAccountDetails: _billingAccountDetails(reviewChargeVersion.billingAccountDetails),
chargeReferences: _chargeReferenceDetails(reviewChargeVersion, chargePeriod)
Expand Down
8 changes: 4 additions & 4 deletions app/views/bill-runs/review-licence.njk
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@
<div class="govuk-grid-row">
<div class="govuk-grid-column-full">
<span class="govuk-caption-l">{{region}} two-part tariff bill run</span>
<h1 class="govuk-heading-xl govuk-!-margin-bottom-3">{{pageTitle}}</h1>
<h1 class="govuk-heading-xl govuk-!-margin-bottom-1">{{pageTitle}}</h1>

<p class="govuk-body">
{{ statusTag(licence.status) }}
<span data-test='licence-holder'>Licence Holder {{ licence.licenceHolder }} </span>
<div>{{ statusTag(licence.status) }}</div>
</p>
</div>
</div>
Expand Down Expand Up @@ -347,7 +348,6 @@
<section id="charge-version-{{chargeVersionIndex}}">
<h2 class="govuk-heading-l">Charge periods {{chargeVersion.chargePeriodDate}}</h2>
</section>
<div class="govuk-caption-m" data-test='licence-holder'>{{chargeVersion.licenceHolderName}}</div>

{% set chargeReferenceText = "charge references " if chargeVersion.chargeReferences.length > 1 else "charge reference " %}
{% set chargeElementText = "charge elements " if chargeVersion.chargeElementCount > 1 else "charge element " %}
Expand Down Expand Up @@ -376,7 +376,7 @@

{{ govukDetails({
attributes: { 'data-test': 'billing-account-details' },
summaryText: "Billing account details",
summaryText: chargeVersion.billingAccountDetails.accountName + " billing account details",
html: billingAccountText
}) }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ describe('Review Licence presenter', () => {
{
financialYear: '2022 to 2023',
chargePeriodDate: '1 April 2022 to 5 June 2022',
licenceHolderName: 'Licence Holder Ltd',
chargeElementCount: 1,
billingAccountDetails: {
billingAccountId: 'a17ae69b-8074-4d27-80bf-074f4c79a05a',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ describe('Review Licence Service', () => {
expect(result.billRunId).to.equal('6620135b-0ecf-4fd4-924e-371f950c0526')
expect(result.region).to.equal('Anglian')
expect(result.licence.licenceId).to.equal('786f0d83-eaf7-43c3-9de5-ec59e3de05ee')
expect(result.licence.licenceHolder).to.equal('Licence Holder Ltd')
expect(result.matchedReturns[0].returnId).to.equal('v1:1:01/60/28/3437:17061181:2022-04-01:2023-03-31')
expect(result.unmatchedReturns[0].returnId).to.equal('v2:1:01/60/28/3437:17061181:2022-04-01:2023-03-31')
expect(result.chargeData[0].financialYear).to.equal('2022 to 2023')
expect(result.chargeData[0].licenceHolderName).to.equal('Licence Holder Ltd')
expect(result.chargeData[0].billingAccountDetails.billingAccountId).to.equal('a17ae69b-8074-4d27-80bf-074f4c79a05a')
})
})
Expand Down
Loading