1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

(fix) regresion on PaymentScheduleItemWorker from v6.3.2

This commit is contained in:
Nicolas Florentin 2023-11-23 08:07:18 +01:00
parent b2c3851ddc
commit 2250427b9a

View File

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