]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Bugfix #430 Steuer speichen wirft SQL-Fehler
authorJan Büren <jan@kivitendo.de>
Sat, 13 Jun 2020 07:08:28 +0000 (09:08 +0200)
committerJan Büren <jan@kivitendo.de>
Sat, 13 Jun 2020 07:08:28 +0000 (09:08 +0200)
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
bin/mozilla/am.pl
templates/webpages/am/list_tax.html

index 0ba1ec8f575917373faa2d7cbfabcb520992eda7..abf3c92c0bc0068a36a1d2d5ff3eceaa3edae647 100644 (file)
--- 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);
index e992ebec5d0deac9cc9ee6f2c408728d19ccfb50..d0415618717701f7910e3d82d7067b12620eeaa7 100644 (file)
@@ -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();
 }
index 4b8ed2d475b899e9fc56f004995b36b57be7478f..980d229b6dd65cbea87121397172f2a60171f797 100644 (file)
@@ -1,5 +1,6 @@
 [%- USE T8 %]
 [%- USE HTML %]
+[% INCLUDE "common/flash.html" %]
  <h1>[% title %]</h1>
 
  <table>