<?php
include "../koneksi.php";

$id = $_POST['po_id'];
$detail_id = $_POST['detailpo_id'];
$qty_po = $_POST['qty_po'];
$balance_po = $_POST['balance_po'];

if($balance_po >= 0 && $balance_po != '') {
	$query = "UPDATE detail_po SET QtyPO = '$qty_po',
									BalancePO = '$balance_po'
									WHERE DetailPO_ID = '$detail_id'";

	mysqli_query($koneksi, $query)
	or die ("Gagal Perintah SQL".mysql_error());
}

header('Location:rincianpo.php?id='.$id);

?>