X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fpayment.cgi;h=6a1fd550b46f02bfd14750af05fc2b4dfd460465;hb=c04ccc32b86d5a05afcb24a6081c4b068d315d40;hp=2f76b85f143e04ce5ac0b2e5002658033fc73c28;hpb=fbba36b298b90d72884e8a46b74e9fd7b67b4d34;p=freeside.git diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 2f76b85f1..6a1fd550b 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -19,9 +19,15 @@ 'num_payments' => scalar($cust_main->cust_pay), 'surcharge_percentage' => ( $payby eq 'CARD' - ? scalar($conf->config('credit-card-surcharge-percentage')) + ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)) : 0 ), + 'surcharge_flatfee' => + ( $payby eq 'CARD' + ? scalar($conf->config('credit-card-surcharge-flatfee', $cust_main->agentnum)) + : 0 + ), + 'processing_fee' => scalar($conf->config('processing-fee', $cust_main->agentnum)), &> % if ( $conf->exists('part_pkg-term_discounts') ) { @@ -37,9 +43,11 @@ % my $payname = $cust_main->first. ' '. $cust_main->getfield('last'); % if ( $cust_main->payby =~ /^(CARD|DCRD)$/ ) { % $payinfo = $cust_main->paymask; -% $paycvv = $cust_main->paycvv; +% ( $paycvv = $cust_main->paycvv ) =~ s/./*/g; % ( $month, $year ) = $cust_main->paydate_monthyear; % $payname = $cust_main->payname if $cust_main->payname; +% } elsif ($disable_payauto_default) { +% $auto = 0; % } @@ -48,13 +56,12 @@ + > - + @@ -135,7 +143,7 @@ % } @@ -228,7 +236,7 @@ @@ -262,6 +270,18 @@ function change_batch_checkbox () { % } +% if ($auto && $disable_payauto_default) { + +% } +
- <% mt('Exp.') |h %> @@ -63,8 +70,7 @@ @@ -107,6 +113,8 @@ % $paystate = $cust_main->getfield('paystate'); % $stateid = $cust_main->getfield('stateid'); % $stateid_state = $cust_main->getfield('stateid_state'); +% } elsif ($disable_payauto_default) { +% $auto = 0; % } % % #false laziness w/{edit,view}/cust_main/billing.html @@ -120,14 +128,14 @@
<% mt('Account number') |h %>> <% mt('Type') |h %>
<% mt($routing_label) |h %> - + > (<% mt('help') |h %>)
<% mt('Branch number') |h %> - + >
- payby ne 'DCRD' ) || ( $payby eq 'CHEK' && $cust_main->payby eq 'CHEK' ) ) ? ' CHECKED' : '' %> NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> + NAME="auto" VALUE="1" onClick="if (this.checked) { document.OneTrueForm.save.checked=true; }"> <% mt("Charge future payments to this [_1] automatically",$type{$payby}) |h %>

@@ -299,6 +319,10 @@ my $payinfo = ''; my $conf = new FS::Conf; +my $auto = ( ( $payby eq 'CARD' && $cust_main->payby ne 'DCRD' ) || ( $payby eq 'CHEK' && $cust_main->payby eq 'CHEK' ) ) ? 1 : 0; +my $disable_payauto_default = $conf->exists('disable_payauto_default'); +my $possibly_uncheck_auto = ' ONCHANGE="possibly_uncheck_auto()"'; + #false laziness w/selfservice make_payment.html shortcut for one-country my %states = map { $_->state => 1 } qsearch('cust_main_county', {