<?php 

// Include autoloader
require_once 'dompdf/autoload.inc.php';
use Dompdf\Dompdf;
//print_r($_GET);
$dompdf = new Dompdf();
$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'];

$html = '<!DOCTYPE html>
<html>
<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;
		}
		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;
		}
	</style>
</head>
<body>
	<table style="width: 100%; padding: 10px;">
		<tr>
			<td colspan="1" rowspan="5" class="center"><img src="img/sun logo3.png" style="width: 400%;"></td>
			<td colspan="2" rowspan="2" class="center">CONSIGNER'.("'").'S COPY</td>
			<td colspan="1" rowspan="1" class="no_border">Date:&nbsp;<span class="info">'.$date.'</span></td>
		</tr>
		<tr>
			<td colspan="1" rowspan="1" class="no_border">Receipt No.:&nbsp;<span class="info">'.$id.'</span></td>
		</tr>
		<tr>
			<td colspan="2" rowspan="3" class="center"><span class="info">'.$id.'</span></td>
			<td colspan="1" rowspan="1" class="no_border">From:&nbsp;<span class="info">'.$brfrom.'</span></td>
		</tr>
		<tr>
			<td colspan="1" rowspan="1" class="no_border">To:&nbsp;<span class="info">'.$brto.'</span></td>
		</tr>
		<tr>
			<td colspan="1" rowspan="1" class="no_border">Terms:</td>
		</tr>
		<tr class="title" border="1">
			<td colspan="2">Sender</td>
			<td colspan="2">Receiver</td>
		</tr>
		<tr>
			<td colspan="2" class="no_border">Name:&nbsp;<span class="info">'.$from.'</span></td>
			<td colspan="2" class="no_border">Name:&nbsp;<span class="info">'.$to.'</span></td>
		</tr>
		<tr>
			<td colspan="2" class="no_border">GSTIN:&nbsp;</td>
			<td colspan="2" class="no_border">GSTIN:&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2" class="no_border">Pincode:&nbsp;</td>
			<td colspan="2" class="no_border">Pincode:&nbsp;</td>
		</tr>
		<tr>
			<td colspan="4"></td>
		</tr>
		<tr class="center">
			<td>Particulars</td>
			<td>No of Parcels</td>
			<td>Weight(KG)</td>
			<td>Charges</td>
		</tr>
		<tr class="center">
			<td><span class="info">'.$type.'</span></td>
			<td><span class="info">'.$parcel.'</span></td>
			<td><span class="info">'.$kg.' KG</span></td>
			<td><span class="info">Rs '.$total.'</span></td>
		</tr>
		<tr>
			<td colspan="4" class="no_border">Deliver to:</td>
		</tr>
		<tr>
			<td colspan="2">Transporter ID:<span class="color" style="font-weight: bold;">&nbsp;27AAACQ3631Q172</span></td>
			<td colspan="2">EBN No:</td>
		</tr>
	</table>
</body>
</html>';
$dompdf->loadHtml($html);
$dompdf->setPaper('A6', 'landscape');
$dompdf->render();
$dompdf->stream("Sunshine Couriers",array("Attachment"=>0));

?>
