10ecdfa2e4
Adds the SQL Server Data Tools project for the fuchs_fds database — tables, table types, functions and stored procedures that the backend calls (e.g. fds__getInvoice, fds__merge_bankingtransactions, fds__tt__bankingtransactions, fds__admin_getReportCatalog, fis_* auth). Build/model caches (bin, obj, *.dbmdl, *.jfm, *.user) are git-ignored. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
28 lines
709 B
Transact-SQL
28 lines
709 B
Transact-SQL
-- =============================================
|
|
-- Author: <Author,,Name>
|
|
-- Create date: <Create Date,,>
|
|
-- Description: <Description,,>
|
|
-- =============================================
|
|
CREATE PROCEDURE [dbo].[fds__toggleRequestHidden]
|
|
@Id bigint,
|
|
@authuser varchar(25)
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON;
|
|
|
|
MERGE [dbo].[fds__custom_servicerequest] as TARGET
|
|
USING (SELECT [id] FROM [mfr__servicerequests] as sr where [id] = @id) as SOURCE ([id]) ON TARGET.[EntityId] = SOURCE.[Id]
|
|
WHEN MATCHED THEN
|
|
UPDATE SET
|
|
[hidden] = CASE WHEN TARGET.[hidden] = 1 THEN 0 ELSE 1 END
|
|
WHEN NOT MATCHED BY TARGET THEN
|
|
INSERT
|
|
([EntityId]
|
|
,[hidden])
|
|
VALUES
|
|
(SOURCE.[Id]
|
|
,1)
|
|
OUTPUT
|
|
inserted.*;
|
|
|
|
END |