fix(documents): include foreign country in recipient address
This commit is contained in:
@@ -675,6 +675,7 @@ export function getDocumentDataBackend(
|
||||
// --- 7. Construct Final Object ---
|
||||
|
||||
// Adresse aufbereiten
|
||||
const recipientCountry = String(itemInfo.address?.country ?? customerData.infoData?.country ?? customerData.country ?? "").trim();
|
||||
const recipientArray = [
|
||||
customerData.name,
|
||||
...(customerData.nameAddition ? [customerData.nameAddition] : []),
|
||||
@@ -682,6 +683,7 @@ export function getDocumentDataBackend(
|
||||
itemInfo.address?.street || customerData.street || "",
|
||||
...(itemInfo.address?.special ? [itemInfo.address.special] : []),
|
||||
`${itemInfo.address?.zip || customerData.zip} ${itemInfo.address?.city || customerData.city}`,
|
||||
...(recipientCountry && recipientCountry.toLocaleLowerCase("de") !== "deutschland" ? [recipientCountry] : []),
|
||||
].filter(Boolean); // Leere Einträge entfernen
|
||||
|
||||
console.log(contactPerson)
|
||||
|
||||
Reference in New Issue
Block a user