From: Seamus Lee Date: Fri, 12 Aug 2016 01:52:00 +0000 (+1000) Subject: Add in fix for possible multiple option values found X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=02b2d071827a0ff3ae3a2ef3223255db329f028d;p=civicrm-core.git Add in fix for possible multiple option values found --- 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 = '';