feat(#25): Gate B pricing and thickness band (TV-8, TV-9)
TV-8 pricing: - computeRecommendedPrice(bdft, pricePerBdft) returns bdft × price/bdft rounded half-up to 2 decimals 0.96 bdft × 12.50/bdft → 12.00 - computeSlabPrice handles three paths: 1. Has rule, no override → recommended price, source 'recommendation' 2. Has rule, override → override stored (150.00), source 'override' 3. No rule, manual → manual stored (99.99), recommendedPrice null TV-9 thickness band: - findThicknessBand(thicknessIn, ranges) rounds to 1/8" then matches [min, max) half-open ranges - 1" → 1"–1 1/2" (rounds up, label from synced Woo attribute, not hardcoded) Test output (all 29 tests green, 6 new): - tv8-pricing.test.ts: 6 passed (recommended, override, no-rule, rounding) - tv9-thickness-band.test.ts: 6 passed (1"→1"–1 1/2", 0.75"→3/4"–1", 0.875"→3/4"–1", 1.5"→1 1/2"–2", null for out-of-range, rounding to 1/8")
This commit is contained in:
@@ -4,3 +4,5 @@ export * from "./mask.js";
|
||||
export * from "./units.js";
|
||||
export * from "./axis.js";
|
||||
export * from "./crop.js";
|
||||
export * from "./pricing.js";
|
||||
export * from "./thicknessBand.js";
|
||||
|
||||
Reference in New Issue
Block a user