X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=cf8de2f133b692b889b3868fea26ce0136169476;hb=ecb895ccbbf52ed2babc0885c9925022175e33a0;hp=33e72d864b879babb8bcf25ffc5bcec9b362f7c6;hpb=f38abb144955686f880a528ed6fe4c9c5453517b;p=freeside.git
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index 33e72d864..cf8de2f13 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -98,11 +98,13 @@ if ( $custnum && ! $conf->exists('editreferrals') ) {
print qq!!;
} else {
my(@referrals) = qsearch('part_referral',{});
- if ( scalar(@referrals) == 1 ) {
+ if ( scalar(@referrals) == 0 ) {
+ die "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.cgi and create one or more advertising sources.";
+ } elsif ( scalar(@referrals) == 1 ) {
$refnum ||= $referrals[0]->refnum;
print qq!!;
} else {
- print qq!