diff --git a/app/domain/booking_actions/public/cancel.rb b/app/domain/booking_actions/public/cancel.rb index a7dff4b12..c01f22a2d 100644 --- a/app/domain/booking_actions/public/cancel.rb +++ b/app/domain/booking_actions/public/cancel.rb @@ -5,8 +5,8 @@ module Public class Cancel < BookingActions::Base def invoke! booking.reload - transition_to = if booking.can_transition_to?(:declined_request) - :declined_request + transition_to = if booking.can_transition_to?(:cancelled_request) + :cancelled_request elsif booking.can_transition_to?(:cancelation_pending) :cancelation_pending end diff --git a/app/models/payment_infos/qr_bill.rb b/app/models/payment_infos/qr_bill.rb index 9ff83d0a8..8bd1fa22e 100644 --- a/app/models/payment_infos/qr_bill.rb +++ b/app/models/payment_infos/qr_bill.rb @@ -69,7 +69,7 @@ def creditor_address_lines end def debitor_address_lines - @debitor_address_lines ||= [invoice_address.lines, invoice_address.represented_by].max_by(&:size) + @debitor_address_lines ||= [invoice_address.lines, invoice_address.represented_by].compact.max_by(&:size) end def creditor_account