fix(documents): include foreign country in recipient address
Some checks failed
Build and Release FEDEO / verify (push) Successful in 1m3s
Build and Release FEDEO / build-and-release (push) Failing after 1m26s

This commit is contained in:
2026-10-07 18:52:57 +02:00
parent ac00d2187e
commit c2c6ca8fe9
2 changed files with 7 additions and 0 deletions

View File

@@ -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: {