From c2c6ca8fe9fdddb84570e261a6104b6588b806f4 Mon Sep 17 00:00:00 2001 From: flfeders Date: Wed, 7 Oct 2026 18:52:57 +0200 Subject: [PATCH] fix(documents): include foreign country in recipient address --- backend/src/modules/serialexecution.service.ts | 2 ++ frontend/pages/createDocument/edit/[[id]].vue | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/backend/src/modules/serialexecution.service.ts b/backend/src/modules/serialexecution.service.ts index 18dae834..9ea6e7d9 100644 --- a/backend/src/modules/serialexecution.service.ts +++ b/backend/src/modules/serialexecution.service.ts @@ -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) diff --git a/frontend/pages/createDocument/edit/[[id]].vue b/frontend/pages/createDocument/edit/[[id]].vue index 5e93793c..eaa80fc2 100644 --- a/frontend/pages/createDocument/edit/[[id]].vue +++ b/frontend/pages/createDocument/edit/[[id]].vue @@ -44,6 +44,7 @@ const itemInfo = ref({ special: null, zip: null, city: null, + country: null, }, project: null, costcentre: null, @@ -791,6 +792,7 @@ const setCustomerData = async (customerId, loadOnlyAdress = false) => { itemInfo.value.address.zip = customer.infoData.zip itemInfo.value.address.city = customer.infoData.city itemInfo.value.address.special = customer.infoData.special + itemInfo.value.address.country = customer.infoData.country if (!loadOnlyAdress && customer.customPaymentDays) itemInfo.value.paymentDays = customer.customPaymentDays if (!loadOnlyAdress && customer.custom_payment_type) itemInfo.value.payment_type = customer.custom_payment_type @@ -1542,6 +1544,8 @@ const getDocumentData = async () => { console.log(returnTitleSumsTransfer) + const recipientCountry = String(itemInfo.value.address.country ?? customerData.infoData?.country ?? "").trim() + const returnData = { type: itemInfo.value.type, taxType: itemInfo.value.taxType, @@ -1561,6 +1565,7 @@ const getDocumentData = async () => { itemInfo.value.address.street, ...itemInfo.value.address.special ? [itemInfo.value.address.special] : [], `${itemInfo.value.address.zip} ${itemInfo.value.address.city}`, + ...(recipientCountry && recipientCountry.toLocaleLowerCase("de") !== "deutschland" ? [recipientCountry] : []), ], /*info: {