<?php 
include "koneksi.php";
if (!isset($_SESSION["UserID"]))
{
	header("location:login.php?p=3");
}
$idPr = $_GET['id'];
?>
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.15/jquery.mask.min.js"></script>
<html>
  <head>
	<title> PT MULTI HYDRACHROM BALIKPAPAN </title>
	<?php
						include "part/menu2.php";
					?>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<?php
		include "part/jss.php";
	?>
	
  </head>
  <body>
	
	<div style="width:1280px; height:100px" class="container">
	
			<div ">
            <div style="display: block; margin-left: auto; margin-right: auto; width: 1000px;  height:100px;"><img style="width: 1000px;  height:180px;" src="images/hd.jpg"></div>
            <div>
                <center>
                    <h1>PT. MULTI HIDRACHROM BALIKPAPAN</h1>
                </center>
            </div>
            <div>
                <center>
                    <h4>PROFESIONAL INFORMATION SYSTEM</h4>
                </center>
            </div>
        </div>
					
					
				
		<div >
			 <h3 align="center">TAHAP PROSES PURCHASING REQUEST</h3>
			 
			 <?php
				if (isset($_GET["p"]))
				{
					$p=mysqli_real_escape_string($conn,$_GET["p"]);
					if ($p=="1")
					{
						?>
							<div class="alert alert-primary" role="alert">
							  PR Berhasil Ditambah!
							</div>
						<?php
					}
					else if ($p=="2")
					{
						?>
							<div class="alert alert-danger" role="alert">
								sistem gagal!
							</div>
						<?php
					}
					else if ($p=="3")
					{
						?>
							<div class="alert alert-danger" role="alert">
								gagal, isi dengan berurut!
							</div>
						<?php
					}
					else if ($p=="4")
					{
						?>
							<div class="alert alert-danger" role="alert">
								Berhasil, upadte PR gabungan!
							</div>
						<?php
					}
					else if ($p=="")
					{
						?>
							<div class="alert alert-danger" role="alert">
								gagal, upadte PR gabungan!
							</div>
						<?php
					}
				}

				if (isset($_GET['pesan'])) {
					if ($_GET['pesan'] == "berhasilInput") {
						echo "<div class='alert alert-success' role='alert'> Berhasil Input DB. </div>";
					}
					// if ($_GET['pesan'] == "berhasilInput") {
					// 	echo "<div class='alert alert-danger' role='alert'> Berhasil Input DB. </div>";
					// }
				}
				?>
			 <form method="POST" action="simpanPrProsesHarga2.php?id=<?php echo $idPr; ?>">
			 
			 <div class="form-group" align="center">
				  <h5 align="center" color="rgb(239, 255, 255)" >"memproses data barang yang diajukan dengan memilih harga dan vendor"</h5>
				  
				  <?php
				   echo "PO Date / ".date('d - m - Y');
				   $tanggal = date('d - m - Y');
				  ?>
				  
				  <p>
				  </p>
				  <p>
				  </p>
				    <P>
					</P>
		
					<?php
					    
					
					    $q="SELECT * FROM data_purchasing_requisition WHERE gabung='". $_GET["id"] ."'";
						$res=mysqli_query($conn,$q);
						$dataUser=mysqli_fetch_assoc($res);
					
						$nik = $dataUser["user_request"];
					?>
					<P>
					</P>
					 <h3 align="center">DATA PR</h3>
					 <label for="exampleInputPassword1">Document No.</label>
					<input readonly type="text/css" class="form-control" name="document_no" placeholder="MHB-FR-PRC-001-01">
					<P>
					</P>
					<label for="exampleInputPassword1">DELIFERY PO DATE</label>
					<input type="date" name="delivery_time" value="<?php echo $dataUser["delivery_po_date"] ?>">
					<P>
					</P>
				    <h3 color="yellow" align="center">DISCONT & PPN</h3>
					
						<p>
						</p>
						<html>
  
  <label for="exampleInputPassword1">DISCONT %</label>
  <input type="text" class="form-control" name="discont" placeholder=<?php echo $dataUser["besar_discont"]?>>
  <body>
     <form action="" method="post">
	 <label for="exampleInputPassword1">PPN 10% :</label>
        <input name="ppnya" type="checkbox" value="1" /> YA
		<input name="ppntidak" type="checkbox" value="0" /> TIDAK
     </form>
  </body>
</html>


						<br>
				 <br>
				 </br>	
				 <br>
				 </br>
				  <button type="submit" class="btn btn-warning">Simpan</button> 
				  <a href="detailHistoryPoGabung2.php?id=<?php echo $idPr; ?>" class="btn btn-danger">Kembali</a>
				
				</form>
				<br>
				 </br>
				 <br>
				 </br>
				 <br>
				 </br>
			
		<center><h5 class="form-signin">Copyright &copy; <a href="#" data-toggle="modal" data-target="#contact">SatrioPringgondani</a></h5></center>  
	</div>	  
  </body>
</html>



