33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
<style type="text/css">
|
|
.tg {border-collapse:collapse;border-spacing:0;}
|
|
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
|
|
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;}
|
|
</style>
|
|
<div><%= "report is nil" if @report.nil? %></div>
|
|
<table class="tg">
|
|
<tr>
|
|
<th class="tg-031e">Code</th>
|
|
<th class="tg-031e">Item name</th>
|
|
<th class="tg-031e">Amount</th>
|
|
<th class="tg-031e">Price</th>
|
|
<th class="tg-031e">Total</th>
|
|
</tr>
|
|
|
|
<% unless @report.nil? %>
|
|
<% @report.sections.each do |section| %>
|
|
<tr><td><%= section.supplier.name %></td></tr>
|
|
<% section.items.each do |item| %>
|
|
<tr>
|
|
<td class="tg-031e"><%= item.code %></td>
|
|
<td class="tg-031e"><%= item.name %></td>
|
|
<td class="tg-031e"><%= item.amount %></td>
|
|
<td class="tg-031e"><%= item.current_input_price %></td>
|
|
<td class="tg-031e"><%= item.current_input_price * item.amount %></td>
|
|
</tr>
|
|
<% end %>
|
|
<tr><td>Sub-total: <%= section.sum_amount %></td></tr>
|
|
<% end %>
|
|
<tr><td><strong>Total: <%= @report.full_sum %></strong> </td></tr>
|
|
<% end %>
|
|
</table>
|