| Current Path : /var/www/html/mmishra/iws8/html/ilight/ |
| Current File : /var/www/html/mmishra/iws8/html/ilight/elgrouppayables.inc |
<h3>Group Payables</h3>
<center>
<?php
$tbl = "el_billing";
$ext = $_REQUEST["ext"];
$cats = $_REQUEST["cat"];
$month = $_REQUEST["month"];
if (!$month) $month = previous_month();//date("M-Y");
echo "<font size='+1'>[ </font>";
if ($ext == 1) {
echo "<a href='?pg=$pg&month=$month&ext=0'>Internal</a> | <font color='red' size='+1'>External</font>";
} else {
echo "<font color='red' size='+1'>Internal</font> | <a href='?pg=$pg&month=$month&ext=1'>External</a>";
}
echo "<font size='+1'> ]</font>
Month <select name='month' onchange=\"javascript: document.location.href='?pg=$pg&month='+this.value\">";
$rs = mysql_query("select distinct month from el_reading order by id desc");
while ($o = mysql_fetch_object($rs)) {
echo "<option value='$o->month'";
if ($o->month == $month) echo " selected";
echo ">$o->month</option>";
}
echo "</select>
<input type='hidden' name='ext' value='$ext'>
<table width='90%'><tr><th>Select Licensee Group ";
//get categories for report
$rs = mysql_query("select distinct category from el_licensee where external='".($ext == 1 ? 'Yes' : 'No')."'");
while ($o = mysql_fetch_object($rs)) {
$i = 0;
echo "<input type='checkbox' name='cat[]' value='$o->category'";
foreach ($cats as $cat) {
if ($cat == $o->category) {
echo " checked";
$i = 1;
$catlist .= ($catlist ? ',' : '')."'$cat'";
}
}
if ($i) echo "><font size='+1'>$o->category</font>";
else echo ">$o->category";
}
echo " <input type='submit' name='submit' value='FILTER'></th></tr></table>";
$i = 0;
if ($ext == 1) {
include "elexternalgroups.inc";
} else {
include "elinternalgroups.inc";
}
?>
</center>