Merge pull request #4250 from expsa/ahmed-odex-hr

fixing
This commit is contained in:
ahmed-nouri051 2025-08-18 17:33:58 +02:00 committed by GitHub
commit 9cd950bf88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1014,7 +1014,7 @@ class SalaryRuleInput(models.Model):
or (datetime.strptime(str(payslip.date_to), "%Y-%m-%d") >= date1
and date2 >= datetime.strptime(str(payslip.date_from), "%Y-%m-%d")):
if advantage_rule.benefits_discounts.name not in sorted_rules:
if advantage_rule.benefits_discounts and advantage_rule.benefits_discounts.name not in sorted_rules:
amount, qty, rate = rule._compute_rule(localdict)
previous_amount = rule.code in localdict and localdict[
rule.code] or 0.0