<?php require_once('../auth/auth.php');require_once('../auth/acid_balance.php');?>
<?php 


///   purchase Purchase imei_invoice  delete
if (isset($_POST['pu_imei_invoice'])) {
	 $pu_imei_invoice       = $_POST['pu_imei_invoice'];
	 $edit_imei_id          = $_POST['edit_imei_id'];
	 $Geteoid               = $_POST['eoid'];
	mysqli_query($conn,"DELETE FROM imei_tracker_edit WHERE coid='$coid' AND bid='$bid' AND brid='$brid' AND edit_imei_id='$edit_imei_id' AND invoice='$pu_imei_invoice'  ") 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 invoice='$pu_imei_invoice' AND eoid='$Geteoid'")or die(mysqli_error($conn));
}

?>