Your IP : 216.73.216.26


Current Path : /home2/wtmwscom/public_html/admin/
Upload File :
Current File : /home2/wtmwscom/public_html/admin/invest_done_print.php

<?php 
session_start();
//if($_SESSION['userid'] != 1) die('Unauthrised access');
include '../function_lib.php';
if(!isset($_SESSION['adminid'])) { redirect('index.php');};
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
    <head>
        <title>Print : Dream Housing Plot Invoice</title>
        <style type="text/css">
            body {
                /*font-family: Times New Roman;*/
                font-family: 'Noto Serif', serif;
        font-size: 18px;
            }
            #wrap {
                width: 750px;
                margin: 0 auto;
            }
            #heder {
                width: 900px;
                height: auto;
            }
            #receipt {
                float: right;
            }
            p{
                font-size: 14px;
                line-height: 10px;
            }
            #logo{
                float: left;
                width: 130px;
                margin-top: -23px;
            }
            #comp{
                float: left;
                width: 580px;
                text-align: center;
				margin-top: -23px;
                
            }
        </style>
        <link href='http://fonts.googleapis.com/css?family=Libre+Baskerville|Voces|Noto+Serif|Merriweather+Sans|Roboto+Condensed|Tauri' rel='stylesheet' type='text/css'>
    </head>
    <body>
        <?php
    include '../connection.php';
            $row = mysqli_fetch_object(mysqli_query($connection, "select * from invest_amount where iaid = ".$_GET['id']));
            $row1 =  mysqli_fetch_object(mysqli_query($connection, "select name, address from user where uid = '$row->uid'"));
            $sponser_name = mysqli_fetch_object(mysqli_query($connection, "select name from user where uid = (select refer_id from user where uid ='$row->uid')"))->name;
            $referid = mysqli_fetch_object(mysqli_query($connection, "select refer_id from user where uid ='$row->uid'"))->refer_id;
         ?>
        <div id="wrap" style="background: white;margin-top:-5px;">
            <div id="header">
                <div id="receipt"><h4>RECEIPT</h4>
                    <p style="margin-top: -16px;"><b>No.:</b> <?php echo $row->iaid; ?></p>
                    <p style="margin-top: -7px;"><b>Date:</b> <?php echo date("d-m-y");?></p>
                </div>
                <div style="clear: both;"></div>
                <div id="logo"><img src="logo.PNG" style="width: 130px; height: 150px;" /></div>
                <div id="comp">
                    <h2 style="color: orangered;"> Wtm WebShop.</h2>
                    <!--<p>Liable for SUPERPOWER to you</p>
                    <p>Regd. No. U74999MH201011PTC2111837</p>-->
                    <p>website :www.mindspace</p>
                </div>
                <div style="clear: both;"></div>
                <div style="margin-top: -7px;">
                    <p>Applicant Name & Add. : <span style="color: cornflowerblue;"><?php echo $row1->name; ?></span> , At- <?php if(isset($row->adress)){echo $row->adress;} ?></p>
                    <p>Applicant BCA Code No. : <?php echo $row->uid; ?>...Amount (in words) <?php echo $row->amount;?></p>
                    <p>Referral BCA Name: <span style="color: cornflowerblue;"><?php echo $sponser_name;?></span><span style="margin-left: 100px;">    Referral BCA Code No.: <?php echo $referid;?> Mode: Cash/PO/DD/Chq./No...</span></p>
                    <!--<p>Referral BCA Code No.: <?php //echo $referid;?> Mode: Cash / PO/ DD / Chq. / No...</p>-->
                </div>
                <div style="clear: both;position:relative;margin-top: 25px;">
					<!--kk-->
					<?php
					$row_cnt = mysqli_fetch_object(mysqli_query($connection, "SELECT COUNT( * ) 'cnt' FROM `invest_amount` WHERE uid ='$row->uid'"));
					?>
					<?php
					
					$first_pay_details = mysqli_fetch_object(mysqli_query($connection, "SELECT `iaid`,`amount`,`date`,`month` FROM `invest_amount` WHERE uid ='$row->uid' ORDER BY `date` ASC LIMIT 1"));
					$next_pay_date = mysqli_fetch_object(mysqli_query($connection, "SELECT DATE_ADD( '$first_pay_details->date' , INTERVAL 1 MONTH ) 'a'"));
					$datepart_first_pay = explode('-',$first_pay_details->date);//array("13","10","11");
					$datepart_curr_pay = explode('-',$row->date);
					$datepart_next_pay = explode('-',$next_pay_date->a); 
					//echo "<pre>".date('m')."</pre>";
					
					//echo $datepart[0]." ";echo $datepart[1]." ";echo $datepart[2]." ";//2014 02 01
					//$y=$datepart_first_pay[0]+($datepart_curr_pay[0]-$datepart_first_pay[0]);
					$y=$datepart_first_pay[0];
					//$m=$datepart_first_pay[1];
					$m=date('m');
					//$d=$datepart_next_pay[2];
					$d=$datepart_first_pay[2];
					//var_dump($m);
					
					if ($m=="12") {$m="01";}
					else {$m=$m+1;
						if ($m>1 && $m<10) {
							$m="0".$m;
						}
					}
					$y=$y+(date('y')-$y);
					/*
					if($y!=date('y')){
										
						$y=$y+(date('y')-$y);
					
					}*/
					//echo $y." ".$m." ".$d;
					//echo $d."/".$m."/".$y;
					//echo "</pre>";
					?>
					<p>Installment No: <span style="color: cornflowerblue;"><?php if(isset($row_cnt->cnt)){echo $row_cnt->cnt." ";}?></span><span style="margin-left: 16px;">First Payment Date: <span style="color: cornflowerblue;"><?php if(isset($datepart_first_pay[2]) && isset($datepart_first_pay[1]) && isset($datepart_first_pay[0])){echo $datepart_first_pay[2]."/".$datepart_first_pay[1]."/".$datepart_first_pay[0]." ";}?></span></span><span style="margin-left: 16px;">Next Payment Date: <span style="color: cornflowerblue;"><?php if(isset($d) && isset($m) && isset($y)){echo $d."/".$m."/".$y;}?></span></span></p>
					
					
					<?php //echo date('d/m/y', strtotime($first_pay_details->date));?>
					<!--<p>First Payment Date: <span style="color: cornflowerblue;"><?php //echo $datepart_first_pay[2]."/".$datepart_first_pay[1]."/".$datepart_first_pay[0];?></span></p>-->
				    <!--<p>Next Payment Date: <span style="color: cornflowerblue;"><?php //echo $d."/".$m."/".$y;?></span></p>-->
					<?php
					//$last_pay_details = mysqli_fetch_object(mysqli_query($connection, "SELECT iaid,amount FROM `invest_amount` WHERE uid = "32643290" AND iaid < (SELECT MAX( iaid ) FROM `invest_amount` WHERE uid = "32643290" ) ORDER BY iaid DESC LIMIT 1"));
					$last_pay_details_print = mysqli_fetch_object(mysqli_query($connection, "SELECT `iaid`,`amount`,`date`,`month` FROM `invest_amount` WHERE uid ='$row->uid' AND iaid < (SELECT MAX( iaid ) FROM `invest_amount` WHERE uid ='$row->uid' ) ORDER BY iaid DESC LIMIT 1"));
					?>
					<p>Last  Payment  :-<span style="margin-left: 14px;">Date: <span style="color: cornflowerblue;"><?php if($row_cnt->cnt==1){echo "N/A ";} elseif(isset($last_pay_details_print->date)){echo date('d/m/y', strtotime($last_pay_details_print->date))." ";}?></span><span style="margin-left: 14px;"><!--Last Payment-->Amount Rs: <span style="color: cornflowerblue;"><?php if(isset($last_pay_details_print->amount)){echo $last_pay_details_print->amount." ";} else {echo "N/A ";}?></span></span></span></p>
					<!--<p>Last Payment Amount Rs: <span style="color: cornflowerblue;"><?php //if($last_pay_details_print->amount){echo $last_pay_details_print->amount;}?></span></p>-->
					<!--<p>Current Paid Amount:<span style="color: cornflowerblue;"><?php //echo $row->amount;?></span></p>-->
					
					<?php
					//$last_pay_details = mysqli_fetch_object(mysqli_query($connection, "SELECT iaid,amount FROM `invest_amount` WHERE uid = "32643290" AND iaid < (SELECT MAX( iaid ) FROM `invest_amount` WHERE uid = "32643290" ) ORDER BY iaid DESC LIMIT 1"));
					$amount_paid_till_now_print = mysqli_fetch_object(mysqli_query($connection, "SELECT sum( amount ) 'a' FROM `invest_amount` WHERE uid ='$row->uid'"));
					?>
					<p>Total Paid Amount Until Now: <span style="color: cornflowerblue;"><?php if(isset($amount_paid_till_now_print->a)){echo $amount_paid_till_now_print->a;}?></span></p>
			        <!-kk-->
                </div>
				<div style="float: left;">
					<p>Rs.<span style="color: cornflowerblue;"><?php echo $row->amount;?></span></p>
                    <p style="position: relative; left: 150px;"><b>Sign of Ref. BCA</b></p>
                </div>
                <div style="float: right; width: 200px; text-align: center;">
                    <p><b>Authorized Officer</b></p>
                    <p><b> Wtm WebShop</b></p>
                </div>
                <div style="clear: both;"></div>
                <div style="margin: 5px;"><button onclick="window.print()">Print</button></div>
            </div>
        </div>
    </body>
</html>