feat(promotion-code): Complete promotion code integration and testing

- Add comprehensive promotion code methods to Order model
- Implement Stripe invoice integration for promotion code discounts
- Display promotion codes on invoice with proper discount breakdown
- Fix and enhance all unit tests for promotion code functionality
- Add discount calculation with capping to prevent negative totals
- Ensure promotion codes work across entire order lifecycle

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
kbe
2025-09-29 20:33:54 +02:00
parent 87ccebf229
commit 635644b55a
7 changed files with 558 additions and 30 deletions

View File

@@ -9,7 +9,7 @@ class Promoter::PromotionCodesController < ApplicationController
@promotion_codes = @event.promotion_codes.includes(:user)
end
# GET /promoter/events/:event_id/promotion_codes/new
# Show form to create a new promotion code
def new