Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 8eca5e84

Von Sven Schöling vor etwa 12 Jahren hinzugefügt

  • ID 8eca5e84a3f8ebecfb93b593e4540edfa755dcc8
  • Vorgänger 978c6f75
  • Nachfolger 0c4b5126

Revert "Probleme bei Mwst-Wechsel"

This reverts commit 072919154edb34f4afed6bf93fdbdae5b0969385.

Unterschiede anzeigen:

SL/CA.pm
$query =
qq|SELECT a.id, a.reference, a.description, ac.transdate, ac.chart_id, | .
qq| $false AS invoice, ac.amount, 'gl' as module, | .
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 § .
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 § .
qq|FROM acc_trans ac, gl a | .
$dpt_join .
qq|WHERE | . $where . $dpt_where . $project .
......
qq|SELECT a.id, a.invnumber, c.name, ac.transdate, ac.chart_id, | .
qq| a.invoice, ac.amount, 'ar' as module, | .
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 § .
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 § .
qq|FROM acc_trans ac, customer c, ar a | .
$dpt_join .
qq|WHERE | . $where . $dpt_where . $project .
......
qq|SELECT a.id, a.invnumber, v.name, ac.transdate, ac.chart_id, | .
qq| a.invoice, ac.amount, 'ap' as module, | .
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 § .
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 § .
qq|FROM acc_trans ac, vendor v, ap a | .
$dpt_join .
qq|WHERE | . $where . $dpt_where . $project .
SL/Form.pm
FROM acc_trans a
LEFT JOIN chart c ON (c.id = a.chart_id)
LEFT JOIN project p ON (p.id = a.project_id)
LEFT JOIN tax t ON (t.id= a.tax_id)
LEFT JOIN tax t ON (t.id= (SELECT tk.tax_id FROM taxkeys tk
WHERE (tk.taxkey_id=a.taxkey) AND
((CASE WHEN a.chart_id IN (SELECT chart_id FROM taxkeys WHERE taxkey_id = a.taxkey)
THEN tk.chart_id = a.chart_id
ELSE 1 = 1
END)
OR (c.link='%tax%')) AND
(startdate <= a.transdate) ORDER BY startdate DESC LIMIT 1))
WHERE a.trans_id = ?
AND a.fx_transaction = '0'
ORDER BY a.acc_trans_id, a.transdate|;
SL/GL.pm
(SELECT c1.accno
FROM chart c1, tax t1
WHERE (t1.id = t.id) AND (c1.id = t.chart_id)) AS taxaccno,
a.tax_id AS tax_id
(SELECT tk.tax_id
FROM taxkeys tk
WHERE (tk.chart_id = a.chart_id) AND (tk.startdate <= a.transdate)
ORDER BY tk.startdate desc LIMIT 1) 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)
LEFT JOIN tax t ON
(t.id = a.tax_id)
(t.id =
(SELECT tk.tax_id
FROM taxkeys tk
WHERE (tk.taxkey_id = a.taxkey) AND
((CASE WHEN a.chart_id IN
(SELECT chart_id FROM taxkeys WHERE taxkey_id = a.taxkey)
THEN tk.chart_id = a.chart_id
ELSE 1 = 1
END)
OR (c.link LIKE '%tax%'))
AND (startdate <= a.transdate)
ORDER BY startdate DESC LIMIT 1))
WHERE (a.trans_id = ?)
AND (a.fx_transaction = '0')
ORDER BY a.acc_trans_id, a.transdate|;

Auch abrufbar als: Unified diff