<?php
	include("transaction_type_func.php");
	$edtTxnTypeName = $_SESSION['caller']['args'][1];
	if ($_SESSION['user']['access_level'] < SABLE_ACCESS_MANAGER)
	{
		SableGeneralFunctions::divertFromPage();
	}
	$row = $sableDB->getRow("select * from txn_type where txn_type_name = ".$edtTxnTypeName);

?>
<script src="<?php SableGeneralFunctions::printModuleJS('transaction_type'); ?>"></script>

<!--// Transaction Type -->
<form id="frmTransactionType" name="frmTransactionType" autocomplete="on">
	<input type="hidden" value="<?php echo(SableSystem::sableEncode($hddnTxnTypeId)); ?>" id="hddnTxnTypeId" name="hddnTxnTypeId" />
	<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 Transaction Type</h3>
					<p></p>
				</div>
			</div>
			<!--// edtTxnTypeName -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<input name="edtTxnTypeName" type="text" id="edtTxnTypeName"readonly value="<?php echo($row['txn_type_name']); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_edtTxnTypeName">Txn Type Name</div>
				</div>
			</div>
			<p></p>
			<!-- edtTxnTypeName //-->
			<p></p>
			<!--// cbTxnDebit -->
			<div class="row forms-grid">
				<div class="col-md-4 forms-grid">
					<?php $cbTxnDebit = $row['txn_debit']?"Yes":"No"; ?>
					<input name="cbTxnDebit" type="text" id="cbTxnDebit"readonly value="<?php echo($cbTxnDebit); ?>" >
				</div>
				<div class="col-md-8">
					<div class="fieldHint" id="hint_cbTxnDebit">Debit?</div>
				</div>
			</div>
			<p></p>
			<!-- cbTxnDebit //-->
			<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('/transaction_type/'); ?>'"/>
				</div>
				<div class="col-md-2 forms-grid">
					<input id="btnOk" type="button" onclick="editTransactionType('<?php echo(SableSystem::sableEncode($edtTxnTypeName)); ?>')" value="Modify Transaction Type" class="submit"/>
				</div>
			</div>
		<!-- buttons //-->
		</div>
	</div>
</form>
<!-- Transaction Type //-->
