From: ivan Date: Tue, 23 Dec 2008 00:52:03 +0000 (+0000) Subject: truncate package descriptions over 50 chars to avoid pushing the total column out... X-Git-Tag: freeside_1_7_4rc1~131 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=1c362a870ba9338b94c4b81694c2e67887b78cd6;p=freeside.git truncate package descriptions over 50 chars to avoid pushing the total column out to the right, RT#4449 --- diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 1dbfe542b..c79141738 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1930,7 +1930,7 @@ sub print_latex { !~ /^%%EndDetail\s*$/ ) { push @line_item, $line_item_line; } - foreach my $line_item ( $self->_items ) { + foreach my $line_item ( $self->_items ) { #( 'format'=>'latex' ) ) { #foreach my $line_item ( $self->_items_pkg ) { $invoice_data{'ref'} = $line_item->{'pkgnum'}; $invoice_data{'description'} = @@ -2548,6 +2548,8 @@ sub _items_cust_bill_pkg { my $cust_pkg = $cust_bill_pkg->cust_pkg; my $desc = $cust_bill_pkg->desc; + $desc = substr($desc, 0, 50). '...' + if $format eq 'latex' && length($desc) > 50; my %details_opt = ( 'format' => $format, 'escape_function' => $escape_function,