<rluser> rather than == 0 in the ::check's ....
authorivan <ivan>
Thu, 24 Jan 2002 16:58:47 +0000 (16:58 +0000)
committerivan <ivan>
Thu, 24 Jan 2002 16:58:47 +0000 (16:58 +0000)
<rluser> you might consider <= 0

FS/FS/cust_bill_pay.pm
FS/FS/cust_credit.pm
FS/FS/cust_credit_bill.pm
FS/FS/cust_credit_refund.pm
FS/FS/cust_pay.pm
FS/FS/cust_refund.pm

index 2b01051..1c838b9 100644 (file)
@@ -162,7 +162,7 @@ sub check {
   ;
   return $error if $error;
 
-  return "amount must be > 0" if $self->amount == 0;
+  return "amount must be > 0" if $self->amount <= 0;
 
   $self->_date(time) unless $self->_date;
 
@@ -195,7 +195,7 @@ sub cust_bill {
 
 =head1 VERSION
 
-$Id: cust_bill_pay.pm,v 1.10 2001-12-21 20:55:35 ivan Exp $
+$Id: cust_bill_pay.pm,v 1.11 2002-01-24 16:58:47 ivan Exp $
 
 =head1 BUGS
 
index 278e6de..3044af7 100644 (file)
@@ -160,7 +160,7 @@ sub check {
   ;
   return $error if $error;
 
-  return "amount must be > 0 " if $self->amount == 0;
+  return "amount must be > 0 " if $self->amount <= 0;
 
   return "Unknown customer"
     unless qsearchs( 'cust_main', { 'custnum' => $self->custnum } );
@@ -237,7 +237,7 @@ sub credited {
 
 =head1 VERSION
 
-$Id: cust_credit.pm,v 1.13 2002-01-22 15:57:33 ivan Exp $
+$Id: cust_credit.pm,v 1.14 2002-01-24 16:58:47 ivan Exp $
 
 =head1 BUGS
 
index 8f992b5..6221541 100644 (file)
@@ -109,7 +109,7 @@ sub check {
   ;
   return $error if $error;
 
-  return "amount must be > 0" if $self->amount == 0;
+  return "amount must be > 0" if $self->amount <= 0;
 
   return "Unknown credit"
     unless my $cust_credit = 
@@ -145,7 +145,7 @@ sub cust_credit {
 
 =head1 VERSION
 
-$Id: cust_credit_bill.pm,v 1.6 2001-09-26 09:17:06 ivan Exp $
+$Id: cust_credit_bill.pm,v 1.7 2002-01-24 16:58:47 ivan Exp $
 
 =head1 BUGS
 
index 83f6e2f..7079d28 100644 (file)
@@ -149,7 +149,7 @@ sub check {
   ;
   return $error if $error;
 
-  return "amount must be > 0" if $self->amount == 0;
+  return "amount must be > 0" if $self->amount <= 0;
 
   $self->_date(time) unless $self->_date;
 
@@ -185,7 +185,7 @@ sub cust_refund {
 
 =head1 VERSION
 
-$Id: cust_credit_refund.pm,v 1.7 2002-01-24 16:54:53 ivan Exp $
+$Id: cust_credit_refund.pm,v 1.8 2002-01-24 16:58:47 ivan Exp $
 
 =head1 BUGS
 
index 00c6e1c..8f790a6 100644 (file)
@@ -240,7 +240,7 @@ sub check {
   ;
   return $error if $error;
 
-  return "paid must be > 0 " if $self->paid == 0;
+  return "paid must be > 0 " if $self->paid <= 0;
 
   return "unknown cust_main.custnum: ". $self->custnum
     unless $self->invnum
@@ -307,7 +307,7 @@ sub unapplied {
 
 =head1 VERSION
 
-$Id: cust_pay.pm,v 1.12 2002-01-24 11:52:02 ivan Exp $
+$Id: cust_pay.pm,v 1.13 2002-01-24 16:58:47 ivan Exp $
 
 =head1 BUGS
 
index a1d1e59..2f7b3af 100644 (file)
@@ -221,7 +221,7 @@ sub check {
   ;
   return $error if $error;
 
-  return "refund must be > 0 " if $self->refund == 0;
+  return "refund must be > 0 " if $self->refund <= 0;
 
   $self->_date(time) unless $self->_date;
 
@@ -261,7 +261,7 @@ sub check {
 
 =head1 VERSION
 
-$Id: cust_refund.pm,v 1.13 2002-01-24 11:52:02 ivan Exp $
+$Id: cust_refund.pm,v 1.14 2002-01-24 16:58:47 ivan Exp $
 
 =head1 BUGS