feat: consider carry forwarded leaves on creation of encashment

This commit is contained in:
Mangesh-Khairnar
2019-08-08 17:06:15 +05:30
parent 314647572c
commit 5cbe6160ca
8 changed files with 69 additions and 37 deletions

View File

@@ -318,7 +318,7 @@ def create_earned_leave_ledger_entry(allocation, earned_leaves, date):
''' Create leave ledger entry based on the earned leave frequency '''
allocation.new_leaves_allocated = earned_leaves
allocation.from_date = date
allocation.carry_forwarded_leaves = 0
allocation.unused_leaves = 0
allocation.create_leave_ledger_entry()
def check_frequency_hit(from_date, to_date, frequency):