Leave Allocated was wrong calculated because the code is selecting all transaction type instead of “Leave Allocation” only.
I have modified the leave_application.py to correct this issue:
SELECT
employee, leave_type, from_date, to_date, leaves, transaction_name,
is_carry_forward, is_expired
FROM tabLeave Ledger Entry
WHERE employee=%(employee)s AND leave_type=%(leave_type)s
AND docstatus=1
AND transaction_type = “Leave Allocation” → I have added this line in the code.
If anybody having same issue can refer to this solution.
Thanks,
Han
2 Likes