mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 21:49:18 +00:00
feat(regional): toggle for reduced depreciation rate as per IT Act (#27600)
This commit is contained in:
@@ -857,12 +857,13 @@ def get_depreciation_amount(asset, depreciable_value, row):
|
||||
rate_of_depreciation = row.rate_of_depreciation
|
||||
# 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(row.depreciation_start_date, asset.available_for_use_date)
|
||||
if diff <= 180:
|
||||
rate_of_depreciation = rate_of_depreciation / 2
|
||||
frappe.msgprint(
|
||||
_('As per IT Act, the rate of depreciation for the first depreciation entry is reduced by 50%.'))
|
||||
if row.finance_book and frappe.db.get_value('Finance Book', row.finance_book, 'for_income_tax'):
|
||||
# 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(row.depreciation_start_date, asset.available_for_use_date)
|
||||
if diff <= 180:
|
||||
rate_of_depreciation = rate_of_depreciation / 2
|
||||
frappe.msgprint(
|
||||
_('As per IT Act, the rate of depreciation for the first depreciation entry is reduced by 50%.'))
|
||||
|
||||
depreciation_amount = flt(depreciable_value * (flt(rate_of_depreciation) / 100))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user