Implement navigation and view management in DataViewer, adding Dashboard and TableManagement components. Update export data handling based on current view. Create new components for managing Kreditor, Konto, and BU tables with CRUD functionality. Refactor admin routes to remove admin access checks and streamline data handling for various entities.
This commit is contained in:
@@ -49,7 +49,8 @@ ADD CONSTRAINT UQ_Konto_konto UNIQUE (konto);
|
||||
CREATE TABLE fibdash.BU (
|
||||
id INT IDENTITY(1,1) PRIMARY KEY,
|
||||
bu NVARCHAR(10) NOT NULL,
|
||||
name NVARCHAR(255) NOT NULL
|
||||
name NVARCHAR(255) NOT NULL,
|
||||
vst DECIMAL(5,2) -- Vorsteuer percentage (e.g., 19.00 for 19%)
|
||||
);
|
||||
|
||||
-- Ensure BU.bu is unique to support FK references
|
||||
@@ -103,6 +104,22 @@ ALTER TABLE fibdash.AccountingItems
|
||||
ADD CONSTRAINT FK_AccountingItems_Konto_Konto
|
||||
FOREIGN KEY (konto) REFERENCES fibdash.Konto(konto);
|
||||
|
||||
-- Add vst column to existing BU table (for databases created before this update)
|
||||
-- IF NOT EXISTS (SELECT * FROM sys.columns WHERE object_id = OBJECT_ID('fibdash.BU') AND name = 'vst')
|
||||
-- BEGIN
|
||||
-- ALTER TABLE fibdash.BU ADD vst DECIMAL(5,2);
|
||||
-- END
|
||||
|
||||
-- Insert sample data (optional)
|
||||
-- INSERT INTO fibdash.Kreditor (iban, name, kreditorId)
|
||||
-- VALUES ('DE89370400440532013000', 'Sample Kreditor', '70001');
|
||||
-- VALUES ('DE89370400440532013000', 'Sample Kreditor', '70001');
|
||||
|
||||
-- INSERT INTO fibdash.Konto (konto, name) VALUES
|
||||
-- ('5400', 'Wareneingang 19%'),
|
||||
-- ('5600', 'Nicht abziehbare Vorsteuer');
|
||||
|
||||
-- INSERT INTO fibdash.BU (bu, name, vst) VALUES
|
||||
-- ('9', '19% VST', 19.00),
|
||||
-- ('8', '7% VST', 7.00),
|
||||
-- ('506', 'Dienstleistung aus EU', NULL),
|
||||
-- ('511', 'Dienstleistung außerhalb EU', NULL);
|
||||
Reference in New Issue
Block a user