feat: Remove 'Beträge' section from invoice template
Remove all invoice totals elements: - invoice-subtotal (Zwischensumme) - invoice-tax (Mehrwertsteuer) - invoice-total (Gesamtbetrag) Remove 'Beträge' category from palette groups. Adjust positions of remaining elements (payment-terms, bank-details).
This commit is contained in:
@@ -42,9 +42,7 @@ const INVOICE_LOCKED_TEXT_PALETTE_IDS = new Set([
|
||||
"customer-city",
|
||||
"customer-email",
|
||||
"customer-phone",
|
||||
"invoice-subtotal",
|
||||
"invoice-tax",
|
||||
"invoice-total",
|
||||
|
||||
|
||||
"payment-terms",
|
||||
"bank-details",
|
||||
@@ -363,39 +361,6 @@ const INVOICE_PALETTE_ITEMS: PaletteItem[] = [
|
||||
defaultContent: (user) =>
|
||||
`Tel.: ${user?.phoneNumber ?? ""}\nE-Mail: ${user?.email ?? ""}`,
|
||||
},
|
||||
{
|
||||
id: "invoice-subtotal",
|
||||
category: "invoice-totals",
|
||||
label: "Zwischensumme",
|
||||
description: "Nettobetrag",
|
||||
width: 200,
|
||||
fontSize: 16,
|
||||
fontWeight: 600,
|
||||
textAlign: "right",
|
||||
defaultContent: () => "Zwischensumme: 95,00 €",
|
||||
},
|
||||
{
|
||||
id: "invoice-tax",
|
||||
category: "invoice-totals",
|
||||
label: "Mehrwertsteuer",
|
||||
description: "MwSt-Betrag",
|
||||
width: 200,
|
||||
fontSize: 16,
|
||||
fontWeight: 400,
|
||||
textAlign: "right",
|
||||
defaultContent: () => "MwSt. (19%): 18,05 €",
|
||||
},
|
||||
{
|
||||
id: "invoice-total",
|
||||
category: "invoice-totals",
|
||||
label: "Gesamtbetrag",
|
||||
description: "Bruttobetrag",
|
||||
width: 200,
|
||||
fontSize: 20,
|
||||
fontWeight: 700,
|
||||
textAlign: "right",
|
||||
defaultContent: () => "Gesamt: 113,05 €",
|
||||
},
|
||||
{
|
||||
id: "payment-terms",
|
||||
category: "invoice-footer",
|
||||
@@ -463,7 +428,7 @@ const INVOICE_PALETTE_GROUPS: Array<{ category: PaletteCategory; title: string }
|
||||
{ category: "invoice-header", title: "Rechnungskopf" },
|
||||
{ category: "customer-data", title: "Kundendaten" },
|
||||
{ category: "issuer-data", title: "Aussteller" },
|
||||
{ category: "invoice-totals", title: "Beträge" },
|
||||
|
||||
{ category: "invoice-footer", title: "Fußbereich" },
|
||||
{ category: "free-elements", title: "Freie Elemente" },
|
||||
];
|
||||
@@ -1001,12 +966,9 @@ function createInvoiceStarterLayout(user: UserOption | null, paletteItems: Palet
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-city"), user, { x: 140, y: 270 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "customer-number"), user, { x: 56, y: 290 }),
|
||||
horizontalLine(56, 330, 646),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-subtotal"), user, { x: 500, y: 460 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-tax"), user, { x: 500, y: 486 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "invoice-total"), user, { x: 500, y: 520 }),
|
||||
horizontalLine(56, 560, 646),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "payment-terms"), user, { x: 56, y: 580 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "bank-details"), user, { x: 56, y: 620 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "payment-terms"), user, { x: 56, y: 360 }),
|
||||
createElementFromPalette(requirePaletteItem(paletteItems, "bank-details"), user, { x: 56, y: 400 }),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user