Hello All
I created a new Custom Doctype, and I’m trying to calculate the current Leave Balance (Available Leaves) of an Employee.
I tried fetching the data from the “Leave Allocation” Doctype but it hadn’t updated the “Total Allocated Leaves” of the Employee.
My goal is to fetch the Available Leaves of the “Leave Type” in a Specific “Leave Period”, as shown in the image below…
There are submitted Leave Applications on the same Employee before but not updated in the “Leave Allocation” so the Leave Balance should be less…
Can anyone please help me on this issue?
P.S: I’m a novice in Python coding
Thank you