From 4730ac696b8f67cd75ceaedfa9a1db1853ad0011 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sat, 13 Jun 2020 09:08:28 +0200 Subject: [PATCH] Bugfix #430 Steuer speichen wirft SQL-Fehler MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Das Refactoring 543d78225ec609 hat die Bind-Variablen außer Acht gelassen. Bernd hat den Teil beim Speichern mit b30eacc6bbc6f gefixt. Jetzt auch bei Neuerfassung. Ferner Rückmeldung an den Nutzer per Flash --- SL/AM.pm | 2 +- bin/mozilla/am.pl | 4 +++- templates/webpages/am/list_tax.html | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index 0ba1ec8f5..abf3c92c0 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1207,7 +1207,7 @@ sub _save_tax { chart_categories, id ) - VALUES (?, ?, ?, ?, (SELECT accno FROM chart WHERE id = ?), ?, ?, ?, ?)|; + VALUES (?, ?, ?, ?, ?, ?, ?, ?)|; } push(@values, $form->{id}); do_query($form, $dbh, $query, @values); diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index e992ebec5..d04156187 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -1225,7 +1225,9 @@ sub save_tax { $form->{translations} = { map { $_ =~ '^translation_(\d+)'; $1 => $form->{$_} } @translation_keys }; AM->save_tax(\%myconfig, \%$form); - $form->redirect($locale->text('Tax saved!')); + flash_later('info', $locale->text("Tax saved!")); + + print $form->redirect_header('am.pl?action=list_tax'); $main::lxdebug->leave_sub(); } diff --git a/templates/webpages/am/list_tax.html b/templates/webpages/am/list_tax.html index 4b8ed2d47..980d229b6 100644 --- a/templates/webpages/am/list_tax.html +++ b/templates/webpages/am/list_tax.html @@ -1,5 +1,6 @@ [%- USE T8 %] [%- USE HTML %] +[% INCLUDE "common/flash.html" %]

[% title %]

-- 2.20.1