<?php include("../../include/dbconnect.php"); 

$sdate = $today;
$qtyonhand=0;

$tddt = substr($sdate,6,4).'-'.substr($sdate,3,2).'-'.substr($sdate,0,2);

$amt=0;
$totamt=0;

if($compcode=='0')
{
	echo("Company not selected.  Please go back and Select the Company and re submit<br>");
	exit;
}
// UPDATE STOCK 
if($upd=='Yes')
{  
	for($ind=0;$ind<=10;$ind++)
	{
		if($qty[$ind] >0 )
		{
			$refdate = substr($date[$ind],6,4).'-'.substr($date[$ind],3,2).'-'.substr($date[$ind],0,2);
		
	
			$query="insert into matindent values ('$compcode','$prodcode[$ind]','$qty[$ind]','$tddt','$used_for[$ind]','$refdate','$remarks[$ind]','No','','','','',	'','No','','$indent_no','$account_year','$unit[$ind]',NULL)";
			mysql_query($query) or die (mysql_error());
				
					
		}
	}
}
?>

<br>
<br>
<br>

<br><br><font size=1><center><a href= "input.php">Make another Entry</center></font>
<br><br><font size=1><center><a href= "/wilson/stores.html">Return to index page</center></font>
