mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-28 09:24:24 +01:00
Merge branch 'dev' for release 6.3.4
This commit is contained in:
commit
b75751c778
@ -1,5 +1,10 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
## v6.3.4 2023 November 23
|
||||
|
||||
- fix a bug: wrong amount when pay a reservation with payment schedule
|
||||
- fix regresion on PaymentScheduleItemWorker from v6.3.2
|
||||
|
||||
## v6.3.3 2023 November 14
|
||||
|
||||
- fix a bug: wrong currency unit for locale fr-CH
|
||||
|
@ -6,15 +6,14 @@ class PaymentScheduleItemWorker
|
||||
include Sidekiq::Worker
|
||||
|
||||
def perform(record_id = nil)
|
||||
p "WORKER CURRENCY_LOCALE=#{CURRENCY_LOCALE}"
|
||||
# if record_id
|
||||
# psi = PaymentScheduleItem.find(record_id)
|
||||
# check_item(psi)
|
||||
# else
|
||||
# PaymentScheduleItem.where.not(state: 'paid').where('due_date < ?', Time.current).each do |item|
|
||||
# check_item(item)
|
||||
# end
|
||||
# end
|
||||
if record_id
|
||||
psi = PaymentScheduleItem.find(record_id)
|
||||
check_item(psi)
|
||||
else
|
||||
PaymentScheduleItem.where.not(state: 'paid').where('due_date < ?', Time.current).each do |item|
|
||||
check_item(item)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# @param psi [PaymentScheduleItem]
|
||||
|
@ -24,7 +24,6 @@ class PayZen::Service < Payment::Service
|
||||
rrule: rrule(payment_schedule),
|
||||
order_id: order_id
|
||||
}
|
||||
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?
|
||||
@ -34,7 +33,6 @@ class PayZen::Service < Payment::Service
|
||||
params[:initial_amount] = payzen_amount(initial_amount)
|
||||
params[:initial_amount_number] = 1
|
||||
end
|
||||
end
|
||||
pz_subscription = client.create_subscription(**params)
|
||||
|
||||
# save payment token
|
||||
@ -141,7 +139,8 @@ 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 == payment_schedule_item.payment_schedule.ordered_items.first &&
|
||||
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.3.3",
|
||||
"version": "6.3.4",
|
||||
"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",
|
||||
|
Loading…
Reference in New Issue
Block a user