<?php
require("includes/check_auth_user.php");
require("includes/dbconnect.php");
include('includes/function.php');

$usertype = $_SESSION["usertype_" . $dbname];
if ($usertype > 1){
    include("includes/menu_rights.php");
}
$admin = $_SESSION["admin_" . $dbname];
$complogo = $_SESSION["complogo"];
$menutype = $_SESSION["menutype"];

$zroot = $_SESSION["zdir"];
//browse($zroot);

$src = "";
$action = isset($_GET["action"]) ? $_GET["action"] : "";
switch ($action) {

    ####################### MASTERS ##########################
    case "item";
        $src = "itemmain.php?mode=last";
        break;

    case "rawmat";
        $src = "rawmat.php?mode=last";
        break;

    case "itemgrp";
        $src = "itemgrpmain.php?mode=last";
        break;

    case "rawmatgrp";
        $src = "rawmatgrp.php?mode=last";
        break;

    case "color";
        $src = "color.php?mode=last";
        break;

    case "itsubgrp";
        $src = "itsubgrpmain.php?mode=last";
        break;

    case "expense";
        $src = "expense.php?mode=last";
        break;

    case "unit";
        $src = "unit.php?mode=last";
        break;

    case "driver";
        $src = "driver.php?mode=last";
        break;

    case "staff";
        $src = "staff.php?mode=last";
        break;

    case "customer";
        $src = "customer.php?mode=last";
        break;

    case "supplier";
        $src = "supplier.php?mode=last";
        break;

    case "agency";
        $src = "agency.php?mode=last";
        break;

    case "maker";
        $src = "maker.php?mode=last";
        break;

    case "transport";
        $src = "transport.php?mode=last";
        break;

    case "godown";
        $src = "godown.php?mode=last";
        break;

    case "bank";
        $src = "bank.php?mode=last";
        break;

    case "cash";
        $src = "cash.php?mode=last";
        break;

    case "openbal";
        $src = "openbal.php?mode=last";
        break;

    case "transport";
        $src = "transport.php?mode=last";
        break;

    case "group";
        $src = "grpmast.php?mode=last";
        break;

    case "otherac";
        $src = "otherac.php?mode=last";
        break;

    case "chcustdtls";
        $src = "chcustdtls.php?mode=last";
        break;

    case "chrateop";
        $src = "openstock.php?mode=last";
        break;

    case "rawchrateop";
        $src = "rawopenstock.php?mode=last";
        break;


    case "saletype";
        $src = "saletype.php?mode=last";
        break;

    ####################### TRANSACTION ##########################
    case "challanmulti";
        $src = "challanmulti.php?mode=last";
        break;

    case "discgvn";
        $src = "discgvn.php?mode=last";
        break;

    case "discrecd";
        $src = "discrecd.php?mode=last";
        break;

    case "purchase";
        $src = "purchgstmulti.php?mode=last";
        break;

    case "repgiven";
        $src = "repairgiven.php?mode=last&para=G";
        break;

    case "reptaken";
        $src = "repairgiven.php?mode=last&para=T";
        break;

    case "purchexp";
        $src = "purchexp.php?mode=last";
        break;

    case "purchgstmulti";
        $src = "purchgstmulti.php?mode=last";
        break;

    case "sale";
        $src = "salegstmulti.php?mode=last";
        break;

    case "salegst";
        $src = "salegst.php?mode=last";
        break;

    case "salegstmulti";
        $src = "salegstmulti.php?mode=last";
        break;

    case "salematmulti";
        $src = "salematmulti.php?mode=last";
        break;

    case "jobgiven";
        $src = "jobgiven.php?mode=last";
        break;

    case "purchmatgst";
        $src = "purchmatgst.php?mode=last";
        break;

    case "salematgstmulti";
        $src = "salematgstmulti.php?mode=last";
        break;

    case "debnote";
        $src = "debnotegstmulti.php?mode=last&credtype=G";
        break;

    case "debitnote";
        $src = "debnote.php?mode=last&credtype=G";
        break;

    case "debitnotegst";
        $src = "debnotegst.php?mode=last&credtype=G";
        break;

    case "creditnote";
        $src = "crednote.php?mode=last&credtype=G";
        break;

    case "creditnotegst";
        $src = "crednotegst.php?mode=last&credtype=G";
        break;
    case "creditnotemulti";
        $src = "creditnotegstmulti.php?mode=last&credtype=G";
        break;

    case "credoth";
        $src = "credoth.php?mode=last&credtype=O";
        break;

    case "credothgst";
        $src = "credothgst.php?mode=last&credtype=O";
        break;
    case "credothgstmulti";
        $src = "creditnotegstmulti.php?mode=last&credtype=O";
        break;

    case "deboth";
        $src = "deboth.php?mode=last&credtype=O";
        break;

    case "debothgst";
        $src = "debothgst.php?mode=last&credtype=O";
        break;

    case "inwardgst";
        $src = "inward.php?mode=last";
        break;

    case "outwardgst";
        $src = "outward.php?mode=last";
        break;

    case "inwardraw";
        $src = "inwardraw.php?mode=last";
        break;

    case "outwardraw";
        $src = "outwardraw.php?mode=last";
        break;

    case "damagedraw";
        $src = "damagedraw.php?mode=last";
        break;

    case "outwardgst";
        $src = "outward.php?mode=last";
        break;

    case "damagedgst";
        $src = "damaged.php?mode=last";
        break;

    case "jobreceived";
        $src = "jobreceived.php?mode=last";
        break;

    case "excessgst";
        $src = "excess.php?mode=last";
        break;

    case "cashrecp";
        $src = "cashrecp.php?mode=last";
        break;

    case "bankrecp";
        $src = "bankrecp.php?mode=last";
        break;

    case "custtokari";
        $src = "custtokari.php?mode=last";
        break;

    case "cashpay";
        $src = "cashpay.php?mode=last";
        break;

    case "bankpay";
        $src = "bankpay.php?mode=last";
        break;

    case "contra";
        $src = "contra.php?mode=last";
        break;

    case "journal";
        $src = "jv.php?mode=last";
        break;

    case "inttransfer";
        $src = "inttransfer.php?mode=last";
        break;

    case "amtrequest";
        $src = "amtrequest.php?mode=last";
        break;


    case "crednoterawgst";
        $src = "crednoteraw_gst.php?mode=last";
        break;

    case "debnoterawgst";
        $src = "debnoteraw_gst.php?mode=last";
        break;

    ######################### REPORTS ###########################
    case "stock";
        $src = "stock.php";
        break;

    case "rawstock";
        $src = "rawstock.php";
        break;

    case "jobpend";
        $src = "jobpend_rep.php";
        break;

    case "inwout";
        $src = "inwoutrep.php";
        break;

    case "rawinwout";
        $src = "rawinwoutrep.php";
        break;

    case "vatrep";
        $src = "vatrep.php";
        break;

    case "ledger";
        $src = "ledger.php";
        break;

    case "labels";
        $src = "labels.php";
        break;

    case "chqrep";
        $src = "chqrep.php";
        break;

    case "amtrep";
        $src = "amtrep.php";
        break;

    case "itemwise";
        $src = "itemwise.php";
        break;

    case "rawmatwise";
        $src = "rawmatwise.php";
        break;

    case "itemwisesale";
        $src = "itemwise_sale.php";
        break;

    case "rawmatwisesale";
        $src = "rawmatwise_sale.php";
        break;

    case "itemgrpwisesale";
        //        $src = "itemgrpsale.php";
        $src = "saleitemgrp.php";
        break;

    case "rawgrpwisesale";
        //        $src = "itemgrpsale.php";
        $src = "salerawgrp.php";
        break;

    case "partygrpwisesale";
        $src = "partgrp_sale.php";
        break;

    case "leadparty";
        $src = "leadparty.php";
        break;

    case "dailyreport";
        $src = "dailyrep.php";
        break;

    case "dailysalereport";
        $src = "dailysalereport.php";
        break;

    case "dailycashrp";
        $src = "dailyrepcash.php";
        break;

    case "checkstock";
        $src = "check_stock.php";
        break;

    case "brsale";
        $src = "brsale.php";
        break;

    case "bankbook";
        $src = "bankbook.php?para=B";
        break;

    case "cashbook";
        $src = "bankbook.php?para=C";
        break;

    case "jvbook";
        $src = "jvbook.php?para=C";
        break;

    case "stocknew";
        $src = "stock_new.php";
        break;

    case "stockold";
        $src = "stock_old.php";
        break;

    case "stockonlyshade";
        $src = "stock_shade.php";
        break;

    case "expenserep";
        $src = "expenserep.php";
        break;

    case "payable";
        $src = "osbill.php?para=P";
        break;

    case "receivable";
        $src = "osbill.php?para=R";
        break;

    case "karigrep";
        $src = "karigrep.php";
        break;

    case "pendrep";
        $src = "pendrep.php";
        break;

    ########################## REGISTERS ########################
    case "purchreg";
        $src = "purchreg.php";
        break;
    case "purchgstreg";
        $src = "pumultigstreg.php";
        break;
    case "purexp";
        $src = "purexpreg.php";
        break;

    case "slgstreg";
        $src = "slgstreg.php";
        break;

    case "salereg";
        $src = "slmultigstreg.php";
        break;

    case "slmatmultigstreg";
        $src = "slmatmultigstreg.php";
        break;

    case "crednoterawgstreg";
        $src = "crednoterawgstreg.php";
        break;

    case "purchrawgstreg";
        $src = "purchrawgstreg.php";
        break;

    case "debnoterawgstreg";
        $src = "debnoterawgstreg.php";
        break;

    case "inwreg";
        $src = "inwreg.php";
        break;

    case "inwregraw";
        $src = "inwregraw.php";
        break;

    case "outregraw";
        $src = "outregraw.php";
        break;

    case "damregraw";
        $src = "damregraw.php";
        break;

    case "jobgivenreg";
        $src = "jobgivenreg.php";
        break;

    case "outreg";
        $src = "outreg.php";
        break;

    case "debreg";
        $src = "debreg.php";
        break;

    case "credreg";
        $src = "credreg.php";
        break;

    case "damreg";
        $src = "damreg.php";
        break;

    case "jobrecdreg";
        $src = "jobrecdreg.php";
        break;

    case "excessreg";
        $src = "excessreg.php";
        break;

    case "autoinw";
        $src = "trnfreg.php";
        break;

    case "transreg";
        $src = "intrnfreg.php";
        break;

    case "driverreg";
        $src = "driverreg.php";
        break;

    case "taxinvreg";
        $src = "taxinvreg.php";
        break;

    case "balancereg";
        $src = "balancereg.php";
        break;

    case "debntreg";
        $src = "debntreg.php";
        break;

    case "debothreg";
        $src = "debothreg.php";
        break;

    case "crdntreg";
        $src = "crdntreg.php";
        break;

    case "crdothreg";
        $src = "crdothreg.php";
        break;

    case "custokar";
        $src = "custokar.php";
        break;


    case "debnotereg";
        $src = "debnotereg.php";
        break;

    case "repgivreg";
        $src = "repaireg.php?para=G";
        break;

    case "reprecreg";
        $src = "repaireg.php?para=R";
        break;

    ########################## GST REPORTS FOR Product ########################
    case "gstr1_1";
        $src = "gstr1_1.php?para=P";
        break;

    case "gstr1_2";
        $src = "gstr1_2.php?para=P";
        break;

    case "gstr1_3";
        $src = "gstr1_3.php?para=P";
        break;

    case "gstr1_4";
        $src = "gstr1_4.php";
        break;

    case "gstr1_5";
        $src = "gstr1_5.php";
        break;

    case "gstr1_6";
        $src = "gstr1_6.php";
        break;

    case "gstr1_7";
        $src = "gstr1_7.php";
        break;

    case "gstr1_8";
        $src = "gstr1_8.php";
        break;

    case "gstr1_9";
        $src = "gstr1_9.php";
        break;

    case "gstr1_10P";
        $src = "gstr1_10.php?para=P";
        break;

    case "gstr1_10";
        $src = "gstr1_10.php";
        break;

    case "gstr1_11";
        $src = "gstr1_11.php";
        break;

    case "gstr3B";
        $src = "gstr3B.php";
        break;

    case "pugstrep";
        $src = "pugstrep.php";
        break;

    case "slgstrep";
        $src = "slgstrep.php";
        break;

    case "gstsumrep";
        $src = "gstsumrep.php";
        break;

    ########################## FINAALIZATION ########################
    case "trbal";
        $src = "trbal.php";
        break;

    case "profit";
        $src = "profit.php";
        break;

    case "profshar";
        $src = "profshar.php";
        break;

    case "balsheet";
        $src = "balsheet.php";
        break;


    case "einvoicepdgen";
        $src = "einvoicegen.php?saltype=P";
        break;

    case "einvoicermgen";
        $src = "einvoicegen.php?saltype=R";
        break;

        ############## Accounts ##############
        case "bankrecon";
        $src = "bankrecon.php";
        break;
        
        case "bankrecorep";
        $src = "bankreco_rep.php";
        break;

    ##############Combine Stock##############
    case "custnopay";
        $src = "custnopay.php";
        break;

    case "custnosale";
        $src = "custnosale.php";
        break;
    case "karigpay";
        $src = "karigpay.php";
        break;
    case "karadvbal";
        $src = "karadvbal.php";
        break;
    case "karigmatgv";
        $src = "karigmatgv.php";
        break;
    case "kargoodrc";
        $src = "kargoodrc.php";
        break;

    case "autotran";
        $src = "autotran.php";
        break;



    ########################## GST REPORTS   ########################
    case "gstr1_1_R";
        $src = "gstr1_1.php";
        break;

    case "gstr1_2";
        $src = "gstr1_2.php";
        break;

    case "gstr1_3";
        $src = "gstr1_3.php";
        break;

    case "gstr1_4";
        $src = "gstr1_4.php";
        break;

    case "gstr1_5";
        $src = "gstr1_5.php";
        break;

    case "gstr1_6";
        $src = "gstr1_6.php";
        break;

    case "gstr1_7";
        $src = "gstr1_7.php";
        break;

    case "gstr1_8";
        $src = "gstr1_8.php";
        break;

    case "gstr1_9";
        $src = "gstr1_9.php";
        break;

    case "gstr1_10";
        $src = "gstr1_10.php";
        break;

    case "gstr1_11";
        $src = "gstr1_11.php";
        break;

    case "gstr3B";
        $src = "gstr3B.php";
        break;

    case "pugstrep";
        $src = "pugstrep.php";
        break;

    case "slgstrep";
        $src = "slgstrep.php";
        break;

    case "gstsumrep";
        $src = "gstsumrep.php";
        break;

    ########################## FINAALIZATION ########################
    case "trbal";
        $src = "trbal.php";
        break;

    case "profit";
        $src = "profit.php";
        break;

    case "profshar";
        $src = "profshar.php";
        break;

    case "balsheet";
        $src = "balsheet.php";
        break;



    #########################TOOLS#########################
    case "company";
        $src = "company.php?mode=last";
        break;

    case "profile";

        if ($usertype == 1) {
            $src = "user.php?mode=last";
        } else {
            $src = "user2.php?mode=last";
        }
        break;

    case "stock";
        $src = "default2.php";
        break;

    case "backup";
        $src = "backup.php";
        break;

    case "balsms";
        $src = "http://vas.gsmash.com/balance.php?username=ABDRAS&password=ABDRAS2017&route=1";
        break;

    case "yearend";
        $src = "yearend.php";
        break;

    default:
        $head = "Home";
        $src = "default2.php?mode=last";
}



include("includes/linkshead.php");
$dispyear = right(($_SESSION["zdbyear_" . $dbname]), 4);

$zdb = $_SESSION["zdbyear_" . $dbname];

$compcd = $_SESSION["comp_" . $dbname];

$getcomp = mysqli_query($conn, "SELECT code, name FROM `company` where `code`= '$compcd'") or die(mysqli_error($conn));
$fetcomp = mysqli_fetch_array($getcomp);
$cmpname = $fetcomp['name'];
mysqli_select_db($conn, $zdb);

//browse($zdb);
//$srchresult = mysqli_query($conn, "SELECT vouchno, DATE_FORMAT(`vouchdt`, '%d-%m-%Y')as vouchdt, compcode, source, qty
//                                       FROM `transacn` where `complete`= '0000-00-00' and `source`='TR' group by vouchno order by vouchdt DESC") or die(mysqli_error($conn));
$srchresult = mysqli_query($conn, "SELECT vouchno, DATE_FORMAT(`vouchdt`, '%d-%m-%Y')as vouchdt, party, totqty
                                       FROM `purmain` where `complete`= '0000-00-00' and `salevouch` > 0 group by vouchno order by vouchdt DESC") or die(mysqli_error($conn));

//            print table($srchresult);
if (!empty($srchresult)) {
    $srcinst = mysqli_num_rows($srchresult);
} else {
    $srcinst = 0;
}
?>
<script>
    $(document).ready(function () {

        document.addEventListener("keydown", function (zEvent) {
            if (zEvent.ctrlKey && zEvent.altKey && zEvent.code === "KeyE") {
                //                alert('Invalid key Nagvigate Through Menu');

                $(window).keydown(function (event) {
                    if (event.ctrlKey && event.keyCode == 52) {
                        var href = $('#crlink').attr('href');
                        window.location.href = href;
                    }
                });
            }
            if (zEvent.ctrlKey && zEvent.altKey && zEvent.code === "KeyR") {

                $(window).keydown(function (event) {
                    if (event.ctrlKey && event.keyCode == 55) {
                        var href = $('#dclink').attr('href');
                        window.location.href = href;
                    }
                });
            }
        });

        //        $(document).keydown(function (event) {
        //            //19 for Mac Command+S
        //            if (!(String.fromCharCode(event.which).toLowerCase() == 'x' && event.altKey) && !(event.which == 19))
        //                return true;
        //            //alert("Ctrl-s pressed");
        ////        $("#edit").click();
        //            var href = $('#logout').attr('href');
        //            window.location.href = href;
        //            event.preventDefault();
        //            return false;
        //        });

    });
</script>
<style>
    @import url('https://fonts.googleapis.com/css2?family=Ephesis&display=swap');
</style>
</head>

<body class="off-canvas">
    <div id="container" class="sidebar-mini">
        <header id="header">
            <!--logo start-->
            <div class="brand">
                <a href="menumsg.php" class="logo" style="font-family:'Times New Roman', Times, serif;font-size:20px">
                    <?php echo $cmpname; ?>
                </a>
            </div>

            <!--<div class="brand"><a href="menu.php" class="logo"><?php // Echo $project_name;                      
                    ?></a></div>-->
            <!--logo end-->
            <div class="toggle-navigation toggle-left">
                <button type="button" class="btn btn-default" id="toggle-left" data-toggle="tooltip" data-placement="right" title="Toggle Navigation">
                    <i class="fa fa-bars"></i>
                </button>
            </div>

            <div class="user-nav">
                <ul>

                    <li class="dropdown settings"><a href="<?
                        // if ($usertype == 1) {
                        //     echo "comp.php";
                        // } else {
                            // }
                            echo "#";
                        ?>"><label class="label-control" style="font-size: 12px;color: #58B19F;"> Company : <?php echo $cmpname; ?></label></a></li>
                    <li class="dropdown settings">
                        <a class="dropdown-toggle" href="year.php">
                            <label class="label-control" style="font-size: 13px;color:#58B19F;"><i class="fa fa-calendar" aria-hidden="true"></i> <?php echo 'Financial Year : ' . $dispyear; ?></label>
                        </a>
                    </li>


                    <!--<li <?= $dcombstock; ?> class="dropdown settings"><label class="label-control" style="font-size: 18px;"><i class="fa fa-list"></i>  <a href="?action=combstock">Combined Stock</a></label></li>-->

                    <?php if ($srcinst > 0) {
                        ?>
                        <li class="dropdown settings">
                            <a class="dropdown-toggle" href="?action=autotran">
                                <label class="label-control" style="font-size: 15px;color: red;"><i class="fa fa-"></i>Transfer (<?= $srcinst ?>)</label>
                            </a>
                        </li>
                        <?php
                    }
                    ?>
            <!--                    <li class="profile-photo"><img src="assets/img/avatar.png" alt="" class="img-circle"></li>-->
                    <li class="dropdown settings">
                        <a class="dropdown-toggle balsms" data-toggle="dropdown" href="#">
                            <b style="font-size: 20px;color:#58B19F;"><?php echo $_SESSION["username_" . $dbname]; ?></b> <i class="fa fa-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu animated fadeInDown">
                            <li <?= $tlcompany; ?>><a href="?action=company"><i class="fa fa-building-o"></i> Company SetUp</a></li>
                            <li <?= $tlbackup; ?>><a href="backup.php"><i class="fa fa-cloud-download"></i> Backup</a></li>
                            <li <?= $tlprofile; ?>><a href="?action=profile"><i class="fa fa-user"></i> Profile</a></li>
                            <!--<li <?= $tlbalsms; ?>><a href="?action=balsms"><i class="fa fa-user"></i> Balance SMS</a></li>-->
                            <!--<li <?= $tlyearend; ?>><a href="?action=yearend"><i class="fa fa-calendar"></i>Year End</a></li>-->
                            <li><a id="logout" href="logout.php"><i class="fa fa-power-off"></i> Logout</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </header>


        <!-- AUTO LINKS-->
        <a href="ch_recd.php?mode=last" id="crlink"></a>
        <a href="dailycash.php" id="dclink"></a>


        <!--sidebar left start-->
        <nav class="sidebar sidebar-left">
            <h5 class="sidebar-header">Navigation</h5>
            <ul class="nav nav-pills nav-stacked">
                <li class="nav-dropdown"  <?= $master ?>>
                    <a href="#" title="UI Elements"><i class="fa fa-graduation-cap"></i>Masters</a>
                    <ul class="nav-sub">
                        <li <?= $customer; ?>><a href="?action=customer">Customer</a></li>
                        <li <?= $agency; ?>><a href="?action=agency">Agency</a></li>
                        <li <?= $maker; ?>><a href="?action=maker">Maker / Karigar</a></li>
                        <li <?= $supplier; ?>><a href="?action=supplier">Supplier</a></li>
                        <li <?= $openbal; ?>><a href="?action=openbal">Opening Balance</a></li>
                        <li <?= $transport; ?>><a href="?action=transport">Transporter</a></li>
                        <li <?= $color; ?>><a href="?action=color">Color</a></li>

                        <hr>

                        <li <?= $bank; ?>><a href="?action=bank">Bank</a></li>
                        <li <?= $cash; ?>><a href="?action=cash">Cash</a></li>
                        <li <?= $expense; ?>><a href="?action=expense">Expense</a></li>
                        <li <?= $group; ?>><a href="?action=group">Group</a></li>
                        <li <?= $otherac; ?>><a href="?action=otherac">Other A/C</a></li>

                    </ul>
                </li>

                <li class="nav-dropdown rawmatmen" <?= $rawmaterial ?>>
                    <a href="#" title="Transaction"><i class="fa fa-industry"></i>Raw Material</a>
                    <ul class='nav-sub'>
                        <li <?= $rawmat; ?>><a href="?action=rawmatgrp">Raw Material Group</a></li>
                        <li <?= $rawmat; ?>><a href="?action=rawmat">Raw Material</a></li>
                        <li <?= $openstk; ?>><a href="?action=rawchrateop">Change of Rates</a></li>
                        <hr>
                        <li <?= $purchmat; ?>><a href="?action=purchmatgst">Purchase Raw Material</a></li>
                        <li <?= $debnoterawgst; ?>><a href="?action=debnoterawgst">Purchase Return </a></li>
                        <li <?= $salematmulti; ?>><a href="?action=salematgstmulti">Sale Raw Material</a></li>
                        <li <?= $crednoterawgst; ?>><a href="?action=crednoterawgst">Sale Return</a></li>
                        <li <?= $inwardraw; ?>><a href="?action=inwardraw">Inward Raw Material</a></li>
                        <li <?= $outwardraw; ?>><a href="?action=outwardraw">Outward Raw Material</a></li>
                        <li <?= $damagedraw; ?>><a href="?action=damagedraw">Damaged Raw Material</a></li>
                        <li <?= $jobgiven; ?>><a href="?action=jobgiven">Job Given</a></li>
                        <li <?= $einvoiceslgen; ?>><a href="?action=einvoicermgen">E-Invoice Generation</a></li> 

                        <hr>

                        <li <?= $purchrawgstreg; ?>><a href="?action=purchrawgstreg">Purchase Register</a></li>
                        <li <?= $debnoterawgstreg; ?>><a href="?action=debnoterawgstreg">Purchase Return Register</a></li>
                        <li <?= $slmatmultigstreg; ?>><a href="?action=slmatmultigstreg">Sale Register</a></li>
                        <li <?= $crednoterawgstreg; ?>><a href="?action=crednoterawgstreg">Sale Return Register</a></li>
                        <li <?= $rginwardraw; ?>><a href="?action=inwregraw">Inward Register</a></li>
                        <li <?= $rgoutwardraw; ?>><a href="?action=outregraw">Outward Register</a></li>
                        <li <?= $rgdamagedraw; ?>><a href="?action=damregraw">Damaged Register</a></li>
                        <li <?= $jobgivenreg; ?>><a href="?action=jobgivenreg">Job Given Register</a></li>

                        <hr>
                        <li <?= $rpstock; ?>><a href="?action=rawstock">Stock</a></li>
                        <li <?= $rpjobpend; ?>><a href="?action=jobpend">Pending Job</a></li>
                        <li <?= $rphist; ?>><a href="?action=rawinwout"> Inward/Outward History</a></li>
                        <li <?= $rpitemwise; ?>><a href="?action=rawmatwise">Raw Material Wise P/L</a></li>
                        <li <?= $rpitemwisesale; ?>><a href="?action=rawmatwisesale">Raw Material Wise Sale</a></li>
                        <li <?= $rpitemgrpwisesale; ?>><a href="?action=rawgrpwisesale">Raw Material Groupwise Sale</a></li>
                        <li <?= $rppartygrpwisesale; ?>><a href="?action=partygrpwisesale">Partywise Raw Material Group Sale</a></li>

                    </ul>
                </li>

                <li class="nav-dropdown prodmen" <?= $product ?>>
                    <a href="#" title="Transaction"><i class="fa fa-shopping-bag"></i>Product</a>
                    <ul class='nav-sub'>
                        <li <?= $itemgrp; ?>><a href="?action=itemgrp">Product Group</a></li>
                        <li <?= $item; ?>><a href="?action=item">Product</a></li>
                        <li <?= $openstk; ?>><a href="?action=chrateop">Change of Rates</a></li>

                        <hr>

                        <li <?= $purchase; ?>><a href="?action=purchase">Purchase</a></li>
                        <li <?= $sale; ?>><a href="?action=sale">Sale</a></li>
                        <!-- <li <?= $challanmulti; ?>><a href="?action=challanmulti">Challan GST</a></li> -->
                        <li <?= $reptaken; ?>><a href="?action=debnote">Purchase Return</a></li>
                        <li <?= $crednote; ?>><a href="?action=creditnotemulti">Sale Return/Credit Note - Goods Return</a></li>
                        <!--<li <?= $credoth; ?> ><a href="?action=credoth">Sale Return/Credit Note - Others</a></li>-->
                        <li <?= $inward; ?>><a href="?action=inwardgst">Inward</a></li>
                        <li <?= $outward; ?>><a href="?action=outwardgst">Outward</a></li>
                        <li <?= $damaged; ?>><a href="?action=damagedgst">Damaged</a></li>
                        <li <?= $jobreceived; ?>><a href="?action=jobreceived">Job Received</a></li>
                        <li <?= $einvoiceslgen; ?>><a href="?action=einvoicepdgen">E-Invoice Generation</a></li> 

                        <hr>

                        <li <?= $salereg; ?>><a href="?action=purchgstreg">Purchase Register</a></li>
                        <li <?= $salereg; ?>><a href="?action=salereg">Sale Register</a></li>
                        <li <?= $repaireg; ?>><a href="?action=debnotereg">Purchase Return Register</a></li>
                        <li <?= $crdntreg; ?>><a href="?action=crdntreg">Sale Return / Credit Note Register</a></li>
                        <!--<li <?= $rgcredoth; ?> ><a href="?action=crdothreg">Sale Return / Credit Note Others Register</a></li>-->

                        <li <?= $rginward; ?>><a href="?action=inwreg">Inward Register</a></li>
                        <li <?= $rgdamaged; ?>><a href="?action=damreg">Damaged Register</a></li>
                        <li <?= $jobrecdreg; ?>><a href="?action=jobrecdreg">Job Received Register</a></li>
                        <hr>
                        <li <?= $rpstock; ?>><a href="?action=stock">Stock</a></li>
                        <li <?= $rphist; ?>><a href="?action=inwout"> Inward/Outward History</a></li>
                        <li <?= $rpitemwise; ?>><a href="?action=itemwise">Itemwise P/L</a></li>
                        <li <?= $rpitemwisesale; ?>><a href="?action=itemwisesale">Itemwise Sale</a></li>
                        <li <?= $rpitemgrpwisesale; ?>><a href="?action=itemgrpwisesale">Item Groupwise Sale</a></li>
                        <li <?= $rppartygrpwisesale; ?>><a href="?action=partygrpwisesale">Partywise Item Group Sale</a></li>
                    </ul>
                </li>

                <li class="nav-dropdown">
                    <a href='#'><i class="fa fa-usd"></i>Accounts</a>
                    <ul class='nav-sub'>


                        <li <?= $mbank; ?> class="nav-dropdown">
                            <a href="#">Bank<i></i></a>
                            <ul class="nav-sub">
                                <li <?= $bankrecp; ?>><a href="?action=bankrecp">Receipt</a></li>
                                <li <?= $bankpay; ?>><a href="?action=bankpay">Payment</a></li>
                            </ul>
                        </li>
                        <li <?= $mcash; ?> class="nav-dropdown">
                            <a href="#">Cash<i></i></a>
                            <ul class="nav-sub">
                                <li <?= $cashrecp; ?>><a href="?action=cashrecp">Receipt</a></li>
                                <li <?= $cashpay; ?>><a href="?action=cashpay">Payment</a></li>
                            </ul>
                        </li>
                        <li <?= $contra; ?>><a href="?action=contra">Contra</a></li>
                        <li <?= $journal; ?>><a href="?action=journal">Journal</a></li>
                        <li <?= $mdiscount; ?> class="nav-dropdown">
                            <a href="#">Discount<i></i></a>
                            <ul class="nav-sub">
                                <li <?= $discgvn; ?>><a href="?action=discgvn">Given</a></li>
                                <li <?= $discrecd; ?>><a href="?action=discrecd">Received</a></li>
                            </ul>
                        </li>
                        <li <?= $bankrecon; ?>><a href="?action=bankrecon">Bank Reconcilation</a></li>
                        <hr>

                        <li <?= $rpledger; ?>><a href="?action=ledger">Ledger</a></li>
                        <li <?= $rpledger; ?>><a href="?action=receivable">O/s Receivable</a></li>
                        <li <?= $rpledger; ?>><a href="?action=payable">O/s Payable</a></li>
                        <li <?= $rpleadparty; ?>><a href="?action=leadparty">Leading Parties</a></li>
                        <li <?= $rpdailyreport; ?>><a href="?action=dailyreport">Daily Report</a></li>
                        <li <?= $dailycashrep; ?>><a href="?action=dailycashrp">Daily Cash</a></li>
                        <!--<li <?= $rpdailysalereport; ?>><a href="?action=dailysalereport">Daily Sale Report</a></li>-->
                        <li <?= $rpbankbook; ?>><a href="?action=bankbook">Bank Book</a></li>
                        <li <?= $rpcashbook; ?>><a href="?action=cashbook">Cash Book</a></li>
                        <li <?= $rpjvrep; ?>><a href="?action=jvbook">Journal Book</a></li>
                        <li <?= $bankrecorep; ?>><a href="?action=bankrecorep">Reconcilation Report</a></li>


                    </ul>
                </li>
                <li class="nav-dropdown">
                    <a href='#'><i class="fa fa-line-chart"></i> GST Reports</a>
                    <ul class='nav-sub'>
                        <li <?= $b2brep; ?>><a href="?action=gstr1_1">B2B For Product</a></li>
                        <li <?= $b2brep_R; ?>><a href="?action=gstr1_1_R">B2B For Raw Material</a></li>
                        <li <?= $gstcreddebrep; ?>><a href="?action=gstr1_4P">Credit Debit Note Product</a></li>
                        <li <?= $gstcreddebrep; ?>><a href="?action=gstr1_4">Credit Debit Note Raw Material</a></li>
                        <li <?= $gstcreddeburdrep; ?>><a href="?action=gstr1_5">Credit Debit Note for URD</a></li>
                        <li <?= $gsthsnrep; ?>><a href="?action=gstr1_10P">HSN Summary Product</a></li>
                        <li <?= $gsthsnrep; ?>><a href="?action=gstr1_10">HSN Summary Raw Material</a></li>
                        <!-- <li <?= $b2blgrep; ?>><a href="?action=gstr1_2">B2C Large</a></li>
                        <li <?= $b2bsmrep; ?>><a href="?action=gstr1_3">B2C Small</a></li>
                        <li <?= $gstexprep; ?>><a href="?action=gstr1_6">Export</a></li>
                        <li <?= $gstadvrecdrep; ?>><a href="?action=gstr1_7">Advanced Receipt</a></li>
                        <li <?= $gstadvadjrep; ?>><a href="?action=gstr1_8">Advanced Adjusted</a></li>
                        <li <?= $gstnilrep; ?>><a href="?action=gstr1_8">Nil / Exempted / Non GST</a></li> -->
                        <!-- <li <?= $gstdocrep; ?>><a href="?action=gstr1_11">Document Summary</a></li>
                        <hr>
                        <li <?= $gstr3B; ?>><a href="?action=gstr3B">GSTR - B</a></li>
                        <li <?= $pugstrep; ?>><a href="?action=pugstrep">GST Purchase</a></li>
                        <li <?= $slgstrep; ?>><a href="?action=slgstrep">GST Sale</a></li>
                        <hr>
                        <li <?= $gstsumrep; ?>><a href="?action=gstsumrep">GST Summary</a></li> -->
                    </ul>
                </li>

                <li class="nav-dropdown">
                    <a href='#'><i class="fa fa-archive"></i>Finalization</a>
                    <ul class='nav-sub'>
                        <li <?= $fnbalance; ?>><a href="?action=trbal">Trial Balance</a></li>
                        <li <?= $fnprofit; ?>><a href="?action=profit">Profit / Loss</a></li>
                        <li <?= $fnprofshar; ?>><a href="?action=profshar">Profit Sharing</a></li>
                        <li <?= $fnbalsheet; ?>><a href="?action=balsheet">Balance Sheet</a></li>
                    </ul>
                </li>
            </ul>
        </nav>
        <!--sidebar left end-->
        <!--main content start-->
        <section class="main-content-wrapper">
            <section id="main-content">
                <div class="col-md-12 pad">
                    <iframe id='frame1' src="<?php echo $src; ?>" name="frame1" style="width: 100%; height:5000px;" frameBorder="0" scrolling="no"></iframe>
                </div>
            </section>
        </section>
    </div>
    <!--main content end-->
    <?php include("includes/linksfoot.php") ?>
</body>

</html>