From 8688433f7692a9a0891c91f53fff2420099b327c Mon Sep 17 00:00:00 2001 From: jeff Date: Mon, 19 May 2008 22:31:29 +0000 Subject: [PATCH] fix broken pagenation --- FS/FS/cust_bill_pkg.pm | 3 ++- conf/invoice_latex | 27 +++++++++++++-------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 5d60311cf..31d5378a7 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -262,7 +262,8 @@ sub details { $format_sub = sub { my $detail = shift; $csv->parse($detail) or return "can't parse $detail"; - join(' & ', map { &$escape_function($_) } $csv->fields ); + join(' & ', map { '\small{'. &$escape_function($_). '}' } + $csv->fields ); } if $format eq 'latex'; diff --git a/conf/invoice_latex b/conf/invoice_latex index 34ae4cbeb..ece0897da 100644 --- a/conf/invoice_latex +++ b/conf/invoice_latex @@ -137,17 +137,18 @@ % Commands for freeside description... \newcommand{\FSdesc}[3]{ \multicolumn{1}{c}{\rule{0pt}{2.5ex}\textbf{#1}} & - \textbf{#2} & + \multicolumn{6}{l}{\textbf{#2}} & \multicolumn{1}{r}{\textbf{\dollar #3}}\\ } % ...extended description... \newcommand{\FSextdesc}[1]{ \multicolumn{1}{l}{\rule{0pt}{1.0ex}} & - \multicolumn{2}{l}{\small{~-~#1}}\\ +%% \multicolumn{2}{l}{\small{~-~#1}}\\ + ~-~#1\\ } % ...and total line items. \newcommand{\FStotaldesc}[2]{ - & \multicolumn{1}{l}{#1} & #2\\ + & \multicolumn{6}{l}{#1} & #2\\ } @@ -191,23 +192,23 @@ Terms: [@-- $terms --@]\\ foreach my $section ( @sections ) { $OUT .= '\section*{\textsc{'; $OUT .= ($section->{'description'}) ? $section->{'description'} : 'Charges'; - $OUT .= '}}\begin{longtable}{clr}'; + $OUT .= '}}\begin{longtable}{cllllllr}'; $OUT .= '\hline'; $OUT .= '\rule{0pt}{2.5ex}'; $OUT .= '\makebox[1.4cm]{\textbf{Ref}} & '; - $OUT .= '\makebox[12.8cm][l]{\textbf{Description}} & '; + $OUT .= '\multicolumn{6}{l}{\makebox[12.8cm][l]{\textbf{Description}}} & '; $OUT .= '\makebox[2.5cm][r]{\textbf{Amount}} \\\\'; $OUT .= '\hline'; $OUT .= '\endfirsthead'; - $OUT .= '\multicolumn{3}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\\\'; + $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued from previous page}\\\\'; $OUT .= '\hline'; $OUT .= '\rule{0pt}{2.5ex}'; $OUT .= '\makebox[1.4cm]{\textbf{Ref}} & '; - $OUT .= '\makebox[12.8cm][l]{\textbf{Description}} & '; + $OUT .= '\multicolumn{6}{l}{\makebox[12.8cm][l]{\textbf{Description}}} & '; $OUT .= '\makebox[2.5cm][r]{\textbf{Amount}} \\\\'; $OUT .= '\hline'; $OUT .= '\endhead'; - $OUT .= '\multicolumn{3}{r}{\rule{0pt}{2.5ex}Continued on next page...}\\\\'; + $OUT .= '\multicolumn{7}{r}{\rule{0pt}{2.5ex}Continued on next page...}\\\\'; $OUT .= '\endfoot'; $OUT .= '\hline'; @@ -242,15 +243,13 @@ Terms: [@-- $terms --@]\\ $OUT .= '\FSdesc{' . $line->{'ref'} . '}{' . $line->{'description'} . '}' . '{' . $line->{'amount'} . "}${rowbreak}\n"; - if (@$ext_description) { - $OUT .= '\multicolumn{1}{l}{\rule{0pt}{1.0ex}} &'; - $OUT .= '\multicolumn{2}{l}{\small{\begin{tabular}{llllll}';#cheating at 6 - foreach my $ext_desc (@$ext_description) { + foreach my $ext_desc (@$ext_description) { + if ( $ext_desc !~ /[^\\]&/ ) { $ext_desc = substr($ext_desc, 0, 80) . '...' if (length($ext_desc) > 80); - $OUT .= "$ext_desc \\\\${rowbreak}\n"; + $ext_desc = '\small{'. $ext_desc. '}'; } - $OUT .="\\end{tabular}}}\\\\${rowbreak}\n"; + $OUT .= '\FSextdesc{' . $ext_desc . '}' . "${rowbreak}\n"; } } -- 2.11.0