Skip to content

Commit

Permalink
Update totals on summary step
Browse files Browse the repository at this point in the history
  • Loading branch information
mkllnk committed Sep 5, 2022
1 parent 6c7a089 commit 1d04510
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 6 additions & 1 deletion app/controllers/split_checkout_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SplitCheckoutController < ::BaseController
def edit
redirect_to_step_based_on_order unless params[:step]
check_step if params[:step]
@order.create_tax_charge! if params[:step] == "summary"
recalculate_tax if params[:step] == "summary"
end

def update
Expand Down Expand Up @@ -156,4 +156,9 @@ def check_step
redirect_to checkout_step_path(:payment) if params[:step] == "summary"
end
end

def recalculate_tax
@order.create_tax_charge!
@order.update_order!
end
end
1 change: 0 additions & 1 deletion spec/system/consumer/split_checkout_tax_not_incl_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@
end

it "should re-calculate the tax accordingly" do
pending("#9153")
select "Victoria", from: "order_bill_address_attributes_state_id"

# it should not be necessary to save as new default bill address
Expand Down

0 comments on commit 1d04510

Please sign in to comment.