X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FCA.pm;h=30d471298b09bfe9f0ef915cb717c03a80f94e1a;hb=be8c4415c90cb11cbf45132b63482f420b41070b;hp=d954482135a859f2bc301eb1e4f270b081de5a31;hpb=1b9a64fa292f375c82b4af788d0606354bc4e8ff;p=kivitendo-erp.git diff --git a/SL/CA.pm b/SL/CA.pm index d95448213..30d471298 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -101,11 +101,11 @@ sub all_accounts { c.pos_eur, c.valid_from, c.datevautomatik, - comma(tk.startdate::text) AS startdate, - comma(tk.taxkey_id::text) AS taxkey, - comma(tx.taxdescription || to_char (tx.rate, '99V99' ) || '%') AS taxdescription, - comma(tx.taxnumber::text) AS taxaccount, - comma(tk.pos_ustva::text) AS tk_ustva, + array_agg(tk.startdate) AS startdates, + array_agg(tk.taxkey_id) AS taxkeys, + array_agg(tx.taxdescription || to_char (tx.rate, '99V99' ) || '%') AS taxdescriptions, + array_agg(taxchart.accno) AS taxaccounts, + array_agg(tk.pos_ustva) AS pos_ustvas, ( SELECT accno FROM chart c2 WHERE c2.id = c.id @@ -113,6 +113,7 @@ sub all_accounts { FROM chart c LEFT JOIN taxkeys tk ON (c.id = tk.chart_id) LEFT JOIN tax tx ON (tk.tax_id = tx.id) + LEFT JOIN chart taxchart ON (taxchart.id = tx.chart_id) WHERE 1=1 $where GROUP BY c.accno, c.id, c.description, c.charttype,