Commit 44e912fb authored by Santiago Apel's avatar Santiago Apel 💬
Browse files

[FIX] rule_total_max parameter input: tuple

parent 7fd50bf4
......@@ -440,12 +440,13 @@ class HRPayslip(models.Model):
return date_from, date_to
def _build_rule_table(self):
return """
FROM hr_payslip_line AS line
JOIN hr_payslip AS payslip
ON = line.slip_id
WHERE line.employee_id = %s
AND line.code in (%s)
AND line.code in %s
AND != %s
AND payslip.state IN ('draft', 'done', 'verify')
......@@ -530,6 +531,7 @@ class HRPayslip(models.Model):
query = self._build_rule_total_max_query()
total_max = float(self.query_rule_result(query, rule_code, months_back,
date_to, *args, **kwargs))
return total_max
def rule_month(self, rule_code, months_back=0,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment