Changed types

This commit is contained in:
2025-09-12 19:40:53 +02:00
parent af1bf82c75
commit 0fe16ad79e
12 changed files with 35 additions and 11 deletions

View File

@@ -18,8 +18,10 @@ const getCreatedDocumentTotal = (item) => {
totalNet = totalNet + Number(rowPrice)
if(row.taxPercent === 19) {
// @ts-ignore
total19 = total19 + Number(rowPrice * 0.19)
} else if(row.taxPercent === 7) {
// @ts-ignore
total7 = total7 + Number(rowPrice * 0.07)
}
}
@@ -168,10 +170,10 @@ export async function buildExportZip(server: FastifyInstance, tenant: number, st
let accountData = accounts.find(i => i.id === account.account)
let buschluessel = 9
let buschluessel: string = "9"
if(account.taxType === '19'){
buschluessel = 9
buschluessel = "9"
} else if(account.taxType === 'null') {
buschluessel = ""
} else if(account.taxType === '7') {

View File

@@ -7,7 +7,7 @@
*/
export function sortData<T extends Record<string, any>>(
data: T[],
column?: keyof T,
column?: keyof T | null,
ascending: boolean = true
): T[] {
if (!column) return data
@@ -27,6 +27,7 @@ export function sortData<T extends Record<string, any>>(
}
// Datumsvergleich
// @ts-ignore
if (valA instanceof Date && valB instanceof Date) {
return ascending ? valA.getTime() - valB.getTime() : valB.getTime() - valA.getTime()
}