fixed search client

This commit is contained in:
2026-07-06 15:32:15 +02:00
parent 500e40782d
commit 7b961d5818
3 changed files with 115 additions and 5 deletions
+3 -2
View File
@@ -30,7 +30,6 @@ function isInattivo(array $c): bool
function formatClientLabel(array $client): string
{
$name = trim($client['Nominativo'] ?? '');
$id = trim((string)($client['IdCliente'] ?? ''));
$code = trim((string)($client['CodiceCliente'] ?? ''));
$parts = explode('_', $code);
@@ -44,7 +43,9 @@ function formatClientLabel(array $client): string
$suffix = '--';
}
return $name . ' - ' . $suffix . ' (ID: ' . $id . ')';
$codePart = $code !== '' ? ' - ' . $code : '';
return $name . ' - ' . $suffix . $codePart;
}
try {