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

$formname = 'Lagan';
$maindb = 'cashpay';
//$trandb = 'purtran';
/* $accdb = 'actran'; */
$file = 'cashpay.php';
$source = "CP";
/* $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' ORDER BY `vouchno`") 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 "Arial";
    }

    * {
        box-sizing: border-box;
        -moz-box-sizing: border-box;
    }

    .page {
        width: 210mm;
        min-height: 125mm;
        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;
    }
</style>

<body id="main_container">
    <div class="book">
        <div class="page">
            <!--<div class="subpage">-->
            <!--   ************Header************  -->
            <div style="border:solid 0px;" class="col-md-12">

                <center><b style="font-size: 20px">SORATHIYA MUSLIM GHANCHI JAMAT TRUST (MUMBAI)</b></center>
                <center><b>Regd. 1950 No. B.1184 Dt. 9-4-1970</b></center>
                <center>131, Zakaria Masjid Street, Mumbai - 400 001. Phone: 022-23456741</center>

            </div>

            <hr style="border-top: dotted 1px;" />
            <center><b style="color:#A8B97D"><?php echo $formname; ?></b></center>

            <?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 style="height:40px">
                    <td style="text-align: left;">
                        <b>Voucher No:</b>
                        <?php echo "$getmdata[vouchno]"; ?>
                    </td>
                    <td style="text-align: center;">
                        <b>Date:</b>
                        <?php echo "$getmdata[vouchdt]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Father Name:</b>
                        <?php echo "$getmdata[memname]"; ?>
                    </td>
                    <td style="text-align: center;">
                        <b>Rs.:</b>
                        <?php echo "$getmdata[sonamt]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Son:</b>
                        <?php echo "$getmdata[dauname]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Father Name:</b>
                        <?php echo "$getmdata[memname]"; ?>
                    </td>
                    <td style="text-align: center;">
                        <b>Rs.:</b>
                        <?php echo "$getmdata[sonamt]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Daughter:</b>
                        <?php echo "$getmdata[dauname]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Islamic Date :</b>
                        <?php echo "$getmdata[muslimdt]"; ?>
                    </td>
                    <td style="text-align: center;">
                        <b>Total :</b>
                        <?php echo "$getmdata[totamt]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>English Date :</b>
                        <?php echo "$getmdata[englishdt]"; ?>
                    </td>
                    <td style="text-align: center;">
                        <b>Day :</b>
                        <?php echo "$getmdata[engday]"; ?>
                    </td>
                </tr>
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Time :</b>
                        <?php echo "$getmdata[engtime]"; ?>
                    </td>
                </tr>   
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Lagan Location :</b>
                        <?php echo "$getmdata[add1]"; ?>
                    </td>
                </tr>   
                <tr style="height:40px">
                    <td style="text-align: left;">
                        <b>Remarks :</b>
                        <?php echo "$getmdata[Remarks1]"; ?>
                    </td>
                </tr>   
            </table>
           
            <!--            </div>-->

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

</html>