 
<?php $__env->startSection('css'); ?>
	<style type="text/css">
	/* size landscape for landscape paper */
		@page{
			size: landscape;
		}
	</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
	<div class="container-print">
		<div class="row">
			<div class="col-md-12">
				<div class="UpperTitle"><img src="<?php echo e(asset('assets/images/resize')); ?>/<?php echo e($branch->branch_img); ?>" alt="Logo">
					<div class="title">
						<h2 class="com-name"><?php echo e($branch->branch_kh); ?></h2>
						<h2><?php echo e($branch->branch_en); ?></h2>
						<h3>Report Contractor Payment History</h3>
					</div>
				</div>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<hr>
			</div>
		</div>
		<div class="row">
			<div class="col-md-12">
				<table class="table table-print" width="100%">
					<tbody>
						<tr>
							<th>No</th>
							<th>Date</th>
							<th>Contractor</th>
							<th>Project</th>
							<th>Zone Name</th>
							<th>Type of house</th>
							<th>Group Work</th>
							<th>Group Task</th>
							<th>Task</th>
							<th>Work commpleted</th>
							<th>Type</th>
							<th>Task Amount</th>
							<th>Paid Amount</th>
						</tr>
						<?php $total_task_amount = 0; $total_paid = 0; ?>
						<?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
						<?php $total_task_amount +=$value->task_amount ; $total_paid += ($value->type==0?$value->amount:$value->cash_advance_amount); ?>
						<tr>
							<td><?php echo e($key+1); ?></td>
							<td><?php echo e(date('d-m-Y',strtotime($value->date))); ?></td>
							<td><?php echo e($value->constructor_name); ?></td>
							<td><?php echo e($value->project_name); ?></td>
							<td><?php echo e($value->block_name); ?></td>
							<td><?php echo e($value->type_of_house); ?></td>
							<td><?php echo e($value->work_group); ?></td>
							<td><?php echo e($value->task_title); ?></td>
							<td><?php echo e($value->task_name); ?></td>
							<td><?php echo e($value->percentage_work_current); ?>%</td>
							<td><?php echo e($value->type==0?"Payment":"Cash advance"); ?></td>
							<td>$<?php echo e(number_format($value->task_amount,2)); ?></td>
							<td>$<?php echo e($value->type==0?number_format($value->amount,2):number_format($value->cash_advance_amount,2)); ?></td>
							
						</tr>
						<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
						<tr class="tr-right">
							<td colspan="11" class="text-right">Total</td>
							<td>$<?php echo e(number_format($total_task_amount,2)); ?></td>
							<td>$<?php echo e(number_format($total_paid,2)); ?></td>
						</tr>
					</tbody>
				</table>
			</div>	
		</div>
		<div class="row">
			<div class="col-md-12">
				<table width="100%"​ class="tb-sign">
					<tr align="right">
						<td>
							<p>ធ្វើនៅ​ <strong>ភ្នំពេញ</strong> ថ្ងៃទី <strong><?php echo e(\Globals::date_khmers(date('Y-m-d'))); ?></strong></p>
							<p style="padding-bottom: 80px;padding-right:40px">ហត្ថលេខា</p>
							<p>______________________</p>
						</td>
					</tr>	
				</table>
			</div>
		</div>
	</div>
<?php $__env->stopSection(); ?>





<?php echo $__env->make('layouts.report-print', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>