X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Fquotation_latex;h=13fc429788fb4fec18a98fcd9969ef8945d975e8;hp=7ebc38d75c00d81d1bcf770c2f613705b1e88e43;hb=51c0d6572357ba4d7c11a11e7ff506428c1cc045;hpb=0b6bd6405107c1abf8f2c5e2bc1b569870a02309 diff --git a/conf/quotation_latex b/conf/quotation_latex index 7ebc38d75..13fc42978 100644 --- a/conf/quotation_latex +++ b/conf/quotation_latex @@ -39,6 +39,10 @@ \LTchunksize=40 + +\begin{document} + + \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{1pt} @@ -127,9 +131,9 @@ \ifthenelse{\equal{\thepage}{1}} { % First page \begin{tabular}{ccc} - [@-- join(' & ', emt('Invoice date'), emt('Invoice #'), emt('Customer #') ) --@]\\ + [@-- join(' & ', emt('Quotation date'), emt('Quotation #'), $custnum ? emt('Customer #') : emt('Prospect #') ) --@]\\ \vspace{0.2cm} - \textbf{[@-- $date --@]} & \textbf{[@-- $invnum --@]} & \textbf{[@-- $custnum --@]} \\\hline + \textbf{[@-- $date --@]} & \textbf{[@-- $quotationnum --@]} & \textbf{[@-- $custnum || $prospectnum --@]} \\\hline \rule{0pt}{5ex} &~~ \huge{\textsc{[@-- emt($notice_name) --@]}} & \\ \vspace{-0.2cm} & & \\\hline @@ -138,8 +142,8 @@ { % ... pages \small{ \begin{tabular}{lll} - [@-- join(' & ', emt('Invoice date'), emt('Invoice #'), emt('Customer #') ) --@]\\ - \textbf{[@-- $date --@]} & \textbf{[@-- $invnum --@]} & \textbf{[@-- $custnum --@]}\\ + [@-- join(' & ', emt('Quotation date'), emt('Quotation #'), $custnum ? emt('Customer #') : emt('Prospect #') ) --@]\\ + \textbf{[@-- $date --@]} & \textbf{[@-- $quotationnum --@]} & \textbf{[@-- $custnum || $prospectnum --@]}\\ \end{tabular} } } @@ -200,7 +204,6 @@ } -\begin{document} % Headers and footers defined for the first page \addressinset \rule{0.5cm}{0cm} \makebox{ @@ -281,18 +284,16 @@ } } - #if ($section == $sections[$#sections]) { - foreach my $line (grep {$_->{section}->{description} eq $section->{description}} @total_items) { - if ($section->{total_line_generator}) { - $OUT .= &{$section->{total_line_generator}}($line); - } else { - $OUT .= '\FStotaldesc{' . $line->{'total_item'} . '}' . - '{' . $line->{'total_amount'} . '}' . "\n"; - } + foreach my $line (grep {$_->{section}->{description} eq $section->{description}} @total_items) { + if ($section->{total_line_generator}) { + $OUT .= &{$section->{total_line_generator}}($line); + } else { + $OUT .= '\FStotaldesc{' . $line->{'total_item'} . '}' . + '{' . $line->{'total_amount'} . '}' . "\n"; + $OUT .= '\hline' . "\n" if $line->{'break_after'}; } - #} + } - $OUT .= '\hline'; $OUT .= '\endlastfoot'; my $lastref = 0;