From ee4e5a868c08d60e44f0f83fd43e3bebb132b0c6 Mon Sep 17 00:00:00 2001 From: Finn Date: Fri, 12 Jul 2019 16:08:02 +0100 Subject: [PATCH] fixed date on import AGAIN --- lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm b/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm index 4820b73..2f68484 100644 --- a/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm +++ b/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm @@ -49,7 +49,9 @@ sub _row_to_result { time_zone => 'Europe/London' ); - my $paid_date = ( $row->{paid_date} ? $date_formatter->parse_datetime($row->{paid_date}) : DateTime->today ); + my $paid_date = ( $row->{paid_date} ? + $date_formatter->parse_datetime($row->{paid_date}) : + $date_formatter->parse_datetime($row->{invoice_date}) ); my $gross_value = $row->{gross_amount}; $gross_value =~ s/,//g;