fix(documents): include foreign country in recipient address
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user