-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcopyPosMenuServiceLayout.sql
More file actions
36 lines (31 loc) · 1.5 KB
/
Copy pathcopyPosMenuServiceLayout.sql
File metadata and controls
36 lines (31 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- Copies the POS menu service layout from a particular application/service to a new, blank application/service
-- Matthew Prins, 2026
-- Enter the EXACT name of the APPLICATION to GET the service layout FROM
DECLARE @FromApplication VARCHAR(100) = 'Indian Trail 2.0';
-- Enter the EXACT name of the SERVICE to GET the service layout FROM
DECLARE @FromService VARCHAR(100) = 'BREAKFAST';
-- Enter the EXACT name of the APPLICATION to COPY the service layout TO
DECLARE @ToApplication VARCHAR(100) = 'Test 2.0';
-- Enter the EXACT name of the SERVICE to COPY the service layout TO
DECLARE @ToService VARCHAR(100) = 'BREAKFAST';
INSERT INTO POSMenuItem
(serviceID, purchasableID, positionX, positionY, width, height,
fontColorRed, fontColorGreen, fontColorBlue,
fontBold, fontItalic, fontUnderline, fontType, fontSize,
backgroundColorRed, backgroundColorGreen, backgroundColorBlue)
SELECT
(SELECT serviceID
FROM POSService
WHERE applicationID = (SELECT applicationID FROM POSApplication WHERE name = @ToApplication)
AND name = @ToService),
purchasableID, positionX, positionY, width, height,
fontColorRed, fontColorGreen, fontColorBlue,
fontBold, fontItalic, fontUnderline, fontType, fontSize,
backgroundColorRed, backgroundColorGreen, backgroundColorBlue
FROM POSMenuItem
WHERE serviceID = (
SELECT serviceID
FROM POSService
WHERE applicationID = (SELECT applicationID FROM POSApplication WHERE name = @FromApplication)
AND name = @FromService
);