Skip to content

Commit

Permalink
Pull request #18: SUPSCIT-2787 correct the discounts level for 3YC su…
Browse files Browse the repository at this point in the history
…bscriptions

Merge in SITC/adobe-reports from SUPSCIT-2787-connect-report-subscriptions-with-3yc-still-showing-non-3yc-discount-level to master

Squashed commit of the following:

commit ff069965759d2d7b3a5c1389ce216458e22a37be
Author: David Franco <david.franco@cloublue.com>
Date:   Tue Aug 29 11:19:37 2023 +0200

    SUPSCIT-2787 correct the discounts level for 3YC subscriptions
  • Loading branch information
David Franco authored and David Franco committed Aug 29, 2023
1 parent 0252cbf commit b3a7bab
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion reports/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,15 @@ def get_discount_level(discount_group: str) -> str:
:param discount_group:
:return: str with level of discount
"""
if len(discount_group) > 2 and discount_group[2] == 'A':
if len(discount_group) > 2 and discount_group[2] == 'A' and discount_group[0] == '1':
discount = 'Level ' + discount_group[0:2]
elif len(discount_group) > 2 and discount_group[2] == 'A':
discount = 'Level ' + discount_group[1]
elif len(discount_group) > 2 and discount_group[2] == '0':
discount = 'TLP Level ' + discount_group[1]
else:
discount = 'Empty'
print(discount)
return discount


Expand Down

0 comments on commit b3a7bab

Please # to comment.