<?php
	include("../config.php");
	$sql = "UPDATE tbl_purchaseitems SET aval=aval+last_qty, qty = qty+last_qty, status = 1 , last_qty = NULL WHERE status = 3";
	if(mysqli_query($db,$sql))
		echo 'Initial Stock Details Updated';
	else
		mysqli_error($db);
?>
