1
0
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:
Du Peng 2023-08-21 18:24:56 +02:00
parent 5263153202
commit 14f404dfb6
2 changed files with 8 additions and 0 deletions

View File

@ -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

View File

@ -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