Playwright Tests / test (push) Has been cancelled
- Increased the length of the NameOfPayer field from NVARCHAR(60) to NVARCHAR(140) in the banking transactions function, table, temporary table, and user-defined type to accommodate longer names. - Expanded the SepaRemittanceInformation field from VARCHAR(150) to VARCHAR(200) in the banking transactions function for more detailed remittance information. - Modified the stored procedure fds__setBankingtransaction_done to return additional transaction data (ValueDate and Amount) along with the success flag for improved notification messaging. - Added validation in MFRClientConfig constructor to ensure the provided URL is not null or empty, enhancing error handling for configuration settings.
45 lines
1.5 KiB
Transact-SQL
45 lines
1.5 KiB
Transact-SQL
|
|
-- =============================================
|
|
-- Author: <Author,,Name>
|
|
-- Create date: <Create Date,,>
|
|
-- Description: <Description,,>
|
|
-- =============================================
|
|
CREATE PROCEDURE [dbo].[fds__setBankingtransaction_done]
|
|
@taID varchar(100)
|
|
,@authuser varchar(25)
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON;
|
|
|
|
IF [dbo].[fis_getModuleAuth]('fds_bam', @authuser) < 1
|
|
THROW 60000, N'not authorized', 1;
|
|
|
|
INSERT INTO [dbo].[fds__admin_activity] ([activity] ,[authuser] ,[info])
|
|
VALUES ('fds__setBankingtransaction_done' ,@authuser , '');
|
|
|
|
|
|
DECLARE @now datetime = GETUTCDATE();
|
|
DECLARE @today date = @now;
|
|
|
|
DECLARE @OUT TABLE([taID] varchar(10), [done_manually] varchar(25));
|
|
|
|
MERGE [dbo].[fds__bankingtransactions_settings] as TARGET
|
|
USING (SELECT TOP(1) * FROM [dbo].[fds__bankingtransactions] as b WHERE b.[taID] = @taID) as SOURCE ON TARGET.[taID] = SOURCE.[taID]
|
|
WHEN MATCHED THEN
|
|
UPDATE SET [done_manually] = FORMAT(@now, 'yyyy-MM-dd HH:mm:ss') + ';' + @authuser
|
|
WHEN NOT MATCHED BY TARGET THEN
|
|
INSERT ([taID],[done_manually]) VALUES (SOURCE.[taID], FORMAT(@now, 'yyyy-MM-dd HH:mm:ss') + ';' + @authuser)
|
|
OUTPUT inserted.[taID], inserted.[done_manually]
|
|
INTO @out;
|
|
;
|
|
|
|
|
|
--output to confirm as boolean, plus the transaction data needed for the notification message
|
|
SELECT
|
|
CAST( (CASE WHEN ISNULL((SELECT TOP(1) [done_manually] FROM @out), '') <> '' THEN 1 ELSE 0 END) as bit) as [success]
|
|
,b.[ValueDate]
|
|
,b.[Amount]
|
|
FROM (SELECT 1 as [dummy]) as d
|
|
LEFT JOIN [dbo].[fds__bankingtransactions] as b ON b.[taID] = @taID;
|
|
|
|
END |