Prevents creation of payment adnustment when refunding or crediting an order

This commit is contained in:
Nihal M. Kelanthodika
2022-01-31 14:20:10 +05:30
committed by Matt-Yorkley
parent 1d5ebe42a9
commit 9215ccc353

View File

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