<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Invoice V1</title>
	<?php echo HTML::style('css/installment.css'); ?>

    <style media="print">
    @page  {
        size: A4;
        margin-top: 10px !important;
        margin: 10px;
        margin-left: 10px;

    }
    body { font-size: 12px !important; color: #000 !important; }
    img { width: 150px !important; }
    hr { border-color: #333333!important; margin-top: 0; margin-bottom: 0;}
        /*.table-nobordered { border: 1px solid #333333 !important; }*/
        .table-nobordered th, .table-nobordered td { border: 0 !important;  padding: 5px; color: #000 !important;}
        .table-nobordered { margin-bottom: 5px; }
        table, th, td { border-color: #333333 !important; padding: 5px !important; color: #000 !important;}
        th { border-bottom-width: 1px !important;}
        h2 { font-family: "Khmer OS Muol";}
        h2, h3, p { text-align: center; }
        h2 { font-size: 22px !important; margin-bottom: 5px !important; }
        h3 { font-size: 18px !important; margin-top: 0 !important; }
        p { margin: 5px !important; color: #000 !important;}
        table.table-paid{
            border: 1px solid #333;
        }
        table th { font-weight: bold !important; }
        .table-paid th, .table-paid td{
            border: 1px solid #333;
        }
        .table-paid tr td:last-child{
            border-right: none;
        }
        .strike-trough{
            position: relative;
        }
        .strike-trough:after{
            content: '';
            display: block;
            border-bottom: 1px solid #333;
            right: 0;
            position: absolute;
            left: 0;
            padding-top: 20px;
            margin-left: 15px;
            margin-right: 15px;
        }
        .logo { padding-top: 30px; padding-bottom: 40px; }
    </style>
    <style>
        hr { border-color: #333333!important; margin-top: 0; margin-bottom: 0;}
        /*.table-nobordered { border: 1px solid #333333 !important; }*/
        .table-nobordered th, .table-nobordered td { border: 0 !important; }
        table, th, td { border-color: #333333 !important;}
        th { border-bottom-width: 1px !important;}
        h2 { font-family: "Khmer OS Muol";}
        h2, h3, p { text-align: center; }
        table.table-paid{
            border: 1px solid #333;
        }
        .table-paid th, .table-paid td{
            border: 1px solid #333;
        }
        .table-paid tr td:last-child{
            border-right: none;
        }
        .strike-trough{
            position: relative;
        }
        .strike-trough:after{
            content: '';
            display: block;
            border-bottom: 1px solid #333;
            right: 0;
            position: absolute;
            left: 0;
            padding-top: 20px;
            margin-left: 15px;
            margin-right: 15px;
        }
        .logo { padding-top: 30px; padding-bottom: 40px; }
		.company_banner {
			padding: 5px;}
		.installment-title { border-bottom: 1px solid #000; padding-bottom: 5px; }
        .header { text-align: center;}
        .header p { margin-bottom: 5px !important;}
		<?php echo get_config("custom_style"); ?>

    </style>
</head>

<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-3" >
				<?php echo HTML::image(get_config('company_logo'), "Logo", ['width' => '200px;', 'class' => 'logo']); ?>

			</div>
			<div class="col-xs-6">
				<div class="header">
                    <h2><?php echo get_config('company_name'); ?></h2>
                    <h3 style="margin-top: 10px; text-transform: uppercase;"><?php echo get_config('company_name_en'); ?></h3>
                    <p><?php echo get_config('company_detail'); ?></p>
                    <p><?php echo get_config('company_address'); ?></p>
                    <p>លេខទូរស័ព្ទ: <?php echo get_config('company_tel'); ?></p>
                    <?php if(get_config('company_facebook')): ?>
                        <p>Facebook: <?php echo get_config("company_facebook"); ?></p>
                    <?php endif; ?>
                </div>
			</div>
            <div class="col-xs-3">
				<?php if(!empty(get_config('company_banner'))): ?>
					<?php echo HTML::image(get_config('company_banner'), "Banner", [
						'class' => 'pull-right company_banner img-responsive'
					]); ?>

				<?php else: ?>
          <?php echo HTML::image('uploads/img.jpg', "IMG", ['class' => 'pull-right company_banner']); ?>

				<?php endif; ?>
            </div>
		</div>

		<div class="row">
			<div class="col-xs-12">
				<h3 class="text-left installment-title"><?php echo trans('installments.menu'); ?></h3><br/>
				<table class="table table-bordered table-striped ">
					<tr>
						<th><?php echo Trans('customers.name'); ?></th>
                        <td><?php echo $customer->first_name; ?> <?php echo $customer->last_name; ?></td>
                        <th><?php echo trans('customers.sex'); ?></th>
                        <td><?php echo trans('customers.gender.'.$customer->gender); ?></td>
                        <th><?php echo Trans('customers.dob'); ?></th>
                        <td><?php echo $customer->dob; ?></td>
					</tr>
					<tr>
						<th><?php echo trans('customers.tel'); ?></th>
                        <td><?php echo $customer->tel; ?></td>
                        <th><?php echo Trans('customers.age'); ?></th>
                        <td><?php echo $customer->age; ?></td>
                        <th><?php echo Trans('customers.id_card'); ?></th>
                        <td><?php echo $customer->id_card; ?></td>
                    </tr>
                    <tr>
                        <th><?php echo Trans('customers.address'); ?></th>
                        <td><?php echo $customer->address; ?></td>
                    </tr>
                    
                    
                </table>
                <h3 class="text-left installment-title"><?php echo trans('installments.waranty_info'); ?></h3>
                <table class="table table-bordered table-striped ">
					<tr>
						<th><?php echo Trans('customers.name'); ?></th>
                        <td><?php echo $guarantor->g_full_name_kh; ?> <?php echo $guarantor->g_full_name_en; ?></td>
                        <th><?php echo trans('customers.sex'); ?></th>
                        <td><?php echo trans('customers.gender.'.$guarantor->gender); ?></td>
                        <th><?php echo Trans('customers.dob'); ?></th>
                        <td><?php echo $guarantor->dob; ?></td>
					</tr>
					<tr>
						<th><?php echo trans('customers.tel'); ?></th>
                        <td><?php echo $guarantor->g_tel; ?></td>
                        <th><?php echo Trans('customers.age'); ?></th>
                        <td><?php echo $guarantor->age; ?></td>
                        <th><?php echo Trans('customers.id_card'); ?></th>
                        <td><?php echo $guarantor->g_id_card_no; ?></td>
                    </tr>
                    <tr>
                        <th><?php echo Trans('customers.address'); ?></th>
                        <td><?php echo $customer->address; ?></td>
                    </tr>
                    <tr>
                        <th><?php echo Trans('customers.note'); ?></th>
                        <td><?php echo $customer->note; ?></td>
                    </tr>
                </table>
			</div>
		</div>
	</div>
   
</body>
<script>
	window.print();
</script>
<?php if(get_config('auto_close_print') == 'yes'): ?>
<script>
    window.close();
</script>
<?php endif; ?>
</html>
