From 8e258f81fb2bae3ca0014fe61bd5a9515b114b71 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Fri, 13 Jan 2017 22:26:09 +0100 Subject: [PATCH] CsvImport: Anzahl der Fehler beim Ergebnis anzeigen --- SL/Controller/CsvImport.pm | 1 + locale/de/all | 1 + locale/en/all | 1 + templates/webpages/csv_import/report.html | 3 +++ 4 files changed, 6 insertions(+) diff --git a/SL/Controller/CsvImport.pm b/SL/Controller/CsvImport.pm index 6ca25d069..91ecb76d8 100644 --- a/SL/Controller/CsvImport.pm +++ b/SL/Controller/CsvImport.pm @@ -205,6 +205,7 @@ sub action_report { my $rows = SL::DB::Manager::CsvImportReportRow ->get_all(query => \@query); my $status = SL::DB::Manager::CsvImportReportStatus->get_all(query => \@query); + $self->{num_errors} = SL::DB::Manager::CsvImportReportStatus->get_all_count(query => [csv_import_report_id => $report_id, type => 'errors']); $self->{report_rows} = $self->{report}->folded_rows(rows => $rows); $self->{report_status} = $self->{report}->folded_status(status => $status); diff --git a/locale/de/all b/locale/de/all index b66b1fbda..d3085f8a9 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1355,6 +1355,7 @@ $self->{texts} = { 'Error: this feature requires that articles with a time-based unit (e.g. \'h\' or \'min\') exist.' => 'Fehler: dieses Feature setzt voraus, dass Artikel mit einer Zeit-basierenden Einheit (z.B. "Std") existieren.', 'Error: unknown local bank account' => 'Fehler: unbekannte Kontnummer', 'Error: unknown local bank account id' => 'Fehler: unbekannte Bankkonto-ID', + 'Errors' => 'Fehler', 'Errors during conversion:' => 'Umwandlungsfehler:', 'Errors during printing:' => 'Druckfehler:', 'Errors in GL transaction:' => 'Fehler in Dialogbuchung:', diff --git a/locale/en/all b/locale/en/all index 98d8b06df..299d73a1e 100644 --- a/locale/en/all +++ b/locale/en/all @@ -1355,6 +1355,7 @@ $self->{texts} = { 'Error: this feature requires that articles with a time-based unit (e.g. \'h\' or \'min\') exist.' => '', 'Error: unknown local bank account' => '', 'Error: unknown local bank account id' => '', + 'Errors' => '', 'Errors during conversion:' => '', 'Errors during printing:' => '', 'Errors in GL transaction:' => '', diff --git a/templates/webpages/csv_import/report.html b/templates/webpages/csv_import/report.html index 77e69601e..8bb3930fd 100644 --- a/templates/webpages/csv_import/report.html +++ b/templates/webpages/csv_import/report.html @@ -7,6 +7,9 @@ [%- ELSE %] [%- LxERP.t8('Import result') %] [%- END %] + [%- IF SELF.num_errors -%] + ([%- SELF.num_errors -%] [%- LxERP.t8('Errors') -%]) + [%- END -%] [%- IF SELF.report.test_mode %] -- 2.20.1