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

Add prefix to 2PT billing transaction descriptions #220

Merged
merged 6 commits into from
May 15, 2023

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented May 12, 2023

https://eaflood.atlassian.net/browse/WATER-4006

It has been highlighted in testing that users expect to see a different description for any billing transactions linked to a charge version with a two-part tariff agreement in place.

For example, a standard description would be

Water abstraction charge: Spray Irrigation at Baygrove Upcot Oldent

If the charge version has a two-part tariff agreement it should be

Two-part tariff basic water abstraction charge: Spray Irrigation at Baygrove Upcot Oldent

This change makes that happen.

N.B. For reference, the legacy code handles this in src/modules/billing/services/charge-processor-service/transactions-processor.js

return chargeElement.adjustments.s127
  ? `Two-part tariff basic water abstraction charge: ${chargeElement.description}`
  : `Water abstraction charge: ${chargeElement.description}`

https://eaflood.atlassian.net/browse/WATER-4006

It has been highlighted in testing that users expect to see a different description for any billing transactions linked to a charge version with a two-part tariff agreement in place.

For example, a standard description would be

> Water abstraction charge: Spray Irrigation at Baygrove Upcot Oldent

If the charge version has a two-part tariff agreement it should be

> Two-part tariff basic water abstraction charge: Spray Irrigation at Baygrove Upcot Oldent

This change makes that happen.
@Cruikshanks Cruikshanks self-assigned this May 12, 2023
We are not doing this for the isNewLicence arg. So, no need to do it for the isWaterUndertaker arg.
Just the way it was phrased seemed off; more like it should have been an `it()` block rather than a `describe()`.
We find it useful to use a plural where the result represents many things (typically arrays) and singular when `result` is a single instance of something.
@Cruikshanks Cruikshanks marked this pull request as ready for review May 12, 2023 14:43
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Cruikshanks Cruikshanks merged commit 829a8c4 into main May 15, 2023
@Cruikshanks Cruikshanks deleted the prefix-2pt-transaction-descriptions branch May 15, 2023 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants