Fully added Transaction importing
This commit is contained in:
parent
46b5496901
commit
d1cd30928e
4 changed files with 41 additions and 9 deletions
|
@ -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;
|
||||
|
|
Reference in a new issue