X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=conf%2Finvoice_latex;h=c7c696b5d33257c880a32d6b3ccfbf0509e49272;hp=99d12d5c722225088c49da3fb153993f73163345;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hpb=014e2c547f63bcd283eac4d0210a7976ca5fcb90 diff --git a/conf/invoice_latex b/conf/invoice_latex index 99d12d5c7..c7c696b5d 100644 --- a/conf/invoice_latex +++ b/conf/invoice_latex @@ -23,6 +23,19 @@ \usepackage{graphicx} % required for logo graphic \usepackage[utf8]{inputenc} % multilanguage support \usepackage[T1]{fontenc} +[@-- if ( length($watermark) ) { + $OUT .= ' +\usepackage{background} +\backgroundsetup{ + placement=center, + opacity=0.25, + color=black, + angle=0, + contents=' . $watermark . ' +}'; +} +''; +--@] \addtolength{\voffset}{-0.0cm} % top margin to top of header \addtolength{\hoffset}{-0.6cm} % left margin on page @@ -176,7 +189,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') --@]}} \\ @@ -327,12 +340,12 @@ # Don't break-up small packages. my $rowbreak = @$ext_description < 5 ? '*' : ''; - $OUT .= "\\hline\n" if ($line->{'ref'} && $line->{'ref'} ne $lastref); + $OUT .= "\\hline\n" if (($line->{'ref'} || 0) ne $lastref); if ($section->{description_generator}) { $OUT .= &{$section->{description_generator}}($line); } else { $OUT .= '\FSdesc'. - '{' . ( $line->{'ref'} ne $lastref ? $line->{'ref'} : '' ) . '}'. + '{}'. '{' . $line->{'description'} . '}' ; if ( $unitprices and length($line->{'unit_amount'}) ) { # then show the unit amount and quantity @@ -345,7 +358,7 @@ } $OUT .= '{\\dollar' . $line->{'amount'} . "}${rowbreak}\n"; } - $lastref = $line->{'ref'}; + $lastref = $line->{'ref'} || 0; foreach my $ext_desc (@$ext_description) { if ($section->{extended_description_generator}) {