<?
include"plg/kon.php";
$tgl = date('Y-m-d H:i');
$inv = "CR-".date('YmdHis');
$gen = date('HisYmdi');
//include"../plg/kon.php";
/*
$sql = "insert into invoiceout(id,tglc,tgls,snd,deb,debalm,job,jobby,pri,noinv,nokon,dpp,ppn,nilppn,pph,pphval,nilpph,total,dued,ket)VALUES
('$inv','$tglc','$tgls','$snd','$deb','$debalm','$job','$jobby','$pri','$noinv','$nokon','$dpp','$ppn','$nilppn',
'$pph','$pphval','$nilpph','$total','$dued','$ket')";
$res = $conn->query($sql);
*/
$sql = "insert into invoiceout(id)VALUES('$inv')";
$res = $conn->query($sql);
//$sqlh = "insert into historitgl(inv,snd,rcv,tglrcv,user,nama,pos) VALUES('$inv','$snd','$prof','$tglt','$user','$nama','$prof')";
//$resh = $conn->query($sqlh);

//$sql3 = "insert into perpindahan(pack,user,nama,pos) VALUES ('$inv','$user','$nama','$prof')";
//$res3 = $conn->query($sql3);

echo "<script>parent.edit('$inv');</script>";


?>
