# Production and cost of goods

> Production orders (Operations → Production), completion with FEFO raw-material issue (RW) and finished-goods receipt (PW), corrections, rework…

> Machine translation, editorial review pending.

Source: https://docs.smaklad.pl/en/guide/production/

> This section describes production orders (`Operations → Production`), their completion with FEFO issue of raw materials (RW, internal issue) and receipt of finished goods (PW, internal receipt), corrections, lot rework, the HACCP batch record, the cost variance report and food cost (`Finance → Food cost`).

## 7.1. Who can do what

| Action | admin | manager | kitchen | accountant |
|---|:-:|:-:|:-:|:-:|
| View the list, the order card and the HACCP batch record | yes | yes | yes | yes (read-only)* |
| Create an order | yes | yes | yes | — |
| Start, complete | yes | yes | yes | — |
| Cancel, void, retry posting, rework | yes | yes | — | — |
| Amounts in złoty (cost, lot prices) | yes | yes | **no** | yes |
| Variance report | yes | yes | — | yes |
| Food cost | yes | yes | — | yes |

\* The accountant opens production from the **`Finance → Production costs`** menu (address `/operations/production`): the order list, the order card, the HACCP batch record and the variance report. They do not see the "New order", "Start", "Complete", "Cancel" buttons or the signatures and decisions in the batch record, and the server rejects such requests from the accountant. Retained samples and sushi logs are not available to the accountant. The `Finance → Food cost → "Production variance"` report (see 7.12) stays where it is.

The kitchen works with quantities: yield, waste, raw material usage. Prices and lot values are not shown to the kitchen, and the server does not send them either.

## 7.2. List of production orders

`Operations → Production`. New orders are at the top. The list is split into pages of 50 rows; the page switcher is below the table.

![List of production orders](https://docs.smaklad.pl/img/production-01-list.png)

**Filters** (block above the table):

- **Status**: "Planned", "In progress", "Completed", "Cancelled".
- **Recipe**: visible to all roles of the section (for the kitchen the recipe list comes without prices).
- **Planned from / Planned to**: plan dates on the Warsaw calendar.

The "Apply" button refreshes the list; "Reset filters" returns the full list. Filters are kept in the page address, so a filtered list can be sent to a colleague as a link.

![List filtered by "Completed"](https://docs.smaklad.pl/img/production-02-list-filtered.png)

Columns:

- lot
- recipe
- planned date
- planned and actual quantity (with unit of measure; kg to three decimal places)
- order status
- stock status
- for roles with access to money, also the planned cost and the cost of raw materials issued

A rework order carries a "rework" tag.

Under the cost of raw materials issued, small print states what it is based on, if this is not a regular posted order:

| Note | What it means |
|---|---|
| not recorded (old order) | the order was completed before stock posting existed; there is no actual cost, only the planned quantities are known |
| posting pending | the warehouse has not yet posted the RW / PW |
| posting failed | there is no cost until a manager retries the posting (7.7) |
| voided | the RW / PW were reversed |
| rework — no variance | rework order: there is an actual cost but no standard cost |
| no standard cost | the order was created before cost control: there is an actual cost but no variance |

An empty cost ("—") with such a note does not mean zero.

## 7.3. Creating an order

The **"New order"** button (admin, manager and kitchen).

![New order form](https://docs.smaklad.pl/img/production-03-new-form.png)

1. **Recipe.** The list contains approved recipes only: name, output product and version. If the recipe has no output product, the form warns you: such an order can be planned but not completed until the recipe is linked to a catalog product.
2. **Planned quantity.** A decimal comma can be used (`12,5`). A hint under the field shows how much one recipe batch yields.
3. **Planned date.** Today (Warsaw) by default.
4. **Warehouse.** Raw materials are issued from this warehouse, and finished goods are received into it. The form fills in the **default warehouse** itself (marked "default" in the list; assigned in `System → Locations`, see chapter 6.2), otherwise the last one selected on this computer, otherwise the only active one. An empty value means the server's default warehouse: it is determined when raw-material availability is checked at completion and is **fixed to the order** — the posting and any retry go to exactly the warehouse whose stock was checked, even if the main warehouse is changed later.
5. **Notes.**
6. **Packing (this order only)** — this block appears if a packing recipe is selected. Fields: name on the label, net content per pack and its unit, packaging and its unit, date on the label ("Best before" / "Use by"), the ℮ mark, storage conditions. Values from the recipe are shown in grey in the fields; an empty field means "as in the recipe". Fill in only what differs for this batch (for example, a different pack weight for a particular customer). Only filled-in fields are sent.

Below the form is an estimate of the planned standard cost: total and per unit (the estimate is not shown to the cook — recipe prices are not sent to them). The "Create" button is disabled while the request is being sent, so a duplicate order is not created.

The accountant cannot reach this page; on direct navigation they see a note that orders are created by the administrator, the manager or the kitchen.

## 7.4. Order card

![Card of a planned order](https://docs.smaklad.pl/img/production-04-detail-planned.png)

The card contains, from top to bottom:

- **Header**: lot number, order status and stock status, link to the HACCP batch record.
- **"Stock booking (RW / PW)" block**: numbers of the RW (raw material issue) and PW (finished goods receipt) documents with links, the time of the last request and the error reasons.
- **Metrics**: planned, actual, yield %. For roles with access to money (admin, manager, accountant), also the standard and actual cost and the variance. Visibility of money depends on the role, not on the order: a rework order and orders created before cost control was enabled have no standard cost (the tile shows "—", with the note "No standard cost snapshot was captured for this order." below), but the actual raw material cost, the price of the output lot and the value of the issued lots are shown.
- **Details**: recipe, warehouse, planned date, creation date, production line (if specified), notes. The warehouse name is visible to all roles of the section; if the warehouse list did not load, the warehouse code from the RW/PW document number is shown instead of the name (the last part of the number `TYPE/YYYY/MM/NNNN/CODE`).
- Below the metrics (admin, manager, accountant) — an explanation of what the actual cost is based on if the order is old, a rework, has no standard or the posting is not complete (the table of notes is in 7.2).
- **Output lot (PW)**: see section 7.10.
- **Ingredients and lots issued**: see section 7.10.
- **Plan vs actual**: the order's variance report (quantities only for the kitchen).
- **Pack label**: if the recipe defines one.

While the order can still be changed (planned, in progress, or completed with a posting error), the card locks it for other users (the accountant does not take the lock — they only read). If a colleague already has the order open, a yellow bar with their name appears at the top and the action buttons become disabled.

![Card of an order opened by another user](https://docs.smaklad.pl/img/production-05-detail-locked.png)

## 7.5. Starting and completing production

**Start production** (status "Planned") puts the order into progress. Stock does not change.

**Complete production** (status "In progress") opens the completion dialog:

![Production completion dialog](https://docs.smaklad.pl/img/production-06-complete-dialog.png)

- **Actually produced**: the planned quantity by default.
- **Waste**: quantity in the product's unit.
- **Reason for waste**: required if waste is greater than zero (at least 3 characters).
- **Report the actual quantities used**: optional. If ticked, a table of raw materials with planned quantities appears. The quantities entered affect the usage variance, but the warehouse still picks the lots by FEFO.
- **Notes**.
- **Production line** (expandable block, optional): the line identifier (UUID). In a lot recall it is used to find all lots made on the same line (cross-contamination risk). The terminal remembers the last line entered and fills it in next time. An invalid format is highlighted; an empty field is allowed. There is no line register yet, so get the identifier from the food technologist or the administrator.

Field errors are shown next to the field after the first attempt to save. The "Complete and post" button is disabled while the request is being sent, so pressing it again will not create a second issue.

After completion the warehouse posts the RW and PW. This usually takes a few seconds. The stock status will first be "Booking pending", then "Booked (RW/PW)".

## 7.6. Raw material shortage at completion

If any raw material is short, **nothing is issued** and the order stays "In progress". A shortage table appears in the dialog:

![Raw material shortage table](https://docs.smaklad.pl/img/production-07-shortage.png)

| Column | Meaning |
|---|---|
| Item | the raw material (or "Output lot (finished goods)" if the output could not be received) |
| Required / Available / Short | quantities with unit |
| Reason | insufficient stock, no stock in the warehouse, no unit conversion, lot not found, lot cannot be issued (expired/blocked), ingredient not linked to a catalog product, etc. |

What to do: receive the missing items (goods receipt, MM transfer), correct the recipe or the unit conversion, and repeat the completion.

**Ingredient substitutes.** The system does not substitute anything on its own. Substitutes for missing raw materials are configured in `Operations → Kitchen → Modifiers & substitutes`, "Ingredient substitutes" section. If they cover the shortage, an "Ingredient substitutes" block with a list of suggestions appears in the completion dialog instead of the shortage table. For each suggestion you can see:

- what is replaced, with what and in what quantity;
- whether the substitute covers the whole line or only the missing part;
- which allergens and "may contain" items the substitute adds to those declared in the recipe.

To complete the order with substitutes:

1. Tick the substitutes you approve.
2. If an approved substitute adds allergens, tick the confirmation of the allergen change. Without it the order will not be completed.
3. Click "Complete" again.

The main ingredient is issued up to the available stock; the missing part is covered by the substitute according to the factor (for example, 0.6 kg of butter with a factor of 1 → 0.6 kg of margarine).

If the allergens have changed:

- the new allergens and "may contain" items are saved on the order and passed on to the output lot;
- the order is flagged: the label and the lot specification must be reissued;
- the order records who approved the substitution.

A substitute whose allergens the catalog cannot confirm cannot be selected. On the order card, the substitute line is marked "substitute (stock short)". Its planned quantity is 0, so the deviation from plan is visible in the cost report. Substitution does not apply to a lot being reworked, to ingredients not linked to the catalog, or to unit conversion errors. Details are in [chapter 15, section 15.9](https://docs.smaklad.pl/en/guide/kitchen-operations/#159-modifiers-and-ingredient-substitutions).

If the warehouse service does not respond, the message "The warehouse service is not responding…" appears. In this case too nothing has been changed; simply try again later.

## 7.7. Stock posting status and retry

| Stock status | What it means | What to do |
|---|---|---|
| — (empty) | the order is not yet completed, or it is an old order from before posting was tracked | — |
| Booking pending | the warehouse is posting the RW/PW | wait; after 10 minutes the manager can use the **"Resync booking"** button |
| Booked (RW/PW) | raw materials issued, finished goods received | corrections only by KOR reversal (section 7.8) |
| Posting error | nothing has been issued or received | fix the cause, then **"Retry booking"** or **"Void order"** |
| Voided | the failed posting was cancelled, the order was cancelled | — |

The retry dialog explains what will be checked and asks for confirmation ("Book now"). If the shortage remains, it is shown again in the table and nothing changes.

## 7.8. Cancellation, voiding and correction

- **Cancel order** ("Planned" or "In progress"): stock has not been touched yet, there are no documents. Enter a reason (at least 3 characters) and confirm.
- **Void order** (completed, posting failed): the warehouse first confirms that there are no movements for the order, then the order is cancelled.
- **Correct (storno)** (completed and posted): posted RW and PW cannot be changed. The correction dialog links to both documents. In the document, click "Storno" (KOR), and the stock and the postings are reversed. The production order itself stays completed for traceability. Create a new order if necessary.

![Correction dialog of a completed order](https://docs.smaklad.pl/img/production-09-correction.png)

If you try to cancel an order that has already been posted (for example, from an outdated tab), the system replies "A completed order cannot be cancelled…" and shows links to the RW and PW.

## 7.9. Lot rework

For a completed and posted order the manager can click **"Rework lot"**. For example, if QA rejected the lot and it needs to be reheated, repacked or used in a new batch.

![Lot rework dialog](https://docs.smaklad.pl/img/production-10-rework.png)

- **Lot quantity to rework**: how much to take from the output lot. At completion exactly this lot is issued, without FEFO.
- **Planned yield**, **planned date** (today by default), **reason** (QA remark), notes.
- **Also consume the recipe ingredients**: untick this if the lot is only being reheated or repacked.

After creation a new planned order opens. Its card has an "Open the source order" link.

## 7.10. Issued lots, output lot and cost of goods

![Ingredients and lots issued](https://docs.smaklad.pl/img/production-11-consumed-lots.png)

In the **"Ingredients and lots issued"** table, each raw material line lists the lots the warehouse actually issued by FEFO:

- lot number — a link to the **lot card** (`/operations/inventory/lots/{id}`, see chapter 6.2)
- expiry date
- quantity (kg to 3 decimal places)
- price and value (not shown to the kitchen)

The table total is "Cost of ingredients issued".

The **"Output lot (PW)"** block shows:

- the number and ID of the output lot (the ID links to the lot card; a rework order also has a link to the lot being reworked in the blue banner at the top)
- the quantity received and the time of receipt
- the lot price: raw materials / yield + labour + overheads

The metrics at the top compare the **standard** cost (from the approved recipe at the time of planning) with the **actual** cost. The variance is broken down by cause in the "Plan vs actual" table:

- **usage**: more or less was used than the standard
- **price**: lots were more or less expensive than the standard
- **yield**
- **waste**

Rows that exceeded the thresholds are flagged.

![Order variances: manager view](https://docs.smaklad.pl/img/production-12-variance-manager.png)

The kitchen sees the same table without money: planned, actual, difference, yield and waste.

![Order variances: kitchen view](https://docs.smaklad.pl/img/production-13-variance-kitchen.png)

## 7.11. HACCP batch record

The "Batch record" link in the card header leads to the `…/batch-record` page.

![HACCP batch record](https://docs.smaklad.pl/img/production-14-batch-record.png)

On this page:

1. **Sign-offs**: the operator and the supervisor sign the record.
2. **CCP readings**: type (cooking, cooling, hot holding, reheating), temperature, time. Values outside the limits create a deviation.
3. **Deviations**: description and corrective action. A deviation is closed once the action has been entered (at least 5 characters).
4. **Decision**: "Release batch" (possible only if there are no blocking remarks) or "Block batch" (a reason is required). The decision is final: the record is frozen (signed hash), so the system asks for confirmation in a separate dialog.

![Confirmation of the batch decision](https://docs.smaklad.pl/img/production-15-batch-decision.png)

## 7.12. Production variance report

The **"Variance report"** button in the order list (admin, manager) leads to `Operations → Production → Variance report`. The accountant opens the same report from `Finance → Food cost` with the **"Production variance"** button (address `/finance/food-cost/production-variance`). The lot number in the order table leads to the order card (read-only for the accountant), and the recipe list in the filter is built from the recipes included in the report for the period.

![Production variance report](https://docs.smaklad.pl/img/production-16-variance-report.png)

- The default period is from the start of the current month to today (Warsaw). You can choose a recipe.
- Summary tiles: number of orders, flagged orders, standard and actual cost, variance.
- Tables by recipe, by month and by order (an order row leads to its card).

## 7.13. Food cost

`Finance → Food cost` (admin, manager, accountant).

![Food cost](https://docs.smaklad.pl/img/production-17-food-cost.png)

- Filters: period (current month by default, Warsaw) and **warehouse** (a list of warehouses or "All warehouses"). Admin and manager see all active warehouses. The accountant is shown the warehouses that have posted warehouse documents in the selected period (a hint under the filter says so) — after changing the period, click "Apply" to refresh the list. If the warehouse list is not available to the role, an explanation appears under the filter and the report covers all warehouses.
- The **"Production variance"** button in the header leads to the variance report (7.12).
- Metrics: net (and gross) revenue, cost of goods, food cost %, variance from target.
- Tables: top dishes, all products with actual cost and cost source (recipe, stock lot, no recipe), ingredient usage.
- Warnings at the top report data that cannot be valued, for example sales without a recipe.

## 7.14. Error messages

| Message | Cause | What to do |
|---|---|---|
| The order is no longer in that status… | another user changed the order | the page has been refreshed; check the status |
| The order is already cancelled | repeated cancellation | — |
| A completed order cannot be cancelled… | stock has been posted | KOR reversal of the RW/PW documents (7.8) |
| The stock posting did not fail… | no retry needed | — |
| The stock posting is still in progress… | 10 minutes have not passed | wait for the stated time |
| The order cannot be voided: there are already stock movements | partial posting | KOR reversal |
| Only a completed order can be reworked… | the order has no posted lot | — |
| Insufficient stock… | raw material shortage | shortage table (7.6) |
| The warehouse service is not responding… | temporary unavailability | try again later |
| This order is being edited by another user | lock | wait for your colleague |
| Your role does not allow this action | permissions | contact the manager |

### Examples from "Pierogarnia Przykładowa"

- **Production warehouse.** Raw materials must be in the order's warehouse. If the flour is in the main warehouse and the quark in the cold room, first move them with an MM document to the "Kuchnia" warehouse. After completion, frozen pierogi are moved with an MM document to the freezer.
- **Planned usage** = recipe standard × quantity / ingredient yield percentage: for 8 kg of filling with a potato standard of 0.65 kg per 1 kg and a yield of 85 %, the warehouse issues 0.65 × 8 / 0.85 ≈ 6.118 kg (quantities are stored to 4 decimal places).
- **More than planned.** 16 kg of dough planned, 16.5 kg produced: raw materials issued for 71.65 zł, lot price 71.65 / 16.5 ≈ 4.342 zł/kg (standard 4.48 zł/kg).
- **Waste.** 8 kg of filling planned, 7.6 kg usable and 0.4 kg waste: the cost of the waste is included in the price of the usable product — 8.61 zł/kg instead of 8.18 zł/kg.
- **Two tabs.** If the order has already been completed in another tab, "Complete and post" shows "The order is no longer in that status…" and there is no second issue.
- **Quantity entry.** 0, a negative number and text are highlighted; weight is accepted with at most three decimal places. Double-clicking "Create order" creates a single order.
- **A note at completion** replaces the notes entered at planning (known bug).
- **Wrong quantity (storno).** The cook entered 10 kg of dough instead of 1 kg. The order cannot be cancelled or completed again. In the "Correct (storno)" dialog the manager opens first the PW, then the RW, and in each clicks "Cancel (storno)" → reason → "Issue storno". KOR documents appear, the dough lot is zeroed, the raw materials return to the same lots, and the 501/330 and 330/580 postings are reversed (in the journal, look them up by the number of the original RW / PW).
- **Cancellation.** The cook cannot cancel an order; a repeated cancellation is rejected.
- **Batch record.** The cook (or the manager) signs as operator, and a different person (manager or administrator) signs as supervisor. The cook records the CCP reading themselves (cooking at 82 °C with a limit of ≥ 63 °C). Only a manager or administrator can release or block a batch; blocking requires a justification (at least 5 characters) and puts the output lot into quarantine — it is no longer issued by FEFO, but it can be reworked.
- **Rework.** 1 kg of blocked filling at 8.1837 zł/kg gave 1 kg of reworked filling for 8.18 zł (without ingredients the price equals the price of the source lot).
- **Edit lock.** While the order is open for another user, the buttons are disabled and a yellow bar "Read-only: document is locked" is shown at the top. A closed tab holds the lock for up to 5 minutes.
- **Expired raw materials.** Expired lots are not issued by FEFO; receipt of goods that are already expired is rejected.

## 7.15. Retained food samples

**Operations → Retained samples** (`/en/admin/operations/production/samples`). This log is needed if the business feeds a closed group (canteen, kindergarten, camp) or caters for a mass event. The Food Safety Act (art. 72) and the Minister of Health regulation of 17.04.2007 require such a business to:
- keep a sample of **every dish of every meal** weighing at least **150 g**;
- store the sample at **≤ +4 °C**;
- keep it for **72 hours** from the moment the whole batch was consumed.

**Who:** admin, manager and kitchen register samples, record consumption and discard samples. The section is not available to the accountant.

### Registering a sample

In the **"Register a sample"** block fill in:

| Field | Required | Note |
|---|:-:|---|
| Dish | yes | for example "Żurek" |
| Meal | yes | "Lunch", "Dinner"… |
| Event | — | name of the banquet or event |
| Batch | — | the dish's batch number |
| Taken at | yes | date and time of sampling; now by default. A future time is not accepted |
| Served until (planned) | — | when serving of this batch is planned to end |
| Weight g | yes | 150 by default; the system does not accept less than 150 g |
| Storage °C | — | storage temperature; the system does not accept more than +4 °C |
| Storage (fridge) | yes | where the container is kept |
| Received from (other kitchen) | — | if the dish was brought from another kitchen |

Click **"Register"**. The message "Sample PRB-YYYYMMDD-NNN registered" appears. The system assigns the number itself, sequentially within the sampling day.

**What the system does by itself:**
- generates the **container label text**: dish | meal | date and hour of sampling | who took it (as required by § 3 of the regulation);
- calculates the **"Keep until"** field: 72 h from the end of consumption. Until the end of consumption is entered, the period is counted from "Served until (planned)" or, if there is none, from the sampling time. Next to it is the note "provisional — record consumption";
- records the sample in the HACCP regulatory journal. On the card, the "Regulatory journal" line shows "Journal entry · <requirement code>", "Draft waiting for completion" or "Requirement not applicable to the business profile";
- every 15 minutes looks for samples that have not been discarded a day after the end of the retention period and marks them **"Overdue for disposal"**.

### List and filters

The **"Samples"** table: number (link to the card), dish and meal, sampling time, storage location, "Keep until", state. Switches above the table:
- **Stored** (default);
- **Can be discarded**;
- **Overdue**;
- **Discarded**;
- **Handed to authority**.

The state of a stored sample is shown by a badge: "Stored", "Can be discarded" or "Overdue for disposal".

### Sample card

The sample number opens the card (`…/samples/{id}`) with all details, the label, the retention period and who took the sample. A stored sample has an **"Actions"** block:

1. **"Save consumption time"**: in the "Whole batch consumed at" field, enter when serving of the batch ended. "Keep until" is recalculated from that moment and stops being provisional. The consumption time is entered once.
2. **"Discard"**: the button is available only when consumption has been recorded and 72 hours have passed.
3. **"Hand over to PIS"**: the sample is taken by the sanitary inspectorate. This is allowed at any time, but a note of at least 5 characters is required: who took it and the protocol number.
4. **"Use for investigation"**: the sample is used for the business's own investigation. A note is also required.

While one user has the card open, it is read-only for others (edit lock, see chapter 12).

**What cannot be changed.** A discarded, handed-over or used sample cannot be changed: the database rejects such an edit (409). A sample cannot be deleted either. A sample registered by mistake stays in the log. Register the correct one, and discard the wrong one in the usual way with a note.

The consumption time is entered once: after saving, the "Whole batch consumed at" field and the "Save consumption time" button become disabled, and below them you see "The consumption time is already recorded and cannot be changed." Samples handed over for investigation are shown by a separate filter **"Used for investigation"**. Server errors are shown in the interface language (for example, "The 72 h retention period is not over yet.").

> **Known limitations.** The manager receives an e-mail about overdue disposal of a sample at the manager e-mail address in the server settings; there is no notification in the bell.

## 7.16. Sushi and raw fish logs

**Operations → Sushi / raw fish** (`/en/admin/operations/production/sushi`). The page has two logs:
- **anti-parasite freezing of fish** (fish served raw);
- **acidification of sushi rice** (pH measurement).

**Who:** admin, manager and kitchen keep both logs. Only admin or manager can cancel a freezing record. The section is not available to the accountant.

### Anti-parasite freezing

The rule (Regulation 853/2004, Annex III, Section VIII, Chapter III, Part D) is shown under the block heading. Fish served raw must undergo one of the following treatments:
- **−20 °C for at least 24 h** throughout the product;
- **−35 °C for at least 15 h** throughout the product;
- if the core temperature was not measured, **48 h in a freezer at ≤ −20 °C**.

**Recording:** in the **"Parasite freezing"** block fill in:
- **Lot id** — find the lot by number (of the form `SKU-YYYYMMDD-NNNNNN`) or by product name and select it in the list (required); the search covers all warehouses;
- **Batch no.** and **Product** are filled in from the selected lot and can be corrected;
- **Product** and **Species** (for example "Łosoś", *Salmo salar*);
- **Origin**: "wild" or "farmed";
- **Treatment** — one of five:

| Treatment | What else is needed | Result |
|---|---|---|
| Own freezing | "Freezer °C" and "Loaded at" | the record stays in the "Freezing" status until the fish is removed |
| Frozen by the supplier (document) | "Supplier document" | the decision is made immediately |
| Exemption: farmed fish (point 3(d)) | origin "farmed" and a supplier document | decision immediately |
| Exemption: wild, authorisation (point 3(c)) | origin "wild" and the authority's authorisation number in the "Supplier document" field | decision immediately |
| Heat treatment ≥ 60 °C for 1 min | — | "Cooked use only — not for raw" |

Click **"Record"**. Only one freezing run can be open per lot.

**Removal from the freezer.** The table shows when the fish can be removed (the "Earliest removal" column): 15 h or 24 h after the core reached the target temperature, or 48 h after loading. The product name opens the freezing card (`…/sushi/freezing/{id}`). In the **"Remove from freezer"** block enter:
- **"Core reached target at"** (time) and **"Core °C at target"** — if the temperature was measured with a probe;
- **"Freezer °C"**;
- **"Removed at"** (now by default).

Then click **"Evaluate and close"**.

**What the system does by itself:**
- evaluates the freezing regime. With a core measurement: −20 °C / 24 h or −35 °C / 15 h is checked. Without a measurement: 48 h with the freezer at ≤ −20 °C is checked (the card shows the note "core time not measured — 48 h rule");
- sets the status. "Cleared for raw use" — the fish may be served raw. "Not compliant" — the "Findings" line shows what was missing, for example "Neither −20 °C/24 h nor −35 °C/15 h reached…". After heat treatment the badge reads "Cooked use only — not for raw";
- writes an entry to the HACCP regulatory journal.

**Cancellation.** While freezing is in progress, admin or manager can cancel the record: a reason of at least 5 characters is required, then the **"Cancel run"** button. The reason field and the "Cancel run" button are not shown to the kitchen.

**Non-compliance blocks the lot.** When a freezing run is closed with the "Not compliant" status, the warehouse automatically puts the lot into **quarantine** (`ccp_deviation`): it cannot be issued, transferred or picked by FEFO until a manager lifts the quarantine. The manager receives an e-mail at the manager e-mail address in the server settings. A repeated event about the same freezing run does not touch the lot a second time.

> **Known limitations.** The till (POS) sells dishes, not lots, so a lot quarantine does not directly affect sushi sales — do not prepare dishes from such fish, or send the fish for heat treatment. A lot that no longer comes up when searching by number (for example, fully used up) cannot be selected.

### Sushi rice pH

The business's CCP: at every measuring point the pH must be **no higher than the requirement's limit**. If the requirement does not set its own limit, 4.6 applies (FSAI recommendation). The rice must be used within a time limit from cooking: 4 hours by default, unless the requirement states otherwise.

1. In the **"Sushi rice pH"** block fill in:
   - **Rice batch**;
   - **Cooked at** and **Acidified at** — acidification not before cooking and not in the future;
   - **Vinegar recipe version**;
   - **pH reading 1** and **pH reading 2** (required, from different places in the batch), optionally **pH reading 3**. Values from 0 to 14.
2. Click **"Record"**.
   - All readings within the limit: the message "pH within limit", status **"In use"**, the "Discard by" field = cooking time + permitted hours.
   - At least one reading above the limit: "pH above limit — batch rejected", status **"Rejected — re-test or discard"**.
3. The card of a rejected batch (`…/sushi/rice/{id}`) offers two actions:
   - add vinegar, enter the new acidification time and readings and click **"Re-test after more vinegar"**. A new record is created with the same batch and the same cooking time (the use period is not extended). On success the old record gets the status "Superseded by a passing re-test";
   - or click **"Discard batch"**.
4. A batch "In use" whose "Discard by" time has passed is marked **"Past discard time"**. Discard it with the "Discard batch" button.

**What cannot be changed.** pH readings and cooking and acidification times cannot be edited after recording. A mistake can only be corrected by a re-test. A discarded or superseded batch cannot be changed (409). A closed freezing run ("Cleared", "Not compliant", "Cancelled") cannot be changed either. If the data was entered incorrectly, cancel the open freezing run and start a new record.

> **Known limitations.** The manager receives an e-mail about rice "Past discard time" at the manager e-mail address in the server settings; there is no notification in the bell. The freezer and pH meter cannot be selected from the HACCP equipment in the form; only the temperature is entered.

### Error messages (samples and sushi)

Server messages in these logs come in English. The most common:

| Message | Cause | What to do |
|---|---|---|
| A retained sample must weigh at least 150 g… | sample weight below 150 g | take a sample of at least 150 g |
| Samples must be stored at <= +4 °C… | storage temperature above +4 °C | move it to a fridge at ≤ +4 °C |
| portionedAt / consumedAt cannot be in the future | time in the future | check the date and hour |
| Record when the whole batch was consumed first… | "Discard" before consumption was recorded | first "Save consumption time" |
| The sample must be kept until … | 72 hours have not yet passed | wait until the deadline |
| Handing a sample over requires a note… | handover to the authority without a note | state who took it and the protocol number |
| Sample is already … / Freezing run is already … / Rice batch is already … | the record is already closed | refresh the page |
| Lot … already has an open freezing run | a freezing run is already open for the lot | close or cancel the open one |
| Own freezing needs the freezer … or its temperature | own freezing without the freezer temperature | enter "Freezer °C" |
| A cancellation reason of at least 5 characters is required | cancellation reason too short | describe the reason in more detail |
| At least two pH readings… / pH readings must be between 0 and 14 | fewer than two readings or a value outside 0–14 | enter two or three valid readings |
| acidifiedAt cannot be before cookedAt | acidification before cooking | correct the time |
| Only a rejected batch can be re-tested | re-test of a batch that was not rejected | — |
| …was changed concurrently; reload | another user changed the record | refresh the page |
