Revision bfdc537f
Von Andreas Rudin vor etwa 6 Jahren hinzugefügt
SL/RP.pm | ||
---|---|---|
311 | 311 |
FROM invoice ac |
312 | 312 |
JOIN ar a ON (a.id = ac.trans_id) |
313 | 313 |
JOIN parts p ON (ac.parts_id = p.id) |
314 |
JOIN chart c on (p.income_accno_id = c.id) |
|
314 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
315 |
JOIN chart c on (t.income_accno_id = c.id) |
|
315 | 316 |
-- use transdate from subwhere |
316 | 317 |
WHERE (c.category = 'I') |
317 | 318 |
$subwhere |
... | ... | |
332 | 333 |
FROM invoice ac |
333 | 334 |
JOIN ap a ON (a.id = ac.trans_id) |
334 | 335 |
JOIN parts p ON (ac.parts_id = p.id) |
335 |
JOIN chart c on (p.expense_accno_id = c.id) |
|
336 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
337 |
JOIN chart c on (t.expense_accno_id = c.id) |
|
336 | 338 |
WHERE (c.category = 'E') |
337 | 339 |
$subwhere |
338 | 340 |
$dpt_where |
... | ... | |
374 | 376 |
FROM invoice ac |
375 | 377 |
JOIN ar a ON (a.id = ac.trans_id) |
376 | 378 |
JOIN parts p ON (ac.parts_id = p.id) |
377 |
JOIN chart c on (p.income_accno_id = c.id) |
|
379 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
380 |
JOIN chart c on (t.income_accno_id = c.id) |
|
378 | 381 |
-- use transdate from subwhere |
379 | 382 |
WHERE (c.category = 'I') |
380 | 383 |
$subwhere |
... | ... | |
388 | 391 |
FROM invoice ac |
389 | 392 |
JOIN ap a ON (a.id = ac.trans_id) |
390 | 393 |
JOIN parts p ON (ac.parts_id = p.id) |
391 |
JOIN chart c on (p.expense_accno_id = c.id) |
|
394 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
395 |
JOIN chart c on (t.expense_accno_id = c.id) |
|
392 | 396 |
WHERE (c.category = 'E') |
393 | 397 |
$subwhere |
394 | 398 |
$dpt_where |
... | ... | |
572 | 576 |
FROM invoice ac |
573 | 577 |
JOIN ar a ON (a.id = ac.trans_id) |
574 | 578 |
JOIN parts p ON (ac.parts_id = p.id) |
575 |
JOIN chart c on (p.income_accno_id = c.id) |
|
579 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
580 |
JOIN chart c on (t.income_accno_id = c.id) |
|
576 | 581 |
WHERE (c.category = 'I') $prwhere $dpt_where |
577 | 582 |
AND ac.trans_id IN ( SELECT trans_id FROM acc_trans a WHERE (a.chart_link LIKE '%AR_paid%') $subwhere) |
578 | 583 |
$project |
... | ... | |
584 | 589 |
FROM invoice ac |
585 | 590 |
JOIN ap a ON (a.id = ac.trans_id) |
586 | 591 |
JOIN parts p ON (ac.parts_id = p.id) |
587 |
JOIN chart c on (p.expense_accno_id = c.id) |
|
592 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
593 |
JOIN chart c on (t.expense_accno_id = c.id) |
|
588 | 594 |
WHERE (c.category = 'E') $prwhere $dpt_where |
589 | 595 |
AND ac.trans_id IN ( SELECT trans_id FROM acc_trans a WHERE (a.chart_link LIKE '%AP_paid%') $subwhere) |
590 | 596 |
$project |
... | ... | |
617 | 623 |
FROM invoice ac |
618 | 624 |
JOIN ar a ON (a.id = ac.trans_id) |
619 | 625 |
JOIN parts p ON (ac.parts_id = p.id) |
620 |
JOIN chart c on (p.income_accno_id = c.id) |
|
626 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
627 |
JOIN chart c on (t.income_accno_id = c.id) |
|
621 | 628 |
WHERE (c.category = 'I') |
622 | 629 |
$prwhere |
623 | 630 |
$dpt_where |
... | ... | |
630 | 637 |
FROM invoice ac |
631 | 638 |
JOIN ap a ON (a.id = ac.trans_id) |
632 | 639 |
JOIN parts p ON (ac.parts_id = p.id) |
633 |
JOIN chart c on (p.expense_accno_id = c.id) |
|
640 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
641 |
JOIN chart c on (t.expense_accno_id = c.id) |
|
634 | 642 |
WHERE (c.category = 'E') |
635 | 643 |
$prwhere |
636 | 644 |
$dpt_where |
... | ... | |
891 | 899 |
FROM invoice ac |
892 | 900 |
JOIN ar a ON (ac.trans_id = a.id) |
893 | 901 |
JOIN parts p ON (ac.parts_id = p.id) |
894 |
JOIN chart c ON (p.income_accno_id = c.id) |
|
902 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
903 |
JOIN chart c ON (t.income_accno_id = c.id) |
|
895 | 904 |
WHERE $invwhere |
896 | 905 |
$dpt_where |
897 | 906 |
$customer_where |
... | ... | |
904 | 913 |
FROM invoice ac |
905 | 914 |
JOIN ap a ON (ac.trans_id = a.id) |
906 | 915 |
JOIN parts p ON (ac.parts_id = p.id) |
907 |
JOIN chart c ON (p.expense_accno_id = c.id) |
|
916 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
917 |
JOIN chart c ON (t.expense_accno_id = c.id) |
|
908 | 918 |
WHERE $invwhere |
909 | 919 |
$dpt_where |
910 | 920 |
$customer_no_union |
... | ... | |
1017 | 1027 |
FROM invoice ac |
1018 | 1028 |
JOIN parts p ON (ac.parts_id = p.id) |
1019 | 1029 |
JOIN ap a ON (ac.trans_id = a.id) |
1020 |
JOIN chart c ON (p.expense_accno_id = c.id) |
|
1030 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
1031 |
JOIN chart c ON (t.expense_accno_id = c.id) |
|
1021 | 1032 |
WHERE $invwhere |
1022 | 1033 |
$dpt_where |
1023 | 1034 |
$customer_no_union |
... | ... | |
1028 | 1039 |
FROM invoice ac |
1029 | 1040 |
JOIN parts p ON (ac.parts_id = p.id) |
1030 | 1041 |
JOIN ar a ON (ac.trans_id = a.id) |
1031 |
JOIN chart c ON (p.income_accno_id = c.id) |
|
1042 |
JOIN taxzone_charts t ON (p.buchungsgruppen_id = t.id) |
|
1043 |
JOIN chart c ON (t.income_accno_id = c.id) |
|
1032 | 1044 |
WHERE $invwhere |
1033 | 1045 |
$dpt_where |
1034 | 1046 |
$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.