fix: set new purchase_receipt_amount on asset split (copy #36272) (#36280)

fix: set new purchase_receipt_amount on asset split

(cherry picked from commit 7fd9b489eed33a81f29ecb3802d8a07d232c4c9c)

Co-authored-by: anandbaburajan <anandbaburajan@gmail.com>
This commit is contained in:
mergify[bot] 2023-07-24 19:37:07 +05:30 committed by GitHub
parent 4867a767a2
commit 1bc87a970a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -933,6 +933,8 @@ def create_new_asset_after_split(asset, split_qty):
)
new_asset.gross_purchase_amount = new_gross_purchase_amount
if asset.purchase_receipt_amount:
new_asset.purchase_receipt_amount = new_gross_purchase_amount
new_asset.opening_accumulated_depreciation = opening_accumulated_depreciation
new_asset.asset_quantity = split_qty
new_asset.split_from = asset.name