Revision 56041df3
Von Udo Spallek vor fast 18 Jahren hinzugefügt
SL/CA.pm | ||
---|---|---|
71 | 71 |
} |
72 | 72 |
$sth->finish; |
73 | 73 |
|
74 |
$query = qq|SELECT c.id, c.accno, c.description, c.charttype, c.gifi_accno, |
|
75 |
c.category, c.link |
|
76 |
FROM chart c |
|
77 |
ORDER BY accno|; |
|
74 |
$query = qq| |
|
75 |
|
|
76 |
SELECT c.id, |
|
77 |
c.accno, |
|
78 |
c.description, |
|
79 |
c.charttype, |
|
80 |
c.gifi_accno, |
|
81 |
c.category, |
|
82 |
c.link, |
|
83 |
c.pos_ustva, |
|
84 |
c.pos_bwa, |
|
85 |
c.pos_bilanz, |
|
86 |
c.pos_eur, |
|
87 |
c.valid_from, |
|
88 |
c.datevautomatik, |
|
89 |
( SELECT comma(taxkey_id) |
|
90 |
FROM taxkeys tk |
|
91 |
WHERE tk.chart_id = c.id |
|
92 |
AND c.taxkey_id = tk.taxkey_id |
|
93 |
ORDER BY c.id |
|
94 |
) AS taxkey_id, |
|
95 |
|
|
96 |
( SELECT comma(taxdescription) |
|
97 |
FROM tax tx |
|
98 |
WHERE tx.id in ( |
|
99 |
SELECT tk.tax_id from taxkeys tk |
|
100 |
WHERE tk.chart_id = ( |
|
101 |
SELECT id from chart |
|
102 |
WHERE chart.accno='0027' -- Beispielkonto aus dem SKR03 |
|
103 |
) |
|
104 |
) |
|
105 |
ORDER BY c.accno |
|
106 |
) AS taxdescription, |
|
107 |
|
|
108 |
( SELECT comma(tk.pos_ustva) |
|
109 |
FROM taxkeys tk |
|
110 |
WHERE tk.chart_id = c.id |
|
111 |
AND c.taxkey_id = tk.taxkey_id |
|
112 |
ORDER BY c.id |
|
113 |
) AS tk_ustva, |
|
114 |
|
|
115 |
( SELECT comma(startdate) |
|
116 |
FROM taxkeys tk |
|
117 |
WHERE tk.chart_id = c.id |
|
118 |
AND c.taxkey_id = tk.taxkey_id |
|
119 |
ORDER BY c.id |
|
120 |
) AS startdate, |
|
121 |
|
|
122 |
( SELECT accno |
|
123 |
FROM chart c2 |
|
124 |
WHERE c2.id = c.id |
|
125 |
) AS new_account |
|
126 |
FROM chart c |
|
127 |
ORDER BY accno |
|
128 |
|; |
|
129 |
|
|
78 | 130 |
$sth = $dbh->prepare($query); |
79 | 131 |
$sth->execute || $form->dberror($query); |
80 | 132 |
|
Auch abrufbar als: Unified diff
Neue Version System-> Kontenuebersicht-> Konten anzeigen.
Bitte testen, steuerliche Zuordnungen noch nicht ganz in Ordnung...