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

$formname = 'User Creation';
$maindb = 'passmain';
$trandb = 'usercomp';
$printfile = "";
$file = 'user.php';
$trandbexist = 0;
$grid = '';
$keyfld = "code";

$admin = $_SESSION["admin_" . $dbname];
$username = $_SESSION["username_" . $dbname];

include("includes/vouchno_generate.php");
include("includes/prev&next.php");

if (isset($_POST["submit"])) {
    $a = 1;
    $user = $_POST["user"];
    $password = $_POST["password"];
    $usertype = $_POST["usertype"];
    $series = $_POST["series"];
    $count = $_POST["items"];
    ################## MASTERS ##################
    $customer = $_POST["customer"];
    $supplier = $_POST["supplier"];
    $state = $_POST["state"];
    $area = $_POST["area"];
    $chcustdtl = $_POST["chcustdtl"];
    $openbal = $_POST["openbal"];
    $transport = $_POST["transport"];
    $courier = $_POST["courier"];
    $staff = $_POST["staff"];
    $narration = $_POST["narration"];
    $unit = $_POST["unit"];
    $godown = $_POST["godown"];
    $prevoutstand = $_POST["prevoutstand"];
    $gsttype = $_POST["gsttype"];
    $priceloc = $_POST["priceloc"];
    $feloc = $_POST["feloc"];

    ################## TRADING INVENTORY ##################

    $colour = $_POST["colour"];
    $prodgrp = $_POST["prodgrp"];
    $product = $_POST["product"];
    $changeofrates = $_POST["changeofrates"];
    $openstock = $_POST["openstock"];
    $tisale = $_POST["tisale"];
    $onlsale = $_POST["onlsale"];
    $saleoth = $_POST["saleoth"];
    $ticrednote = $_POST["ticrednote"];
    $ticredoth = $_POST["ticredoth"];

    $tiinward = $_POST["tiinward"];
    $tidamage = $_POST["tidamage"];
    $transfer = $_POST["transfer"];
    $tds = $_POST["tds"];
    $multiinvoice = $_POST["multiinvoice"];
    $dismantle = $_POST["dismantle"];
    $tisalereg = $_POST["tisalereg"];
    $profinvoexp = $_POST["profinvoexp"];
    $sale_tiprof = $_POST["sale_tiprof"];
    $sale_deprof = $_POST["sale_deprof"];
    $profreg = $_POST["profreg"];
    $ticredreg = $_POST["ticredreg"];
    $tiitemwise = $_POST["tiitemwise"];
    $tiitemgrpwise = $_POST["tiitemgrpwise"];
    $tipitemreg = $_POST["tipitemreg"];
    $tiipartyreg = $_POST["tiipartyreg"];
    $ticredothreg = $_POST["ticredothreg"];
    $tisalitemwise = $_POST["tisalitemwise"];
    $ticreditreg = $_POST["ticreditreg"];
    $tiinwdreg = $_POST["tiinwdreg"];
    $tidamreg = $_POST["tidamreg"];
    $titranreg = $_POST["titranreg"];
    $tidisreg = $_POST["tidisreg"];
    $inwardexp = $_POST["inwardexp"];
    $deemsale = $_POST["deemsale"];
    $deeminward = $_POST["deeminward"];
    $deeminwdreg = $_POST["deeminwdreg"];

    ################## EXPORT ##################

    $exsale = $_POST["exsale"];
    $exinward = $_POST["exinward"];
    $proforma = $_POST["proforma"];
    $exinvoice = $_POST["exinvoice"];
    $expacklist = $_POST["expacklist"];
    $certoforg = $_POST["certoforg"];
    $gsp = $_POST["gsp"];
    $excourier = $_POST["excourier"];
    $exsalereg = $_POST["exsalereg"];
    $exinwdreg = $_POST["exinwdreg"];
    $proformareg = $_POST["proformareg"];
    $exinvoicereg = $_POST["exinvoicereg"];
    $expackreg = $_POST["expackreg"];
    $excertiorg = $_POST["excertiorg"];
    $exgsp = $_POST["exgsp"];
    $newexcertiorg = $_POST["newexcertiorg"];
    $excourreg = $_POST["excourreg"];
    $expinward = $_POST["expinward"];

    ################## MANUFACTURING INVENTORY##################

    $itemgrp = $_POST["itemgrp"];
    $item = $_POST["item"];
    $packgrp = $_POST["packgrp"];
    $packing = $_POST["packing"];
    $finprod = $_POST["finprod"];
    $changerate_item = $_POST["changerate_item"];
    $openstock_item = $_POST["openstock_item"];
    $openpack = $_POST["openpack"];
    $purchaser_exp = $_POST["purchaser_exp"];
    $purchaser_mi = $_POST["purchaser_mi"];
    $purchasep_mi = $_POST["purchasep_mi"];
    $purcoth_mi = $_POST["purcoth_mi"];
    $debnote_mi = $_POST["debnote_mi"];
    $debnoter_mi = $_POST["debnoter_mi"];
    $debnotep_mi = $_POST["debnotep_mi"];
    $production = $_POST["production"];
    $damrawmat = $_POST["damrawmat"];
    $midelv = $_POST["midelv"];
    $inward_mi = $_POST["inward_mi"];
    $mipurchord = $_POST["mipurchord"];
    $purrawreg = $_POST["purrawreg"];
    $purordreg = $_POST["purordreg"];
    $purothreg = $_POST["purothreg"];
    $mirawmat = $_POST["mirawmat"];
    $purretreg = $_POST["purretreg"];
    $prodreg = $_POST["prodreg"];
    $midamreg = $_POST["midamreg"];
    $midelvreg = $_POST["midelvreg"];

    ################## ACCOUNTS ##################

    $group = $_POST["group"];
    $other = $_POST["other"];
    $bank = $_POST["bank"];
    $cash = $_POST["cash"];
    $expense = $_POST["expense"];
    $gsttype = $_POST["gsttype"];
    $drawbank = $_POST["drawbank"];
    $bankrecp = $_POST["bankrecp"];
    $bankpay = $_POST["bankpay"];
    $cashrecp = $_POST["cashrecp"];
    $cashpay = $_POST["cashpay"];
    $journal = $_POST["journal"];
    $contra = $_POST["contra"];
    $contraent = $_POST["contraent"];

    ################## MIS REPORTS ##################

    $purchsumm = $_POST["purchsumm"];
    $salesum = $_POST["salesum"];
    $dailysalsumm = $_POST["dailysalsumm"];
    $partywisesale = $_POST["partywisesale"];
    $stkprod = $_POST["stkprod"];
    $stkpack = $_POST["stkpack"];
    $tdsrep = $_POST["tdsrep"];
    $chqrep = $_POST["chqrep"];
    $amtrep = $_POST["amtrep"];
    $stkrawmat = $_POST["stkrawmat"];
    $itemsalereg = $_POST["itemsalereg"];
    $stkfingood = $_POST["stkfingood"];
    $ledger = $_POST["ledger"];
    $bankbook = $_POST["bankbook"];
    $cashbook = $_POST["cashbook"];
    $jvbook = $_POST["jvbook"];
    $contreg = $_POST["contreg"];
    $bankrecorep = $_POST["bankrecorep"];
    $receivablerep = $_POST["receivablerep"];
    $payablerep = $_POST["payablerep"];
    $bankrecon = $_POST["bankrecon"];
    $prodhist = $_POST["prodhist"];

    ################## GST RETURNS ##################

    $gstr1_1 = $_POST["gstr1_1"];
    $gstr1_2 = $_POST["gstr1_2"];
    $gstr1_3 = $_POST["gstr1_3"];
    $gstr1_4 = $_POST["gstr1_4"];
    $gstr1_5 = $_POST["gstr1_5"];
    $gstr1_6 = $_POST["gstr1_6"];
    $gstr1_7 = $_POST["gstr1_7"];
    $gstr1_8 = $_POST["gstr1_8"];
    $gstr1_9 = $_POST["gstr1_9"];
    $gstr1_10 = $_POST["gstr1_10"];
    $gstr1_11 = $_POST["gstr1_11"];

    $gstr2_b2b = $_POST["gstr2_b2b"];
    $gstr2_b2bur = $_POST["gstr2_b2bur"];
    $gstr2_cdnr = $_POST["gstr2_cdnr"];
    $gstr2_cdnur = $_POST["gstr2_cdnur"];
    $gstr2_hsn = $_POST["gstr2_hsn"];
    $gstr3b = $_POST["gstr3b"];
    $inougst = $_POST["inougst"];
    $jvgst = $_POST["jvgst"];

    ################## FINALISATION ##################
    $trbal = $_POST["trbal"];
    $profit = $_POST["profit"];
    $profshar = $_POST["profshar"];
    $balsheet = $_POST["balsheet"];

    ################## TOOLS ##################
    $tlcompany = $_POST["tlcompany"];
    $tlbackup = $_POST["tlbackup"];
    $tlprofile = $_POST["tlprofile"];
    //    $dstock = $_POST["dstock"];


    if (isset($_POST["user"])) {
        $result = mysqli_query($conn, "SELECT * FROM `$maindb` WHERE `user`= '$user' AND code != '$qvouch'") or die(mysqli_error($conn));
        if (mysqli_num_rows($result) > 0) {
            $a = 0;
            browse("Name Already Exist");
            header("refresh: 1; $file?code=$qvouch&mode=last");
        }
    }

    if ($a == 1) {
        if ($addflag == 1) {
            $gen1 = mysqli_query($conn, "SELECT MAX($keyfld) AS maxcode FROM `$maindb` LIMIT 0,1 ") or die(mysqli_error($conn));

            if (mysqli_num_rows($gen1) > 0) {
                $vvouch = mysqli_fetch_assoc($gen1);
                $qvouch = $vvouch["maxcode"] + 1;
            } else {
                $qvouch = '1';
            }
            $mvouch = $qvouch;
        }

        #################################TRAN PART #################################

        mysqli_query($conn, "DELETE FROM `$trandb` WHERE `username`='$qvouch'") or die(mysqli_error($conn));

        for ($i = 0; $i < $count; $i++) {
            //            $cono = $_POST["cono_$i"];
            $finyear = $_POST["finyear_$i"];
            $yearname = $_POST["yearname_$i"];
            $startdate = $_POST["startdate_$i"];
            $lastdate = $_POST["lastdate_$i"];

            if (!empty($finyear)) {
                mysqli_query($conn, "INSERT INTO `$trandb`(`username`,`cono`, `finyear`, `yearname`, `startdate`, `lastdate`) 
                    VALUES ('$qvouch', '1', '$finyear', '$yearname', '$startdate', '$lastdate')") or die(mysqli_error($conn));
            }
        }
        ############################## MAIN  ######################################################

        if ($addflag == 1) {

            $usecode = mysqli_query($conn, "SELECT code FROM `passmain` WHERE user='$username'") or die(mysqli_error($conn));
            $getuser = mysqli_fetch_object($usecode);
            $code = $getuser->code;

            mysqli_query($conn, "INSERT INTO `$maindb`(code, `user`, `password`, `usertype`, `customer`, `supplier`, `state`, `area`, `chcustdtl`, `openbal`,
                                               `transport`, `courier`, `staff`, `narration`, `unit`, `godown`, `prevbill`, `colour`, `prodgrp`, `product`,
                                               `changeofrates`, `openstock`, `tisale`, onlsale, `saleoth`,`ticrednote`, `ticredoth`, `tiinward`, `tidamage`, `transfer`, `tds`,
                                               `multiinvoice`,`dismantle`,`tisalereg`, profreg, profinvoexp,sale_tiprof, sale_deprof, `ticredreg`, `tiitemwise`, `tiitemgrpwise`,`tipitemreg`,`tiipartyreg`,`ticredothreg`,
                                               `tisalitemwise`,`ticreditreg`, `tiinwdreg`, `tidamreg`, `titranreg`, `tidisreg`,`exsale`, `exinward`, `proforma`, `exinvoice`, 
                                               `expacklist`, `certoforg`, `gsp`, `excourier`, `exsalereg`, `exinwdreg`,`proformareg`, `exinvoicereg`, `expackreg`, `excertiorg`,
                                               `exgsp`, `newexcertiorg`, `excourreg`, `itemgrp`,`item`, `changerate_item`, `openstock_item`, `purchaser_mi`, `purchaser_exp`,   `purchasep_mi`, 
                                               `purcoth_mi`,`debnote_mi`, `debnoter_mi`, `debnotep_mi`,`production`,`damrawmat`, `midelv`,inward_mi, `purchord`, `purrawreg`, `purordreg`,
                                               `purothreg`, `mirawmat`, `purretreg`, `prodreg`, `midamreg`, `midelvreg`, `group`, `other`, `bank`, `cash`, `expense`, `gsttype`,priceloc, feloc,
                                               `drawbank`,`deeminwdreg`, `bankrecp`, `bankpay`, `cashrecp`, `cashpay`, `journal`, `contra`,  `contraent`,`itemsalereg`, `stkrawmat`, 
                                               `stkfingood`, `purchsumm`,`salesum`,`dailysalsumm`,`partywisesale`,`stkprod`,`stkpack`,`tdsrep`,`chqrep`,`amtrep`,`ledger`, 
                                               `bankbook`, `cashbook`, `jvbook`, `contreg`, `bankrecorep`, `receivablerep`, `payablerep`, `bankrecon`,`gstr1_1`, `gstr1_2`, `gstr1_3`, `gstr1_4`, `gstr1_5`, `gstr1_6`, `gstr1_9`, 
                                               `gstr1_10`, `gstr1_11`, `gstr2_b2b`,`gstr2_b2bur`,`gstr2_cdnr`,`gstr2_cdnur`,`gstr2_hsn`,`gstr3b`, `trbal`, `profit`,`profshar`, `balsheet`, `packing`, `packgrp`, `finprod`,`openpack`,
                                               `deemsale`, `inwardexp`, `deeminward`, `expinward`, `prodhist`, `inougst`, `jvgst`)
                                        VALUES($qvouch, '$user', '$password', '$usertype', '$customer', '$supplier', '$state', '$area', '$chcustdtl', '$openbal',
                                                '$transport', '$courier', '$staff', '$narration', '$unit', '$godown', '$prevoutstand', '$colour', '$prodgrp', '$product',
                                                '$changeofrates', '$openstock', '$tisale', '$onlsale', '$saleoth', '$ticrednote', '$ticredoth', '$tiinward', '$tidamage', '$transfer', '$tds', 
                                                '$multiinvoice', '$dismantle', '$tisalereg', '$profreg', '$profinvoexp','$sale_tiprof', '$sale_deprof', '$ticredreg', '$tiitemwise', '$tiitemgrpwise', '$tipitemreg', '$tiipartyreg',
                                                '$ticredothreg', '$tisalitemwise', '$ticreditreg', '$tiinwdreg', '$tidamreg', '$titranreg', '$tidisreg',
                                                '$exsale', '$exinward', '$proforma', '$exinvoice', '$expacklist', '$certoforg', '$gsp', '$excourier', '$exsalereg', '$exinwdreg',
                                                '$proformareg', '$exinvoicereg', '$expackreg', '$excertiorg', '$exgsp', '$newexcertiorg', '$excourreg', '$itemgrp',
                                                '$item', '$changerate_item', '$openstock_item', '$purchaser_mi', '$purchaser_exp', '$purchasep_mi', '$purcoth_mi', '$debnote_mi', '$debnoter_mi',
                                                '$debnotep_mi', '$production', '$damrawmat', '$midelv', '$inward_mi', '$mipurchord', '$purrawreg', '$purordreg', '$purothreg', '$mirawmat',
                                                '$purretreg', '$prodreg', '$midamreg', '$midelvreg', '$group', '$other', '$bank', '$cash', '$expense', '$gsttype', '$priceloc', '$feloc', '$drawbank',
                                                '$deeminwdreg', '$bankrecp', '$bankpay', '$cashrecp', '$cashpay', '$journal', '$contra', '$contraent','$itemsalereg', '$stkrawmat',
                                                '$stkfingood', '$purchsumm', '$salesum', '$dailysalsumm', '$partywisesale', '$stkprod', '$stkpack', '$tdsrep', '$chqrep', '$amtrep',
                                                '$ledger', '$bankbook', '$cashbook', '$jvbook', '$contreg', '$bankrecorep', '$receivablerep','$payablerep', '$bankrecon','$gstr1_1', '$gstr1_2', '$gstr1_3', '$gstr1_4', '$gstr1_5', '$gstr1_6',
                                                '$gstr1_9', '$gstr1_10', '$gstr1_11', '$gstr2_b2b', '$gstr2_b2bur','$gstr2_cdnr','$gstr2_cdnur','$gstr2_hsn', '$gstr3b', '$trbal', '$profit', '$profshar', '$balsheet', '$packing', '$packgrp', '$finprod',
                                                '$openpack', '$deemsale', '$inwardexp', '$deeminward', '$expinward', '$prodhist', '$inougst', '$jvgst')") or die(mysqli_error($conn));
            insmess();
            $mvouch = $qvouch;
            header("refresh: 1;
            $file?$keyfld = $mvouch&mode = edit");
        } else {
            $mvouch = $qvouch;

            $usecode = mysqli_query($conn, "SELECT code FROM `passmain` WHERE user = '$username'") or die(mysqli_error($conn));
            $getuser = mysqli_fetch_object($usecode);
            $code = $getuser->code;

            mysqli_query($conn, "UPDATE `$maindb` SET `user` = '$user', `password` = '$password', `usertype` = '$usertype', `customer` = '$customer', `supplier` = '$supplier', `state` = '$state',
            `area` = '$area', `chcustdtl` = '$chcustdtl', `openbal` = '$openbal', `transport` = '$transport', `courier` = '$courier', `staff` = '$staff',
            `narration` = '$narration', `unit` = '$unit', `godown` = '$godown', `prevbill` = '$prevoutstand', `colour` = '$colour', `prodgrp` = '$prodgrp',
            `product` = '$product', `changeofrates` = '$changeofrates', `openstock` = '$openstock', `tisale` = '$tisale', onlsale='$onlsale', `saleoth` = '$saleoth',
            `ticrednote` = '$ticrednote', `ticredoth` = '$ticredoth', `tiinward` = '$tiinward', `tidamage` = '$tidamage', `transfer` = '$transfer',
            `tds` = '$tds', `dismantle` = '$dismantle', `deemsale` = '$deemsale', `inwardexp` = '$inwardexp', `deeminward` = '$deeminward',
            `tisalereg` = '$tisalereg', profreg='$profreg', profinvoexp='$profinvoexp',sale_tiprof='$sale_tiprof', sale_deprof='$sale_deprof', `ticredreg` = '$ticredreg', `tiitemwise` = '$tiitemwise', `tiitemgrpwise` = '$tiitemgrpwise', `tipitemreg` = '$tipitemreg',
            `tiipartyreg` = '$tiipartyreg', `ticredothreg` = '$ticredothreg', `tisalitemwise` = '$tisalitemwise', `ticreditreg` = '$ticreditreg',
            `tiinwdreg` = '$tiinwdreg', `tidamreg` = '$tidamreg', `titranreg` = '$titranreg', `tidisreg` = '$tidisreg', `exsale` = '$exsale',
            `exinward` = '$exinward', `proforma` = '$proforma', `exinvoice` = '$exinvoice', `expacklist` = '$expacklist', `certoforg` = '$certoforg',
            `gsp` = '$gsp', `excourier` = '$excourier', `exsalereg` = '$exsalereg', `exinwdreg` = '$exinwdreg', `proformareg` = '$proformareg',
            `exinvoicereg` = '$exinvoicereg', `expackreg` = '$expackreg', `excertiorg` = '$excertiorg', `exgsp` = '$exgsp', `newexcertiorg` = '$newexcertiorg',
            `excourreg` = '$excourreg', `itemgrp` = '$itemgrp', `item` = '$item', `changerate_item` = '$changerate_item', `openstock_item` = '$openstock_item',
            `purchaser_mi` = '$purchaser_mi', `purchaser_exp` = '$purchaser_exp', `purchasep_mi` = '$purchasep_mi', `debnote_mi` = '$debnote_mi', `debnoter_mi` = '$debnoter_mi',
            `debnotep_mi` = '$debnotep_mi', `production` = '$production', `damrawmat` = '$damrawmat', `midelv` = '$midelv', `purchord` = '$mipurchord',
            `purrawreg` = '$purrawreg', `purordreg` = '$purordreg', `purothreg` = '$purothreg', `mirawmat` = '$mirawmat', `purretreg` = '$purretreg',
            `prodreg` = '$prodreg', `midamreg` = '$midamreg', `midelvreg` = '$midelvreg', `group` = '$group', `other` = '$other', `bank` = '$bank',
            `cash` = '$cash', `expense` = '$expense', `gsttype` = '$gsttype', priceloc='$priceloc', feloc ='$feloc', `drawbank` = '$drawbank', `deeminwdreg` = '$deeminwdreg',
            `drawbank` = '$drawbank', `bankrecp` = '$bankrecp', `bankpay` = '$bankpay', `cashrecp` = '$cashrecp', `cashpay` = '$cashpay',
            `journal` = '$journal', `contra` = '$contra', `contraent`='$contraent',`itemsalereg` = '$itemsalereg', `stkrawmat` = '$stkrawmat', `stkfingood` = '$stkfingood',
            `purchsumm` = '$purchsumm', `salesum` = '$salesum', `dailysalsumm` = '$dailysalsumm', `partywisesale` = '$partywisesale', `stkprod` = '$stkprod',
            `stkpack` = '$stkpack', `ledger` = '$ledger', `bankbook` = '$bankbook', `cashbook` = '$cashbook', `jvbook` = '$jvbook', `contreg` = '$contreg',
            `gstr1_1` = '$gstr1_1', `gstr1_2` = '$gstr1_2', `gstr1_3` = '$gstr1_3', `gstr1_4` = '$gstr1_4', `gstr1_5` = '$gstr1_5', `gstr1_6` = '$gstr1_6',
            `gstr1_9` = '$gstr1_9', `gstr1_10` = '$gstr1_10', `gstr1_11` = '$gstr1_11', `gstr3b` = '$gstr3b', `trbal` = '$trbal', `profit` = '$profit',
            `profshar` = '$profshar', `balsheet` = '$balsheet', `packing` = '$packing', `packgrp` = '$packgrp', `finprod` = '$finprod', `purcoth_mi` = '$purcoth_mi',
            `openpack` = '$openpack', `expinward` = '$expinward', prodhist = '$prodhist', `multiinvoice` = '$multiinvoice', `tdsrep` = '$tdsrep',
            `chqrep` = '$chqrep', `amtrep` = '$amtrep', `bankrecorep`='$bankrecorep', `receivablerep`='$receivablerep', `payablerep`='$payablerep',`bankrecon`='$bankrecon',
            `gstr2_b2b`='$gstr2_b2b',`gstr2_b2bur`='$gstr2_b2bur',`gstr2_cdnr`='$gstr2_cdnr',`gstr2_cdnur`='$gstr2_cdnur', `gstr2_hsn`='$gstr2_hsn',
            `inward_mi`='$inward_mi',  `inougst`='$inougst', `jvgst`='$jvgst' WHERE code = '$mvouch'") or die(mysqli_error($conn));
            updmess();
            header("refresh: 1;
            $file?$keyfld = $mvouch&mode = edit");
        }
    }
}

if ($addflag != 1) {

    $getvouch = '';
    if ($addflag == 0) {
        $getvouch = $_GET[$keyfld];
    } else {
        $getvouch = $qvouch;
    }

    $result = mysqli_query($conn, "SELECT * FROM `$maindb` WHERE $keyfld = '$getvouch'") or die(mysqli_error($conn));
    $get = mysqli_fetch_array($result);
}

$senable = "";
$cenable = "";

/* DELETE */
if (isset($_GET["delete"])) {
    delete($zdb, "$maindb", "$keyfld", $_GET[$keyfld], "$file?mode = last");
}
?>
<?php include("includes/linkshead.php"); ?>
<style>
    input[type=checkbox] {
        width: 20px;
        height: 20px;
    }
</style>
<script src="MyScript/user.js" type="text/javascript"></script>

<body>
    <!-- Default box -->
    <form action='' method='POST'>
        <!-- Default box -->
        <div class="">
            <div class="col-lg-6">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title"><?php echo $formname; ?></h3>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <label class="col-sm-3 control-label marg">User Name</label>
                            <div class="col-sm-6">
                                <input type="text" class="form-control form" name="user" placeholder="User Name" autocomplete="off" value='<? echo ($addflag != 1) ? $get[user] : ''; ?>' required="" autofocus>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-3 control-label marg">Password</label>
                            <div class="col-sm-6">
                                <input type="password" class="form-control form" name="password" id="password" autocomplete="off" placeholder="Password" value='<? echo ($addflag != 1) ? $get[password] : ''; ?>' required="">
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-3 control-label marg">Confirm Pass</label>
                            <div class="col-sm-6">
                                <input type="password" name="confpass" id="confpass" class="form-control form" placeholder="Confirm Password" required="" value='<? echo ($addflag != 1) ? $get[password] : ''; ?>'>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <p id="alert"></p>
                            </div>
                        </div>
                        <div class="row">
                            <label class="col-sm-3 control-label marg">User Type</label>
                            <div class="col-sm-6">

                                <select class='form-control select2 form' name="usertype" id="usertype" required>
                                    <?php
                                    if ($addflag != 1) {
                                        $usertype = "";
                                        if ($get['usertype'] == 1) {
                                            $ucode = "1";
                                            $usertype = "Supervisor";
                                        }
                                        if ($get['usertype'] == 2) {
                                            $ucode = "2";
                                            $usertype = "Admin";
                                        }
                                        if ($get['usertype'] == 3) {
                                            $ucode = "3";
                                            $usertype = "Staff";
                                        }
                                        echo "<option value='$ucode'>$usertype</option>";
                                    }
                                    ?>
                                    <option value="1">Supervisor</option>
                                    <option value="2">Admin</option>
                                    <option value="3">Staff</option>
                                </select>
                            </div>
                        </div>
                        <div class="nav-tabs-custom">
                            <ul class="nav nav-tabs">
                                <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="true">Masters</a></li>
                                <li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">Trading Inventory</a></li>
                                <li class=""><a href="#tab_3" data-toggle="tab" aria-expanded="false">Export</a></li>
                                <li class=""><a href="#tab_4" data-toggle="tab" aria-expanded="false">Manufacturing Inventory</a></li>
                                <li class=""><a href="#tab_5" data-toggle="tab" aria-expanded="false">Accounts</a></li>
                                <li class=""><a href="#tab_6" data-toggle="tab" aria-expanded="false">MIS Reports</a></li>
                                <li class=""><a href="#tab_7" data-toggle="tab" aria-expanded="false">GST Returns</a></li>
                                <li class=""><a href="#tab_8" data-toggle="tab" aria-expanded="false">Finalization</a></li>
                            </ul>
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab_1">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Smasters" value="1">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Customer</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="customer" name="customer" value="1" <?
                                            if ($get[customer] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Supplier</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="supplier" name="supplier" value="1" <?
                                            if ($get[supplier] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">State</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="state" name="state" value="1" <?
                                            if ($get[state] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Area</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="area" name="area" value="1" <?
                                            if ($get["area"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Change of Customer Details</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="chcustdtl" name="chcustdtl" value="1" <?
                                            if ($get[chcustdtl] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Opening Balance</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="openbal" name="openbal" value="1" <?
                                            if ($get[openbal] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Transporter</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="transport" name="transport" value="1" <?
                                            if ($get[transport] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Courier</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="courier" name="courier" value="1" <?
                                            if ($get[courier] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                    </div>
                                    <div class="row">
                                        <!--                                        <label class="col-sm-4 control-label marg">Staff</label>
                                                                                <div class="col-sm-2" style="margin-top:6px">
                                                                                    <input type="checkbox" class="form  masters" id="staff" name="staff" value="1" <?
                                        if ($get["staff"] == 1) {
                                            echo "checked";
                                        }
                                        ?>>
                                                                                </div>-->
                                        <label class="col-sm-4 control-label marg">Narration</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="narration" name="narration" value="1" <?
                                            if ($get[narration] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Unit</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="unit" name="unit" value="1" <?
                                            if ($get['unit'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Godown</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="godown" name="godown" value="1" <?
                                            if ($get["godown"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Previous Outstanding</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="prevoutstand" name="prevoutstand" value="1" <?
                                            if ($get["prevbill"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Gst Type</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="gsttype" name="gsttype" value="1" <?
                                            if ($get["gsttype"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Local Price List</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="priceloc" name="priceloc" value="1" <?
                                            if ($get["priceloc"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Foreign Price List</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  masters" id="feloc" name="feloc" value="1" <?
                                            if ($get["feloc"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                </div><!-- /.tab-pane -->
                                <div class="tab-pane" id="tab_2">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Stradinginventory" value="1">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Colour</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="colour" name="colour" value="1" <?
                                            if ($get['colour'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Product Group</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="prodgrp" name="prodgrp" value="1" <?
                                            if ($get['prodgrp'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Product</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="product" name="product" value="1" <?
                                            if ($get["product"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Change of Rate</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="changeofrates" name="changeofrates" value="1" <?
                                            if ($get["changeofrates"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Opening Stock</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="openstock" name="openstock" value="1" <?
                                            if ($get["openstock"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <hr>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Local Sale</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="tisale" name="tisale" value="1" <?
                                            if ($get['tisale'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Deemed Sale</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="deemsale" name="deemsale" value="1" <?
                                            if ($get['deemsale'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>


                                    </div>                                                                      
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Proforma Local</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="sale_tiprof" name="sale_tiprof" value="1" <?
                                            if ($get['sale_tiprof'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Proforma Deemed</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="sale_deprof" name="sale_deprof" value="1" <?
                                            if ($get['sale_tiprof'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>                                                                      
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Proforma Export</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="profinvoexp" name="profinvoexp" value="1" <?
                                            if ($get['profinvoexp'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Proforma Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="profreg" name="profreg" value="1" <?
                                            if ($get['profreg'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>                                                                      
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Sale Other</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="saleoth" name="saleoth" value="1" <?
                                            if ($get['saleoth'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Credit Note-Goods Return</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="ticrednote" name="ticrednote" value="1" <?
                                            if ($get["ticrednote"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Credit Note-Others</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="ticredoth" name="ticredoth" value="1" <?
                                            if ($get["ticredoth"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Inward</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="tiinward" name="tiinward" value="1" <?
                                            if ($get['tiinward'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>

                                    <div class="row">

                                        <label class="col-sm-4 control-label marg">Damage</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="tidamage" name="tidamage" value="1" <?
                                            if ($get["tidamage"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Transfer</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="transfer" name="transfer" value="1" <?
                                            if ($get["transfer"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Online Sale</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="onlsale" name="onlsale" value="1" <?
                                            if ($get['onlsale'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Multi Invoice</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="multiinvoice" name="multiinvoice" value="1" <?
                                            if ($get["multiinvoice"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <hr>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Normal Sale Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="tisalereg" name="tisalereg" value="1" <?
                                            if ($get["tisalereg"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Credit Note-Goods Return</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="ticredreg" name="ticredreg" value="1" <?
                                            if ($get["ticredreg"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Inward Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="tiinwdreg" name="tiinwdreg" value="1" <?
                                            if ($get["tiinwdreg"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Damage Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="tidamreg" name="tidamreg" value="1" <?
                                            if ($get["tidamreg"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Transfer Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  tradinginventory" id="titranreg" name="titranreg" value="1" <?
                                            if ($get[titranreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                </div><!-- /.tab-pane -->
                                <div class="tab-pane" id="tab_3">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Sexports" value="1">
                                        </div>
                                    </div>

                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Invoice / Sale</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  exports" id="exinvoice" name="exinvoice" value="1" <?
                                            if ($get["exinvoice"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Inward</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  exports" id="expinward" name="expinward" value="1" <?
                                            if ($get['expinward'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>

                                    <!--                                    <div class="row">                                        
                                                                            <label class="col-sm-4 control-label marg">Certificate Of Origin</label>
                                                                            <div class="col-sm-2" style="margin-top:6px">
                                                                                <input type="checkbox" class="form  exports" id="certoforg" name="certoforg" value="1" <?
                                    if ($get["certoforg"] == 1) {
                                        echo "checked";
                                    }
                                    ?>>
                                                                            </div>
                                                                            <label class="col-sm-4 control-label marg">GSP</label>
                                                                            <div class="col-sm-2" style="margin-top:6px">
                                                                                <input type="checkbox" class="form  exports" id="gsp" name="gsp" value="1" <?
                                    if ($get[gsp] == 1) {
                                        echo "checked";
                                    }
                                    ?>>
                                                                            </div>
                                                                        </div>-->
                                    <!--                                    <div class="row">
                                                                            <label class="col-sm-4 control-label marg">Courier</label>
                                                                            <div class="col-sm-2" style="margin-top:6px">
                                                                                <input type="checkbox" class="form  exports" id="excourier" name="excourier" value="1" <?
                                    if ($get[excourier] == 1) {
                                        echo "checked";
                                    }
                                    ?>>
                                                                            </div>
                                    
                                                                        </div>-->
                                    <hr>
                                    <!--                                    <div class="row">
                                                                            <label class="col-sm-4 control-label marg">Courier Register</label>
                                                                            <div class="col-sm-2" style="margin-top:6px">
                                                                                <input type="checkbox" class="form  exports" id="excourreg" name="excourreg" value="1" <?
                                    if ($get[excourreg] == 1) {
                                        echo "checked";
                                    }
                                    ?>>
                                                                            </div>
                                                                            <label class="col-sm-4 control-label marg">GSP Register</label>
                                                                            <div class="col-sm-2" style="margin-top:6px">
                                                                                <input type="checkbox" class="form  exports" id="exgsp" name="exgsp" value="1" <?
                                    if ($get[exgsp] == 1) {
                                        echo "checked";
                                    }
                                    ?>>
                                                                            </div>
                                                                        </div>-->

                                </div><!-- /.tab-pane-->
                                <div class="tab-pane" id="tab_4">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Smanufacturinginventory" value="1">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Packing Material </label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="packing" name="packing" value="1" <?
                                            if ($get[packing] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Raw Material </label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="item" name="item" value="1" <?
                                            if ($get[item] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Finished Product</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="finprod" name="finprod" value="1" <?
                                            if ($get[finprod] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Opening Stock Packing</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="openpack" name="openpack" value="1" <?
                                            if ($get[openpack] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Change of Rates</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="changerate_item" name="changerate_item" value="1" <?
                                            if ($get[changerate_item] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Opening Stock Raw.</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="openstock_item" name="openstock_item" value="1" <?
                                            if ($get[openstock_item] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <hr>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Purchase Raw Material</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="purchaser_mi" name="purchaser_mi" value="1" <?
                                            if ($get[purchaser_mi] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Purchase Packing Material</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="purchasep_mi" name="purchasep_mi" value="1" <?
                                            if ($get[purchasep_mi] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Purchase Other</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="purcoth_mi" name="purcoth_mi" value="1" <?
                                            if ($get[purcoth_mi] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                        <label class="col-sm-4 control-label marg">Purchase Order</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="mipurchord" name="mipurchord" value="1" <?
                                            if ($get[purchord] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Purchase Ret./Raw Material</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="debnoter_mi" name="debnoter_mi" value="1" <?
                                            if ($get[debnoter_mi] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Purchase Ret./Packing Material</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="debnotep_mi" name="debnotep_mi" value="1" <?
                                            if ($get[debnotep_mi] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Production / BMR</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="production" name="production" value="1" <?
                                            if ($get['production'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                        <label class="col-sm-4 control-label marg">Damage Raw Material</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="damrawmat" name="damrawmat" value="1" <?
                                            if ($get[damrawmat] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Delivery/Dispatch</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="midelv" name="midelv" value="1" <?
                                            if ($get[midelv] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Inward</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="inward_mi" name="inward_mi" value="1" <?
                                            if ($get[inward_mi] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                    </div>

                                    <hr>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Purchase Order</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="purordreg" name="purordreg" value="1" <?
                                            if ($get[purordreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Purchase </label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="purrawreg" name="purrawreg" value="1" <?
                                            if ($get[purrawreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Delivery Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="midelvreg" name="midelvreg" value="1" <?
                                            if ($get[midelvreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Purchase Return / Debit Note Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="purretreg" name="purretreg" value="1" <?
                                            if ($get[purretreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Production Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="prodreg" name="prodreg" value="1" <?
                                            if ($get[prodreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Damage Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="midamreg" name="midamreg" value="1" <?
                                            if ($get[midamreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Purchase Expense</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  manufacturinginventory" id="purchaser_exp" name="purchaser_exp" value="1" <?
                                            if ($get[purchaser_exp] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>


                                </div><!-- /.tab-pane-->
                                <div class="tab-pane" id="tab_5">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Saccounts" value="1">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Group </label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="group" name="group" value="1" <?
                                            if ($get[group] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Other A/C </label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="other" name="other" value="1" <?
                                            if ($get[other] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Bank </label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="bank" name="bank" value="1" <?
                                            if ($get[bank] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Cash</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="cash" name="cash" value="1" <?
                                            if ($get[cash] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Expense</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="expense" name="expense" value="1" <?
                                            if ($get[expense] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Drawee Bank</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="drawbank" name="drawbank" value="1" <?
                                            if ($get[drawbank] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                    </div>

                                    <hr>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Bank Receipt</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="bankrecp" name="bankrecp" value="1" <?
                                            if ($get[bankrecp] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Bank Payment</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="bankpay" name="bankpay" value="1" <?
                                            if ($get[bankpay] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Cash Receipt</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="cashrecp" name="cashrecp" value="1" <?
                                            if ($get[cashrecp] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Cash Payment</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="cashpay" name="cashpay" value="1" <?
                                            if ($get[cashpay] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">JV</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="journal" name="journal" value="1" <?
                                            if ($get[journal] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Contra</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="contraent" name="contraent" value="1" <?
                                            if ($get['contraent'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Bank Book</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="bankbook" name="bankbook" value="1" <?
                                            if ($get["bankbook"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Cash Book</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="cashbook" name="cashbook" value="1" <?
                                            if ($get['cashbook'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">JV Book</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="jvbook" name="jvbook" value="1" <?
                                            if ($get["jvbook"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Contra Register</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="contreg" name="contreg" value="1" <?
                                            if ($get['contreg'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Bank Reconcilation</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="bankrecorep" name="bankrecorep" value="1" <?
                                            if ($get["bankrecorep"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Outstanding Receivable</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="receivablerep" name="receivablerep" value="1" <?
                                            if ($get['receivablerep'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Outstanding Payable</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="payablerep" name="payablerep" value="1" <?
                                            if ($get["payablerep"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Bank Reconcilation</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  accounts" id="bankrecon" name="bankrecon" value="1" <?
                                            if ($get["bankrecon"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                </div>
                                <!-- /.tab-pane -->
                                <div class="tab-pane" id="tab_6">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Smisreports" value="1">
                                        </div>
                                    </div>
                                    <div class="row">                                        
                                        <label class="col-sm-4 control-label marg">Ledger</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="ledger" name="ledger" value="1" <?
                                            if ($get[ledger] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Purchase Summary</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="purchsumm" name="purchsumm" value="1" <?
                                            if ($get['purchsumm'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Sale Summary</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="salesum" name="salesum" value="1" <?
                                            if ($get[salesum] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Daily Sale Summary</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="dailysalsumm" name="dailysalsumm" value="1" <?
                                            if ($get[dailysalsumm] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Product Sale</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="tiitemwise" name="tiitemwise" value="1" <?
                                            if ($get[tiitemwise] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Product Groupwise</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="tiitemgrpwise" name="tiitemgrpwise" value="1" <?
                                            if ($get[tiitemgrpwise] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">

                                        <label class="col-sm-4 control-label marg">Productwise + Party</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="tiipartyreg" name="tiipartyreg" value="1" <?
                                            if ($get[tiipartyreg] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Packing Stock</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="stkpack" name="stkpack" value="1" <?
                                            if ($get[stkpack] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Sale Value Productwise</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="tisalitemwise" name="tisalitemwise" value="1" <?
                                            if ($get[tisalitemwise] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Product Inward/Outward History</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="prodhist" name="prodhist" value="1" <?
                                            if ($get[prodhist] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>                                        
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Product Stock</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="stkprod" name="stkprod" value="1" <?
                                            if ($get[stkprod] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Raw Material Stock </label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="stkrawmat" name="stkrawmat" value="1" <?
                                            if ($get[stkrawmat] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Query Check No.</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="chqrep" name="chqrep" value="1" <?
                                            if ($get[chqrep] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Query Amount No.</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="amtrep" name="amtrep" value="1" <?
                                            if ($get[amtrep] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">TDS</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  misreports" id="tdsrep" name="tdsrep" value="1" <?
                                            if ($get['tdsrep'] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                </div> <!-- /.tab-pane-->
                                <div class="tab-pane" id="tab_7">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Sgstreturns" value="1">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall"><mark style="background-color:yellow;color:black">GSTR - 1</mark></label>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">B2B</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_1" name="gstr1_1" value="1" <?
                                            if ($get[gstr1_1] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">B2C Large</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_2" name="gstr1_2" value="1" <?
                                            if ($get[gstr1_2] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">B2C Small</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_3" name="gstr1_3" value="1" <?
                                            if ($get[gstr1_3] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Credit Debit Note</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_4" name="gstr1_4" value="1" <?
                                            if ($get[gstr1_4] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Credit Debit Note for URD</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_5" name="gstr1_5" value="1" <?
                                            if ($get[gstr1_5] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Export</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_6" name="gstr1_6" value="1" <?
                                            if ($get[gstr1_6] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Nil / Exempted / Non GST</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_9" name="gstr1_9" value="1" <?
                                            if ($get[gstr1_9] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">HSN Summary</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_10" name="gstr1_10" value="1" <?
                                            if ($get[gstr1_10] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Document Summary</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr1_11" name="gstr1_11" value="1" <?
                                            if ($get[gstr1_11] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <hr>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall"><mark style="background-color:yellow;color:black">GSTR - 2</mark></label>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">B2B</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr2_b2b" name="gstr2_b2b" value="1" <?
                                            if ($get["gstr2_b2b"] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">B2B Unregistered</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr2_b2bur" name="gstr2_b2bur" value="1" <?
                                            if ($get[gstr2_b2bur] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Credit/Debit Note</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr2_cdnr" name="gstr2_cdnr" value="1" <?
                                            if ($get[gstr2_cdnr] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Credit/Debit Note Unregistered</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr2_cdnur" name="gstr2_cdnur" value="1" <?
                                            if ($get[gstr2_cdnur] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">HSN Summary</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr2_hsn" name="gstr2_hsn" value="1" <?
                                            if ($get[gstr2_hsn] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>   
                                    <hr>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">GSTR - B</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="gstr3b" name="gstr3b" value="1" <?
                                            if ($get[gstr3b] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Input / Output GST</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="inougst" name="inougst" value="1" <?
                                            if ($get[inougst] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div> 
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">JV - GST</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  gstreturns" id="jvgst" name="jvgst" value="1" <?
                                            if ($get[jvgst] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div> 
                                </div>
                                <div class="tab-pane" id="tab_8">
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg selectall">Select All/UnSelect All</label>
                                        <div class="col-sm-4" style="margin-top:6px">
                                            <input type="checkbox" class="form " id="Sfinalization" value="1">
                                        </div>
                                    </div>
                                    <div class="row">
                                        <label class="col-sm-4 control-label marg">Trial Balance</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  finalization" id="trbal" name="trbal" value="1" <?
                                            if ($get[trbal] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                        <label class="col-sm-4 control-label marg">Profit / Loss</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  finalization" id="profit" name="profit" value="1" <?
                                            if ($get[profit] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>
                                    </div>
                                    <div class="row">

                                        <label class="col-sm-4 control-label marg">Profit Sharing</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  finalization" id="profshar" name="profshar" value="1" <?
                                            if ($get[profshar] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                        <label class="col-sm-4 control-label marg">Balance Sheet</label>
                                        <div class="col-sm-2" style="margin-top:6px">
                                            <input type="checkbox" class="form  finalization" id="balsheet" name="balsheet" value="1" <?
                                            if ($get[balsheet] == 1) {
                                                echo "checked";
                                            }
                                            ?>>
                                        </div>

                                    </div>
                                </div>
                            </div><!-- /.tab-content -->
                        </div>
                    </div>
                    <div class="panel-footer">
                        <?php include("includes/buttons.php"); ?>
                    </div>
                </div>
            </div>
            <div class="col-lg-6 col-md-12 col-sm-12 col-xs-12 pad">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <h3 class="panel-title">Year Details</h3>
                    </div>
                    <div class="panel-body">
                        <div class="table-responsive">
                            <table class="table table-striped table-condensed table-bordered" width="100%">
                                <thead class="mySearchTr">
                                    <tr>
                                        <th width="3%"></th>
                                        <th width="10%">Year</th>
                                        <th width="10%">Name</th>
                                        <th width="10%">From</th>
                                        <th width="10%">To</th>
                                    </tr>
                                </thead>
                                <tbody class="tbody">
                                    <?php
                                    if ($addflag != 1) {
                                        $ctr = 0;
                                        $gettran = mysqli_query($conn, "SELECT `cono`,`finyear`,`startdate`,`lastdate`,`yearname` FROM `usercomp` WHERE `username`='$get[code]' ORDER BY `cono`") or die(mysqli_error($conn));
                                        while ($tran = mysqli_fetch_array($gettran)) {

                                            $fetyear = mysqli_query($conn, "SELECT `finyear` FROM `compyear` WHERE `finyear`='$tran[finyear]'") or die(mysqli_error($conn));
                                            $fyear = mysqli_fetch_array($fetyear);

                                            echo "<tr>";
                                            echo "<td><i class='fa fa-close remove' style='display:none;'></i></td>";
                                            echo "<td>";
                                            echo "<select class='form-control form finyear select2' name='finyear_$ctr' style='width:100%'>";
                                            echo "<option value='$fyear[finyear]'>$fyear[finyear]</option>";
                                            $gyear = mysqli_query($conn, "SELECT `finyear` FROM `compyear`") or die(mysqli_error($conn));
                                            while ($year = mysqli_fetch_array($gyear)) {
                                                echo "<option value='$year[finyear]'>$year[finyear]</option>";
                                            }
                                            echo "</select>";
                                            echo "</td>";
                                            echo "<td><input type='text' class='form-control form yearname' name='yearname_$ctr' value='$tran[yearname]' readonly></td>";
                                            echo "<td><input type='text' class='form-control form startdate' name='startdate_$ctr' value='$tran[startdate]' readonly></td>";
                                            echo "<td><input type='text' class='form-control form lastdate' name='lastdate_$ctr' value='$tran[lastdate]' readonly></td>";
                                            echo "</tr >";
                                            $ctr++;
                                        }
                                    } else {
                                        ?>
                                        <tr>
                                            <td><i class='fa fa-close remove'></i></td>
                                            <td>
                                                <select class="form-control form finyear select2" name="finyear_0" style='width:100%' required>
                                                    <option value=""></option>
                                                    <?php
                                                    $gyear = mysqli_query($conn, "SELECT `finyear` FROM `compyear`") or die(mysqli_error($conn));
                                                    while ($year = mysqli_fetch_array($gyear)) {
                                                        echo "<option value='$year[finyear]'>$year[finyear]</option>";
                                                    }
                                                    ?>
                                                </select>
                                            </td>
                                            <td><input type="text" class="form-control form yearname" name="yearname_0" value="" readonly></td>
                                            <td><input type="text" class="form-control form startdate" name="startdate_0" value="" readonly></td>
                                            <td><input type="text" class="form-control form lastdate" name="lastdate_0" value="" readonly></td>
                                        </tr>
                                        <?
                                    }
                                    ?>
                                </tbody>
                            </table>
                        </div>
                        <div class="col-lg-12 pad">
                            <button type="button" class="btn btn-primary btn-square form" id="addnew">
                                <i class="fa fa-plus" data-toggle='tooltip' title='Add Row'></i>
                            </button>
                            <input type="hidden" id="items" name="items" value="<?php echo ($addflag != 1) ? $ctr : 1; ?>" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button class="close" data-dismiss="modal"><span>&times;</span></button>
                    <h4 class="modal-title" id="myLargeModalLabel">Search
                        <? echo $formname; ?>
                    </h4>
                </div>
                <div class="modal-body">
                    <div class=" table-responsive">
                        <table id="example1" class="table table-striped">
                            <thead>
                                <tr class="mySearchTr">
                                    <th>code</th>
                                    <th>Name</th>
                                    <th>Action</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php
                                if ($addflag != 1) {
                                    $srchresult = mysqli_query($conn, "SELECT * FROM `$maindb`") or die(mysqli_error($conn));
                                    while ($row = mysqli_fetch_array($srchresult)) {
                                        echo "<tr>";
                                        echo "<td align='left'>$row[code]</td>";
                                        echo "<td align='left'>$row[user]</td>";
                                        echo "<td align='left'><a href=\"$file?mode=edit&$keyfld=$row[$keyfld]\"><i class='fa fa-pencil' style='font-size:1.3em;color:#00C0EF;cursor:pointer;'></i></a></td>";
                                        echo "</tr>";
                                    }
                                }
                                ?>
                            </tbody>
                        </table>
                    </div>
                </div>
                <div class="modal-footer"></div>
            </div>
        </div>
    </div>
</body>

</html>
<?php include("includes/linksfoot.php"); ?>