mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Prevents creation of payment adnustment when refunding or crediting an order
This commit is contained in:
committed by
Matt-Yorkley
parent
1d5ebe42a9
commit
9215ccc353
@@ -147,7 +147,7 @@ module Spree
|
||||
adjustment.originator = payment_method
|
||||
adjustment.label = adjustment_label
|
||||
adjustment.save
|
||||
elsif payment_method.present?
|
||||
elsif amount.positive? && payment_method.present?
|
||||
payment_method.create_adjustment(adjustment_label, self, true)
|
||||
adjustment.reload
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user