mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-04 22:16:08 +00:00
Revert change made in https://github.com/openfoodfoundation/openfoodnetwork/pull/12538
Although the change fix the issue in the back office scenario, it has the side effect of getting the order total out of sync. Updating a payment adjustment need to be followed by udpating the order total and payment amount to keep everything in sync.
This commit is contained in:
@@ -155,7 +155,6 @@ module Spree
|
||||
if adjustment
|
||||
adjustment.originator = payment_method
|
||||
adjustment.label = adjustment_label
|
||||
adjustment.amount = payment_method.compute_amount(self)
|
||||
adjustment.save
|
||||
elsif !processing_refund? && payment_method.present?
|
||||
payment_method.create_adjustment(adjustment_label, self, true)
|
||||
|
||||
@@ -180,6 +180,7 @@ RSpec.describe '
|
||||
let(:order_with_fees) { create(:completed_order_with_fees, user:, distributor:, order_cycle: ) }
|
||||
|
||||
it 'recalculates transaction fee' do
|
||||
pending
|
||||
login_as_admin
|
||||
visit spree.edit_admin_order_path(order_with_fees)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user