|
|
@ -43,6 +43,7 @@ class CheckModalForm(BaseModalForm):
|
|
|
|
|
|
|
|
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
deductions = self.instance.deductions.all()
|
|
|
|
deductions = self.instance.deductions.all()
|
|
|
|
|
|
|
|
valid = True
|
|
|
|
for deduction in deductions:
|
|
|
|
for deduction in deductions:
|
|
|
|
checker = deduction.account.quality_check()
|
|
|
|
checker = deduction.account.quality_check()
|
|
|
|
for msg in checker.messages:
|
|
|
|
for msg in checker.messages:
|
|
|
@ -50,8 +51,8 @@ class CheckModalForm(BaseModalForm):
|
|
|
|
"checked_comps",
|
|
|
|
"checked_comps",
|
|
|
|
f"{deduction.account.identifier}: {msg}"
|
|
|
|
f"{deduction.account.identifier}: {msg}"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
return checker.valid
|
|
|
|
valid &= checker.valid
|
|
|
|
return True
|
|
|
|
return valid
|
|
|
|
|
|
|
|
|
|
|
|
def _are_comps_valid(self):
|
|
|
|
def _are_comps_valid(self):
|
|
|
|
""" Performs validity checks on all types of compensations
|
|
|
|
""" Performs validity checks on all types of compensations
|
|
|
|