Sha256: 8a54ed4180b2a65464366dc28e30930a1033c8fbdad3e92c09f0a16368de9aa4
Contents?: true
Size: 1.66 KB
Versions: 312
Compression:
Stored size: 1.66 KB
Contents
<div class='constrain'> <table id="cart"> <tr> <th>Item</th> <th>Quantity</th> <th>Subtotal</th> </tr> <% @invoice.line_items.each do |line_item| %> <tr> <td> <%= line_item.variant.product.title %> - <%= line_item.variant.title %> <% line_item.customizations.each do |customization| %> <p><%= "- #{customization.variant.product.custom_input}: #{customization.custom_input}"%></p> <% end %> </td> <td align="right"><%= line_item.quantity %></td> <td align="right"><%= number_to_currency(line_item.subtotal) %></td> </tr> <% end %> <tr> <td colspan="2" align="right">Subtotal</td> <td align="right"><%= number_to_currency(@invoice.subtotal) %></td> </tr> <% if @invoice.tax and @invoice.tax > 0 %> <tr> <td colspan="2" align="right">Tax <span class="float: right">+</span></td> <td align="right"><%= number_to_currency(@invoice.tax) %></td> </tr> <% end %> <% if @invoice.shipping and @invoice.handling %> <tr> <td colspan="2" align="right">Shipping & Handling <span class="float: right">+</span></td> <td align="right"><%= number_to_currency(@invoice.shipping + @invoice.handling) %></td> </tr> <% end %> <% if @invoice.discounts.any? %> <tr> <td colspan="2" align="right">Gift Card <span class="float: right">-</span></td> <td align="right"><%= number_to_currency(@invoice.discounts.first.amount_current) %></td> </tr> <% end %> <tr> <td colspan="2" align="right">Total <span class="float: right">=</span></td> <td align="right"><%= number_to_currency(@invoice.total) %></td> </tr> </table> </div>
Version data entries
312 entries across 312 versions & 1 rubygems