From 1c362a870ba9338b94c4b81694c2e67887b78cd6 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 23 Dec 2008 00:52:03 +0000 Subject: [PATCH] truncate package descriptions over 50 chars to avoid pushing the total column out to the right, RT#4449 --- FS/FS/cust_bill.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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, -- 2.20.1