mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Do not display "Admin and Handling" ie. fees total
This commit is contained in:
committed by
Konrad
parent
7b57f2358c
commit
8b89c901ef
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user