X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_credit.pm;h=fda10decf7454d90bb13add88830845ba5473e85;hb=016ffd08546c5d05b8e7b115db72ed137da4d087;hp=6c3effa13ac2649ab0ae32ab25049ee0d199d006;hpb=4396080ed2829ae0595f1fd777f39d090c9bcd7c;p=freeside.git diff --git a/FS/FS/cust_credit.pm b/FS/FS/cust_credit.pm index 6c3effa13..fda10decf 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 } );