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

$formname = 'Lodging Checkout';
$maindb = 'checkout';
//$trandb = 'purtran';
/* $accdb = 'actran'; */
$file = 'checkout7_fr.php';
$source = "OTR";
/* $grid = 'salemain.php'; */

$zcomp = $_SESSION["comp_" . $dbname];
$zdb = $_SESSION["zdbyear_" . $dbname];
mysqli_select_db($conn, $zdb);

//$zdb1 = 'cepheisy_sis_zyc_1_1516';
$mht = 'height:20px;';

$admin = $_SESSION["admin_" . $dbname];
$vouchno = $_REQUEST["vouchno"];
$series = $_GET['series'];
if (empty($series)) {
    $series = $_SESSION["series_" . $dbname];
}
$keycond = " and `series`='$series'";
$mainqry = mysqli_query($conn, "SELECT *, DATE_FORMAT(`vouchdt`, '%d-%m-%Y') AS vouchdt FROM `$maindb` WHERE vouchno='$vouchno' $keycond") or die(mysqli_error($conn));
$getmdata = mysqli_fetch_array($mainqry) or die(mysqli_error($conn));
$cmpname = mysqli_query($conn, "SELECT * From $zroot.`company` where `code`='$zcomp'")or die(mysqli_error($conn));
$getcmpname = mysqli_fetch_array($cmpname);
?>

<!DOCTYPE HTML>
<html lang="en-US">


</head>
<style>
    body {
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        /*background-color: #FAFAFA;*/
        font: 12pt "Tahoma";
    }
    * {
        box-sizing: border-box;
        -moz-box-sizing: border-box;
    }
    .page {
        width: 210mm;
        min-height: 120mm;
        padding: 4mm;
        margin: 10mm auto;
        border: 1px #D3D3D3 solid;
        border-radius: 5px;
        /*background: white;*/

    }
    .subpage {
        padding: 0cm;
        /*        border: 1px solid;*/
        height: 288mm;
        outline: 2cm #ffffff solid;
    }

    @page {
        size: A4;
        margin: 0;
    }
    @media print {
        html, body {
            width: 210mm;
            height: 240mm;        
        }
        .page {
            margin: 0;
            border: initial;
            border-radius: initial;
            width: initial;
            min-height: initial;
            box-shadow: initial;
            background: initial;
            page-break-after: always;
        }
    }
    .border{
        border: 1px solid;
    }
    table, td, th{
        border: 1px solid black;
        border-collapse: collapse;
    }
</style>

<body id="main_container">
    <div class="book">
        <div class="page">
            <!--<div class="subpage">-->
            <!--   ************Header************  -->

                 <!-- <?php include("includes/head_print.php"); ?>  -->


           
                           <!-- <div style="border:solid 1px;" class="col-md-12" >
                                <h1 style="margin-top:2px;margin-bottom: 11px;"><center><? Echo $getcmpname['pname']; ?></center></h1>
                                <center><?php echo $getcmpname['add1'] . " " . $getcmpname['add2'] . " " . $getcmpname['add3']; ?></center>
                                <center><?php echo "Email :" . $getcmpname['email'] . " &nbsp " . "Contact No :" . $getcmpname['tel'] . " " . $getcmpname['mobile']; ?></center>
                                <h5 style="margin-top:2px;margin-bottom: 2px;"><center><b><?php echo $formname; ?></b></center></h5>
                
                            </div> -->
            
            <div>
            <h2><center>Tax Invoice</center></h2>
            </div> 
                     <div class="col-md-12" >
                     <div style="border:solid 1px;" class="col-md-12" style="padding-left: 1px ; padding-right: 1px;">
                            <div style="border:solid 1px;" class="col-md-12" >
                            <table style="width: 100%">
                            <tr>
                                <td style="border-bottom-color: transparent; border-right-color: transparent;  border-left-color: transparent;  border-top-color: transparent">
                                <? Echo  $getcmpname['name']; ?>
                                </td>
                                <td style="border-bottom-color: transparent; border-right-color: transparent;  border-top-color: transparent">Bill no :
                                <?$getmdata2['vouchno']; ?>
                                </td>
                                </tr>
                            <tr>
                                <td style="border-bottom-color: transparent; border-right-color: transparent;border-left-color: transparent">
                                <?php echo $getcmpname['add1'] ?>
                                </td>
                                <td style="border-bottom-color: transparent; border-right-color: transparent">Register No :
                                <?php echo $getmdata2['bookno'] ?>
                                </td>
                                </tr>
                            
                             <tr>
                             <td style="border-bottom-color: transparent; border-right-color: transparent; transparent;border-left-color: transparent">
                                <?php echo $getcmpname['add2']?>
                                </td>
                                <td style="border-bottom-color: transparent; border-right-color: transparent;"> Room No :
                                <? $getmdata2['roomno'] ?>
                                </td>
                                </tr>

                                  <tr>
                                  <td style="border-bottom-color: transparent; border-right-color: transparent; transparent;border-left-color: transparent">
                                  <? echo $getcmpname['mobile'] ?>
                                  </td>
                                  <td style="border-bottom-color: transparent; border-right-color: transparent;">Mobile No :
                                  <? echo $getmdata2[vouchdt] ?>
                                  </td>
                                  </tr>
                                 
                                  </table>  
                                 <table style="width: 100%; ">
                                <tr>
                                <td style="border-bottom-color: transparent; border-right-color: transparent; border-left-color: transparent;">Name :
                                </td>
                                <td style="border-bottom-color: transparent; border-right-color: transparent; ">
                                <? echo $getmdata2['name'] ?>
                                </td>
                                </tr>
                                </tble> 

                                <table style="width: 100%; background-color: rgb(169, 185, 124); padding-top: 5px; padding-bottom: 5px">
                                <tr>
                                <th style="width: 50%; border-bottom-color: transparent; border-left-color: transparent;">Particular</th>
                                <th style="width: 15%; border-bottom-color: transparent;">Nos.</th>
                                <th style="width: 15%; border-bottom-color: transparent;">Rate</th>
                                <th style="width: 18%; border-bottom-color: transparent; border-right-color: transparent;">Amount</th>
                                </tr>
                                </table>
                                
                                    <table style="width: 100%">
                                    <tr>
                                    <td style="width: 50%;  padding-top: 7px; padding-bottom: 7px ; border-bottom-color: transparent; border-left-color: transparent"></td>
                                    <td style="width: 15%;  padding-top: 7px; padding-bottom: 7px ; border-bottom-color: transparent;"></td>
                                    <td style="width: 15%;  padding-top: 7px; padding-bottom: 7px ; border-bottom-color: transparent;"></td>
                                    <td style="width: 18%;  padding-top: 7px; padding-bottom: 7px ; border-bottom-color: transparent; border-right-color: transparent"></td>
                                    </tr>
                                    </table>

                                <table style="width: 100%">
                                <tr>
                                <td style="padding-left: 79%; border-bottom-color: transparent; border-left-color: transparent; border-right-color: transparent; ">For<b>MB</b></td>
                                </tr>
                                </table>  
                            </div>
                        </div
              
                     
             <?php
            mysqli_select_db($conn, $zdb);
            
            
            $gcust = mysqli_query($conn, "SELECT * FROM `accmast` WHERE `accode`=$getmdata[party]") or die(mysqli_error($conn));
            $cust = mysqli_fetch_array($gcust);
            ?> -->
           

            </div>
    <!--<hr style="border-top: dotted 1px;" />-->
    <?php
    include("includes/linksfoot.php");
    ?>
    <script>
        $(function () {
            formGeneral();
        });
    </script>
</body>
</html>
    