mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-02 17:48:50 -04:00
Show international letters on the usage page
The api returns letter details split by postage, so international letters are returned with a postage of `europe` or `rest-of-world` not `international` and these rows need to be added together when the rate is the same before they are displayed on the usage page. To do this, we need to replace the postage of `europe` and `rest-of-world` with `international`. The data then needs to be sorted by postage and rate before the letter units for rows which are international and have the same rate are added together.
This commit is contained in:
@@ -2627,7 +2627,21 @@ def mock_get_billable_units(mocker):
|
||||
'rate': 0.33,
|
||||
'billing_units': 5,
|
||||
'postage': 'first',
|
||||
}
|
||||
},
|
||||
{
|
||||
'month': 'February',
|
||||
'notification_type': 'letter',
|
||||
'rate': 0.84,
|
||||
'billing_units': 3,
|
||||
'postage': 'europe',
|
||||
},
|
||||
{
|
||||
'month': 'February',
|
||||
'notification_type': 'letter',
|
||||
'rate': 0.84,
|
||||
'billing_units': 7,
|
||||
'postage': 'rest-of-world',
|
||||
},
|
||||
]
|
||||
|
||||
return mocker.patch(
|
||||
|
||||
Reference in New Issue
Block a user