Browse Source

fix: unable to create manual / auto asset depreciation entry when cost_center is mandatory (#26912)

Summary : unable to create manual / auto asset depreciation entry when cost_center is mandatory

Reason: Though we are calculating value for depreciation_cost_center, it is not passed in credit_entry(it is passed in debit_entry) and this prevents creation of manual / auto asset depreciation entry when cost_center is mandatory

Solution : pass already calculated depreciation_cost_center value in credit_entry (in line with, already done as in debit_entry)
develop
Ashish Shah 3 years ago
committed by GitHub
parent
commit
b99c011947
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      erpnext/assets/doctype/asset/depreciation.py

2
erpnext/assets/doctype/asset/depreciation.py

@ -59,7 +59,7 @@ def make_depreciation_entry(asset_name, date=None):
"credit_in_account_currency": d.depreciation_amount,
"reference_type": "Asset",
"reference_name": asset.name,
"cost_center": ""
"cost_center": depreciation_cost_center
}
debit_entry = {

Loading…
Cancel
Save