feat(accounting): Skontobedingungen auf Belegen und automatische Skonto-Vorschläge
Ausgangs- und Eingangsbelege erhalten Skontosatz und Frist, mit Vorgaben bei Kunden und Lieferanten. Das PDF ergänzt automatisch einen Skontohinweis (oder nutzt neue Textvorlagen-Variablen); bei Schlussrechnungen gilt der Skonto für die Restforderung. Skontobedingungen werden aus E-Rechnungen (#SKONTO# und ZUGFeRD) sowie von der KI-Vorbereitung übernommen. Die Bankzuordnung erkennt Zahlungen abzüglich Skonto innerhalb der Frist und bietet sie in der Vorschlagsübersicht direkt an. BWA-Erlöse und -Aufwand berücksichtigen gebuchten Skonto im Zeitraum der Zahlung. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,8 @@ export const createddocuments = pgTable("createddocuments", {
|
||||
|
||||
deliveryDateType: text("deliveryDateType"),
|
||||
paymentDays: smallint("paymentDays"),
|
||||
cashDiscountPercent: doublePrecision("cashDiscountPercent"),
|
||||
cashDiscountDays: smallint("cashDiscountDays"),
|
||||
deliveryDate: text("deliveryDate"),
|
||||
|
||||
contactPerson: uuid("contactPerson"),
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
jsonb,
|
||||
smallint,
|
||||
uuid,
|
||||
doublePrecision,
|
||||
} from "drizzle-orm/pg-core"
|
||||
import { tenants } from "./tenants"
|
||||
import { authUsers } from "./auth_users"
|
||||
@@ -41,6 +42,8 @@ export const customers = pgTable(
|
||||
profiles: jsonb("profiles").notNull().default([]),
|
||||
|
||||
customPaymentDays: smallint("customPaymentDays"),
|
||||
customCashDiscountPercent: doublePrecision("customCashDiscountPercent"),
|
||||
customCashDiscountDays: smallint("customCashDiscountDays"),
|
||||
|
||||
firstname: text("firstname"),
|
||||
lastname: text("lastname"),
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
jsonb,
|
||||
numeric,
|
||||
uuid,
|
||||
doublePrecision,
|
||||
} from "drizzle-orm/pg-core"
|
||||
|
||||
import { vendors } from "./vendors"
|
||||
@@ -36,6 +37,8 @@ export const incominginvoices = pgTable("incominginvoices", {
|
||||
document: bigint("document", { mode: "number" }),
|
||||
|
||||
dueDate: text("dueDate"),
|
||||
cashDiscountPercent: doublePrecision("cashDiscountPercent"),
|
||||
cashDiscountDueDate: text("cashDiscountDueDate"),
|
||||
|
||||
description: text("description"),
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ import {
|
||||
boolean,
|
||||
jsonb,
|
||||
uuid,
|
||||
doublePrecision,
|
||||
smallint,
|
||||
} from "drizzle-orm/pg-core"
|
||||
|
||||
import { tenants } from "./tenants"
|
||||
@@ -36,6 +38,8 @@ export const vendors = pgTable("vendors", {
|
||||
archived: boolean("archived").notNull().default(false),
|
||||
|
||||
defaultPaymentMethod: text("defaultPaymentMethod"),
|
||||
cashDiscountPercent: doublePrecision("cashDiscountPercent"),
|
||||
cashDiscountDays: smallint("cashDiscountDays"),
|
||||
|
||||
updatedAt: timestamp("updated_at", { withTimezone: true }),
|
||||
updatedBy: uuid("updated_by").references(() => authUsers.id),
|
||||
|
||||
Reference in New Issue
Block a user