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

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

?>