<?php 

//print_r($_GET);

$id=$_GET['rc'];
$from=$_GET['from'];
$to=$_GET['to'];
$kg=$_GET['kg'];
$brfrom=$_GET['brfrom'];
$brto=$_GET['brto'];
$date=$_GET['date'];
$parcel=$_GET['no_par'];
$total=$_GET['tot'];
$type=$_GET['type'];
$vpp=$_GET['vpp'];
$cc_status=$_GET['ccstatus'];
$gst=$_GET['gstno'];
$test = explode("_",$type);
//	print_r($test);
?>

<!DOCTYPE html>
<html style="width: 800px; height: 400px;">
<head>
	<style type="text/css">
	@import url("https://fonts.googleapis.com/css?family=Open+Sans");
	@import url("https://fonts.googleapis.com/css?family=Hind");

		*{
			font-size: 8px;
			font-family: "Open Sans", sans-serif;
			margin: auto;
		}
		table {
		  border-collapse: collapse;
		}
		table, th, td {
		  border: 1px solid #1976D2;
		}
		.color{
			color: #ff0000;
		}
		.center{
			text-align: center;
		}
		.title{
			text-align: center;
			text-transform: uppercase;
			font-weight: bold;
		}
		table .no_border{
			border: none;
		}
		table .border_bt{
			border-bottom:1px solid #1976D2;
		}
		.info{
			color: #000000;
			font-weight: bold;
		}
		.rupee{
			font-family: "Hind", sans-serif;
		}
		
	@media print {
    html, body {
        width: 5.5in; /* was 8.5in */
        height: 8.5in; /* was 5.5in */
        display: block;
        font-family: "Calibri";
        /*font-size: auto; NOT A VALID PROPERTY */
    }

    @page {
        size: 5.5in 8.5in /* . Random dot? */;
    }
}
	</style>
</head>
<body> 
	<table style="width: 50%; padding: 10px;">
		<tr>
			<td colspan="1" rowspan="5" class="center"><img src="img/sun logo4.jpg" style="width: 40%;"></td>
			<td colspan="2" rowspan="2" class="center">CONSIGNER'S COPY</td>
			<td colspan="2" rowspan="1" class="no_border">Date:&nbsp;<span class="info"><?php echo $date?></span></td>
		</tr>
		<tr>
			<td colspan="2" rowspan="1" class="no_border">Receipt No.:&nbsp;<span class="info"><?php echo $id?></span></td>
		</tr>
		<tr>
			<td colspan="2" rowspan="3" class="center"><span class="info"><?php echo $id;?></span></td>
			<td colspan="2" rowspan="1" class="no_border">From:&nbsp;<span class="info"><?php echo $brfrom;?></span></td>
		</tr>
		<tr>
			<td colspan="2" rowspan="1" class="no_border">To:&nbsp;<span class="info"><?php echo $brto;?></span></td>
		</tr>
		<tr>
			<td colspan="2" rowspan="1" class="no_border">GST:&nbsp;<span class="info">27ADKFS6251Q1Z8</span></td>
		</tr>
		<tr class="title" border="1">
			<td colspan="2">Sender</td>
			<td colspan="3">Receiver</td>
		</tr>
		<tr>
			<td colspan="2" class="no_border">Name:&nbsp;<span class="info"><?php echo $from;?></span></td>
			<td colspan="3" class="no_border">Name:&nbsp;<span class="info"><?php echo $to;?></span></td>
		</tr>
		<tr>
			<td colspan="2" class="no_border">GSTIN:&nbsp;<span class="info"><?php echo $gst;?></span></td>
			<td colspan="3" class="no_border">GSTIN:&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2" class="no_border">Pincode:&nbsp;</td>
			<td colspan="3" class="no_border">Pincode:&nbsp;</td>
		</tr>
		<tr>
			<td colspan="5"></td>
		</tr>
		<tr class="center">
			<td>Particulars</td>
			<td>VPP Amount</td>
			<td>No of Parcels</td>
			<td>Weight(KG)</td>
			<td>Charges</td>
		</tr>
		<tr class="center">
			<td><span class="info"><?php echo end(explode("_",$type));?></span></td>
			<td><span class="info"><?php echo $vpp;?></span></td>
			<td><span class="info"><?php echo $parcel;?></span></td>
			<td><span class="info"><?php echo $kg;?> KG</span></td>
			<td><span class="info"> <?php if($cc_status == paid){ echo  $total;}else{echo "To Pay";}?></span></td>
		</tr>
		<tr>
			<td colspan="5" class="no_border">Deliver to:</td>
		</tr>
	</table>


</body>
</html>

