X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=fb3f0f11129d01a192fa04c9fd58d929ccae3e61;hp=c49efa653f47fd7b6eb67b71dd111eecb98f23a7;hb=c0e55cc3cd861b082b1318829cdd0780fe8b934c;hpb=789c34c5251f4b831a7cb27bd2a9af700ccf2ced diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index c49efa653..fb3f0f111 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -15,6 +15,15 @@ print header("Customer View", menubar( 'Main Menu' => popurl(2) )); +print < +.package TH { font-size: medium } +.package TR { font-size: smaller } +.package .pkgnum { font-size: medium } +.package .provision { font-weight: bold } + +END + die "No customer specified (bad URL)!" unless $cgi->keywords; my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array $query =~ /^(\d+)$/; @@ -22,10 +31,23 @@ my $custnum = $1; my $cust_main = qsearchs('cust_main',{'custnum'=>$custnum}); die "Customer not found!" unless $cust_main; -print qq!Edit this customer!; -print qq! | Delete this customer! +print qq!Edit this customer!; + +print < +function cancel_areyousure(href) { + if (confirm("Perminantly delete all services and cancel this customer?") == true) + window.location.href = href; +} + +END + +print qq! | !. + 'Cancel this customer' + if $cust_main->ncancelled_pkgs; + +print qq! | !. + 'Delete this customer' if $conf->exists('deletecustomers'); unless ( $conf->exists('disable_customer_referrals') ) { @@ -210,10 +232,12 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { 'Billing type', ; - if ( $cust_main->payby eq 'CARD' ) { + if ( $cust_main->payby eq 'CARD' || $cust_main->payby eq 'DCRD' ) { my $payinfo = $cust_main->payinfo; $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4)); - print 'Credit card', + print 'Credit card ', + ( $cust_main->payby eq 'CARD' ? '(automatic)' : '(on-demand)' ), + '', 'Card number', $payinfo, '', 'Expiration', @@ -221,9 +245,11 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { 'Name on card', $cust_main->payname, '' ; - } elsif ( $cust_main->payby eq 'CHEK' ) { + } elsif ( $cust_main->payby eq 'CHEK' || $cust_main->payby eq 'DCHK') { my( $account, $aba ) = split('@', $cust_main->payinfo ); - print 'Electronic check', + print 'Electronic check', + ( $cust_main->payby eq 'CHEK' ? '(automatic)' : '(on-demand)' ), + '', 'Account number', $account, '', 'ABA/Routing code', @@ -264,7 +290,7 @@ if ( $conf->config('payby-default') ne 'HIDE' ) { print ''; if ( defined $cust_main->dbdef_table->column('comments') - && $cust_main->comments ) + && $cust_main->comments =~ /[^\s\n\r]/ ) { print "
Comments". &ntable("#cccccc"). "". &ntable("#cccccc",2). @@ -280,14 +306,14 @@ print '
'. qq!!. '