diff options
author | ivan <ivan> | 2008-12-23 00:32:29 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-12-23 00:32:29 +0000 |
commit | 37b7af5d150bb1a4656dc191daf768519203eddd (patch) | |
tree | d97ccfe1bf2c210971d92f25979d990039e37fc4 | |
parent | 442cb5be5190c0639e3afebcf99c90d9f31af7f9 (diff) |
truncate package descriptions over 50 chars to avoid pushing the total column out to the right, RT#4449
-rw-r--r-- | FS/FS/cust_bill.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index c36023de0..7504f6b0a 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2712,11 +2712,8 @@ sub _items_previous { sub _items_pkg { my $self = shift; - my %options = @_; - my $section = $options{'section'}; - my $desc = $section->{'description'}; my @cust_bill_pkg = grep { $_->pkgnum } $self->cust_bill_pkg; - $self->_items_cust_bill_pkg(\@cust_bill_pkg, %options); + $self->_items_cust_bill_pkg(\@cust_bill_pkg, @_); } sub _taxsort { @@ -2761,6 +2758,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, |