3.6 KiB
3.6 KiB
Cart pricing, delivery fees and persisted totals
Scope: shared cart-pricing helpers, authoritative order pricing, client previews and order detail. Fixtures: T threshold, D fee, different flash/regular prices, A1/A2 fees, multiple slots and decimal amounts.
| ID | Priority | Action / input | Expected result |
|---|---|---|---|
| MONEY-01 | P0 | Goods T−0.01/T/T+0.01 without coupon. | Fee below T only; at T free; every bill/persisted surface agrees. |
| MONEY-02 | P0 | Small order below historical minimum-order config. | Accepted under no-general-minimum policy; fee still charged as applicable. |
| MONEY-03 | P0 | Percent coupon on goods with paid delivery. | Delivery never part of coupon base. |
| MONEY-04 | P0 | Flat coupon below/equal/above goods and own maxValue. | Discount capped at eligible goods and own cap; nonnegative payable. |
| MONEY-05 | P0 | Percent coupon below/equal/above maxValue boundary. | Correct capped discount; finite values and agreed rounding. |
| MONEY-06 | P0 | Coupon moves goods from above T to below/exactly T. | Fee calculated from defined post-discount subtotal, consistent UI/server. |
| MONEY-07 | P0 | Two slots with unequal goods and paid delivery. | Fee on highest-goods primary once; sum equals group payable. |
| MONEY-08 | P1 | Equal-goods slots and reverse insertion order. | Defined deterministic tie; fee/usage on same primary order. |
| MONEY-09 | P0 | Targeted coupon matches only second slot's SKU. | Discount allocated only to eligible lines/suborders. |
| MONEY-10 | P0 | Partially overlapping/disjoint coupon targets. | Each contribution respects targets/cap; no unrelated goods discounted. |
| MONEY-11 | P0 | Several whole-cart coupons exceed all goods. | Combined discount ≤ goods; no negative order totals. |
| MONEY-12 | P0 | ₹100 SKU A in S1, ₹900 unrelated S2, two ₹100 A-targeted coupons. | A absorbs at most ₹100 discount; S1 nonnegative, S2 still ₹900 before assigned fee. Regression R3. |
| MONEY-13 | P0 | ₹100 goods, two nonexclusive ₹80 flat coupons. | UI and server cap to ₹100, not negative preview. Regression R4. |
| MONEY-14 | P1 | ₹99.99/₹10.05 unit prices, 3/7 quantities, 12.5% and thirds allocation. | Approved minor-unit rounding/residual policy; sum of stored shares exactly reconciles. |
| MONEY-15 | P0 | A1/A2 selected-address switch, same goods. | Correct bound charge/threshold only; no regional catalog change. |
| MONEY-16 | P0 | Client manipulates totals/discount/price fields or bound ID. | Authoritative prices/coupons/address bound used; no client-driven discount. |
| MONEY-17 | P0 | Flash SKU price differs greatly from regular. | Flash price drives goods, coupon min/cap and threshold. |
| MONEY-18 | P1 | Fully discounted goods with nonzero fee vs free fee. | Correct D or zero total; authoritative zero handled in success UI. |
| MONEY-19 | P0 | Catalog/coupon changes after order placed. | Stored discount/price/detail stable; no recomputation from edited coupon. |
| MONEY-20 | P1 | Missing/invalid market/config values, zero/null cap. | Clear validation/fallback; no NaN/Infinity/negative price. Zero-cap semantics explicitly approved. |
| MONEY-21 | P0 | Cancel/refund/remove fee/rebalance after split order. | Derived monetary changes reconcile without duplicate fee or lost historic discount. |
| MONEY-22 | P1 | Large supported quantity/price/cart size. | No overflow, precision loss beyond policy, or dropped discount allocations. |
Policies to resolve before numerical PASS: compound percentage basis, currency rounding and residual allocation, zero maxValue meaning. Sorting percentage coupons before flat coupons is required regardless of percentage basis.