X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Fquotation_latex;h=13fc429788fb4fec18a98fcd9969ef8945d975e8;hp=772c2eb95c40cf29d2d22a18403f73deab52ab9d;hb=51c0d6572357ba4d7c11a11e7ff506428c1cc045;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500 diff --git a/conf/quotation_latex b/conf/quotation_latex index 772c2eb95..13fc42978 100644 --- a/conf/quotation_latex +++ b/conf/quotation_latex @@ -19,7 +19,7 @@ \documentclass[letterpaper]{article} -\usepackage{fancyhdr,lastpage,ifthen,array,fslongtable,afterpage,caption,multirow,bigstrut} +\usepackage{fancyhdr,lastpage,ifthen,array,longtable,afterpage,caption,multirow,bigstrut} \usepackage{graphicx} % required for logo graphic \usepackage[utf8]{inputenc} % multilanguage support \usepackage[T1]{fontenc} @@ -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} } } @@ -171,7 +175,7 @@ \newcommand{\FShead}{ \hline \rule{0pt}{2.5ex} - \makebox[1.4cm]{\textbf{Ref}} & + \makebox[1.4cm]{} & \multicolumn{\FSdescriptioncolumncount}{l}{\makebox[\FSdescriptionlength][l]{\textbf{[@-- emt('Description') --@]}}}& \FSunitcolumns \makebox[1.6cm][r]{\textbf{[@-- emt('Amount') --@]}} \\ @@ -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; @@ -313,7 +314,7 @@ $OUT .= &{$section->{description_generator}}($line); } else { $OUT .= '\FSdesc'. - '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'. + '{}'. #'{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'. '{' . $line->{'description'} . '}' . '{' . ( $unitprices ? $line->{'unit_amount'} : '' ) . '}'. '{' . ( $unitprices ? $line->{'quantity'} : '' ) . '}' .