fix(Asset Capitalization): Reverse depreciation on cancel
This commit is contained in:
parent
dc3c27fd1b
commit
85d1a237ce
@ -371,6 +371,7 @@ class AssetCapitalization(StockController):
|
||||
self.set_consumed_asset_status(asset)
|
||||
|
||||
if asset.calculate_depreciation:
|
||||
self.reverse_depreciation_entry_made_after_disposal(asset)
|
||||
self.reset_depreciation_schedule(asset)
|
||||
else:
|
||||
if asset.calculate_depreciation:
|
||||
|
@ -174,6 +174,7 @@ class TestAssetCapitalization(unittest.TestCase):
|
||||
self.assertEqual(actual_gle, expected_gle)
|
||||
|
||||
# Cancel Asset Capitalization and make test entries and status are reversed
|
||||
asset_capitalization.reload()
|
||||
asset_capitalization.cancel()
|
||||
self.assertEqual(consumed_asset.db_get('status'), 'Partially Depreciated')
|
||||
self.assertFalse(get_actual_gle_dict(asset_capitalization.name))
|
||||
|
Loading…
Reference in New Issue
Block a user