fix: include PaymentFromCreditCard in cash payment INSERT

PaymentFromCreditCard column is NOT NULL with no default value,
causing INSERT to fail silently. Set to 0 for cash payments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-03-02 12:44:53 -08:00
parent eda8010927
commit cb7e3b7fc6

View file

@ -61,11 +61,12 @@
<cfset qInsertPayment = queryExecute( <cfset qInsertPayment = queryExecute(
"INSERT INTO Payments ( "INSERT INTO Payments (
PaymentPaidInCash, PaymentPaidInCash,
PaymentFromCreditCard,
PaymentSentByUserID, PaymentSentByUserID,
PaymentReceivedByUserID, PaymentReceivedByUserID,
PaymentOrderID, PaymentOrderID,
PaymentAddedOn PaymentAddedOn
) VALUES (?, ?, 0, ?, NOW())", ) VALUES (?, 0, ?, 0, ?, NOW())",
[ [
{ value = CashAmount, cfsqltype = "cf_sql_decimal" }, { value = CashAmount, cfsqltype = "cf_sql_decimal" },
{ value = qOrder.UserID, cfsqltype = "cf_sql_integer" }, { value = qOrder.UserID, cfsqltype = "cf_sql_integer" },