<?
session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../../index.html'; </script>";
 return;
}

include("../opendb.php");
include("../test.php");
/*
$sql[1]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','PURCHASE JACK AND BODY GST 28%',95312.5,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/414/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[2]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','PURCHASE JACK AND BODY GST 28%',48828.12,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/415/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[3]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','PURCHASE JACK AND BODY GST 28%',48828.12,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/424/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[4]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','PURCHASE JACK AND BODY GST 28%',48828.12,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/428/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[5]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','PURCHASE JACK AND BODY GST 28%',48828.12,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/431/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[6]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','PURCHASE JACK AND BODY GST 28%',48828.12,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/446/2017-18 DATED 26/10/2017','PSN236','JV','OFNO')";
$sql[7]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input CGST JACK AND BODY 14.00%',13343.75,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/414/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[8]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input CGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/415/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[9]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input CGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/424/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[10]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input CGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/428/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[11]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input CGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/431/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[12]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input CGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/446/2017-18 DATED 26/10/2017','PSN236','JV','OFNO')";
$sql[13]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input SGST JACK AND BODY 14.00%',13343.75,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/414/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[14]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input SGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/415/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[15]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input SGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/424/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[16]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input SGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/428/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[17]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input SGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/431/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[18]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Dr','Input SGST JACK AND BODY 14.00%',6835.94,0,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/446/2017-18 DATED 26/10/2017','PSN236','JV','OFNO')";
$sql[19]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Cr','TELSA MARKETING (P) LTD',0,122000,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/414/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[20]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Cr','TELSA MARKETING (P) LTD',0,62500,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/415/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[21]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Cr','TELSA MARKETING (P) LTD',0,62500,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/424/2017-18 DATED 24/10/2017','PSN236','JV','OFNO')";
$sql[22]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Cr','TELSA MARKETING (P) LTD',0,62500,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/428/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[23]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Cr','TELSA MARKETING (P) LTD',0,62500,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/431/2017-18 DATED 25/10/2017','PSN236','JV','OFNO')";
$sql[24]= "insert into journal2  (date,jvno,type,partic,dramt,cramt,narr,brcode,j_type,against) values(20171030,7100,'Cr','TELSA MARKETING (P) LTD',0,62500,'TELSA MARKETING (P) LTD [ 32AAACT8736H1ZB ] AGN B NO TEL/446/2017-18 DATED 26/10/2017','PSN236','JV','OFNO')";
*/
for ($i = 1; $i <= 1302; $i++) 
{
 	//$sql="update spareinvoice set engineer='$eng[$j]' where invno='$invno[$j]' and entrydate='$invdate[$j]' and customer='$cust[$j]' and brcode='$brcode'";
	mysqli_query($db,$sql[$i])or die(mysqli_error());
	print $i."==".$sql[$i];
}
?>
<style>

	td,th,body{font-size:14;font-family:'arial narrow';letter-spacing:1}
</style>