Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't depreciate assets with no schedule on scrapping #38276

Merged
merged 1 commit into from
Nov 23, 2023
Merged

fix: don't depreciate assets with no schedule on scrapping #38276

merged 1 commit into from
Nov 23, 2023

Conversation

anandbaburajan
Copy link
Contributor

When an asset with no depreciation schedules is scrapped, it's value is unnecessarily getting set to it's original value -- which shouldn't have happened because that asset could have manual depreciation entries created for them. Now the asset's value won't be changed in this case.

@github-actions github-actions bot added the needs-tests This PR needs automated unit-tests. label Nov 22, 2023
Copy link

codecov bot commented Nov 22, 2023

Codecov Report

Merging #38276 (fb40504) into develop (74f9e34) will decrease coverage by 0.01%.
Report is 15 commits behind head on develop.
The diff coverage is 90.32%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #38276      +/-   ##
===========================================
- Coverage    67.27%   67.26%   -0.01%     
===========================================
  Files          757      757              
  Lines        60515    60519       +4     
===========================================
+ Hits         40709    40711       +2     
- Misses       19806    19808       +2     
Files Coverage Δ
...ounts/doctype/purchase_invoice/purchase_invoice.py 84.29% <100.00%> (ø)
...post_accounting_ledger/repost_accounting_ledger.py 94.69% <100.00%> (ø)
...xt/accounts/doctype/sales_invoice/sales_invoice.py 83.83% <100.00%> (ø)
erpnext/assets/doctype/asset/asset.py 80.44% <100.00%> (ø)
erpnext/controllers/buying_controller.py 83.94% <ø> (ø)
...stock/doctype/purchase_receipt/purchase_receipt.py 91.29% <100.00%> (ø)
...serial_and_batch_bundle/serial_and_batch_bundle.py 73.15% <100.00%> (ø)
erpnext/projects/doctype/timesheet/timesheet.py 78.34% <66.66%> (ø)
erpnext/assets/doctype/asset/depreciation.py 83.28% <50.00%> (-0.41%) ⬇️

@anandbaburajan anandbaburajan merged commit 816b1b6 into frappe:develop Nov 23, 2023
mergify bot pushed a commit that referenced this pull request Nov 23, 2023
fix: don't depreciate non-depreciable assets on scrapping
(cherry picked from commit 816b1b6)

# Conflicts:
#	erpnext/assets/doctype/asset/depreciation.py
mergify bot pushed a commit that referenced this pull request Nov 23, 2023
fix: don't depreciate non-depreciable assets on scrapping
(cherry picked from commit 816b1b6)
anandbaburajan added a commit that referenced this pull request Nov 23, 2023
…38276) (#38293)

fix: don't depreciate assets with no schedule on scrapping (#38276)

fix: don't depreciate non-depreciable assets on scrapping
(cherry picked from commit 816b1b6)

Co-authored-by: Anand Baburajan <anandbaburajan@gmail.com>
frappe-pr-bot pushed a commit that referenced this pull request Nov 28, 2023
# [15.4.0](v15.3.0...v15.4.0) (2023-11-28)

### Bug Fixes

* allow on submit for child table fields ([ac7615a](ac7615a))
* annual income and expenses in digest ([ca2ad17](ca2ad17))
* check reposting settings before allowing editable si ([25bf475](25bf475))
* condition in other bundle utils ([e4d9ef1](e4d9ef1))
* create contact if existing customer doesn't have contact ([b1b065d](b1b065d))
* display all item rate stop messages (backport [#38289](#38289)) ([#38307](#38307)) ([99c1fbf](99c1fbf))
* do not set repost flag without validating voucher ([6a3c3b4](6a3c3b4))
* don't depreciate assets with no schedule on scrapping (backport [#38276](#38276)) ([#38293](#38293)) ([18613c5](18613c5))
* filter bundle items based on disabled check ([fb517e8](fb517e8))
* fiscal year using future date ([b9a1fac](b9a1fac))
* has_product_bundle util to only check for enabled bundles ([5c12872](5c12872))
* job card overlap validation (backport [#38345](#38345)) ([#38348](#38348)) ([d6fe7eb](d6fe7eb))
* make parameters of `create_subscription_process` optional (and other minor fixes) ([#38360](#38360)) ([721b429](721b429))
* Negative Qty and Rates in SO/PO (backport [#38252](#38252)) ([#38357](#38357)) ([14174df](14174df))
* no fstring in translation (backport [#38381](#38381)) ([#38387](#38387)) ([c101855](c101855))
* patch - Duplicate entry quality inspection parameter (backport [#38262](#38262)) ([#38264](#38264)) ([4c9890a](4c9890a))
* Payment Reco Issue and chart of account importer ([4699887](4699887))
* serial no status (backport [#38391](#38391)) ([#38397](#38397)) ([b65c225](b65c225))
* Server Error while creating Product Bundle (backport [#38377](#38377)) ([#38380](#38380)) ([922aef6](922aef6))
* skip disabled bundles for non-report utils ([3d46b32](3d46b32))
* skip fixed assets in parent ([314a91a](314a91a))
* Supplier `Primary Contact` (backport [#38268](#38268)) ([#38286](#38286)) ([37d1f1a](37d1f1a))
* **ux:** Sales Order Stock Reservation Dialog (backport [#38261](#38261)) ([#38344](#38344)) ([3cbe599](3cbe599))
* validation for existing bundles ([c0de9c0](c0de9c0))

### Features

* add Bank Transaction to connections in Journal and Payment Entry (backport [#38297](#38297)) ([#38301](#38301)) ([72647b8](72647b8))
* add disabled field in product bundle ([fcd53be](fcd53be))
* new Report "Lost Quotations" ([#38309](#38309)) ([ea2c348](ea2c348))

### Performance Improvements

* optimize total_purchase_cost update ([deed9f5](deed9f5))
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport version-14-hotfix backport to version 14 backport version-15-hotfix needs-tests This PR needs automated unit-tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant