<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<link type="text/css" href="{{public_path()}}/dompdf-assets/receipts.css" rel="stylesheet" />
	<title>Agent Commission Summary</title>
	<style type="text/css">
		table.receipt-content tr td{padding: 3px 10px;}
		.line-height-1 {line-height: 10px!important;}
		.line-height-12{line-height: 12px!important;}
		.margin-right-10{margin-right: 10px!important;}
	</style>
</head>
<!-- Page 1 of 1 -->
<body class="exo2-regular position-relative">
	<div id="page-background" class="overlay">
        <!-- <img src="images/progress-report-bg.jpg" height="100%" width="100%" style="position: absolute; width: 100%;z-index: -1;"> -->
     </div> 
	<div>
		<div class="col-xs-12 no-padding position-relative">
			<div class="clearfix" style="height: 20px;"></div>
			<div class="pdf-wrapper proximanova-regular">
				<div class="pdf-header" style="border: 0!important;">
                  <div>
						<table width="100%">
							<tr>
								<td width="50%" valign="top">
									<div class="eti-logo">
										<img src="{{public_path()}}/dompdf-assets/images/dps_logo.png" alt="" style="width: 260px;">
									</div>
								</td>
								<td width="50%" valign="top">
                                    <p class="primary-font-color px-14-font line-height-1 europa-bold">DAVAO PROPERTY SOLUTIONS</p>
									<p class=" px-12-font line-height-1">2F, LDI Bulding, #20 Road 1 corner Surveyor St.,</p>
									<p class=" px-12-font line-height-1">Dona Vicenta Village Bajada Davao City</p>
									<p class=" px-12-font line-height-1">(082) 327-3608</p>
									<p class=" px-12-font line-height-1">www.davaopropertysolutions.com</p>
								</td>
							</tr>
						</table>
				</div>
				</div>
				<div class="pdf-wrapper pdf-body">
				    <div class="clearfix" style="height: 15px;"></div>
					<p class="primary-font-color px-24-font line-height-1">AGENT COMMISSION SUMMARY</p>
					<div class="clearfix" style="height: 15px;"></div>
						<div class="clearfix"></div>
						<div class="clearfix" style="height: 15px;"></div>
						<table width="100%" class="receipt-content px-14-font line-height-1">
							<tr style="background-color: #525252!important;color: #ffffff;">
								<td width="12%">Month</td>
								<td width="12%">Year</td>
								<td width="20%">Agent Name</td>
								<td width="18%">Position</td>
								<td width="15%" class="text-right">Total Commission</td>
								{{--<td width="15%" class="text-right">Net Selling</td>--}}
							</tr>
							@foreach($rpts as $rpt)
								<tr>	
									{{--<td>{{ Carbon\Carbon::createFromFormat('Y-m-d H:i:s',$rpt->reservation_date)->format('d/m/Y') }}</td>--}}
									<td>{{ $rpt->mmonth }}</td>
									<td>{{ $rpt->yyear }}</td>
									<td>{{ $rpt->fullname }}</td>
                                    <td>{{ $rpt->position }}</td>
									<td class="text-right">{{ number_format($rpt->ttl_com_rate - ($rpt->ttl_com_rate * 0.13),2) }}</td>
								</tr>
							@endforeach
						</table>
						<div class="clearfix" style="height: 10px;"></div>
						<div style="border-bottom: dotted #555555!important; width: 100%;"></div>
						<table width="100%" class="total-payment px-14-font line-height-1">
							<tr>
								{{--<td width="50%" valign="top">
									<table width="100%" class="total-payment px-14-font line-height-1">
										<tr>
											<td width="50%" class="text-justify px-10-font" style="padding-right: 10px;">
												{{--<span class="europa-bold">Note:</span>
												 {{--INSTALLMENT PAID FOR <span>{{ $data['id'] }} {{ strtoupper($data['email']) }}</span>
											</td>
										</tr>
									</table>
								</td>--}}
								{{--<td width="100%"></td>
								<td width="100%"></td>
                                <td width="50%"></td>--}}
								<td width="100%" valign="top">
									<table width="100%" class="total-payment px-14-font europa-bold" style="padding: 5px;">
										<tr>
										    <td width="75%"></td>
                                            {{$ttl_agent_comm = 0}}

                                            @foreach($rpts as $rpt)
                                                {{ $ttl_agent_comm += $rpt->ttl_com_rate - ($rpt->ttl_com_rate * 0.13) }}

                                            @endforeach
                                            <td>TOTAL</td>
											<td class="text-right">{{number_format($ttl_agent_comm, 2)}}</td>
											{{--<td class="text-right">{{number_format($net_sell, 2)}}</td>--}}
											{{--<td class="text-right"> {{ $data->currency }} {{ number_format($sum_pays,2) }}</td>--}}
										</tr>
									</table>
								</td>
							</tr>
						</table>
				</div>
			</div>
			<div class="pdf-footer">
					<!-- This is footer section	 -->
			</div>
		</div>
	</div>
</body>
<!-- End Page 1 of 1 -->
</html>