ensure invoice line items are delivered in line number order
authorjeff <jeff>
Thu, 24 Jul 2008 16:40:31 +0000 (16:40 +0000)
committerjeff <jeff>
Thu, 24 Jul 2008 16:40:31 +0000 (16:40 +0000)
FS/FS/cust_bill.pm

index 8cc39ad..5269217 100644 (file)
@@ -226,7 +226,12 @@ Returns the line items (see L<FS::cust_bill_pkg>) for this invoice.
 
 sub cust_bill_pkg {
   my $self = shift;
-  qsearch( 'cust_bill_pkg', { 'invnum' => $self->invnum } );
+  qsearch(
+    { 'table'    => 'cust_bill_pkg',
+      'hashref'  => { 'invnum' => $self->invnum },
+      'order_by' => 'ORDER BY billpkgnum',
+    }
+  );
 }
 
 =item cust_pkg