mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 21:59:13 +00:00
fix: Remove unnecessary variable
(cherry picked from commit 828769ca70)
# Conflicts:
# erpnext/assets/doctype/asset/asset.py
# erpnext/regional/india/utils.py
This commit is contained in:
@@ -859,8 +859,6 @@ def get_total_days(date, frequency):
|
|||||||
|
|
||||||
@erpnext.allow_regional
|
@erpnext.allow_regional
|
||||||
def get_depreciation_amount(asset, depreciable_value, row):
|
def get_depreciation_amount(asset, depreciable_value, row):
|
||||||
depreciation_left = flt(row.total_number_of_depreciations)
|
|
||||||
|
|
||||||
if row.depreciation_method in ("Straight Line", "Manual"):
|
if row.depreciation_method in ("Straight Line", "Manual"):
|
||||||
# if the Depreciation Schedule is being prepared for the first time
|
# if the Depreciation Schedule is being prepared for the first time
|
||||||
if not asset.flags.increase_in_asset_life:
|
if not asset.flags.increase_in_asset_life:
|
||||||
@@ -868,8 +866,12 @@ def get_depreciation_amount(asset, depreciable_value, row):
|
|||||||
depreciation_amount = (flt(row.value_after_depreciation) -
|
depreciation_amount = (flt(row.value_after_depreciation) -
|
||||||
=======
|
=======
|
||||||
depreciation_amount = (flt(asset.gross_purchase_amount) -
|
depreciation_amount = (flt(asset.gross_purchase_amount) -
|
||||||
|
<<<<<<< HEAD
|
||||||
>>>>>>> 5c3d4caeda (fix: Create Depreciation Schedules properly for existing Assets)
|
>>>>>>> 5c3d4caeda (fix: Create Depreciation Schedules properly for existing Assets)
|
||||||
flt(row.expected_value_after_useful_life)) / depreciation_left
|
flt(row.expected_value_after_useful_life)) / depreciation_left
|
||||||
|
=======
|
||||||
|
flt(row.expected_value_after_useful_life)) / flt(row.total_number_of_depreciations)
|
||||||
|
>>>>>>> 828769ca70 (fix: Remove unnecessary variable)
|
||||||
|
|
||||||
# if the Depreciation Schedule is being modified after Asset Repair
|
# if the Depreciation Schedule is being modified after Asset Repair
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -838,8 +838,6 @@ def update_taxable_values(doc, method):
|
|||||||
doc.get('items')[item_count - 1].taxable_value += diff
|
doc.get('items')[item_count - 1].taxable_value += diff
|
||||||
|
|
||||||
def get_depreciation_amount(asset, depreciable_value, row):
|
def get_depreciation_amount(asset, depreciable_value, row):
|
||||||
depreciation_left = flt(row.total_number_of_depreciations)
|
|
||||||
|
|
||||||
if row.depreciation_method in ("Straight Line", "Manual"):
|
if row.depreciation_method in ("Straight Line", "Manual"):
|
||||||
# if the Depreciation Schedule is being prepared for the first time
|
# if the Depreciation Schedule is being prepared for the first time
|
||||||
if not asset.flags.increase_in_asset_life:
|
if not asset.flags.increase_in_asset_life:
|
||||||
@@ -847,8 +845,12 @@ def get_depreciation_amount(asset, depreciable_value, row):
|
|||||||
depreciation_amount = (flt(row.value_after_depreciation) -
|
depreciation_amount = (flt(row.value_after_depreciation) -
|
||||||
=======
|
=======
|
||||||
depreciation_amount = (flt(asset.gross_purchase_amount) -
|
depreciation_amount = (flt(asset.gross_purchase_amount) -
|
||||||
|
<<<<<<< HEAD
|
||||||
>>>>>>> 22cc8d2246 (fix: Fix depreciation_amount calculation)
|
>>>>>>> 22cc8d2246 (fix: Fix depreciation_amount calculation)
|
||||||
flt(row.expected_value_after_useful_life)) / depreciation_left
|
flt(row.expected_value_after_useful_life)) / depreciation_left
|
||||||
|
=======
|
||||||
|
flt(row.expected_value_after_useful_life)) / flt(row.total_number_of_depreciations)
|
||||||
|
>>>>>>> 828769ca70 (fix: Remove unnecessary variable)
|
||||||
|
|
||||||
# if the Depreciation Schedule is being modified after Asset Repair
|
# if the Depreciation Schedule is being modified after Asset Repair
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user