<?php $__env->startSection('css'); ?>
<style>
	@import  url('https://fonts.googleapis.com/css?family=Moul&display=swap');
	@media  print {
		.title h1,.title p
		{
			color: #051f7d!important;
		}
		div.layout-print {
			margin: 10px 0 10px 0;
		}
		div.layout-print .header .title {
			margin-bottom: 5px!important;
		}
		.layout-print .blog {
			height: 35px!important;
		}
		.layout-print .border-bottom {
			margin-bottom: 15px!important;
		}
		.footer {
			position: fixed;
			left: 0;
			bottom: 0;
			text-align: center;
		}
		.borderss
		{
			width: 50%;
		}
		.borders1
		{
			border: 1px solid #000000!important;
		}
	}
	div.title h1
	{
		text-align: center;
	}
	.title h1
	{
		color: #000000 !important;
		font-family: 'Moul', cursive;
		padding-top: 10px;
	}
	.tables{
		width: 100%;
	}
	.border-round{
		border: solid 1px #000000;
	}
	.table {
		width: 99%;
		max-width: 100%;
		margin-bottom: 10px;
	}
	.table-col {
		width: 99.4%;
		max-width: 100%;
		margin-bottom: 20px;
		margin-top: -20px;
		height: 70px;
		vertical-align: middle;
		margin-left: 10px;
	}
	.title h2
	{
		color: #000000 !important;
		font-family: 'Moul', cursive;
		/*text-align: right;*/
		font-size: 12px;
		padding-top: -10px;
		line-height: 0px;
	}
	.titles p b
	{
		color: #000000 !important;
		font-family: 'Moul', cursive !important;
	}
	.titles1 p
	{
		color: #000000 !important;
		font-family: 'Moul', cursive !important;
		padding-left: 20px;
		font-size: 10px;
	}
	.font
	{
		font-family: 'Khmer OS Battambang', cursive;
		vertical-align: middle !important;
		font-size: 14.8px !important;
		border: 1px solid #000000 !important;
	}
	.heights
	{
		height: 50px;
	}
	.borderss
	{
		width: 50%;

	}
	.borders1
	{
		border: 1px solid #000000 !important;
	}
	.font-styles
	{
		font-style: italic !important;
	}
	div .heid
	{
		line-height: 35px;
	}
	.title p
	{
		color: #000000 !important;
		margin-top: 5px;
		text-align: center;
	}
	.phone
	{
		margin-top: 10px;
		margin-right: 15px!important;
	}
	label
	{
		color: #5a5a59!important;
		font-weight: normal!important;
	}
	p.account,p.receive,p.paid
	{
		margin-bottom: -20px!important;
		text-align: center!important;
	}
	.col-account{
		margin-left: 15px!important;
		margin-right: 0!important;
		margin-bottom: 10px;
	}
	.col-receive
	{
		margin-left: -5px!important;
		margin-bottom: 10px;
	}
	.col-paid
	{
		margin-left: -15px!important;
		margin-bottom: 10px;
	}
	.input.input-remark {
		margin-left: 26px;
		width: 97%;
	}
	.acc-fill
	{
		border-bottom: 2px solid #BDBDBD;
		width: 50%;
		margin-left: 65px!important;
	}
	.rec-fill
	{
		border-bottom: 2px solid #BDBDBD;
		width: 50%;
		margin-left: 65px!important;
	}
	.pad-fill
	{
		border-bottom: 2px solid #BDBDBD;
		width: 50%;
		margin-left: 65px!important;
	}
	.layout-print .footer-deposit {
		float: left;
		width: 100%;
	}
	.footer {
		left: 0;
		bottom: 0;
		text-align: center;
		color: #000000 !important;
	}
	.line-footer {
		border:solid 1px #fdca10 ;
		margin-bottom: 10px;
	}
	div.layout-print,div.title{
		font-size: 15px !important;
	}
</style>

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

<style>
	*{ 
		color-adjust: exact !important;  
		-webkit-print-color-adjust: exact !important; 
		print-color-adjust: exact !important; 
		}
		table td.color-bright-yellow {
			background-color: rgb(218, 210, 195) !important;
		}
		table td.origin-color {
			background-color: rgb(218, 163, 101) !important;
		}
		.borders1
		{
			border: 1px solid #000000!important;
			margin-left: 17px !important;
			width: 210px !important;
		}
		div.layout-print,div.title{
			font-size: 15px !important;
		}
	@media  print {
		
		.title h1,.title p
		{
			color: #051f7d!important;
		}
		div.layout-print {
			margin: 20px 0 20px 0!important;
		}
		div.layout-print .header .title {
			margin-bottom: 5px!important;
			
		}
		.layout-print .blog {
			height: 35px!important;
		}
		.layout-print .border-bottom {
			margin-bottom: 15px!important;
		}
		.footer {
			position: fixed;
			left: 0;
			bottom: 0;
			text-align: center;
		}
		.font
		{
			font-family: 'Khmer OS Battambang', cursive;
			vertical-align: middle !important;
			font-size: 14.8px !important;
			border: 1px solid #000000 !important;
		}
		.borderss
		{
			width: 50%;
		}
		.borders1
		{
			border: 1px solid #000000!important;
			margin-left: 17px !important;
			width: 210px !important;
		}
		table td.color-bright-yellow {
			background-color: rgb(240, 223, 192) !important;
		}
		div.layout-print,div.title{
			font-size: 15px !important;
		}
		.title h5{
			font-size: 16px !important;
		}
	}
</style>

<?php $__env->startSection('content'); ?>
<script>
    function myFunction() {
        window.print();
    }
</script>
<div class="main-content-wrapper">
		<div class="main-box">
			<div class="main-content">
				<div class="container">
					<div class="page">
						<div class="row">
							<div class="layout-print">
								<div><button class="btn btn-primary hidden-print pull-right" onclick="myFunction()"><span class="glyphicon glyphicon-print" aria-hidden="true"></span> Print</button></div>
								<div class="row">
									<div class="col-sm-12">
										<div class="logo"><br>
											<img src="<?php echo e(asset('assets/images/resize')); ?>/<?php echo e($branch->branch_img); ?>" alt="" width="170px">
										</div>
										<div class="title">
											<br>
											<h1>បង្កាន់ដៃទទួលប្រាក់កក់</h1>
											<p><b>OFFICIAL RECEIPT</b></p>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-sm-9 col-xs-9">
										<div class="title">
							
										</div>
									</div>
									<div class="col-sm-3 col-xs-3">
										<div class="title">
											<h2><b>លេខបង្កាន់ដៃ  : <?php echo e($invoice[0]->no); ?></b></h2>
											<h2><b>កាលបរិច្ឆេទ  : <?php echo e(date('d-m-Y')); ?></b></h2>
										</div>
									</div>
							
								</div>
								<div class="row">
									<br>
									<?php 
										$data = DB::table("nso007_deposit")->where("deposit_saleid",$invoice[0]->sale_id)->get(); 
										$num = 1;$paid_amount = 0;
										if(!empty($data))
										{
											if(count($data)>0){
												foreach($data as $key=>$value)
												{
													$paid_amount += $value->deposit_amount;
													if($value->id==$invoice[0]->deposit_id)
													{
														$num = $key+1;
														break;
													}
												}
											}
										}
									?>
									<table class="tables">
										<tr>
											<td class="borderss">
												<table class="table">
													<tr>
														<td width="30%" class="font">គម្រោង</td>
														<td width="70%" align="center" colspan="4" class="font"><b><?php echo e($invoice[0]->project_name); ?></b></td>
													</tr>
													<tr>
														<td class="font">ប្រភេទផ្ទះ</td>
														<td class="font"><b><?php echo e($invoice[0]->sub_category_name); ?></b></td>
														<td class="font">កូដ</td>
														<td class="font"><b><?php echo e($invoice[0]->sub_category_code); ?></b></td>
													</tr>
													<tr>
														<td class="font">លេខផ្ទះ</td>
														<td class="font"><b><?php echo e($invoice[0]->item_house); ?></b></td>
														<td class="font">ផ្លូវលេខ</td>
														<td class="font"><b><?php echo e($invoice[0]->item_street); ?></b></td>
													</tr>
													<tr>
														<td class="font">ឈ្មោះអតិថិជន</td>
														<td align="center" colspan="4" class="font"><b><?php echo e($invoice[0]->client_fullname); ?></b></td>
													</tr>
													<tr>
														<td class="font">លេខទូរស័ព្ទ</td>
														<td align="center" colspan="4" class="font"><b><?php echo e($invoice[0]->client_phone1); ?> <?php echo e(!empty($invoice[0]->client_phone2)?",".$invoice[0]->client_phone2:""); ?></b></td>
													</tr>
													<tr>
														<td class="font">សម្គាល់</td>
														<td align="center" colspan="4" class="font"><b><?php echo e($invoice[0]->deposit_remark); ?></b></td>
													</tr>
												</table>
											</td>
											<td class="borderss">
												<table class="table">
													<tr>
														<td width="30%" class="font">កាលបរិច្ឆេទទិញ</td>
														<td width="30%" class="font"><b><?php echo e(date('d-m-Y',strtotime($invoice[0]->sale_date))); ?></b></td>
														<td width="30%" class="font">ថ្ងៃប្រគល់ផ្ទះ</td>
														<td width="10%" class="font"></td>
													</tr>
													<tr>
														<td class="font">ប្រភេទបង់ប្រាក់</td>
														<td align="center" class="font" colspan="4"><b>
															<?php if(!empty($payment_policy)): ?>
																<?php echo e($payment_policy); ?> 
																<?php if(!empty($payment_policy_detail)): ?>
																	(<?php echo e($payment_policy_detail); ?>)
																<?php endif; ?>
															<?php endif; ?></b></td>
													</tr>
													<tr>
														<td class="font">ចាប់ផ្តើមបង់ប្រាក់</td>
														<td class="font"><b></b></td>
														<td class="font">បង់ប្រាក់ចុងក្រោយ</td>
														<td class="font"><b></b></td>
													</tr>
													<tr>
														<td class="font">តម្លែផ្ទះ</td>
														<td colspan="4" class="font">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$ </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b><?php echo e(number_format($invoice[0]->sale_amount-$invoice[0]->sale_discount,2)); ?></b>
																</div>
															</div>
														</td>
													</tr>
													<tr>
														<td class="font">ប្រាក់បានបង់សរុប</td>
														<td colspan="4" class="font">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$ </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b><?php echo e(number_format($paid_amount,2)); ?></b>
																</div>
															</div>
														</td>
													</tr>
													<tr>
														<td class="font">ប្រាក់នៅសល់</td>
														<td colspan="4" class="font">
															<div class="row" style="">
																<div class="col-sm-4 col-xs-4">
																	<b>$ </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b><?php echo e(number_format($invoice[0]->sale_amount-$invoice[0]->sale_discount- $paid_amount,2)); ?></b>
																</div>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<table class="tables">
										<tr>
											<td class="borderss">
												<table class="table">
													<tr>
														<td width="30%" class="font">បង់សម្រាប់</td>
														<td width="70%" align="center" colspan="3" class="font"><b>ការកក់ប្រាក់លើកទី <?php echo e($num); ?></b></td>
													</tr>
													<tr>
														<td class="font">ថ្ងៃត្រូវបង់ប្រាក់</td>
														<td align="center" colspan="3" class="font color-bright-yellow"><?php echo e(!empty($invoice[0]->deposit_date)?date("d-m-Y",strtotime($invoice[0]->deposit_date)):date("d-m-Y")); ?></td>
													</tr>
													<tr>
														<td class="font">ទឹកប្រាក់ត្រូវបង់</td>
														<td align="center" colspan="3" class="font color-bright-yellow"><b>$<?php echo e(number_format($invoice[0]->sale_deposit,2)); ?></b></td>
													</tr>
													<tr>
														<td class="font" colspan="4">ប្រភេទបង់ប្រាក់៖</td>
													</tr>
													<tr>
														<?php if($invoice[0]->payment_type==1): ?>
															<td align="center" class="font"><input type="checkbox" checked></td>
														<?php else: ?>
															<td align="center" class="font"><input type="checkbox"></td>
														<?php endif; ?>
														<td colspan="4" class="font">សាច់ប្រាក់</td>
													</tr>
													<tr>
													
														<?php if($invoice[0]->payment_type==3): ?>
															<td align="center" class="font"><input type="checkbox" checked></td>
														<?php else: ?>
															<td align="center" class="font"><input type="checkbox"></td>
														<?php endif; ?>
														<td colspan="4" class="font">មូលប្បទានប័ត្រធនាគារ: <?php echo e(optional(DB::table('nso007_bank')->where("id",$invoice[0]->bank_cheque)->first())->name); ?> <br/>លេខ: <?php echo e($invoice[0]->cheque_number); ?></td>
													</tr>
												</table>
											</td>
											<td class="borderss">
												<table class="table">
													<tr>
														<td width="30%" class="font">បង់លើកទី</td>
														<td width="70%" align="center" colspan="3" class="font"><b><?php echo e($num); ?></b></td>
													</tr>
													<tr>
														<td class="font">ថ្ងៃបង់ជាក់ស្តែង</td>
														<td colspan="3" class="font color-bright-yellow" align="center"><?php echo e(!empty($invoice[0]->deposit_date)?date("d-m-Y",strtotime($invoice[0]->deposit_date)):date("d-m-Y")); ?></td>
													</tr>
													<tr>
														<td class="font">ប្រាក់ដើម</td>
														<td class="font" colspan="2">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$<?php echo e(number_format($invoice[0]->sale_deposit,2)); ?></b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b></b>
																</div>
															</div>
														</td>
														<td class="font origin-color" rowspan="2">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$<?php echo e(number_format($invoice[0]->sale_deposit,2)); ?> </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b></b>
																</div>
															</div>
														</td>
													</tr>
													<tr>
														<td class="font">ការប្រាក់</td>
														<td class="font" colspan="2">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$0 </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b></b>
																</div>
															</div>
														</td>
													</tr>
													<tr>
														<td class="font">ប្រាក់ពិន័យ</td>
														<td colspan="2" class="font">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$0 </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b></b>
																</div>
															</div>
														</td>
														<td class="font color-bright-yellow">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$0 </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b></b>
																</div>
															</div>
														</td>
													</tr>
													<tr>
														<td class="font">សរុបទឹកប្រាក់បានបង់</td>
														<td colspan="2" class="font">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$<?php echo e(number_format($invoice[0]->sale_deposit,2)); ?> </b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b></b>
																</div>
															</div>
														</td>
														<td class="font origin-color">
															<div class="row">
																<div class="col-sm-4 col-xs-4">
																	<b>$<?php echo e(number_format($invoice[0]->sale_deposit,2)); ?></b>
																</div>
																<div style="text-align: right !important;text-decoration: underline !important;"  class="col-sm-8 col-xs-8">
																	<b></b>
																</div>
															</div>
														</td>
													</tr>
												</table>
											</td>
										</tr>
									</table>
									<table class="table-col">
										<tr>
											<td class="font">
												<div class="row">
													<div style="padding-top: 10px;padding-left: 61px;" class="col-sm-2 col-xs-2">
														<?php if($invoice[0]->payment_type==2): ?>
															<input type="checkbox" checked>
														<?php else: ?>
															<input type="checkbox">
														<?php endif; ?>
													</div>
													<div class="col-sm-10 col-xs-10">
														អ្នកផ្ទេរប្រាក់តាមរយៈធនាគារ <?php echo e(optional(DB::table('nso007_bank')->where("id",$invoice[0]->from_bank)->first())->name); ?> ,លេខ <?php echo e($invoice[0]->from_account_bank); ?> <br/>ផ្ទេរចូលគណនីធនាគារ <?php echo e(optional(DB::table('nso007_bank')->where("id",$invoice[0]->to_bank)->first())->name); ?> ,លេខ <?php echo e($invoice[0]->to_account_bank); ?> 
													</div>
												</div>
												<div class="row">
													<div align="center" class="col-sm-2 col-xs-2">
							
													</div>
													<div class="col-sm-10 col-xs-10">
														
													</div>
												</div>
											</td>
										</tr>
									</table>
							
								</div>
							
								<div class="row">
									<div class="col-12">
										<div class="titles">
											<p><b>សម្គាល់៖</b></p>
										</div>
										<div style="font-family: 'Khmer OS Muol Light';font-size:80% !important;line-height: 20px !important;">
											<span style="display: block;">* ក្នុងករណីបង់ប្រាក់ពុំទៀងទាត់នឹងត្រូវផាកពិន័យដូចមានចែងក្នុងកិច្ចសន្យាទិញលក់ផ្ទះ។</span>
											<span style="display: block;float: left;">* </span><span style="margin-left: 10px;display: block;">រាល់ការបង់ប្រាក់ជាមូលប្បទានប័ត្រ នឹងអាចមានសុពលភាពលុះត្រា តែទឹកប្រាក់នៅក្នុងមូលប្បទានប័ត្រនោះត្រួវបានដាក់បញ្ចូលក្នុងគណនីរបស់លោកឧកញ៉ា ថៃ ឈុនគ្រី រួចរាល់។</span>
											<span style="display: block;">* ធនាគារកាណាឌីយ៉ា (Canadia Bank )  ថៃ ឈុនគ្រី អ៊ីមផត អ៊ិចផត ខូអិលធីឌី លេខ 0010004401986</span>
											<span style="display: block;">* ធនាគារធនាគារ​វឌ្ឍនៈ​ អាស៊ី​ ចំកាត់​ (ABA Bank)  Thai Chhunkry Import and Export Co Ltd លេខ 001286899</span>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-12">
										<div class="row" style="margin-bottom: -20px !important;">
											<br>
											<div class="col-12">
												<div align="center" class="col-sm-2 col-xs-2 borders1">
													<br/>
													<p>ស្នាមមេដៃអ្នកប្រគល់</p>
													<div class="signature">
														<br>
														<br>
														<br>
													</div>
							
													<p>ឈ្មោះ................................</p>
													<p>ម្ចាស់ផ្ទះ..............................</p>
													<p>ថ្ងៃទី…………………..........</p>
												</div>
												
												<div align="center" class="col-sm-2 col-xs-2 borders1">
													<br/>
													<p>ស្នាមមេដៃអ្នកទទួល</p>
													<div class="signature">
														<br>
														<br>
														<br>
													</div>
							
													<p>ឈ្មោះ................................</p>
													<p>តួនាទី…………………........</p>
													<p>ថ្ងៃទី…………………..........</p>
												</div>
												
												<div align="center" class="col-sm-2 col-xs-2 borders1">
													<br/>
													<p>អ្នកត្រួតពិនិត្យ</p>
													<div class="signature">
														<br>
														<br>
														<br>
													</div>
							
													<p>ឈ្មោះ................................</p>
													<p>តួនាទី…………………........</p>
													<p>ថ្ងៃទី…………………..........</p>
												</div>
												
												<div align="center" class="col-sm-2 col-xs-2 borders1">
													<br/>
													<p>ឯកភាព</p>
													<div class="signature">
														<br>
														<br>
														<br>
													</div>
							
													<p>ឈ្មោះ................................</p>
													<p>តួនាទី…………………........</p>
													<p>ថ្ងៃទី…………………..........</p>
												</div>
											</div>
										</div>
									</div>
								</div>
							
								<div class="row">
									<div class="col-12">
										<div style="text-align: center;margin-top:45px !important;">
											<div class="line-footer">
											</div>
											<p>ការិយាល័យស្ថិតនៅ#S26,27 ផ្លូវបេតុង ភូមិច្រេស សង្កាត់គោកឃ្លាំង ខណ្ឌសែនសុខ រាជធានីភ្នំពេញ</p>
											<p>ទូរស័ព្ទ (855)85 789 996 / 89 978 789 / 96 8 789 966 / 96 9 899 789</p>
											<p>Facebook Page :បុរី ថៃ ឈុនគ្រី Borey Thai Chhunkry</p>
										</div>
									</div>
								</div>
							
							
							</div>
						</div>

					</div>
				</div>
			</div>
		</div>
	</div>

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



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