コード例 #1
0
ファイル: void.php プロジェクト: WedgeCoop/IS4C
function voidid($item_num)
{
    $query = "select * from localtemptrans where trans_id = " . $item_num;
    $db = tDataConnect();
    $result = sql_query($query, $db);
    $row = sql_fetch_array($result);
    $upc = $row["upc"];
    $VolSpecial = $row["VolSpecial"];
    $quantity = -1 * $row["quantity"];
    $cost = 0;
    if ($row["trans_subtype"] == "FS") {
        $total = -1 * $row["unitPrice"];
    } else {
        $total = -1 * $row["total"];
    }
    $CardNo = $_SESSION["memberID"];
    $discount = -1 * $row["discount"];
    $memDiscount = -1 * $row["memDiscount"];
    $discountable = $row["discountable"];
    $unitPrice = $row["unitPrice"];
    $scale = nullwrap($row["scale"]);
    if ($row["foodstamp"] != 0) {
        $foodstamp = 1;
    } else {
        $foodstamp = 0;
    }
    $discounttype = nullwrap($row["discounttype"]);
    if ($_SESSION["tenderTotal"] < 0 && ($foodstamp = 1 && -1 * $total > $_SESSION["fsEligible"])) {
        boxMsg("Item already paid for");
    } elseif ($_SESSION["tenderTotal"] < 0 && -1 * $total > $_SESSION["runningTotal"] - $_SESSION["taxTotal"]) {
        boxMsg("Item already paid for");
    } else {
        $update = "update localtemptrans set voided = 1 where trans_id = " . $item_num;
        sql_query($update, $db);
        addItem($upc, $row["description"], $row["trans_type"], $row["trans_subtype"], "V", $row["department"], $cost, $quantity, $unitPrice, $total, $row["regPrice"], $scale, $row["tax"], $foodstamp, $discount, $memDiscount, $discountable, $discounttype, $quantity, $row["volDiscType"], $row["volume"], $VolSpecial, 0, 0, 1, 0, '');
        if ($row["trans_type"] != "T") {
            $_SESSION["ttlflag"] = 0;
            $_SESSION["ttlrequested"] = 0;
        } else {
            ttl();
        }
        lastpage();
    }
}
コード例 #2
0
ファイル: loanadd.php プロジェクト: WedgeCoop/IS4C
if (!$entered || strlen($entered) < 1) {
    gohome();
}
if (!is_numeric($entered) || strpbrk($entered, ".") == true) {
    echo "<body onLoad='document.forms[0].elements[0].focus();'>\n";
    printheaderb();
    loanenter("Invalid entry<br />Try again (hint: 15000 = \$150)");
} else {
    ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
    </head>
    <body onload="window.top.input.location = 'input.php'; document.form.submit();" >
        <?php 
    $_SESSION["loanTime"] = 'time(Y-m-d H:i:s)';
    $db = pDataConnect();
    $query = "SELECT id FROM custdata WHERE CardNo = 99999";
    $result = sql_query($query, $db);
    $nonmemID = mysql_result($result, 0);
    setMember($nonmemID);
    ttl();
    echo "<form name='form' method='post' autocomplete='off' action='pos2.php'>";
    echo "<input name='input' type='hidden' value='" . $entered . "LN'>";
    echo "</form>";
    echo "</body></html>";
}
$_SESSION["scan"] = "noScan";
$_SESSION["beep"] = "noBeep";
printfooter();
コード例 #3
0
ファイル: prehkeys.php プロジェクト: WedgeCoop/IS4C
function endofShift()
{
    $_SESSION["memberID"] = "99999";
    $_SESSION["memMsg"] = "End of Shift";
    addEndofShift();
    getsubtotals();
    ttl();
    $_SESSION["runningtotal"] = $_SESSION["amtdue"];
    tender("CA", $_SESSION["runningtotal"] * 100);
}