Checkpoint: Ajout de 3 champs métier aux factures (Service concerné, Type d'achat, Ventilation comptable) avec interface d'administration pour gérer les listes enrichissables. Les champs apparaissent dans la liste des factures et dans le formulaire d'édition.

This commit is contained in:
Manus
2026-02-11 08:03:30 -05:00
parent 280abba902
commit 4a8be36d00
12 changed files with 1665 additions and 4 deletions

View File

@@ -0,0 +1,21 @@
CREATE TABLE `accountingAllocationList` (
`id` int AUTO_INCREMENT NOT NULL,
`userId` int NOT NULL,
`name` varchar(100) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT (now()),
CONSTRAINT `accountingAllocationList_id` PRIMARY KEY(`id`),
CONSTRAINT `user_allocation_unique` UNIQUE(`userId`,`name`)
);
--> statement-breakpoint
CREATE TABLE `departmentList` (
`id` int AUTO_INCREMENT NOT NULL,
`userId` int NOT NULL,
`name` varchar(100) NOT NULL,
`createdAt` timestamp NOT NULL DEFAULT (now()),
CONSTRAINT `departmentList_id` PRIMARY KEY(`id`),
CONSTRAINT `user_department_unique` UNIQUE(`userId`,`name`)
);
--> statement-breakpoint
ALTER TABLE `invoices` ADD `serviceConcerne` varchar(100);--> statement-breakpoint
ALTER TABLE `invoices` ADD `typeAchat` enum('CAPEX','OPEX');--> statement-breakpoint
ALTER TABLE `invoices` ADD `ventilationComptable` varchar(100);