fix(helpdesk): fix contact name resolution when customerNo is empty
getContactsForCustomerWithMeta() returned early when customerNo OR customerName was empty. The communication service calls it with empty customerNo and only customerName — which always hit the early return, preventing any contact lookup. Fix: only return early when BOTH are empty, so the primary Company_Name query path works correctly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -224,7 +224,7 @@ class BcODataGateway
|
||||
{
|
||||
$customerNo = trim($customerNo);
|
||||
$customerName = trim($customerName);
|
||||
if ($customerNo === '' || $customerName === '') {
|
||||
if ($customerNo === '' && $customerName === '') {
|
||||
return [
|
||||
'contacts' => [],
|
||||
'meta' => [
|
||||
|
||||
Reference in New Issue
Block a user