diff options
Diffstat (limited to 'conf')
-rw-r--r-- | conf/anniversary-rollback | 0 | ||||
-rw-r--r-- | conf/invoice_html | 8 | ||||
-rw-r--r-- | conf/invoice_htmlsummary | 23 | ||||
-rw-r--r-- | conf/invoice_latex | 13 | ||||
-rw-r--r-- | conf/invoice_latexsummary | 22 |
5 files changed, 54 insertions, 12 deletions
diff --git a/conf/anniversary-rollback b/conf/anniversary-rollback new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/conf/anniversary-rollback diff --git a/conf/invoice_html b/conf/invoice_html index 567385b06..cd348274f 100644 --- a/conf/invoice_html +++ b/conf/invoice_html @@ -132,8 +132,8 @@ $OUT .= '<th align="center">' . emt('Ref') . '</th>'. '<th align="left">' . emt('Description') . '</th>'. ( $unitprices - ? '<th align="left">' . emt('Unit Price') . '</th>'. - '<th align="left">' . emt('Quantity') . '</th>' + ? '<th align="right">' . emt('Unit Price') . '</th>'. + '<th align="right">' . emt('Quantity') . '</th>' : '' ). '<th align="right">' . emt('Amount') . '</th>'; } @@ -158,8 +158,8 @@ ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ). '</td>'. '<td align="left">'. $line->{'description'}. '</td>'. ( $unitprices - ? '<td align="left">'. $line->{'unit_amount'}. '</td>'. - '<td align="left">'. $line->{'quantity'}. '</td>' + ? '<td align="right">'. $line->{'unit_amount'}. '</td>'. + '<td align="right">'. $line->{'quantity'}. '</td>' : '' ). diff --git a/conf/invoice_htmlsummary b/conf/invoice_htmlsummary index a06c8ffea..a6ea1e9e3 100644 --- a/conf/invoice_htmlsummary +++ b/conf/invoice_htmlsummary @@ -34,7 +34,16 @@ <%= my ($last) = grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section) and $_->{'description'} !~ /^\d+ $/ } reverse @sections; - foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section) and $_->{'description'} !~ /^\d+ $/ } @sections ) { + #false laziness w/invoice_latexsummary + foreach my $section ( + grep { + $_->{tax_section} || !$_->{summarized} + and ! $_->{adjust_section} + and !($finance_section && $_->{'description'} eq $finance_section) + and $_->{'description'} !~ /^\d+ $/ + } + @sections + ) { $OUT .= '<tr><td><b>'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '</b></td>'; my $celltype = ($last == $section) ? 'th' : 'td'; $OUT .= qq(<$celltype align="right"><b>). $section->{'subtotal'}. "</b></$celltype></tr>"; @@ -63,9 +72,19 @@ <td><b>New Charges</b></td> <th align="right"><b><%= $dollar.$current_less_finance %></b></th> </tr> + + <%= + + #false laziness w/invoice_latexsummary and above + foreach my $section ( grep $_->{adjust_section}, @sections) { + $OUT .= '<tr><td><b>'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '</b></td>'; + $OUT .= qq(<th align="right"><b>). $section->{'subtotal'}. "</b></th></tr>"; + } + %> + <tr> <td><b>Total Amount Due</b></td> - <td align="right"><b><%= $dollar.sprintf('%.2f', $true_previous_balance + $current_charges - $balance_adjustments) %></b></td> + <td align="right"><b><%= $dollar.sprintf('%.2f', $balance) %></b></td> </tr> <tr><th colspan=2><br></th></tr> </table> diff --git a/conf/invoice_latex b/conf/invoice_latex index d56a7fbdc..b169b617f 100644 --- a/conf/invoice_latex +++ b/conf/invoice_latex @@ -127,7 +127,11 @@ \ifthenelse{\equal{\thepage}{1}}
{ % First page
\begin{tabular}{ccc}
- [@-- join(' & ', emt('Invoice date'), emt('Invoice #'), emt('Customer #') ) --@]\\
+ [@-- join(' & ', ( $no_date ? '' : emt('Invoice date') ),
+ ( $no_number ? '' : emt('Invoice #') ),
+ emt('Customer #')
+ )
+ --@]\\
\vspace{0.2cm}
\textbf{[@-- $date --@]} & \textbf{[@-- $invnum --@]} & \textbf{[@-- $custnum --@]} \\\hline
\rule{0pt}{5ex} &~~ \huge{\textsc{[@-- emt($notice_name) --@]}} & \\
@@ -164,8 +168,9 @@ \newcommand{\FSdescriptionlength} { [@-- $unitprices ? '8.2cm' : '12.8cm' --@] }
\newcommand{\FSdescriptioncolumncount} { [@-- $unitprices ? '4' : '6' --@] }
\newcommand{\FSunitcolumns}{ [@--
- $unitprices
- ? '\makebox[2.5cm][l]{\textbf{~~'.emt('Unit Price').'}}&\makebox[1.4cm]{\textbf{~'.emt('Quantity').'}}&'
+ $unitprices
+ ? '\makebox[2.5cm][r]{\textbf{~~' . emt('Unit Price') . '}} &' .
+ '\makebox[1.4cm]{\textbf{~' . emt('Quantity') . '}} & '
: '' --@] }
\newcommand{\FShead}{
@@ -182,7 +187,7 @@ \newcommand{\FSdesc}[5]{
\multicolumn{1}{c}{\rule{0pt}{2.5ex}\textbf{#1}} &
\multicolumn{[@-- $unitprices ? '4' : '6' --@]}{l}{\textbf{#2}} &
-[@-- $unitprices ? ' \multicolumn{1}{l}{\textbf{#3}} &'."\n".
+[@-- $unitprices ? ' \multicolumn{1}{r}{\textbf{\dollar #3}} &'."\n".
' \multicolumn{1}{r}{\textbf{#4}} &'."\n"
: ''
--@]
diff --git a/conf/invoice_latexsummary b/conf/invoice_latexsummary index 4e4f62bf8..a68e5d381 100644 --- a/conf/invoice_latexsummary +++ b/conf/invoice_latexsummary @@ -21,7 +21,16 @@ \textbf{\underline{Summary of New Charges}} & \\ &\\ [@-- - foreach my $section ( grep { $_->{tax_section} || !$_->{summarized} and !($finance_section && $_->{'description'} eq $finance_section) and $_->{'description'} !~ /^\d+ $/ } @sections ) { + #false laziness w/invoice_htmlsummary + foreach my $section ( + grep { + $_->{tax_section} || !$_->{summarized} + and ! $_->{adjust_section} + and !($finance_section && $_->{'description'} eq $finance_section) + and $_->{'description'} !~ /^\d+ $/ + } + @sections + ) { $OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}'; $OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\'; } @@ -36,8 +45,17 @@ \textbf{Previous Past Due Charges}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance - $balance_adjustments) --@]}\\ \textbf{Finance charges on overdue amount}&\textbf{\dollar[@-- $finance_amount --@]}\\ \textbf{New Charges}&\textbf{\dollar[@-- $current_less_finance --@]}\\ + +[@-- + #false laziness w/invoice_htmlsummary and above + foreach my $section ( grep $_->{adjust_section}, @sections ) { + $OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}'; + $OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\'; + } +--@] + \cline{2-2} -\textbf{Total Amount Due}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance + $current_charges - $balance_adjustments) --@]}\\ +\textbf{Total Amount Due}&\textbf{\dollar[@-- sprintf('%.2f', $balance) --@]}\\ &\\ \hline \end{tabular} |