Exemplo n.º 1
0
        header("location: sale_ui.php?global_sale_discount={$discount}");
    }
}
include "../classes/db_functions.php";
include "../classes/security_functions.php";
include "../classes/display.php";
$dbf = new db_functions($cfg_server, $cfg_username, $cfg_password, $cfg_database, $cfg_tableprefix, $cfg_theme, $lang);
$sec = new security_functions($dbf, 'Sales Clerk', $lang);
$display = new display($dbf->conn, $cfg_theme, $cfg_currency_symbol, $lang);
if (isset($_POST['customer'])) {
    if ($cfg_numberForBarcode == "Row ID") {
        if ($dbf->isValidCustomer($_POST['customer'])) {
            $_SESSION['current_sale_customer_id'] = $_POST['customer'];
        }
    } else {
        $id = $dbf->fieldToid($cfg_tableprefix . 'customers', 'account_number', $_POST['customer']);
        if ($dbf->isValidCustomer($id)) {
            $_SESSION['current_sale_customer_id'] = $id;
        } else {
            echo "{$lang->customerWithID}/{$lang->accountNumber} " . $_POST['customer'] . ', ' . "{$lang->isNotValid}";
        }
    }
}
?>

<html>
<head>
<title>PHP Point Of Sale</title>
<script type="text/javascript" language="javascript">
<!--
function customerFocus()