X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpay_batch%2Fnacha.pm;h=23dda4c1c2eba63c1ed30a58fefb11eb24b671ac;hb=8a16e8aa94e23ad44c0d4d9713ca009913f15b5b;hp=0361304e384a7d1cd2b9213752cd42b6c2546a84;hpb=725118b4ae55c06cefb2d0b2ef41c7addf4a3a97;p=freeside.git diff --git a/FS/FS/pay_batch/nacha.pm b/FS/FS/pay_batch/nacha.pm index 0361304e3..23dda4c1c 100644 --- a/FS/FS/pay_batch/nacha.pm +++ b/FS/FS/pay_batch/nacha.pm @@ -47,7 +47,12 @@ $DEBUG = 0; my $origin = $1; my $company = $conf->config('company_name', $pay_batch->agentnum); - $company = substr(uc($company). (' 'x23), 0, 23); + + my $origin_name = $conf->config('batchconfig-nacha-origin_name') + || $company; + $origin_name = substr(uc($origin_name). (' 'x23), 0, 23); + + $company = substr(uc($company). (' 'x16), 0, 16); my $now = time; @@ -78,7 +83,7 @@ $DEBUG = 0; '10'. #Blocking Factor '1'. #Format code $dest_name. #Immediate Destination Name / 23 char bank name - $company. #Immediate Origin Name / 23 char company name + $origin_name. #Immediate Origin Name / 23 char company name $refcode. "\n". #Reference Code (internal/optional) ### @@ -88,7 +93,7 @@ $DEBUG = 0; '5'. #Record Type Code '225'. #Service Class Code (220 credits only, # 200 mixed debits & credits) - substr($company, 0, 16). #on cust. statements + $company. #on cust. statements (' 'x20 ). #20 char "company internal use if desired" $origin. #Company Identification (Immediate Origin) 'PPD'. #others? @@ -131,8 +136,9 @@ $DEBUG = 0; #XXX paytype should actually be in the batch, but this will do for now #27 checking debit, 37 savings debit - my $transaction_code = ( $cust_main->paytype =~ /savings/i ? '37' : '27' ); + my $transaction_code = ( $cust_pay_batch->paytype =~ /savings/i ? '37' : '27' ); + # not $self->payname? my $cust_name = substr($cust_main->name. (' 'x22), 0, 22); $i++; my $tracenum = $dest. substr(('0'x7). $i, -6);