1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

(bug) unable to update payment schedule item

This commit is contained in:
Du Peng 2023-07-10 20:53:02 +02:00
parent 1ff61c9380
commit d22c3db4c2
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
# Changelog Fab-manager
- Fix a bug: unable to confirm payment of store for admin
- Fix a bug: unable to update payment schedule item
## v6.0.9 2023 July 07

View File

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