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

index 7f22411..c471771 100644 (file)
@@ -441,9 +441,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