<%= render collection: line_items, partial: 'spree/shared/purchased_items_table/line_item', as: :line_item %>
<%= render 'spree/shared/purchased_items_table/subtotal', order: order %>
<% if order.line_item_adjustments.exists? %>
<% if order.all_adjustments.promotion.eligible.exists? %>
<% order.all_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
|
<%= Spree.t(:promotion) %>:
<%= label %>
|
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %>
|
<% end %>
<% end %>
<% end %>
<% order.shipments.group_by { |s| s.selected_shipping_rate&.name }.each do |name, shipments| %>
|
<%= Spree.t(:shipping) %>:
<%= name %>
|
<%= Spree::Money.new(shipments.sum(&:discounted_cost), currency: order.currency) %>
|
<% end %>
<% if order.additional_tax_total != 0 %>
|
<%= Spree.t(:tax) %>:
|
<%= order.display_additional_tax_total.to_html %>
|
<% end %>
<% order.adjustments.eligible.each do |adjustment| %>
<% next if (adjustment.source_type == 'Spree::TaxRate') || (adjustment.amount == 0) %>
<%= render 'spree/shared/purchased_items_table/adjustment', adjustment: adjustment, order: order %>
<% end %>
<%= render 'spree/shared/purchased_items_table/total', order: order %>