Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4899 Hotfix for payment Feewaiver #4914

Merged
merged 8 commits into from
Dec 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,6 @@ def addadditionalfilter(cls, basequery, additionalfilter=None, userid=None, isia
@classmethod
def getrequestssubquery(cls, filterfields, keyword, additionalfilter, userid, isiaorestrictedfilemanager, groups):
basequery = FOIRawRequest.getbasequery(additionalfilter, userid, isiaorestrictedfilemanager, groups)
print(f"basequery = {basequery}")
basequery = basequery.filter(FOIRawRequest.status != 'Unopened').filter(FOIRawRequest.status != 'Closed')
#filter/search
if(len(filterfields) > 0 and keyword is not None):
Expand Down
3 changes: 2 additions & 1 deletion request-management-api/request_api/services/events/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ def __commentmessage(self, state, username, requesttype, requestid):
comment = username+' changed the state of the request to '+self.__formatstate(state)
if state == "Response" and requesttype == "ministryrequest":
signgoffapproval = FOIMinistryRequest().getrequest(requestid)['ministrysignoffapproval']
comment = comment + f". Approved by {signgoffapproval['approvername']}, {signgoffapproval['approvertitle']} on {signgoffapproval['approveddate']}"
if signgoffapproval:
comment = comment + f". Approved by {signgoffapproval['approvername']}, {signgoffapproval['approvertitle']} on {signgoffapproval['approveddate']}"
return comment

def __notificationmessage(self, state):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def getrequestdetails(self,foirequestid, foiministryrequestid):
payment = paymentservice().getpayment(foirequestid, foiministryrequestid)
if approvedcfrfee is not None and approvedcfrfee != {}:
requestdetails['cfrfee'] = approvedcfrfee
_totaldue = float(approvedcfrfee['feedata']['actualtotaldue']) if float(approvedcfrfee['feedata']['actualtotaldue']) > 0 else float(approvedcfrfee['feedata']['estimatedtotaldue'])
_balancedue = _totaldue - float(cfrfee['feedata']['amountpaid'])
_totaldue = float(approvedcfrfee['feedata']['actualtotaldue']) if float(approvedcfrfee['feedata']['actualtotaldue']) > 0 else float(approvedcfrfee['feedata']['estimatedtotaldue'])
_balancedue = _totaldue - (float(cfrfee['feedata']['amountpaid']) + float(approvedcfrfee['feedata']['feewaiveramount']))
requestdetails['cfrfee']['feedata']['amountpaid'] = cfrfee['feedata']['amountpaid']
requestdetails['cfrfee']['feedata']["balanceDue"] = '{:.2f}'.format(_balancedue)
if approvedcfrfee['feedata']['actualtotaldue']:
Expand Down
Loading