 
<?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>
                                <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($data['deadline_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['penalty_banus']->banus_amount)?$data['penalty_banus']->banus_amount:"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']->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['penalty_banus']->penalty_amount)?$data['penalty_banus']->penalty_amount:"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"></div>
                                    </div>
                                </div>
                                <?php 
                                    $total_amount = 0;
                                    $total_balance_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_balance_amount+=$value->amount - $value->get_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("$".number_format($value->amount,2)); ?></td>
                                                <td><?php echo e("$".number_format($value->get_amount,2)); ?></td>
                                                <td><?php echo e("$".number_format(($value->amount - $value->get_amount),2)); ?></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("$".number_format($total_amount,2)); ?></td>
                                                <td><?php echo e("$".number_format($total_get_amount,2)); ?></td>
                                                <td><?php echo e("$".number_format($total_balance_amount,2)); ?></td>
                                                <td colspan="4"​></td>
                                            </tr>
                                            <tr>
                                                <td colspan="2" style="text-align: center;">Grand Total</td>
                                                <td colspan="4"​><?php echo e("$".number_format(($total_get_amount - (!empty($data['penalty_banus']->penalty_amount)?$data['penalty_banus']->penalty_amount:0) + (!empty($data['penalty_banus']->banus_amount)?$data['penalty_banus']->banus_amount:0)),2)); ?></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(); ?>