X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=d3251c2b9a8797f9abd04b1afe491f0d95e07e23;hb=5e25b996982d42eb2587ec54db0d5b39508aa730;hp=47e18d789f3e6aa8ec49829cf9868786ce19ac7f;hpb=aa7b51c0794f6a61e522fbba978f6c64446d8696;p=freeside.git diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 47e18d789..d3251c2b9 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 @@ -22,7 +22,7 @@ use FS::cust_main_county; #for misplaced logic below use FS::part_pkg; - #for false laziness below + #for false laziness below (now more properly lazy) use FS::svc_acct_pop; #for (other) false laziness below @@ -74,13 +74,13 @@ $action = $custnum ? 'Edit' : 'Add'; # top $p1 = popurl(1); -print $cgi->header( '-expires' => 'now' ), header("Customer $action", ''); +print header("Customer $action", ''); print qq!Error: !, $error, "" if $error; print qq!
!, qq!!, - qq!Customer # !, ( $custnum ? $custnum : " (NEW)" ), + qq!Customer # !, ( $custnum ? "$custnum" : " (NEW)" ), ; @@ -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 @@ -178,11 +180,16 @@ print <${r}City${r}State/Countryinvoicing_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 !; @@ -356,12 +364,12 @@ print "Billing type", %payby = ( 'CARD' => qq!Credit card
${r}
${r}Exp !. expselect("CARD"). qq!
${r}Name on card
!, - 'BILL' => qq!Billing
P.O.
${r}Exp !. expselect("BILL", "12-2037"). qq!
${r}Attention
!, + 'BILL' => qq!Billing
P.O.
${r}Exp !. expselect("BILL", "12-2037"). qq!
Attention
!, 'COMP' => qq!Complimentary
${r}Approved by
${r}Exp !. expselect("COMP"), ); %paybychecked = ( 'CARD' => qq!Credit card
${r}
${r}Exp !. expselect("CARD", $cust_main->paydate). qq!
${r}Name on card
!, - 'BILL' => qq!Billing
P.O.
${r}Exp !. expselect("BILL", $cust_main->paydate). qq!
${r}Attention
!, + 'BILL' => qq!Billing
P.O.
${r}Exp !. expselect("BILL", $cust_main->paydate). qq!
Attention
!, 'COMP' => qq!Complimentary
${r}Approved by
${r}Exp !. expselect("COMP", $cust_main->paydate), ); for (qw(CARD BILL COMP)) { @@ -404,10 +412,12 @@ unless ( $custnum ) { #eslaf my @part_pkg = grep { $_->svcpart('svc_acct') && $pkgpart->{ $_->pkgpart } } - qsearch( 'part_pkg', {} ); + qsearch( 'part_pkg', { 'disabled' => '' } ); if ( @part_pkg ) { +# print "

First package", &itable("#cccccc", "0 ALIGN=LEFT"), +#apiabuse & undesirable wrapping print "

First package", &itable("#cccccc"), qq! Password - + (blank to generate) END - print qq!POP"; + + print 'Access number' + . + &FS::svc_acct_pop::popselector($popnum). + '' + ; } } $otaker = $cust_main->otaker; print qq!!, - qq!

!, "", ;