fixup! adapt financial transaction type for online payment provider

Philipp Rothmann 2023-10-04 21:39:31 +02:00
parent 683753cd16
commit 4e965e1ce9
1 changed files with 1 additions and 3 deletions

View File

@ -91,9 +91,7 @@ class Ordergroup < Group
t.save!
update_balance!
# Notify only when order group had a positive balance before the last transaction:
if t.amount < 0 && account_balance < 0 && account_balance - t.amount >= 0
NotifyNegativeBalanceJob.perform_later(self, t)
end
NotifyNegativeBalanceJob.perform_later(self, t) if t.amount < 0 && account_balance < 0 && account_balance - t.amount >= 0
t
end
end