fix: Depreciation Amount calculation for first row when Monthly Depreciation is allowed (#30692)

This commit is contained in:
Ganga Manoj
2022-04-13 14:15:10 +05:30
committed by GitHub
parent 2778123106
commit 9cf790db9d

View File

@@ -364,7 +364,7 @@ class Asset(AccountsController):
if has_pro_rata and n == 0:
# For first entry of monthly depr
if r == 0:
days_until_first_depr = date_diff(monthly_schedule_date, self.available_for_use_date)
days_until_first_depr = date_diff(monthly_schedule_date, self.available_for_use_date) + 1
per_day_amt = depreciation_amount / days
depreciation_amount_for_current_month = per_day_amt * days_until_first_depr
depreciation_amount -= depreciation_amount_for_current_month