Example #1
0
<?php

require_once 'common/init.php';
$terminallist = new terminal();
$product = new product();
$warehouse = new warehouse();
// Terminal Remove Latest Scan Session Function
if (isset($_POST['action']) && $_POST['action'] == 'removelatestscan') {
    unset($_SESSION['barcode']);
    unset($_SESSION['barcode_detail']);
    return 'sucess';
}
// Terminal Edit Function
if (isset($_POST['action']) && $_POST['action'] == 'edit') {
    $itemqty = $_POST['itemqty'];
    $arrayDelete = $_POST['rowarray'];
    $terminallist->update_qty_item($itemqty, $arrayDelete);
    return 'sucess';
}
// Terminal Delete Function
if (isset($_GET['delete'])) {
    $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';
}
Example #2
0
					else if(e.keyCode == 110 || e.keyCode == 190) {
						// alert('Press Decimal');
						var current = $(".calculator input").val();
						newcurrent = current+ '.'; 
						if(current == '0'){newcurrent = $codeVal; }
						$(".calculator input").val(newcurrent);
					}
				});
            });
        </script> 
</head>
<body>
	<?php 
if (!isset($_SESSION['faizan'])) {
    $inventorty = new inventory();
    $terminallist = new terminal();
    $barcode = array(987654321, 1234567891, 159753825, 123456788);
    foreach ($barcode as $value) {
        $_SESSION['barcode'] = $value;
        $_SESSION['barcode_detail'] = $inventorty->get_product($value);
        $terminallist->add_item_list(1);
    }
}
?>
	<!-- Payment Mode -->
	<span id="paymentMode" style="display:none;">cash</span>

	<!-- Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	  <div class="modal-dialog" role="document">
	    <div class="modal-content">