u
This commit is contained in:
@@ -57,13 +57,13 @@ WHERE id = @id
|
||||
`;
|
||||
|
||||
export const SHIPPING_CREATE = `
|
||||
INSERT INTO shipping (manifest_id, [number], [type], [state])
|
||||
OUTPUT INSERTED.id, INSERTED.manifest_id, INSERTED.[number], INSERTED.[type], INSERTED.[state]
|
||||
VALUES (@manifestId, @number, @type, @state)
|
||||
INSERT INTO shipping (manifest_id, [number], tracking_code, carrier, [type], [state])
|
||||
OUTPUT INSERTED.id, INSERTED.manifest_id, INSERTED.[number], INSERTED.tracking_code, INSERTED.carrier, INSERTED.[type], INSERTED.[state]
|
||||
VALUES (@manifestId, @number, @trackingCode, @carrier, @type, @state)
|
||||
`;
|
||||
|
||||
export const SHIPPING_LIST_BY_MANIFEST = `
|
||||
SELECT id, manifest_id, [number], [type], [state]
|
||||
SELECT id, manifest_id, [number], tracking_code, carrier, [type], [state]
|
||||
FROM shipping
|
||||
WHERE manifest_id = @manifestId
|
||||
ORDER BY id ASC
|
||||
@@ -76,7 +76,7 @@ WHERE id = @id
|
||||
`;
|
||||
|
||||
export const GET_SHIPPING_BY_ID = `
|
||||
SELECT s.id, s.manifest_id AS manifestId, s.[number], s.[type], s.[state]
|
||||
SELECT s.id, s.manifest_id AS manifestId, s.[number], s.tracking_code, s.carrier, s.[type], s.[state]
|
||||
FROM shipping s
|
||||
INNER JOIN manifest m ON m.id = s.manifest_id
|
||||
WHERE s.id = @id AND m.company_id = @companyId;
|
||||
@@ -84,8 +84,8 @@ WHERE s.id = @id AND m.company_id = @companyId;
|
||||
|
||||
export const SHIPPING_UPDATE = `
|
||||
UPDATE shipping
|
||||
SET [type] = @type, [state] = @state
|
||||
OUTPUT INSERTED.id, INSERTED.manifest_id, INSERTED.[number], INSERTED.[type], INSERTED.[state]
|
||||
SET [type] = @type, [state] = @state, tracking_code = @trackingCode, carrier = @carrier
|
||||
OUTPUT INSERTED.id, INSERTED.manifest_id, INSERTED.[number], INSERTED.tracking_code, INSERTED.carrier, INSERTED.[type], INSERTED.[state]
|
||||
WHERE id = @id;
|
||||
`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user