properly quote password as well as finger
[freeside.git] / FS / FS / cust_main.pm
index 6edb6ae..eb468d9 100644 (file)
@@ -1742,7 +1742,7 @@ the error, otherwise returns false.
 =cut
 
 sub charge {
-  my ( $self, $amount ) = @_;
+  my ( $self, $amount ) = ( shift, shift );
   my $pkg      = @_ ? shift : 'One-time charge';
   my $comment  = @_ ? shift : '$'. sprintf("%.2f",$amount);
   my $taxclass = @_ ? shift : '';
@@ -1809,7 +1809,8 @@ Returns all the invoices (see L<FS::cust_bill>) for this customer.
 
 sub cust_bill {
   my $self = shift;
-  qsearch('cust_bill', { 'custnum' => $self->custnum, } )
+  sort { $a->_date <=> $b->_date }
+    qsearch('cust_bill', { 'custnum' => $self->custnum, } )
 }
 
 =item open_cust_bill