Release 2.0.2 (#3856)

* allow to overwrite global spreadsheet styles
* bump version
* fix deprecations in vcard download
* bump composer packages
* added help page for all registered locales
* fix menu id's, cleanup times route, fix configurable homepage redirect
* format duration without leading zero in hours (unify javascript with php behavior)
* fix active records in all screen sizes
* improved responsiveness in XS
* fixed invoice number for customer null fields
* fix javascript respects multiple recent-activity dropdowns
* show recent activities on small screens
* fix user-profile layout column in XS
* fix search is always marked as active
This commit is contained in:
Kevin Papst
2023-02-21 19:21:49 +01:00
committed by GitHub
parent e474087257
commit 25469113fd
61 changed files with 821 additions and 580 deletions

View File

@@ -368,20 +368,39 @@ final class CustomerController extends AbstractController
$vcard = new VCard();
$contact = $customer->getContact() ?? $customer->getName();
if ($contact === null || \strlen($contact) === 0) {
$contact = 'Unknown';
}
$contact = explode(' ', $contact);
$lastname = array_pop($contact);
$firstname = \count($contact) > 0 ? $contact[0] : $lastname;
$firstname = \count($contact) > 0 ? $contact[0] : '';
$vcard->addName($lastname, $firstname);
$note = $customer->getComment();
if ($note !== null) {
$note .= PHP_EOL;
}
$vcard->addName($lastname, $firstname);
$vcard->addNote($note . $customer->getAddress());
$vcard->addAddress(null, null, null, null, null, null, Countries::getName($customer->getCountry()));
$address = $customer->getAddress();
if (!empty($note) || !empty($address)) {
$vcard->addNote($note . $address);
}
$vcard->addCompany($customer->getCompany() ?? $customer->getName());
$vcard->addEmail($customer->getEmail());
$country = $customer->getCountry();
if ($country !== null) {
$vcard->addAddress(null, null, null, null, null, null, Countries::getName($country));
}
$company = $customer->getCompany();
if ($company !== null) {
$vcard->addCompany($company);
}
$email = $customer->getEmail();
if ($email !== null) {
$vcard->addEmail($email);
}
$hasPref = false;