PK

ADDRLIN : /home/anibklip/pcfcindia.com/2023-24/accounts/
FLL :
Current File : /home/anibklip/pcfcindia.com/2023-24/accounts/bank_credit.php

<?php
	session_start();
	require_once '../common/common.php';
	require_once '../common/secure.php';
	include("connection.php");
	if($_GET['action']=='tax')
	{
		include ("../head.php");
	}
	else
	{
		include ("../head_account.php");
	}
?>
<script type="text/javascript">
	function empty_field()
	{
		var particular=document.getElementById("particular");
		var amount=document.getElementById("amount");
		var amt_type=document.getElementById("amt_type");
		var amt_details=document.getElementById("amt_details");

		if(particular.value==''){
			alert("Please fill the Particular");
			particular.focus();
			return false;
		}
		if(amount.value==''){
			alert("Please fill the Amount");
			amount.focus();
			return false;
		}
		if(amt_type.value=='select'){
			alert("Please Select the Amount type");
			amt_type.focus();
			return false;
		}
		if(amt_details.value==''){
			alert("Please fill the Details");
			amt_details.focus();
			return false;
		}
	}	
</script>

	<div align="left" style="float:left;"><!-- <a href="tax_report.php">Back</a> --></div> 
	 
	<div align='center'>
		<form action="bank_action.php" method="post">
		
			<table width="100%" border="2px;">
				<tr>
					<td>
						<table width="100%">
							<tr>
								<th colspan="2">Amount</th>
							</tr>
							<tr>
								<td>
								<?php

									if($_GET['detail']=='yes')
									{
										$sql_bankDetails="SELECT * FROM bank_amount WHERE id='".$_GET['bankamtID']."'";
										$result_bankDetails=mysql_query($sql_bankDetails);
										$row_bankDetails=mysql_fetch_array($result_bankDetails);
									}
								
									if($_GET['banktype']=="hdfc"){
										$bankcity="Amritsar";
										$bankType="HDFC";
									}elseif($_GET['banktype']=="pnb"){
										$bankcity="Ludhiana";
										$bankType="Punjab National Bank(PNB)";
									}
								?>	
								<input type="hidden" name="b_city" value="<?=$bankcity; ?>" />
								<input type="hidden" name="bank_name" value="<?=$bankType; ?>" />
								<strong><?=$bankcity; ?></strong></td>
								<td><?=$bankType; ?></td>
							</tr>
							<tr>
								<td><strong>Particular</strong></td>
								<td><input type="text" name="particular" id="particular" value="<?=$row_bankDetails['particular']; ?>" /></td>
							</tr>
							<tr>
								<td><strong>Amount</strong></td>
								<td><input type="text" name="amount" id="amount" value="<?=$row_bankDetails['amount']; ?>" /></td>
							</tr>
							<tr>
								<td width="15%"><strong>Amount type</strong></td>
								<td>
									<?php 
										if($row_bankDetails['amt_type']=='credit')
										{
											$val="selected='selected'";
										}
										elseif($row_bankDetails['amt_type']=='debit')
										{
											$val2="selected='selected'";
										}
									?>
									<select name="amt_type" id="amt_type">
										<option value="select" >-SELECT-</option>
										<option value="credit" <?=$val; ?>>Credit</option>
										<option value="debit" <?=$val2 ?>>Debit</option>
									</select>
								</td>
							</tr>
							<tr>
								<td valign="top"><strong>Details</strong></td>
								<td>
									<textarea name="amt_details" id="amt_details" cols="25" rows="5"><?=$row_bankDetails['details']; ?></textarea>
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td>
									<input type="hidden" name="action" value="add" />
								<?php 
									if($_GET['detail']=='yes')
									{
										//back link
										echo '<input type="button" value="&nbsp;&nbsp;Back&nbsp;&nbsp;"  onclick="history.go(-1);" />';
									}
									else
									{
										echo '<input type="submit" value="Submit" onclick="return empty_field();" />';	
									}
								?>
								</td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</form>	
	</div>
<?php
	include ("../foot.php");
?>


PK 99