Add TaskTypeID=0 to order task creation INSERTs
submitCash.php, submit.php, and webhook.php were creating kitchen tasks without TaskTypeID, which is NOT NULL with no default. This caused cash order submission to fail with a SQL error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b5394aec7c
commit
628172c31c
3 changed files with 6 additions and 6 deletions
|
|
@ -207,8 +207,8 @@ try {
|
|||
);
|
||||
if (!$qExistingTask) {
|
||||
queryTimed("
|
||||
INSERT INTO Tasks (BusinessID, OrderID, ServicePointID, Title, CreatedOn, ClaimedByUserID)
|
||||
VALUES (?, ?, ?, ?, NOW(), 0)
|
||||
INSERT INTO Tasks (BusinessID, OrderID, ServicePointID, TaskTypeID, Title, CreatedOn, ClaimedByUserID)
|
||||
VALUES (?, ?, ?, 0, ?, NOW(), 0)
|
||||
", [$qOrder['BusinessID'], $OrderID, $spID > 0 ? $spID : null, $taskTitle]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -110,8 +110,8 @@ try {
|
|||
$taskTitle = "Prepare Order #{$OrderID} for {$spName}";
|
||||
|
||||
queryTimed("
|
||||
INSERT INTO Tasks (BusinessID, OrderID, ServicePointID, Title, CreatedOn, ClaimedByUserID)
|
||||
VALUES (?, ?, ?, ?, NOW(), 0)
|
||||
INSERT INTO Tasks (BusinessID, OrderID, ServicePointID, TaskTypeID, Title, CreatedOn, ClaimedByUserID)
|
||||
VALUES (?, ?, ?, 0, ?, NOW(), 0)
|
||||
", [$qOrder['BusinessID'], $OrderID, $spID > 0 ? $spID : null, $taskTitle]);
|
||||
|
||||
$response = [
|
||||
|
|
|
|||
|
|
@ -95,8 +95,8 @@ try {
|
|||
$taskTitle = "Prepare Order #$orderID for $tableName";
|
||||
|
||||
queryTimed("
|
||||
INSERT INTO Tasks (BusinessID, OrderID, ServicePointID, Title, CreatedOn, ClaimedByUserID)
|
||||
VALUES (?, ?, ?, ?, NOW(), 0)
|
||||
INSERT INTO Tasks (BusinessID, OrderID, ServicePointID, TaskTypeID, Title, CreatedOn, ClaimedByUserID)
|
||||
VALUES (?, ?, ?, 0, ?, NOW(), 0)
|
||||
", [$qOrder['BusinessID'], $orderID, (int) ($qOrder['ServicePointID'] ?? 0), $taskTitle]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue