Skip to content

Commit

Permalink
Merge pull request #315 from skibanga/fix_salary_register
Browse files Browse the repository at this point in the history
fix: ensure grouping by salary_component
  • Loading branch information
miteshpc authored Apr 29, 2024
2 parents 915391e + 92074f5 commit e93f203
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def get_prev_ss_basic_map(filters, prev_salary_slips):
prev_ss_basic_query = prev_ss_basic_query.where(
ss.payroll_cost_center == filters.get("cost_center")
)

prev_ss_basic_query = prev_ss_basic_query.groupby(sd.salary_component)
prev_ss_basic_data = prev_ss_basic_query.run(as_dict=1)

return prev_ss_basic_data or []
Expand Down Expand Up @@ -696,7 +696,7 @@ def get_prev_ss_earn_map(filters, prev_salary_slips):
prev_ss_earnings_query = prev_ss_earnings_query.where(
ss.payroll_cost_center == filters.get("cost_center")
)

prev_ss_earnings_query = prev_ss_earnings_query.groupby(sd.salary_component)
prev_ss_earnings_data = prev_ss_earnings_query.run(as_dict=1)

return prev_ss_earnings_data or []
Expand Down Expand Up @@ -735,7 +735,7 @@ def get_prev_ss_ded_map(filters, prev_salary_slips):
prev_ss_deductions_query = prev_ss_deductions_query.where(
ss.payroll_cost_center == filters.get("cost_center")
)

prev_ss_deductions_query = prev_ss_deductions_query.groupby(sd.salary_component)
prev_ss_deductions_data = prev_ss_deductions_query.run(as_dict=1)

return prev_ss_deductions_data or []
Expand Down Expand Up @@ -840,7 +840,7 @@ def get_cur_ss_basic_map(filters, cur_salary_slips):
cur_ss_basic_query = cur_ss_basic_query.where(
ss.payroll_cost_center == filters.get("cost_center")
)

cur_ss_basic_query = cur_ss_basic_query.groupby(sd.salary_component)
cur_ss_basic_data = cur_ss_basic_query.run(as_dict=1)

return cur_ss_basic_data or []
Expand Down Expand Up @@ -877,6 +877,7 @@ def get_cur_ss_earning_map(filters, cur_salary_slips):
ss.payroll_cost_center == filters.get("cost_center")
)

cur_ss_earnings_query = cur_ss_earnings_query.groupby(sd.salary_component)
cur_ss_earnings_data = cur_ss_earnings_query.run(as_dict=1)

return cur_ss_earnings_data or []
Expand Down Expand Up @@ -909,7 +910,7 @@ def get_cur_ss_ded_map(filters, cur_salary_slips):
cur_ss_deduction_query = cur_ss_deduction_query.where(
ss.payroll_cost_center == filters.get("cost_center")
)

cur_ss_deduction_query = cur_ss_deduction_query.groupby(sd.salary_component)
cur_ss_deductions_data = cur_ss_deduction_query.run(as_dict=1)

return cur_ss_deductions_data or []
Expand Down

0 comments on commit e93f203

Please sign in to comment.