Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(SalarySlip): use correct end_date variable for calculation #2617

Closed

Conversation

NethminaHiker360
Copy link

Changing the line from date = add_days(self.end_date, -day) to date = add_days(end_date, -day) ensures that the function uses the correct end_date parameter passed to it, rather than an instance variable self.end_date. This change aligns with the function's requirements and ensures that the calculation is based on the correct date values provided as arguments.

By making this change, the function will correctly calculate the days outside the period, preventing negative values in the absent_days field. This leads to accurate payment days and correct salary slip calculations for employees, especially those joining mid-month.

closes #2612

backport version-14

mergify bot and others added 30 commits February 19, 2024 12:56
…l template when HTML format is used (backport frappe#1435) (frappe#1442)

When the Email Notification template for Leave Application uses HTML and the use HTML checkbox is selected, the correct property for referencing the template response is response_ rather than response. The same has been corrected.

(cherry picked from commit b28e658)

Co-authored-by: zaheer-srushty <[email protected]>
…frappe#1446) (frappe#1451)

* fix(Monthly Attendance Sheet): parsing error for data values

* test: fix days dict key type

(cherry picked from commit ca7f639)

Co-authored-by: Akash  Tom <[email protected]>
…appe#1466) (frappe#1470)

* fix: enable no copy for Pending Amount & Returned Amount (frappe#1466)

* fix: no copy for Pending Amount & Returned Amount

* fix: modified

(cherry picked from commit cd6b82a)

* chore: fix conflicts

---------

Co-authored-by: Rehan Ansari <[email protected]>
Co-authored-by: Rucha Mahabal <[email protected]>
…s a filter query when it is disabled (backport frappe#1474) (frappe#1481)

(cherry picked from commit 9b80004)

Co-authored-by: Akash  Tom <[email protected]>
…nciliation tool (backport frappe#1489) (frappe#1490)

(cherry picked from commit 565f123)

Co-authored-by: ruthra kumar <[email protected]>
…attendance` (backport frappe#1494) (frappe#1495)

- mark absent on holiday after DOJ only

- make sure unmarked attendance is not on a holiday

(cherry picked from commit bb22a85)

Co-authored-by: Rucha Mahabal <[email protected]>
* fix: german translations (frappe#1463)

With focus on Leaves and Holidays

(cherry picked from commit bf53ed8)

# Conflicts:
#	hrms/translations/de.csv

* chore: resolve conflicts

---------

Co-authored-by: Raffael Meyer <[email protected]>
)

(cherry picked from commit a13efad)

Co-authored-by: Raffael Meyer <[email protected]>
…) (frappe#1505)

* fix: company fixture setup error handling & flags (frappe#1504)

* fix: company fixture setup error handling & flags

* chore: fix linter

* chore: fix linter

* fix: ignore validations during custom field setup in installation

- most of these are from unrelated changes in other doctype schemas, happens mostly when site is created from backup

(cherry picked from commit 6ca8cab)

# Conflicts:
#	hrms/setup.py

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <[email protected]>
…r)` (backport frappe#1513) (frappe#1514)

(cherry picked from commit dbf4f1c)

Co-authored-by: Raffael Meyer <[email protected]>
…lation message (backport frappe#1520) (frappe#1527)

* feat: leave application shown in link format

* Update hrms/hr/doctype/leave_ledger_entry/leave_ledger_entry.py

Co-authored-by: Rucha Mahabal <[email protected]>

* Update hrms/hr/doctype/leave_ledger_entry/leave_ledger_entry.py

Co-authored-by: Rucha Mahabal <[email protected]>

* Update leave_ledger_entry.py

* chore: fix conflicts

* chore: fix linter

---------

Co-authored-by: Rucha Mahabal <[email protected]>
(cherry picked from commit d373f2f)

Co-authored-by: Parameshwari Palanisamy <[email protected]>
…es (backport frappe#1526) (frappe#1529)

(cherry picked from commit c28bd2c)

Co-authored-by: Viny Selopal <[email protected]>
…ckport frappe#1532) (frappe#1533)

* fix: honour 'Consider Marked Attendance on Holidays' for Half Day (frappe#1532)

* fix: honour 'Consider Marked Attendance on Holidays' for Half Day

* test: Consider Marked Attendance on Holidays for Half Day

(cherry picked from commit b3fe5b4)

# Conflicts:
#	hrms/payroll/doctype/salary_slip/salary_slip.py

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <[email protected]>
… (frappe#1536)

* fix(Shift Assignment): calendar view date filter

* fix(Shift Assignment): account for unset end dates

* test: test for different date ranges

* chore(minor): add comment in test

---------

Co-authored-by: Rucha Mahabal <[email protected]>
(cherry picked from commit 6ddd029)

Co-authored-by: Akash  Tom <[email protected]>
(cherry picked from commit 69a759c)
If company is available and employee is not, we should still return the block lists that apply to all departments.

(cherry picked from commit c2699b6)
(cherry picked from commit e6882e4)
(cherry picked from commit 0ee5767)
(cherry picked from commit 9da9fea)
I doesn't make sense to mark the entire leave of, say, 5 days as "not all day" or "half day", just because the first or the last of the 5 days is a half day leave.

(cherry picked from commit af8b19c)
(cherry picked from commit 4e5e3e6)
mergify bot and others added 25 commits November 22, 2024 10:53
…ver-side (backport frappe#2445) (frappe#2449)

Co-authored-by: Rucha Mahabal <[email protected]>
fix(Salary Structure Assignment): validate cost center company on server-side (frappe#2445)
…kport frappe#2482) (frappe#2490)

* fix: Apply system precision value while validating leave balance

* fix: apply precision on leave balance, add fallback value for precision

* fix: remove precision at expired leaves calculation

(cherry picked from commit ffa4509)

Co-authored-by: Aysha <[email protected]>
(cherry picked from commit ce75e4e)

# Conflicts:
#	hrms/payroll/doctype/gratuity/gratuity.json
(cherry picked from commit da17577)
…tfix/pr-2460

fix: set correct work experience during gratuity calculation (copy frappe#2460)
* fix: remove read only for company

* fix: remove read only for department and fetch company and department only when empty

(cherry picked from commit 09f65da)

# Conflicts:
#	hrms/hr/doctype/expense_claim/expense_claim.json
…ix/pr-2498

fix(Expense Claim): allow editing company and department (backport frappe#2498)
- set min max dates in date picker

- only hide dialog if request is successful

- server side validation for allocation outside period

(cherry picked from commit 282124a)
…ix/pr-2520

feat: Allow setting From Date while manually allocating extra leaves (backport frappe#2520)
…e is enabled (backport frappe#2526) (frappe#2527)

* fix(Shift Type): mark Process Attendance After reqd if auto attendance is enabled (frappe#2526)

- default it to today's date

(cherry picked from commit 9824c00)

# Conflicts:
#	hrms/hr/doctype/shift_type/shift_type.json

* chore: fix conflicts

---------

Co-authored-by: Rucha Mahabal <[email protected]>
…low Leave Application After (Working Days)

(cherry picked from commit e5e1713)

# Conflicts:
#	hrms/hr/doctype/leave_type/leave_type.json
… Allocation Allowed per Leave Period

(cherry picked from commit 1157290)

# Conflicts:
#	hrms/hr/doctype/leave_type/leave_type.json
…ix/pr-2529

fix(UX): Change label for confusing Leave Type fields - Applicable After & Maximum Leave Allocation Allowed (backport frappe#2529)
…tion item (exempted from IT), not all (backport frappe#2568) (frappe#2569)

Co-authored-by: Rucha Mahabal <[email protected]>
@NethminaHiker360 NethminaHiker360 deleted the fix-2612-salary-slip branch January 10, 2025 10:09
@NethminaHiker360 NethminaHiker360 restored the fix-2612-salary-slip branch January 10, 2025 10:10
Copy link
Contributor

mergify bot commented Jan 10, 2025

⚠️ The sha of the head commit of this PR conflicts with #2619. Mergify cannot evaluate rules on this PR. ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect Payment Days Due to Negative Absent Days for Mid-Month Joiners