fix disappearing first names, fallout from #32223
authorIvan Kohler <ivan@freeside.biz>
Sun, 22 Feb 2015 23:02:48 +0000 (15:02 -0800)
committerIvan Kohler <ivan@freeside.biz>
Sun, 22 Feb 2015 23:02:48 +0000 (15:02 -0800)
FS/FS/Template_Mixin.pm

index fe484a4..606c6c8 100644 (file)
@@ -7,7 +7,7 @@ use vars qw( $DEBUG $me
            );
              # but NOT $conf
 use vars qw( $invoice_lines @buf ); #yuck
-use List::Util qw(sum first);
+use List::Util qw(sum); #can't import first, it conflicts with cust_main.first
 use Date::Format;
 use Date::Language;
 use Text::Template 1.20;
@@ -1213,7 +1213,8 @@ sub print_generic {
 
   # create a tax section if we don't yet have one
   my $tax_description = 'Taxes, Surcharges, and Fees';
-  my $tax_section = first { $_->{description} eq $tax_description } @sections;
+  my $tax_section =
+    List::Util::first { $_->{description} eq $tax_description } @sections;
   if (!$tax_section) {
     $tax_section = { 'description' => $tax_description };
     push @sections, $tax_section if $multisection;