<?php $__env->startSection('content'); ?>
<style>
    .report-capital.layout-print .table tr td {
        font-size: 15px !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="header">
								<div class="logo">
                                    <img src="<?php echo e(asset('assets/images/logo.png')); ?>" alt="" width="200px">
                                </div>
                                <div style="text-align: center;font-family: 'Khmer OS Muol Light'">
                                    <h2><?php echo e($branch->branch_kh); ?></h2>
									<h2><?php echo e($branch->branch_en); ?></h2>
                                </div>
								<div class="title">

									<h3><?php echo e($report); ?></h3>
									<br>
									<h2><small><?php echo e(date('d-m-Y',strtotime($from))); ?> to <?php echo e(date('d-m-Y',strtotime($to))); ?></small></h2>
								</div>
								<div class="clear"></div>
								<div class="border-bottom"></div>
								<div class="table">
									<table>
										<thead>
											<tr>
												<th>Account Name</th>
												<th>Debit</th>
												<th>Credit</th>
											</tr>
										</thead>
										<tbody>
											<?php
												$debit = 0;
												$credit = 0;
											?>
											<?php $__currentLoopData = $account_type; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $type): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
											<?php if(count($trial_balance) > 0): ?>
												<tr>
													<th colspan="3"><?php echo e($type->acc_name); ?></th>
												</tr>
												<?php $__currentLoopData = $trial_balance; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $trial): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
													<?php if($trial->acctype == $type->id): ?>
														<?php
														$id = $trial->id;
														$id = (string) $id;
														$code = $id[0];
														$balance = 0;
														?>
														<?php if($code == 1 || $code == 5): ?>
															<?php
																$balance = $trial->debit - $trial->credit;
																$debit +=$balance;
																if($balance < 0)
																{
																	$balance = "(".abs($balance).")";
																}
															?>
															<tr>
																<td><?php echo e($trial->acc_name); ?></td>
																<td><?php echo e($balance); ?></td>
																<td></td>
															</tr>
														<?php else: ?>
															<?php
																$balance = $trial->credit - $trial->debit;
																$credit +=$balance;
																if($balance < 0)
																{
																	$balance = "(".abs($balance).")";
																}
															?>
															<tr>
																<td><?php echo e($trial->acc_name); ?></td>
																<td></td>
																<td><?php echo e($balance); ?></td>
															</tr>
														<?php endif; ?>
													<?php endif; ?>
												<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
											<?php endif; ?>
											<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
										</tbody>
										<?php
											if($debit < 0)
                                            {
                                                $debit = "(".abs($debit).")";
                                            }
                                            if($credit < 0)
                                            {
                                                $credit = "(".abs($credit).")";
                                            }
										?>
										<?php if(count($trial_balance) > 0): ?>
											<tfoot>
											<tr>
												<th>Total</th>
												<th><?php echo e($debit); ?></th>
												<th><?php echo e($credit); ?></th>
											</tr>
											</tfoot>
										<?php endif; ?>
									</table>
									<div class="make-date">
										<p>ធ្វើនៅ​ <strong>ភ្នំពេញ</strong> ថ្ងៃទី <strong><?php echo e(\Globals::date_khmers(date('d-m-Y'))); ?></strong></p>
									</div>
									<div class="row">
										<div class="col-lg-12 col-sm-12 col-xs-12 tt">
											<div class="col-lg-4 col-sm-4 col-xs-4">
												<p>អ្នកធ្វើបញ្ជី</p>
												<p>ថាយ ម៉ាណែល</p>
											</div>
											<div class="col-lg-4 col-sm-4 col-xs-4">
												<p>អ្នកពិនិត្យ</p>
												<p>_________________</p>
											</div>
											<div class="col-lg-4 col-sm-4 col-xs-4">
												<p>ឯកភាព</p>
												<p>ស៊ីន មុំ យ៉ែន សុខលីន</p>
											</div>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
<style>
	.container {
		width: 420mm !important;
		margin-top: 10px;
	}

	@media  print {

		html,
		body {
			width: 450mm !important;
			margin: 0mm 0 0 0 !important;
			background-color: #FFFFFF;
		}

	}
	@page  {
		size:landscape !important;
	}
</style>
<?php $__env->stopSection(); ?>

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