mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-20 14:54:15 +01:00
(bug) unable to cancel a payment schedule
This commit is contained in:
parent
5263153202
commit
14f404dfb6
@ -1,5 +1,7 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
- Fix a bug: unable to cancel a payment schedule
|
||||
|
||||
## v6.0.12 2023 August 14
|
||||
|
||||
- Fix a bug: event reserved places compute error
|
||||
|
@ -15,6 +15,12 @@ class API::SubscriptionsController < API::APIController
|
||||
|
||||
def cancel
|
||||
authorize @subscription
|
||||
payment_schedule = @subscription.original_payment_schedule
|
||||
if payment_schedule
|
||||
PaymentScheduleService.cancel(payment_schedule)
|
||||
render :show, status: :ok, location: @subscription and return
|
||||
end
|
||||
|
||||
if @subscription.expire
|
||||
render :show, status: :ok, location: @subscription
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user