From 2aa22dcacc8523311ebe32e4f8c077a227bc0dbb Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 6 Apr 1999 11:16:16 +0000 Subject: [PATCH] give a meaningful error message if you try to create a customer before you've created an agent --- htdocs/edit/cust_main.cgi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/htdocs/edit/cust_main.cgi b/htdocs/edit/cust_main.cgi index 901923d98..233fff2a2 100755 --- a/htdocs/edit/cust_main.cgi +++ b/htdocs/edit/cust_main.cgi @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: cust_main.cgi,v 1.11 1999-03-25 13:55:10 ivan Exp $ +# $Id: cust_main.cgi,v 1.12 1999-04-06 11:16:16 ivan Exp $ # # Usage: cust_main.cgi custnum # http://server.name/path/cust_main.cgi?custnum @@ -38,7 +38,11 @@ # fixed one missed day->daytime ivan@sisd.com 98-jul-13 # # $Log: cust_main.cgi,v $ -# Revision 1.11 1999-03-25 13:55:10 ivan +# Revision 1.12 1999-04-06 11:16:16 ivan +# give a meaningful error message if you try to create a customer before you've +# created an agent +# +# Revision 1.11 1999/03/25 13:55:10 ivan # one-screen new customer entry (including package and service) for simple # packages with one svc_acct service # @@ -152,6 +156,7 @@ print qq!
!, $r = qq!*!; @agents = qsearch( 'agent', {} ); +die "No agents created!" unless @agents; $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first if ( scalar(@agents) == 1 ) { print qq!!; -- 2.11.0