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

$formname = 'Bank Payment';
$maindb = 'bankpay';
/* $accdb = 'actran'; */
$file = 'bankpay_fr.php';
$source = "BS";
/* $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"];
$mainqry = mysqli_query($conn, "SELECT *, DATE_FORMAT(`vouchdt`, '%d-%m-%Y') AS vouchdt, DATE_FORMAT(`chqdate`, '%d-%m-%Y') AS chqdate
                  FROM `$maindb` WHERE vouchno='$vouchno'") or die(mysqli_error($conn));
$getmdata = mysqli_fetch_array($mainqry);

$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">

<title>LEO ENTERPRISES</title>
</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;
    }

    .upDiv {
        margin-top: 10px;
        height: 20px;
        background-color: #2e538e;
    }
    .dnDiv {
        height: 20px;
        background-color: #f7a82a;
    }
    .lsDiv {
        margin-top: 10px;
        height: 20px;
        background-color: #2e538e;
    }

    @page {
        size: A4;
        margin: 0;
    }

    @media print {

        html,
        body {
            width: 210mm;
            height: 297mm;
        }

        .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;
    }
</style>

<body id="main_container">
    <div class="book">
        <div class="page">
            <!--<div class="subpage">-->
            <!--   ************Header************  -->
            <div class="col-md-12" style="text-align: center;">
                <!-- <div style="border:solid 1px;" class="col-md-12" style="text-align: center;"> -->
                    <!-- <center>
                        <p style="margin-top:2px;margin-bottom: 2px;font-size:11px; "><u>Subject To Mumbai Jurisdiction</u></p>
                    </center> -->
                    <img src="images/LeoLogoNewBg.png" style="height:70px;width:50%;">
                    <div class="upDiv"></div>
                    <div class="dnDiv"><h5 style="all: unset;color:#2e538e"><center><b><?php echo strtoupper($formname); ?></b></center></h5></div>
                    <?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> -->

            </div>
            <!-- <hr style="border-top: dotted 1px;" /> -->
            <?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);
            ?>
            <table width="100%">
                <tr>

                    <td style="text-align: left;">
                        <b>Receipt No :</b>
                        <?php echo "$getmdata[vouchno]"; ?>
                    </td>
                    <td style="text-align: center;">
                        <b>Date :</b>
                        <?php echo "$getmdata[vouchdt]"; ?>
                    </td>
                </tr>
            </table>

            <table width="100%">
                <tr>
                    <td style="text-align: left;">
                        Paid on account of <b> <?php echo "$cust[name]"; ?></b>
                    </td>

                </tr>
            </table>
            <table width="100%">
                <tr>
                    <td style="text-align: left;width:100%">
                        <br>The Sum of Rupees <b><?php echo "Rs.$getmdata[amount]"; ?>
                            (<?php echo rsword(round($getmdata["amount"])); ?>)</b>
                    </td>
                </tr>
            </table>
            <table width="100%">
                <tr>
                </tr>
                <tr>
                    <td style="text-align: left;">
                        Paid by cheque / RTGS / NEFT <?php echo "$getmdata[chqno]"; ?>
                    </td>
                    <td style="text-align: left;">
                        Date <?php echo "$getmdata[chqdate]"; ?>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left;">
                        drawn on <?php echo "$cust[name]"; ?>
                    </td>
                </tr>
                <tr>
                    <td style="text-align: left;">
                        <?php echo "$getmdata[narration]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td>
                        <div></div>
                        </br>
                        </br>
                        </br>
                        </br>

                    </td>
                </tr>

                <tr>
                    <td style="text-align: left; width:50%;">
                        <hr align="left" style="border: 1px solid black; width:50%" />
                        <b>Authorised Signatory</b>
                    </td>
                    <td style="text-align: center; width:50%;">
                        <hr style="border: 1px solid black; width:70%" />
                        <b>Received By/Account Holder</b>
                    </td>
                </tr>
            </table>
            </table>
            <div class="lsDiv"></div>
        </div>


    </div>
    <!--<hr style="border-top: dotted 1px;" />-->



    <!--<div>-->




    <!--</div>-->

    <?php
    include("includes/linksfoot.php");
    ?>
    <script>
        $(function() {
            formGeneral();
        });
    </script>
</body>

</html>