fix(report):check amount_status

This commit is contained in:
shahzeydyfah
2025-05-29 15:31:58 +03:30
parent 2edefabd59
commit 503ee1712c
+1
View File
@@ -313,6 +313,7 @@ class ReportRepository():
if report: if report:
for i in report: for i in report:
_model = ProjectPriceReport(**i) _model = ProjectPriceReport(**i)
if 'amount_status' in _model and 'amount_adjust' in _model:
cal = (_model.first_amount-_model.amount_status +_model.amount_adjust)/_model.first_amount cal = (_model.first_amount-_model.amount_status +_model.amount_adjust)/_model.first_amount
if cal < 20: if cal < 20:
result['less_than_20'].append(_model.project_id) result['less_than_20'].append(_model.project_id)