Fully added Transaction importing

This commit is contained in:
Finn 2019-07-05 17:56:21 +01:00
parent 46b5496901
commit d1cd30928e
No known key found for this signature in database
GPG key ID: 7455B4B17685B598
4 changed files with 41 additions and 9 deletions

View file

@ -52,8 +52,14 @@ sub post_transactions {
schema => $c->app->schema
)->import_csv;
$c->flash( success => "CSV imported" );
return $c->redirect_to( '/admin/import_from' );
if ($csv_import->csv_error) {
$c->flash( error => $csv_import->csv_error );
return $c->redirect_to( '/admin/import_from' );
} else {
$c->flash( success => "CSV imported" );
return $c->redirect_to( '/admin/import_from' );
}
}
1;