add config option to disable auto-application of credits to invoices, RT12331
authorlevinse <levinse>
Wed, 13 Apr 2011 04:24:55 +0000 (04:24 +0000)
committerlevinse <levinse>
Wed, 13 Apr 2011 04:24:55 +0000 (04:24 +0000)
FS/FS/Conf.pm
httemplate/edit/cust_credit.cgi

index 3595db6..c7bcb28 100644 (file)
@@ -653,6 +653,13 @@ my %payment_gateway_options = (
     'description' => 'IP address to assign to new virtual hosts',
     'type'        => 'text',
   },
+  
+  {
+    'key'         => 'credits-auto-apply-disable',
+    'section'     => 'billing',
+    'description' => 'Disable the "Auto-Apply to invoices" UI option for new credits',
+    'type'        => 'checkbox',
+  },
 
   {
     'key'         => 'discount-show-always',
index dc80847..892637a 100755 (executable)
       <INPUT TYPE="text" NAME="addlinfo" VALUE="<% $cgi->param('addlinfo') |h %>">
     </TD>
 
+% if ( $conf->exists('credits-auto-apply-disable') ) {
+        <INPUT TYPE="HIDDEN" NAME="apply" VALUE="no">
+% } else {
   <TR>
     <TD ALIGN="right">Auto-apply<BR>to invoices</TD>
     <TD><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED>yes<OPTION>no</SELECT></TD>
   </TR>
+% }
 
 % if ( $conf->exists('pkg-balances') ) {
   <% include('/elements/tr-select-cust_pkg-balances.html',