summaryrefslogtreecommitdiff
path: root/FS/FS/Report/Table.pm
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-07-18 11:32:10 -0700
committerMark Wells <mark@freeside.biz>2013-07-18 11:32:10 -0700
commit0fd6e4b7e096b1e53763b46656d392b04c802158 (patch)
tree58af7fd7feee3bfd9b9fe493c6db2ea21a71c823 /FS/FS/Report/Table.pm
parent22546b219a7a2a3ee134586afc8cc40bbad9bc32 (diff)
sales report: fix report class filtering under Pg 8.x, #24002
Diffstat (limited to 'FS/FS/Report/Table.pm')
-rw-r--r--FS/FS/Report/Table.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/Report/Table.pm b/FS/FS/Report/Table.pm
index c5a6503..ffd2ac4 100644
--- a/FS/FS/Report/Table.pm
+++ b/FS/FS/Report/Table.pm
@@ -760,7 +760,9 @@ sub with_report_option {
} elsif ( $num eq '0' ) {
$comparison = "NOT EXISTS ($subselect)";
} else {
- $comparison = "(SELECT COALESCE(string_agg(num, ','), '') FROM (
+ #$comparison = "(SELECT COALESCE(string_agg(num, ','), '') FROM ( #Pg 9-ism
+ $comparison = "(SELECT COALESCE(array_to_string(array_agg(num), ','), '')
+ FROM (
$subselect
) AS x) = '$num'";
}