<?php
	
	
	include "koneksi.php";
	$id=mysqli_real_escape_string($conn,$_GET["id"]);
    echo "ini".$id;	
    $tanggal_ditolak = date('d / m / yy');
	$quantity=$_POST["quantity"];
	
	echo "qty".$quantity;
	
	//disetujui = 2, ditolak = 1
    $q = "UPDATE data_purchasing_requisition SET quantity = $quantity WHERE id=".$id;
	$result = mysqli_query($conn, $q);

	if($result)
	{
		echo "berhasil".$q;
		header("location:persetujuanPrOperasional.php?p=2");
	}
	else
	{
		echo "gagal";
		header("location:persetujuanPrOperasional.php?p=3");
	}
		

?>