mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-03-15 12:29:16 +01:00
Merge branch 'dev' for release 6.0.10
This commit is contained in:
commit
784146266e
@ -1,5 +1,12 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
## v6.0.10 2023 July 13
|
||||
|
||||
- Fix a bug: unable to confirm payment of store for admin
|
||||
- Fix a bug: unable to update payment schedule item
|
||||
- Fix a bug: event reserved places compute error
|
||||
- [TODO DEPLOY] `rails fablab:setup:build_places_cache`
|
||||
|
||||
## v6.0.9 2023 July 07
|
||||
|
||||
- Fix a bug: unable to show project step image in markdown file
|
||||
|
@ -31,7 +31,7 @@ class API::CheckoutController < API::APIController
|
||||
|
||||
def confirm_payment
|
||||
authorize @current_order, policy_class: CheckoutPolicy
|
||||
res = Checkout::PaymentService.new.confirm_payment(@current_order, current_user, params[:coupon_code], params[:payment_id])
|
||||
res = Checkout::PaymentService.new.confirm_payment(@current_order, params[:coupon_code], params[:payment_id])
|
||||
render json: res
|
||||
rescue StandardError => e
|
||||
render json: e, status: :unprocessable_entity
|
||||
|
@ -29,9 +29,7 @@ class Checkout::PaymentService
|
||||
end
|
||||
end
|
||||
|
||||
def confirm_payment(order, operator, coupon_code, payment_id = '')
|
||||
return unless operator.member?
|
||||
|
||||
def confirm_payment(order, coupon_code, payment_id = '')
|
||||
if Stripe::Helper.enabled?
|
||||
Payments::StripeService.new.confirm_payment(order, coupon_code, payment_id)
|
||||
elsif PayZen::Helper.enabled?
|
||||
|
@ -30,10 +30,14 @@ class Slots::PlacesCacheService
|
||||
reservations = Slots::ReservationsService.reservations(slot.slots_reservations, [reservable])
|
||||
pending = Slots::ReservationsService.pending_reservations(slot.cart_item_reservation_slots.map(&:id), [reservable])
|
||||
|
||||
reserved_places = (reservations[:reservations].count || 0) + (pending[:reservations].count || 0)
|
||||
if slot.availability.available_type == 'event'
|
||||
reserved_places = slot.availability.event.nb_total_places - slot.availability.event.nb_free_places
|
||||
end
|
||||
places.push({
|
||||
reservable_type: reservable.class.name,
|
||||
reservable_id: reservable.try(&:id),
|
||||
reserved_places: (reservations[:reservations].count || 0) + (pending[:reservations].count || 0),
|
||||
reserved_places: reserved_places,
|
||||
user_ids: reservations[:user_ids] + pending[:user_ids]
|
||||
})
|
||||
end
|
||||
|
@ -403,6 +403,7 @@ de:
|
||||
state_new: "Not yet due"
|
||||
state_pending_check: "Waiting for the cashing of the check"
|
||||
state_pending_transfer: "Waiting for the tranfer confirmation"
|
||||
state_pending_card: "Waiting for the card payment"
|
||||
state_requires_payment_method: "The credit card must be updated"
|
||||
state_requires_action: "Action required"
|
||||
state_paid: "Paid"
|
||||
|
@ -403,6 +403,7 @@ en:
|
||||
state_new: "Not yet due"
|
||||
state_pending_check: "Waiting for the cashing of the check"
|
||||
state_pending_transfer: "Waiting for the tranfer confirmation"
|
||||
state_pending_card: "Waiting for the card payment"
|
||||
state_requires_payment_method: "The credit card must be updated"
|
||||
state_requires_action: "Action required"
|
||||
state_paid: "Paid"
|
||||
|
@ -403,6 +403,7 @@ es:
|
||||
state_new: "Not yet due"
|
||||
state_pending_check: "Waiting for the cashing of the check"
|
||||
state_pending_transfer: "Waiting for the tranfer confirmation"
|
||||
state_pending_card: "Waiting for the card payment"
|
||||
state_requires_payment_method: "The credit card must be updated"
|
||||
state_requires_action: "Action required"
|
||||
state_paid: "Paid"
|
||||
|
@ -403,6 +403,7 @@ fr:
|
||||
state_new: "Pas encore à l'échéance"
|
||||
state_pending_check: "En attente de l'encaissement du chèque"
|
||||
state_pending_transfer: "En attente de la confirmation du prélèvement"
|
||||
state_pending_card: "En attente du paiement par carte"
|
||||
state_requires_payment_method: "La carte bancaire doit être mise à jour"
|
||||
state_requires_action: "Action requise"
|
||||
state_paid: "Payée"
|
||||
|
@ -403,6 +403,7 @@ it:
|
||||
state_new: "Non ancora scaduto"
|
||||
state_pending_check: "In attesa di incasso dell'assegno"
|
||||
state_pending_transfer: "In attesa conferma del bonifico bancario"
|
||||
state_pending_card: "Waiting for the card payment"
|
||||
state_requires_payment_method: "La carta di credito deve essere aggiornata"
|
||||
state_requires_action: "Azione richiesta"
|
||||
state_paid: "Pagato"
|
||||
|
@ -403,6 +403,7 @@
|
||||
state_new: "Not yet due"
|
||||
state_pending_check: "Waiting for the cashing of the check"
|
||||
state_pending_transfer: "Waiting for the tranfer confirmation"
|
||||
state_pending_card: "Waiting for the card payment"
|
||||
state_requires_payment_method: "The credit card must be updated"
|
||||
state_requires_action: "Action required"
|
||||
state_paid: "Paid"
|
||||
|
@ -403,6 +403,7 @@ pt:
|
||||
state_new: "Ainda não vencido"
|
||||
state_pending_check: "Esperando a validação manual"
|
||||
state_pending_transfer: "Aguardando a confirmação da transferência"
|
||||
state_pending_card: "Waiting for the card payment"
|
||||
state_requires_payment_method: "O cartão de crédito deve ser atualizado"
|
||||
state_requires_action: "Ação necessária"
|
||||
state_paid: "Pago"
|
||||
|
@ -403,6 +403,7 @@ zu:
|
||||
state_new: "crwdns29422:0crwdne29422:0"
|
||||
state_pending_check: "crwdns29424:0crwdne29424:0"
|
||||
state_pending_transfer: "crwdns29426:0crwdne29426:0"
|
||||
state_pending_card: "crwdns37663:0crwdne37663:0"
|
||||
state_requires_payment_method: "crwdns29428:0crwdne29428:0"
|
||||
state_requires_action: "crwdns29430:0crwdne29430:0"
|
||||
state_paid: "crwdns29432:0crwdne29432:0"
|
||||
|
@ -24,7 +24,7 @@ class PayZen::Service < Payment::Service
|
||||
rrule: rrule(payment_schedule),
|
||||
order_id: order_id
|
||||
}
|
||||
unless first_item.details['adjustment']&.zero? && first_item.details['other_items']&.zero?
|
||||
if first_item.details['adjustment']&.zero? && first_item.details['other_items']&.zero?
|
||||
initial_amount = first_item.amount
|
||||
initial_amount -= payment_schedule.wallet_amount if payment_schedule.wallet_amount
|
||||
if initial_amount.zero?
|
||||
@ -140,7 +140,7 @@ class PayZen::Service < Payment::Service
|
||||
transaction_date = Time.zone.parse(transaction['creationDate']).to_date
|
||||
|
||||
amount = payment_schedule_item.amount
|
||||
if !payment_schedule_item.details['adjustment']&.zero? && payment_schedule_item.payment_schedule.wallet_amount
|
||||
if payment_schedule_item.details['adjustment']&.zero? && payment_schedule_item.payment_schedule.wallet_amount
|
||||
amount -= payment_schedule_item.payment_schedule.wallet_amount
|
||||
end
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fab-manager",
|
||||
"version": "6.0.9",
|
||||
"version": "6.0.10",
|
||||
"description": "Fab-manager is the FabLab management solution. It provides a comprehensive, web-based, open-source tool to simplify your administrative tasks and your marker's projects.",
|
||||
"keywords": [
|
||||
"fablab",
|
||||
|
@ -35,12 +35,12 @@ class Availabilities::AvailabilitiesServiceTest < ActiveSupport::TestCase
|
||||
assert_empty slots
|
||||
end
|
||||
|
||||
test 'admin cannot see past availabilities further than 1 month' do
|
||||
test 'admin can see past availabilities further than 1 month' do
|
||||
service = Availabilities::AvailabilitiesService.new(@admin)
|
||||
slots = service.machines([Machine.find(2)], @no_subscription,
|
||||
{ start: Time.zone.parse('2015-06-15').beginning_of_day, end: Time.zone.parse('2015-06-15').end_of_day })
|
||||
|
||||
assert_empty slots
|
||||
assert_not_empty slots
|
||||
end
|
||||
|
||||
test 'admin can see past availabilities in 1 month ago' do
|
||||
|
Loading…
x
Reference in New Issue
Block a user