From 165b65612e9dec8982a5c6fe06287ae2ed582483 Mon Sep 17 00:00:00 2001 From: Pea Tyczynska Date: Mon, 24 Sep 2018 14:52:06 +0100 Subject: [PATCH] Change how rates are filtered by date to equal or greater --- app/dao/fact_billing_dao.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/dao/fact_billing_dao.py b/app/dao/fact_billing_dao.py index 3719cc06c..0c8d636a8 100644 --- a/app/dao/fact_billing_dao.py +++ b/app/dao/fact_billing_dao.py @@ -218,11 +218,11 @@ def get_rate( if letter_page_count == 0: return 0 return next( - r[3] for r in letter_rates if date > r[0] and crown == r[1] + r[3] for r in letter_rates if date >= r[0] and crown == r[1] and letter_page_count == r[2] and post_class == r[4] ) elif notification_type == SMS_TYPE: - return next(r[2] for r in non_letter_rates if notification_type == r[0] and date > r[1]) + return next(r[2] for r in non_letter_rates if notification_type == r[0] and date >= r[1]) else: return 0