Step-by-step instructions
Every write-off can be explained with a consistent reason, so warehouse reports, stock audits, manager approvals, and future AI agents can distinguish real loss from sales, transfers, and receiving.
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
List
How to fill: Start from the Write-off reasons list and check whether the reason already exists.
Why: Duplicate reasons split reports and make waste analysis less reliable.
Add
How to fill: Click Add only when the business needs a new reusable reason.
Why: Reasons should be controlled choices, not one-off comments.
Reason name
How to fill: Enter a short operational name in the current interface language, for example Spoiled product, Damaged package, Expired item, or Inventory correction.
Why: Staff must understand the reason quickly while creating a write-off.
Name translations
How to fill: Open the three-dot translation control and fill the enabled company languages.
Why: Multilingual teams must see the same reason clearly in their own interface language.
Save
How to fill: Save after the current language and translations are checked.
Why: Unsaved reasons cannot be selected on stock write-off records.
Verify row
How to fill: Return to the list and confirm that the saved reason is visible.
Why: The row proves the reason was written and loaded back from Supabase.
Usage in write-offs
How to fill: When creating a write-off, choose one of these reasons and use the comment field only for extra details.
Why: Reports should group by reason while comments explain the specific incident.
Common mistakes
- Creating several similar reasons such as Spoiled, Spoilage, and Bad product instead of one controlled label.
- Writing a long incident description as the reason name instead of using the write-off comment.
- Filling only one language when the company uses several interface languages.
- Editing Supabase rows directly without refreshing company.loadwriteoff or reloading the app cache.
- Using a write-off reason to explain transfers, sales, or receiving corrections that should use their own workflow.
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.
| Field | Stored as | Purpose | Why it matters |
|---|---|---|---|
| Reason ID | write_off_reasons.id / ReasonsStruct.ID | Unique identifier for the write-off reason. | Write-off records store a reason reference, so reports and agents need a stable ID instead of only a visible label. |
| Company | write_off_reasons.company | Company workspace that owns the reason. | Prevents reasons from one business from appearing in another business inventory flow. |
| Reason name translations | write_off_reasons.name / ReasonsStruct.Name[] | Multilingual reason name stored as Language/Text entries. | Staff, reports, imports, and AI explanations need the reason in the active interface language. |
| Created at | write_off_reasons.created_at | Timestamp when the reason was first created. | Useful for setup audit and for understanding whether a reason was added before or after stock events. |
| Updated at | write_off_reasons.updated_at | Timestamp when the reason name was last changed. | Agents and support can use freshness when explaining changed terminology. |
| App cache | FFAppState().WriteoffReason | Local list used by the SABSUS interface after loading reasons. | After backend changes, the app must reload reasons before staff can select them. |
| Reload marker | company.loadwriteoff | Company timestamp used to reload write-off data. | Native or backend edits need this marker so SABSUS refreshes write-off reasons and records. |
| Write-off document link | write_offs.reasons / WriteOffStruct.reasons | Reason object selected on a write-off record. | This is what explains why stock left inventory. |
| Write-off items | write_offs.items / WriteOffStruct.items | Products or ingredients being removed from stock. | Reason only explains the event; item lines explain what and how much was removed. |
| Write-off comment | write_offs.comment | Optional human note on a concrete write-off. | Use comments for details; keep the reason name short and reusable. |
| Search | writeoffReasons('search', input) | Search action checks ID and translated reason text. | Consistent naming makes reason search reliable for managers and support. |
Related guides
Use these guides to connect this section to adjacent SABSUS workflows.