Esempio n. 1
0
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);
}
Esempio n. 2
0
function cancelorder()
{
    $_SESSION["msg"] = 2;
    $_SESSION["plainmsg"] = "transaction cancelled";
    rePoll();
    receipt("cancelled");
}
Esempio n. 3
0
<?php

require_once '../header_php.php';
?>




<?php 
include '../header.php';
?>


<?php 
$row = mysql_fetch_array(mysql_unbuffered_query("SELECT quoteid FROM quotes WHERE quoteid='{$quoteid}' AND accountid='" . $accountrow["accountid"] . "' AND status!='incomplete'"));
if (!$row) {
    echo "We're sorry - this receipt could not be displayed.  If you feel you have received this message in error please <a href='/contact.php'>contact us</a>.";
    include '../footer.php';
    exit;
}
echo receipt($quoteid);
?>





<?php 
include '../footer.php';
            $extra_qlinks = "\n\t\t\t\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t\t\t\t<td><a href='cust-credit-stockinv.php'>New Invoice</a></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t\t\t\t<td><a href='pos-invoice-new.php'>New POS Invoice</a></td>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t\t\t\t<td><a href='nons-invoice-new.php'>New Non Stock Invoice</a></td>\n\t\t\t\t\t\t\t\t</tr>";
            break;
        case "status_history":
            $OUTPUT = status_history($_POST);
            break;
        case "edit_notes":
            $OUTPUT = edit_notes($_POST);
            break;
        case "check_in":
            $OUTPUT = check_in($_POST);
            break;
        case "check_out":
            $OUTPUT = check_out($_POST);
            break;
        case "receipt":
            receipt($_POST);
            break;
        case "workshop_report":
            $OUTPUT = workshop_report($_POST);
            break;
    }
} else {
    $OUTPUT = display();
}
if (!isset($extra_qlinks)) {
    $extra_qlinks = "";
}
// Append quick links to each page
$OUTPUT .= "\n\t\t\t\t<p>\n\t\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Quick Links</th>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t<td><a href='workshop-add.php'>Add to workshop</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t<td><a href='supp-new.php'>Add Supplier<a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t{$extra_qlinks}\n\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t<td><a href='main.php'>Main Menu</a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
require "template.php";
function display($errors = "")
}
// Decide what to do
if (isset($_POST["key"])) {
    switch ($_POST["key"]) {
        default:
        case "enter":
            $OUTPUT = enter();
            break;
        case "confirm":
            $OUTPUT = confirm($_POST);
            break;
        case "write":
            $OUTPUT = write($_POST);
            break;
        case "receipt":
            $OUTPUT = receipt($_POST);
            break;
        case "receipt-print":
            receipt - (print $_POST);
            break;
        case "workshop-report":
            $OUTPUT = workshop - report($_POST);
            break;
    }
} else {
    $OUTPUT = enter();
}
// Quick links
$OUTPUT .= "\n\t\t\t\t<p>\n\t\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>Quick Links</th>\n\t\t\t\t\t<tr>\n\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t<td><a href='workshop-view.php'>View workshop</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t<td><a href='customers-new.php'>Add Customer<a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t<td><a href='stock-add.php'>Add Stock</a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr class='datacell'>\n\t\t\t\t\t\t<td><a href='main.php'>Main Menu</a></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>";
require "template.php";
function enter($errors = "")
Esempio n. 6
0
                        default:
                            inputUnknown();
                    }
                }
        }
    } else {
        inputUnknown();
    }
}
if ($intAway == 1) {
    $intAway = 0;
    printfooterb();
} else {
    printfooter();
}
if ($_SESSION["End"] == 1) {
    rePoll();
    receipt("full");
}
$_SESSION["away"] = 0;
function pos2_dataError($Type, $msg, $file, $line, $context)
{
    $_SESSION["errorMsg"] = $Type . " " . $msg . " " . $file . " " . $line . " " . $context;
    if ($Type != 8) {
        $_SESSION["standalone"] = 1;
    }
}
?>
    </body>
</html>