mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-25 15:49:31 +00:00
fix(asset): calculate depreciation amount for non prorata based schedules
This commit is contained in:
@@ -1571,11 +1571,9 @@ def get_straight_line_or_manual_depr_amount(asset, row, schedule_idx, number_of_
|
|||||||
|
|
||||||
return daily_depr_amount * (date_diff(to_date, from_date) + 1)
|
return daily_depr_amount * (date_diff(to_date, from_date) + 1)
|
||||||
else:
|
else:
|
||||||
return (
|
return (flt(asset.gross_purchase_amount) - flt(row.expected_value_after_useful_life)) / flt(
|
||||||
flt(asset.gross_purchase_amount)
|
row.total_number_of_depreciations
|
||||||
- flt(asset.opening_accumulated_depreciation)
|
)
|
||||||
- flt(row.expected_value_after_useful_life)
|
|
||||||
) / flt(row.total_number_of_depreciations - asset.number_of_depreciations_booked)
|
|
||||||
|
|
||||||
|
|
||||||
def get_shift_depr_amount(asset, row, schedule_idx):
|
def get_shift_depr_amount(asset, row, schedule_idx):
|
||||||
|
|||||||
Reference in New Issue
Block a user