Skip to content

Commit

Permalink
Fix miscalculated preview 2PT charge in review pt2
Browse files Browse the repository at this point in the history
https://eaflood.atlassian.net/browse/WATER-4849

In [Fix miscalculated preview 2PT charge in review](#1583) we attempted to resolve an issue where the two-part tariff preview charge feature was incorrectly telling the [Charging Module API](https://github.com/DEFRA/sroc-charging-module-api) to include the £141 water company charge in its calculation.

We deduced the issue as being logic based on whether a field was populated, rather than also incorporating whether that value was 'true' or 'false'.

What we didn't clock until testing was that when the value is populated, it is as a boolean value. However, out fetch service is casting it to text, which means our fix is still equating `isSupplyPublicWater = false` as 'true', because the value it is testing is `'false'` and not `false`.

This updates the fetch service to cast the value properly, which then means the logic we amended in part 1 will now behave as expected.
  • Loading branch information
Cruikshanks committed Dec 23, 2024
1 parent 28d2b50 commit efb3e43
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit efb3e43

Please sign in to comment.