<?php 
require("php_con.php");
mysqli_query($connation,"UPDATE stock_count_list SET scl_count_qty='$_GET[qty]' WHERE scl_id='$_GET[scl_id]'");

$l_qury=mysqli_query($connation,"SELECT (scl_count_qty-scl_system_qty) AS difference,scl_system_qty FROM stock_count_list WHERE scl_id='$_GET[scl_id]'");
$l_resalt=mysqli_fetch_assoc($l_qury);

if($l_resalt['difference']<0){
	$up=$l_resalt['scl_system_qty'];
}
else{
	$up=0;
}

echo number_format((float)$l_resalt['difference']+$up,3);
?>