Added Kostenschätzung und Packschein
This commit is contained in:
@@ -128,8 +128,11 @@ export const tenants = pgTable(
|
|||||||
customers: { prefix: "", suffix: "", nextNumber: 10000 },
|
customers: { prefix: "", suffix: "", nextNumber: 10000 },
|
||||||
products: { prefix: "AT-", suffix: "", nextNumber: 1000 },
|
products: { prefix: "AT-", suffix: "", nextNumber: 1000 },
|
||||||
quotes: { prefix: "AN-", suffix: "", nextNumber: 1000 },
|
quotes: { prefix: "AN-", suffix: "", nextNumber: 1000 },
|
||||||
|
costEstimates: { prefix: "KS-", suffix: "", nextNumber: 1000 },
|
||||||
confirmationOrders: { prefix: "AB-", suffix: "", nextNumber: 1000 },
|
confirmationOrders: { prefix: "AB-", suffix: "", nextNumber: 1000 },
|
||||||
invoices: { prefix: "RE-", suffix: "", nextNumber: 1000 },
|
invoices: { prefix: "RE-", suffix: "", nextNumber: 1000 },
|
||||||
|
deliveryNotes: { prefix: "LS-", suffix: "", nextNumber: 1000 },
|
||||||
|
packingSlips: { prefix: "PS-", suffix: "", nextNumber: 1000 },
|
||||||
spaces: { prefix: "LP-", suffix: "", nextNumber: 1000 },
|
spaces: { prefix: "LP-", suffix: "", nextNumber: 1000 },
|
||||||
customerspaces: { prefix: "KLP-", suffix: "", nextNumber: 1000 },
|
customerspaces: { prefix: "KLP-", suffix: "", nextNumber: 1000 },
|
||||||
inventoryitems: { prefix: "IA-", suffix: "", nextNumber: 1000 },
|
inventoryitems: { prefix: "IA-", suffix: "", nextNumber: 1000 },
|
||||||
|
|||||||
@@ -12,6 +12,13 @@ export const useNextNumberRangeNumber = async (
|
|||||||
tenantId: number,
|
tenantId: number,
|
||||||
numberRange: string
|
numberRange: string
|
||||||
) => {
|
) => {
|
||||||
|
const numberRangeFallbacks: Record<string, string> = {
|
||||||
|
costEstimates: "quotes",
|
||||||
|
packingSlips: "deliveryNotes",
|
||||||
|
advanceInvoices: "invoices",
|
||||||
|
cancellationInvoices: "invoices",
|
||||||
|
}
|
||||||
|
|
||||||
const [tenant] = await server.db
|
const [tenant] = await server.db
|
||||||
.select()
|
.select()
|
||||||
.from(tenants)
|
.from(tenants)
|
||||||
@@ -23,11 +30,15 @@ export const useNextNumberRangeNumber = async (
|
|||||||
|
|
||||||
const numberRanges = tenant.numberRanges || {}
|
const numberRanges = tenant.numberRanges || {}
|
||||||
|
|
||||||
if (!numberRanges[numberRange]) {
|
const resolvedNumberRange = numberRanges[numberRange]
|
||||||
|
? numberRange
|
||||||
|
: numberRangeFallbacks[numberRange]
|
||||||
|
|
||||||
|
if (!resolvedNumberRange || !numberRanges[resolvedNumberRange]) {
|
||||||
throw new Error(`Number range '${numberRange}' not found`)
|
throw new Error(`Number range '${numberRange}' not found`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const current = numberRanges[numberRange]
|
const current = numberRanges[resolvedNumberRange]
|
||||||
|
|
||||||
const usedNumber =
|
const usedNumber =
|
||||||
(current.prefix || "") +
|
(current.prefix || "") +
|
||||||
@@ -37,7 +48,7 @@ export const useNextNumberRangeNumber = async (
|
|||||||
const updatedRanges = {
|
const updatedRanges = {
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
...numberRanges,
|
...numberRanges,
|
||||||
[numberRange]: {
|
[resolvedNumberRange]: {
|
||||||
...current,
|
...current,
|
||||||
nextNumber: current.nextNumber + 1,
|
nextNumber: current.nextNumber + 1,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ const getDuration = (time) => {
|
|||||||
|
|
||||||
|
|
||||||
export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoiceData, backgroundPath:string) => {
|
export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoiceData, backgroundPath:string) => {
|
||||||
|
const deliveryNoteLikeDocumentTypes = ["deliveryNotes", "packingSlips"]
|
||||||
|
const isPackingSlip = invoiceData?.type === "packingSlips"
|
||||||
|
|
||||||
const genPDF = async (invoiceData, backgroundSourceBuffer) => {
|
const genPDF = async (invoiceData, backgroundSourceBuffer) => {
|
||||||
const pdfDoc = await PDFDocument.create()
|
const pdfDoc = await PDFDocument.create()
|
||||||
@@ -347,7 +349,19 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
font: fontBold
|
font: fontBold
|
||||||
})
|
})
|
||||||
|
|
||||||
if (invoiceData.type !== "deliveryNotes") {
|
if (isPackingSlip) {
|
||||||
|
pages[pageCounter - 1].drawText("Check", {
|
||||||
|
...getCoordinatesForPDFLib(180, 137, page1),
|
||||||
|
size: 12,
|
||||||
|
color: rgb(0, 0, 0),
|
||||||
|
lineHeight: 12,
|
||||||
|
opacity: 1,
|
||||||
|
maxWidth: 240,
|
||||||
|
font: fontBold
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!deliveryNoteLikeDocumentTypes.includes(invoiceData.type)) {
|
||||||
pages[pageCounter - 1].drawText("Steuer", {
|
pages[pageCounter - 1].drawText("Steuer", {
|
||||||
...getCoordinatesForPDFLib(135, 137, page1),
|
...getCoordinatesForPDFLib(135, 137, page1),
|
||||||
size: 12,
|
size: 12,
|
||||||
@@ -414,9 +428,21 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
maxWidth: 240
|
maxWidth: 240
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (isPackingSlip) {
|
||||||
|
pages[pageCounter - 1].drawRectangle({
|
||||||
|
...getCoordinatesForPDFLib(182, rowHeight + 1, page1),
|
||||||
|
width: 12,
|
||||||
|
height: 12,
|
||||||
|
borderColor: rgb(0, 0, 0),
|
||||||
|
borderWidth: 0.8,
|
||||||
|
opacity: 1,
|
||||||
|
borderOpacity: 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
let rowTextLines = 0
|
let rowTextLines = 0
|
||||||
|
|
||||||
if (invoiceData.type !== "deliveryNotes") {
|
if (!deliveryNoteLikeDocumentTypes.includes(invoiceData.type)) {
|
||||||
pages[pageCounter - 1].drawText(splitStringBySpace(row.text, 35).join("\n"), {
|
pages[pageCounter - 1].drawText(splitStringBySpace(row.text, 35).join("\n"), {
|
||||||
...getCoordinatesForPDFLib(52, rowHeight, page1),
|
...getCoordinatesForPDFLib(52, rowHeight, page1),
|
||||||
size: 10,
|
size: 10,
|
||||||
@@ -428,7 +454,7 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
rowTextLines = splitStringBySpace(row.text, 35).length
|
rowTextLines = splitStringBySpace(row.text, 35).length
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pages[pageCounter - 1].drawText(splitStringBySpace(row.text, 80).join("\n"), {
|
pages[pageCounter - 1].drawText(splitStringBySpace(row.text, isPackingSlip ? 68 : 80).join("\n"), {
|
||||||
...getCoordinatesForPDFLib(52, rowHeight, page1),
|
...getCoordinatesForPDFLib(52, rowHeight, page1),
|
||||||
size: 10,
|
size: 10,
|
||||||
color: rgb(0, 0, 0),
|
color: rgb(0, 0, 0),
|
||||||
@@ -437,13 +463,13 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
font: fontBold
|
font: fontBold
|
||||||
})
|
})
|
||||||
|
|
||||||
rowTextLines = splitStringBySpace(row.text, 80).length
|
rowTextLines = splitStringBySpace(row.text, isPackingSlip ? 68 : 80).length
|
||||||
}
|
}
|
||||||
|
|
||||||
let rowDescriptionLines = 0
|
let rowDescriptionLines = 0
|
||||||
|
|
||||||
if (row.descriptionText) {
|
if (row.descriptionText) {
|
||||||
if (invoiceData.type !== "deliveryNotes") {
|
if (!deliveryNoteLikeDocumentTypes.includes(invoiceData.type)) {
|
||||||
rowDescriptionLines = splitStringBySpace(row.descriptionText, 60).length
|
rowDescriptionLines = splitStringBySpace(row.descriptionText, 60).length
|
||||||
pages[pageCounter - 1].drawText(splitStringBySpace(row.descriptionText, 60).join("\n"), {
|
pages[pageCounter - 1].drawText(splitStringBySpace(row.descriptionText, 60).join("\n"), {
|
||||||
...getCoordinatesForPDFLib(52, rowHeight + (rowTextLines * 5), page1),
|
...getCoordinatesForPDFLib(52, rowHeight + (rowTextLines * 5), page1),
|
||||||
@@ -454,8 +480,8 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
rowDescriptionLines = splitStringBySpace(row.descriptionText, 80).length
|
rowDescriptionLines = splitStringBySpace(row.descriptionText, isPackingSlip ? 68 : 80).length
|
||||||
pages[pageCounter - 1].drawText(splitStringBySpace(row.descriptionText, 80).join("\n"), {
|
pages[pageCounter - 1].drawText(splitStringBySpace(row.descriptionText, isPackingSlip ? 68 : 80).join("\n"), {
|
||||||
...getCoordinatesForPDFLib(52, rowHeight + (rowTextLines * 5), page1),
|
...getCoordinatesForPDFLib(52, rowHeight + (rowTextLines * 5), page1),
|
||||||
size: 10,
|
size: 10,
|
||||||
color: rgb(0, 0, 0),
|
color: rgb(0, 0, 0),
|
||||||
@@ -466,7 +492,7 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (invoiceData.type !== "deliveryNotes") {
|
if (!deliveryNoteLikeDocumentTypes.includes(invoiceData.type)) {
|
||||||
pages[pageCounter - 1].drawText(`${row.taxPercent} %`, {
|
pages[pageCounter - 1].drawText(`${row.taxPercent} %`, {
|
||||||
...getCoordinatesForPDFLib(135, rowHeight, page1),
|
...getCoordinatesForPDFLib(135, rowHeight, page1),
|
||||||
size: 10,
|
size: 10,
|
||||||
@@ -632,7 +658,19 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
font: fontBold
|
font: fontBold
|
||||||
})
|
})
|
||||||
|
|
||||||
if (invoiceData.type !== "deliveryNotes") {
|
if (isPackingSlip) {
|
||||||
|
page.drawText("Check", {
|
||||||
|
...getCoordinatesForPDFLib(180, 22, page1),
|
||||||
|
size: 12,
|
||||||
|
color: rgb(0, 0, 0),
|
||||||
|
lineHeight: 12,
|
||||||
|
opacity: 1,
|
||||||
|
maxWidth: 240,
|
||||||
|
font: fontBold
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!deliveryNoteLikeDocumentTypes.includes(invoiceData.type)) {
|
||||||
page.drawText("Steuer", {
|
page.drawText("Steuer", {
|
||||||
...getCoordinatesForPDFLib(135, 22, page1),
|
...getCoordinatesForPDFLib(135, 22, page1),
|
||||||
size: 12,
|
size: 12,
|
||||||
@@ -742,7 +780,7 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
|
|
||||||
let endTextDiff = 35
|
let endTextDiff = 35
|
||||||
|
|
||||||
if (invoiceData.type !== "deliveryNotes") {
|
if (!deliveryNoteLikeDocumentTypes.includes(invoiceData.type)) {
|
||||||
pages[pageCounter - 1].drawLine({
|
pages[pageCounter - 1].drawLine({
|
||||||
start: getCoordinatesForPDFLib(20, rowHeight, page1),
|
start: getCoordinatesForPDFLib(20, rowHeight, page1),
|
||||||
end: getCoordinatesForPDFLib(198, rowHeight, page1),
|
end: getCoordinatesForPDFLib(198, rowHeight, page1),
|
||||||
@@ -864,10 +902,10 @@ export const createInvoicePDF = async (server:FastifyInstance, returnMode, invoi
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
maxWidth: 500
|
maxWidth: 500
|
||||||
})
|
})
|
||||||
|
|
||||||
return await pdfDoc.saveAsBase64()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return await pdfDoc.saveAsBase64()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const pdfBytes = await genPDF(invoiceData, await getBackgroundSourceBuffer(server,backgroundPath))
|
const pdfBytes = await genPDF(invoiceData, await getBackgroundSourceBuffer(server,backgroundPath))
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ const dataStore = useDataStore()
|
|||||||
const tempStore = useTempStore()
|
const tempStore = useTempStore()
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const deliveryNoteLikeDocumentTypes = ['deliveryNotes', 'packingSlips']
|
||||||
|
|
||||||
const createddocuments = ref([])
|
const createddocuments = ref([])
|
||||||
|
|
||||||
@@ -117,7 +118,7 @@ const getAvailableQueryStringData = (keys) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const invoiceDeliveryNotes = () => {
|
const invoiceDeliveryNotes = () => {
|
||||||
router.push(`/createDocument/edit?type=invoices&loadMode=deliveryNotes&linkedDocuments=[${props.item.createddocuments.filter(i => i.type === "deliveryNotes").map(i => i.id)}]`)
|
router.push(`/createDocument/edit?type=invoices&loadMode=deliveryNotes&linkedDocuments=[${props.item.createddocuments.filter(i => deliveryNoteLikeDocumentTypes.includes(i.type)).map(i => i.id)}]`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const showFinalInvoiceConfig = ref(false)
|
const showFinalInvoiceConfig = ref(false)
|
||||||
@@ -150,13 +151,18 @@ const selectItem = (item) => {
|
|||||||
@click="invoiceDeliveryNotes"
|
@click="invoiceDeliveryNotes"
|
||||||
v-if="props.topLevelType === 'projects'"
|
v-if="props.topLevelType === 'projects'"
|
||||||
>
|
>
|
||||||
Lieferscheine abrechnen
|
Lieferscheine/Packscheine abrechnen
|
||||||
</UButton>
|
</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'quotes'})}`)"
|
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'quotes'})}`)"
|
||||||
>
|
>
|
||||||
+ Angebot
|
+ Angebot
|
||||||
</UButton>
|
</UButton>
|
||||||
|
<UButton
|
||||||
|
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'costEstimates'})}`)"
|
||||||
|
>
|
||||||
|
+ Kostenschätzung
|
||||||
|
</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'confirmationOrders'})}`)"
|
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'confirmationOrders'})}`)"
|
||||||
>
|
>
|
||||||
@@ -167,6 +173,11 @@ const selectItem = (item) => {
|
|||||||
>
|
>
|
||||||
+ Lieferschein
|
+ Lieferschein
|
||||||
</UButton>
|
</UButton>
|
||||||
|
<UButton
|
||||||
|
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'packingSlips'})}`)"
|
||||||
|
>
|
||||||
|
+ Packschein
|
||||||
|
</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'advanceInvoices'})}`)"
|
@click="router.push(`/createDocument/edit/?${getAvailableQueryStringData({type: 'advanceInvoices'})}`)"
|
||||||
>
|
>
|
||||||
@@ -198,7 +209,7 @@ const selectItem = (item) => {
|
|||||||
label="Rechnungsvorlage"
|
label="Rechnungsvorlage"
|
||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:items="props.item.createddocuments.filter(i => ['confirmationOrders','quotes'].includes(i.type))"
|
:items="props.item.createddocuments.filter(i => ['confirmationOrders','quotes','costEstimates'].includes(i.type))"
|
||||||
value-key="id"
|
value-key="id"
|
||||||
label-key="documentNumber"
|
label-key="documentNumber"
|
||||||
v-model="referenceDocument"
|
v-model="referenceDocument"
|
||||||
@@ -304,7 +315,7 @@ const selectItem = (item) => {
|
|||||||
<span v-if="row.original.paymentDays && ['invoices','advanceInvoices'].includes(row.original.type)">{{ row.original.documentDate ? dayjs(row.original.documentDate).add(row.original.paymentDays,'day').format("DD.MM.YY") : '' }}</span>
|
<span v-if="row.original.paymentDays && ['invoices','advanceInvoices'].includes(row.original.type)">{{ row.original.documentDate ? dayjs(row.original.documentDate).add(row.original.paymentDays,'day').format("DD.MM.YY") : '' }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #amount-cell="{ row }">
|
<template #amount-cell="{ row }">
|
||||||
<span v-if="row.original.type !== 'deliveryNotes'">{{ useCurrency(useSum().getCreatedDocumentSum(row.original, createddocuments)) }}</span>
|
<span v-if="!deliveryNoteLikeDocumentTypes.includes(row.original.type)">{{ useCurrency(useSum().getCreatedDocumentSum(row.original, createddocuments)) }}</span>
|
||||||
</template>
|
</template>
|
||||||
</UTable>
|
</UTable>
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,26 @@
|
|||||||
"suffix": "",
|
"suffix": "",
|
||||||
"nextNumber": 1000
|
"nextNumber": 1000
|
||||||
},
|
},
|
||||||
|
"costEstimates": {
|
||||||
|
"prefix": "KS-",
|
||||||
|
"suffix": "",
|
||||||
|
"nextNumber": 1000
|
||||||
|
},
|
||||||
"confirmationOrders": {
|
"confirmationOrders": {
|
||||||
"prefix": "AB-",
|
"prefix": "AB-",
|
||||||
"suffix": "",
|
"suffix": "",
|
||||||
"nextNumber": 1000
|
"nextNumber": 1000
|
||||||
},
|
},
|
||||||
|
"deliveryNotes": {
|
||||||
|
"prefix": "LS-",
|
||||||
|
"suffix": "",
|
||||||
|
"nextNumber": 1000
|
||||||
|
},
|
||||||
|
"packingSlips": {
|
||||||
|
"prefix": "PS-",
|
||||||
|
"suffix": "",
|
||||||
|
"nextNumber": 1000
|
||||||
|
},
|
||||||
"invoices": {
|
"invoices": {
|
||||||
"prefix": "RE-",
|
"prefix": "RE-",
|
||||||
"suffix": "",
|
"suffix": "",
|
||||||
|
|||||||
@@ -12,6 +12,19 @@ const route = useRoute()
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const modal = useModal()
|
const modal = useModal()
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
|
const quoteLikeDocumentTypes = ["quotes", "costEstimates"]
|
||||||
|
const deliveryNoteLikeDocumentTypes = ["deliveryNotes", "packingSlips"]
|
||||||
|
const documentStorageFallbackTypes = {
|
||||||
|
costEstimates: "quotes",
|
||||||
|
packingSlips: "deliveryNotes",
|
||||||
|
advanceInvoices: "invoices",
|
||||||
|
cancellationInvoices: "invoices"
|
||||||
|
}
|
||||||
|
const textTemplateFallbackTypes = {
|
||||||
|
serialInvoices: "invoices",
|
||||||
|
costEstimates: "quotes",
|
||||||
|
packingSlips: "deliveryNotes"
|
||||||
|
}
|
||||||
|
|
||||||
const guard = ref(true)
|
const guard = ref(true)
|
||||||
|
|
||||||
@@ -303,7 +316,7 @@ const setupPage = async () => {
|
|||||||
itemInfo.value.rows.push(...linkedDocument.rows)
|
itemInfo.value.rows.push(...linkedDocument.rows)
|
||||||
}
|
}
|
||||||
|
|
||||||
for await (const doc of linkedDocuments.filter(i => i.type === "quotes")) {
|
for await (const doc of linkedDocuments.filter(i => quoteLikeDocumentTypes.includes(i.type))) {
|
||||||
let linkedDocument = await useEntities("createddocuments").selectSingle(doc.id)
|
let linkedDocument = await useEntities("createddocuments").selectSingle(doc.id)
|
||||||
|
|
||||||
itemInfo.value.rows.push({
|
itemInfo.value.rows.push({
|
||||||
@@ -471,20 +484,24 @@ const setDocumentTypeConfig = (withTexts = false) => {
|
|||||||
if (itemInfo.value.type === "invoices" || itemInfo.value.type === "advanceInvoices" || itemInfo.value.type === "serialInvoices" || itemInfo.value.type === "cancellationInvoices") {
|
if (itemInfo.value.type === "invoices" || itemInfo.value.type === "advanceInvoices" || itemInfo.value.type === "serialInvoices" || itemInfo.value.type === "cancellationInvoices") {
|
||||||
itemInfo.value.documentNumberTitle = "Rechnungsnummer"
|
itemInfo.value.documentNumberTitle = "Rechnungsnummer"
|
||||||
itemInfo.value.title = `Rechnung-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
itemInfo.value.title = `Rechnung-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
||||||
} else if (itemInfo.value.type === "quotes") {
|
} else if (quoteLikeDocumentTypes.includes(itemInfo.value.type)) {
|
||||||
itemInfo.value.documentNumberTitle = "Angebotsnummer"
|
const titlePrefix = itemInfo.value.type === "costEstimates" ? "Kostenschätzung" : "Angebot"
|
||||||
itemInfo.value.title = `Angebot-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
itemInfo.value.documentNumberTitle = itemInfo.value.type === "costEstimates" ? "Kostenschätzungsnummer" : "Angebotsnummer"
|
||||||
} else if (itemInfo.value.type === "deliveryNotes") {
|
itemInfo.value.title = `${titlePrefix}-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
||||||
itemInfo.value.documentNumberTitle = "Lieferscheinnummer"
|
} else if (deliveryNoteLikeDocumentTypes.includes(itemInfo.value.type)) {
|
||||||
itemInfo.value.title = `Lieferschein-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
const titlePrefix = itemInfo.value.type === "packingSlips" ? "Packschein" : "Lieferschein"
|
||||||
|
itemInfo.value.documentNumberTitle = itemInfo.value.type === "packingSlips" ? "Packscheinnummer" : "Lieferscheinnummer"
|
||||||
|
itemInfo.value.title = `${titlePrefix}-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
||||||
} else if (itemInfo.value.type === "confirmationOrders") {
|
} else if (itemInfo.value.type === "confirmationOrders") {
|
||||||
itemInfo.value.documentNumberTitle = "Auftragsbestätigungsnr."
|
itemInfo.value.documentNumberTitle = "Auftragsbestätigungsnr."
|
||||||
itemInfo.value.title = `Auftragsbestätigung-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
itemInfo.value.title = `Auftragsbestätigung-Nr. ${itemInfo.value.documentNumber ? itemInfo.value.documentNumber : "XXXX"}`
|
||||||
}
|
}
|
||||||
|
|
||||||
if (withTexts) {
|
if (withTexts) {
|
||||||
itemInfo.value.startText = getTextTemplateByType(itemInfo.value.type).find(i => i.default && i.pos === "startText").text
|
const startTemplate = getTextTemplateByType(itemInfo.value.type).find(i => i.default && i.pos === "startText")
|
||||||
itemInfo.value.endText = getTextTemplateByType(itemInfo.value.type).find(i => i.default && i.pos === "endText").text
|
const endTemplate = getTextTemplateByType(itemInfo.value.type).find(i => i.default && i.pos === "endText")
|
||||||
|
itemInfo.value.startText = startTemplate?.text || null
|
||||||
|
itemInfo.value.endText = endTemplate?.text || null
|
||||||
//itemInfo.value.startText = texttemplates.value.find(i => i.documentType === itemInfo.value.type && i.default && i.pos === "startText").text
|
//itemInfo.value.startText = texttemplates.value.find(i => i.documentType === itemInfo.value.type && i.default && i.pos === "startText").text
|
||||||
//itemInfo.value.endText = texttemplates.value.find(i => i.documentType === itemInfo.value.type && i.default && i.pos === "endText").text
|
//itemInfo.value.endText = texttemplates.value.find(i => i.documentType === itemInfo.value.type && i.default && i.pos === "endText").text
|
||||||
}
|
}
|
||||||
@@ -771,16 +788,16 @@ const findDocumentErrors = computed(() => {
|
|||||||
} else {
|
} else {
|
||||||
itemInfo.value.rows.forEach((row,index) => {
|
itemInfo.value.rows.forEach((row,index) => {
|
||||||
|
|
||||||
if (itemInfo.value.type !== "quotes" && row.optional) {
|
if (!quoteLikeDocumentTypes.includes(itemInfo.value.type) && row.optional) {
|
||||||
errors.push({
|
errors.push({
|
||||||
message: `Position ${row.pos} ist als Optional markiert. Dies wird nur in Angeboten unterstützt.`,
|
message: `Position ${row.pos} ist als Optional markiert. Dies wird nur in Angeboten und Kostenschätzungen unterstützt.`,
|
||||||
type: "breaking"
|
type: "breaking"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if (itemInfo.value.type !== "quotes" && row.alternative) {
|
if (!quoteLikeDocumentTypes.includes(itemInfo.value.type) && row.alternative) {
|
||||||
errors.push({
|
errors.push({
|
||||||
message: `Position ${row.pos} ist als Alternativ markiert. Dies wird nur in Angeboten unterstützt.`,
|
message: `Position ${row.pos} ist als Alternativ markiert. Dies wird nur in Angeboten und Kostenschätzungen unterstützt.`,
|
||||||
type: "breaking"
|
type: "breaking"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -805,11 +822,11 @@ const findDocumentErrors = computed(() => {
|
|||||||
|
|
||||||
if (["normal", "service", "free"].includes(row.mode)) {
|
if (["normal", "service", "free"].includes(row.mode)) {
|
||||||
|
|
||||||
if (!row.taxPercent && typeof row.taxPercent !== "number" && itemInfo.value.type !== "deliveryNotes") errors.push({
|
if (!row.taxPercent && typeof row.taxPercent !== "number" && !deliveryNoteLikeDocumentTypes.includes(itemInfo.value.type)) errors.push({
|
||||||
message: `In Position ${row.pos} ist kein Steuersatz hinterlegt`,
|
message: `In Position ${row.pos} ist kein Steuersatz hinterlegt`,
|
||||||
type: "breaking"
|
type: "breaking"
|
||||||
})
|
})
|
||||||
if (!row.price && typeof row.price !== "number" && itemInfo.value.type !== "deliveryNotes") errors.push({
|
if (!row.price && typeof row.price !== "number" && !deliveryNoteLikeDocumentTypes.includes(itemInfo.value.type)) errors.push({
|
||||||
message: `In Position ${row.pos} ist kein Preis hinterlegt`,
|
message: `In Position ${row.pos} ist kein Preis hinterlegt`,
|
||||||
type: "breaking"
|
type: "breaking"
|
||||||
})
|
})
|
||||||
@@ -1421,12 +1438,7 @@ const saveDocument = async (state, resetup = false) => {
|
|||||||
if (state !== "Entwurf") {
|
if (state !== "Entwurf") {
|
||||||
console.log("???")
|
console.log("???")
|
||||||
|
|
||||||
let type = ""
|
const type = itemInfo.value.type
|
||||||
if (itemInfo.value.type === "advanceInvoices" || itemInfo.value.type === "cancellationInvoices") {
|
|
||||||
type = "invoices"
|
|
||||||
} else {
|
|
||||||
type = itemInfo.value.type
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
itemInfo.value.documentNumber = await useFunctions().useNextNumber(type) //data.usedNumber
|
itemInfo.value.documentNumber = await useFunctions().useNextNumber(type) //data.usedNumber
|
||||||
@@ -1466,7 +1478,7 @@ const saveDocument = async (state, resetup = false) => {
|
|||||||
|
|
||||||
let createData = {
|
let createData = {
|
||||||
type: itemInfo.value.type,
|
type: itemInfo.value.type,
|
||||||
taxType: ['invoices', 'cancellationInvoices', 'advanceInvoices', 'quotes', 'confirmationOrders'].includes(itemInfo.value.type) ? normalizeTaxTypeValue(itemInfo.value.taxType) : null,
|
taxType: ['invoices', 'cancellationInvoices', 'advanceInvoices', 'confirmationOrders', ...quoteLikeDocumentTypes].includes(itemInfo.value.type) ? normalizeTaxTypeValue(itemInfo.value.taxType) : null,
|
||||||
state: itemInfo.value.state || "Entwurf",
|
state: itemInfo.value.state || "Entwurf",
|
||||||
customer: itemInfo.value.customer,
|
customer: itemInfo.value.customer,
|
||||||
contact: itemInfo.value.contact,
|
contact: itemInfo.value.contact,
|
||||||
@@ -1529,11 +1541,7 @@ const closeDocument = async () => {
|
|||||||
fileData.project = itemInfo.value.project
|
fileData.project = itemInfo.value.project
|
||||||
fileData.createddocument = itemInfo.value.id
|
fileData.createddocument = itemInfo.value.id
|
||||||
|
|
||||||
let mappedType = itemInfo.value.type
|
let mappedType = documentStorageFallbackTypes[itemInfo.value.type] || itemInfo.value.type
|
||||||
|
|
||||||
if (mappedType === "advanceInvoices" || mappedType === "cancellationInvoices") {
|
|
||||||
mappedType = "invoices"
|
|
||||||
}
|
|
||||||
|
|
||||||
const folders = await useEntities("folders").select()
|
const folders = await useEntities("folders").select()
|
||||||
console.log(folders)
|
console.log(folders)
|
||||||
@@ -1571,11 +1579,7 @@ const closeDocument = async () => {
|
|||||||
|
|
||||||
const getTextTemplateByType = (type, pos) => {
|
const getTextTemplateByType = (type, pos) => {
|
||||||
|
|
||||||
let finalType = type
|
const finalType = textTemplateFallbackTypes[type] || type
|
||||||
|
|
||||||
if (type === "serialInvoices") {
|
|
||||||
finalType = "invoices"
|
|
||||||
}
|
|
||||||
|
|
||||||
if (pos) {
|
if (pos) {
|
||||||
return texttemplates.value.filter(i => i.documentType === finalType && i.pos === pos)
|
return texttemplates.value.filter(i => i.documentType === finalType && i.pos === pos)
|
||||||
@@ -1806,7 +1810,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
|
|
||||||
<UFormField
|
<UFormField
|
||||||
label="Steuertyp:"
|
label="Steuertyp:"
|
||||||
v-if="['invoices','advanceInvoices','quotes','confirmationOrders','serialInvoices'].includes(itemInfo.type)"
|
v-if="['invoices','advanceInvoices','confirmationOrders','serialInvoices', ...quoteLikeDocumentTypes].includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:items="taxTypeItems"
|
:items="taxTypeItems"
|
||||||
@@ -2498,11 +2502,11 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
<th class="pl-2">Name</th>
|
<th class="pl-2">Name</th>
|
||||||
<th class="pl-2">Menge</th>
|
<th class="pl-2">Menge</th>
|
||||||
<th class="pl-2">Einheit</th>
|
<th class="pl-2">Einheit</th>
|
||||||
<th class="pl-2" v-if="itemInfo.type !== 'deliveryNotes'">Preis</th>
|
<th class="pl-2" v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)">Preis</th>
|
||||||
<!-- <th class="pl-2" v-if="itemInfo.type !== 'deliveryNotes'">Steuer</th>
|
<!-- <th class="pl-2" v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)">Steuer</th>
|
||||||
<th class="pl-2" v-if="itemInfo.type !== 'deliveryNotes'">Rabatt</th>-->
|
<th class="pl-2" v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)">Rabatt</th>-->
|
||||||
<th class="pl-2"></th>
|
<th class="pl-2"></th>
|
||||||
<th class="pl-2" v-if="itemInfo.type !== 'deliveryNotes'">Gesamt</th>
|
<th class="pl-2" v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)">Gesamt</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<draggable
|
<draggable
|
||||||
@@ -2730,7 +2734,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
class="w-full"
|
class="w-full"
|
||||||
v-if="!['pagebreak','title','text'].includes(row.mode) && itemInfo.type !== 'deliveryNotes'"
|
v-if="!['pagebreak','title','text'].includes(row.mode) && !deliveryNoteLikeDocumentTypes.includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
<UInput
|
<UInput
|
||||||
v-model="row.inputPrice"
|
v-model="row.inputPrice"
|
||||||
@@ -2762,7 +2766,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
</td>
|
</td>
|
||||||
<!-- <td
|
<!-- <td
|
||||||
class="w-40"
|
class="w-40"
|
||||||
v-if="!['pagebreak','title','text'].includes(row.mode)&& itemInfo.type !== 'deliveryNotes'"
|
v-if="!['pagebreak','title','text'].includes(row.mode)&& !deliveryNoteLikeDocumentTypes.includes(itemInfo.type)"
|
||||||
|
|
||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
@@ -2781,7 +2785,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
</td>-->
|
</td>-->
|
||||||
<!-- <td
|
<!-- <td
|
||||||
class="w-40"
|
class="w-40"
|
||||||
v-if="!['pagebreak','title','text'].includes(row.mode)&& itemInfo.type !== 'deliveryNotes'"
|
v-if="!['pagebreak','title','text'].includes(row.mode)&& !deliveryNoteLikeDocumentTypes.includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
<UInput
|
<UInput
|
||||||
v-model="row.discountPercent"
|
v-model="row.discountPercent"
|
||||||
@@ -2859,7 +2863,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
|
|
||||||
<UFormField
|
<UFormField
|
||||||
label="Einzelpreis:"
|
label="Einzelpreis:"
|
||||||
v-if="itemInfo.type !== 'deliveryNotes'"
|
v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
<UInput
|
<UInput
|
||||||
v-model="row.inputPrice"
|
v-model="row.inputPrice"
|
||||||
@@ -2891,7 +2895,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
<UFormField
|
<UFormField
|
||||||
label="Umsatzsteuer:"
|
label="Umsatzsteuer:"
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
v-if="itemInfo.type !== 'deliveryNotes'"
|
v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
<USelectMenu
|
<USelectMenu
|
||||||
:items="taxPercentItems"
|
:items="taxPercentItems"
|
||||||
@@ -2911,7 +2915,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
<UFormField
|
<UFormField
|
||||||
label="Rabatt:"
|
label="Rabatt:"
|
||||||
class="mt-3"
|
class="mt-3"
|
||||||
v-if="itemInfo.type !== 'deliveryNotes'"
|
v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
<UInput
|
<UInput
|
||||||
v-model="row.discountPercent"
|
v-model="row.discountPercent"
|
||||||
@@ -3066,7 +3070,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
</UModal>
|
</UModal>
|
||||||
</td>
|
</td>
|
||||||
<td
|
<td
|
||||||
v-if="!['pagebreak','title','text'].includes(row.mode) && itemInfo.type !== 'deliveryNotes'"
|
v-if="!['pagebreak','title','text'].includes(row.mode) && !deliveryNoteLikeDocumentTypes.includes(itemInfo.type)"
|
||||||
>
|
>
|
||||||
|
|
||||||
<p class="text-right font-bold whitespace-nowrap">
|
<p class="text-right font-bold whitespace-nowrap">
|
||||||
@@ -3200,7 +3204,7 @@ const setRowData = async (row, service = {sellingPriceComposed: {}}, product = {
|
|||||||
<USeparator class="my-3" v-if="itemInfo.rows.length > 0" label="Auswertung & Gesamt"/>
|
<USeparator class="my-3" v-if="itemInfo.rows.length > 0" label="Auswertung & Gesamt"/>
|
||||||
|
|
||||||
|
|
||||||
<div class="w-full flex justify-between" v-if="itemInfo.type !== 'deliveryNotes'">
|
<div class="w-full flex justify-between" v-if="!deliveryNoteLikeDocumentTypes.includes(itemInfo.type)">
|
||||||
<table class="w-1/2" v-if="itemInfo.rows.length > 0">
|
<table class="w-1/2" v-if="itemInfo.rows.length > 0">
|
||||||
<tr v-if="documentReport.totalProductsPurchasePrice !== 0">
|
<tr v-if="documentReport.totalProductsPurchasePrice !== 0">
|
||||||
<td>Einkaufspreis Artikel Gesamt:</td>
|
<td>Einkaufspreis Artikel Gesamt:</td>
|
||||||
|
|||||||
@@ -124,12 +124,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #amount-cell="{row}">
|
<template #amount-cell="{row}">
|
||||||
<span v-if="row.original.type !== 'deliveryNotes'">{{ displayCurrency(useSum().getCreatedDocumentSum(row.original, items)) }}</span>
|
<span v-if="!deliveryNoteLikeDocumentTypes.includes(row.original.type)">{{ displayCurrency(useSum().getCreatedDocumentSum(row.original, items)) }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #amountOpen-cell="{row}">
|
<template #amountOpen-cell="{row}">
|
||||||
<span
|
<span
|
||||||
v-if="!['deliveryNotes','cancellationInvoices','quotes','confirmationOrders'].includes(row.original.type) && row.original.state !== 'Entwurf' && !hasCancellationInvoice(row.original) && !useSum().getIsPaid(row.original,items) ">
|
v-if="!['cancellationInvoices','confirmationOrders', ...quoteLikeDocumentTypes, ...deliveryNoteLikeDocumentTypes].includes(row.original.type) && row.original.state !== 'Entwurf' && !hasCancellationInvoice(row.original) && !useSum().getIsPaid(row.original,items) ">
|
||||||
{{ displayCurrency(useSum().getCreatedDocumentOpenAmount(row.original, items)) }}
|
{{ displayCurrency(useSum().getCreatedDocumentOpenAmount(row.original, items)) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
@@ -146,6 +146,8 @@ import { ref, computed, watch } from 'vue';
|
|||||||
const dataStore = useDataStore()
|
const dataStore = useDataStore()
|
||||||
const tempStore = useTempStore()
|
const tempStore = useTempStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const quoteLikeDocumentTypes = ['quotes', 'costEstimates']
|
||||||
|
const deliveryNoteLikeDocumentTypes = ['deliveryNotes', 'packingSlips']
|
||||||
|
|
||||||
const type = "createddocuments"
|
const type = "createddocuments"
|
||||||
const dataType = dataStore.dataTypes[type]
|
const dataType = dataStore.dataTypes[type]
|
||||||
@@ -238,7 +240,9 @@ const templateTypes = [
|
|||||||
{ key: "drafts", label: "Entwürfe" },
|
{ key: "drafts", label: "Entwürfe" },
|
||||||
{ key: "invoices", label: "Rechnungen" },
|
{ key: "invoices", label: "Rechnungen" },
|
||||||
{ key: "quotes", label: "Angebote" },
|
{ key: "quotes", label: "Angebote" },
|
||||||
|
{ key: "costEstimates", label: "Kostenschätzungen" },
|
||||||
{ key: "deliveryNotes", label: "Lieferscheine" },
|
{ key: "deliveryNotes", label: "Lieferscheine" },
|
||||||
|
{ key: "packingSlips", label: "Packscheine" },
|
||||||
{ key: "confirmationOrders", label: "Auftragsbestätigungen" }
|
{ key: "confirmationOrders", label: "Auftragsbestätigungen" }
|
||||||
]
|
]
|
||||||
const selectedTypes = ref(tempStore.filters["createddocuments"] ? tempStore.filters["createddocuments"] : templateTypes)
|
const selectedTypes = ref(tempStore.filters["createddocuments"] ? tempStore.filters["createddocuments"] : templateTypes)
|
||||||
|
|||||||
@@ -262,12 +262,18 @@ const addPhase = () => {
|
|||||||
<UButton
|
<UButton
|
||||||
class="my-1"
|
class="my-1"
|
||||||
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Angebot',link:'/createDocument/edit/?type=quotes'})">Angebot Erstellen</UButton>
|
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Angebot',link:'/createDocument/edit/?type=quotes'})">Angebot Erstellen</UButton>
|
||||||
|
<UButton
|
||||||
|
class="my-1"
|
||||||
|
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Kostenschätzung',link:'/createDocument/edit/?type=costEstimates'})">Kostenschätzung Erstellen</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
class="my-1"
|
class="my-1"
|
||||||
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Auftrag',link:'/createDocument/edit/?type=confirmationOrders'})">Auftrag Erstellen</UButton>
|
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Auftrag',link:'/createDocument/edit/?type=confirmationOrders'})">Auftrag Erstellen</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
class="my-1"
|
class="my-1"
|
||||||
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Lieferschein',link:'/createDocument/edit/?type=deliveryNotes'})">Lieferschein Erstellen</UButton>
|
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Lieferschein',link:'/createDocument/edit/?type=deliveryNotes'})">Lieferschein Erstellen</UButton>
|
||||||
|
<UButton
|
||||||
|
class="my-1"
|
||||||
|
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Packschein',link:'/createDocument/edit/?type=packingSlips'})">Packschein Erstellen</UButton>
|
||||||
<UButton
|
<UButton
|
||||||
class="my-1"
|
class="my-1"
|
||||||
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Rechnung',link:'/createDocument/edit/?type=invoices'})">Rechnung Erstellen</UButton>
|
@click="itemInfo.initialPhases[itemInfo.initialPhases.findIndex(i=> i.key === selectedKeyForQuickAction)].quickactions.push({label:'+ Rechnung',link:'/createDocument/edit/?type=invoices'})">Rechnung Erstellen</UButton>
|
||||||
|
|||||||
@@ -23,6 +23,9 @@ const resources = {
|
|||||||
quotes: {
|
quotes: {
|
||||||
label: "Angebote"
|
label: "Angebote"
|
||||||
},
|
},
|
||||||
|
costEstimates: {
|
||||||
|
label: "Kostenschätzungen"
|
||||||
|
},
|
||||||
inventoryitems: {
|
inventoryitems: {
|
||||||
label: "Inventarartikel"
|
label: "Inventarartikel"
|
||||||
},
|
},
|
||||||
@@ -38,6 +41,9 @@ const resources = {
|
|||||||
deliveryNotes: {
|
deliveryNotes: {
|
||||||
label: "Lieferscheine"
|
label: "Lieferscheine"
|
||||||
},
|
},
|
||||||
|
packingSlips: {
|
||||||
|
label: "Packscheine"
|
||||||
|
},
|
||||||
costcentres: {
|
costcentres: {
|
||||||
label: "Kostenstellen"
|
label: "Kostenstellen"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3458,10 +3458,18 @@ export const useDataStore = defineStore('data', () => {
|
|||||||
label: "Angebote",
|
label: "Angebote",
|
||||||
labelSingle: "Angebot"
|
labelSingle: "Angebot"
|
||||||
},
|
},
|
||||||
|
costEstimates: {
|
||||||
|
label: "Kostenschätzungen",
|
||||||
|
labelSingle: "Kostenschätzung"
|
||||||
|
},
|
||||||
deliveryNotes: {
|
deliveryNotes: {
|
||||||
label: "Lieferscheine",
|
label: "Lieferscheine",
|
||||||
labelSingle: "Lieferschein"
|
labelSingle: "Lieferschein"
|
||||||
},
|
},
|
||||||
|
packingSlips: {
|
||||||
|
label: "Packscheine",
|
||||||
|
labelSingle: "Packschein"
|
||||||
|
},
|
||||||
confirmationOrders: {
|
confirmationOrders: {
|
||||||
label: "Auftragsbestätigungen",
|
label: "Auftragsbestätigungen",
|
||||||
labelSingle: "Auftragsbestätigung"
|
labelSingle: "Auftragsbestätigung"
|
||||||
|
|||||||
@@ -69,8 +69,10 @@ function formatDocType(value: unknown): string {
|
|||||||
advanceInvoices: 'Abschlagsrechnung',
|
advanceInvoices: 'Abschlagsrechnung',
|
||||||
cancellationInvoices: 'Stornorechnung',
|
cancellationInvoices: 'Stornorechnung',
|
||||||
quotes: 'Angebot',
|
quotes: 'Angebot',
|
||||||
|
costEstimates: 'Kostenschätzung',
|
||||||
confirmationOrders: 'Auftragsbestätigung',
|
confirmationOrders: 'Auftragsbestätigung',
|
||||||
deliveryNotes: 'Lieferschein',
|
deliveryNotes: 'Lieferschein',
|
||||||
|
packingSlips: 'Packschein',
|
||||||
};
|
};
|
||||||
return labels[type] || type;
|
return labels[type] || type;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user