<?
session_start();
$brcode=$_SESSION['brcode'];
$user=$_SESSION['user'];
include_once("..\opendb.php");
if(strlen($brcode)<=0)
{
 	print "<script> alert('Session timed out'); parent.document.location='ind.php'; </script>";
 	return;
}
?>
<!DOCTYPE html>
<html><head>
<title>Khadi</title>
<html>
<head>
<script type="text/javascript">
alert ("AAAA");
var rawTags;
var inputField;
var initInputFieldValue;
var dataList;
var initNbVirgules ;
<?
print "AAAAAAAAAAAAA";
$select=mysqli_query($db,"select * from ledger where  brcode='$brcode' order by led") or die("ERR6:".mysqli_error());

   $xxx="[";
 while($row=mysqli_fetch_array($select))
 
   {
        $xxx.='"'.$row[0].'",';

   
    }


  
   $xxx.="]"; ?>
rawTags=<?echo $xxx;?>;

 //rawTags = ["alf", "alfred", "alphonse", "bart", "batman", "calimero", "dora", "einstein", "jimmy", "joe dalton", "timo", "trollface", "william dalton", "pikachu"];


  function xx(str,event,this1)
  {


  var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;


  if (keyCode == 37){
                    var row=this1.parentNode.parentNode.rowIndex;
			 var col  =this1.parentNode.cellIndex ;
			 
                     document.getElementById('myTable').rows[row-1].cells[5].getElementsByTagName("input")[0].focus();

	 }

     
 	if (keyCode == 38){
                    var row=this1.parentNode.parentNode.rowIndex;
			 var col  =this1.parentNode.cellIndex ;
			 
                    // document.getElementById('myTable').rows[row-1].cells[col].getElementsByTagName("input")[0].focus();

	 }

       
 	if (keyCode == 40){
                    var row=this1.parentNode.parentNode.rowIndex;
			 var col  =this1.parentNode.cellIndex ;
			 
                    // document.getElementById('myTable').rows[row+1].cells[col].getElementsByTagName("input")[0].focus();

	 }
 
              if (keyCode == 46){
			  var i=this1.parentNode.parentNode.rowIndex;
			  
                       var r=confirm("Do you want to delete the row?");
			  if (r==true)
 				 {
 					//document.getElementById('myTable').deleteRow(i);
					delRow(this1);
                                  document.getElementById('myTable').rows[i].cells[1].getElementsByTagName("input")[0].focus();
                                  
					//var nxt =document.getElementById('myTable').rows[i].cells[0].innerHTML;
					//alert(nxt);
  				 }
			   
                       }



 inputField = document.getElementById(str);

 initInputFieldValue = inputField.value;
 dataList = document.getElementById('htmlListTags');

		if(keyCode!='40')
              {
                if(keyCode!='38')
              {
         

yy(str,event,this1); 


}
 


     }
 
 }
  function yy(str,event,this1)
    {


     initNbVirgules = (initInputFieldValue.match(/,/g)||[]).length;
fillDatalist("",str,event,this1);
    } 
  
function fillDatalist(prefix,str,event,this1) {



	var nbRawList = rawTags.length;
       
	while(dataList.childNodes.length > 0) {
		dataList.removeChild(dataList.childNodes[0]);
	}
	
	for (i=0; i < nbRawList; i++ ) {
		var nOpt = document.createElement("option");
		nOpt.value = prefix+rawTags[i];
		dataList.appendChild(nOpt);
	}

   var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

  
   var itemval=document.getElementById(str).value;


    if((keyCode=='13') &&(itemval!=''))
              {


         closingbal(itemval,this1, 'drcbal', 'myTable');
         handleEnter(this1, event);
         
   	
              }  
}

//mainLoop();









<?



$select1=mysqli_query($db,"select * from ledger where brcode='$brcode' order by led") or die("ERR6:".mysqli_error());

   $xxx="[";
 while($row1=mysqli_fetch_array($select1))
 
   {
        $xxx.='"'.$row1[0].'",';

   
    }


  
   $xxx.="]"; ?>
rawTags1=<?echo $xxx;?>;

 //rawTags = ["alf", "alfred", "alphonse", "bart", "batman", "calimero", "dora", "einstein", "jimmy", "joe dalton", "timo", "trollface", "william dalton", "pikachu"];


  function xx1(str,event,this1)
  {


  var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;


 
         if (keyCode == 37){
                    var row=this1.parentNode.parentNode.rowIndex;
			 var col  =this1.parentNode.cellIndex ;
			 
                     document.getElementById('myTable2').rows[row-1].cells[5].getElementsByTagName("input")[0].focus();

	 }

     
 	if (keyCode == 38){
                    var row=this1.parentNode.parentNode.rowIndex;
			 var col  =this1.parentNode.cellIndex ;
			 
                     document.getElementById('myTable2').rows[row-1].cells[col].getElementsByTagName("input")[0].focus();

	 }

       
 	if (keyCode == 40){
                    var row=this1.parentNode.parentNode.rowIndex;
			 var col  =this1.parentNode.cellIndex ;
			 
                     document.getElementById('myTable2').rows[row+1].cells[col].getElementsByTagName("input")[0].focus();

	 }
           if (keyCode == 46){
			  var i=this1.parentNode.parentNode.rowIndex;
			  
                       var r=confirm("Do you want to delete the row?");
			  if (r==true)
 				 {
 					//document.getElementById('myTable2').deleteRow(i);
					delRow2(this1);
                                  document.getElementById('myTable2').rows[i].cells[1].getElementsByTagName("input")[0].focus();
                                  
					//var nxt =document.getElementById('myTable2').rows[i].cells[0].innerHTML;
					//alert(nxt);
  				 }
			   
                       }



 inputField = document.getElementById(str);

 initInputFieldValue = inputField.value;
 dataList = document.getElementById('htmlListTags');

		if(keyCode!='40')
              {
                if(keyCode!='38')
              {
         

yy1(str,event,this1); 


}
 


     }
 
 }
  function yy1(str,event,this1)
    {


     initNbVirgules = (initInputFieldValue.match(/,/g)||[]).length;
fillDatalist1("",str,event,this1);
    } 
  
function fillDatalist1(prefix,str,event,this1) {



	var nbRawList = rawTags1.length;
       
	while(dataList.childNodes.length > 0) {
		dataList.removeChild(dataList.childNodes[0]);
	}
	
	for (i=0; i < nbRawList; i++ ) {
		var nOpt = document.createElement("option");
		nOpt.value = prefix+rawTags1[i];
		dataList.appendChild(nOpt);
	}

   var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

  
   var itemval=document.getElementById(str).value;


    if((keyCode=='13') &&(itemval!=''))
              {


         closingbal(itemval, this1, 'crcbal', 'myTable2');
         handleEnter2(this1, event);
         
   	
              }  
}

//mainLoop();






</script>





<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; }

.del{
      border: none;
     background: url("images/delete.png") no-repeat scroll 0 0 transparent;
}
</style>
<script type="text/javascript" src="js/jquery.js"></script>






<script>

$(document).ready(function() {
	$('a.login-window').click(function() {
		
		// Getting the variable's value from a link 
		var loginBox = $(this).attr('href');

		//Fade in the Popup and add close button
		$(loginBox).fadeIn(300);
		
		//Set the center alignment padding + border
		var popMargTop = ($(loginBox).height() + 24) / 2; 
		var popMargLeft = ($(loginBox).width() + 24) / 2; 
		
		$(loginBox).css({ 
			'margin-top' : -popMargTop,
			'margin-left' : -popMargLeft
		});
		
		// Add the mask to body
		$('body').append('<div id="mask"></div>');
		$('#mask').fadeIn(300);
		
		return false;
	});
	
	// When clicking on the button close or the mask layer the popup closed
	$('a.close, #mask').live('click', function() { 
	  $('#mask , .login-popup').fadeOut(300 , function() {
		$('#mask').remove();  
	}); 
	return false;
	});
});


 $(document).ready(function(){
  $("#svbttn").click(function(){

$("#msgbox").html('<small>Loading...</small>');
      

    	// var name= $(this).attr('name');

    	 //$('#type_name').val(name);
   
  	 var values1 = $("#jforms").serialize();
 	// $(".typeselecter").attr("disabled", true);
 	 // $("#td1").html('');

  	  $.ajax({
   	   url: "testjour_1.php",
    	  type: "POST",
   	  data:   values1,
     	  success: function(msg){

 

           	 if(parseInt(msg)!=0)    

          	  {

                $('#msgbox').html(msg);
           
		}
           

      	},
      error:function(){
          alert("failure");
          $("#msgbox").html('there is error while submit');
      }   
   	 }); 

	 }); 
	 }); 











$(document).bind('keydown', 'Alt+n',function (e){
      
    if(e.which==78 && e.altKey){
	 //alert (e.which);
        shortkey_tblopen();
        return false;
    } 
     if(e.which==83 && e.altKey){
	 
         $( "#svbttn" ).click();
        return false;
    } 
   if(e.which==82 && e.altKey){
	 
         window.location.reload(true);
        return false;
    } 
      
    
});



</script>







<script type="text/javascript">



  function shortkey_tblopen(){
               
               var rowCounts = document.getElementById('myTable').rows.length;
		 if(rowCounts<=1){
		          
			document.getElementById('insrowbttn').click(); 
               }		   					
 		 else
			document.getElementById('insrowbttn2').click(); 
 }





function handleEnter (field, event) {
               
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 



                if (keyCode == 38){
                    var row=field.parentNode.parentNode.rowIndex;
			 var col  =field.parentNode.cellIndex ;
			 
                     document.getElementById('myTable').rows[row-1].cells[col].getElementsByTagName("input")[0].focus();
			
			 
              }

                  if (keyCode == 40){
                    var row=field.parentNode.parentNode.rowIndex;
			 var col  =field.parentNode.cellIndex ;
			 
                     document.getElementById('myTable').rows[row+1].cells[col].getElementsByTagName("input")[0].focus();
			
			 
              }
                     if (keyCode == 37){


                    /* var row=field.parentNode.parentNode.rowIndex;
			 var col  =field.parentNode.cellIndex ;
			 
                     document.getElementById('myTable').rows[row].cells[col-1].getElementsByTagName("input")[0].focus();*/

                   var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i - 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
			
			 
              }
               
                   	 if (keyCode == 46){
			  var i=field.parentNode.parentNode.rowIndex;
			  
                       var r=confirm("Do you want to delete the row?");
			  if (r==true)
 				 {
 					//document.getElementById('myTable').deleteRow(i);
					delRow(field);
                                  document.getElementById('myTable').rows[i].cells[1].getElementsByTagName("input")[0].focus();
                                  
					//var nxt =document.getElementById('myTable').rows[i].cells[0].innerHTML;
					//alert(nxt);
  				 }
			  
        }
		else
		return true;
	}      



function counttot(r,val)
{
var i=r.parentNode.parentNode.rowIndex;
var str1=0;

   var tbl = document.getElementById('myTable');
   var id1=tbl.rows[i].cells[0].innerHTML;

if(isNaN(val))
  {
  alert('Enter Digit');
 document.getElementById("dr_amt"+id1).value=0;
  
  }
else
 {
var n=document.getElementById('myTable').rows.length-1;
var m;
for(m=1;m<=n;m++)	
    {
     var tbl1 = document.getElementById('myTable');
     var id2=tbl1.rows[m].cells[0].innerHTML;
    var itemval = document.getElementById("dr_amt"+id2).value;
    
         str1=parseFloat(str1)+parseFloat(itemval); 
        
     }
  document.getElementById("dbtot").value= str1.toFixed(2);
}
}
function countcrtot(r,val)
{
var i=r.parentNode.parentNode.rowIndex;
var str1=0;

   var tbl = document.getElementById('myTable2');
   var id1=tbl.rows[i].cells[0].innerHTML;

if(isNaN(val))
  {
  alert('Enter Digit');
 document.getElementById("cr_amt"+id1).value=0;
  
  }
else
 {
var n=document.getElementById('myTable2').rows.length-1;
var m;
for(m=1;m<=n;m++)	
    {
     var tbl1 = document.getElementById('myTable2');
     var id2=tbl1.rows[m].cells[0].innerHTML;
    var itemval = document.getElementById("cr_amt"+id2).value;
    
         str1=parseFloat(str1)+parseFloat(itemval); 
        
     }
  document.getElementById("crtot").value= str1.toFixed(2);
}
}



function closingbal(str, r, id2, tabl)
{


var i=r.parentNode.parentNode.rowIndex;


   var tbl = document.getElementById(tabl);
   var id1=tbl.rows[i].cells[0].innerHTML;



 if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {
    document.getElementById("clb").innerHTML=xmlhttp.responseText;
    var  clbal= document.getElementById("clbal").value;
    document.getElementById(id2+id1).value=clbal;
    }
  }


xmlhttp.open("GET","getclbal_crec.php?led="+str+"&& id="+id1,true);
xmlhttp.send();
}



    </script>




<script type="text/javascript">
var tq=0,tq2=0;
var cur=1;
var cnt=1;
var vv;
var drs=[];
var dr=[];
var dr_amt=[];
var dr_narr=[];
var dragain=[];
var dragval=[];
function setval(a)
{
 vv=a.name;
}
function insRow(event,i1,id2)
{


var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

var cur_val=i1.value;


switch(keyCode)
{
case 38:
   var row=i1.parentNode.parentNode.rowIndex;
   var col  =i1.parentNode.cellIndex ;
			 
   document.getElementById('myTable').rows[row-1].cells[col].getElementsByTagName("input")[0].focus();
  break;
case 40:
  var row=field.parentNode.parentNode.rowIndex;
  var col  =field.parentNode.cellIndex ;
			 
   document.getElementById('myTable').rows[row+1].cells[col].getElementsByTagName("input")[0].focus();
			
  break;
case 37:
  var row=field.parentNode.parentNode.rowIndex;
  var col  =field.parentNode.cellIndex ;
			 
  document.getElementById('myTable').rows[row].cells[col-1].getElementsByTagName("input")[0].focus();
	
}

if(id2!="insrowbttn")
  {
   var i2=i1.parentNode.parentNode.rowIndex;
   var i3=parseFloat(i2)+parseFloat(1);
   var rowCounts = document.getElementById('myTable').rows.length;
   var rowCounts1= rowCounts-1;
   
  
  }
else
  {
   var i2=0;
   var rowCounts1=0;
  }
//alert(cur);



		if(((keyCode == 13) && (i2==rowCounts1))||(cnt==1))
 {
var rowCount = document.getElementById('myTable').rows.length;
var rowcount1=parseFloat(rowCount)+parseFloat(1);
//alert(rowCount);
var x=document.getElementById('myTable').insertRow(rowCount);


if(rowCount>=1)
 {
  document.getElementById('insrowbttn').type='hidden';
 }

var k;
var a=x.insertCell(0)
var y=x.insertCell(1)
var z=x.insertCell(2)	
var z1=x.insertCell(3)	
var ag=x.insertCell(4)
var agval=x.insertCell(5)
var op=x.insertCell(6);
var dd=x.insertCell(7)
a.innerHTML=cur
y.innerHTML="<input type=text name='dr[]' id=dr"+cur+"  size=35    onkeyup='xx(this.id,event,this)'  autocomplete='off' list='htmlListTags'  >";;


z.innerHTML="<input type=text name=dr_amt[] id=dr_amt"+cur+" value='0' size=10 onKeydown='return handleEnter(this, event)' onchange='counttot(this,this.value)'>"
z1.innerHTML="<input type=text id='dr_narr"+cur+"' name=dr_narr[] size=30 onKeydown='return handleEnter(this, event)'>"

ag.innerHTML="<select name='dragain[]' id='dragain"+cur+"' onKeydown='return handleEnter(this, event)'><option>OFNO</option><option>MSNO</option><option> ON Acc </option> <option>CHEQ</option></select>";
agval.innerHTML="<input type=text id='dragval"+cur+"'name='dragval[]' onKeydown='return handleEnter(this, event)' >";
op.innerHTML="<input type=text readonly id='drcbal"+cur2+"'  onKeyup='insRow(event,this,this.id)' >";
dd.innerHTML="<input type='button'  onClick='delRow(this)' class='del'>";
document.getElementById("dr"+cur).focus();
  cur++; 

cnt++;



var table = document.getElementById("myTable");
var row = table.rows[index];
console.log(secondRow.id);
}

if(keyCode == 13)
{
var tbl = document.getElementById('myTable');
   var id3=tbl.rows[i3].cells[0].innerHTML;
document.getElementById("dr"+id3).focus();
} 

}
function delRow(r)
{
 var i=r.parentNode.parentNode.rowIndex;
document.getElementById('myTable').deleteRow(i);

  var rowCount = document.getElementById('myTable').rows.length;
   var tbl = document.getElementById('myTable');  

  if(rowCount<=1)
 {
  document.getElementById('insrowbttn').type='button';
 }



var str1=0;

 
var n=document.getElementById('myTable').rows.length-1;
var m;
for(m=1;m<=n;m++)	
    {
     var tbl1 = document.getElementById('myTable');
     var id2=tbl1.rows[m].cells[0].innerHTML;
    var itemval = document.getElementById("dr_amt"+id2).value;
    
         str1=parseFloat(str1)+parseFloat(itemval); 
        
     }
  document.getElementById("dbtot").value= str1.toFixed(2);


cnt--;

}

//************************************
function calcdr()
{
var tq=0;
for(i=1;i<cur;i++)
{
 var ele='dr'+i; //alert(ele);
 if(document.getElementById(ele).value>0)
  {
   amount=document.getElementById(ele).value;
   tq+=parseFloat(amount);
  }
 }
document.f1.tdamt.value=tq;
}

function calccr()
{
var tq2=0;
for(i=1;i<cur2;i++)
{
 var ele2='cr'+i; //alert(ele);
 if(document.getElementById(ele2).value>0)
  {
   amount=document.getElementById(ele2).value;
   tq2+=parseFloat(amount);
  }
 }
document.f1.tcamt.value=tq2;
}




function handleEnter2 (field, event) {
               
		var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
		if (keyCode == 13) {
			var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i + 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
		} 


                if (keyCode == 38){
                    var row=field.parentNode.parentNode.rowIndex;
			 var col  =field.parentNode.cellIndex ;
			 
                     document.getElementById('myTable2').rows[row-1].cells[col].getElementsByTagName("input")[0].focus();
			
			 
              }

                  if (keyCode == 40){
                    var row=field.parentNode.parentNode.rowIndex;
			 var col  =field.parentNode.cellIndex ;
			 
                     document.getElementById('myTable2').rows[row+1].cells[col].getElementsByTagName("input")[0].focus();
			
			 
              }
                     if (keyCode == 37){


                    /* var row=field.parentNode.parentNode.rowIndex;
			 var col  =field.parentNode.cellIndex ;
			 
                     document.getElementById('myTable2').rows[row].cells[col-1].getElementsByTagName("input")[0].focus();*/

                   var i;
			for (i = 0; i < field.form.elements.length; i++)
				if (field == field.form.elements[i])
					break;
			i = (i - 1) % field.form.elements.length;
			field.form.elements[i].focus();
			return false;
			
			 
              }
                     	  if (keyCode == 46){
			  var i=field.parentNode.parentNode.rowIndex;
			  
                       var r=confirm("Do you want to delete the row?");
			  if (r==true)
 				 {
 					//document.getElementById('myTable2').deleteRow(i);
					delRow2(field);
                                  document.getElementById('myTable2').rows[i].cells[1].getElementsByTagName("input")[0].focus();
                                  
					//var nxt =document.getElementById('myTable2').rows[i].cells[0].innerHTML;
					//alert(nxt);
  				 }
			   
                       }
                   
		else
		return true;
	}    



//-------*888888888888888888888888*********************8888
var cur2=1;
var cnt2=1;
var cr=[];
var cr_amt=[];
var cr_narr=[];
var cragain=[];
var cragval=[];;
function insRow2(event,i1,id2)
{


var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

var cur_val=i1.value;


switch(keyCode)
{
case 38:
   var row=i1.parentNode.parentNode.rowIndex;
   var col  =i1.parentNode.cellIndex ;
			 
   document.getElementById('myTable2').rows[row-1].cells[col].getElementsByTagName("input")[0].focus();
  break;
case 40:
  var row=field.parentNode.parentNode.rowIndex;
  var col  =field.parentNode.cellIndex ;
			 
   document.getElementById('myTable2').rows[row+1].cells[col].getElementsByTagName("input")[0].focus();
			
  break;
case 37:
  var row=field.parentNode.parentNode.rowIndex;
  var col  =field.parentNode.cellIndex ;
			 
  document.getElementById('myTable2').rows[row].cells[col-1].getElementsByTagName("input")[0].focus();
	
}



if(id2!="insrowbttn2")
  {
   var i2=i1.parentNode.parentNode.rowIndex;
   var i3=parseFloat(i2)+parseFloat(1);
   var rowCounts = document.getElementById('myTable2').rows.length;
   var rowCounts1= rowCounts-1;
   
  
  }
else
  {
   var i2=0;
   var rowCounts1=0;
  }
//alert(cur2);



		if(((keyCode == 13) && (i2==rowCounts1))||(cnt2==1))
 {
var rowCount = document.getElementById('myTable2').rows.length;
var rowcount1=parseFloat(rowCount)+parseFloat(1);
//alert(rowCount);
var x=document.getElementById('myTable2').insertRow(rowCount);


if(rowCount>=1)
 {
  document.getElementById('insrowbttn2').type='hidden';
 }
var k;
var a=x.insertCell(0)
var y=x.insertCell(1)
var z=x.insertCell(2)	
var z1=x.insertCell(3)	

var crag=x.insertCell(4)
var cragval1=x.insertCell(5)
var op=x.insertCell(6);
var dd=x.insertCell(7)
a.innerHTML=cur2
y.innerHTML="<input type=text name='cr[]' id=cr"+cur2+"  size=35    onkeyup='xx1(this.id,event,this)'  autocomplete='off' list='htmlListTags'  >";

z.innerHTML="<input type=text name=cr_amt[] id=cr_amt"+cur2+" size=10 value='0' onchange='countcrtot(this,this.value)' onKeydown='return handleEnter2(this, event)'>"
z1.innerHTML="<input type=text id='cr_narr"+cur2+"' name=cr_narr[] size=30 onKeydown='return handleEnter2(this, event)'>"

crag.innerHTML="<select name='cragain[]' id='cragain"+cur2+"' onChange=getda(this,cur2,cr) onKeydown='return handleEnter2(this, event)'><option>OFNO</option><option>MSNO</option><option> ON Acc </option> <option>CHEQ</option></select>";
cragval1.innerHTML="<input type=text id='cragval"+cur2+"' name='cragval[]'  onKeydown='return handleEnter2(this, event)'  >";
op.innerHTML="<input type=text readonly id='crcbal"+cur2+"'  onKeyup='insRow2(event,this,this.id)' >";
dd.innerHTML="<input type='button'  onClick='delRow2(this)' class='del'>";
document.getElementById("cr"+cur2).focus();
  cur2++; 

cnt2++;



var table = document.getElementById("myTable2");
var row = table.rows[index];
console.log(secondRow.id);
}

if(keyCode == 13)
{
var tbl = document.getElementById('myTable2');
   var id3=tbl.rows[i3].cells[0].innerHTML;
document.getElementById("cr"+id3).focus();
} 
}
function delRow2(r)
{
 var i=r.parentNode.parentNode.rowIndex;
document.getElementById('myTable2').deleteRow(i);

  var rowCount = document.getElementById('myTable2').rows.length;
   var tbl = document.getElementById('myTable2');

  if(rowCount<=1)
 {
  document.getElementById('insrowbttn2').type='button';
 }


var str1=0;
var n=document.getElementById('myTable2').rows.length-1;
var m;
for(m=1;m<=n;m++)	
    {
     var tbl1 = document.getElementById('myTable2');
     var id2=tbl1.rows[m].cells[0].innerHTML;
    var itemval = document.getElementById("cr_amt"+id2).value;
    
         str1=parseFloat(str1)+parseFloat(itemval); 
        
     }
  document.getElementById("crtot").value= str1.toFixed(2);
cnt2--;
}

function valid()
{
 calccr();
 calcdr();
 if(document.f1.tdamt.value==document.f1.tcamt.value)
   return true;
 else
   {alert('Dr, Cr Amount mis-match'); return false;}
}
</script>
<script>


function newcustomer()
{
 document.getElementById("to_new_customerTD").innerHTML=" <input id='to_new_customer' name='cus' style='outline:none;border:0px solid white;width:287px; padding-left:7px; font-weight:normal; font-family:verdana;font-size:13px;color:silver;' name='to_new_customer' onkeyup='sanitizeNames(this);' onfocus='field_onfocus(this,'Customer name');' onblur='field_onblur(this,'Customer name');' value='Customer name' type='text'>";
 document.getElementById("to_new_registerTD").innerHTML=" <input id='to_new_register' name='reg' style='outline:none;border:0px solid white;width:287px; padding-left:7px; font-weight:normal; font-family:verdana;font-size:13px;color:silver;' name='to_new_register' onkeyup='sanitizeNames(this);' onfocus='field_onfocus(this,'Register number');' onblur='field_onblur(this,'Register number');' value='Register number' type='text'>"
 document.getElementById("show").innerHTML="<a href='#' style='text-decoration:none; color:black;' onclick='showcustomer()'>Click Here to Show Existing Customer</a>";
}


</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;
border:1px solid silver;

}	
.tble1 td
{
//border-collapse:collapse;
border:1px solid silver;

}



</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() );
				});
			});
		</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>
<?php include_once('includes/top.php'); ?>
<?php include_once('help_window.php'); ?>
<body style="text-align: center; height:100%;width:100%;margin: 0 auto !important;" onload="document.getElementById('insrowbttn').focus();">


            <input id="cid" name="cid" value="6059949" type="hidden">

           



        

            <!--[if IE 7 ]><table class="aynax-main-menu ie ie7" cellpadding=0 cellspacing=0 border=0> <![endif]-->
            <!--[if IE 8 ]><table class="aynax-main-menu ie ie8" cellpadding=0 cellspacing=0 border=0> <![endif]-->
            <!--[if IE 9 ]><table class="aynax-main-menu ie ie9" cellpadding=0 cellspacing=0 border=0> <![endif]-->
            <!--[if (gt IE 9)|!(IE)]><!--> 
            <script id="scriptlet_aynax_menu">

                var selectedMainMenu = "main-menu-item-Invoices";
                var lastSelectedMenu = null;

                $(function(){
                    $("table.aynax-main-menu").css("background-color","#F9F9F9");$("#main_table_wrapper").css("top","0px")
                });


            </script>
            
       <br>


        	<table id="main_table_wrapper" style=" top: 0px; width: 800px; margin: 0px auto ! important; text-align: left;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td>


		
    <div id="MessageContent" style="display: none; padding-bottom: 0px;">
        <table style="width:100%;margin-bottom:20px;" border="0" cellpadding="0" cellspacing="0" >
            <tbody><tr>
                <td colspan="2" style="padding-top:3px;">
                    <div id="divWithInfoMessage">
                        <table style="width:100%;margin:0px; margin-top:0px; margin-bottom:10px;background-color:#FFFADC;border-top:2px solid #FCF5CD; border-bottom:2px solid #FCF5CD;padding:5px;padding-left:12px;padding-top:10px;" cellpadding="0" cellspacing="0">
                            <tbody><tr>
                                <td valign="top">
                                    <img style="margin:0px;padding:0px;" src="New%20Invoice%20%20%20Aynax.com_files/blue-information-25.gif">
                                </td>
                                <td style="padding-left:10px;">
                                    <span onclick="document.getElementById('MessageContent').style.display='none';" title="Remove Message" style="float:right;margin-top:-7px;font-size:10px;font-family:arial;color:#808080; font-weight:bold;cursor:pointer;">[x]</span>
                                    <font style="font-size:13px;font-family:verdana;color:#3c3c3c;">
                                        <p style="margin-top: 3px;font-weight:bold;font-family:verdana;font-size:13px;">Headers and footers on your print-outs</p>
                                        <p style="font-family:verdana;">Internet
 Explorer, Firefox and other browsers insert a header/footer into 
documents printed via the print button below. There are two ways to 
avoid this:</p>
                                        <p style="font-family:verdana;">1) Print a PDF-version (it is always clean)<br>
                                            2) Turn off headers and footers in your browser (<a href="#_" onclick="hideshowelement('explain_div');" style="color: #1869B8;">click here to see how</a>)
                                        </p>
                                        <div style="width: 100%;display:none;" id="explain_div">
                                            <p style="font-family:verdana;font-size:12px;padding-top:20px;">Click the name of your browser for detailed instructions:</p>
                                            <a href="#_" style="color: #1869B8;font-family:verdana;font-size:12px;" onclick="hideshowelement('explain_div_ie');">Internet Explorer</a><br>
                                            <div style="width: 100%;display:none;" id="explain_div_ie">
                                                <ul class="explain_ul" style="font-family:verdana;font-size:12px;">
                                                    <li>Click "File" in the browser menu (at the very top of your screen)</li>
                                                    <li>Select "Page Setup" in the dropdown</li>
                                                    <li>Select "-Empty-" in all the dropdowns in the section labelled "Headers and Footers" in the bottom half of the print dialogue.</li>
                                                </ul>
                                            </div>
                                            <a href="#_" style="color: #1869B8;font-family:verdana;font-size:12px;" onclick="hideshowelement('explain_div_ff');">Firefox</a><br>
                                            <div style="width: 100%;display:none;" id="explain_div_ff">
                                                <ul class="explain_ul" style="font-family:verdana;font-size:12px;">
                                                    <li>Click "File" in the browser menu (at the very top of your screen)</li>
                                                    <li>Select "Page Setup" in the dropdown</li>
                                                    <li>Click the "Margins &amp; Header/Footer" tab</li>
                                                    <li>Select "--blank--" in all the dropdowns in the section labelled "Headers and Footers" in the bottom half of the print dialogue.</li>
                                                </ul>
                                            </div>
                                            <a href="#_" style="color: #1869B8;font-family:verdana;font-size:12px;" onclick="hideshowelement('explain_div_chrome');">Chrome</a><br>
                                            <div style="width: 100%;display:none;" id="explain_div_chrome">
                                                <ul class="explain_ul" style="font-family:verdana;font-size:12px;">
                                                    <li>Headers / Footers cannot be removed from Google's Chrome. Your only option is to print a PDF-version instead.</li>
                                                </ul>
                                            </div>

                                            <a href="#_" style="color: #1869B8;font-family:verdana;font-size:12px;" onclick="hideshowelement('explain_div_safari');">Safari (Mac-version)</a><br>
                                            <div style="width: 100%;display:none;" id="explain_div_safari">
                                                <ul class="explain_ul" style="font-family:verdana;font-size:12px;">
                                                    <li>Click "File" in the menu</li>
                                                    <li>Select "Print"</li>
                                                    <li>Remove the checkbox next to "Print headers and footers" at the bottom of the print dialogue.</li>
                                                </ul>
                                            </div>
                                        </div>
                                        <script type="text/javascript">
                                            $('#print_message_check').live('click', function(event) {
                                                if($('#print_message_check').is(':checked')){
                                                    $.ajax({
                                                        type: "GET",
                                                        url: "turnPrintMessageOff.inc.php",
                                                        data: "act=ajax_request&function_name=printMessageOff",
                                                        success: function(msg){
                                                            document.getElementById('MessageContent').innerHTML='';
                                                        }
                                                    });
                                                }
                                            });
                                        </script>
                                        <div style="width: 100%;padding-top:5px;">
                                            <table class="pricingTable" style="border: none;" align="center" cellpadding="0" cellspacing="0" width="100%">
                                                <tbody><tr>
                                                    <td style="border:none;width:5px;" align="left">
                                                        <input name="dont_show_print_popup" id="print_message_check" value="1" type="checkbox">
                                                    </td>
                                                    <td style="border:none;width:500px;">
                                                        <i>Never show this message again</i>
                                                    </td>
                                                </tr>
                                            </tbody></table>
                                        </div>

                                    </font>
                                </td>
                            </tr>
                        </tbody></table>
                    </div>
                </td>
            </tr>
        </tbody></table>

    </div>



    

		<table style="width:100%; margin:0px;padding:0px;margin:0 auto;margin-bottom:5px;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>
		<td style="text-align:left;padding-top:15px;">
		<h1 style="font-size:20px;font-weight:bold;font-family:verdana;color:#FFFFFD;margin:0px; padding:0px;">
	Journal:
		</h1>
		</td>
		</tr>
		</tbody></table>
		


    <table style="width:100%; margin-left:0px;margin-bottom:20px;" border="0" cellpadding="0" cellspacing="0"><tbody><tr>

        <td style="text-align:left;padding-top:0px;">



            
            <!--<span class="toggleFilterLink" id="showCustomization" onclick="showOrHideCustomizationLink('show');" style="width:115px;color:#FFFFFD">Show Customization Options</span>-->

            
            <span class="toggleFilterLink" id="hideCustomization" onclick="showOrHideCustomizationLink('hide');" style="display:none;width:115px;color:#FFFFFD">Hide Customization Options</span>



        </td>

    </tr>

    </tbody></table>



    
    <div class="divWithCustomization" style="display:none;" id="divWithCustomization">

    <table style="padding-left:30px;padding-right:10px;padding-top:0px;" border="0" cellpadding="0" cellspacing="0">

    <tbody><tr>

        <td style="height:15px;"></td>

    </tr>




            <tr>

    <td style="vertical-align:top;">

        <table style="font-family:verdana;font-size:12px;color:#3c3c3c;" border="0" cellpadding="0" cellspacing="0">

            <tbody><tr><td colspan="2" style="padding-bottom:8px;"></td></tr>

            <tr>
                <td style="width:30px;"><input onclick="customization_toggleFields(this)" name="customization_logo" id="customization_logo" type="checkbox"></td>
                <td style="width:150px;">Logo</td>
            </tr>
                        <tr>
                <td style="width:30px;"><input onclick="customization_toggleFields(this)" name="customization_poNumber" id="customization_poNumber" type="checkbox"></td>
                <td style="width:150px;">P.O. #</td>
            </tr>
                        <tr>
                <td><input onclick="customization_toggleFields(this)" name="customization_discount" id="customization_discount" type="checkbox"></td>
                <td style="width:150px;">Discount</td>
            </tr>

            <tr><td colspan="2" style="height:16px;">&nbsp;</td></tr>

            <tr>
                <td colspan="2" style="width:150px;padding-bottom:8px;">
                    Language:<br>
                    
                    <select onchange="customization_toggleLanguage(this)" id="customization_language" style="margin-top:5px; padding-left:2px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;">
                        <option value="Danish">Danish</option><option value="Dutch">Dutch</option><option value="English" selected="selected">English</option><option value="French">French</option><option value="German">German</option><option value="Italian">Italian</option><option value="Norwegian">Norwegian</option><option value="Portuguese">Portuguese</option><option value="Spanish">Spanish</option>                    </select>
                </td>
            </tr>

            <tr><td colspan="2" style="width:80px;border-right:0px solid #d1d1d1;font-size:10px;">Affects only the finished invoice, not the template below</td></tr>

        </tbody></table>
    </td>
        

        
    <td style="vertical-align:top;padding-left:40px;">
        <table style="font-family:verdana;font-size:12px;color:#3c3c3c;" border="0" cellpadding="0" cellspacing="0">
            <tbody><tr><td colspan="2" style="padding-bottom:8px;"></td></tr>

            <tr><td colspan="2" style="padding-bottom:8px;border-right:1px solid #d1d1d1;height:120px;">
            </td>
            </tr>

        </tbody></table>
    </td>

        


        
    <td style="vertical-align:top;padding-left:70px;">
    <table style="font-family:verdana;font-size:12px;color:#3c3c3c;" border="0" cellpadding="0" cellspacing="0">


    <tbody><tr><td colspan="2" style="border:0px solid black; padding-top:9px;padding-bottom:8px;border-right:0px solid #d1d1d1;vertical-align:top;">

       
    </td>
    </tr>

    <tr><td style="height:25px;">&nbsp;</td></tr>

    <tr><td colspan="2" style="padding-bottom:8px;border-right:0px solid #d1d1d1;">

        <table cellpadding="0" cellspacing="0"><tbody><tr><td>
            Currency:<br>

            

            <select onchange="customization_toggleCurrency(this)" id="currency_code" name="currency_code" style="margin-top:5px; padding-left:2px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;">
                <option value="USD" selected="selected">USD US Dollar</option><option value="CAD">CAD Canadian Dollar</option><option value="EUR">EUR Euro</option><option value="GBP">GBP Pound Sterling</option><option value="AUD">AUD Australian Dollar</option><option value="NZD">NZD New Zealand Dollar</option><option disabled="disabled"></option><option value="AED">AED UAE Dirham</option><option value="AFN">AFN Afghani</option><option value="ALL">ALL Lek</option><option value="AMD">AMD Armenian Dram</option><option value="ANG">ANG Neth. Ant. Guilder</option><option value="AOA">AOA Kwanza</option><option value="ARS">ARS Argentine Peso</option><option value="AWG">AWG Aruban Guilder</option><option value="AZN">AZN Azerbaijanian Manat</option><option value="BAM">BAM Convertible Marks</option><option value="BBD">BBD Barbados Dollar</option><option value="BDT">BDT Bangladeshi Taka</option><option value="BGN">BGN Bulgarian Lev</option><option value="BHD">BHD Bahraini Dinar</option><option value="BIF">BIF Burundian Franc</option><option value="BMD">BMD Bermudian Dollar</option><option value="BND">BND Brunei Dollar</option><option value="BOB">BOB Boliviano</option><option value="BRL">BRL Brazilian Real</option><option value="BSD">BSD Bahamian Dollar</option><option value="BTN">BTN Ngultrum</option><option value="BWP">BWP Pula</option><option value="BZD">BZD Belize dollar</option><option value="CDF">CDF Franc Congolais</option><option value="CHF">CHF Swiss Franc</option><option value="CLP">CLP Chilean Peso</option><option value="CNY">CNY Renminbi</option><option value="COP">COP Colombian Peso</option><option value="CRC">CRC Costa Rican Colon</option><option value="CUP">CUP Cuban Peso</option><option value="CVE">CVE Cape Verde Escudo</option><option value="CZK">CZK Czech Koruna</option><option value="DJF">DJF Djibouti Franc</option><option value="DKK">DKK Danish Krone</option><option value="DOP">DOP Dominican Peso</option><option value="DZD">DZD Algerian Dinar</option><option value="EEK">EEK Kroon</option><option value="EGP">EGP Egyptian Pound</option><option value="ERN">ERN Nakfa</option><option value="ETB">ETB Ethiopian Birr</option><option value="FJD">FJD Fiji Dollar</option><option value="FKP">FKP Falklands Pound</option><option value="GEL">GEL Lari</option><option value="GHS">GHS Cedi</option><option value="GIP">GIP Gibraltar Pound</option><option value="GMD">GMD Dalasi</option><option value="GNF">GNF Guinea Franc</option><option value="GTQ">GTQ Quetzal</option><option value="GYD">GYD Guyana Dollar</option><option value="HKD">HKD Hong Kong Dollar</option><option value="HNL">HNL Lempira</option><option value="HRK">HRK Croatian Kuna</option><option value="HTG">HTG Haiti Gourde</option><option value="HUF">HUF Forint</option><option value="IDR">IDR Rupiah</option><option value="ILS">ILS New Israeli Shekel</option><option value="INR">INR Indian Rupee</option><option value="IQD">IQD Iraqi Dinar</option><option value="IRR">IRR Iranian Rial</option><option value="ISK">ISK Iceland Krona</option><option value="JMD">JMD Jamaican Dollar</option><option value="JOD">JOD Jordanian Dinar</option><option value="JPY">JPY Japanese Yen</option><option value="KES">KES Kenyan Shilling</option><option value="KGS">KGS Som</option><option value="KHR">KHR Riel</option><option value="KMF">KMF Comoro Franc</option><option value="KPW">KPW North Korean Won</option><option value="KRW">KRW South Korean Won</option><option value="KWD">KWD Kuwaiti Dinar</option><option value="KYD">KYD Caymans Dollar</option><option value="KZT">KZT Tenge</option><option value="LAK">LAK Kip</option><option value="LBP">LBP Lebanese Pound</option><option value="LKR">LKR Sri Lanka Rupee</option><option value="LRD">LRD Liberian Dollar</option><option value="LSL">LSL Loti</option><option value="LTL">LTL Lithuanian Litas</option><option value="LVL">LVL Latvian Lats</option><option value="LYD">LYD Libyan Dinar</option><option value="MAD">MAD Moroccan Dirham</option><option value="MDL">MDL Moldovan Leu</option><option value="MGA">MGA Malagasy Ariary</option><option value="MKD">MKD Denar</option><option value="MNT">MNT Tugrik</option><option value="MOP">MOP Pataca</option><option value="MRO">MRO Ouguiya</option><option value="MUR">MUR Mauritius Rupee</option><option value="MVR">MVR Rufiyaa</option><option value="MWK">MWK Kwacha</option><option value="MXN">MXN Mexican Peso</option><option value="MYR">MYR Malaysian Ringgit</option><option value="MZN">MZN Metical</option><option value="NAD">NAD Namibian Dollar</option><option value="NGN">NGN Naira</option><option value="NIO">NIO Cordoba Oro</option><option value="NOK">NOK Norwegian Krone</option><option value="NPR">NPR Nepalese Rupee</option><option value="OMR">OMR Rial Omani</option><option value="PAB">PAB Balboa</option><option value="PEN">PEN Nuevo Sol</option><option value="PGK">PGK Kina</option><option value="PHP">PHP Philippine Peso</option><option value="PKR">PKR Pakistan Rupee</option><option value="PLN">PLN Zloty</option><option value="PYG">PYG Guarani</option><option value="QAR">QAR Qatari Rial</option><option value="RON">RON Romanian New Leu</option><option value="RSD">RSD Serbian Dinar</option><option value="RUB">RUB Russian Ruble</option><option value="RWF">RWF Rwanda Franc</option><option value="SAR">SAR Saudi Riyal</option><option value="SBD">SBD Solomons Dollar</option><option value="SCR">SCR Seychelles Rupee</option><option value="SDG">SDG Sudanese Pound</option><option value="SEK">SEK Swedish Krona</option><option value="SGD">SGD Singapore Dollar</option><option value="SHP">SHP St Helena Pound</option><option value="SKK">SKK Slovak Koruna</option><option value="SLL">SLL Leone</option><option value="SRD">SRD Surinam Dollar</option><option value="SSP">SSP S. Sudanese Pound</option><option value="STD">STD Dobra</option><option value="SYP">SYP Syrian Pound</option><option value="SZL">SZL Lilangeni</option><option value="THB">THB Baht</option><option value="TJS">TJS Somoni</option><option value="TMM">TMM Manat</option><option value="TND">TND Tunisian Dinar</option><option value="TOP">TOP Pa'anga</option><option value="TRY">TRY Turkish Lira</option><option value="TTD">TTD T&amp;T Dollar</option><option value="TWD">TWD New Taiwan Dollar</option><option value="TZS">TZS Tanzanian Shilling</option><option value="UAH">UAH Hryvnia</option><option value="UGX">UGX Uganda Shilling</option><option value="UYU">UYU Peso Uruguayo</option><option value="UZS">UZS Uzbekistan Som</option><option value="VEF">VEF Bolivar Fuerte</option><option value="VND">VND Vietnamese Dong</option><option value="VUV">VUV Vatu</option><option value="WST">WST Samoan Tala</option><option value="XAF">XAF CFA Franc BEAC</option><option value="XCD">XCD E. Carib. Dollar</option><option value="XOF">XOF CFA Franc BCEAO</option><option value="XPF">XPF CFP Franc</option><option value="YER">YER Yemeni Rial</option><option value="ZAR">ZAR S. African Rand</option><option value="ZMK">ZMK Kwacha</option>            </select>
        </td></tr></tbody></table>

    </td>
    </tr>

    <tr>
        <td><input onclick="customization_toggleShowCurrencyCode(this)" name="show_currency_code" id="show_currency_code" type="checkbox"></td>
        <td style="width:150px;border-right:0px solid #d1d1d1;font-size:10px;">Show three letter currency code on invoice</td>
    </tr>



    </tbody></table>
    </td>

        
        
    <td style="vertical-align:top;padding-left:70px;">
        <table style="font-family:verdana;font-size:12px;color:#3c3c3c;" border="0" cellpadding="0" cellspacing="0">
            <tbody><tr><td colspan="2" style="padding-bottom:8px;"></td></tr>

            <tr><td colspan="2" style="padding-bottom:8px;border-right:1px solid #d1d1d1;height:120px;">
            </td>
            </tr>

        </tbody></table>
    </td>

        



            <td style="vertical-align:top;padding-left:70px;">

        <table style="font-family:verdana;font-size:12px;color:#3c3c3c;" border="0" cellpadding="0" cellspacing="0">


            <tbody><tr><td colspan="2" style="padding-bottom:8px;"></td></tr>
            <tr>
                <td style="width:30px;"><input onclick="disableTax2(this);customization_toggleFields(this)" name="customization_tax" id="customization_tax" type="checkbox"></td>
                <td class="invoiceForm_fromNameTD" style="width:80px;" id="from_nameTD">
                    <input id="customization_taxname" style="outline:none;border:0px solid white;width:80px; padding-left:7px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;" onchange="customization_toggleTaxName(this);" onfocus="field_onfocus(this,'');" onblur="field_onblur(this,'');" value="Tax" type="text">
                </td>
            </tr>

            <tr id="tax2_TR1" style="display:none;"><td colspan="2" style="padding-bottom:8px;"></td></tr>
            <tr id="tax2_TR2" style="display:none;">
                <td style="width:30px;"><input onclick="enableTax1(this);customization_toggleFields(this)" name="customization_tax2" id="customization_tax2" type="checkbox"></td>
                <td class="invoiceForm_fromNameTD" style="width:80px;" id="from_nameTD">
                    <input id="customization_taxname2" style="outline:none;border:0px solid white;width:80px; padding-left:7px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;" onchange="customization_toggleTaxName2(this);" onfocus="field_onfocus(this,'');" onblur="field_onblur(this,'');" value="Tax" type="text">
                </td>
            </tr>

            <tr><td colspan="2" style="padding-bottom:8px;height:5px;"></td></tr>
            <tr>
                <td id="second_tax_link" colspan="2" style="width:30px;">
                    <a onclick="customization_showSecondTax();" style="color:#1869B8;font-size:11px;cursor:pointer;">Add second tax</a>
                </td>

                

        </tr></tbody></table>
    </td>
        




    </tr>



    </tbody></table>

    </div>

    <input id="translation_English" value="INVOICE" type="hidden"><input id="translation_French" value="FACTURE" type="hidden"><input id="translation_Danish" value="FAKTURA" type="hidden"><input id="translation_Norwegian" value="FAKTURA" type="hidden"><input id="translation_Dutch" value="FACTUUR" type="hidden"><input id="translation_German" value="RECHNUNG" type="hidden"><input id="translation_Italian" value="FATTURA" type="hidden"><input id="translation_Portuguese" value="FATURA" type="hidden"><input id="translation_Spanish" value="FACTURA" type="hidden">
    
			<table id="javascript_test1" style="width: 100%; margin: 0px; background-color: rgb(255, 250, 220); border-top: 2px solid rgb(252, 245, 205); border-bottom: 2px solid rgb(252, 245, 205); padding: 5px 5px 5px 12px; display: none;" cellpadding="0" cellspacing="0">
			<tbody><tr><td style="width:40px;vertical-align:top;">
			<img style="margin:0px;padding:0px;" src="New%20Invoice%20%20%20Aynax.com_files/red_error_25.gif">
			</td><td>
	
			<font style="font-size:13px;font-family:verdana;color:#3c3c3c;">Error Code: 1094. You have to turn on Javascript to create a new invoice.</font>
			</td></tr></tbody></table>
			
			<table style="display: none;" id="javascript_test2"><tbody><tr><td><br></td></tr></tbody></table>
				
			<script type="text/javascript">
			document.getElementById('javascript_test1').style.display="none";
			document.getElementById('javascript_test2').style.display="none";			
			</script>
		
		
	 <script type="text/javascript">confirmExitIfModified('invoice_form', 'You have unsaved changes.');</script>



        
        <!-- TB 2 -->
        <link rel="stylesheet" href="tabjs/thickbox.css" type="text/css" media="screen">
        <script type="text/javascript" src="tabjs/thickbox-compressed.js"></script>

        <table style="width:100%;margin:0px;padding:0px;padding-bottom:10px;" cellpadding="0" cellspacing="0">
        <tbody><tr>
        <td colspan="100" style="text-align:left;" width="100%">

        <!-- TB 3 -->

        <table style="padding:0px; margin:0px;text-align:left;" cellpadding="0" cellspacing="0" width="100%">

        <tbody><tr>



     


            
        
           
           <!-- </form>-->

       

            
        

            


        <td style="width:200px; padding-top:0px;margin:0px;text-align:left;">&nbsp;

        </td>



            
            <td style="padding-top:0px;margin:0px;text-align:right;">

              <!--  <form method="post" action="" >-->

                      <a href="#login-box" class="login-window" style="text-decoration:none;"> <input  style="height:32px;width:110px;" value="Save" type="button" id='svbttn'></a>


             <!--   </form>-->

            </td>

                
        </tr>
  
        </tbody></table> <!-- TB 3 -->

        </td>

        </tr>



        </tbody></table>





    <form name="invoice_form"  id="jforms"  >    


            <input id="customization_options" name="customization_options" value="off" type="hidden">

            <input name="submitButton" id="submitButton" type="hidden">

            <input name="c" value="" type="hidden">
    <input name="t" value="" type="hidden">

            <input name="customization_logo" id="customization_save_logo" value="" type="hidden">
    <input name="customization_street2" id="customization_save_street2" value="" type="hidden">
    <input name="customization_poNumber" id="customization_save_poNumber" value="" type="hidden">
    <input name="customization_tax" id="customization_save_tax" value="" type="hidden">
    <input name="customization_tax2" id="customization_save_tax2" value="" type="hidden">
    <input name="customization_discount" id="customization_save_discount" value="" type="hidden">
    <input name="customization_attention" id="customization_save_attention" value="" type="hidden">
    <input name="customization_taxid1" id="customization_save_taxid1" value="" type="hidden">
    <input name="customization_taxid3" id="customization_save_taxid3" value="" type="hidden">
    <input name="customization_date_format" id="customization_save_date_format" value="mm/dd/yy" type="hidden">
    <input name="currency_code" id="save_currency_code" value="USD" type="hidden">
    <input name="show_currency_code" id="save_show_currency_code" value="" type="hidden">
    <input name="taxname" id="taxname" value="Tax" type="hidden">
    <input name="taxname2" id="taxname2" value="Tax" type="hidden">
    <input name="language" id="language" value="English" type="hidden">

            <input name="status" id="status" value="" type="hidden">

            <input name="customization_logoFilename_session" id="customization_logoFilename_session" value="" type="hidden">


    <!-- TB 2 -->





        
    <table id="invoiceFormWrapper" style="width:100%;margin:0px;padding:0px;margin-top:0px;border:0px solid black;" border="0" cellpadding="0" cellspacing="0">




    <tbody><tr>


<td width="100%" style="text-align:left;border-left:1px solid silver;border-top:1px solid silver;border-right:2px solid silver;border-bottom:2px solid silver;padding-left:20px;padding-right:20px; padding-top:15px; padding-bottom:15px;" colspan="100" bgcolor="white">
    <!-- TB 3 -->

  <table width="100%" cellspacing="0" cellpadding="0" border="0" style="padding:0px; margin:0px;text-align:left;" >
<tbody>
<tr>

        <td><table style="width:100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr style="vertical-align:bottom;">

           



        </tr>

        </tbody></table>

        </td>

    </tr>





    <tr>

    <td>

    <!-- TB 4 -->

    <table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td rowspan="2" style="vertical-align:top;">

        <!-- TB 5 -->

        <table style="margin-top:5px;" border="0" cellpadding="0" cellspacing="0">



            
            <tbody>

        

          


            <!-- TB 5 -->

        </tbody></table></td>



    <td style="border:0px solid red; padding-right:0px; width:495px; text-align:right;vertical-align:top;">



        <table style="width:100%;" border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="width:100px;"></td><td>



            


            
            <div id="upload_area" class="invoiceForm_uploadArea_hidden">

                
            </div>





                        <input name="maxSize" value="9999999999" type="hidden">
            <input name="maxW" value="300" type="hidden">
            <input name="fullPath" value="http://www./upload/" type="hidden">
            <input name="relPath" value="upload/" type="hidden">
            <input name="colorR" value="255" type="hidden">
            <input name="colorG" value="255" type="hidden">
            <input name="colorB" value="255" type="hidden">
            <input name="maxH" value="125" type="hidden">
            <input name="filename" value="filename" type="hidden">


            
            <div id="customization_uploadField" class="invoiceForm_uploadField_hidden">

            </div>





            
            <div style="float:right;margin-top:3px;margin-right:0px;display:none;;" id="customization_uploadDelete">

                <input onclick="customization_uploadDelete();" value="Delete Logo" type="button">

            </div>



            
            <input style="display:none;" name="customization_logoFilename" id="customization_logoFilename" type="text">



        </td></tr></tbody></table>



    </td></tr>

    <tr>

        <td style="vertical-align:bottom;">



            <!-- TB 5 -->

            <table style="width:100%; height:100%; vertical-align:bottom;border:1px solid white;" border="0" cellpadding="0" cellspacing="0"> 
                <tbody><tr><td style="width:155px;"></td><td></td><td></td></tr>



                <tr><td colspan="3">

                                                            <div id="invoiceHeadlineWhenLogo" style="display:none; float:right; vertical-align:top;margin-top:5px;margin-bottom:20px;text-align:right;letter-spacing:3px;font-size:22px;color:#3c3c3c;font-weight:normal;font-family:arial;">
                        <br>
                        <input id="invoice_heading_copy" onchange="document.getElementById('invoice_heading').value=this.value" style="text-align:right; padding-top:3px; padding-bottom:3px; padding-right:8px; width:200px; font-weight:normal; letter-spacing:3px; font-family:arial;font-size:22px;color:#3c3c3c;" class="invoiceForm_fromNameTD" onfocus="this.className='invoiceForm_fromNameTD_onFocus';" onblur="this.className='invoiceForm_fromNameTD';" value="INVOICE" type="text">
                    </div>


                </td>
                </tr>



                
                





                
               

    <tr>
                              


                <!-- TB 5 -->

            </tbody></table>











        </td>

    </tr>





    <!-- TB 4 -->

    </tbody></table>



    </td>









    </tr>



    <tr><td colspan="100" style="width:100%;vertical-align:top;padding-top:35px;">



        <!-- TB 4 -->

    <!-- TB 4 -->


    <script type="text/javascript" src="scripts/jquery-latest.js"></script>
	
    <script type="text/javascript">
        $(function() {
          if ($.browser.msie && $.browser.version.substr(0,1)<7)
          {
			$('li').has('ul').mouseover(function(){
				$(this).children('ul').show();
				}).mouseout(function(){
				$(this).children('ul').hide();
				})
          }
        });        
    </script>

<?
$re11=mysqli_query($db,"select login_date from branch where brcode='$brcode'");
$row11=mysqli_fetch_array($re11);
$mlogin_date = $row11[0];
?>

<p align=center style={background-color:silver}>
Date:dd<select name='d'  >
<option><?print substr($mlogin_date,8,2);?></option>
<?
for($i=1;$i<=31;$i++)
{
if($i<'10')
{
$i='0'.$i;
}
print "<option>".$i."</option>";
}
?>
</select>
mm <select name='m'  >
<option><?print substr($mlogin_date,5,2);?></option>
<?
for($i=1;$i<=12;$i++)
{
if($i<'10')
{
$i='0'.$i;
}
print "<option>".$i."</option>";
}
?>
</select>
yy <select name='y'  >
<option><?print substr($mlogin_date,0,4);?></option>
<?
for($i=2000;$i<=2020;$i++)
{
print "<option>".$i."</option>";
}
?>
</select>
</p>


Debit <input type="button" id='insrowbttn' onclick="insRow(event,this,this.id)"  value=" Add Item ">
<!--<input type='button' onclick='delRow2(this)' value=' - '>-->


<br>&nbsp;
<input type='hidden' name='savecount' id='savecount' value='0'>
<table id="myTable" border="1" class='tble1' width=100%>
<th>No.<th>Dr <th>Amt <th>Narr<th>Against <th>Cheq. No.<th>Cl.Bal<th>Delete
</table>
<br><br>
Credit <input type="button" id='insrowbttn2' onclick="insRow2(event,this,this.id)"  value=" Add Item ">
<!--<input type='button' onclick='delRow2(this)' value=' - '>-->


<br>&nbsp;

<table id="myTable2" border="1" class='tble1' width=100%>
<th>No.<th>Cr <th>Amt <th>Narr<th>Against <th>Value<th>Cl.Bal<th>Delete
</table>
<datalist id="htmlListTags"></datalist>
<br>
<div id='clb'></div>
<Hr>


</form>
</div>


<div id="login-box" class="login-popup">
        <a href="#" class="close"><img src="images/close_pop.png" class="btn_close" title="Close Window" alt="Close" /></a>
          <div id='msgbox'></div>
		</div>







    <tr>

        <td style="padding-top:10px;margin:0px;text-align:left;">

          
        </td>

    </tr>



    <tr><td>&nbsp;</td></tr>

    <tr><td>&nbsp;</td></tr>



    <tr>

    <td>

    <!-- TB 4 -->

    <table border="0" cellpadding="0" cellspacing="0">



    <tbody>
<tr>

    <td style="width:500px;vertical-align:top;">



        <!-- TB 5 -->

        <table border="0" cellpadding="0" cellspacing="0">



            <tbody><!--<tr>

                <td style="width:110px;padding-left:2px; font-family:verdana; font-size:13px; color:#3c3c3c; font-weight:bold;">Invoice&nbsp;Notes                </td>


                <td style="padding-top:5px;">







                    <span id="edit_notes_name" onmouseout="document.getElementById('edit_notes_msg').style.display='none';" onmouseover="document.getElementById('edit_notes_msg').style.display='';" onclick="edit_default_notes('invoice');" style="cursor:pointer;"><img style="padding-left:3px;vertical-align:bottom;margin-bottom:1px;" src="img/edit_customer.png"></span>
                    <span id="edit_notes_msg" style="display:none;font-size:11px;padding:7px; position:absolute;width:190px;background:#EFF7FA; border:1px solid #cccccc; color:black; font-weight:normal;font-family:verdana;">Click here to edit the default notes. The default notes are automatically added to all new invoices.</span>
                    <span id="edit_notes_msg_save" style="display:none;font-size:11px;padding:7px; position:absolute;width:190px;background:#EFF7FA; border:1px solid #cccccc; color:black; font-weight:normal;font-family:verdana;">Click outside the field to save the default notes</span>

                </td>

            </tr>-->

            <tr>

               <!-- <td colspan="2" style="padding-top:3px;">

                    <textarea id="invoice_notes" name="invoice_notes" class="invoiceForm_fromNameTD" onfocus="this.className='invoiceForm_fromNameTD_onFocus';" onblur="this.className='invoiceForm_fromNameTD';" rows="6" cols="60" style="width:430px; overflow:auto; outline:none; padding:5px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;"></textarea>

                </td>-->



            </tr>

            <!-- TB 5 -->

        </tbody></table>

    </td>

   




            
            
            

            

                </td>

            </tr>



                        <tr id="sum_blankAfterDiscountOrTaxTR" style="height:7px;"><td></td></tr>
        

        <!-- <tr>-->

                 <!--<td style="width:15px; border-top:2px solid #eaedee;">&nbsp;</td>-->

                <!-- <td style="border-top:2px solid #eaedee;font-family:verdana; font-size:13px; color:#3c3c3c; font-weight:bold;padding-top:7px;">-->

                 <!--    Spare Total-->
                <!-- </td>-->

                <!-- <td style="padding-top:7px; text-align:right;padding-right:4px;border-right:1px solid white;border-top:2px solid #eaedee;border-left:1px solid white;">-->

                 <!--    <input  style="border:0px solid white;text-align:right; width:100px; padding-right:5px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;" readonly="readonly" name="spare_total" id="spare_total" value="0.00" type="text">-->

                <!-- </td>-->

            <!-- </tr>-->

             <!--  <tr>-->

              <!--   <td style="width:15px; border-top:2px solid #eaedee;">&nbsp;</td>-->

              <!--   <td style="border-top:2px solid #eaedee;font-family:verdana; font-size:13px; color:#3c3c3c; font-weight:bold;padding-top:7px;">-->

              <!--       Labour Total-->
              <!--   </td>-->

               <!--  <td style="padding-top:7px; text-align:right;padding-right:4px;border-right:1px solid white;border-top:2px solid #eaedee;border-left:1px solid white;">-->

                <!--     <input  style="border:0px solid white;text-align:right; width:100px; padding-right:5px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;" readonly="readonly" name="labour_total" id="labour_total" value="0.00" type="text">-->

                <!-- </td>-->

            <!-- </tr>-->

 <tr>

                <td style="width:15px; border-top:2px solid #eaedee;">&nbsp;</td>

                <td style="border-top:2px solid #eaedee;font-family:verdana; font-size:13px; color:#3c3c3c; font-weight:bold;padding-top:7px;">

                    Total Debit Amount
                </td>

                <td style="padding-top:7px; text-align:right;padding-right:4px;border-right:1px solid white;border-top:2px solid #eaedee;border-left:1px solid white;">

                    <input onclick="alert('The total is calculated automatically as soon as you have entered something into amount field.')" style="border:0px solid white;text-align:right; width:100px; padding-right:5px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;" readonly="readonly"  name='tdamt' id='dbtot' type="text">

                </td>

            </tr>
            
            
            <tr>

                <td style="width:15px; border-top:2px solid #eaedee;">&nbsp;</td>

                <td style="border-top:2px solid #eaedee;font-family:verdana; font-size:13px; color:#3c3c3c; font-weight:bold;padding-top:7px;">

                    Total Credit Amount
                </td>

                <td style="padding-top:7px; text-align:right;padding-right:4px;border-right:1px solid white;border-top:2px solid #eaedee;border-left:1px solid white;">

                    <input onclick="alert('The total amount is calculated automatically as soon as you have entered something into amount field.')" style="border:0px solid white;text-align:right; width:100px; padding-right:5px; font-weight:normal; font-family:verdana;font-size:13px;color:#3c3c3c;" readonly="readonly"  name='tcamt' id='crtot' type="text">

                </td>

            </tr>


            
            


            
           




            <!-- TB 5 -->

        </tbody></table>










    </tbody></table>

    </td>





    



    </tr>



    <!-- TB 3 -->

    </tbody></table>

    </td>



    </tr>

    <!-- TB 2 -->

    </tbody></table>

  </form>

    <br><br><br><br>
						
		
		
		<!-- end main table wrapper -->
		</td></tr></tbody></table>
		
</body></html>



<?

/*$re=mysqli_query($db,"select * from ledger where  grp!='Cash in hand' and grp!='Bank Accounts' and brcode='$brcode' order by led");
$i=0;
while($row=mysqli_fetch_row($re))
{
 print "\n<script>drs[$i]='$row[0]' </script>";
 $i++;
}*/
?>
</html>
