PK

ADDRLIN : /home/anibklip/pcfcindia.com/tem_new_15/
FLL :
Current File : /home/anibklip/pcfcindia.com/tem_new_15/payments.php

<?php
	session_start();
	require_once 'common/common.php';
	require_once 'common/secure.php';
	include("connexion.php");
	include "head.php";
?>
    <h2 id="icon_pick" align="center">Manage Invoices & Payments</h2> 
<p align="right">	<a href="payment.php">+ Recipt a Due Payment</a></p>
<p align="left"><font color="#006699">&nbsp;&nbsp;Below are the due Invoices with their 
          details: </font></p>
<table cellspacing="3" align="center" width="100%" border="4" cellpadding="3">
<tr>
  <td><strong>Pay Id</strong></td>
    <td><strong>Inv No.</strong></td>
	<td><strong>Pay Mode</strong></td>
  <td><strong>Pay Amount</strong></td>
  
  <td><strong>Pay Date</strong></td>
  
  <td><strong>Pay Detail</strong></td>
 
</tr>
<?php
include("connexion2.php");
$sql="SELECT * FROM Payments where branch='$_SESSION[city]' ";
$result=mysql_query($sql) or die('error');
if (mysql_num_rows($result) == 0)
{
echo "<tr><td colspan=8 align=center><font color=red><strong><br>No Due Invoice records Found</strong>.</font><br><br></td></tr>";
}
while($row=mysql_fetch_array($result))
{
	echo"<tr>
	  <td>{$row['pid']}</td>       <td>{$row['invoice']}</td>  <td>{$row['pmode']}</td>      <td>{$row['pamount']}</td>     <td>{$row['pdate']}</td>   <td>{$row['pdetail']}</td>   </tr>";
}
?>
</table>
<br><br>
<p align="left"><font color="#006699">&nbsp;&nbsp;Get the Statements for due Bills <em>(for Monthly Clients Only)</em>: </font></p>
<table cellspacing="3" align="center" width="100%" border="4" cellpadding="3">
<tr>
<form action="statement.php" method="get"> 
    <td align="center" colspan="7">
	<center>Select a Client<i> > > </i>
	
<select name="clnt">
<option value="all">- - Show All Clients - -</option>
<?php
include("connexion.php");
$sql="SELECT * FROM head WHERE headid>2 AND parhead='1'";
$result=mysql_query($sql) or die ('errr');
while($row=mysql_fetch_array($result))
{
echo"<option value={$row['headid']}>{$row['headname']}-{$row['headid']}</option>";
} ?>
</select>
<input type="submit" value="&raquo; Get Statement &raquo;" class="amo-submit"></center></form>
</td></tr>
<tr>
  <td><strong>Invoice</strong></td>
    <td><strong>Cert. No.</strong></td>
	<td><strong>Client Id</strong></td>
  <td><strong>Date</strong></td>
  
  <td><strong>Amount</strong></td>
  
  <td><strong>Status</strong></td>
 
  <td><strong>Pay</strong></td>
</tr>
<?php
include("connexion2.php");
 $sql="SELECT * FROM invoices Where invstatus='pending' AND cmntz='1' and  branch='$_SESSION[city]'";
$result=mysql_query($sql) or die('error');
if (mysql_num_rows($result) == 0)
{
echo "<tr><td colspan=8 align=center><font color=red><strong><br>No Due Invoice records Found</strong>.</font><br><br></td></tr>";
}
while($row=mysql_fetch_array($result))
{
	echo"<tr>
	  <td>{$row['invid']}</td>       <td>{$row['certid']}</td>  <td>{$row['clnid']}</td>      <td>{$row['dtd']}</td>     <td>{$row['grandtotal']}</td>   <td>{$row['invstatus']}</td>    <td><a href=pay.php?id={$row['invid']}>Pay</a></td></tr>";
}
?>
</table>
<p align="center"><a href="payments.php">View Payments</a></p>
<?php
include "foot.php";
?>


PK 99