You go to scrap a machine that finished depreciating months ago. Its schedule is fully booked, its carrying value is down to salvage, and the disposal belongs to a period your accounts team has already closed. ERPNext refuses — it tries to post one more depreciation entry, that entry lands in the closed period, the period lock rejects it, and the whole scrap rolls back. The asset owes no depreciation, yet the disposal is stuck behind a depreciation posting. This guide explains the mechanism, names the release that fixes it, and shows how to record the disposal safely if you can't upgrade first.
Is the schedule itself wrong, before you even scrap?
If the depreciation schedule miscalculated earlier — for instance after a cancel-and-rebuild — that error carries straight into the scrap. Check it against remaining life first: ERPNext depreciation schedule wrong after cancelling covers the verification.
A disposal that can't be recorded because of a depreciation entry that shouldn't exist is the kind of fault that makes people force it at the database and regret it at audit. I am Manoj, ERPNext and Frappe implementation lead at Mith Tech in Bengaluru, and this one turns up whenever a business finally clears out assets that fully depreciated a year or two ago.
What actually breaks
Scrapping an asset in ERPNext is a disposal event: it removes the asset from service, posts the loss or gain on disposal, and marks the asset "Scrapped". The flow expects the asset to be depreciated up to its disposal date first, because you cannot dispose of something whose books are not current.
The defect in #45777 is that the scrap attempts a depreciation posting even when the schedule is already complete — when there is, by definition, nothing left to depreciate. On its own that would merely produce a spurious entry. The failure becomes visible when the disposal date falls in a closed period: the depreciation journal entry the scrap tries to post is rejected by the period lock, and because the scrap depends on that posting, the entire operation rolls back. You are left unable to record a disposal that is accounting-complete, blocked by an entry the asset does not owe.
PR #45895 fixes it by skipping the depreciation posting when the schedule is already fully booked, so the scrap of a fully-depreciated asset stops trying to depreciate it.
Toggle your asset's schedule state, period status and version to see whether scrapping it will error, post a spurious entry, or complete cleanly.
This is the exact #45777 trap: the asset's depreciation schedule is complete, but scrapping still attempts a depreciation journal entry, and that entry lands in a closed accounting period — so the posting is rejected and the scrap cannot complete. Upgrade, or open the period briefly under control (see the recipe).
Models the behaviour in frappe/erpnext #45777 (closed, PR #45895; affects v15.51.0 / Frappe v15.55.1). Confirm your own release before acting.
Confirm the schedule really is complete before blaming the bug
If the depreciation schedule is not fully booked, the scrap is right to want to depreciate — there is genuine depreciation owed up to the disposal date. Book it first. This bug is specifically about a complete schedule producing an extra entry; a partial schedule producing an entry is correct behaviour, not a fault.
Five symptoms, and which is yours
Asset disposal and depreciation faults present in similar ways — "it won't let me scrap", "an entry appeared I didn't expect", "I'm getting error emails". They have different causes.
Select the symptom you are seeing to identify the underlying cause, the tracking issue, and the right response.
Pick the asset-scrap symptom you are seeing.
The one that traps people is the inability to cancel the spurious entry once it has posted (#35934): the asset says a journal entry references it, the journal entry says an asset references it, and neither releases the other. That is a reason to resolve the reference order carefully, never to delete at the database — a forced removal is how a one-entry problem becomes a permanent register-to-ledger mismatch, the same failure mode covered in our depreciation-schedule guide.
Fix it
Copy-paste diagnosis, the bench upgrade sequence, the controlled disposal-without-upgrade steps, and the habits that keep disposals off closed periods.
Confirm the scrap is failing for the closed-period reason and not one of the adjacent asset faults.
1. Open the Asset. Confirm:
• Depreciation schedule is fully booked
(no remaining rows with a future date)
• The disposal / scrap date falls in a period
your accounts team has closed
2. Read the error trace on the failed scrap. The
signature is a Journal Entry posting rejected
because its date is in a closed period.
3. Version check: Help > About. Below the release
carrying PR #45895 (v15.51.0 was the reported
affected version)? Then you are exposed.
4. If the schedule is NOT complete, this is not the
bug — book depreciation to the scrap date first.Confirm the signature
The asset's schedule is fully booked, the disposal date is in a closed period, and the failed scrap's error trace shows a journal entry rejected for posting into that period. All three together are the #45777 signature. If the schedule is not complete, depreciate to the disposal date first — that is normal, not the bug.
Upgrade on staging first
Back up the site with files, update the erpnext app on the version-15 branch, and run bench update --patch. Re-run the scrap of a fully-depreciated asset dated in a closed period on a staging copy before touching production. PR #45895 makes the scrap skip the depreciation posting when nothing is owed.
If you must scrap before upgrading, open the period under control
The asset owes no depreciation, so you are only working around a spurious posting. Ask accounts to reopen the specific closed period with a logged reason and a fixed reclose date. Scrap the asset. If a depreciation entry is posted, cancel it immediately and confirm accumulated depreciation is unchanged.
Reconcile, then re-close
Reconcile accumulated depreciation to the fixed asset register, confirm the disposal posted the intended gain or loss, and re-close the period. Reopening a closed period is an accounting decision — accounts approves it, not IT, and the same period-close discipline that catches this applies to bank reconciliation.
What the standard says about disposal
This is not only a code question — the accounting standards are explicit that a scrap should not be posting more depreciation.
Depreciation and disposal under the standards
IAS 16 (IFRS Foundation) requires depreciation to cease at the earlier of the date the asset is classified as held for sale and the date it is derecognised. An asset being scrapped is being derecognised; depreciating it further at the point of disposal contradicts the standard. Ind AS 16 (MCA) carries the identical requirement for Indian reporters, and US GAAP ASC 360 (FASB) similarly stops depreciation on derecognition.
The convergence matters for the workaround: because no framework expects depreciation at disposal on a fully-depreciated asset, cancelling a spurious entry the scrap posts is not a judgement call — it is restoring the treatment every standard requires. Confirm the disposal gain or loss with your auditor, but the removal of the extra depreciation is not in doubt.
When the disposal owner isn't the ledger owner
The person scrapping the asset is usually in operations or facilities — the machine is gone, they want it off the books. The person who closed the period is in accounts. Neither expects an asset disposal to collide with a period lock, so when it does, the operations user often escalates it as "the system is broken" and the accounts user, reasonably, does not want to reopen a closed period for what looks like a routine scrap.
The resolution is a small standing agreement rather than a permission change. Disposals dated into a closed period route to accounts, who decide whether to reopen briefly or hold the scrap for the next open period. Most disposals do not need to be recorded in a prior period at all — the asset can be scrapped effective the current date, which sidesteps the lock entirely. Reserve reopening for the cases where the disposal genuinely belongs to the closed period for reporting reasons.
Draft policy for your accounts and operations leads to ratify. Fully-depreciated assets are scrapped effective the current open period wherever the disposal date is not materially required to fall earlier. A scrap that must post into a closed period is authorised by the accounts owner, who reopens the specific period with a logged reason and re-closes it the same day; any depreciation entry the scrap posts against a completed schedule is cancelled and accumulated depreciation is reconciled to the fixed asset register before re-closing. Assets are never scrapped by deleting journal entries at the database. Ratify the reopening authority and the materiality test with your auditor before this enters an SOP.
Upgrade now, or work around once
FAQ
+Why can't I scrap a fully-depreciated asset in ERPNext?
+Which ERPNext version fixes the asset scrap depreciation bug?
The reported affected version was v15.51.0 with Frappe v15.55.1, and the fix is PR #45895. Confirm the exact point release your instance is on against your changelog, and re-test on staging rather than assuming a given number carries it.
+How do I scrap the asset if I can't upgrade right now?
Because the asset owes no depreciation, you are only avoiding a spurious posting. Have accounts reopen the specific closed period under a logged reason, scrap the asset, cancel any depreciation entry it posts, reconcile accumulated depreciation to the register, and re-close. Better still, scrap it effective the current open period if the earlier date is not required.
+Can I just delete the extra depreciation entry?
Cancel it, don't delete it — and never at the database. Circular referencing between the asset and its journal entries (#35934) means a forced deletion leaves the fixed asset register and the general ledger permanently out of step, which is far harder to unwind than the original block.
+What happens to my accounts if the spurious entry stays?
Accumulated depreciation overshoots the asset's depreciable cost, so the asset's net book value and your depreciation expense are both misstated, and accumulated depreciation stops reconciling to the fixed asset register. Under IAS 16 and Ind AS 16 it is also wrong on principle, because disposal should stop depreciation rather than add to it.
+Does this affect ERPNext v14?
The fix landed on the v15 line. If you reproduce the symptom on v14, treat it as another reason to plan the v15 upgrade rather than cherry-picking into a branch you will not maintain — and in the meantime, scrap into an open period to avoid the closed-period rejection entirely.
Related issues you may also hit
- The depreciation schedule miscalculating after a cancel-and-rebuild (our guide, tracking #50701).
- Daily "error while posting depreciation entries" emails from a scheduled job (#34045, #38202).
- ERPNext stock ledger vs general ledger — the same register-to-ledger reconciliation discipline on the stock side.
- Standard costing in ERPNext — where depreciation feeds overhead absorption.
Closing
The bug is small and already fixed; the damage comes from how people route around it. Scrap fully-depreciated assets into the current open period, keep disposals that must fall earlier under the accounts owner's control, and reconcile accumulated depreciation every close. Do that and an old machine leaves your books in a couple of clicks instead of a database edit you explain to the auditor.
Clearing out old assets and the disposals keep erroring?
We check your instance against the open and fixed asset-module issues on your version, sequence the upgrade safely, and set the disposal controls that keep scraps off closed periods.