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:
Gaetan Craig-Riou
2024-09-30 16:04:44 +10:00
parent eb8050d61d
commit fafd86a2db
2 changed files with 1 additions and 1 deletions

View File

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

View File

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