<?php
	include("netcash_payment_func.php");
	$hddnNpId = $_SESSION['caller']['args'][1];
	if ($_SESSION['user']['access_level'] < SABLE_ACCESS_MANAGER)
	{
		SableGeneralFunctions::divertFromPage();
	}
	$row = $sableDB->getRow("select * from netcash_payment where np_id = ".$hddnNpId);
$selNpUser  = $sableDB->getValue("select user_surname from `user` where user_code = '".$row["np_user"]."'");$selNpPaymentType  = $sableDB->getValue("select pay_type_name from `netcash_pay_type` where pay_type_id = '".$row["np_payment_type"]."'");
?>
<script src="<?php SableGeneralFunctions::printModuleJS('netcash_payment'); ?>"></script>

<!--// Netcash Payment -->
<form id="frmNetcashPayment" name="frmNetcashPayment" autocomplete="on">
	<input type="hidden" value="<?php echo(SableSystem::sableEncode($hddnNpId)); ?>" id="hddnNpId" name="hddnNpId" />
	<div class="forms">
		<div class="container forms-grids">
			<div class="row forms-grid">
				<div class="col-md-12">
					<h3 class="title"><i class="fa fa-eye" aria-hidden="true"></i>&nbsp;View Netcash Payment</h3>
					<p></p>
				</div>
			</div>
			<!--// selNpUser -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="selNpUser" type="text" id="selNpUser"readonly value="<?php echo($selNpUser); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_selNpUser">User</div>
				</div>
			</div>
			<p></p>
			<!-- selNpUser //-->
			<p></p>
			<!--// edtNpDate -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtNpDate" type="date" id="edtNpDate"readonly value="<?php echo($row['np_date']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtNpDate">Date</div>
				</div>
			</div>
			<p></p>
			<!-- edtNpDate //-->
			<p></p>
			<!--// edtNpDescription -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtNpDescription" type="text" id="edtNpDescription"readonly value="<?php echo($row['np_description']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtNpDescription">Description</div>
				</div>
			</div>
			<p></p>
			<!-- edtNpDescription //-->
			<p></p>
			<!--// edtNpAmount -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtNpAmount" type="number" id="edtNpAmount" class="mod" readonly value="<?php echo($row['np_amount']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtNpAmount">Amount</div>
				</div>
			</div>
			<p></p>
			<!-- edtNpAmount //-->
			<p></p>
			<!--// selNpPaymentType -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="selNpPaymentType" type="text" id="selNpPaymentType"readonly value="<?php echo($selNpPaymentType); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_selNpPaymentType">Payment Type</div>
				</div>
			</div>
			<p></p>
			<!-- selNpPaymentType //-->
			<p></p>
		<!--// buttons -->
			<div class="row forms-grid">
				<div class="col-md-2">
					<input type="button" id="btnCancel" value="Cancel"
					class="submit" onclick="window.location = '<?php SableSystem::printCallPageLink('/netcash_payment/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="editNetcashPayment('<?php echo(SableSystem::sableEncode($hddnNpId)); ?>')" value="Modify Netcash Payment" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Netcash Payment //-->
