@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>របាយការណ៍សាច់ប្រាក់ក្នុងធនាគា</h3>
								</div>
								<div class="clear"></div>
								<div class="border-bottom"></div>
								<div class="table">
									<table>
										<thead>
											<tr>
					                            <th>No</th>
					                            <th>Date</th>
					                            <th>Type</th>
					                            <th>Reference</th>
					                            <th>User By</th>
					                            <th>Cash In</th>
					                            <th>Cash Out</th>
					                        </tr>
										</thead>
										<tbody>
											@foreach($cash_in_bank as $key => $value)
											<tr>
												<td>{{$key+1}}</td>
												<td>{{date('Y-m-d',strtotime($value->do_date))}}</td>
												<td>{{$value->journal_type}}</td>
												<td>{{$value->invoice}}</td>
												<td>{{$value->user_by}}</td>
												<td>${{number_format($value->cash_in,2)}}</td>
												<td>${{number_format($value->cash_out,2)}}</td>
											</tr>
											@endforeach()
										</tbody>
										<tfoot>
											<tr>
												<th colspan="5">Total :</th>
												<th>${{number_format($cashIN,2)}}</th>
												<th>${{number_format($cashOut,2)}}</th>
											</tr>
											<tr>
												<th colspan="5">Balance :</th>
												<th colspan="2">${{number_format($total,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


