X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main.pm;h=a2dffbaebee4e00550dae92623e0be99c6063e0f;hb=f89dfe02a0471e3b7ddd45d444dd1258e17f9434;hp=51aa4d5d45cceff5fd1512263d16b8b603cd9383;hpb=49f06ef162f67e5856c6160fc7e18e225706722f;p=freeside.git diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 51aa4d5d4..a2dffbaeb 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2614,12 +2614,20 @@ sub realtime_bop { ( $content{account_number}, $content{routing_code} ) = split('@', $payinfo); $content{bank_name} = $o_payname; - $content{bank_state} = $self->getfield('paystate'); - $content{account_type} = uc($self->getfield('paytype')) || 'CHECKING'; + $content{bank_state} = exists($options{'paystate'}) + ? $options{'paystate'} + : $self->getfield('paystate'); + $content{account_type} = exists($options{'paytype'}) + ? uc($options{'paytype'}) || 'CHECKING' + : uc($self->getfield('paytype')) || 'CHECKING'; $content{account_name} = $payname; $content{customer_org} = $self->company ? 'B' : 'I'; - $content{state_id} = $self->getfield('stateid'); - $content{state_id_state} = $self->getfield('stateid_state'); + $content{state_id} = exists($options{'stateid'}) + ? $options{'stateid'} + : $self->getfield('stateid'); + $content{state_id_state} = exists($options{'stateid_state'}) + ? $options{'stateid_state'} + : $self->getfield('stateid_state'); $content{customer_ssn} = exists($options{'ss'}) ? $options{'ss'} : $self->ss;