Skip to main content
Back to documentation

How costing works

How Mezbano prices a recipe from its ingredients — cost-source precedence, effective dates, and published-version costing.

Browse documentation

Mezbano calculates a recipe cost by costing each line and adding the available line amounts. A line can use an ingredient or a published sub-recipe, so a finished item can include prepared components without duplicating their ingredients.

A displayed subtotal may be useful while diagnosing missing data, but it is not treated as a complete recipe cost unless every line can be costed. Incomplete totals are excluded from margin calculations rather than presented as a lower, misleading cost.

Where each ingredient’s cost comes from

For every ingredient line, Mezbano resolves a unit cost from the best available source, in this order of precedence (highest first):

  1. Store cost override — a price you set for that ingredient at a specific store. An override eligible on the costing date is selected before the other ingredient sources.
  2. Recent store purchase — the most recent ingredient purchase recorded at that store on or before the costing date, when there is no eligible store override.
  3. Franchise baseline cost — a brand-level reference price for the ingredient. It is the fallback when that store has neither an eligible override nor an eligible purchase.

After selecting a source, Mezbano converts the recipe quantity into the source unit and applies the ingredient’s configured waste percentage as a yield loss. If no source exists, no conversion path exists, or the configured yield cannot produce a finite cost, the line is unavailable rather than guessed. The engine does not silently replace an unusable higher-priority source with a lower one.

Effective dates

Costs are resolved as of a date, not just “right now”. Store overrides and franchise baselines each carry an effective-from date, and Mezbano picks the record that was in effect on the costing date. Purchases are matched by purchase date — the most recent one on or before that date wins.

The date controls which record is eligible; it does not make every source record immutable. If an existing baseline or override is edited in place, recalculating an earlier date can reflect that edit. When a recipe is published with complete cost coverage, Mezbano also stores the complete batch cost calculated at publication as point-in-time evidence. Live costing still resolves the current eligible source records for the requested date.

Costing uses the published version

Recipes are versioned. Costing reads the published version effective on the costing date — and applies the same rule to any sub-recipe — rather than using a work-in-progress draft. A future-effective publication does not take over early, and a recipe with no published version eligible for that date cannot be costed.

A sub-recipe contributes only when its selected published version has a complete cost, a positive batch yield, and a conversion path from the quantity used to the declared yield unit. Otherwise the parent line stays unavailable, preventing a partial nested cost from understating the parent.

Setting the prices costing reads

  • Bulk-load franchise baselines from a spreadsheet — see Importing your ingredients.
  • Set brand baselines and store overrides from the costing screens in the app.
  • Record ingredient purchases as they occur. The newest eligible purchase can become the source when no eligible store override exists and the units can be converted.