Added Missing Unit Error
Added Surcharge in Saving Added Contact Auto Loading when just one is present
This commit is contained in:
@@ -39,6 +39,7 @@ const itemInfo = ref({
|
|||||||
deliveryDateType: "Lieferdatum",
|
deliveryDateType: "Lieferdatum",
|
||||||
dateOfPerformance: null,
|
dateOfPerformance: null,
|
||||||
paymentDays: profileStore.ownTenant.standardPaymentDays,
|
paymentDays: profileStore.ownTenant.standardPaymentDays,
|
||||||
|
customSurchargePercentage: 0,
|
||||||
createdBy: profileStore.activeProfile.id,
|
createdBy: profileStore.activeProfile.id,
|
||||||
title: null,
|
title: null,
|
||||||
description: null,
|
description: null,
|
||||||
@@ -333,6 +334,12 @@ const setCustomerData = () => {
|
|||||||
|
|
||||||
if(customer.customPaymentDays) itemInfo.value.paymentDays = customer.customPaymentDays
|
if(customer.customPaymentDays) itemInfo.value.paymentDays = customer.customPaymentDays
|
||||||
|
|
||||||
|
if(customer.customSurchargePercentage) itemInfo.value.customSurchargePercentage = customer.customSurchargePercentage
|
||||||
|
|
||||||
|
if(contacts.value.filter(i => i.customer === itemInfo.value.customer).length === 1) {
|
||||||
|
itemInfo.value.contact = contacts.value.filter(i => i.customer === itemInfo.value.customer)[0].id
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -504,7 +511,7 @@ const findDocumentErrors = computed(() => {
|
|||||||
|
|
||||||
if(!row.taxPercent && typeof row.taxPercent !== "number") errors.push({message: `In Position ${row.pos} ist kein Steuersatz hinterlegt`, type: "breaking"})
|
if(!row.taxPercent && typeof row.taxPercent !== "number") errors.push({message: `In Position ${row.pos} ist kein Steuersatz hinterlegt`, type: "breaking"})
|
||||||
if(!row.price && typeof row.price !== "number") errors.push({message: `In Position ${row.pos} ist kein Preis hinterlegt`, type: "breaking"})
|
if(!row.price && typeof row.price !== "number") errors.push({message: `In Position ${row.pos} ist kein Preis hinterlegt`, type: "breaking"})
|
||||||
|
if(!row.unit) errors.push({message: `In Position ${row.pos} ist keine Einheit hinterlegt`, type: "breaking"})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user