<?php
/*
{
	"response": {
		"distributor_tin": "CXX000000YY",
		"message": {
			"num": "INV14",
			"ysdcid": "E000001001",
			"ysdcrecnum": "1001-621B-NS12",
			"ysdcintdata": "ZHSP-XT6O-TGAL-PLE3-UJN3-3RIX-BA",
			"ysdcregsig": "V3JI-JEYR-2YEE-J7IE",
			"ysdcmrc": "00:0C:29:0D:90:D0",
			"ysdcmrctim": "2025/12/09 06:06:12",
			"ysdctime": "2025/12/09 06:06:12",
			"flag": "INVOICE",
			"ysdcitems": "1"
		},
		"qr_code": "https://verification.vat-gh.com?data=Tgwfru4p/COzuGWHqIam5cAil59LdJs/tka6OBoeB9RC795pS53/Q7FTDwxoJBraawLI3uzF2BKd03MgBtPKIIHmAIBiW0WENoJzbIxdXTsKn1kw6fIv4UNpJU5jE18EcHRAkAyRdAcO/pVAvw+8/yA/rsz2jWPuiZgqm75mgSOjA/3Y8oTXGpWCHXlAcXIwcSfeUQgY51lkmaPOTIyXjy8KbfmRCpHGvmWc6PWUeCaE/2ZYLM0UXlB4i49LbdnWCN35LTd8HJbWOSnGYPXU9iB0+ZK8CBF/VBfN8rXhX2U=&v=1.1&t=i",
		"status": "SUCCESS"
	}
}

*/

if (empty($info) || empty($info["rawResp"]) || empty($info["rawResp"]["message"])) {
	return;
}

$rawResp = $info["rawResp"];

?>
		<tr>
			<td class="wrp vat" colspan="2">
			<h4>E-VAT RECEIPT INFORMATION</h4>
		</td>
		</tr>
		<tr>
			<td class="wrp vat">SDC ID</td>
			<td class="wrp vat">&nbsp;&nbsp; : <?php echo $rawResp["message"]["ysdcid"]; ?></td>
			<?php if (!empty($rawResp["qrImg"])) { ?>
				<td class="wrp vat" rowspan="7">
					<img src="<?php echo $rawResp["qrImg"]; ?>" alt="QR Code" />
				</td>
			<?php } ?>
		</tr>
		<tr>
			<td class="wrp vat">Receipt Number</td>
			<td class="wrp vat">&nbsp;&nbsp; : <?php echo $rawResp["message"]["ysdcrecnum"]; ?></td>
		</tr>
		<tr>
			<td class="wrp vat">Internal Data</td>
			<td class="wrp vat">&nbsp;&nbsp; : <?php echo $rawResp["message"]["ysdcintdata"]; ?></td>
		</tr>
		<tr>
			<td class="wrp vat">Signature</td>
			<td class="wrp vat">&nbsp;&nbsp; : <?php echo $rawResp["message"]["ysdcregsig"]; ?></td>
		</tr>
		<tr>
			<td class="wrp vat">MRC</td>
			<td class="wrp vat">&nbsp;&nbsp; : <?php echo $rawResp["message"]["ysdcmrc"]; ?></td>
		</tr>
		<tr>
			<td class="wrp vat">Date & Time</td>
			<td class="wrp vat">&nbsp;&nbsp; : <?php echo $rawResp["message"]["ysdctime"]; ?></td>
		</tr>
		<tr>
			<td class="wrp vat">Line Item Count</td>
			<td class="wrp vat">&nbsp;&nbsp; : <?php echo $rawResp["message"]["ysdcitems"]; ?></td>
		</tr>

