> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alforse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scrap and unscrap

> Writing off defective or lost material, and restoring it if the write-off was a mistake.

Scrap records unrecoverable material, such as a damaged unit, failed component, or lost stock. Each transaction includes a **reason**, removes value from inventory or work-in-process, and posts a journal. **Unscrap** reverses an erroneous scrap.

Alforse supports three scrap contexts with different behavior. In each, the affected tracked entity receives status **"Scrapped"** and retains the lost quantity. Unlike **"Consumed"** or **"Rejected"**, this status is reversible.

## Scrapping a unit on the floor

When the unit you're building goes bad, an operator taps **"Log Scrap"** on the operation, enters a quantity, and picks a required **"Scrap Reason"**. For a Serial part the currently selected serial is the one scrapped.

Alforse records a **Scrap** production quantity, backflushes the unit's bill of material into WIP, marks the serial **"Scrapped"**, and creates a replacement serial for continued production.

NOTE

**Scrapping reopens the routing instead of counting against the target.**

A scrapped unit is not treated as output. Its quantity never counts toward the operation's target, completed operations reopen to **"Ready"**, and a replacement serial is spawned automatically, so the job keeps producing until the *good* quantity meets the target. The planned quantity itself is never rewritten; Alforse only tops up the operation's run quantity when cumulative scrap runs past the allowance you planned for.

## Scrapping a subcomponent

A component that was picked or already issued into the unit is scrapped from the **"Scrap"** tab of the issue-material dialog, which lists that material's **Available** and **Consumed** tracked entities. Each row's **"Scrap"** button opens a dialog for the reason and, for a make-to-order component, an optional **"Make a replacement"**.

What posts depends on the entity's *state*, not the item's method:

HEADS UP

**State decides the posting: Available scraps from stock, Consumed relieves WIP.**

An **Available** part is scrapped straight out of its bin as a negative adjustment, and the job's issued quantity is left untouched. A **Consumed** part is relieved from the job's WIP at its unit cost, and the material's issued quantity is decremented so the requirement reopens for a replacement. Either way the entity ends at **"Scrapped"**; make-to-order can additionally reopen the subassembly's routing and spawn a replacement with a rework row.

## Scrapping stock

Warehouse stock that never reached a job is scrapped from the storage-unit adjustment form: set the adjustment type to **"Scrap"** and pick a **"Scrap Reason"**. This books a negative movement at the item's cost. A serial flips to **"Scrapped"** and keeps its quantity; scrapping part of a batch splits the lot, and only the scrapped portion becomes **"Scrapped"**.

## Unscrap

Unscrap reverses a scrap. On the tracked-entities table, the **"Unscrap"** action appears on any row at status **"Scrapped"** (filter the status column to **"Scrapped"** to find them). It restores the entity to **"Available"** at the same bin, and asks only for an optional comment.

GOOD TO KNOW

**Unscrap reverses at the original scrapped cost, and reuses the original reason.**

Unscrap restores the entity at the exact cost it was scrapped from, read back from the original scrap's cost layers, so a scrap-then-unscrap nets to nothing in the ledger. You don't re-enter the reason either; Alforse inherits it from the scrap movement it's reversing, and links the restoring entry back to that movement. (Untracked stock is the one exception: it comes back at current cost and needs a location.)

## Accounting for scrap

Scrap posts to the ledger only when [accounting](/docs/reference/accounting.md) is enabled; the stock and cost layers move regardless. Every path debits a single **scrap account**, the **Scrap / Cost of Quality** account default. Where the credit lands depends on where the value was:

| Scrap path | Debit | Credit |
| - | - | - |
| Unit on the floor | Scrap | Work-in-process |
| Consumed subcomponent | Scrap | Work-in-process |
| Available subcomponent, or stock | Scrap | Inventory |
| Unscrap | Inventory | Scrap |

NOTE

**There's one scrap account, sliced by dimension tags.**

Alforse posts all scrap to one account and tags each journal line with **ScrapReason**, **WorkCenter**, and **Employee** dimensions. WorkCenter applies only when the scrap has an operation. These dimensions support reporting by reason, cell, or operator without separate accounts. ScrapReason values come directly from the scrap-reason list, so new reasons are immediately available for reporting.

This scrap is distinct from a quality **disposition** of *Scrap*: closing a quality [issue](/docs/reference/issues.md) with a Scrap disposition writes the material off to a cost-of-quality account and flips the entity to **"Rejected"**, not **"Scrapped"**.

## Related

**Traceability**

The tracked-entity statuses, including Scrapped, and the Unscrap action.

[Open](/docs/reference/traceability.md)

**Jobs**

Production quantities and how scrap is reported against an operation.

[Open](/docs/reference/jobs.md)

**Inventory**

The item ledger and manual adjustments scrap posts against.

[Open](/docs/reference/inventory.md)

**Accounting**

The journal, the scrap account, and posting dimensions.

[Open](/docs/reference/accounting.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.