add pkey to batch payments and fix a doc typo
[freeside.git] / FS / FS / cust_bill_pay.pm
index ac82c54..5ef82d6 100644 (file)
@@ -114,7 +114,7 @@ sub insert {
   if ( $bill_total > $cust_bill->charged ) {
     $dbh->rollback if $oldAutoCommit;
     return "total cust_bill_pay.amount and cust_credit_bill.amount $bill_total".
-           "for invnum ". $self->invnum.
+           " for invnum ". $self->invnum.
            " greater than cust_bill.charged ". $cust_bill->charged;
   }
 
@@ -162,8 +162,9 @@ sub check {
   ;
   return $error if $error;
 
-  $self->_date(time) unless $self->_date;
+  return "amount must be > 0" if $self->amount == 0;
 
+  $self->_date(time) unless $self->_date;
 
   ''; #no error
 }
@@ -194,7 +195,7 @@ sub cust_bill {
 
 =head1 VERSION
 
-$Id: cust_bill_pay.pm,v 1.6 2001-09-02 05:38:13 ivan Exp $
+$Id: cust_bill_pay.pm,v 1.8 2001-09-03 22:07:38 ivan Exp $
 
 =head1 BUGS