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: disable leave application against expired allocations #2463

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

AyshaHakeem
Copy link
Contributor

@AyshaHakeem AyshaHakeem commented Nov 28, 2024

Fixes an issue where employees could apply for leaves marked as expired. Updated the condition to exclude expired leave allocations when fetching available leaves.

Before:
before

After:
after-2

@@ -953,7 +953,7 @@ def get_leave_allocation_records(employee, date, leave_type=None):
& (Ledger.docstatus == 1)
& (Ledger.transaction_type == "Leave Allocation")
& (Ledger.employee == employee)
& (Ledger.is_expired == 0)
& (LeaveAllocation.expired == 0)
Copy link
Member

Choose a reason for hiding this comment

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

Ledger getting expired and allocation getting expired is the same right? How does the earlier one not work?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Expired leaves were still shown despite the ledger filter applied

@ruchamahabal ruchamahabal self-assigned this Dec 10, 2024
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.

2 participants