Feature #684
openRecipes: manual cost-per-portion override
0%
Description
Adds an optional "Override cost per portion" field to the recipe dialog. When set, Recipe.ManualCostPerPortion takes over as the cost everywhere this recipe is read -- recipe list, menu margin, the cook sheet -- via a new Recipe.EffectiveCostPerPortion(ingredientLines) helper (ManualCostPerPortion ?? the ingredient total). Unlike the ingredient total it is frozen: a posted GRN does not move it until the field is edited again. The ingredient-computed figure is still exposed separately as ComputedCostPerPortion, shown live in the dialog next to the override field, so the two can be compared.
New nullable recipes.ManualCostPerPortion column (migration AddRecipeManualCostPerPortion). Updated the 3 cost call sites (RecipeService, MenuService, ProductionPlanService) to use the new entity method instead of calling RecipeCostCalculator directly. Recipes list shows a small lock icon next to an overridden cost.
Verified live in the browser: set Dhosha to a 6.50 override, confirmed the list shows the lock icon and 6.50; cleared it, confirmed it reverts to the live ingredient-computed 4.48 with no lock. Full backend suite green (2 pre-existing unrelated coupon failures only), full frontend suite green.
No data to display