Revision bfdc537f
Von Andreas Rudin vor mehr als 6 Jahren hinzugefügt
SL/RP.pm | ||
---|---|---|
FROM invoice ac
|
||
JOIN ar a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.income_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.income_accno_id = c.id)
|
||
-- use transdate from subwhere
|
||
WHERE (c.category = 'I')
|
||
$subwhere
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ap a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.expense_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.expense_accno_id = c.id)
|
||
WHERE (c.category = 'E')
|
||
$subwhere
|
||
$dpt_where
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ar a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.income_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.income_accno_id = c.id)
|
||
-- use transdate from subwhere
|
||
WHERE (c.category = 'I')
|
||
$subwhere
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ap a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.expense_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.expense_accno_id = c.id)
|
||
WHERE (c.category = 'E')
|
||
$subwhere
|
||
$dpt_where
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ar a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.income_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.income_accno_id = c.id)
|
||
WHERE (c.category = 'I') $prwhere $dpt_where
|
||
AND ac.trans_id IN ( SELECT trans_id FROM acc_trans a WHERE (a.chart_link LIKE '%AR_paid%') $subwhere)
|
||
$project
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ap a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.expense_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.expense_accno_id = c.id)
|
||
WHERE (c.category = 'E') $prwhere $dpt_where
|
||
AND ac.trans_id IN ( SELECT trans_id FROM acc_trans a WHERE (a.chart_link LIKE '%AP_paid%') $subwhere)
|
||
$project
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ar a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.income_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.income_accno_id = c.id)
|
||
WHERE (c.category = 'I')
|
||
$prwhere
|
||
$dpt_where
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ap a ON (a.id = ac.trans_id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c on (p.expense_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c on (t.expense_accno_id = c.id)
|
||
WHERE (c.category = 'E')
|
||
$prwhere
|
||
$dpt_where
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ar a ON (ac.trans_id = a.id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c ON (p.income_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c ON (t.income_accno_id = c.id)
|
||
WHERE $invwhere
|
||
$dpt_where
|
||
$customer_where
|
||
... | ... | |
FROM invoice ac
|
||
JOIN ap a ON (ac.trans_id = a.id)
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN chart c ON (p.expense_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c ON (t.expense_accno_id = c.id)
|
||
WHERE $invwhere
|
||
$dpt_where
|
||
$customer_no_union
|
||
... | ... | |
FROM invoice ac
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN ap a ON (ac.trans_id = a.id)
|
||
JOIN chart c ON (p.expense_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c ON (t.expense_accno_id = c.id)
|
||
WHERE $invwhere
|
||
$dpt_where
|
||
$customer_no_union
|
||
... | ... | |
FROM invoice ac
|
||
JOIN parts p ON (ac.parts_id = p.id)
|
||
JOIN ar a ON (ac.trans_id = a.id)
|
||
JOIN chart c ON (p.income_accno_id = c.id)
|
||
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)
|
||
JOIN chart c ON (t.income_accno_id = c.id)
|
||
WHERE $invwhere
|
||
$dpt_where
|
||
$customer_where
|
Auch abrufbar als: Unified diff
Fixt #350 Fehler p.income_accno_id does not exist
Die mehrmals in RP.pm vorkommenden Zeilen
'JOIN chart c on (p.income_accno_id = c.id)'
und
'JOIN chart c on (p.expense_accno_id = c.id)'
erzeugten einen Fehler, da es in der Tabelle parts
keine solchen Spalten gibt, sondern in taxzone_charts
Deshalb jeweils die Zeile
'JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id)'
vorher eingefügt und jeweils p.income bzw. p.expense durch
t.income bzw. t.expense ersetzt.
Der Fehler trat auf bei 'Berichte -> Projektbuchungen'
sowie bei der GUV und BWA mit ausgewähltem Projekt.