summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/cust_main.pm6
-rw-r--r--FS/FS/payinfo_Mixin.pm3
3 files changed, 13 insertions, 3 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 633d5c5ee..b3fdfdcf4 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2959,6 +2959,13 @@ and customer address. Include units.',
},
{
+ 'key' => 'echeck-no_routing',
+ 'section' => 'billing',
+ 'description' => 'Disable the routing number entirely for Electronic Check payment info.',
+ 'type' => 'checkbox',
+ },
+
+ {
'key' => 'voip-cust_accountcode_cdr',
'section' => 'telephony',
'description' => 'Enable the per-customer option for CDR breakdown by accountcode.',
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 97b117285..7832ecaf9 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1933,8 +1933,10 @@ sub check {
if ( $conf->exists('cust_main-require-bank-branch') ) {
$payinfo =~ /^(\d+)\@(\d+)\.(\d+)$/ or return 'invalid echeck account@branch.bank';
$payinfo = "$1\@$2.$3";
- }
- elsif ( $conf->exists('echeck-nonus') ) {
+ } elsif ( $conf->exists('echeck-no_routing') ) {
+ $payinfo =~ /^(\d+)\@(\d*)$/ or return 'invalid echeck account';
+ $payinfo = "$1\@$2";
+ } elsif ( $conf->exists('echeck-nonus') ) {
$payinfo =~ /^(\d+)\@(\d+)$/ or return 'invalid echeck account@aba';
$payinfo = "$1\@$2";
} else {
diff --git a/FS/FS/payinfo_Mixin.pm b/FS/FS/payinfo_Mixin.pm
index 84264c966..d03391f68 100644
--- a/FS/FS/payinfo_Mixin.pm
+++ b/FS/FS/payinfo_Mixin.pm
@@ -165,7 +165,8 @@ sub mask_payinfo {
# Checks (Show last 2 @ bank)
my( $account, $aba ) = split('@', $payinfo );
return 'x'x(length($account)-2).
- substr($account,(length($account)-2))."@".$aba;
+ substr($account,(length($account)-2)).
+ ( length($aba) ? "@".$aba : '');
} else { # Tie up loose ends
return $payinfo;