@extends('layouts.print')
 
@section('content')
<div class="main-content-wrapper">
	<div class="main-box">
		<div class="main-content">
			<div class="container">
				<div class="page">
					<div class="row">
						<div class="report-capital layout-print">
							<div class="header">
								<div class="logo">
									<img src="{{asset('assets/images/resize')}}/{{$branch->branch_img}}" alt="" width="200px">
								</div>
								<div class="title">
									<h2>{{$branch->branch_kh}}</h2>
									<h2>{{$branch->branch_en}}</h2>
									<h3>Report Receivable Note</h3>
								</div>
								<div class="clear"></div>
								<div class="border-bottom"></div>
								<div class="table">
									<table>
										<thead>
						                    <tr class="centers">
												<th>No</th>
												<th>Project Code</th>
												<th>Project Name</th>
												<th>Commission Amount</th>
												<th>Commission Available</th>
												<th>Commission Received</th>
												<th>Commission Owe</th>
						                    </tr>
						                </thead>
										<tbody>
											@foreach($data as $key => $value)
											<tr>
												<td>{{$key+1}}</td>
												<td>{{$value->project_code}}</td>
												<td>{{$value->project_name}}</td>
												<td class="right">$ {{number_format($value->commission_amount,2)}}</td>
												<td class="right">$ {{number_format($value->commission_available,2)}}</td>
												<td class="right">$ {{number_format($value->commission_received,2)}}</td>
												<td class="right">$ {{number_format($value->commission_available-$value->commission_received,2)}}</td>
											</tr>
											@endforeach()
										</tbody>
										<tfoot>
											<tr>
												<th colspan="3">Total</th>
												<th class="right">$ {{number_format($commission_amount,2)}}</th>
												<th class="right">$ {{number_format($commission_available,2)}}</th>
												<th class="right">$ {{number_format($commission_received,2)}}</th>
												<th class="right">$ {{number_format($commission_owe,2)}}</th>
											</tr>
										</tfoot>
									</table>
									<div class="make-date">
										<p>ធ្វើនៅ​ <strong>ភ្នំពេញ</strong> ថ្ងៃទី <strong>{{\Globals::date_khmers(date('Y-m-d'))}}</strong></p>
									</div>
									<div class="sign">
										<h3>ហត្ថលេខា</h3>
										<p>_________________</p>
									</div>
								</div>
							</div>
						</div>
							
						
					</div>
					
					
				</div>
			</div>
		</div>
	</div>
</div>

@endsection


