diff options
author | Ivan Kohler <ivan@freeside.biz> | 2016-01-26 10:46:58 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2016-01-26 10:46:58 -0800 |
commit | 7e89a2aacd07ca6ebe4c5fd2569f3b734e58726a (patch) | |
tree | f2655401cf4e1f78a5a7d7c1d601d041e59f12d0 | |
parent | 7a331ae6d41521b99a542741c3c92f5edd4ea336 (diff) |
import customers with echeck payment info, RT#39863
-rw-r--r-- | FS/FS/cust_main/Import.pm | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/FS/FS/cust_main/Import.pm b/FS/FS/cust_main/Import.pm index 0fd34eeab..b19fb3145 100644 --- a/FS/FS/cust_main/Import.pm +++ b/FS/FS/cust_main/Import.pm @@ -403,11 +403,23 @@ sub batch_import { } if ( defined $cust_main{'payinfo'} && length $cust_main{'payinfo'} ) { - $cust_main{'payby'} = 'CARD'; - if ($cust_main{'payinfo'} =~ /\s*([AD]?)(.*)\s*$/) { - $cust_main{'payby'} = 'DCRD' if $1 eq 'D'; - $cust_main{'payinfo'} = $2; + + if ( $cust_main{'payinfo'} =~ /^\s*(\d+\@[\d\.]+)\s*$/ ) { + + $cust_main{'payby'} = 'CHEK'; + $cust_main{'payinfo'} = $1; + + } else { + + $cust_main{'payby'} = 'CARD'; + + if ($cust_main{'payinfo'} =~ /^\s*([AD]?)(.*)\s*$/) { + $cust_main{'payby'} = 'DCRD' if $1 eq 'D'; + $cust_main{'payinfo'} = $2; + } + } + } $cust_main{$_} = parse_datetime($cust_main{$_}) |