diff options
author | ivan <ivan> | 2002-05-09 12:38:40 +0000 |
---|---|---|
committer | ivan <ivan> | 2002-05-09 12:38:40 +0000 |
commit | a63b2729682586d8860290576e9307629424dbe0 (patch) | |
tree | fafe65115572dab6a4e0e513edadda21368a1580 /httemplate/edit/cust_main.cgi | |
parent | e324bf00eaee9bd13702348b777642d7096b88a0 (diff) |
texas tax!
Diffstat (limited to 'httemplate/edit/cust_main.cgi')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 33e72d864..e92abefd7 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -98,7 +98,9 @@ if ( $custnum && ! $conf->exists('editreferrals') ) { print qq!<INPUT TYPE="hidden" NAME="refnum" VALUE="$refnum">!; } 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!<INPUT TYPE="hidden" NAME="refnum" VALUE="$refnum">!; } else { |