From 38f5bfdca2049ce321e62238a10662ba59ce2339 Mon Sep 17 00:00:00 2001 From: Andy Brett Date: Wed, 31 Mar 2021 14:17:10 -0700 Subject: [PATCH] update fees after changing a line item --- app/controllers/api/v0/shipments_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/api/v0/shipments_controller.rb b/app/controllers/api/v0/shipments_controller.rb index ec452b2869..e0a288069e 100644 --- a/app/controllers/api/v0/shipments_controller.rb +++ b/app/controllers/api/v0/shipments_controller.rb @@ -68,6 +68,7 @@ module Api quantity = params[:quantity].to_i @order.contents.add(variant, quantity, nil, @shipment) + @order.recreate_all_fees! render json: @shipment, serializer: Api::ShipmentSerializer, status: :ok end @@ -77,6 +78,7 @@ module Api quantity = params[:quantity].to_i @order.contents.remove(variant, quantity, @shipment) + @order.recreate_all_fees! @shipment.reload if @shipment.persisted? render json: @shipment, serializer: Api::ShipmentSerializer, status: :ok