X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=6967a1e1b38afad3697e5ef21ddf1bef97d62f90;hb=abb18df8aeb27dc49817045e217c61ba6c990ad6;hp=cc692dd88a7111a5223bc691a3d1c4dd76933503;hpb=14655eb7b88692104732988ee9aab14a855ff752;p=freeside.git diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index cc692dd88..6967a1e1b 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -1,5 +1,5 @@ <% -# +# use vars qw( $cgi $custnum $action $cust_main $p1 @agents $agentnum $last $first $ss $company $address1 $address2 $city $zip @@ -133,19 +133,21 @@ if ( $custnum && ! $conf->exists('editreferrals') ) { #referring customer -print qq!

Referring Customer: !; +#print qq!

Referring Customer: !; if ( $cust_main->referral_custnum ) { my $referring_cust_main = qsearchs('cust_main', { custnum => $cust_main->referral_custnum } ); - print 'referral_custnum. '">'. $cust_main->referral_custnum. ': '. ( $referring_cust_main->company || $referring_cust_main->last. ', '. $referring_cust_main->first ). ''; +} elsif ( ! $conf->exists('disable_customer_referrals') ) { + print '

Referring customer number: '; } else { - print '(none)'; + print ''; } # contact info @@ -183,10 +185,10 @@ $cust_main->country( $countrydefault ) unless $cust_main->country; $cust_main->state( $conf->config('statedefault') || 'CA' ) unless $cust_main->state || $cust_main->country ne 'US'; foreach ( sort { - $a->country eq $countrydefault <=> $b->country eq $countrydefault - or $a->country cmp $b->country - or $a->state cmp $b->state - or $a->county cmp $b->county + ( $b->country eq $countrydefault ) <=> ( $a->country eq $countrydefault ) + or $a->country cmp $b->country + or $a->state cmp $b->state + or $a->county cmp $b->county } qsearch('cust_main_county',{}) ) { print "state eq $_->state @@ -345,7 +347,8 @@ print qq!>Tax Exempt!; print qq!invoicing_list; print qq! CHECKED! - if ! @invoicing_list || grep { $_ eq 'POST' } @invoicing_list; + if ( ! @invoicing_list && ! $conf->exists('disablepostalinvoicedefault') ) + || grep { $_ eq 'POST' } @invoicing_list; print qq!>Postal mail invoice!; $invoicing_list = join(', ', grep { $_ ne 'POST' } @invoicing_list ); print qq!Email invoice !; @@ -433,11 +436,13 @@ unless ( $custnum ) { #$ulen = $svc_acct->dbdef_table->column('username')->length; $ulen = dbdef->table('svc_acct')->column('username')->length; $ulen2 = $ulen+2; + my $passwordmax = $conf->config('passwordmax') || 8; + my $pmax2 = $passwordmax + 2; print <Username Password - + (blank to generate) END