Fix submit.cfm: correct column names for OrderLineItems and ServicePoints queries

This commit is contained in:
John Pinkyfloyd 2026-02-09 15:58:13 -08:00
parent abf444ffe6
commit add65346c9

View file

@ -42,7 +42,7 @@
ItemID,
IsDeleted
FROM OrderLineItems
WHERE ID = ?
WHERE OrderID = ?
ORDER BY ID
",
[ { value = arguments.OrderID, cfsqltype = "cf_sql_integer" } ],
@ -90,7 +90,7 @@
)>
<cfloop query="qMeta">
<cfset out.itemMeta[qMeta.ItemID] = {
<cfset out.itemMeta[qMeta.ID] = {
"requires": qMeta.RequiresChildSelection,
"maxSel": qMeta.MaxNumSelectionReq
}>
@ -143,9 +143,9 @@
"
SELECT o.ID, o.StatusID, o.OrderTypeID, o.BusinessID, o.ServicePointID,
o.GrantID, o.GrantOwnerBusinessID,
sp.ServicePointName AS Name
sp.Name AS Name
FROM Orders o
LEFT JOIN ServicePoints sp ON sp.ServicePointID = o.ServicePointID
LEFT JOIN ServicePoints sp ON sp.ID = o.ServicePointID
WHERE o.ID = ?
LIMIT 1
",
@ -199,9 +199,9 @@
"
SELECT COUNT(*) AS Cnt
FROM OrderLineItems
WHERE ID = ?
WHERE OrderID = ?
AND ParentOrderLineItemID = 0
AND IsDeleted = b'0'
AND IsDeleted = 0
",
[ { value = OrderID, cfsqltype = "cf_sql_integer" } ],
{ datasource = "payfrit" }