<? 
session_start();
include_once('opendb.php');
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];

if(strlen($user)<=0)
{
  print "<script> alert('Invalid User'); document.location='index.php' </script>";
  return;
}
?>
<!DOCTYPE html>
<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>PSN Telcon</title>
<style>


#mask {
	display: none;
	background:url(images/bgimg1.gif) repeat;
	//background: #000; 
	position: fixed; left: 0; top: 0; 
	z-index: 10;
	width: 100%; height: 100%;
	opacity: 0.8;
	z-index: 999;
}

.login-popup{
		display:none;
	background:white;
	padding: 10px; 	
	border: 2px solid #ddd;
	float: left;
	font-size: 1.2em;
	position: fixed;
	top: 4%; left: 45%;
	z-index: 99999;
	box-shadow: 0px 0px 20px #999;
	-moz-box-shadow: 0px 0px 20px #999; /* Firefox */
    -webkit-box-shadow: 0px 0px 20px #999; /* Safari, Chrome */
	border-radius:3px 3px 3px 3px;
    -moz-border-radius: 3px; /* Firefox */
    -webkit-border-radius: 3px; /* Safari, Chrome */
}
}

img.btn_close {
	float: right; 
	margin: -28px -28px 0 0;
}

fieldset { 
	border:none; 
}

form.signin .textbox label { 
	display:block; 
	padding-bottom:7px; 
}

form.signin .textbox span { 
	display:block;
}

form.signin p, form.signin span { 
	color:white; 
	font-size:11px; 
	line-height:18px;
} 

form.signin .textbox input { 
	background:#666666; 
	border-bottom:1px solid #333;
	border-left:1px solid #000;
	border-right:1px solid #333;
	border-top:1px solid #000;
	color:white; 
	border-radius: 3px 3px 3px 3px;
	-moz-border-radius: 3px;
    -webkit-border-radius: 3px;
	font:13px Arial, Helvetica, sans-serif;
	padding:6px 6px 4px;
	width:200px;
}

form.signin input:-moz-placeholder { color:white; text-shadow:0 0 2px #000; }
form.signin input::-webkit-input-placeholder { color:hwite; text-shadow:0 0 2px #000;  }

.submit button { 
	background: -moz-linear-gradient(center top, #f3f3f3, #dddddd);
	background: -webkit-gradient(linear, left top, left bottom, from(#f3f3f3), to(#dddddd));
	background:  -o-linear-gradient(top, #f3f3f3, #dddddd);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#f3f3f3', EndColorStr='#dddddd');
	border-color:#000; 
	border-width:1px;
	border-radius:4px 4px 4px 4px;
	-moz-border-radius: 4px;
    -webkit-border-radius: 4px;
	color:#333;
	cursor:pointer;
	display:inline-block;
	padding:6px 6px 4px;
	margin-top:10px;
	font:12px; 
	width:100px;
}

.button:hover { background:#ddd; }

</style>

<script type="text/javascript" src="js/jquery.js"></script>





<link type="text/css" href="css/redmond/jquery-ui-1.8.16.custom.css" rel="stylesheet" />	
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.16.custom.min.js"></script>
<link rel="stylesheet" href="tabjs/style.css" type="text/css" media="screen">
<script src="tabjs/8118fe14b349163c4420c20a933e602d581acc6d.js" async="" type="text/javascript"></script>
<script src="tabjs/i.js" async="" type="text/javascript"></script>
<script src="tabjs/dc.js" async="" type="text/javascript"></script>
<script type="text/javascript" src="tabjs/jquery-1.js"></script>
<script type="text/javascript" src="tabjs/jquery-ui-1.js"></script>
<script type="text/javascript" src="tabjs/jquery.js"></script>
<script type="text/javascript" src="tabjs/ajaxupload.js"></script>
<script type="text/javascript" src="tabjs/constants.js"></script>
<script type="text/javascript" src="tabjs/javascript.js"></script>
<link type="text/css" href="tabjs/jquery-ui-1.css" rel="Stylesheet">
<script type="text/javascript" src="tabjs/jquery_003.js"></script>
<script type="text/javascript" src="tabjs/jquery-ui.js"></script>
<script type="text/javascript" src="tabjs/jquery_002.js"></script>
<script type="text/javascript" src="tabjs/jquery.js"></script>

<style>
.cont
	{
	background-color:#3b5998;

	//background:url(images/bg-inner.jpg) #e9e0c3 repeat-x;
  	width: 100%;position: absolute ;
	height:99%;
    	/* Optional - just for DIV)*/
    	//border: solid 1px #000000;
	-moz-box-shadow: 0px 5px 5px #888;
	-webkit-box-shadow: 0px 5px 5px #888;
	box-shadow: 0px 5px 10px #888;
    }
.tble1 input {
background-color:transparent;
border: 0px solid;
height:20px;
//width:160px;
color:black;
}
.tble1
{
border-collapse:collapse;

}	



</style>
<style>








		

		.toggleFilterLink					{ 	text-decoration:underline;font-family:arial; font-size:12px; color:#1869B8; cursor:pointer; }

		

		

		.divWithCustomizationLinkTable  { width:100%;margin:0px; margin-top:10px; padding:0px;background-color:#FFFADC;border-top:2px solid #FCF5CD; border-bottom:2px solid #FCF5CD;padding:5px;padding-left:12px; }		

		.divWithCustomizationLinkIMG	{ margin:0px;padding:0px;}

		.topRowTax_class				{ }

		.invoiceDataHeadRow 			{ height:33px;}

		.invoiceDataDelete				{ padding-left:4px; border-left:1px solid #eaedee;border-bottom:1px solid #eaedee;width:14px;height:14px; cursor:pointer; vertical-align:top; padding-top:7px;}

		.invoiceDataItem 				{ border-bottom:1px solid #eaedee; vertical-align:top;padding-left:4px; }

		.inputInvoiceDataItem			{ outline:none;border:0px solid white; padding:5px; padding-top:5px;padding-left:1px; width:86px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;}

		.invoiceDataDescription 		{ border-bottom:1px solid #eaedee;border-left:1px solid #eaedee;vertical-align:top; }

		.inputInvoiceDataDescription 	{ outline:none; overflow:hidden;border:0px solid white; padding:5px; width:304px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c; }

		html.en .inputInvoiceDataDescription_wTAX2 	{ outline:none; overflow:hidden;border:0px solid white; padding:5px; width:219px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c; }
        html.fr .inputInvoiceDataDescription_wTAX2 	{ outline:none; overflow:hidden;border:0px solid white; padding:5px; width:211px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c; }

		.inputInvoiceDataPriceOrQty 	{ outline:none;border:0px solid white;text-align:right;width:100px; padding:5px; font-family:verdana;font-size:13px; color:silver;}



		.invoiceDataPriceOrQty			{ vertical-align:top;text-align:right;border-bottom:1px solid #eaedee;border-left:1px solid #eaedee;}

		html.en .inputInvoiceDataPriceOrQty_wTAX 	{ width:72px;outline:none;border:0px solid white;text-align:right; padding:5px; font-family:verdana;font-size:13px; color:silver;}
        html.fr .inputInvoiceDataPriceOrQty_wTAX 	{ width:68px;outline:none;border:0px solid white;text-align:right; padding:5px; font-family:verdana;font-size:13px; color:silver;}



		.invoiceDataTax_hidden			{ display:none;vertical-align:top;text-align:right;border-bottom:1px solid #eaedee;border-left:1px solid #eaedee;}

		.invoiceDataTax_visible			{ vertical-align:top;text-align:right;border-bottom:1px solid #eaedee;border-left:1px solid #eaedee;}

		.invoiceDataTax_percentage		{ border:0px solid red; float:right;padding-right:5px;padding-top:6px;width:15px;color:silver;font-family:verdana;font-size:12px;font-weight:normal;}

		.inputInvoiceDataTax		 	{ width:45px;outline:none;border:0px solid white;text-align:right; padding:5px; font-family:verdana;font-size:13px; color:silver;}

		

		.invoiceDataAmount				{ background-color:#eaedee;background-image:url(images/grey.png);background-repeat:repeat-x repeat-y;vertical-align:top;text-align:right;padding-right:4px;border-right:1px solid #eaedee;border-bottom:1px solid #eaedee;border-left:1px solid #eaedee;}

		.inputInvoiceDataAmount_wTAX 		{ width:72px; background-image:url(images/grey.png);background-repeat:repeat-x repeat-y;background-color:#eaedee;border:0px solid white;text-align:right; padding:5px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;}

		.inputInvoiceDataAmount 		{ background-image:url(images/grey.png);background-repeat:repeat-x repeat-y;background-color:#eaedee;border:0px solid white;text-align:right; width:100px; padding:5px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;}

		.toggleCustomizationLink		{ text-decoration:underline;font-family:arial; font-size:14px; color:#1869B8; cursor:pointer; }

		.divWithCustomization			{ width:100%;position:relative;background-color:white; border:1px solid #D1D1D1; margin:0px;margin-top:5px; margin-bottom:25px;padding-bottom:20px;}		

		.customization_itemsRow			{ height:18px;}

		.customization_itemsCellDelete  { width:17px;padding-left:0px; padding-top:0px;border-bottom:0px solid #d1d1d1;}

		.customization_itemsCellText	{ width:160px;border-bottom:0px solid #d1d1d1}

		.invoiceForm_fromNameTD			{ border-top:1px solid #ABADB3;border-left:1px solid #ABADB3; border-bottom:1px solid #E3E9EF;border-right:1px solid #DBDFE6;}

		.invoiceForm_fromNameTD:hover	{ border-top:1px solid #3D7BAD;border-left:1px solid #B5CFE7; border-bottom:1px solid #B7D9ED;border-right:1px solid #A4C9E3;}

		.invoiceForm_fromNameTD_onFocus	{ border:1px solid #54A0E7; background-color:#FFFADC;}

		.invoiceForm_logoBrowse 		{ 

		 font-size: 45px;

		 position: absolute;

		 right: -3px;

		 top: -3px;

		 opacity: 0;

		 filter: 

		 alpha(opacity=0);

		 -ms-filter: "alpha(opacity=0)";

		 -khtml-opacity: 0;

		 -moz-opacity: 0; 

		 }
		
.darkClass
{
    background-color: white;
    filter:alpha(opacity=50); /* IE */
    opacity: 0.5; /* Safari, Opera */
    -moz-opacity:0.50; /* FireFox */
    z-index: 20;
    height: 1000px;
    width: 100%;
    background-repeat:no-repeat;
    background-position:center;
    position:absolute;
    top: 400px;
    left: 0px;
}		
		
		

		.invoiceForm_uploadArea 		{position:relative; margin-top:-14px; margin-right:0px;float:right; text-align:right; width:300px; align:right; height:125px; border:1px dashed #d1d1d1;background-color:#FFFADC;}

		.invoiceForm_uploadAreaNoBg		{position:relative; margin-top:-14px; margin-right:0px;float:right; text-align:right; width:300px; align:right; height:125px; border:1px dashed #d1d1d1;}

		.invoiceForm_uploadArea_done	{position:relative; margin-top:-16px; margin-right:0px;float:right; text-align:right; width:300px; align:right; }

		.invoiceForm_uploadArea_hidden	{display:none; }

		.invoiceForm_uploadField		{float:right;margin-right:0px; margin-bottom:0px; margin-top:3px; position: relative;width: 73px;height: 22px;overflow: hidden;}

		.invoiceForm_uploadField_hidden	{display:none;}





		@media screen and (-webkit-min-device-pixel-ratio:0) {

    	/* Webkit-specific CSS here */

		.invoiceDataTax_percentage { border:0px solid red; float:right;padding-right:5px;padding-top:8px;width:15px;color:silver;font-family:verdana;font-size:12px;font-weight:normal;}		

		}

		 .saveButton { height:36px;width:139px;background-image:url(images/graph_button.png);background-repeat:no-repeat;border:0px;font-family:verdana;font-size:12px;color:#616161;padding-bottom:5px;font-weight:bold;}
		 .saveButton:hover { height:36px;width:139px;background-image:url(images/graph_button.png);background-repeat:no-repeat;border:0px;font-family:verdana;font-size:12px;color:black;padding-bottom:5px;font-weight:bold;cursor:pointer;}




		</style>

		

   	   <!--[if IE]>

   	   <style>

		.inputInvoiceDataItem			{ border:0px solid white; padding:5px; padding-top:4px;padding-left:1px; width:86px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;}

		.divWithCustomizationLinkIMG	{ margin:0px;padding:0px;padding-top:2px;}		    



		</style>

 	   <![endif]-->

 	   

  	   	<!--[if lte IE 7]>

   	   	<style>

       	.send_button				{ margin-top:3px;}	  

		.inputInvoiceDataItem		{ outline:none;border:0px solid white; padding:5px; margin-top:5px;padding-left:1px; width:80px; margin-right:6px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;}

		.divWithCustomizationLinkTable   { width:100%;margin:0px; margin-top:10px; padding:0px;background-color:#FFFADC;border-top:2px solid #FCF5CD; border-bottom:2px solid #FCF5CD;padding:3px;padding-left:10px; }		

		.divWithCustomizationLinkIMG	{ margin:0px;padding:0px;padding-top:4px;}		    

	   	</style>

	   	<![endif]-->

 	   
				<style type="text/css">
			iframe {
				display:none;
			}
		</style>

<link type="text/css" href="includes/style1.css" rel="stylesheet" />
      <link type="text/css" href="css/form1.css" rel="stylesheet" />
<script type="text/javascript">
			$(function() {
		
                                    $.datepicker.setDefaults( $.datepicker.regional[ "" ] );
                				$('#invoice_date').datepicker({ dateFormat: 'yy/mm/dd' } );
				$( "#customization_date_format" ).change(function() {
					$( "#invoice_date" ).datepicker( "option", "dateFormat", $( this ).val() );
				});
				$('#payment_due_date').datepicker({ dateFormat: 'yy/mm/dd' } );
				$( "#customization_date_format" ).change(function() {
					$( "#payment_due_date" ).datepicker( "option", "dateFormat", $( this ).val() );
				});
			});



function validnum(str)
  {
  var num=document.getElementById(str).value;
 if(isNaN(num))
  {
   alert('enter digit');
  document.getElementById(str).value=0;
  }
} 


function validateForm()
{
var x=document.forms["f1"]["inno"].value;
if (x==null || x=="")
  {
  alert("Enter invoice number");
  return false;
  }
}


		</script>
<style>
        table.my-account-menu a.my-account-menu-item {

            font-family:verdana;
            color:#1869B8;
            text-decoration:none;
            font-size:13px;
            margin-left:5px;
            padding:2px 5px 4px 5px;
        }

        table.my-account-menu a.my-account-menu-item.menu-selected{
            background: #54A0E7;
            color: #fff;


        }

        table.aynax-main-menu {
            width:100%;
            background-image:url(images/menu_background5.png);
            background-repeat:repeat-x;

        }

        table.aynax-main-menu ul.inner-table{
            width:800px;
            margin: 0 auto !important;
            list-style-type: none;

        }

        table.aynax-main-menu li.inner-table-td {
            position: relative;
            padding:0px;
            text-align:center;
            display:inline;
            height: 34px;
            float: left;
            margin: 0;
        }

        table.aynax-main-menu li.inner-table-td a{

            position: relative;
            top: 4px;
            text-decoration:none;
            color:#3c3c3c;
            font-size:13px;
            font-family:verdana;
            font-weight:normal;
            margin-right: 20px;
        }

        table.aynax-main-menu.ie li.inner-table-td a{

            position: relative;
            top: 4px;
            text-decoration:none;
            color:#3c3c3c;
            font-size:13px;
            font-family:verdana;
            font-weight:normal;
            margin-right: 15px;
        }


        table.aynax-main-menu li.inner-table-td div{

            height:26px;
            padding-left: 20px;
        }

        table.aynax-main-menu.ie li.inner-table-td div{

            height:26px;
            padding-left: 20px;
        }

        table.aynax-main-menu.ie li.inner-table-td.menu-selected div{

            height:26px;
            padding-left: 19px;
        }



        table.aynax-main-menu.ie li.inner-table-td.menu-selected a{
            color:#fff;
        }

        table.aynax-main-menu li.inner-table-td.menu-selected a{

            color:#fff;
        }


        table.aynax-main-menu .menu-selected {
            background: url("images/menu-main-bg.png") no-repeat scroll center top transparent;

        }



        .left-light-gray-border{
            position:relative;
            border-left:solid 1px #ccc;
            top: 0px;
        }

        .right-light-gray-border{
            position:relative;
            border-right:solid 1px #ccc;
            top: 0px;
        }

        .right-light-none-border{
            position:relative;
            border-right:solid 1px transparent;
            top: 0px;
        }

        .left-light-none-border{
            position:relative;
            border-left:solid 1px transparent;
            top: 0px;
        }




    </style>

<body >

<?
  $qry=mysqli_query($db,"select distinct(refno) from gst_expense where brcode='$brcode' order by refno desc");
?>
<table align='center'>
<form name='f1' action='delete_viewinv.php' >
           <tr><td> <b><font style="color:black;">Ref Number:</font></b></td><td><select id="cid"  name='inno' >
          <option>-Select-</option>
           <?
           while($row=mysqli_fetch_array($qry))
             {
                print "<option>$row[0]</option>"  ;
             }
             ?>

</td> <td ><input type='submit' name='show' value='Show' onclick="viewinv1(document.getElementById('cid').value)"></td></tr>

           








</table>




</body>