Initial commit

This commit is contained in:
user
2026-07-12 13:56:05 +04:00
commit 04bf3a4b58
850 changed files with 9057 additions and 0 deletions
@@ -0,0 +1,22 @@
USE [Database]
IF OBJECT_ID('[Procedures].[get_next_barcode]', 'P') IS NOT NULL
DROP PROCEDURE [Procedures].[get_next_barcode];
GO
CREATE PROCEDURE [Procedures].[get_next_barcode]
@next_barcode AS BIGINT OUTPUT
AS
BEGIN TRANSACTION;
SET NOCOUNT ON;
SET @next_barcode = (
SELECT CAST([value] AS BIGINT) + 1
FROM [Tables].[additional_variables]
WHERE [id] = 1
);
UPDATE [Tables].[additional_variables]
SET [value] = CAST(@next_barcode AS NVARCHAR(13))
WHERE [id] = 1;
COMMIT TRANSACTION;
GO