diff options
author | ivan <ivan> | 2008-10-16 05:29:00 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-10-16 05:29:00 +0000 |
commit | 626dbc1a49b6b1dfba94584670a0a0b11ac52148 (patch) | |
tree | d2d26f5e458c5d10412be8265180ea78d947bad1 /httemplate | |
parent | 1f67114ee822735e096a6dca47f94635a158b9e4 (diff) |
add batch-enable_payby and realtime_disable_payby for better control over hybrid realtime/batch installs; deprecate never-used paymentforcedtobatch, RT#4052
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/misc/payment.cgi | 34 | ||||
-rwxr-xr-x | httemplate/search/cust_pay_batch.cgi | 4 | ||||
-rw-r--r-- | httemplate/view/cust_main/payment_history.html | 2 |
3 files changed, 28 insertions, 12 deletions
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 7546a858a..9aaa45904 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -185,23 +185,37 @@ <INPUT TYPE="checkbox" CHECKED NAME="save" VALUE="1"> Remember this information </TD> -</TR><TR> -% if ($conf->exists("batch-enable")) { - <TD COLSPAN=2> - <INPUT TYPE="checkbox" <% ( $conf->exists("paymentforcedtobatch") && $payby eq 'CHEK' ) ? 'CHECKED DISABLED' : '' %> NAME="batch" VALUE="1"> - Add to current batch -% if ($conf->exists("paymentforcedtobatch") && $payby eq 'CHEK' ) { - <INPUT TYPE="hidden" NAME="batch" VALUE="1"> -% } - </TD> -</TR><TR> +</TR> + +% if ( $conf->exists("batch-enable") +% || grep $payby eq $_, $conf->config('batch-enable_payby') +% ) { +% +% if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) { + + <INPUT TYPE="hidden" NAME="batch" VALUE="1"> + +% } else { + + <TR> + <TD COLSPAN=2> + <INPUT TYPE="checkbox" NAME="batch" VALUE="1"> + Add to current batch + </TD> + </TR> + +% } % } + +<TR> <TD COLSPAN=2> <INPUT TYPE="checkbox"<% ( ( $payby eq 'CARD' && $cust_main->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; }"> Charge future payments to this <% $type{$payby} %> automatically </TD> </TR> + </TABLE> + <BR> <INPUT TYPE="submit" NAME="process" VALUE="Process payment"> </FORM> diff --git a/httemplate/search/cust_pay_batch.cgi b/httemplate/search/cust_pay_batch.cgi index 60dca8cba..157696366 100755 --- a/httemplate/search/cust_pay_batch.cgi +++ b/httemplate/search/cust_pay_batch.cgi @@ -63,7 +63,9 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Financial reports') || $FS::CurrentUser::CurrentUser->access_right('Process batches') || ( $cgi->param('custnum') - && $conf->exists('batch-enable') + && ( $conf->exists('batch-enable') + || $conf->config('batch-enable_payby') + ) #&& $FS::CurrentUser::CurrentUser->access_right('View customer batched payments') ); diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html index bc01d6834..c3a9019c6 100644 --- a/httemplate/view/cust_main/payment_history.html +++ b/httemplate/view/cust_main/payment_history.html @@ -136,7 +136,7 @@ %# batched payment links -% if ( $conf->exists('batch-enable') +% if ( ( $conf->exists('batch-enable') || $conf->config('batch-enable_payby') ) % && $curuser->access_right('View customer batched payments') % ) { View batched payments: |