Skip to content

Commit 7841462

Browse files
committed
Merge branch 'dev' for release 6.0.10
2 parents 8003961 + 8cd87f9 commit 7841462

File tree

15 files changed

+27
-10
lines changed

15 files changed

+27
-10
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog Fab-manager
22

3+
## v6.0.10 2023 July 13
4+
5+
- Fix a bug: unable to confirm payment of store for admin
6+
- Fix a bug: unable to update payment schedule item
7+
- Fix a bug: event reserved places compute error
8+
- [TODO DEPLOY] `rails fablab:setup:build_places_cache`
9+
310
## v6.0.9 2023 July 07
411

512
- Fix a bug: unable to show project step image in markdown file

app/controllers/api/checkout_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def payment
3131

3232
def confirm_payment
3333
authorize @current_order, policy_class: CheckoutPolicy
34-
res = Checkout::PaymentService.new.confirm_payment(@current_order, current_user, params[:coupon_code], params[:payment_id])
34+
res = Checkout::PaymentService.new.confirm_payment(@current_order, params[:coupon_code], params[:payment_id])
3535
render json: res
3636
rescue StandardError => e
3737
render json: e, status: :unprocessable_entity

app/services/checkout/payment_service.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ def payment(order, operator, coupon_code, payment_id = '')
2929
end
3030
end
3131

32-
def confirm_payment(order, operator, coupon_code, payment_id = '')
33-
return unless operator.member?
34-
32+
def confirm_payment(order, coupon_code, payment_id = '')
3533
if Stripe::Helper.enabled?
3634
Payments::StripeService.new.confirm_payment(order, coupon_code, payment_id)
3735
elsif PayZen::Helper.enabled?

app/services/slots/places_cache_service.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ def refresh(slot)
3030
reservations = Slots::ReservationsService.reservations(slot.slots_reservations, [reservable])
3131
pending = Slots::ReservationsService.pending_reservations(slot.cart_item_reservation_slots.map(&:id), [reservable])
3232

33+
reserved_places = (reservations[:reservations].count || 0) + (pending[:reservations].count || 0)
34+
if slot.availability.available_type == 'event'
35+
reserved_places = slot.availability.event.nb_total_places - slot.availability.event.nb_free_places
36+
end
3337
places.push({
3438
reservable_type: reservable.class.name,
3539
reservable_id: reservable.try(&:id),
36-
reserved_places: (reservations[:reservations].count || 0) + (pending[:reservations].count || 0),
40+
reserved_places: reserved_places,
3741
user_ids: reservations[:user_ids] + pending[:user_ids]
3842
})
3943
end

config/locales/app.shared.de.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ de:
403403
state_new: "Not yet due"
404404
state_pending_check: "Waiting for the cashing of the check"
405405
state_pending_transfer: "Waiting for the tranfer confirmation"
406+
state_pending_card: "Waiting for the card payment"
406407
state_requires_payment_method: "The credit card must be updated"
407408
state_requires_action: "Action required"
408409
state_paid: "Paid"

config/locales/app.shared.en.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ en:
403403
state_new: "Not yet due"
404404
state_pending_check: "Waiting for the cashing of the check"
405405
state_pending_transfer: "Waiting for the tranfer confirmation"
406+
state_pending_card: "Waiting for the card payment"
406407
state_requires_payment_method: "The credit card must be updated"
407408
state_requires_action: "Action required"
408409
state_paid: "Paid"

config/locales/app.shared.es.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ es:
403403
state_new: "Not yet due"
404404
state_pending_check: "Waiting for the cashing of the check"
405405
state_pending_transfer: "Waiting for the tranfer confirmation"
406+
state_pending_card: "Waiting for the card payment"
406407
state_requires_payment_method: "The credit card must be updated"
407408
state_requires_action: "Action required"
408409
state_paid: "Paid"

config/locales/app.shared.fr.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ fr:
403403
state_new: "Pas encore à l'échéance"
404404
state_pending_check: "En attente de l'encaissement du chèque"
405405
state_pending_transfer: "En attente de la confirmation du prélèvement"
406+
state_pending_card: "En attente du paiement par carte"
406407
state_requires_payment_method: "La carte bancaire doit être mise à jour"
407408
state_requires_action: "Action requise"
408409
state_paid: "Payée"

config/locales/app.shared.it.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@ it:
403403
state_new: "Non ancora scaduto"
404404
state_pending_check: "In attesa di incasso dell'assegno"
405405
state_pending_transfer: "In attesa conferma del bonifico bancario"
406+
state_pending_card: "Waiting for the card payment"
406407
state_requires_payment_method: "La carta di credito deve essere aggiornata"
407408
state_requires_action: "Azione richiesta"
408409
state_paid: "Pagato"

config/locales/app.shared.no.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,7 @@
403403
state_new: "Not yet due"
404404
state_pending_check: "Waiting for the cashing of the check"
405405
state_pending_transfer: "Waiting for the tranfer confirmation"
406+
state_pending_card: "Waiting for the card payment"
406407
state_requires_payment_method: "The credit card must be updated"
407408
state_requires_action: "Action required"
408409
state_paid: "Paid"

0 commit comments

Comments
 (0)