summaryrefslogtreecommitdiff
path: root/FS/FS/cust_credit.pm
diff options
context:
space:
mode:
authorjeff <jeff>2009-10-28 19:01:18 +0000
committerjeff <jeff>2009-10-28 19:01:18 +0000
commit2cb70470a8e5c3287146008e4ce2c4eb9f242373 (patch)
treee8d161557d4420f988245f3bf00d25d80b1d73d4 /FS/FS/cust_credit.pm
parent57f5975a062022e280680feed1f692f3e937414b (diff)
UI changes for credit applications include on the fly tax calculations #4729
Diffstat (limited to 'FS/FS/cust_credit.pm')
-rw-r--r--FS/FS/cust_credit.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm
index 6c3effa..fda10de 100644
--- a/FS/FS/cust_credit.pm
+++ b/FS/FS/cust_credit.pm
@@ -306,6 +306,9 @@ sub check {
return "amount must be > 0 " if $self->amount <= 0;
+ return "amount must be greater or equal to amount applied"
+ if $self->unapplied < 0;
+
return "Unknown customer"
unless qsearchs( 'cust_main', { 'custnum' => $self->custnum } );