Prevent duplicating contact/client name if they are the same!

This commit is contained in:
David Bomba 2025-03-04 10:51:51 +11:00
parent cac4920cc6
commit 168cd7add0
1 changed files with 1 additions and 0 deletions

View File

@ -1822,6 +1822,7 @@ class PdfBuilder
$variables = $this->service->config->pdf_variables['client_details'];
// 2025-03-03 - Prevent duplicating contact/client name
if(strlen($this->service->config->client->name ?? '') == 0 && in_array('$client.name', $variables) && in_array('$contact.full_name', $variables)) {
$variables = array_diff($variables, ['$contact.full_name']);
}