SSABSUSAcademy
Warehouse

Write-offs in SABSUS

Write off damaged, expired, lost, or unusable stock with a real date, warehouse, write-off reason, comment, product line, Gross and Net quantities, Add, Save, and list verification.

Write-offs in SABSUS visual guide
DifficultyIntermediate
Time8 minutes
ModeInteractive walkthrough
Fields26 explained

Voice explanation

Audio source: write-offs-en.mp3

Listen to a short explanation of what this section is for, what to fill in, and why the data matters.

Step-by-step instructions

A manager can create a controlled inventory write-off that decreases the correct warehouse, explains the loss reason, stores the affected product lines, and remains reliable for stock history, reports, support, and future AI agents.

Use the interactive screenshot walkthrough first. Switch steps with the step dots, then read what to fill and why it matters.

Fields on this screen

Write-offs list

How to fill: Open Write-offs and check existing rows before adding another document.

Why: Duplicate write-offs can reduce stock twice and distort loss reports.

Add

How to fill: Click Add in the top-right corner to create a write-off draft.

Why: The draft opens the form and assigns a document ID.

Write-off date

How to fill: Confirm the date and time of the actual loss.

Why: Stock history and reports need the loss in the correct period.

From warehouse

How to fill: Open the warehouse list and choose the location where stock should decrease.

Why: This is the warehouse that loses inventory.

Reason

How to fill: Open Reason and select a controlled reason such as Spoiled product, Expired, Broken, or Inventory correction.

Why: Reason categories make losses explainable and reportable.

Comment

How to fill: Type a short note with the operational context.

Why: A useful comment tells managers what happened without opening every item line.

Select product

How to fill: Open Select product, search by name, and select the exact product or ingredient row.

Why: Only real product rows can update stock correctly.

Gross

How to fill: Enter the physical quantity removed from storage.

Why: Gross captures the amount inspected or removed.

Net

How to fill: Enter the quantity that should count as the stock decrease after loss or adjustment.

Why: For spoilage, Net can be lower than Gross when part of the quantity remains usable.

Add line

How to fill: Click Add after product and quantities are correct.

Why: The product is not part of the write-off until it is added as a line.

Save

How to fill: Save after date, warehouse, reason, comment, and lines are checked.

Why: Only saved write-offs become reliable stock history.

Verify row

How to fill: Return to the Write-offs list and verify date, type, warehouse, reason, contents, and comment.

Why: List verification proves the row was written and loaded back from the real database.

Common mistakes

  • Saving a write-off before adding item lines.
  • Choosing the wrong warehouse and reducing stock in the wrong location.
  • Using a generic or incorrect reason that hides why inventory was lost.
  • Typing a comment that does not explain the real operational context.
  • Selecting a similar product without searching and confirming the exact row.
  • Entering quantity in a different unit than the product unit.
  • Confusing Gross and Net when spoilage, trimming, shrinkage, or partial recovery exists.
  • Treating a write-off as a supplier supply, warehouse transfer, order sale, or finance payment.
  • Editing write_offs directly in Supabase without refreshing loadwriteoff, loadstorage, and loadproduct.
  • Using type '=' for write-offs; '=' is for transfer documents, while write-offs should use type '-'.
AI Agent Field Reference for implementation

This block is intentionally below the human instructions. It explains storage names and downstream dependencies for automation, support, and future AI agents.

FieldStored asPurposeWhy it matters
Write-off IDwrite_offs.id / WriteOffStruct.IDUnique write-off document identifier.Stock history, support, reports, audit, imports, and AI agents need a stable document ID.
Write-off typewrite_offs.type = "-"Document type marker for a stock decrease.Write-offs share the write_offs table with transfers, so the '-' type keeps loss documents distinct from transfer rows.
Companywrite_offs.companyCompany workspace that owns the write-off.Prevents stock loss documents from leaking between companies.
Write-off datewrite_offs.date / WriteOffStruct.DateDate and time when inventory was written off.Inventory history, loss reports, shift review, and audit explanations depend on the correct event date.
From warehousewrite_offs.storage / WriteOffStruct.StorageWarehouse or storage ID where stock decreases.The selected storage is the location whose stock is reduced.
Reasonwrite_offs.reasons / WriteOffStruct.ReasonsReason object selected from write_off_reasons.Explains why the product is removed from usable stock and supports loss analysis.
Commentwrite_offs.comment / WriteOffStruct.CommentShort operational note.Comments explain the real context, such as spoilage during prep, expiration, breakage, or inventory correction.
Itemswrite_offs.items[] / WriteOffStruct.Items[]List of products or ingredients being written off.A write-off only changes inventory correctly when each affected product is recorded as a line item.
Item IDwrite_offs.items[].IDUnique movement line ID.Line IDs let support, audit, imports, and AI explanations refer to a specific product movement.
Item datewrite_offs.items[].dateDate stored on the item movement line.Keeps line-level stock movement aligned with the document date.
Item movement typewrite_offs.items[].Type = -Stock movement direction for the item line.The '-' marker indicates that this item decreases stock.
Productwrite_offs.items[].ProductProduct, ingredient, packaging, semi-finished product, modifier, or technical card ID.This is the exact stock item whose quantity is reduced.
Specification / variantwrite_offs.items[].specificationsOptional product specification or variant IDs.Use only when the selected product has controlled variants; otherwise leave empty.
Gross quantitywrite_offs.items[].GrossPhysical quantity removed before loss adjustments.Gross records how much stock was checked or removed.
Net quantitywrite_offs.items[].NetQuantity counted as net loss after adjustment.For spoilage, shrinkage, or prep loss, Net can differ from Gross and should reflect the real usable-stock impact.
Unitproducts.unit_of_measurementMeasurement unit shown for the selected product, such as kg, pcs, l, oz, pack, or hours.Quantity without the unit is ambiguous for staff, reports, and AI agents.
Line storagewrite_offs.items[].StorageWarehouse ID copied onto the item line.Keeps each line tied to the storage location affected by the write-off.
Line reasonwrite_offs.items[].ReasionReason ID copied onto the item line.Preserves the reason when item lines are analyzed separately from the document header.
Line commentwrite_offs.items[].CommentLine-level note when present.Useful for product-specific loss details inside one document.
Pricewrite_offs.items[].PriceUnit cost value when present.Can support loss valuation, but the basic write-off workflow often stores zero.
Line amountwrite_offs.items[].amountCalculated line cost when present.Loss reports and future finance logic can use it for inventory value analysis.
Document amountwrite_offs.amountTotal write-off amount when calculated.Can support inventory loss valuation and accounting review.
Created atwrite_offs.created_atTimestamp when the row was written.Useful for setup troubleshooting, audit, and support.
Userwrite_offs.userUser who created or owns the write-off when present.Supports accountability and audit review.
App write-off cacheFFAppState().WriteoffClient-side list used by the Write-offs table.After direct backend edits, the app must reload write-offs before the list shows current records.
Reload markerscompany.loadwriteoff / loadstorage / loadproductCompany timestamps used to refresh write-offs, warehouses, and products.Native and backend changes need these markers so forms and lists see current records.

Use these guides to connect this section to adjacent SABSUS workflows.