Add debug logging for deselect flow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
65f236268c
commit
120930db4c
1 changed files with 3 additions and 0 deletions
|
|
@ -489,14 +489,17 @@
|
||||||
<cfelse>
|
<cfelse>
|
||||||
<!--- Deselecting: for modifiers that are default-checked, keep with Quantity=0 --->
|
<!--- Deselecting: for modifiers that are default-checked, keep with Quantity=0 --->
|
||||||
<!--- For root items or non-defaults, delete normally --->
|
<!--- For root items or non-defaults, delete normally --->
|
||||||
|
<cfset arrayAppend(request.attachDebug, "DESELECT: ParentLineItemID=#ParentLineItemID#, ItemID=#ItemID#, qExisting.ID=#qExisting.ID#")>
|
||||||
<cfif ParentLineItemID GT 0>
|
<cfif ParentLineItemID GT 0>
|
||||||
<cfset qItemCheck = queryTimed(
|
<cfset qItemCheck = queryTimed(
|
||||||
"SELECT IsCheckedByDefault FROM Items WHERE ID = ? LIMIT 1",
|
"SELECT IsCheckedByDefault FROM Items WHERE ID = ? LIMIT 1",
|
||||||
[ { value = ItemID, cfsqltype = "cf_sql_integer" } ],
|
[ { value = ItemID, cfsqltype = "cf_sql_integer" } ],
|
||||||
{ datasource = "payfrit" }
|
{ datasource = "payfrit" }
|
||||||
)>
|
)>
|
||||||
|
<cfset arrayAppend(request.attachDebug, "DESELECT: qItemCheck.IsCheckedByDefault=#val(qItemCheck.IsCheckedByDefault)#")>
|
||||||
<cfif qItemCheck.recordCount GT 0 AND val(qItemCheck.IsCheckedByDefault) EQ 1>
|
<cfif qItemCheck.recordCount GT 0 AND val(qItemCheck.IsCheckedByDefault) EQ 1>
|
||||||
<!--- Default modifier: keep with Quantity=0 for "NO X" display --->
|
<!--- Default modifier: keep with Quantity=0 for "NO X" display --->
|
||||||
|
<cfset arrayAppend(request.attachDebug, "DESELECT: Setting Quantity=0 for LIID=#qExisting.ID#")>
|
||||||
<cfset queryTimed(
|
<cfset queryTimed(
|
||||||
"UPDATE OrderLineItems SET Quantity = 0 WHERE ID = ?",
|
"UPDATE OrderLineItems SET Quantity = 0 WHERE ID = ?",
|
||||||
[ { value = qExisting.ID, cfsqltype = "cf_sql_integer" } ],
|
[ { value = qExisting.ID, cfsqltype = "cf_sql_integer" } ],
|
||||||
|
|
|
||||||
Reference in a new issue