\multicolumn{<%= @ncols-4%>}{r}{} & \textbf{<%= '%0.2f' % @invoice.lines.time_entry.sum{|l| l.time_entry.hours } %>} & \textbf{Hours} & \textbf{SubTotal} & \textbf{<%= Skr::String.number_with_delimiter @invoice.lines.time_entry.sum(&:extended_price) %>} \\ \cline{<%= @ncols-3%>-<%= @ncols%>} <% if @invoice.lines.other_charge.any? -%> <% @invoice.lines.other_charge.each do | line | -%> \multicolumn{<%= @ncols-1%>}{r}{{<%=q line.description%>}} & <%= Skr::String.number_with_delimiter line.price %> \\ <% end -%> \cline{<%= @ncols-3%>-<%= @ncols%>} <% end -%> \multicolumn{<%= @ncols-2%>}{r}{} & \textbf{Total} & \textbf{<%= Skr::String.number_with_delimiter @invoice.total %>} \\ \cline{<%= @ncols-3%>-<%= @ncols%>} % \hline