[freeside-commits] freeside/FS/FS part_export.pm, 1.108, 1.109 part_svc.pm, 1.44, 1.45

Mark Wells mark at wavetail.420.am
Thu Oct 27 23:44:28 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv11855/FS/FS

Modified Files:
	part_export.pm part_svc.pm 
Log Message:
run exports in weight order, #14924

Index: part_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_svc.pm,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -w -d -r1.44 -r1.45
--- part_svc.pm	22 Sep 2011 21:41:46 -0000	1.44
+++ part_svc.pm	28 Oct 2011 06:44:26 -0000	1.45
@@ -434,6 +434,7 @@
   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 } );
 }

Index: part_export.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export.pm,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -w -d -r1.108 -r1.109
--- part_export.pm	1 Jul 2011 06:54:02 -0000	1.108
+++ part_export.pm	28 Oct 2011 06:44:26 -0000	1.109
@@ -401,6 +401,18 @@
 
 =cut
 
+=item weight
+
+Returns the 'weight' element from the export's %info hash, or 0 if there is 
+no weight defined.
+
+=cut
+
+sub weight {
+  my $self = shift;
+  export_info()->{$self->exporttype}->{'weight'} || 0;
+}
+
 =back
 
 =head1 SUBROUTINES



More information about the freeside-commits mailing list