1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

fix admin operations on subscriptions w/ schedules

This commit is contained in:
Sylvain 2021-02-10 17:24:03 +01:00
parent fa686187cd
commit c478ade85c
2 changed files with 3 additions and 1 deletions

View File

@ -818,7 +818,8 @@ Application.Controllers.controller('EditMemberController', ['$scope', '$state',
// default parameters for the new subscription
$scope.subscription = {
payment_schedule: false
payment_schedule: false,
payment_method: 'check'
};
/**

View File

@ -66,6 +66,7 @@ class Subscriptions::Subscribe
generate_invoice(subscription, operator_profile_id, details)
end
payment.save
payment.post_save(schedule&.stp_setup_intent_id)
UsersCredits::Manager.new(user: new_sub.user).reset_credits
return new_sub
end