X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_pay.pm;h=d2de5f80a05938e474de72c17c06932fcf308ffd;hb=360d113520c4ecf8c8cfdd731ad0a1d4bb06f18d;hp=fae94c3d39ecb097cd73741e02ad19e89c795066;hpb=65d6c927e8062a04ec262a241ed39f945f998ee9;p=freeside.git diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index fae94c3d3..d2de5f80a 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -1179,8 +1179,6 @@ sub process_upgrade_paybatch { sub process_batch_import { my $job = shift; - #agent_custid isn't a cust_pay field, see hash callback - my $format = [ qw(custnum agent_custid paid payinfo invnum) ]; my $hashcb = sub { my %hash = @_; my $custnum = $hash{'custnum'}; @@ -1234,19 +1232,11 @@ sub process_batch_import { my $opt = { 'table' => 'cust_pay', 'params' => [ '_date', 'agentnum', 'payby', 'paybatch' ], - 'formats' => { - 'simple-csv' => $format, - 'simple-xls' => $format, - }, - 'format_types' => { - 'simple-csv' => 'csv', - 'simple-xls' => 'xls', - }, - 'default_csv' => 1, - 'format_hash_callbacks' => { - 'simple-csv' => $hashcb, - 'simple-xls' => $hashcb, - }, + #agent_custid isn't a cust_pay field, see hash callback + 'formats' => { 'simple' => [ qw(custnum agent_custid paid payinfo invnum) ] }, + 'format_types' => { 'simple' => '' }, #force infer from file extension + 'default_csv' => 1, #if it's not .xls, it'll read as csv, regardless of extension + 'format_hash_callbacks' => { 'simple' => $hashcb }, 'postinsert_callback' => sub { my $cust_pay = shift; my $cust_main = $cust_pay->cust_main ||