projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
22546b2
)
sales report: fix report class filtering under Pg 8.x, #24002
author
Mark Wells
<mark@freeside.biz>
Thu, 18 Jul 2013 18:32:10 +0000
(11:32 -0700)
committer
Mark Wells
<mark@freeside.biz>
Thu, 18 Jul 2013 18:32:10 +0000
(11:32 -0700)
FS/FS/Report/Table.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Report/Table.pm
b/FS/FS/Report/Table.pm
index
c5a6503
..
ffd2ac4
100644
(file)
--- 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 {
} 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'";
}
$subselect
) AS x) = '$num'";
}