<?php require_once('../auth/auth.php');?>
<?php 
if (isset($_POST['oinvoice'])) {
	$edit_imei_id  = $_POST['edit_imei_id'];
	echo $Get_eoid = $_POST['Get_eoid'];
	echo $oinvoice = $_POST['oinvoice'];
    mysqli_query($conn,"DELETE FROM imei_tracker_edit WHERE invoice='$oinvoice' AND edit_imei_id='$edit_imei_id'") or die(mysqli_error($conn));

         mysqli_query($conn,"UPDATE order_list_edit LEFT JOIN pro_unit ON (order_list_edit.pro_unit=pro_unit.puid) SET qty =(qty-1),t_amount=(amount*qty*unit_convart),net_amount=(t_amount-dis_amount) WHERE order_list_edit.coid='$coid'  AND order_list_edit.invoice='$oinvoice'  AND order_list_edit.eoid='$Get_eoid'")or die(mysqli_error($conn));

}

?>


