Fix submitCash.cfm for legacy Payments table columns
Payments table still uses old prefixed names (PaymentID as PK, no UUID column, no PaymentTip column, required PaymentReceivedByUserID). Updated INSERT to match actual production schema. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1956dd08e9
commit
8adac1a242
1 changed files with 3 additions and 7 deletions
|
|
@ -57,23 +57,19 @@
|
|||
</cfif>
|
||||
|
||||
<!--- Create Payment record with expected cash amount --->
|
||||
<cfset PaymentUUID = createUUID()>
|
||||
<cfset CashAmountCents = round(CashAmount * 100)>
|
||||
<cfset qInsertPayment = queryExecute(
|
||||
"INSERT INTO Payments (
|
||||
UUID,
|
||||
PaymentPaidInCash,
|
||||
PaymentSentByUserID,
|
||||
PaymentReceivedByUserID,
|
||||
PaymentOrderID,
|
||||
PaymentTip,
|
||||
PaymentAddedOn
|
||||
) VALUES (?, ?, ?, ?, ?, NOW())",
|
||||
) VALUES (?, ?, 0, ?, NOW())",
|
||||
[
|
||||
{ value = PaymentUUID, cfsqltype = "cf_sql_varchar" },
|
||||
{ value = CashAmount, cfsqltype = "cf_sql_decimal" },
|
||||
{ value = qOrder.UserID, cfsqltype = "cf_sql_integer" },
|
||||
{ value = OrderID, cfsqltype = "cf_sql_integer" },
|
||||
{ value = Tip, cfsqltype = "cf_sql_decimal" }
|
||||
{ value = OrderID, cfsqltype = "cf_sql_integer" }
|
||||
],
|
||||
{ datasource = "payfrit", result = "insertResult" }
|
||||
)>
|
||||
|
|
|
|||
Reference in a new issue