From 8a3ba14876691dea5ebc6e92d37a2fd3b469dc07 Mon Sep 17 00:00:00 2001
From: Philip Reetz
Date: Thu, 14 Dec 2006 17:09:05 +0000
Subject: [PATCH] Fehler beim Aufrufen einer alten Dialogbuchung beseitigt,
dass die Konten nicht richtig angezeigt wurden
---
SL/GL.pm | 10 +---------
bin/mozilla/gl.pl | 2 +-
2 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/SL/GL.pm b/SL/GL.pm
index ed8ade856..660c148ef 100644
--- a/SL/GL.pm
+++ b/SL/GL.pm
@@ -616,17 +616,9 @@ sub transaction {
$sth->finish;
# retrieve individual rows
- $query = "SELECT c.accno, c.taxkey_id AS accnotaxkey, a.amount, project_id,
- (SELECT p.projectnumber FROM project p
- WHERE a.project_id = p.id) AS projectnumber, a.taxkey, (SELECT c1.accno FROM chart c1, tax t WHERE t.taxkey=a.taxkey AND c1.id=t.chart_id) AS taxaccno, (SELECT t1.rate FROM tax t1 WHERE t1.taxkey=a.taxkey) AS taxrate
- FROM acc_trans a, chart c
- WHERE a.chart_id = c.id
- AND a.trans_id = $form->{id}
- ORDER BY a.oid";
-
$query = qq|SELECT c.accno, t.taxkey AS accnotaxkey, a.amount, a.memo,
a.transdate, a.cleared, a.project_id, p.projectnumber,(SELECT p.projectnumber FROM project p
- WHERE a.project_id = p.id) AS projectnumber, a.taxkey, t.rate AS taxrate, t.id, (SELECT c1.accno FROM chart c1, tax t1 WHERE t1.id=t.id AND c1.id=t.chart_id) AS taxaccno
+ WHERE a.project_id = p.id) AS projectnumber, a.taxkey, t.rate AS taxrate, t.id, (SELECT c1.accno FROM chart c1, tax t1 WHERE t1.id=t.id AND c1.id=t.chart_id) AS taxaccno, t.id AS tax_id
FROM acc_trans a
JOIN chart c ON (c.id = a.chart_id)
LEFT JOIN project p ON (p.id = a.project_id)
diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl
index aebcd82bb..be71a67db 100644
--- a/bin/mozilla/gl.pl
+++ b/bin/mozilla/gl.pl
@@ -168,7 +168,7 @@ sub edit {
}
}
} else {
- $form->{"accno_$i"} = "$ref->{accno}--$ref->{accnotaxkey}";
+ $form->{"accno_$i"} = "$ref->{accno}--$ref->{tax_id}";
for (qw(fx_transaction source memo)) { $form->{"${_}_$i"} = $ref->{$_} }
if ($ref->{amount} < 0) {
$form->{totaldebit} -= $ref->{amount};
--
2.20.1