From: ivan Date: Thu, 16 Oct 2008 05:35:36 +0000 (+0000) Subject: add batch-enable_payby and realtime_disable_payby for better control over hybrid... X-Git-Tag: freeside_1_7_4rc1~157 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=e6933999c7934c9c856c027e8f0b913c6fcb223e;p=freeside.git add batch-enable_payby and realtime_disable_payby for better control over hybrid realtime/batch installs; deprecate never-used paymentforcedtobatch, RT#4052 --- diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index a0378c5b7..887ae06d3 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -1556,8 +1556,8 @@ worry that config_items is freeside-specific and icky. { 'key' => 'paymentforcedtobatch', - 'section' => 'UI', - 'description' => 'Causes per customer payment entry to be forced to a batch processor rather than performed realtime.', + 'section' => 'deprecated', + 'description' => 'See batch-enable_payby and realtime-disable_payby. Used to (for CHEK): Cause per customer payment entry to be forced to a batch processor rather than performed realtime.', 'type' => 'checkbox', }, @@ -2037,12 +2037,29 @@ worry that config_items is freeside-specific and icky. { 'key' => 'batch-enable', - 'section' => 'billing', + 'section' => 'deprecated', #make sure batch-enable_payby is set for + #everyone before removing 'description' => 'Enable credit card and/or ACH batching - leave disabled for real-time installations.', 'type' => 'checkbox', }, { + 'key' => 'batch-enable_payby', + 'section' => 'billing', + 'description' => 'Enable batch processing for the specified payment types.', + 'type' => 'selectmultiple', + 'select_enum' => [qw( CARD CHEK )], + }, + + { + 'key' => 'realtime-disable_payby', + 'section' => 'billing', + 'description' => 'Disable realtime processing for the specified payment types.', + 'type' => 'selectmultiple', + 'select_enum' => [qw( CARD CHEK )], + }, + + { 'key' => 'batch-default_format', 'section' => 'billing', 'description' => 'Default format for batches.', @@ -2360,13 +2377,6 @@ worry that config_items is freeside-specific and icky. }, { - 'key' => 'disable_acl_changes', - 'section' => '', - 'description' => 'Disable all ACL changes, for demos.', - 'type' => 'checkbox', - }, - - { 'key' => 'cust_main-edit_agent_custid', 'section' => 'UI', 'description' => 'Enable editing of the agent_custid field.', 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 @@ Remember this information - -% if ($conf->exists("batch-enable")) { - - exists("paymentforcedtobatch") && $payby eq 'CHEK' ) ? 'CHECKED DISABLED' : '' %> NAME="batch" VALUE="1"> - Add to current batch -% if ($conf->exists("paymentforcedtobatch") && $payby eq 'CHEK' ) { - -% } - - + + +% if ( $conf->exists("batch-enable") +% || grep $payby eq $_, $conf->config('batch-enable_payby') +% ) { +% +% if ( grep $payby eq $_, $conf->config('realtime-disable_payby') ) { + + + +% } else { + + + + + Add to current batch + + + +% } % } + + 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 + +
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: