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:
2026-04-05 20:02:05 +02:00
parent 422746d141
commit c80e317875

View File

@@ -224,7 +224,7 @@ class BcODataGateway
{
$customerNo = trim($customerNo);
$customerName = trim($customerName);
if ($customerNo === '' || $customerName === '') {
if ($customerNo === '' && $customerName === '') {
return [
'contacts' => [],
'meta' => [