Ausgangsbelege um Kostenstellenzuordnung erweitern

This commit is contained in:
2026-05-26 16:21:24 +02:00
parent b59599cb92
commit cb09651d8d
11 changed files with 208 additions and 10 deletions

View File

@@ -0,0 +1,7 @@
ALTER TABLE "createddocuments" ADD COLUMN "costcentre" uuid;
--> statement-breakpoint
ALTER TABLE "services" ADD COLUMN "costcentre" uuid;
--> statement-breakpoint
ALTER TABLE "createddocuments" ADD CONSTRAINT "createddocuments_costcentre_costcentres_id_fk" FOREIGN KEY ("costcentre") REFERENCES "public"."costcentres"("id") ON DELETE no action ON UPDATE no action;
--> statement-breakpoint
ALTER TABLE "services" ADD CONSTRAINT "services_costcentre_costcentres_id_fk" FOREIGN KEY ("costcentre") REFERENCES "public"."costcentres"("id") ON DELETE no action ON UPDATE no action;

View File

@@ -344,6 +344,20 @@
"when": 1780174800000,
"tag": "0048_mobile_push_devices",
"breakpoints": true
},
{
"idx": 49,
"version": "7",
"when": 1780178400000,
"tag": "0049_email_cache",
"breakpoints": true
},
{
"idx": 50,
"version": "7",
"when": 1780261200000,
"tag": "0050_outgoing_document_costcentres",
"breakpoints": true
}
]
}

View File

@@ -20,6 +20,7 @@ import { plants } from "./plants"
import { authUsers } from "./auth_users"
import {serialExecutions} from "./serialexecutions";
import { outgoingsepamandates } from "./outgoingsepamandates"
import { costcentres } from "./costcentres"
export const createddocuments = pgTable("createddocuments", {
id: bigint("id", { mode: "number" })
@@ -49,6 +50,8 @@ export const createddocuments = pgTable("createddocuments", {
() => projects.id
),
costcentre: uuid("costcentre").references(() => costcentres.id),
documentNumber: text("documentNumber"),
documentDate: text("documentDate"),

View File

@@ -13,6 +13,7 @@ import {
import { tenants } from "./tenants"
import { units } from "./units"
import { authUsers } from "./auth_users"
import { costcentres } from "./costcentres"
export const services = pgTable("services", {
id: bigint("id", { mode: "number" })
@@ -35,6 +36,8 @@ export const services = pgTable("services", {
unit: bigint("unit", { mode: "number" }).references(() => units.id),
costcentre: uuid("costcentre").references(() => costcentres.id),
serviceNumber: bigint("serviceNumber", { mode: "number" }),
tags: jsonb("tags").default([]),