<%= "report is nil" if @report.nil? %>
<% unless @report.nil? %> <% @report.sections.each do |section| %> <% section.items.each do |item| %> <% end %> <% end %> <% end %>
Code Item name Amount Price Total
<%= section.supplier.name %>
<%= item.code %> <%= item.name %> <%= item.amount %> <%= item.current_input_price %> <%= item.current_input_price * item.amount %>
Sub-total: <%= section.sum_amount %>
Total: <%= @report.full_sum %>