<?php
$zroot = $_SESSION["zdir"];;


$getcomp = mysqli_query($conn, "SELECT * FROM $zroot.`company` WHERE `code`= '1'")or die(mysqli_error($conn));
$comp = mysqli_fetch_array($getcomp);

?>
<style>
    .HDFont{
        font-family: "Verdana";
    }
    @media print {
        .noPrint {
            display:none;
        }
        /* font-family: "Verdana"; */

    }
</style>
<div class="" style="background-color: #98f9f0">
    <table class="" width="100%" id="head" >
        <tr>
            <td style="font-size:22px" class="HDFont">
                <?php Echo strtoupper($comp['compname']); ?>
            </td>
            <td style="text-align:right">
                                    <button onclick="window.print();return false;" class="btn btn-primary noPrint" style="text-align: right">Print</button>

                <button id='cancel'  style="background: #26A69A;" type="button" class="btn btn-danger noPrint"  onclick="window.close()" >
                    Go Back
                </button>
            </td>
        </tr>
        <tr>
            <td style="font-size: 12px" class="HDFont">
                <?php Echo $comp['hoadd1']; ?>
                <?php Echo $comp['hoadd2']; ?>
                <?php Echo $comp['hoadd3']; ?>
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td></td>
        </tr>
        <?php
        if ($dtype == 1) {
            $rtype = " - Summary";
        } elseif ($dtype == 2) {
            $rtype = " - Detail";
        } elseif ($dtype == '') {
            $rtype = '';
        }
        ?>
        <tr>
            <td style="font-size: 16px;color: red" class="HDFont">
                <?php Echo $formname . ' ' .  $rtype; ?>
            </td>
            <td style="font-size: 14px" align="right" class="HDFont">
                Report Date - <?php Echo Date("d-m-Y"); ?>
            </td>
        </tr>

        <tr>
            <td style="font-size: 14px" class="HDFont">
                <?php if ($mfdt != '') { ?>
                    From Date - 
                    <?php Echo format_date($mfdt); ?> &nbsp;&nbsp;&nbsp;
                <?php
                }
                if ($mtdt != '') {
                ?>
                    To Date - 
                <?php 
                    Echo format_date($mtdt); } 
                ?>
            </td>
            <td>
            </td>
        </tr>

<!--        <tr>
            <td style="font-size: 14px" class="HDFont">
                    As On Date - 
                    <?php //Echo $as_on_date ; ?> &nbsp;&nbsp;&nbsp;
            </td>
            <td>
            </td>
        </tr>-->
        <?php // } ?>
        <tr>
            <td style="font-size: 14px" class="HDFont" colspan="2">
                <?php Echo $rtype2; ?>
            </td>
        </tr>
        <tr>
            <td style="font-size: 14px" class="HDFont" colspan="2">&nbsp;
            </td>
        </tr>
        <?php
        
        if($getno > 0){
            ?>
        <tr>
            <td style="font-size: 15px;padding:5px" class="HDFont" colspan="2">
                Total No. of Record :&nbsp;&nbsp;<b><?php echo $getno ; ?></b>
            </td>
        </tr>
        <? }
//        elseif ($getno == 0){
//        browse("No Record Found");
//        echo "<script>window.close()</script>";
//        }
        ?>
    </table>
</div>
