From f8dc549f8eef9f756958d268c6031e26ed39043e Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Wed, 11 Jul 2007 12:48:22 +0000 Subject: [PATCH] Korrekturen zu r2737: Speichern von Steuern funktionierte nicht, taxnumber mitspeichern, Layout Titel --- SL/AM.pm | 16 +++++++++------- templates/webpages/am/edit_tax_de.html | 2 +- templates/webpages/am/edit_tax_master.html | 2 +- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/SL/AM.pm b/SL/AM.pm index dc6774d87..77c67e65e 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -2186,25 +2186,27 @@ sub save_tax { $form->{rate} = $form->{rate} / 100; - my @values = ($form->{taxkey}, $form->{taxdescription}, $form->{rate}, $form->{chart_id} ); + my @values = ($form->{taxkey}, $form->{taxdescription}, $form->{rate}, $form->{chart_id}, $form->{chart_id} ); if ($form->{id}) { - $query = qq|UPDATE _tax SET + $query = qq|UPDATE tax SET taxkey = ?, taxdescription = ?, rate = ?, - chart_id = ? + chart_id = ?, + taxnumber = (SELECT accno FROM chart WHERE id= ? ) WHERE id = ?|; push(@values, $form->{id}); } else { #ok - $query = qq|INSERT INTO _tax ( + $query = qq|INSERT INTO tax ( taxkey, taxdescription, rate, - chart_id + chart_id, + taxnumber ) - VALUES (?, ?, ?, ? )|; + VALUES (?, ?, ?, ?, (SELECT accno FROM chart WHERE id = ?) )|; } do_query($form, $dbh, $query, @values); @@ -2221,7 +2223,7 @@ sub delete_tax { # connect to database my $dbh = $form->dbconnect($myconfig); - $query = qq|DELETE FROM _tax + $query = qq|DELETE FROM tax WHERE id = ?|; do_query($form, $dbh, $query, $form->{id}); diff --git a/templates/webpages/am/edit_tax_de.html b/templates/webpages/am/edit_tax_de.html index 292561724..3b54ae12d 100644 --- a/templates/webpages/am/edit_tax_de.html +++ b/templates/webpages/am/edit_tax_de.html @@ -5,7 +5,7 @@ - +
SteuerSteuer
diff --git a/templates/webpages/am/edit_tax_master.html b/templates/webpages/am/edit_tax_master.html index 1b5934c34..b1dfd2417 100644 --- a/templates/webpages/am/edit_tax_master.html +++ b/templates/webpages/am/edit_tax_master.html @@ -5,7 +5,7 @@
- +
Tax-O-MaticTax-O-Matic
-- 2.20.1