From 02b2d071827a0ff3ae3a2ef3223255db329f028d Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Fri, 12 Aug 2016 11:52:00 +1000 Subject: [PATCH] Add in fix for possible multiple option values found --- CRM/Core/PseudoConstant.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 018e8792e0..9638078a6d 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -1805,8 +1805,17 @@ WHERE id = %1 'option_group_id' => 'account_relationship', 'name' => 'Sales Tax Account is', )); + $value = array(); if ($option['count'] !== 0) { - $where = 'AND efa.account_relationship IN (' . $option['values'][0]['value'] . ' )'; + if ($option['count'] > 1) { + foreach ($option['values'] as $opt) { + $value[] = $opt['value']; + } + } + else { + $value[] = $option['values'][0]['value']; + } + $where = 'AND efa.account_relationship IN (' . implode(', ', $value) . ' )'; } else { $where = ''; -- 2.25.1