
PK 
<?php
session_start();
require_once 'common/common.php';
require_once 'common/secure.php';
include "head.php";
include("connexion.php");
?><head>
<script language="JavaScript" type="text/javascript">
<!--
function checkform ( form )
{
// ** START **
if (form.pamount.value == "") {
alert( "Please enter Amount Recieve here.");
form.pamount.focus();
return false ;
}
// ** END **
return true ;
}
//-->
</script>
</head>
<h2 id="icon_pick"><a href="billing.php" class="titletext">Manage Payments </a>
>> Add New Payment</h2>
<br>
<strong> Fill in details for new Payment:</strong>
<table cellspacing="3" align="center" width="100%" border="4" cellpadding="3">
<form action="payadd.php" method="get" onsubmit="return checkform(this);">
<tr><td colspan="2">
Payment Invoice #<strong><?php echo" $id "; ?></strong>
<input type="hidden" name="invoice" value="<?php echo"$_GET[id]"; ?>">
<?php
if($_GET['act']=='pay')
{
$get_ids=$_GET['id'].'/'.$_GET['cid'];
$tureid='tureid';
}
if($_GET['serh_by_ajt']=='true')
{
$true='true';
$get_ids=$_GET['sech_by_ajt'];
}
?>
<input type="hidden" name="serh_by_ajt" value="<?=$true; ?>" />
<input type="hidden" name="srchby_inve" value="<?=$tureid; ?>" />
<input type="hidden" name="get_ids" value="<?=$get_ids; ?>" />
</td></tr>
<?php
if($_GET['act']=='pay')
{
//$sql="SELECT * FROM invoices WHERE clnid='".$_GET['cid']."' AND invid='".$_GET['id']."'";
$sql="SELECT * FROM invoices WHERE clnid='".$_GET['cid']."' ";
}
else
{
include("connexion2.php");
$sql="SELECT * FROM invoices WHERE invid='$_GET[id]'";
}
if($_GET['serh_by_ajt']=='true')
{
$sql="SELECT * FROM invoices WHERE invid='".$_GET['id']."' AND ajtid='".$_GET['sech_by_ajt']."'";
}
$result=mysql_query($sql) or die ('error');
while($row=mysql_fetch_array($result))
{
?>
<tr>
<td><strong>Client Id</strong>:</strong>
<?php echo"{$row['clnid']}";?> </td>
<td><strong>Certificate No: </strong><?php echo"{$row['certid']}";?><br /></td>
</tr>
<tr>
<td><strong>Dated</strong>:</strong>
<?php echo"{$row['dtd']}";?></td>
<td> <strong>Amount: </strong><?php echo"{$row['grandtotal']} /-";?><br/></td>
</tr>
<tr>
<td valign="top"><strong>Amount Recieve</strong>:</td><td><input type="text" name="pamount" size="33"><br/></td>
</tr>
<tr>
<td valign="top"><strong>TDS</strong>:</td><td><input type="text" name="tds" size="15"></td>
</tr>
<tr><td><strong><br/>Mode</strong>:</td><td> <select name="pmode">
<option value="cash ">Cash</option>
<option value="cheque">Cheque</option>
</select><br/> </td></tr>
<tr><td><strong>Details/recipt no.</strong>:</td><td><textarea rows="4" cols="25" name="pdetail"></textarea></td></tr>
<tr><td align="center" colspan="2"><br><center><input type="submit" value="Recipt Payment" class="amo-submit"></center><br/></td></tr>
</form>
</table>
<?php
}
include "foot.php";
?>


PK 99