fix overage billing with multiple exports? RT#19595
authorIvan Kohler <ivan@freeside.biz>
Thu, 11 Oct 2012 22:57:40 +0000 (15:57 -0700)
committerIvan Kohler <ivan@freeside.biz>
Thu, 11 Oct 2012 22:57:40 +0000 (15:57 -0700)
FS/FS/part_svc.pm

index 2f79f51..8a6633e 100644 (file)
@@ -437,9 +437,10 @@ sub part_export {
   my $self = shift;
   my %search;
   $search{'exporttype'} = shift if @_;
-  sort { $a->weight <=> $b->weight }
-  map { qsearchs('part_export', { 'exportnum' => $_->exportnum, %search } ) }
-    qsearch('export_svc', { 'svcpart' => $self->svcpart } );
+  map { $_ } #behavior of sort undefined in scalar context
+    sort { $a->weight <=> $b->weight }
+      map { qsearchs('part_export', { 'exportnum'=>$_->exportnum, %search } ) }
+        qsearch('export_svc', { 'svcpart'=>$self->svcpart } );
 }
 
 =item part_export_usage