Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue 560 refactor employee leave balance (#787)
* refactor: Employee Leave Balance Report - incorrect opening balance on boundary allocation dates - carry forwarded leaves accounted in leaves allocated column, should be part of opening balance - leaves allocated column also adds expired leave allocations causing negative balances, should only consider non-expiry records (cherry picked from commit 538b64b) * fix: expired leaves not calculated properly because of newly created expiry ledger entries (cherry picked from commit 1ea749c) * refactor: Leaves Taken calculation - fix issue where Leaves Taken also adds leaves expiring on boundary date as leaves taken, causing ambiguity - remove unnecessary `skip_expiry_leaves` function - `get_allocation_expiry` considering cancelled entries too (cherry picked from commit 26b40e7) * refactor: balance in Balance Summary report near allocation expiry date - Leave Balance shows minimum leaves remaining after comparing with remaining days for allocation expiry causing ambiguity - refactor remaining leaves calculation to return both, actual leave balance and balance for consumption - show actual balance in leave application, use balance for consumption only in validations (cherry picked from commit 55ac851) * fix: sort imports, sider issues (cherry picked from commit b5c686a) * fix: show actual balance instead of consumption balance in opening balance - not changing opening balance based on remaining days (cherry picked from commit dbfa463) * test: employee leave balance report - fix expired leaves calculation when filters span across 2 different allocation periods (cherry picked from commit c050ce4) * chore: remove unused imports, sort imports, fix sider (cherry picked from commit c7d5949) * test: Employee Leave Balance Summary (cherry picked from commit 88141d6) * fix: leave application dashboard - total leaves allocated considering cancelled leaves - optional plural for leave category labels - show dashboard only once from date is set, else it fetches all allocations till date and generates incorrect balance - change pending leaves to 'Leaves Pending Approval' for better context - update labels in Salary Slip Leave Details table (cherry picked from commit 942511c) * fix: earned leave policy assignment test (cherry picked from commit aaa1ae9) * test: fix test `test_leave_balance_near_allocaton_expiry` (cherry picked from commit a58dfec) * test: get leave details for leave application dashboard (cherry picked from commit 3f3b176) * fix: add type hints for employee leave balance report (cherry picked from commit 430bf00) * feat: split ledger entries for applications created across allocations - fix: ledger entry for expiring cf leaves not considering holidays (cherry picked from commit c0f1e26) * fix: clearer validation/warning messages for insufficient balance in leave application (cherry picked from commit a504ffc) * test: leave application validations (cherry picked from commit 6755d6e) * fix: boundary determination for separate ledger entries (cherry picked from commit 7023915) * test: separate leave ledger entries for leave applications across allocations (cherry picked from commit 97b7b50) * chore: linter issue (cherry picked from commit 921d6b2) --------- Co-authored-by: Rucha Mahabal <[email protected]>
- Loading branch information