 
<?php $__env->startSection('content'); ?>
<style>
    table.m-table th,table.m-table td{
        text-align: center !important;
    }
</style>
<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="form-box">
                                <br/>
                                <center><h2>វិក័យបត្រដកប្រាក់ការងារ</h2></center>
                                <br/>
                                <div class="table">
                                    <div class="row">
                                        <div class="col-xs-2">ឈ្មោះគម្រោង:</div>
                                        <div class="col-xs-3 text-left"><?php echo e($data['main']->project_name); ?></div>
                                        <div class="col-xs-2">ថ្ងៃចាប់ផ្តើមការងារ:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(date('d-m-Y',strtotime($data['main']->start_work_date))); ?></div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-2">អ្នកម៉ៅការ:</div>
                                        <div class="col-xs-3 text-left"><?php echo e($data['main']->constructor_name); ?></div>
                                        <div class="col-xs-2">រយ:ពេលធ្វើ:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(!empty($data['main']->duration)?$data['main']->duration:""); ?></div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-2">ទូរស័ព្ទលេខ:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(!empty($data['main']->constructor_phone)?$data['main']->constructor_phone:""); ?></div>
                                        <div class="col-xs-2">ប្រាក់បន្ថែម:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(!empty($data['main']->total_bonus)?$data['main']->total_bonus:"0"); ?>$</div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-2">តំបន់:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(!empty($data['main']->zone_name)?$data['main']->zone_name:""); ?></div>
                                        <div class="col-xs-2">ប្រាក់ពិន័យ:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(!empty($data['main']->total_penalty)?$data['main']->total_penalty:"0"); ?> $</div>
                                    </div>
                                </div>
                                <?php $total_amount = 0;$total_paid_amount = 0;$total_get_amount = 0; ?>
                                <table style="margin-top: 30px" class="table">
                                    <thead>
                                        <tr>
                                            <th>លរ</th>
                                            <th>ប្រភេទការងារ</th>
                                            <th>ទឹកប្រាក់នៃការងារ</th>
                                            <th>ទឹកប្រាក់បានដកពីមុន</th>
                                            <th>ទឹកប្រាក់ត្រូវដក</th>
                                            <th colspan="4" width="150px">ផ្សេងៗ</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $__currentLoopData = $data['detail']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <?php $total_amount+= $value->amount;$total_paid_amount+=$value->paid_amount;$total_get_amount+=$value->get_amount; ?>
                                            <tr>
                                                <td><?php echo e($index+1); ?></td>
                                                <td><?php echo e($value->name); ?></td>
                                                <td><?php echo e($value->amount); ?></td>
                                                <td><?php echo e($value->paid_amount); ?></td>
                                                <td><?php echo e($value->get_amount); ?></td>
                                                <td colspan="4"​></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td colspan="2" style="text-align: center;">Total</td>
                                                <td><?php echo e($total_amount); ?></td>
                                                <td><?php echo e($total_paid_amount); ?></td>
                                                <td><?php echo e($total_get_amount); ?></td>
                                                <td colspan="4"​></td>
                                            </tr>
                                    </tbody>
                                </table>
                            </div>
						</div>
							
						
					</div>
					
					
				</div>
			</div>
		</div>
	</div>
</div>
<style>
</style>

<?php $__env->stopSection(); ?>



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