<?php
$zroot = $_SESSION["zdir"];
$zcomp = $_SESSION["comp_" . $dbname];
$getcomp = mysqli_query($conn, "SELECT * FROM $zroot.`company` where code = '$zcomp' ") or die(mysqli_error($conn));
$comp = mysqli_fetch_array($getcomp);

?>
<style>
    @media print {
        .noPrint {
            display: none;
        }
    }
</style>
<table width="100%" id="head">
    <tr  style="text-align:center">
        <!-- <td style="font-size: 18px;">
            <label class="Head" style='font-size:20px;'><? echo $comp['pname']; ?></label>
        </td> -->
        <td style="text-align:right" colspan="2">
            <a onclick="window.close()" class="btn btn-primary noPrint">GO Back</a>
            </button>
        </td>
    </tr>
    <tr  style="text-align:center">
        <td style="font-size: 18px;" colspan="2">
            <label class="Head" style='font-size:20px;'><? echo $comp['pname']; ?></label>
        </td>
        <!-- <td style="text-align:right">
            <a onclick="window.close()" class="btn btn-primary noPrint">GO Back</a>
            </button>
        </td> -->
    </tr>
    <tr style="text-align:center">
        <td style="font-size: 12px" colspan="2">
            <?php echo "<label style='font-size:15px;'>$comp[add1]$comp[add2]$comp[add3]</label>" ?>
        </td>
    </tr>
    <tr>
        <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
        <td style="font-size: 15px">
            <label class="label-control marg" style="font-size:15px"><?php echo $formname . " - " . $partyprinname?></label>
        </td>
        <td style="font-size: 15px;width:200px" align="right">
            <label class="label-control marg" style="font-size:14px">Report Date - <?php echo Date("d-m-Y"); ?></label>
        </td>
    </tr>
    <tr>
        <td style="font-size: 15px" colspan="2">
            <?php if ($mfdt != '') { ?>
                From Date -
                <?php echo $mfdt; ?>&nbsp;&nbsp;&nbsp;
            <?php } ?>
            <?php if ($mtdt != '') { ?>
                To Date -
                <?php echo $mtdt; ?>
            <?php } ?>
        </td>
    </tr>

    <?php
    if ($dtype == 1) {
        $rtype = "Summary";
    } elseif ($dtype == 2) {
        $rtype = "Detail";
    } elseif ($dtype == '') {
        $rtype = '';
    }

    if ($dtype > 0) {
    ?>
        <tr>
            <td style="font-size: 15px" colspan="2">
                <?php echo $rtype; ?>
            </td>
        </tr>
    <?php } ?>
</table>