RT# 80898 - added config option to allow for the changing of the name for credit...
authorChristopher Burger <burgerc@freeside.biz>
Mon, 30 Jul 2018 16:37:52 +0000 (12:37 -0400)
committerChristopher Burger <burgerc@freeside.biz>
Mon, 30 Jul 2018 18:12:24 +0000 (14:12 -0400)
FS/FS/Conf.pm
FS/FS/cust_main/Billing_Realtime.pm

index d2351c0..f916924 100644 (file)
@@ -895,6 +895,14 @@ my $validate_email = sub { $_[0] =~
   },
 
   {
+    'key'         => 'credit-card-surcharge-text',
+    'section'     => 'credit_cards',
+    'description' => 'Text for the credit card surcharge invoice line.  If not set, it will default to Credit Card Surcharge.',
+    'type'        => 'text',
+    'per_agent'   => 1,
+  },
+
+  {
     'key'         => 'discount-show-always',
     'section'     => 'billing',
     'description' => 'Generate a line item on an invoice even when a package is discounted 100%',
index c503b45..611af5d 100644 (file)
@@ -1005,9 +1005,11 @@ sub _realtime_bop_result {
          }
 
          my $cust_pkg;
+    my $cc_surcharge_text = 'Credit Card Surcharge';
+    $cc_surcharge_text = $conf->config('credit-card-surcharge-text', $self->agentnum) if $conf->exists('credit-card-surcharge-text', $self->agentnum);
          my $charge_error = $self->charge({
                                    'amount'    => $options{'cc_surcharge'},
-                                   'pkg'       => 'Credit Card Surcharge',
+                                   'pkg'       => $cc_surcharge_text,
                                    'setuptax'  => 'Y',
                                    'cust_pkg_ref' => \$cust_pkg,
                                });