Add invoice functionality for orders with Stripe integration

This commit is contained in:
kbe
2025-09-08 10:55:36 +02:00
parent 9336d974ba
commit f0de3dac8a
2 changed files with 2 additions and 4 deletions

View File

@@ -106,8 +106,6 @@ class OrdersController < ApplicationController
end end
# Display order summary # Display order summary
#
#
def show def show
@tickets = @order.tickets.includes(:ticket_type) @tickets = @order.tickets.includes(:ticket_type)
end end
@@ -165,7 +163,7 @@ class OrdersController < ApplicationController
end end
@tickets = @order.tickets.includes(:ticket_type) @tickets = @order.tickets.includes(:ticket_type)
# Get the Stripe invoice if it exists # Get the Stripe invoice if it exists
begin begin
@stripe_invoice_id = @order.create_stripe_invoice! @stripe_invoice_id = @order.create_stripe_invoice!

View File

@@ -20,4 +20,4 @@ class OrdersControllerInvoiceTest < ActionDispatch::IntegrationTest
assert_redirected_to order_url(draft_order) assert_redirected_to order_url(draft_order)
assert_equal "La facture n'est disponible qu'après le paiement de la commande", flash[:alert] assert_equal "La facture n'est disponible qu'après le paiement de la commande", flash[:alert]
end end
end end