 
<?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 header">
                                <div class="logo">
									<img src="<?php echo e(asset('assets/images/resize')); ?>/<?php echo e($branch->branch_img); ?>" alt="" width="150px">
								</div>
								<div class="title">
									<h2><?php echo e($branch->branch_kh); ?></h2>
									<h2><?php echo e($branch->branch_en); ?></h2>
                                    <h3>វិក័យបត្រដកប្រាក់ការងារមុន</h3>
								</div>
                                <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 +$data_main->duration month"))); ?></div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-2">អ្នកម៉ៅការ:</div>
                                        <div class="col-xs-3 text-left"><?php echo e($data_main->contractor_name); ?></div>
                                        <div class="col-xs-2">តំបន់:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(!empty($data_main->block_name)?$data_main->block_name:""); ?></div>
                                        <div class="col-xs-2"></div>
                                        <div class="col-xs-3 text-left"></div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-2">ទូរស័ព្ទលេខ:</div>
                                        <div class="col-xs-3 text-left"><?php echo e(!empty($data_main->contractor_phone)?$data_main->contractor_phone:""); ?></div>
                                    </div>
                                </div>
                                <?php $total_amount = 0;$total_cash_advance_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->fee_amount;$total_cash_advance_amount+=$value->cash_advance_amount; ?>
                                            <tr>
                                                <td><?php echo e($index+1); ?></td>
                                                <td><?php echo e($value->name); ?></td>
                                                <td><?php echo e(number_format($value->percentage_work_current,2)); ?>%</td>
                                                <td><?php echo e("$".number_format($value->fee_amount,2)); ?></td>
                                                <td><?php echo e("$".number_format($value->cash_advance_amount,2)); ?></td>
                                                <td colspan="4"​></td>
                                            </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td colspan="3" style="text-align: center;">Total</td>
                                                <td><?php echo e("$".number_format($total_amount,2)); ?></td>
                                                <td><?php echo e("$".number_format($total_cash_advance_amount,2)); ?></td>
                                                <td colspan="4"​></td>
                                            </tr>
                                    </tbody>
                                </table>
                                <div class="make-date">
                                    <p>ធ្វើនៅ​ <strong>ភ្នំពេញ</strong> ថ្ងៃទី <strong><?php echo e(\Globals::date_khmers(date('Y-m-d'))); ?></strong></p>
                                </div>
                                
                                <div class="row" style="text-align: center;">
                                    <div class="col-xs-4">រៀបរៀងដោយ</div>
                                    <div class="col-xs-4">ត្រួតពិនិត្យដោយ</div>
                                    <div class="col-xs-4" style="font-weight: bold;">ឯកភាពដោយ</div>
                                </div>
                                <br><br/><br/><br>
                                <div class="row" style="text-align: center;">
                                    <div class="col-xs-4"><p>_________________</p></div>
                                    <div class="col-xs-4"><p>_________________</p></div>
                                    <div class="col-xs-4"><p>_________________</p></div>
                                </div>
                                <div class="row" style="text-align: center;">
                                    <div class="col-xs-4"><p>ប្រធានការរដ្ឋាន</p></div>
                                    <div class="col-xs-4"><p>ប្រធានគម្រោង</p></div>
                                    <div class="col-xs-4"><p>អគ្គនាយករង</p></div>
                                </div>
                            </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(); ?>