diff options
author | ivan <ivan> | 2003-04-24 23:02:16 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-04-24 23:02:16 +0000 |
commit | 7d0dbc7da5c736da8989b9aeb2e8911fa16462a9 (patch) | |
tree | 43fc245a50e843a5084b024934f6428146377d6c /httemplate/edit | |
parent | cc6317796afe74fd6dcbc4712abfcb09ff199598 (diff) |
fix for bug triggered by nonexistant referring customer numbers
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index d8edbcd8e..2b7d8d0dc 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -124,9 +124,11 @@ if ( $custnum && ! $conf->exists('editreferrals') ) { #referring customer #print qq!<BR><BR>Referring Customer: !; -if ( $cust_main->referral_custnum ) { - my $referring_cust_main = - qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ); +my $referring_cust_main = ''; +if ( $cust_main->referral_custnum + and $referring_cust_main = + qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ) +) { print '<BR><BR>Referring Customer: <A HREF="'. popurl(1). '/cust_main.cgi?'. $cust_main->referral_custnum. '">'. $cust_main->referral_custnum. ': '. |