From ee3fc5b946e538ac7b51a6c92ea8eac205b9fda3 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Mon, 30 Jul 2018 12:37:52 -0400 Subject: [PATCH] RT# 80898 - added config option to allow for the changing of the name for credit card surcharge on invoice. --- FS/FS/Conf.pm | 8 ++++++++ FS/FS/cust_main/Billing_Realtime.pm | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index bd544c944..302bae72c 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -789,6 +789,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' => 'invoicing', 'description' => 'Generate a line item on an invoice even when a package is discounted 100%', diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index f4d87ddd1..d286f635e 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -1078,9 +1078,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, }); -- 2.11.0