Skip to content

Commit

Permalink
also update the items in pickup workorder
Browse files Browse the repository at this point in the history
  • Loading branch information
kamranzafar4343 committed Jan 2, 2025
1 parent bede9a1 commit 597ab27
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions createPickupWO.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,19 @@
// Update box status
if (!empty($boxBarcodes)) {
$sql2 = "UPDATE box SET status = 'In' WHERE barcode IN ('" . implode("','", $boxBarcodes) . "')";

if ($conn->query($sql2) === TRUE) {
// Redirect to the order page
header("Location: order.php");
//update item status
$sql3 = "UPDATE item SET status = 'In' WHERE barcode IN ('" . implode("','", $boxBarcodes) . "')";

if ($conn->query($sql3) === TRUE) {
// Redirect to the order details page
header("Location: pickup.php");
exit();
} else {
echo "Error: " . $sql3 . "<br>" . $conn->error;
exit();
}
} else {
echo "Error: " . $sql2 . "<br>" . $conn->error;
exit();
Expand Down

0 comments on commit 597ab27

Please sign in to comment.