diff --git a/lib/Pear/LocalLoop/Controller/Admin/ImportFrom.pm b/lib/Pear/LocalLoop/Controller/Admin/ImportFrom.pm index aa7a6b4..78cc590 100644 --- a/lib/Pear/LocalLoop/Controller/Admin/ImportFrom.pm +++ b/lib/Pear/LocalLoop/Controller/Admin/ImportFrom.pm @@ -37,7 +37,9 @@ sub post_suppliers { my $job_id = $c->minion->enqueue('csv_supplier_import' => [ $filename ]); - $c->flash(success => "CSV import started, see status of minion job at: " . $c->link_to( 'Minion Job', "/admin/minion/jobs?id=$job_id")); + my $job_url = $c->url_for("/admin/minion/jobs?id=$job_id")->to_abs; + + $c->flash(success => "CSV import started, see status of minion job at: $job_url"); return $c->redirect_to('/admin/import_from'); } @@ -63,7 +65,9 @@ sub post_postcodes { my $job_id = $c->minion->enqueue('csv_postcode_import' => [ $filename ]); - $c->flash(success => "CSV import started, see status of minion job at: " . $c->link_to( 'Minion Job', "/admin/minion/jobs?id=$job_id")); + my $job_url = $c->url_for("/admin/minion/jobs?id=$job_id")->to_abs; + + $c->flash(success => "CSV import started, see status of minion job at: $job_url"); return $c->redirect_to('/admin/import_from'); } @@ -94,7 +98,9 @@ sub post_transactions { my $job_id = $c->minion->enqueue('csv_transaction_import' => [ $filename, $c->param('entity_id') ]); - $c->flash(success => "CSV import started, see status of minion job at: " . $c->link_to( 'Minion Job', "/admin/minion/jobs?id=$job_id")); + my $job_url = $c->url_for("/admin/minion/jobs?id=$job_id")->to_abs; + + $c->flash(success => "CSV import started, see status of minion job at: $job_url"); return $c->redirect_to('/admin/import_from'); } diff --git a/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm b/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm index 34ba039..5af13fe 100644 --- a/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm +++ b/lib/Pear/LocalLoop/Import/LCCCsv/Transactions.pm @@ -87,7 +87,7 @@ sub _row_to_result { pattern => '%m/%d/%Y', time_zone => 'Europe/London' ); - + my $paid_date = ( $row->{paid_date} ? $date_formatter->parse_datetime($row->{paid_date}) : $date_formatter->parse_datetime($row->{invoice_date}) ); diff --git a/templates/admin/import_from/index.html.ep b/templates/admin/import_from/index.html.ep index 068c0d5..0dd5734 100644 --- a/templates/admin/import_from/index.html.ep +++ b/templates/admin/import_from/index.html.ep @@ -16,16 +16,6 @@ $(function() { }) % end -% if (my $error = flash 'error') { -