fix: don't add GL Entry for Acc. Depr. while scrapping non-depreciable assets (backport #35714) (#35715)
fix: don't add GL Entry for Acc. Depr. while scrapping non-depreciable assets (#35714)
fix: on asset scrap, don't add gl entry for acc. depr. if no acc. depr.
(cherry picked from commit bb39a2cac7)
Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
This commit is contained in:
@@ -483,18 +483,22 @@ def get_gl_entries_on_asset_disposal(
|
|||||||
},
|
},
|
||||||
item=asset,
|
item=asset,
|
||||||
),
|
),
|
||||||
asset.get_gl_dict(
|
|
||||||
{
|
|
||||||
"account": accumulated_depr_account,
|
|
||||||
"debit_in_account_currency": accumulated_depr_amount,
|
|
||||||
"debit": accumulated_depr_amount,
|
|
||||||
"cost_center": depreciation_cost_center,
|
|
||||||
"posting_date": date,
|
|
||||||
},
|
|
||||||
item=asset,
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if accumulated_depr_amount:
|
||||||
|
gl_entries.append(
|
||||||
|
asset.get_gl_dict(
|
||||||
|
{
|
||||||
|
"account": accumulated_depr_account,
|
||||||
|
"debit_in_account_currency": accumulated_depr_amount,
|
||||||
|
"debit": accumulated_depr_amount,
|
||||||
|
"cost_center": depreciation_cost_center,
|
||||||
|
"posting_date": date,
|
||||||
|
},
|
||||||
|
item=asset,
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
profit_amount = flt(selling_amount) - flt(value_after_depreciation)
|
profit_amount = flt(selling_amount) - flt(value_after_depreciation)
|
||||||
if profit_amount:
|
if profit_amount:
|
||||||
get_profit_gl_entries(
|
get_profit_gl_entries(
|
||||||
|
|||||||
Reference in New Issue
Block a user