trim invoice line items to 40 chars to avoid messing up typesetting, even with quanti...
authorIvan Kohler <ivan@freeside.biz>
Mon, 16 Mar 2015 01:45:05 +0000 (18:45 -0700)
committerIvan Kohler <ivan@freeside.biz>
Mon, 16 Mar 2015 01:45:05 +0000 (18:45 -0700)
FS/FS/Template_Mixin.pm
FS/FS/cust_bill.pm

index a5fb557..59899cf 100644 (file)
@@ -1370,7 +1370,7 @@ sub print_generic {
       # credits
       my $credittotal = 0;
       foreach my $credit (
-        $self->_items_credits( 'template' => $template, 'trim_len' => 50 )
+        $self->_items_credits( 'template' => $template, 'trim_len' => 40 )
       ) {
 
         my $total;
@@ -3009,7 +3009,7 @@ sub _items_cust_bill_pkg {
   my $multisection = defined($category) || defined($locationnum);
   my $discount_show_always = 0;
 
-  my $maxlength = $conf->config('cust_bill-latex_lineitem_maxlength') || 50;
+  my $maxlength = $conf->config('cust_bill-latex_lineitem_maxlength') || 40;
 
   my $cust_main = $self->cust_main;#for per-agent cust_bill-line_item-ate_style
 
index 5cdae66..137985a 100644 (file)
@@ -2165,7 +2165,7 @@ sub _items_extra_usage_sections {
   my %classnums = ();
   my %lines = ();
 
-  my $maxlength = $conf->config('cust_bill-latex_lineitem_maxlength') || 50;
+  my $maxlength = $conf->config('cust_bill-latex_lineitem_maxlength') || 40;
 
   my %usage_class =  map { $_->classnum => $_ } qsearch( 'usage_class', {} );
   foreach my $cust_bill_pkg ( $self->cust_bill_pkg ) {
@@ -2406,7 +2406,7 @@ sub _items_svc_phone_sections {
   my %classnums = ();
   my %lines = ();
 
-  my $maxlength = $conf->config('cust_bill-latex_lineitem_maxlength') || 50;
+  my $maxlength = $conf->config('cust_bill-latex_lineitem_maxlength') || 40;
 
   my %usage_class =  map { $_->classnum => $_ } qsearch( 'usage_class', {} );
   $usage_class{''} ||= new FS::usage_class { 'classname' => '', 'weight' => 0 };
@@ -2705,7 +2705,7 @@ sub _items_previous {
 
 sub _items_credits {
   my( $self, %opt ) = @_;
-  my $trim_len = $opt{'trim_len'} || 50;
+  my $trim_len = $opt{'trim_len'} || 40;
 
   my @b;
   #credits