diff --git a/app/helpers/checkout_helper.rb b/app/helpers/checkout_helper.rb index aa5c069045..4c8a2ea53e 100644 --- a/app/helpers/checkout_helper.rb +++ b/app/helpers/checkout_helper.rb @@ -35,10 +35,6 @@ module CheckoutHelper adjustments end - def display_line_item_fees_total_for(order) - Spree::Money.new order.adjustments.enterprise_fee.sum(:amount), currency: order.currency - end - def checkout_line_item_fees(order) order.line_item_adjustments.enterprise_fee end diff --git a/app/views/spree/orders/_form.html.haml b/app/views/spree/orders/_form.html.haml index 7199594fec..877d700dc4 100644 --- a/app/views/spree/orders/_form.html.haml +++ b/app/views/spree/orders/_form.html.haml @@ -30,13 +30,6 @@ %td.text-right %span.order-total.item-total= display_checkout_subtotal(@order) %td - -if display_line_item_fees_total_for(@order) != Spree::Money.new(0 , currency: @order.currency) - %tr - %td.text-right{colspan:"3"} - = t :orders_form_admin - %td.text-right - %span.order-total.distribution-total= display_line_item_fees_total_for(@order) - %td - checkout_adjustments_for(@order, exclude: [:line_item]).reject{ |a| a.amount == 0 }.reverse_each do |adjustment| %tr.order-adjustment diff --git a/config/locales/en.yml b/config/locales/en.yml index 612a81e32a..7042c893da 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2278,7 +2278,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using orders_form_empty_cart: "Empty cart" orders_form_update_cart: "Update" orders_form_subtotal: "Produce subtotal" - orders_form_admin: "Admin & Handling" orders_form_total: "Total" orders_oc_expired_headline: "Orders have closed for this order cycle" orders_oc_expired_text: "Sorry, orders for this order cycle closed %{time} ago! Please contact your hub directly to see if they can accept late orders." diff --git a/spec/system/consumer/shopping/cart_spec.rb b/spec/system/consumer/shopping/cart_spec.rb index e8caa48392..068a31019e 100644 --- a/spec/system/consumer/shopping/cart_spec.rb +++ b/spec/system/consumer/shopping/cart_spec.rb @@ -106,14 +106,14 @@ describe "full-page cart", js: true do visit main_app.cart_path end - it "shows admin and handlings row" do + it "shows enterprise fees row row" do expect(page).to have_selector('#cart-detail') - expect(page).to have_content('Admin & Handling') + expect(page).to have_content("Whole order - #{handling_fee.name} fee by distributor #{order_cycle.coordinator.name}") expect(page).to have_selector '.cart-item-price', text: with_currency(0.86) expect(page).to have_selector '.order-total.item-total', text: with_currency(2.58) - expect(page).to have_selector '.order-total.distribution-total', + expect(page).to have_selector '.order-adjustment .total', text: with_currency(1.00) expect(page).to have_selector '.order-total.grand-total', text: with_currency(3.58) # price * 3 + 1 end