function suspendorder() { testremote(); $query_a = "select emp_no, trans_no from localtemptrans"; $db_a = tDataConnect(); $result_a = sql_query($query_a, $db_a); $row_a = sql_fetch_array($result_a); $cashier_no = substr("000" . $row_a["emp_no"], -2); $trans_no = substr("0000" . $row_a["trans_no"], -4); if ($_SESSION["standalone"] == 0) { if ($_SESSION["remoteDBMS"] == "mssql") { $query = "insert " . trim($_SESSION["mServer"]) . "." . trim($_SESSION["mDatabase"]) . ".dbo.suspended select * from localtemptrans"; $result = sql_query($query, $db_a); } else { $query = "insert suspended select * from localtemptrans"; $result = sql_query($query, $db_a); if (uploadtable("suspended") == 1) { cleartemptrans(); } } } else { $query = "insert suspended select * from localtemptrans"; $result = sql_query($query, $db_a); } $_SESSION["plainmsg"] = "transaction suspended"; $_SESSION["msg"] = 2; receipt("suspended"); $recall_line = $_SESSION["standalone"] . " " . $_SESSION["laneno"] . " " . $cashier_no . " " . $trans_no; gohome(); sql_close($db_a); }
wmupdate($_SESSION["memID"], $_SESSION["volunteerDiscount"]); } */ $receiptType = $_SESSION["receiptType"]; $_SESSION["receiptType"] = ""; if (strlen($receiptType) > 0) { printReceipt($receiptType); if ($_SESSION["End"] == 1 || $_SESSION["msg"] == 2) { if ($_SESSION["msg"] == 2) { $returnHome = 1; } else { $returnHome = 0; } $_SESSION["End"] = 0; if (cleartemptrans() == 1) { // force cleartemptrans to finish before returning home. // Because returnHome() depends on javascript which // can be triggered independently of php if ($returnHome == 1) { $returnHome = 0; returnHome(); } } } } function cleartemptrans() { $db = tDataConnect(); if ($_SESSION["msg"] == 2) { $_SESSION["msg"] = 99;