laravel-shop/tests/Feature/Subscriptions
Fabian @ Blax Software 9e3e4b2270 feat(cost): per-price cost basis (COGS) + net-MRR margin
Add ProductPrice.cost_amount (integer cents) — the cost to deliver one unit at
that price: manufacturing, shipping, a content license or royalty; per billing
period for recurring prices. Shop now reports margin natively: subscriptionMetrics()
returns `cogs` + `net_mrr`, and Shop::netMrr() gives MRR after cost of goods.

Additive: cost_amount defaults to 0, so existing consumers are unchanged.
Covered by MrrMetricsTest; full suite green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-28 15:12:42 +02:00
..
MrrMetricsTest.php feat(cost): per-price cost basis (COGS) + net-MRR margin 2026-08-28 15:12:42 +02:00
SubscriptionLifecycleTest.php fix(subscriptions): grant every product in a multi-item (bundle) subscription 2026-06-09 19:29:14 +02:00