AI

How AI Turns Supplier Invoices Into Stock in a Café Back Office

Mykhaylo Yuminov
Mykhaylo Yuminov
CEO & Founder
October 17, 2026
4 min read
AIDocument ProcessingClaudeRestaurant OperationsInventoryVitrina
AI

Most of the data a café needs for stock and food cost does not arrive as a spreadsheet. It arrives as a supplier invoice handed over at the back door, a receipt from a cash-and-carry, a chef's handwritten list of what was bought this morning, or a voice message. In Vitrina, our platform for cafés, the purchasing module is built around those inputs.

We wrote earlier about how we built invoice parsing for vporiadku, where the goal is a draft expense for bookkeeping. In a café the goal is different: each purchase has to land on the right ingredient, in the right unit, so that stock and food cost stay correct.

Three ways in

A purchase in Vitrina is one record per location per day. The manager adds to it in three ways:

  1. a photo of a supplier invoice or a receipt;
  2. a photo of the chef's handwritten purchase list;
  3. a voice note, for the moments when typing is not an option.

Before a photo goes to the model, it is rotated according to its metadata, scaled down so that the long side is at most 2,576 pixels and converted to WebP. That keeps every image under the provider's size limit without losing the small print.

Which model reads what

  • Photos are read by Claude Sonnet 5.5. We compared it with Claude Haiku 5.5, which is far cheaper and was worse at handwriting and crumpled receipts. Our measurement: about $0.007 per invoice and $0.008 per handwritten list with Sonnet, against $0.0003-0.0006 with Haiku. For a document that decides what goes into stock, the difference is worth paying.
  • Voice notes are transcribed by Whisper, and Claude Haiku 5.5 turns the transcript into lines.
  • Matching a line to the ingredient catalogue is also done by Claude Haiku 5.5.

Every call is logged with its tokens and cost. The prompts are stored in the database, so they can be adjusted without a new release.

A strict format, and rules for receipts

The model does not return free text. For every line it must fill a fixed structure: the name as written, the quantity, the unit, the price per unit, the line total and a confidence score. A refusal or an answer cut off halfway is treated as an error, never as an empty list.

The receipt prompt carries a few rules that came from real receipts:

  • decimal commas are normalised, so "1,5 kg" becomes 1.5;
  • total, VAT and discount lines are skipped, because they are not goods;
  • if quantity times price differs from the line total by more than 1%, the confidence goes down instead of the model quietly "fixing" a number.

Matching to the catalogue

A supplier writes "Chick. fillet chilled", while the kitchen's catalogue says "Chicken fillet". For each line the model sees the catalogue and returns one of three answers:

  • an exact match, when it is confident (0.85 or higher);
  • up to five candidates, when it is not sure;
  • a suggestion for a new ingredient with a category, when nothing fits.

The match is only a suggestion. It changes nothing in the database until a person accepts it.

Nothing reaches the stock without a person

A purchase can be confirmed only when every line has been reviewed, every line is linked to an ingredient, and every unit converts to the ingredient's unit (grams to kilograms, millilitres to litres). Anything else blocks the confirmation with a message that says how many lines are left.

A few details protect the numbers:

  • parsing the same photo again replaces only the lines nobody has touched, so a second click neither duplicates the list nor undoes corrections;
  • confirmation is atomic, so a double click cannot add the same delivery to stock twice;
  • reopening a confirmed purchase reverses exactly what it added, even after several rounds of corrections;
  • an ingredient's last purchase price is updated only by a newer purchase, never by an older one entered late.

What we learned

The cheapest model is not the cheapest option when it reads a handwritten "5" as an "8". For documents that change stock, a model that reads handwriting well and a person who checks each line are both part of the price.

If your business runs on paper that someone retypes every day, tell us about it.