Generate a specification on a new page if enabled for the invoice
This commit is contained in:
parent
6fc2cb87b3
commit
66c46cd7c3
|
@ -88,6 +88,13 @@
|
|||
\newcommand{\ihtotal}[1]{\cmidrule[.05em]{4-4}%
|
||||
\textbf{\totaltext}&&&\textbf{\currency~#1}}
|
||||
|
||||
\newenvironment{istable}%
|
||||
{\vskip1em\tabularx{\linewidth}{@{}X@{\quad}l@{\qquad}r@{}}
|
||||
\descriptiontext&Datum&Aantal uur\ML}%
|
||||
{\endtabularx}
|
||||
\newcommand{\istask}[1]{\textbf{#1}\\}
|
||||
\newcommand{\isitem}[3]{\quad #1\\}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\invoice{
|
||||
|
@ -128,4 +135,26 @@
|
|||
\accountdata
|
||||
}
|
||||
|
||||
<% if @invoice.include_specification? %>{
|
||||
\newpage
|
||||
|
||||
{\bfseries\scshape\Large Specificatie}
|
||||
|
||||
Hieronder volgt een specificatie van gemaakte uren per taak per
|
||||
uitgevoerde activiteit.
|
||||
|
||||
\begin{istable}
|
||||
<% @invoice.tasks.each do |task|
|
||||
%> \istask{<%= task.comment_or_name %>}<%
|
||||
task.time_entries.each do |time_entry| %>
|
||||
\isitem{<%= time_entry.comment || "Geen opmerking" %>}%
|
||||
{<%= time_entry.date.to_date %>}%
|
||||
{<%= number_with_precision(time_entry.hours_total) %>}<%
|
||||
end %>\\[\medskipamount]<%
|
||||
end %>
|
||||
\end{istable}
|
||||
\label{LastPageOf\thelettercount}
|
||||
<% end %>}
|
||||
\letter{}
|
||||
|
||||
\end{document}
|
||||
|
|
Loading…
Reference in New Issue