<%= t('spree.order_summary') %>

<%= t('spree.item_total') %>:
<%= order.display_item_total.to_html %>
<% if order.line_item_adjustments.nonzero.exists? %> <% order.line_item_adjustments.nonzero.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
<%= label %>
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %>
<% end %> <% end %> <% order.all_adjustments.nonzero.tax.eligible.group_by(&:label).each do |label, adjustments| %>
<%= label %>
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %>
<% end %> <% if order.passed_checkout_step?("delivery") && order.shipments.any? %>
<%= t('spree.shipping_total') %>:
<%= Spree::Money.new(order.shipments.to_a.sum(&:cost), currency: order.currency).to_html %>
<% if order.shipment_adjustments.nonzero.exists? %> <% order.shipment_adjustments.nonzero.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
<%= label %>:
<%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %>
<% end %> <% end %> <% end %> <% if order.adjustments.nonzero.eligible.exists? %>
<% order.adjustments.nonzero.eligible.each do |adjustment| %> <% next if (adjustment.source_type == 'Spree::TaxRate') and (adjustment.amount == 0) %>
<%= adjustment.label %>:
<%= adjustment.display_amount.to_html %>
<% end %>
<% end %> <% if order.total_applicable_store_credit > 0.0 %>
<%= t('spree.store_credit.store_credit') %>:
<%= order.display_total_applicable_store_credit.to_html %>
<% end %>
<%= t('spree.order_total') %>:
<%= order.display_order_total_after_store_credit.to_html %>
<% if order.state == 'payment' %> <%= render 'spree/components/orders/coupon_code' %> <% end %>