示例#1
0
文件: ajex.php 项目: TheHanif/POS-10
    $product_id = $_GET['delete'];
    $terminallist->delete_item_list($product_id);
    return 'sucess';
}
// Terminal Add Function
if (isset($_POST['action']) && $_POST['action'] == 'add') {
    $product_qty = $_POST['latestqty'];
    $terminallist->add_item_list($product_qty);
    return 'sucess';
}
// Terminal Switch Function
if (isset($_POST['action']) && $_POST['action'] == 'switch') {
    $id = $_POST['id'];
    unset($_SESSION['terminal_list']);
    $_SESSION['terminal_list'] = $_SESSION['hold_session'][$id];
    unset($_SESSION['hold_session'][$id]);
    $_SESSION['faizan'] = 1;
    return 'sucess';
}
// Get Single Product Detail for Add Product in Warehouse Page
if (isset($_POST['action']) && $_POST['action'] == 'getproductdetail') {
    $getproduct = $_POST['getproduct'];
    header('Content-Type: application/json');
    echo json_encode($product->get_product($getproduct));
}
// Get Single Product Detail for Add Product in Inventory Page
if (isset($_POST['action']) && $_POST['action'] == 'getwarehouseproductdetail') {
    $getproduct = $_POST['getproduct'];
    header('Content-Type: application/json');
    echo json_encode($warehouse->get_products_detail($getproduct));
}