Prepare to switch to "chargeable_units" in API

This is so we can migrate from "billing_units" to this new field in
the Admin app, without breaking anything in between.
This commit is contained in:
Ben Thorner
2022-04-20 16:55:38 +01:00
parent 646de16ace
commit 0af791e417
4 changed files with 18 additions and 0 deletions

View File

@@ -30,7 +30,9 @@ def serialize_ft_billing_yearly_totals(rows):
return [
{
"notification_type": row.notification_type,
# TEMPORARY: while we migrate to "chargeable_units" in the Admin app
"billing_units": row.billable_units,
"chargeable_units": row.chargeable_units,
"rate": float(row.rate),
"letter_total": float(row.billable_units * row.rate) if row.notification_type == 'letter' else 0,
}