示例#1
0
文件: void.php 项目: WedgeCoop/IS4C
function voiditem($item_num)
{
    if ($item_num) {
        $query = "select upc, quantity, ItemQtty, foodstamp, total, voided from localtemptrans where " . "trans_id = " . $item_num;
        $db = tDataConnect();
        $result = sql_query($query, $db);
        $num_rows = sql_num_rows($result);
        if ($num_rows == 0) {
            boxMsg("Item not found");
        } else {
            $row = sql_fetch_array($result);
            if ((!$row["upc"] || strlen($row["upc"]) < 1) && $row["voided"] == 1) {
                boxMsg("Item already voided");
            } elseif (!$row["upc"] || strlen($row["upc"]) < 1) {
                voidid($item_num);
            } elseif ($_SESSION["discounttype"] == 3) {
                voidupc($row["quantity"] . "*" . $row["upc"]);
            } else {
                voidupc($row["ItemQtty"] . "*" . $row["upc"]);
            }
        }
    }
}
示例#2
0
文件: pos2.php 项目: WedgeCoop/IS4C
         case "SC":
             $strl = str_replace(".", " ", $strl);
             $strl = str_replace(",", " ", $strl);
             if (!is_numeric($strl) || strlen($strl) != 6) {
                 inputUnknown();
             } else {
                 staffCharge($strl);
             }
             break;
         default:
             if (is_numeric($strl)) {
                 tender($right, $strl);
             } else {
                 switch ($left) {
                     case "VD":
                         voidupc($strr);
                         break;
                     case "PV":
                         $intAway = 1;
                         $_SESSION["pvsearch"] = $strr;
                         maindisplay("productlist.php");
                         break;
                     case "FN":
                         lastpage();
                         break;
                     default:
                         inputUnknown();
                 }
             }
     }
 } else {