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> |
||
|---|---|---|
| .. | ||
| MrrMetricsTest.php | ||
| SubscriptionLifecycleTest.php | ||