app/views/orders/show.html.erb
<h2>Commande n°<%= @order.id %> de <%= @order.authentication.fullname %></h2>
<hr>
<% @orderitems.each do |orderitem| %>
<% if orderitem.quantity > 0 %>
<p>
<%= orderitem.quantity %>
<%= orderitem.pluralize(t('orders.show.package')) %>
<%= orderitem.product.name %>
<%= t('orders.show.for') %> <%= render_price_to_euros(orderitem.unit_price_x_quantity) %>
</p>
<% end %>
<% end %>
<p><strong>Total : <%= render_price_to_euros(@order.total) %></strong></p>
<p>
<%= link_to image_tag('edit.png', class:'icons'), edit_order_path %>
<%= link_to image_tag('delete.png', class:'icons'), "/orders/#{params[:id]}", method: :delete, data: {confirm: 'Are you sure ?'} %>
</p>
<p>
<%= link_to "Reçu téléchargeable (PDF)", order_path(@order, format: 'pdf'), id: 'btns' %>
</p>
<%= link_to "retour", :back, id: 'btns' %>