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

feat: process leave encashment via payment entry (backport #2775) #2802

Closed
wants to merge 18 commits into from

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Feb 21, 2025

Previously, Leave Encashment was always processed by creating an Additional Salary on submission, which was later paid through the Salary Slip.

  • Add an option to process Leave Encashment via a Payment Entry instead of a Salary Slip.
  • Introduced a status field to track payment status.
  • Status now updates when paid via Payment Entry or Salary Slip.

Patch to update payment status of existing, submitted leave encashment docs based on whether they have been paid via salary slip

Before:
No status tracking, only Salary Slip-based payment.
Screenshot 2025-02-11 at 12 26 51 PM

After:
leave-payment

Documentation Link: https://docs.frappe.io/hr/leave-encashment


This is an automatic backport of pull request #2775 done by [Mergify](https://mergify.com).

AyshaHakeem and others added 16 commits February 21, 2025 10:50
…d and other changes

(cherry picked from commit 7166782)

# Conflicts:
#	hrms/hr/doctype/leave_encashment/leave_encashment.json
(cherry picked from commit 9af2020)

# Conflicts:
#	hrms/hr/doctype/leave_encashment/leave_encashment.json
(cherry picked from commit e4386af)

# Conflicts:
#	hrms/hr/doctype/leave_encashment/leave_encashment.json
(cherry picked from commit 882b1d1)

# Conflicts:
#	hrms/hr/doctype/leave_encashment/leave_encashment.json
(cherry picked from commit 989bdaf)

# Conflicts:
#	hrms/hooks.py
(cherry picked from commit b4b76c4)

# Conflicts:
#	hrms/hr/doctype/leave_encashment/test_leave_encashment.py
(cherry picked from commit 411d1e1)

# Conflicts:
#	hrms/hr/doctype/leave_encashment/leave_encashment.json
(cherry picked from commit faa6ddf)
(cherry picked from commit fa49658)

# Conflicts:
#	hrms/hr/doctype/leave_encashment/leave_encashment.json
@mergify mergify bot requested a review from ruchamahabal as a code owner February 21, 2025 10:50
@mergify mergify bot added the conflicts label Feb 21, 2025
Copy link
Contributor Author

mergify bot commented Feb 21, 2025

Cherry-pick of 7166782 has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is up to date with 'origin/version-15-hotfix'.

You are currently cherry-picking commit 7166782e.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/leave_encashment/leave_encashment.json

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of 9af2020 has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is ahead of 'origin/version-15-hotfix' by 1 commit.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 9af2020d.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hrms/hr/doctype/leave_encashment/leave_encashment.js

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/leave_encashment/leave_encashment.json

Cherry-pick of e4386af has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is ahead of 'origin/version-15-hotfix' by 2 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit e4386af6.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hrms/hr/doctype/leave_encashment/leave_encashment.js

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/leave_encashment/leave_encashment.json

Cherry-pick of 882b1d1 has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is ahead of 'origin/version-15-hotfix' by 4 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 882b1d1f.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hrms/hr/doctype/leave_encashment/leave_encashment.js
	modified:   hrms/public/js/erpnext/payment_entry.js

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/leave_encashment/leave_encashment.json

Cherry-pick of 989bdaf has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is ahead of 'origin/version-15-hotfix' by 6 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 989bdafc.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hrms/overrides/employee_payment_entry.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hooks.py

Cherry-pick of b4b76c4 has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is ahead of 'origin/version-15-hotfix' by 10 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit b4b76c4b.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	new file:   hrms/patches/v15_0/update_payment_status_for_leave_encashment.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/leave_encashment/test_leave_encashment.py

Cherry-pick of 411d1e1 has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is ahead of 'origin/version-15-hotfix' by 11 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 411d1e1c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hrms/hooks.py
	modified:   hrms/hr/doctype/leave_encashment/leave_encashment.js
	modified:   hrms/hr/doctype/leave_encashment/leave_encashment.py

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/leave_encashment/leave_encashment.json

Cherry-pick of fa49658 has failed:

On branch mergify/bp/version-15-hotfix/pr-2775
Your branch is ahead of 'origin/version-15-hotfix' by 15 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit fa496584.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   hrms/hr/doctype/leave_encashment/leave_encashment.py
	deleted:    hrms/patches/v15_0/update_payment_status_for_leave_encashment

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   hrms/hr/doctype/leave_encashment/leave_encashment.json

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@AyshaHakeem AyshaHakeem removed the request for review from ruchamahabal February 21, 2025 10:54
Comment on lines +244 to +248
<<<<<<< HEAD
advance_payment_doctypes = ["Gratuity", "Employee Advance"]
=======
advance_payment_payable_doctypes = ["Leave Encashment", "Gratuity", "Employee Advance"]
>>>>>>> 989bdafc (feat: payment entry for leave encashment)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<<<<<<< HEAD
advance_payment_doctypes = ["Gratuity", "Employee Advance"]
=======
advance_payment_payable_doctypes = ["Leave Encashment", "Gratuity", "Employee Advance"]
>>>>>>> 989bdafc (feat: payment entry for leave encashment)
advance_payment_payable_doctypes = ["Leave Encashment", "Gratuity", "Employee Advance"]

@AyshaHakeem AyshaHakeem deleted the mergify/bp/version-15-hotfix/pr-2775 branch February 21, 2025 11:12
Comment on lines -170 to +261
"modified": "2023-10-23 16:49:16.737157",
"modified": "2025-02-21 13:11:01.939992",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"modified": "2023-10-23 16:49:16.737157",
"modified": "2025-02-21 13:11:01.939992",
"modified": "2025-02-21 13:11:01.939992",

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

Successfully merging this pull request may close these issues.

1 participant