Revision 07291915
Von Niclas Zimmermann vor etwa 12 Jahren hinzugefügt
SL/CA.pm | ||
---|---|---|
273 | 273 |
$query = |
274 | 274 |
qq|SELECT a.id, a.reference, a.description, ac.transdate, ac.chart_id, | . |
275 | 275 |
qq| $false AS invoice, ac.amount, 'gl' as module, | . |
276 |
qq§(SELECT accno||'--'||rate FROM tax LEFT JOIN chart ON (tax.chart_id=chart.id) WHERE tax.id = (SELECT tax_id FROM taxkeys WHERE taxkey_id = ac.taxkey AND taxkeys.startdate <= ac.transdate ORDER BY taxkeys.startdate DESC LIMIT 1)) AS taxinfo, ac.source || ' ' || ac.memo AS memo § .
|
|
276 |
qq§(SELECT accno||'--'||rate FROM tax LEFT JOIN chart ON (tax.chart_id=chart.id) WHERE tax.id = ac.tax_id) AS taxinfo, ac.source || ' ' || ac.memo AS memo § .
|
|
277 | 277 |
qq|FROM acc_trans ac, gl a | . |
278 | 278 |
$dpt_join . |
279 | 279 |
qq|WHERE | . $where . $dpt_where . $project . |
... | ... | |
285 | 285 |
|
286 | 286 |
qq|SELECT a.id, a.invnumber, c.name, ac.transdate, ac.chart_id, | . |
287 | 287 |
qq| a.invoice, ac.amount, 'ar' as module, | . |
288 |
qq§(SELECT accno||'--'||rate FROM tax LEFT JOIN chart ON (tax.chart_id=chart.id) WHERE tax.id = (SELECT tax_id FROM taxkeys WHERE taxkey_id = ac.taxkey AND taxkeys.startdate <= ac.transdate ORDER BY taxkeys.startdate DESC LIMIT 1)) AS taxinfo, ac.source || ' ' || ac.memo AS memo § .
|
|
288 |
qq§(SELECT accno||'--'||rate FROM tax LEFT JOIN chart ON (tax.chart_id=chart.id) WHERE tax.id = ac.tax_id) AS taxinfo, ac.source || ' ' || ac.memo AS memo § .
|
|
289 | 289 |
qq|FROM acc_trans ac, customer c, ar a | . |
290 | 290 |
$dpt_join . |
291 | 291 |
qq|WHERE | . $where . $dpt_where . $project . |
... | ... | |
298 | 298 |
|
299 | 299 |
qq|SELECT a.id, a.invnumber, v.name, ac.transdate, ac.chart_id, | . |
300 | 300 |
qq| a.invoice, ac.amount, 'ap' as module, | . |
301 |
qq§(SELECT accno||'--'||rate FROM tax LEFT JOIN chart ON (tax.chart_id=chart.id) WHERE tax.id = (SELECT tax_id FROM taxkeys WHERE taxkey_id = ac.taxkey AND taxkeys.startdate <= ac.transdate ORDER BY taxkeys.startdate DESC LIMIT 1)) AS taxinfo, ac.source || ' ' || ac.memo AS memo § .
|
|
301 |
qq§(SELECT accno||'--'||rate FROM tax LEFT JOIN chart ON (tax.chart_id=chart.id) WHERE tax.id = ac.tax_id) AS taxinfo, ac.source || ' ' || ac.memo AS memo § .
|
|
302 | 302 |
qq|FROM acc_trans ac, vendor v, ap a | . |
303 | 303 |
$dpt_join . |
304 | 304 |
qq|WHERE | . $where . $dpt_where . $project . |
SL/Form.pm | ||
---|---|---|
2809 | 2809 |
FROM acc_trans a |
2810 | 2810 |
LEFT JOIN chart c ON (c.id = a.chart_id) |
2811 | 2811 |
LEFT JOIN project p ON (p.id = a.project_id) |
2812 |
LEFT JOIN tax t ON (t.id= (SELECT tk.tax_id FROM taxkeys tk |
|
2813 |
WHERE (tk.taxkey_id=a.taxkey) AND |
|
2814 |
((CASE WHEN a.chart_id IN (SELECT chart_id FROM taxkeys WHERE taxkey_id = a.taxkey) |
|
2815 |
THEN tk.chart_id = a.chart_id |
|
2816 |
ELSE 1 = 1 |
|
2817 |
END) |
|
2818 |
OR (c.link='%tax%')) AND |
|
2819 |
(startdate <= a.transdate) ORDER BY startdate DESC LIMIT 1)) |
|
2812 |
LEFT JOIN tax t ON (t.id= a.tax_id) |
|
2820 | 2813 |
WHERE a.trans_id = ? |
2821 | 2814 |
AND a.fx_transaction = '0' |
2822 | 2815 |
ORDER BY a.acc_trans_id, a.transdate|; |
SL/GL.pm | ||
---|---|---|
664 | 664 |
(SELECT c1.accno |
665 | 665 |
FROM chart c1, tax t1 |
666 | 666 |
WHERE (t1.id = t.id) AND (c1.id = t.chart_id)) AS taxaccno, |
667 |
(SELECT tk.tax_id |
|
668 |
FROM taxkeys tk |
|
669 |
WHERE (tk.chart_id = a.chart_id) AND (tk.startdate <= a.transdate) |
|
670 |
ORDER BY tk.startdate desc LIMIT 1) AS tax_id |
|
667 |
a.tax_id AS tax_id |
|
671 | 668 |
FROM acc_trans a |
672 | 669 |
JOIN chart c ON (c.id = a.chart_id) |
673 | 670 |
LEFT JOIN project p ON (p.id = a.project_id) |
674 | 671 |
LEFT JOIN tax t ON |
675 |
(t.id = |
|
676 |
(SELECT tk.tax_id |
|
677 |
FROM taxkeys tk |
|
678 |
WHERE (tk.taxkey_id = a.taxkey) AND |
|
679 |
((CASE WHEN a.chart_id IN |
|
680 |
(SELECT chart_id FROM taxkeys WHERE taxkey_id = a.taxkey) |
|
681 |
THEN tk.chart_id = a.chart_id |
|
682 |
ELSE 1 = 1 |
|
683 |
END) |
|
684 |
OR (c.link LIKE '%tax%')) |
|
685 |
AND (startdate <= a.transdate) |
|
686 |
ORDER BY startdate DESC LIMIT 1)) |
|
672 |
(t.id = a.tax_id) |
|
687 | 673 |
WHERE (a.trans_id = ?) |
688 | 674 |
AND (a.fx_transaction = '0') |
689 | 675 |
ORDER BY a.acc_trans_id, a.transdate|; |
Auch abrufbar als: Unified diff
Probleme bei Mwst-Wechsel
Durch einen Mwst-Wechsel kam es bisher zu einigen Problemen, folgende
behebt dieser Commit:
1.Korrektes Öffnen von Dialogbuchung bei inkl Steuern
2.Korrekte Anzeige Steuersatz in
Berichte-Kontenübersicht-...-Konto auswählen
3.Korrektes Öffnen von Kreditorenbuchungen