<?php
session_start();
$username=$_SESSION['user'];
$user=$_SESSION['user'];
$username=strtolower($username);
$brcode=$_SESSION['brcode'];
$level=$_SESSION['level'];
$fin_year=$_SESSION['fin_year'];
include_once("opendb.php");
$query="select level from bruser where username='$username' and brcode='".$_SESSION['brcode']."'";
$rslt=mysqli_query($db,$query);
$row1=mysqli_fetch_row($rslt);

//$query1="select brpass from khadidb.branch where brcode='".$_SESSION['brcode']."'";
//$rslt1=mysqli_query($db,$query1);
//$row2=mysqli_fetch_row($rslt1);
//if(($row2[0]==$fin_year)||($fin_year=='2015-16'))

$querybr="select brstate from branch where  brcode='".$_SESSION['brcode']."'";
$rsltbr=mysqli_query($db,$querybr);
$row1br=mysqli_fetch_row($rsltbr);



//if(($row2[0]==$fin_year)||($row2[0]==''))
//{
//$succsyear=1;
//}
//elsec
//{
$succsyear=1;
//}
?>
<style>
.tbl{
    font-size: 14px;
    background-color: #ffffff;
    width: 100%;
    padding-top: 50px;
      border-collapse: inherit;
}#menuSearch {
		width: 300px;
		padding: 8px;
		font-size: 14px;
		/* margin-top: 5px; */
		border: 1px solid #ccc;
		border-radius: 4px;
	}

	#searchResults {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		max-height: 300px;
		overflow-y: auto;
		background: white;
		border: 1px solid #ccc;
		border-radius: 6px;
		box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
		z-index: 10000;
		padding: 6px 0;
		background-color: black;
	}

	#searchResults a {
		display: block;
		padding: 8px 12px;
		color: #fff !important;
		text-decoration: none;
		font-size: 14px;
	}

	#searchResults a:hover {
		background-color: #0082e7;
	}
</style>
<link type="text/css" href="includes/style1.css" rel="stylesheet" />
<div id="cssmenu">
  <ul id="menu">
    
  <li><a href="index2.php">Home</a>
  </li>
  <?
  if($row1[0]==13)
{

?>
 <li>
  <a href="#">Acc</a>
  <ul>

 <?
  if($username=='psnsap')
{

?>

<li><a href="sealedgesap.php">Search ledger</a></li>
<li><a href="spares/traceitem.php"  target='x'>Spare Stock Ledger</a></li>
 

 <?

}
?>

<?
  if($username==$brcode)
{

?>
<li><a href="createconsign.php" target='x'>Consign Master </a></li>
<li><a href="veh_trans.php" target='x'>Delivery Challan</a></li>
<li><a href="prnvtrans_dup1.php" >Duplicate Delivery Challan</a></li>

 <?

}
?>

<?
  if($username=='pradeepr' || $username=='ram')
{

?>

<li><a href="grp_ledgers6.php">Budget(Expense)</a></li>
<li><a href="db3.php"> Ageing Receivables(Dr) </a></li>
 <li><a href="vehinoutrepopending.php" >Vehicle In Pending Report</a></li>

<li><a href="vehinoutrepo.php" >Vehicle In Out Report</a></li>
 <?

}
?>


 <?
  if($username=='eway')
{

?>
<li><a href="sealedgereway.php">Search Ledger</a></li>

 <li><a href="spares/ewayinvoiceentry.php" target="_blank">SPAREINVOICE TO JSON</a></li>
 <li><a href="spares/ewayentry.php" target="_blank">STOCKTRANSFER TO JSON</a></li>
 <li><a href="upld_ewaysto.php">SAP STO UPLOAD</a></li>
 <?

}
?>

  </ul>
  </li>

<?

}
  
    if($row1[0]!=13)
{
  
if($succsyear==0)
{
?>
<li>
  <a href="#">SALES</a>
  <ul>
<?if($row1[0]>=4){?>
  <li>
  <a href="countersale_prevyr.php">Retail Sale</a>
  </li>
<?}?>

<?if($row1[0]>=4){?>
  <li><a href="branchtransfer_prvyr.php">Sale By Transfer(Branch Transfer)</a></li>
  <li><a href="salesret1_prvyr.php">Sales Return Retail</a></li>
<?}?>

  </ul>
  </li>
  <li>
  <a href="#">PURCHASE</a>
  <ul>

   <?if($row1[0]>=4){?>
<li><a href="item_purchasenew.php">Purchase</a></li>
  <li><a href="branchreceipt_prvyr.php">Branch Receipt</a></li>


    <?}?>

  </ul>
  </li>
<?
}
?>

<?
if($succsyear==1)
{
?>
  <li>
  <a href="#">Master</a>
  <ul>
<li>
  <a href="custmaster.php">Customer Master</a>
  </li>
  <?if(strtolower($user)!='kalpana'){?>
    <li><a href="custmasterbr.php">Edit Customer</a></li>
    <?}?>
  </li>
<li>
    </li>
<?
if($row1[0]>=4 || $row1[0]==6){?>
  
<?}?>
<?if($row1[0]>=4){?>
 

<?}?>
<?
/*
if($row1[0]==5){?>
  <li>
  <a href="createbr.php">Branch Master</a>
  </li>
<?}?>

<?if($row1[0]==5){?>
  <li>
  <a href="partmaster.php">Item Master</a>
  </li>

       <li>
  <a href="partmastrepo.php">Edit Item Master</a>
  </li>
  <li>
  <a href="grmaster.php">Group Master</a>
  </li>
  <li>
  <a href="subgrmaster.php">Sub Group Master</a>
  </li>
  <li>
  <a href="unit.php">Unit Master</a>
  </li>
  <li>
  <a href="taxmast.php">Tax Master</a>
  </li>
     <li>
  <a href="corp-mast.php">Corporate Master</a>
  </li>
<?}?>
<li><a href="prof_cntr.php">Profit Center</a></li>

<li>

  <a href="holiday.php">Select Holidays</a>
  </li>
<li>
  <a href="monthclosing.php">Stock</a>
  </li>
<li><a href="transactmaster.php">Transaction Master</a></li>

<li><a href="reportmaster.php">Report Master</a></li>
*/?>

 <?if($username=='anoop'||$username=='joy'||$username=='deepuks' ||$username=='prabeesh' ||$username=='sunith'  ||$username=='nisanth'  ||$username=='anson'||$username=='midhun'||$username=='kamath'||$username=='sushank'||$username=='sanjayvv'||$username=='manohar'||$username=='manoharrdc'||$username=='sidha'){?>
<li>
  <a href="custmaster.php">Customer Master</a>
  </li>
  <li>
  <a href="searchccr.php">Search Customer</a>
  </li>
<li>
  <a href="supp-mast.php">Supplier</a>
  </li>
  <li>
  <a href="monthclosing.php">Op.Stock</a>
  </li>
  
   <li>
  <a href="purchaseorder.php">Purchase Order</a>
  </li>
  
   <li>
  <a href="monthmaster.php">Month Master</a>
  </li>
  
<?}?>
<?if(strtolower($user)!='kalpana'){?> 
<li><a href="partymaster.php">GST Master</a></li>

<li><a href="userlist.php">UserList</a></li>
<li><a href="tcsledgers.php">Customer Above 50 Lakh</a></li>
  <?}?>
<?if($row1[0]>=4){?>
      <li>
<?//  <a href="bankmast.php">Bank Master(Customer)</a>?>
  </li>

  <?}?>
  </ul>
  </li>

 
 
 
  <?
}
?>



  <li>
  <a href="#">Accounts</a>
  <ul>

  <?
if($succsyear==1)
{
?>
   <?if($row1[0]==55 ){?>
        <li><a href="stock_ver_ledger.php">Opening Cash Entry</a></li>
        <?}?>

<li><a href="accounts/logreport.php">Log Report</a></li>

    <?if($row1[0]>=4){?>
  
<li><a href="sealedge.php">Search Ledger</a></li>
<li><a href="seanarr.php">Search Narration</a></li>

<li><a href="sealedgeouts.php">Outstanding</a></li>



  <li><a href="acrepo_menu.php">Transactions >></a>
    <ul>

    <?if($row1[0]>=4){?>
    <li><a href="cshrec.php">Cash Receipts</a></li>

  <li><a href="cshpay.php">Cash Payment</a></li> 

<li><a href="brec.php">Bank Receipts</a></li>
<li><a href="bpay.php">Bank Payment</a></li>
<li><a href="tdsjour.php">TDS Entry</a></li>


<?
	if($brcode=='3776')
	{
	?>
	<li><a href="bpay_chqbnce.php">Bank Payment(Cheque Bounce)</a></li>
	<?
	}
	?>
<li><a href="jour.php">Journal</a></li>
<li><a href="jour_telcon.php">Journal for testing (dropdown list) </a></li>
<?

if(($brcode=='3788')||($brcode=='3783'))
{
    ?>
<li><a href="brecasc.php">Bank Receipts(Billwise)</a></li>
<li><a href="custoutst.php">Customer Billwise Report</a></li>
<?
}
        
    }
     
     ?>


 </ul>
          </li>
          
            <li><a href="acrepo_menu.php">Cash Closing >></a>
    <ul>

    <?if($row1[0]>=4){?>
    <li><a href="currency.php">Cash closing</a></li>

  <li><a href="currency2.php">Cash Closing report</a></li> 




<?
        
    }
     
     ?>


 </ul>
          </li>
          

  <li><a href="acrepo_menu.php">Ledger SEarch >></a>
    <ul>

<li><a href="grp_ledgers1.php">Search Ledger Grp Wise</a></li>

<li><a href="grp_ledgers3.php">Search Ledger Bal Grp Wise</a></li>

<li><a href="sealedgedet.php">Search Ledger Branch Wise</a></li>

<li><a href="sealedgallbrwise.php">Find Ledger in Br.</a></li>


 </ul>
          </li>
          

  <li><a href="acrepo_menu.php">Clearing >></a>
    <ul>
<!-- lock for eoy-->
<li><a href="clearing1.php">Branch Entries-Clearing</a></li>
<li><a href="clearing2.php">Vehicle Division-Clearing</a></li>

 </ul>
          </li>
                                        <li><a href="acrepo_menu.php">Reports1 >></a>
          <ul>
              
              <?
    }
              if($row1[0]==2){?>
  
<li><a href="sealedge.php">Search Ledger</a></li>



                                        <li><a href="acrepo_menu.php">Reports2 >></a>
    <ul>
<?
}
?>



<?
if($succsyear==0)
{
?>
<li><a href="sealedge.php">Search Ledger</a></li>



<?
}
?>
<!--
<li><a href="cbookmnu.php">Cash Book (New)</a></li>

-->
<li><a href="accounts/db1revtax.php"> GSTR3B</a></li>
<?if($username=='midhun' || $username=='joy' || $username=='amal'  ){?>
<li><a href="paypdf/custled.php">Send Customer Statement(Sms)</a></li>
<li><a href="paypdf/custledmail.php" target='x'>Send Customer Statement(Email)</a></li>
<?}?>
 <li><a href="accounts/cbookmnu.php">Cash Book</a></li>

           
          <li><a href="accounts/bnkbookmnu.php">Bank Book</a></li>

          <li><a href="listledgers2.php">Ledger - Date wise</a></li>
          
          <?if($username=='anoop' || $username=='joy'|| $username=='sunith' || $username=='nisanth'|| $username=='anilesh' || $username=='vishnu'|| $username=='subisha' ){?>

<li><a href="tdsrptnewallbr.php">TDS Entry Report (All Br.)</a></li>
          <li><a href="listledgers22.php">Ledger - Date wise -All branch</a></li>
<li><a href="grp_ledgers1allbr.php">Grp wise Led DW  Trans All Br.</a></li>
<?}?>
          <li><a href="tbmnu.php">Trial Balance -></a></li>
          
          

<?
if($succsyear==1)
{
?>

        <li><a href="accounts/db1.php">Day Book</a></li>
         <li><a href="accounts/db1leddwallbrstk1.php">Stock Transfer dw all br.</a></li>
<?}?>


            <li><a href="accounts/jour1.php">Journal Entries</a></li>
 
 <?if($username=='amal' || $username=='midhun' ){?>
<li><a href="db3_ampl_bill.php"  target='x'> Billwise Debtors Ageing </a></li>
<?}?>




<?

if($level>2)
{
    ?>

<li><a href="db3.php"> Ageing Receivables(Dr) </a></li>
<li><a href="db33.php"> Ageing Payables(Cr) </a></li>

<li><a href="tdsrptnew.php">TDS Entry Report</a></li>

<li><a href="genfull.php">Gen Full List</a></li>
<?
}
?>
<!--

<li><a href="db3cr.php">Debtors Ageing (CR)</a></li>

<li><a href="db4.php">Debtors Ageing 2 (DR)</a></li>

  <li><a href="clearing1.php">Branch Entries - Clearing</a></li>

 <li><a href="clearing.php">Branch Entries - Clearing (old)</a></li>
 --> 
        <li><a href="ledreco.php">Ledger Reconciliation</a></li>
  <li><a href="seanarr.php">Search Narration</a></li>
 
          </ul>
          </li>
          
          
<?//<--<li><a href="chqcrdtcust.php">Cheque - Credit Customer</a></li>-->?>

<?if($brcode=='3788' || $brcode=='3783'){?>
<li><a href='#'>Allocation -></a>
	<ul>
	     <li><a href='allocation.php'>Allocation</a></li>
        <!--  <li><a href='allocation_21102024.php'>Allocation</a></li>
        <!-- <li><a href='allocation_all.php'>Allocation(ALL)</a></li> -->
        <!-- <li><a href='allocationreport.php'>Allocation Report Customer wise</a></li>-->
        <li><a href='allocationreport1.php'>Allocation Report</a></li>
        <li><a href='allocationreport_outstand.php'>Outstanding(Allocation Based)</a></li>
        <li><a href='allocationremove.php'>Remove Allocation</a></li>
	</ul>
	</li>
	
	<li><a href='#'>Vendor Allocation -></a>
	<ul>
        <li><a href='allocation_ven.php'>Allocation</a></li>
        <li><a href='allocationreport_ven.php'>Allocation Report Vendor wise</a></li>
        <li><a href='allocationreport1_ven.php'>Allocation Report All</a></li>
        <li><a href='allocationremove_ven.php'>Remove Allocation</a></li>
	</ul>
	</li>	
<?}?>


<?if($username=='anoop'||$username=='joy'||$username=='satheesh'||$username=='subisha'||$username=='sunith'||$username=='prabeesh'||strtolower($username)=='anson'){?>

<li><a href="acgroup.php">Group Master</a></li>
<li><a href="ledge.php">Ledger Master</a></li>
<li><a href="spledger.php">Sp.Ledger Master</a></li>
<li><a href="db3allbr.php"> Ageing Receivables(Dr)(All Br.) </a></li>
<li><a href="db33crallbr.php"> Ageing Payables(Cr)(All Br.) </a></li>
<li><a href="db33crallbrmsme.php"> Age. Pay(Cr)(All Br.) MSME NOT UPDATED  </a></li>
<li><a href="db33crallbrmsmeupd.php"> Age. Pay(Cr)(All Br.) MSME  UPDATED  </a></li>

<?}?> 

<?
if($succsyear==1)
{
?>
<?if($row1[0]>=4){?>
    
  <?}?>
  


                              

<?//<--<li><a href="transactslct.php">Transactions</a></li>-->?>

    <?}?>
    <?if($row1[0]==10){?>
  <li><a href="accounts/breco.php">Bank Reconciliation</a></li>
  <li><a href="accounts/ledreco.php">Ledger Reconciliation</a></li>
 <li><a href="dbnote.php">Debit Note</a></li>

  <?}?>
    <?if($row1[0]>=4){?>
  
    <?}?>
        <!--
<li><a href="accounts/prnvoucher.php?jvno=" target="blank">Voucher</a></li>

                <li><a href="dupcpy_menu.php">Dup. copy >></a>
          <ul>

          <li><a href="veh/prnadvrec.php" target="blank">Advance Receipt</a></li>
          <li><a href="veh/duprec.php" target="blank">Receipt</a></li>
          <li><a href="veh/prncrnote1.php" target="blank">Cr. Note</a></li>
          <li><a href="veh/prncrnote.php" target="blank">Cr. Note(Spare)</a></li>
          <li><a href="accounts/prnvoucher.php" target="blank">Voucher</a></li>
          </ul>
          </li>

        -->
<?
}
?>





		  <?
if($succsyear==1)
{


?>
<?
if($username=='amal' || $username=='midhun' )
{
?>
<li><a href="acposting.php" target="_blank">Bill To Bill Settlement</a></li>
<li><a href="acpostingold.php" target="_blank">Bill To Bill Settlement(Previous Year)</a></li>
<li><a href="acposting_220819.php" target="_blank">Bill To Bill Settlement(Credit Note)</a></li>

<?
}
?>
    <?if($row1[0]>=4)
    
    
    {?>
    <!--
    <li><a href="cshrec.php">Cash Receipts</a></li>

  <li><a href="cshpay.php">Cash Payment</a></li> 

<li><a href="brec.php">Bank Receipts</a></li>
<li><a href="bpay.php">Bank Payment</a></li>
<li><a href="jour.php">Journal</a></li>

<li><a href="acposting_sup.php">Bill to Bill (supplier)</a></li>
-->
<li><a href="acposting_sup_order.php">Bill to Bill (Order wise)</a></li>

<li><a href="db3_ampl_bill_sup.php"  target='x'> Billwise Valvoline Ageing </a></li>
<li><a href="sup_ageing.php"  target='x'> Billwise Valvoline </a></li>




     <?}
     
     ?>
  

 <?
if($username=='deepuks'||$username=='joy'||$username=='anoop'||$username=='sunith')
	{
	?>
<li><a href="clearing1allbr.php">Br. Entries Pending All Br.</a></li>

<?
	}
	?>



<li><a href="sealedgall.php">Search Ledger All</a></li>
<li><a href="listledgergrp1.php">Ledger List</a></li>

<?if($brcode=='3788' ||$brcode== '3783'){?>
 <li><a href="colreg_20250122.php">Collection Register</a></li>
<?}else{?>
<li><a href="colreg.php">Collection Register</a></li>
<?}?>
 <?if($brcode!='3776'){?>
 <li><a href="spares/acposting.php">Bill to Bill Settlement</a></li>

 
 <?}?>



  </li>
  
</ul>
</li>

 <li>
<a href="#">GST</a>
<ul>

<?if($row1[0]>=4){?>
 <li><a href="gstmultisct2tds.php">GST Expenses/Asset</a></li>
<li><a href="inc_gstmultislct2.php">GST Incomes</a></li>
<li><a href="spares\einvoice_gstincome.php" target='x'>E-Inv-JSON GST Income</a></li>
<li><a href="spares\einvoice_gstincomeinv.php" target='x'>E-Inv-JSON GST Income Inv</a></li>
<li><a href="spares/upldjson_spr.php" target='x'>E-Inv-JSON UPLOAD</a></li>
    <?}?>

<li><a href="gstrpt.php">GST Expense/Asset Report</a></li>
<li><a href="gstrpt_all.php">GST Exp. Report (All br.)</a></li>
<li><a href="gstrptrev_all.php">GST Exp. Rev. Report (All br.)</a></li>
<li><a href="upld_gstjson.php">GST JSON Upload</a></li>
<li><a href="upld_gstjsonnew.php">GST JSON Upload New</a></li>
<li><a href="inc_gstrpt.php">GST Income Report</a></li>
<li><a href="inc_gstrpt_all.php">GST Income Report(All branch)</a></li>

<li><a href="hsnmast.php" >HSN MASTER</a></li>

<li><a href="gstmultislct2_outcust.php" >GST Income (Invoice)</a></li>
<li><a href="gstrpt_outcust.php" >GST Income Report (Invoice)</a></li>

<li><a href="gstmultislct2_outcustrev.php" >GST Income Reverse</a></li>
<li><a href="gstrpt_outcustrev.php" >GST Income Rev. Report </a></li>


</ul>
</li>

 
<?if(strtolower($user)!='kalpana'){?> 
  <li>
<a href="#">Vehicle</a>
<ul>

<li><a href="spares/purch_frm.html" target='x'>Item Purchase (veh)</a></li>
<li><a href="spares/pitmregveh.php" target='x'>Item purchase report (veh)</a></li>
<li><a href="spares/stockrepodwitem.php" target='x'>Item Stock report (veh)</a></li>
<li><a href="spares/preturnitem.php" target='x'>Item Purchase Return(veh)</a></li>
<li><a href="prnpurretitem1_dup1.php" target='x'>Dup. copy (Pur Ret. Item)</a></li>
<li><a href="spares/salereturngst.php" target='x'>Item Sales Return(veh)</a></li>
<?if($brcode=='3791'){?>
<li><a href="spareinvoice_newveh.php" target='x'>Item Invoice (veh)</a></li>

<li><a href='otherinv_gstallbrveh.php'>Item Invoice Report(Veh) </a></li>

<li><a href="prnspareinvoice_dup1veh.php" target='x'>Duplicate copy (Item Invoice Veh)</a></li>

    <?}?>


<?if($brcode=='37921'){?>
<li><a href="spareinvoice_newveh.php" target='x'>Item Invoice (veh)</a></li>
<li><a href="spares/pitmregveh.php" target='x'>Item purchase report (veh)</a></li>
<li><a href='otherinv_gstallbrveh.php'>Item Invoice Report(Veh) </a></li>


<li><a href="prnspareinvoice_dup1veh.php" target='x'>Duplicate copy (Item Invoice Veh)</a></li>

    <?}?>

</ul>
</li>
<?}?>
 
<?
if($username=='antony')
	{
	?>

<?
	}
}

//<li><a href="vehinout.php" >Vehicle In Out</a></li>
//<li><a href="vehinoutrepopending.php" >Vehicle In Pending Report</a></li>

//<li><a href="vehinoutrepo.php" >Vehicle In Out Report</a></li>


// <li><a href="spares/purch_frm.html" target='x'>Item Purchase (veh)</a></li>

//<li><a href="upld_sparepurchase.php">Upload Purchase</a></li>
//<li><a href="spares/item_purchase.php" target='x'>Item Purchase(Mannual)</a></li>
//<li><a href="jour_warrantygst1.php">Acc Post Waranty GST</a></li>
//<li><a href="jour_warantygstpass.php">Acc Post Waranty GST Aproved</a></li>
//<li><a href="jour_coupongst1.php">Acc Post Coupon GST</a></li>
//<li><a href="jour_coupongstpass.php">Acc Post Coupon GST Aproved</a></li>


//<li><a href="upld_coupongst.php">Coupon Invoice Upload GST</a></li>

//<li><a href="upld_warantygst.php">Warranty Inv Upload GST</a></li>


//<li><a href="upld_warantygstpass.php">Warranty & Coupon<br> Upload GST Aproved</a></li>

?>
<?if(strtolower($user)!='kalpana'){?> 
<li>
<a href="#">UPLOADS</a>
<ul>


</li>


<ul>
 
</ul>
</li>
<?
if($username=='joy'||$username=='sunith' ||$username=='sanjayvv' ||$username=='anson' || strtolower($username) == 'satheesh' || strtolower($username) == 'laxmeesh' || strtolower($username) == 'midhun'|| strtolower($username) == 'mallikarjun' || strtolower($username) == 'keerthiraj'|| strtolower($username) == 'shahul'||$username=='midhunclt' || strtolower($username) == 'harshitha')
	{
	?>
<li>
<a href="#">UPLOAD TRANSOUT -></a>
<ul>
    <?
if($username=='joy'||$username=='sunith' ||$username=='midhun' ||$username=='midhunclt'||$username=='anson' || strtolower($username) == 'satheesh' || strtolower($username) == 'laxmeesh' || strtolower($username) == 'manohar' || strtolower($username) == 'mallikarjun' || strtolower($username) == 'keerthiraj'|| strtolower($username) == 'laxmeesh'|| strtolower($username) == 'shahul'|| strtolower($username) == 'harshitha')
	{?>
<li><a href="upld_transout.php">TransferOut BI Upload</a></li>
<li><a href="upld_transout_upd.php">TransferOut SAP Upload</a></li>

<li><a href="upld_transout_3999.php">TransferOut Invoice Upload(Dasanapura)</a></li>

<li><a href="upld_transout_aggr.php">TransferOut Aggregate</a></li>


<?}?>

</li>
</ul>
<?}?>

<li><a href="#">Account Posting GST  >>></a>
<ul>
    
    
   <li><a href="jour_jobcardgst.php">Acc Post Jobcard GST</a></li>
<!--

<li><a href="upld_transout_aggr.php">TransferOut Aggregate</a></li>

<li><a href="jour_transingst.php">Acc Post Tranfer In GST</a></li>
<li><a href="jour_tranferoutgst.php">Acc Post Transfer Out GST</a></li>
<li><a href="upld_transferoutgst.php">Stock Transfer Out Upload GST</a></li>
<li><a href="upld_transferingst.php">Stock Transfer In Upload GST</a></li>

-->
<li><a href="jour_sapreinvoicegst.php">Acc Post SpareInvoice GST</a></li>
<li><a href="jour_sparesaleretgst.php">Acc Post Sales ret GST</a></li>
<li><a href="jour_warantyey.php">Wty Coupon EY Posting </a></li>	


</ul>
 
</li>
<?if($brcode=='3783' || $brcode=='3788')
{?>
<li><a href="upld_sparepurchasegst3776.php">Upload Purchase GST</a></li>
<li><a href="upld_sparepurchasegstvecv.php">Upload Purchase GST VECV</a></li>
<li><a href="upld_spareinvoicegst.php">Spare Invoice Upload GST</a></li>

<?}else
{?>
<li><a href="upld_spareinvoicegst.php">Spare Invoice Upload GST</a></li>
<li><a href="upld_jobcardgst.php">Jobcard Invoice Upload GST</a></li>
<li><a href="upld_warantyey.php">Wty Coupon EY Upload </a></li>	

<li><a href="upld_sparepurchasegst3776.php">Upload Purchase GST</a></li>

<!--

<li><a href="upld_sparepurchasegst3776.php">Upload Purchase GST</a></li>
<li><a href="upld_spareinvoicegst.php">Spare Invoice Upload GST</a></li>
<li><a href="upld_jobcardgst.php">Jobcard Invoice Upload GST</a></li>

<li><a href="upld_warantyey.php">Wty Coupon EY Upload </a></li>	
<li><a href="upld_zwty_list.php">Upload ZWTY_LIST</a></li>

-->
<?}?>


<?if($username=='joy' ||$username=='subisha'||$username=='nisanth'||$username=='anoop'||$username=='sunith')
{?>
<li><a href="upld_gstr2a.php"> GSTR2A Upload</a></li>
<li><a href="upld_gstrinward.php"> GSTR Inward Upload</a></li>

<li><a href="upld_jobcardret.php">Jobcard Return Upload </a></li>
<li><a href="jour_jobcardretgst.php">Acc Post Jobcard Return</a></li>
<li><a href="prnspareinvoice_dup1jcret.php">Jocard Return Duplicate Copy</a></li>
<?}
if(strtolower($username)=='anson' || strtolower($username)=='joy'|| strtolower($username)=='nisanth' || strtolower($username)=='laxmeesh' || strtolower($username)=='harshitha' || strtolower($username) == 'mallikarjun')
{?>
<li>
<a href="#">Jour/Bank Uploads -></a>
<ul>
<li><a href="util/upldjour.php" target="x"> Journal Upload</a></li>
<li><a href="util/upldbnkrec.php" target="x"> Bank Receipt Upload</a></li>

<li><a href="util/upldjournew.php" target="x"> Journal Upload New</a></li>
<li><a href="util/upldbrnew.php" target="x"> Bank Receipt Upload New</a></li>
</ul></li>
<?}?>
<?if($row1br[0]=='KARNATAKA' || $brcode=='3776')
{?>

<?}
?>


<li><a href="upldwty_reco.php"> Wty Recon Upload</a></li>
<li><a href="upldpur_reco.php"> Purchase Recon Upload</a></li>
<li><a href="upld_opstock.php"> Spare Op.Stock Upload</a></li>

</ul>


<li>
<a href="#">SPARES</a>
<ul>
<?

if($brcode=='3776'||$brcode=='3783'||$brcode=='3788'||$brcode=='3810'||$brcode=='377020'||$brcode=='3999')
	{
	    //<li><a href="spares/item_purchase.php" target='x'>Item Purchase(Mannual)</a></li>
	   // <li><a href="upld_eicherpurgst.php">Upload Eicher Purchase GST</a></li>
  //<li><a href="jour_eichpurchgst.php">A/C Posting Eicher Purchase GST</a></li>
 // <li><a href="spares/item_purchase.php" >Item Purchase VAT (Mannual)</a></li>

//<li><a href="upld_eicherpurgst.php">Upload Eicher Purchase GST</a></li>
//<li><a href="jour_eichpurchgst.php">A/C Posting Eicher Purchase GST</a></li>
//<li><a href="spares/purrepo_gstvecv.php" target=x>Item Purchase Eicher 2 (Edit)</a></li>
if($brcode=='3999')
{?>
    <li>
    <a href="#">Invoice >></a>
        
    <ul>
        <li><a href="spares/spareinvoice.php">Spare Invoice</a></li>
        <li><a href="spares/prnspareinvoice_dup1.php" target='x'>Duplicate Copy</a></li>
        <li><a href="spares/einvoice_spareinvoicemak.php" target='x'>E-Invoice Json Download</a></li>
        <li><a href="spares/upldjson_spr.php" target='x'>E-Invoice Json Upload</a></li>
    </ul>
    </li>
<?}?>

 <li><a href="upld_purreteich.php">Upload Eicher Purchase Ret GST</a></li>
<li><a href="jour_sparepurreteichgst.php">A/C Posting Eicher Purchase Ret GST WH</a></li>
<li><a href="jour_sparepurreteichgstcancel.php">A/C Posting Eicher Purchase Ret GST WH(CAN)</a></li>




<?
    
}

?>


<?

if($brcode!='3776'&&$brcode!='3783'&&$brcode!='3788'&&$brcode!='3810')
	{
	    
?>
<li><a href="upld_purreteich.php">Upload Eicher Purchase Ret GST</a></li>

<li><a href="jour_sparepurreteichgstbr.php">A/C Posting Eicher Pur Ret GST Br</a></li>

<li><a href="jour_sparepurretother.php">A/C Posting Other Pur Ret </a></li>


<?
    
}

?>

 <!-- 
 <tr ><td>&nbsp;&nbsp;<a href="spares/invindexnew1dc.html" target='x'>Sale Order (Delivery Challan) </a></td></tr>
<tr ><td>&nbsp;&nbsp;<a href="spares/spareinvoicedc.php" target='x'>Sale  (Delivery Challan) </a></td></tr>
<tr><td>&nbsp;&nbsp;<a href="spares/prnspareinvoice_dupdc.php?invno=" target='aa'>Duplicate Delivery Challan</a></td></tr>

      -->
      
      
      
<li><a href="spares/item_purchasegst.php" target='x'>Item Purchase Others (Edit)</a></li>
<?if(strtolower($user)=='eway' || strtolower($user)=='mallikarjun'){?>
<li><a href='#'>Dispatch Details></a>
	<ul>
    <li><a href="spares/dispatch.php" target=x>Dispatch Entry</a></li>
    <li><a href="spares/dispatchrep.php" target='x'>Report</a></li>
    <li><a href="spares/dispatchpendrep.php" target='x'>Pending Report</a></li>
    <li><a href="spares/upld_dispatchinv.php" target=x >Dispatch Upload</a></li>
    </ul>
</li> 
<?}?>
<li><a href='#'>Credit Note-></a>
	<ul>
    <li><a href="crnote1.php">Credit Note</a></li>
    <li><a href="spares/einvoice_crnote.php" target='x'>E-Inv-JSON Download(CR Note)</a></li>
    <li><a href="spares/upldjson_spr.php" target='x'>E-Inv-JSON UPLOAD</a></li>
    <li><a href="prncrnote1.php?jvno=" target="blank">Credit Note Print</a></li>
    </ul>
</li>
 <?

if($brcode!='3783' && $brcode!='3788')
	{
	    
?>

<li><a href="spares/purrepo_gstax3776.php" target=x>Item Purchase Eicher (Edit)</a></li><?
    
}
if($brcode=='3776'){?>
<li><a href="sparepurchase_edit3776.php" target=x>Remove Item Purchase Eicher</a></li><?}
?>

         
         
<tr ><td>&nbsp;&nbsp;<a href="createconsign.php" target='x'>Consign Master </a></td></tr>
<tr ><td>&nbsp;&nbsp;<a href="veh_trans.php" target='x'>Delivery Challan</a></td></tr>
<tr><td>&nbsp;&nbsp;<a href="prnvtrans_dup1.php" >Duplicate Delivery Challan</a></td></tr>

<tr><td>&nbsp;&nbsp;<a href="delvchnallbr.php" > Delivery Challan Report (All Br.)</a></td></tr>
<?

if($brcode=='3783'||$brcode=='3788')
	{
	    
?>

<li><a href="jour_eicherpurchgstvecv.php">A/C Posting VECV Purchase </a></li>
<?
    
}

?>



<?if($username!='joy2'){?>
<li><a href="">Spare Transfer>></a>
<ul>
  <li><a href="spares/transin.php" target='x'>Spare Transferin</a></li>
  <li><a href="upld_sparepurchasegst_agt.php">Update Aggregate</a></li>
  <li><a href="spares/transinagt.php" target='x'>Spare Transferin Aggregate</a></li>

  <!-- 

<li><a href="spares/transinagt.php" target='x'>Spare Transferin Aggregate</a></li>


<li><a href="spares/purrepo.php" target='x'>Spare Purchase Checking</a></li>
-->
</ul></li>
<?
}
?>

<?
if($brcode=='3776'||$brcode=='3783'||$brcode=='3788')
	{
//	<li><a href="upld_eicherpur.php">Upload Eicher Purchase CST</a></li>
//<li><a href="jour_eichpurch.php">A/C Posting Eicher Purchase CST</a></li>

//<li><a href="spares/waranty_repo.php"  target='x'>Waranty Report</a></li>
//<li><a href="spares/warpass22.php"  target='x'>Waranty Passed Report</a></li>
//<li><a href="spares/couponpass.php"  target='x'>Coupon Passed Report</a></li>

	?>
	
<?
}

?>
<!-- lock by joy 
<li><a href="stockagingnew.php"  target='x'>Stock Ageing Report</a></li>
<li><a href="spares/stockrepodw.php"  target='x'>Spare Stock Report</a></li>

-->

<li><a href="spares/stockrepodwsep23_11.php"  target='x'>Spare Stock Report New</a></li>
<li><a href="spares/traceitemledger.php"  target='x'>Spare Stock Ledger</a></li>
<li><a href="upld_sapstock1.php">Upload SAP Stock (For Comparison)</a></li>
<li><a href="spares/stockrepodwsep23_11sapvsonline.php"  target='x'>Compare Online V/S SAP Stock</a></li>
<li><a href="">GST Reports>></a>
<ul>
<!--
<li><a href="spares/traceitem.php"  target='x'>Spare Stock Ledger</a></li>
<li><a href="spares/traceitemexcess.php"  target='x'> Stock Ledger (Excess)</a></li>

    <li><a href="spares/invrepo_stax.php"  target='x'>Spare Invoice - VAT</a></li>
    <li><a href="spares/purrepo_stax.php"  target='x'>Spare Purchase - VAT</a></li>
-->

<li><a href="spares/invrepo_staxgstall2.php"  target='x'>Outward Supply </a></li>
<li><a href="spares/purrepo_staxgstall.php"  target='x'>Inward Supply </a></li>
</ul>

<ul>
<!--
<li><a href="">Sales Tax Reports>></a>
    <li><a href="spares/invrepo_stax.php"  target='x'>Spare Invoice - VAT</a></li>
    <li><a href="spares/purrepo_stax.php"  target='x'>Spare Purchase - VAT</a></li>




<li><a href="spares/zwtylist_report.php"  target='x'>ZWTY_LIST</a></li>

    <li><a href="spares/purrepostaxlocal.php"  target='x'>Spare Purchase - GST Local</a></li>
    
    <li><a href="spares/purrepostaxigst.php"  target='x'>Spare Purchase - IGST </a></li>
     
    <li><a href="spares/purrepostaxeich.php"  target='x'>Spare Purchase - Eich </a></li>
    <li><a href="spares/purrepostaxlocalall.php"  target='x'>Spare Purchase - GST Local (All Br.)</a></li>
    <li><a href="spares/purrepostaxigstall.php"  target='x'>Spare Purchase - IGST (All br.) </a></li>
    
    <li><a href="spares/invrepo_staxgst.php"  target='x'>CS & Jobcard Invoice - GST</a></li>
<li><a href="spares/salsretrepo.php"  target='x'>Sales Return Report GST</a></li>
  <li><a href="spares/purrepostaxeich.php"  target='x'>Spare Purchase - Eich </a></li>
    -->
    </ul>
</ul>
</li>
<!--
<li>
<a href="#">SERVICE</a>
<ul>
<li><a href="service/prnjcardbill_sb.php?invno=" target='x'>Duplicate Jobcard Invoice</a></li>

</ul>
</li>
-->
<?}?>
<li>
<a href="#">REPORTS</a>
<ul>
    <li><a href="spares/invrepo_tcs.php"  target='x'>TCS Report</a></li>
    <li><a href="spares/invrepo_gstax.php"  target='x'>Spare Invoice - GST</a></li>
    <li><a href="spares/invrepo_gstax_item.php"  target='x'>Spare Invoice-GST Itemwise</a></li>
    <li><a href="spares/invrepo_gstaxper.php"  target='x'>Spare Invoice-GST % wise </a></li>

    <li><a href="spares/invrepo_gstax_grp.php"  target='x'>Spare Invoice - GST Groupwise</a></li>
    <li><a href="spares/invrepo_gsthsn.php"  target='x'>Spare Invoice-HSN Code Summary</a></li>
     <li><a href="spares/purrepo_gstax37761.php" target=x>Spare Purchase Eich -GST</a></li>
     
        <li><a href="spares/wty_reco1.php" target=x>Wty Recon-VECV vs PSN</a></li>
     <li><a href="spares/purchreport_reco.php" target=x>Purchase Recon-VECV vs PSN</a></li>
     
     <li><a href="grp_ledgers4.php">Branch Wise Reco</a></li>

<li><a href="grp_ledgers5.php">Opening Balance Reco</a></li>

<li><a href="grp_ledgers6.php">Budget(Expense)</a></li>
     
    <?
    if($brcode=='3776'||$brcode=='3770')
    {
          /*  <li><a href="spares/purrepo_gstax3776.php" target=x>Eicher Purchase-GST (EDIT)</a></li>
    <li><a href="spares/purrepo_gstax37761.php" target=x>Spare Purchase-GST</a></li>
    */
    ?>
<?
    }else
    {
    ?>
        <!--

    <li><a href="spares/purrepo_gstax37761.php" target=x>Spare Purchase-GST</a></li>
    
    <li><a href="spares/purrepo_gstax.php" target=x>Sparepurchase-GST</a></li>
    -->
    
    <?
    }
    ?>
<!--
<li><a href="print_cbook1.php">Cash Book Registers</a></li>
<li><a href="print_inv_reg1.php">Invoice Registers</a></li>
<li><a href="invreport.php">Invoice Report</a></li>
<li><a href="print_bbook1.php">Bank Registers</a></li>
<li><a href="invreportsls.php">Invoice Report(Sales)</a></li>
<li><a href="upld_adjstock.php">Upload Adj Stock</a></li>
-->
</ul>
</li>
<?if(strtolower($user)!='kalpana'){?> 

  <li>
  <a href="#">Utility</a>

<ul>
    
   <!-- <li><a href="upld_eicherpur.php">Upload Eicher Purchase</a></li>
<li><a href="jour_eichpurch.php">A/C Posting Eicher Purchase</a></li>
-->
<?
if($succsyear==1)
{
?>
<?if($row1[0]>=4){?>
  
<?
if($username=='joy' ||$username=='subisha'||$username=='anson'||$username=='kamath'||$username=='jijeesh')
//<li><a href="gstmultisct2tds.php">GST Expenses/Asset TDS</a></li>
//<li><a href="sealedgall1718.php">Search Ledger All 1718</a></li>
//<li><a href='adjstock.php'>Stock Adjustment</a></li>

	{

  


?>

 <ul>

 
</ul>

<? 
} ?>

  <?}?>
<?
if($username=='anoop'||$username=='joy'||$username=='sunith'||$username=='jaimon'||$username=='prabeesh'||$username=='nisanth'||$username=='subisha'||$username=='vishnu'||$username=='vijith'||$username=='anson'||$username=='kamath' ||$username=='amaljith'||$username=='sanjayvv')
	{
//<li><a href="merge_ledger.php">Merge Ledgers</a></li>
/*
 <li><a href="dupitmlst.php">Duplicate Items</a></li>

<li><a href="upldcust.php">Sap Uploading customer</a></li>
<li><a href="upldcustop.php">Customer Opening</a></li>
<li><a href="upldsup.php">Sap Uploading Supplier</a></li>
<li><a href="upldsupop.php">Supplier Opening</a></li>
<li><a href="cust_change.php">Customer Name Change</a></li>
     <li><a href="grp_change.php">Group Change</a></li>
<li><a href="upldsap.php">Sap Uploading day</a></li>
<li><a href="uplditem.php">Item Uploading</a></li>
<li><a href="upldstock.php">Item Stock Uploading</a></li>
<li><a href="upldlocation.php">Item Location Uploading</a></li>
<li><a href="purchslct.php">Transaction</a></li>
<li><a href="saleslct.php">Invoice Entry</a></li>
<li><a href="databackup.php">Backup Database</a></li>
<li><a href="updbrtarget.php">Upload Br.Inc.Target</a></li>	
<li><a href="spares/budgetinccum.php" target='x'>Budget v/s Income</a></li>	

*/

	?>
	

	<li><a href="upldcustnew.php">New Customer</a></li>
	
	
	
	
	
   <li><a href="merge_ledger.php">Merge Ledgers</a></li>

  <li><a href="corr_stock.php">Stock Correction</a></li>
    
	<li><a href="chkledniltr.php">Nil Trans. Ledgers</a></li>
<li><a href="accounts/tdsbook.php" target='x'>TDS Payable Balance</a></li>	

<li><a href="misrpt.php">Branch Status</a></li>
<li><a href="updbrtarget.php">Upload Br.Exp.Target</a></li>	
<li><a href="grp_ledgers6.php">Budget(Expense)</a></li>
<li><a href="jasontoexcel.php" target='x'>Jason To Excel</a></li>	

<?
	}
}
?>

<li><a href='#'>E-Invoice -></a>
	<ul>
	

	
		<li><a href="spares/sap_spareinvoiceupload.php" target='x'>Upload E-Invoice data from SAP </a></li>
        <li><a href="spares/sap_spareinvoicejson.php" target='x'>E-Invoice Json Download(billwise)</a></li>
        <li><a href="spares/sap_spareinvoicejson_dtwise.php" target='x'>E-Invoice Json Download(datewise)</a></li>
	        <?
        if($username=='anoop'||$username=='joy'||$username=='sunith'||$username=='jaimon'||$username=='prabeesh'||$username=='nisanth'||$username=='subisha'||$username=='ajay'||$username=='vijith'||$username=='anson'||$username=='kamath' ||$username=='rahil'||$username=='sanjayvv' || $username == 'mallikarjun' ||$username == 'manoharrdc' ||$username == 'sushank')
	    {?>
    	    <li><a href="spares/sap_del_einvoice.php" target='x'>Delete E-Invoice</a></li>
    	    <li><a href="spares/einvoice_crnote.php" target='x'>JSON for CR Note </a></li>
	    <?}?>
		</ul>
	</li>
<li><a href="spares/budgetexpcum.php" target='x'>Budget v/s Expense</a></li>


 <li><a href="upld_gst.php">GST Upload</a></li>
 <li><a href="spares/ewayinvoiceentry.php" target="_blank">SPAREINVOICE TO JSON</a></li>
 <li><a href="spares/ewayentry.php" target="_blank">STOCKTRANSFER TO JSON</a></li>
 <?if($brcode!='13776'){?>
 
 <li><a href="upld_ewaysto.php">SAP STO UPLOAD</a></li>
 
 <?}?>
    <?if($row1[0]==11 || $row1[0]==55){?>
    <li><a href="eoy.php">**Year Ending Process</a></li>
    <li><a href="dropnew.php">**Deleting Newly Created Database</a></li>
    <?}?>
    
    <?
if($username=='joy' ||$username=='anoop' ||$username=='sunith' ||$username=='shinad' ||$username=='sanjayvv')

	{
?>

 
<li><a href="accounts/jourbkdate.php">Back Date Entries</a></li>
<li><a href="grp_ledgers4led.php"> Ledger Transactions All Br.</a></li>

  <?
	}
	?>
	  <li><a href="chp.php">Change Password</a></li>
  </ul>
  </li>

<?}?>


  <li>
  <a href="#">Others</a>

<ul>
   <!-- 
   <li><a href="upld_jobcardgststock.php">Jobcard  Upload For Stock</a></li>
<li><a href="upld_jobcardgst_chk2.php"> Jobcard Checking</a></li>
<li><a href="upld_invoice_chk.php"> Spare_Invoice and JC Checking</a></li>

   <li><a href="checking_spareinvoice.php"> Spare_Invoice Checking</a></li>

   <li><a href="upld_eicherpur.php">Upload Eicher Purchase</a></li>
<li><a href="jour_eichpurch.php">A/C Posting Eicher Purchase</a></li>
-->
<?
if($succsyear==1)
{
?>
<?if($row1[0]>=2){?>
<?if(strtolower($user)!='kalpana'){?> 
   <li><a href="dbnote1.php">Debit Note</a></li>
<li><a href="prndbnote1.php?jvno=" target="blank">Debit Note Print Veh div</a></li>
<li><a href="prndbnote1br.php?jvno=" target="blank">Debit Note Print Br.</a></li>
<li><a href="spares/einvoice_dbnote.php" target="x">Debit Note JSON Download</a></li>
<li><a href="spares/upldjson_spr.php" target='x'>E-Inv-JSON UPLOAD DB Note</a></li>
<?}?>
<li><a href="spareinvoice_new.php">Spare Invoice(Others)</a></li>
<li><a href="prnspareinvoice_dup1.php">Spare Invoice(Others Duplicate)</a></li>
<?if(strtolower($user)!='kalpana'){?> 
<li><a href='serviceinvoice_dup1.php'>Dup.Copy (Service invoice)</a></li>
<li><a href='serviceinvoiceret_dup1.php'>Dup.Copy (Jobcard invoice Ret)</a></li>
<?}?>
<li><a href='#'>E-Invoice Others-></a>
	<ul>
<li><a href="spares/einvoice_spareinvoice.php" target='x'>E-Inv-JSON Download(Others)</a></li>

<li><a href="spares/einvoice_serinvoice.php" target='x'>E-Inv-JSON Download(Service)</a></li>
<li><a href="spares/einvoice_jcreturn.php" target='x'>E-Inv-JC Return</a></li>

      <li><a href="spares/upldjson_spr.php" target='x'>E-Inv-JSON UPLOAD</a></li>
      </ul>
      </li>
<?
if($username=='joy' ||$username=='subisha'||$username=='anson'||$username=='kamath'||$username=='KAMATH'||$username=='nisanth'||$username=='manoharrdc' ||$username=='sunith'||$username=='prabeesh'||$username=='anoop'||$username=='midhun'||$username=='deepuks'||$username=='akhila'||$username=='sijilal'||strtolower($username)=='kalpana' ||$username=='vijilesh'||$username=='mithun')
//<li><a href="gstmultisct2tds.php">GST Expenses/Asset TDS</a></li>
//<li><a href="sealedgall1718.php">Search Ledger All 1718</a></li>
//<li><a href='adjstock.php'>Stock Adjustment</a></li>

	{

?>
<?if(strtolower($user)=='kalpana'){?> 
<li><a href="spares/stockrepodw.php"  target='x'>Spare Stock Report</a></li>
<?}?>
<?if(strtolower($user)!='kalpana'){?> 
    <li><a href="partmaster.php">Partmaster</a></li>

<li><a href='adjstock.php'>Stock Adjustment</a></li>

<li><a href='serviceinv.php'>Service invoice</a></li>
<li><a href='serviceinvret.php'>Jobcard invoice Return</a></li>
<?}?>
<? 
} ?>
<li><a href='#'>Reports -></a>
	<ul>
<li><a href='otherinv_gstallbr.php'>Spare inv Others Report(All Br.) </a></li>

<li><a href='otherinvser_gstallbr.php'>Service inv Others Report(All Br.) </a></li>
<li><a href='spares/invrepobrnew.php' target='x'>Daily Consumption Report </a></li>

<li><a href='spares/adjrepo.php' target='x'>Stock Adjustment Report </a></li>
<li><a href='spares/adjrepoallbr.php' target='x'>Stock Adjustment Report All Br. </a></li></ul></li>

 <ul>
</ul>



  <?}?>
<?
if($username=='anoop'||$username=='joy'||$username=='sunith'||$username=='jaimon'||$username=='prabeesh'||$username=='nisanth'||$username=='subisha'||$username=='ajay'||$username=='vijith'||$username=='anson'||$username=='kamath')
	{


	?>
		

<?
	}
}
?>


 
 
    <?
if($username=='joy' ||$username=='anoop'||$username=='sunith'||$username=='akhila'||$username=='vijilesh'||$username=='mithun'||$username=='midhun'||$username=='hari')

	{
?>
<li><a href='#'>Stock Transfer Others -></a>
	<ul>
<li><a href="spares/pur1new.php" target='x'>Spare Transfer Request</a></li>
<li><a href="transoutnew.php" target='x'>Spare Transferout</a></li>
<li><a href="spares/transinexcess.php" target='x'>Spare Transfer In </a></li>

<li><a href="spares/prnsptrout.php?tr_no=" target='x'>Duplicate Spare Transfer</a></li>
<li><a href="stkoutexcessrptallbr.php" target='x'>Stk Trfr Out Oth. report (All Br.)</a></li>
<li><a href="stkinexcessrptallbr.php" target='x'>Stk Trfr In Oth. report (All Br.)</a></li></ul></li>
<li><a href="spares/cashbal.php" target='x'>Cash Balance</a></li>
  <?
	}
	?>
	
  </ul>
  </li>


  
  <?
}
  ?>
  <li>
  <a href="logout.php">Logout</a>
  </li>  
 <li>
  <img src='images/logo_05.png' width=80px height=40px>
  </li>    
   
  

<div id="searchWrapper" style="position: fixed; top: 10px; right: 20px; width: 250px; z-index: 9999;">
  <input type="text" id="menuSearch" placeholder="🔍 Search ..." style="width: 100%; padding: 8px;">
  <div id="searchResults" style="display: none;"></div>
</div>

</ul>
</div>
 
<style>
   #txt a {
  text-decoration: none;
  color:DarkSlateGray;
font-family: calibri, Helvetica;
    }
#txt{
font-family: calibri, Helvetica;

}
.tb
{
-moz-box-shadow:    inset 1px 1px 10px Grey;
   -webkit-box-shadow: inset 1px 1px 10px Grey;
   box-shadow:         inset 1px 1px 10px Grey;
}
</style>

<div style='padding-top:55px'>


<?
/*$query="select brname,login_date from branch where brcode ='".$_SESSION['brcode']."'";
//echo $query;
$rslt1=mysqli_query($db,$query);
$row11=mysqli_fetch_row($rslt1);

$exmsg="Password expires in"." ".$_SESSION['expir']." "."days";
$date_1 = implode('-', array_reverse(explode('-', $row11[1])));
*/
// ================start branch clearing check ================================


$rew=mysqli_query($db,"select brled,brname from branch where brcode='$brcode'");

$rerow=mysqli_fetch_row($rew);

$led=$rerow[0];

if(strlen($led)>0)
{
    $dt = date('Y-m-d');
    $sql="select min(date),brcode,jvno from journal2  where partic='$led'  and date>='2018-04-01' and date<='$dt' and brcode!='$brcode' and j_type!='CH' and j_type!='GRN' and j_type!='Spare trans out' and j_type!='Spare trans out agt' and j_type!='Acs trans out' and j_type!='Acs trans in' and j_type!='Spare trans in'  and j_type!='Spare trans in agt' and against!='done' ";
    
    $result1=mysqli_query($db,$sql)or die(mysqli_error($db));
    $user_row1=mysqli_fetch_array($result1);
    $dt1=$user_row1[0];
    /*print $dt1;
    print $user_row1[1];
    print $user_row1[2];*/
    
    $sq1="select to_days(curdate())+1-to_days('$dt1')";
    $dtre1=mysqli_query($db,$sq1)or die(mysqli_error($db));
    $dtrow1=mysqli_fetch_row($dtre1);
    //print $level;
    if($level<=4 && $brcode!='3791' && $username!='rgn')
    {
        if($dtrow1[0]>30)
        {
            // print "<script> alert('Previous Date Entry possible for last 5 days only');  </script>";
            print "<script> alert('You cannot login.service Branch Clearing pending for more than 10 days.Get approval from Finance Manager for login'); history.back(1); </script>";
            return;

            //print "<script> alert('Branch Clearing pending for more than 7 days.Clear immediately else  login will get blocked');  </script>";
            //return;
        }
    }
    
    // vehicle entry clearing chking
    $sqlv="select min(date) from gen4psnauto_psn_amplvehicle.journal2  where partic='$led'  and date>='2019-06-20' and date<='$dt'  and against!='done' ";
    //print $sqlv;
    $result1v=mysqli_query($db,$sqlv)or die(mysqli_error($db));
    $user_row1v=mysqli_fetch_array($result1v);
    $dt1v=$user_row1v[0];
    //print $dt1v;
    
    $sq1v="select to_days(curdate())+1-to_days('$dt1v')";
    $dtre1v=mysqli_query($db,$sq1v)or die(mysqli_error($db));
    $dtrow1v=mysqli_fetch_row($dtre1v);


    if($level<=5 && $brcode!='3791' && $username!='rgn')
    {
        if($dtrow1v[0]>30)
        {
            // print "<script> alert('Previous Date Entry possible for last 5 days only');  </script>";
 
            print "<script> alert('You cannot login.Vehicle Branch Clearing pending for more than 15 days.Get approval from Finance Manager for login'); </script>";

            return;

 
            //print "<script> alert('Branch Clearing pending for more than 7 days.Clear immediately else  login will get blocked');  </script>";
            //return;
        }
    }
     
}

// ===========end  branch clearing check ==============================

?>
<table width='100%'><tr bgcolor='LightSalmon'>
<td align='center' bgcolor='white'><font size=4><font face=calibri></td><td align='left' id='txt'><font size= 4><font color = 'black' size= 4><b>  Financial Year : <? print $fin_year?> </td><td id='txt'><font size= 4>Branch :<b><? echo $rerow[1] ?></td><td id='txt'><font size= 4>Branch code:<b><? echo $brcode ?></td><td align='left' id='txt'><font size= 4>User : <b><? echo $username ?></td><td align='left' id='txt'><? echo $exmsg ?></b></font></td>


</tr>
</table></div>


<script>
document.getElementById("menuSearch").addEventListener("keyup", function () {
    let input = this.value.toLowerCase();
    console.log(input)
    let resultsDiv = document.getElementById("searchResults");
    let links = document.querySelectorAll("#cssmenu a");
    let results = [];
    let seen = new Set();

    if (input.trim() === "") {
        resultsDiv.style.display = "none";
        resultsDiv.innerHTML = "";
        return;
    }
	
	links.forEach(link => {
        const href = link.getAttribute("href");
        const text = link.textContent.trim().toLowerCase();

        if (!href || href.trim() === "" || href === "#" || href.startsWith("javascript:") || seen.has(href)) return;

        if (text.includes(input)) {
            seen.add(href);
            const parentText = link.closest("ul")?.previousElementSibling?.textContent?.trim() || "";
            const fullText = parentText ? `${parentText} → ${link.textContent.trim()}` : link.textContent.trim();
            // results.push(`<a href="${href}" target="">${fullText}</a>`);
            results.push(`<a href="${href}" target="">${link.textContent.trim()}</a>`);
        }
    });

    resultsDiv.innerHTML = results.length ? results.join("") : "<p style='padding:8px; color: white;' >No matches found</p>";
    resultsDiv.style.display = "block";
});
</script>
<script>
document.addEventListener("click", function (e) {
    const input = document.getElementById("menuSearch");
    const results = document.getElementById("searchResults");
    if (!input.contains(e.target) && !results.contains(e.target)) {
        results.innerHTML = "";
        results.style.display = "none";
    }
});
</script>

