Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aconcagua
hr_payroll_base_config
Commits
44e912fb
Commit
44e912fb
authored
Nov 02, 2021
by
Santiago Apel
💬
Browse files
[FIX] rule_total_max parameter input: tuple
parent
7fd50bf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
models/hr_payslip.py
models/hr_payslip.py
+3
-1
No files found.
models/hr_payslip.py
View file @
44e912fb
...
...
@@ -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 payslip.id = line.slip_id
WHERE line.employee_id = %s
AND line.code in
(
%s
)
AND line.code in %s
AND line.date BETWEEN %s AND %s
AND payslip.id != %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
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment