<?php   include("../../include/dbconnect.php");?>
<title>Payment Ledger</title>
<body background=blater01.gif  topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font ><b>Payment Ledger</b></font></td>
</tr><tr valign="top"><td colspan=2>
<font >&nbsp;</font>
</td>
</tr>
</table>
<table border=0 cellpadding=3 cellspacing=4 width="590">
           
<form name="myForm01" method="Post" action="pay_ledger_print.php">  
<tr><td >
<font class="sbd"><b>Select  Company</b></font>
</td>
<td colspan=2>
<select name= seller>
<?php $query="select distinct compcode,name from company order by name ";
      $query=stripslashes($query);
      $result=mysql_query($query) or
      die( mysql_error() );
      
      while ( $row= mysql_fetch_row($result))
      {
          echo "<option value='$row[0]'>";
	  echo $row[1];
	  echo "\n";
      }
?>
</select>
</td></tr>
<?php
$query= mysql_query("select bcode,name,unit from buy order by name") or die(mysql_error());
?>
<tr> 
    <td nowrap ><font class="sbd"><b>Select Customer / All</b></font></td>
    <td> <SELECT name='bcode[]'  multiple size="5" multiple>
<?php
     echo "<option selected value=\" 0\"> Select Customer Name";
    while($row = mysql_fetch_row($query))
    {
          echo "<option value='$row[0]'>";
          echo ($row[1].'&nbsp;'.$row[2]);
	  echo "\n";	  
    }
?>
    </SELECT>
    </td>
  </tr>
  <td nowrap></div>

<SCRIPT LANGUAGE="JavaScript" src="../../include/CalendarPopup.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cal = new CalendarPopup();
</SCRIPT>

<?
$today = date(d).'-'.date(m).'-'.date(Y);
?>
<tr>
<td nowrap ><font class="sbd"><b>From Date</b></font></td>
<?
// echo $from_date;
if(empty($from_date))
{
 $from_date=strftime ("%d/%m/%Y", mktime (0,0,0,date("m"),date("d"),date("Y"))); 
}
?>
<td>
<INPUT NAME="from_date" TYPE="text" class="text_box_button" VALUE="<?=$from_date?>" SIZE="15" readonly  >
<A HREF="#" onClick="cal.select(document.myForm01.from_date,'anchor1','dd/MM/yyyy'); return false;"NAME="anchor1" ID="anchor1"><img  src="../../images/cal.gif" border="0"></A> <BR>
</td>
</tr>
<tr>
<td nowrap ><font class="sbd"><b>To Date</b></font></td>
<? 
//    echo $to_date;
if(empty($to_date))
{
$to_date =strftime ("%d/%m/%Y", mktime (0,0,0,date("m"),date("d")+6,date("Y"))); 
}
?> <td>
<INPUT NAME="to_date" TYPE="text" class="text_box_button" VALUE="<?=$to_date;?>" SIZE="15" onBlur="return diff(document.myForm01.from_date.value,this.value);" readonly>
<A HREF="#" onClick="cal.select(document.rej_select.to_date,'anchor2','dd/MM/yyyy'); return false;"NAME="anchor2" ID="anchor2"><img src="../../images/cal.gif" border="0"></A> <BR>
</td>
</tr>




<table cellpading=0 cellspacing=10 width= 50>
<tr><td>
 <blockquote>  <input type =submit name="submit" value = "Submit"></td></blockquote>
</table>
</table>
</body>
<tr><td><h2><font color="#000080"><font size="+1"><a href="../../index.html">Return to Index</a> 
