diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-01-24 18:13:02 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-01-24 18:13:02 -0800 |
commit | a794f08248abbb8d2f0efb617d3e83babdfe0e09 (patch) | |
tree | 73f796fa153182de3cef9a55484ee05a4e29df58 /FS/FS/cust_pay.pm | |
parent | 5bd7552215c77573b07e9775d7d63f70b0a55fd1 (diff) |
select a date when importing payments, RT#27087
Diffstat (limited to 'FS/FS/cust_pay.pm')
-rw-r--r-- | FS/FS/cust_pay.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index ed76559..b7189a8 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -9,6 +9,7 @@ use vars qw( $DEBUG $me $conf @encrypted_fields use Date::Format; use Business::CreditCard; use Text::Template; +use FS::Misc::DateTime qw( parse_datetime ); #for batch_import use FS::Record qw( dbh qsearch qsearchs ); use FS::CurrentUser; use FS::payby; @@ -1091,9 +1092,12 @@ Inserts new payments. sub batch_import { my $param = shift; - my $fh = $param->{filehandle}; + my $fh = $param->{filehandle}; + my $format = $param->{'format'}; + my $agentnum = $param->{agentnum}; - my $format = $param->{'format'}; + my $_date = $param->{_date}; + $_date = parse_datetime($_date) if $_date && $_date =~ /\D/; my $paybatch = $param->{'paybatch'}; # here is the agent virtualization @@ -1144,6 +1148,7 @@ sub batch_import { payby => $payby, paybatch => $paybatch, ); + $cust_pay{_date} = $_date if $_date; my $cust_main; foreach my $field ( @fields ) { |