From 243ec8f6a0ef59759f1398967faa561a43b1dff5 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 24 Jan 2002 16:58:47 +0000 Subject: [PATCH] rather than == 0 in the ::check's .... you might consider <= 0 --- FS/FS/cust_bill_pay.pm | 4 ++-- FS/FS/cust_credit.pm | 4 ++-- FS/FS/cust_credit_bill.pm | 4 ++-- FS/FS/cust_credit_refund.pm | 4 ++-- FS/FS/cust_pay.pm | 4 ++-- FS/FS/cust_refund.pm | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/FS/FS/cust_bill_pay.pm b/FS/FS/cust_bill_pay.pm index 2b0105139..1c838b932 100644 --- a/FS/FS/cust_bill_pay.pm +++ b/FS/FS/cust_bill_pay.pm @@ -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 diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm index 278e6dedd..3044af7ea 100644 --- a/FS/FS/cust_credit.pm +++ b/FS/FS/cust_credit.pm @@ -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 diff --git a/FS/FS/cust_credit_bill.pm b/FS/FS/cust_credit_bill.pm index 8f992b580..62215419c 100644 --- a/FS/FS/cust_credit_bill.pm +++ b/FS/FS/cust_credit_bill.pm @@ -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 diff --git a/FS/FS/cust_credit_refund.pm b/FS/FS/cust_credit_refund.pm index 83f6e2f75..7079d28e9 100644 --- a/FS/FS/cust_credit_refund.pm +++ b/FS/FS/cust_credit_refund.pm @@ -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 diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 00c6e1cfe..8f790a61a 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -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 diff --git a/FS/FS/cust_refund.pm b/FS/FS/cust_refund.pm index a1d1e594c..2f7b3af4f 100644 --- a/FS/FS/cust_refund.pm +++ b/FS/FS/cust_refund.pm @@ -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 -- 2.11.0