mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-30 14:31:57 -05:00
Update ft_billing DAO functions to use postage
* Updated the 'fetch_billing_data_for_day' DAO function to take postage into account * Updated the 'update_fact_billing' DAO function to insert postage for new rows. When updating rows which are identical apart from the postage, the original row will be kept. (This behaviour will change once postage is added to the primary key - at this point, upserting will add a new row.) * Also changed some fixtures / test set up functions to take postage into account
This commit is contained in:
@@ -535,7 +535,8 @@ def sample_notification(
|
||||
client_reference=None,
|
||||
rate_multiplier=1.0,
|
||||
scheduled_for=None,
|
||||
normalised_to=None
|
||||
normalised_to=None,
|
||||
postage=None,
|
||||
):
|
||||
if created_at is None:
|
||||
created_at = datetime.utcnow()
|
||||
@@ -580,7 +581,8 @@ def sample_notification(
|
||||
'updated_at': created_at if status in NOTIFICATION_STATUS_TYPES_COMPLETED else None,
|
||||
'client_reference': client_reference,
|
||||
'rate_multiplier': rate_multiplier,
|
||||
'normalised_to': normalised_to
|
||||
'normalised_to': normalised_to,
|
||||
'postage': postage,
|
||||
}
|
||||
if job_row_number is not None:
|
||||
data['job_row_number'] = job_row_number
|
||||
|
||||
Reference in New Issue
Block a user