fix: asset value correction in fixed asset register (#41943)
This commit is contained in:
@@ -125,9 +125,10 @@ def get_data(filters):
|
|||||||
if assets_linked_to_fb and asset.calculate_depreciation and asset.asset_id not in assets_linked_to_fb:
|
if assets_linked_to_fb and asset.calculate_depreciation and asset.asset_id not in assets_linked_to_fb:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
asset_value = get_asset_value_after_depreciation(
|
depreciation_amount = depreciation_amount_map.get(asset.asset_id) or 0.0
|
||||||
asset.asset_id, finance_book
|
asset_value = (
|
||||||
) or get_asset_value_after_depreciation(asset.asset_id)
|
asset.gross_purchase_amount - asset.opening_accumulated_depreciation - depreciation_amount
|
||||||
|
)
|
||||||
|
|
||||||
row = {
|
row = {
|
||||||
"asset_id": asset.asset_id,
|
"asset_id": asset.asset_id,
|
||||||
@@ -139,7 +140,7 @@ def get_data(filters):
|
|||||||
or pi_supplier_map.get(asset.purchase_invoice),
|
or pi_supplier_map.get(asset.purchase_invoice),
|
||||||
"gross_purchase_amount": asset.gross_purchase_amount,
|
"gross_purchase_amount": asset.gross_purchase_amount,
|
||||||
"opening_accumulated_depreciation": asset.opening_accumulated_depreciation,
|
"opening_accumulated_depreciation": asset.opening_accumulated_depreciation,
|
||||||
"depreciated_amount": depreciation_amount_map.get(asset.asset_id) or 0.0,
|
"depreciated_amount": depreciation_amount,
|
||||||
"available_for_use_date": asset.available_for_use_date,
|
"available_for_use_date": asset.available_for_use_date,
|
||||||
"location": asset.location,
|
"location": asset.location,
|
||||||
"asset_category": asset.asset_category,
|
"asset_category": asset.asset_category,
|
||||||
|
|||||||
Reference in New Issue
Block a user