Skip to content

Commit

Permalink
Fix: supp report logic 2867 (#2877)
Browse files Browse the repository at this point in the history
* fix: updated org service calculation for max credit offset to account for credit earning order over time

* fix: pending deductions calc change

* fix: None check on summary obj

* fix: added back exclude reserved

* fix: test for ignoring pending supplemental deductions

---------

Co-authored-by: Your Name <you@example.com>
  • Loading branch information
AlexZorkin and Your Name committed Apr 26, 2024
1 parent 6f58128 commit c90830b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions backend/api/services/OrganizationService.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ def get_pending_deductions(
if compliance_report.summary.credits_offset is not None:
deductions += compliance_report.summary.credits_offset

if report.status.director_status_id == 'Accepted' and ignore_pending_supplemental:
if report.summary is not None:
if report.summary.credits_offset:
deductions -= report.summary.credits_offset
# if report.status.director_status_id == 'Accepted' and ignore_pending_supplemental:
# if report.summary is not None:
# if report.summary.credits_offset:
# deductions -= report.summary.credits_offset

if deductions < 0:
deductions = 0
Expand Down

0 comments on commit c90830b

Please sign in to comment.