<!DOCTYPE html>
<html>
<head>
	<title>Payment Made</title>
	<style type="text/css">
		
	</style>
</head>
<body>
	<div style="padding: 35px;box-shadow: 1px 1px 11px 11px #e4e0e0;margin: 25px;">
		<table style="max-width: 250px;">
			<tr>
				<td style="font-size: 25px;font-weight: 600;"> <?php echo $setings->company_name;?> </td>
			</tr>
			<tr>
				<td> <?php echo $setings->company_address;?> </td>
			</tr>
			<tr>
				<td> GSTIN - <?php echo $setings->gst_no;?> </td>
			</tr>
		</table>
		<br>
		<br>
		<br>
		<hr>
		<table style="width: 100%">
			<tr>
				<td style="text-align: center;font-size: 22px;font-weight: 600;">PAYMENTS MADE</td>
			</tr>
		</table>
		<br>
		<br>
		<br>
		<table style="width: 70%;float: left;margin-left: 30px;">
			<tr style="display: inline-block;margin-bottom: 10px;">
				<td style="width: 170px;">Payment date</td>
				<td style="width: 675px;border-bottom: 1px solid #4039397a;"><?php echo !empty($payment_made_details[0]->payment_date) ? date('d/m/Y',strtotime(str_replace('-', '/', $payment_made_details[0]->payment_date))) : '';?></td>
			</tr>
			<tr style="display: inline-block;margin-bottom: 10px;">
				<td style="width: 170px;">Referance Number</td>
				<td style="width: 675px;border-bottom: 1px solid #4039397a;"><?php echo !empty($payment_made_details[0]->reference) ? $payment_made_details[0]->reference : 'N/A';?></td>
			</tr>
			<tr style="display: inline-block;margin-bottom: 10px;">
				<td style="width: 170px; font-size: 18px;font-weight: 600;">Amount paid</td>
				<td style="width: 675px;border-bottom: 1px solid #4039397a;font-size: 20px;font-weight: 600;">Rs. <?php echo !empty($payment_made_details[0]->amount) ? number_format((float)$payment_made_details[0]->amount, 2, '.', '') : '0.00';?></td>
			</tr>
		</table>
	<!--	<table style="width: 20%;float: right;margin-right: 50px;background: rgba(64, 236, 64, 0.95);display: inline-block;height: 80px;">
			<tbody style="display: inline-block;padding: 16px 50px;">
				<tr>
					<td style="font-size: 18px;font-weight: 600;">
						Amount paid
					</td>
				</tr>
				<tr>
					<td style="font-size: 20px;font-weight: 600;">
						Rs. <?php // echo !empty($payment_made_details[0]->amount) ? number_format((float)$payment_made_details[0]->amount, 2, '.', '') : '0.00';?>
					</td>
				</tr>
			</tbody>
		</table> -->
		<table style="width: 100%;margin-left: 30px;">
			<tr style="display: inline-block;margin-bottom: 10px;">
				<td style="width: 170px;">Paid To</td>
				<td style="width: 850px;border-bottom: 1px solid #4039397a;"><?php echo !empty($vendor_details[0]->name) ? $vendor_details[0]->name : ''?></td>
			</tr>
			<tr style="display: inline-block;margin-bottom: 10px;">
				<td style="width: 170px;">Payment Mode</td>
				<td style="width: 850px;border-bottom: 1px solid #4039397a;"><?php echo ($payment_made_details[0]->payment_type == 1) ? 'CASH' : 'CHEQUE'?></td>
			</tr>
			<tr style="display: inline-block;margin-bottom: 10px;">
				<td style="width: 170px;">Paid Through</td>
				<td style="width: 850px;border-bottom: 1px solid #4039397a;"><?php echo !empty($paid_through_details[0]->account_name) ? $paid_through_details[0]->account_name : '';?></td>
			</tr>
		</table>
		<br>
		<br>
		<br>
		<br>
		<br>
		<br>
		<p style="font-size: 20px;font-weight: 500;margin-left: 30px;">Payment For</p>
		<table style="width: 100%;font-size: 14px;margin-left: 30px;">
			<tr style="background: rgba(222, 224, 226, 0.30980392156862746);font-weight: 500;">
				<td style="width: 40%;">Bill#</td>
				<td style="width: 20%;">Bill Date</td>
				<td style="width: 20%;">Bill Amount</td>
				<td style="width: 20%;">Payment Amount</td>
			</tr>
			<?php if(count($paid_bills_details) > 0){
				foreach ($paid_bills_details as $key => $value) {?>
					<tr style="font-weight: 400;">
						<td style="width: 40%;"><?php echo !empty($value->bill_no) ? $value->bill_no : '';?></td>
						<td style="width: 20%;"><?php echo !empty($value->bill_date) ? date('d/m/Y',strtotime(str_replace('-', '/', $value->bill_date))) : '';?></td>
						<td style="width: 20%;"><?php echo !empty($value->total) ? number_format((float)$value->total, 2, '.', '') : '0.00';?></td>
						<td style="width: 20%;"><?php echo !empty($value->payment) ? number_format((float)$value->payment, 2, '.', '') : '0.00';?></td>
					</tr>
				<?php }
			}?>
			
		</table>
	</div>
	
</body>
</html>