laravel-shop/tests/Feature/Subscriptions
Fabian @ Blax Software 47e7300e98 feat(cost): royalty / minimum-licence-fee margin (Aircademy-style)
Add ProductPrice.license_percent + license_min_amount and
ProductPrice::licenseFeePerPeriod() = max(percent% of unit_amount, minimum).
The shop amortizes it over the licence-term bracket (<=quarter / 6mo / 12mo),
so a monthly subscriber billed 3x in a quarter costs ONE quarterly fee — the
faithful reading of a per-unit, quarterly-accounted content licence.
subscriptionMetrics() now returns license_cost and net_mrr nets it out.

Additive: a null rule contributes 0. Covered by MrrMetricsTest; full suite green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-28 16:03:04 +02:00
..
MrrMetricsTest.php feat(cost): royalty / minimum-licence-fee margin (Aircademy-style) 2026-08-28 16:03:04 +02:00
SubscriptionLifecycleTest.php fix(subscriptions): grant every product in a multi-item (bundle) subscription 2026-06-09 19:29:14 +02:00