<!-- Content Header (Page header) -->
<section class="content-header">
	<div class="container-fluid">
		<div class="row mb-2">
			<div class="col-sm-6">
				<h1 class="m-0">Payments Receipt</h1>
			</div>

			<div class="col-sm-6">
				<ol class="breadcrumb float-sm-right">
					<li class="breadcrumb-item"><a href="dashboard">Dashboard</a></li>
					<li class="breadcrumb-item"><a href="accounts">Accounts</a></li>
					<li class="breadcrumb-item"><a href="accounts/payment-list">Payments Receipt</a></li>
					<li class="breadcrumb-item active">Preview</li>
				</ol>
			</div>
		</div>
	</div>
</section>

<!-- Main content -->
<section class="content">
	<div class="container-fluid">
		<!-- Small boxes (Stat box) -->
		<div class="row">
			<div class="col-md-12">
				<!-- Invoice content -->
				<div class="invoice p-3 mb-3">
					<!-- title row -->
					<div class="row mb-4">
						<div class="col-12">
							<h4 class="page-header">
								<?php echo $this->session->company_name; ?>
								<small class="float-right">Date:<?php echo date_to_ui( $details['payment_date'] ); ?></small>
							</h4>
							<h3 class="text-center">Payments Receipt</h3>
						</div>
					</div>

					<!-- info row -->
					<div class="row invoice-info mb-4">
						<div class="col-md-6 invoice-col">
							<strong>Payment Receipt #</strong> <?php echo $details['payment_no']; ?><br>
							Date: <?php echo date_to_ui( $details['payment_date'] ); ?><br>
							Memo: <?php echo $details['memo']; ?><br>
							Ref. Employee: <?php if ( count( $emp ) > 0 ) {echo $emp['name'];}?><br>
						</div>

						<div class="col-md-6 invoice-col">
							<strong>Supplier Details</strong><br>
							<?php echo $supplier['name']; ?><br>
							Address:</strong> <?php echo $supplier['address']; ?><br>
							Phone #:</strong> <?php echo $supplier['phone_no']; ?><br>
							Email:</strong> <?php echo $supplier['email']; ?><br>
						</div>
					</div>

					<!-- Table row -->
					<div class="row">
						<div class="col-md-12">
							<table class="table table-bordered table-striped">
								<thead>
									<tr>
										<th>Details</th>
										<th class="col-md-4 text-right">Amount</th>
									</tr>
								</thead>
								<tbody>
									<tr>
										<td>Payment to Supplier</td>
										<td class="col-md-4 text-right"><?php echo number_format( $details['amount'], 2 ); ?></td>
									</tr>
								</tbody>
							</table>
						</div>
					</div>

					<!-- Table row -->
					<div class="row">
						<div class="col-md-12">
							<table class="table table-bordered table-striped">
								<thead>
									<tr>
										<th class="text-center">Grand Total</th>
										<th class="col-md-4 text-right">
											<?php if ( $this->session->currency_symbol_position == 'Before' ) {echo $this->session->currency_symbol;}?><?php echo number_format( $details['amount'], 2 ); ?><?php if ( $this->session->currency_symbol_position == 'After' ) {echo $this->session->currency_symbol;}?>
										</th>
									</tr>
								</thead>
							</table>
						</div>
					</div>

					<!-- This row will not appear when printing -->
					<div class="row no-print">
						<div class="col-md-12">
							<a href="accounts/payment-print/<?php echo $details['id']; ?>" target="_blank" class="btn btn-default"><i class="fa fa-print"></i> Print</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</section>

<div class="clearfix"></div>