mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
fix(asset): incorrect date difference calculation (#26805)
This commit is contained in:
@@ -851,7 +851,7 @@ def get_depreciation_amount(asset, depreciable_value, row):
|
||||
# if its the first depreciation
|
||||
if depreciable_value == asset.gross_purchase_amount:
|
||||
# as per IT act, if the asset is purchased in the 2nd half of fiscal year, then rate is divided by 2
|
||||
diff = date_diff(asset.available_for_use_date, row.depreciation_start_date)
|
||||
diff = date_diff(row.depreciation_start_date, asset.available_for_use_date)
|
||||
if diff <= 180:
|
||||
rate_of_depreciation = rate_of_depreciation / 2
|
||||
frappe.msgprint(
|
||||
|
||||
Reference in New Issue
Block a user