Files
2025-05-12 15:44:39 +00:00

141 lines
6.5 KiB
PHP
Executable File

<table cellspacing="0" cellpadding="0" border="0"><tr><td><img src="themes/Sugar/images/EcmProducts.gif" style="margin-top: 3px; margin-right: 3px;" alt="EcmProducts" width="16" border="0" height="16"></td><td><h2>Reports: Home</h2></td></tr></table><br />
<ul class="tablist" style="width:1130px;">
<li>
<a class="current" href="#">Basic Search</a>
</li>
</ul>
<script language="javascript">
function openCat(id){
if(document.getElementById('cat'+id).style.display=='none'){
document.getElementById('cat'+id).style.display='';
document.getElementById('catp'+id).style.display='';
document.getElementById('img'+id).src='themes/Sugar/images/basic_search.gif';
}
else {
document.getElementById('cat'+id).style.display='none';
document.getElementById('catp'+id).style.display='none';
document.getElementById('img'+id).src='themes/Sugar/images/advanced_search.gif';
}
}
function openCat1(id,account,mmm,year,active){
if(document.getElementById('cat'+id).style.display=='none'){
document.getElementById('cat'+id).style.display='';
document.getElementById('catp'+id).style.display='';
document.getElementById('img'+id).src='themes/Sugar/images/basic_search.gif';
mintajaxget("index.php?to_pdf=1&module=EcmReports&action=openCat&id="+id+"&mmm="+mmm+"&account="+account+"&year="+year+"&active="+active,"catp"+id);
}
else {
document.getElementById('cat'+id).style.display='none';
document.getElementById('catp'+id).style.display='none';
document.getElementById('img'+id).src='themes/Sugar/images/advanced_search.gif';
}
}
</script>
<form action="index.php" method="get" name="search_reports">
<input type="hidden" name="module" value="EcmReports" />
<input type="hidden" name="action" value="salesByCategory" />
<table style="border-top: 0px none; margin-bottom: 4px;width:1130px;" class="tabForm" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="dataLabel" width="10%" nowrap="nowrap">Year</td>
<td class="dataField" width="15%" nowrap="nowrap">
<select name="year" id="year">
<?
$ey=(int)date("Y");
$sy=2000;
for($i=$sy;$i<=$ey;$i++){
echo '<option value="'.$i.'"';
if($i==$_GET['year'])echo ' selected';
echo '>'.$i.'</option>';
}
?>
</select>
</td>
<!--<td class="dataLabel" width="20%" nowrap="nowrap">Category</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="category">
<option value="">select</option>
<?
$w=$GLOBALS['db']->query("select id,name from ecmproductcategories where deleted='0' order by name asc");
while($r=$GLOBALS['db']->fetchByAssoc($w)){
echo '<option value="'.$r['id'].'"';
if($r['id']==$_REQUEST['category'])echo ' selected';
echo '>'.$r['name'].'</option>';
}
?>
</select>
</td>
</tr>
<tr>-->
<td class="dataLabel" width="10%" nowrap="nowrap">Account Name</td>
<td class="dataField" width="25%" nowrap="nowrap">
<input name="account_name" readonly="readonly" tabindex="" id="account_name" size="" value="<?php echo $_REQUEST['account_name'];?>" title="" type="text">
<input name="account" id="account" value="<?php echo $_REQUEST['account'];?>" type="hidden">
<input name="btn_account_name" tabindex="" title="Select [Alt+T]" accesskey="T" class="button" value="Select" onclick='open_popup("Accounts", 600, 400, "", true, false, {"call_back_function":"set_return","form_name":"search_reports","field_to_name_array":{"id":"account","name":"account_name"}}, "single", true);' type="button">
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Product active</td>
<td class="dataField" width="15%" nowrap="nowrap">
<select name="active">
<option value="" <? if($_REQUEST['active']=="")echo "selected";?>>All</option>
<option value="active" <? if($_REQUEST['active']=="active")echo "selected";?>>Yes</option>
<option value="inactive" <? if($_REQUEST['active']=="inactive")echo "selected";?>>No</option>
</select>
</td>
</tr><tr>
<td class="dataLabel" width="10%" nowrap="nowrap">Product status</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="status">
<option value="" <? if($_REQUEST['status']=="")echo "selected";?>>All</option>
<option value="active" <? if($_REQUEST['status']=="active")echo "selected";?>>Active</option>
<option value="dead" <? if($_REQUEST['status']=="dead")echo "selected";?>>Dead</option>
<option value="end_of_line" <? if($_REQUEST['status']=="end_of_line")echo "selected";?>>End of line</option>
<option value="new" <? if($_REQUEST['status']=="new")echo "selected";?>>New</option>
</select>
</td>
<td colspan=2>
<input name="hide_zeros" type="checkbox" <?php if ($_REQUEST['hide_zeros']=='on') echo 'checked';?>/>Hide empty values</input>
</td>
<td class="dataLabel" width="10%" nowrap="nowrap">Invoice kind</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="invoice_kind">
<option value="" <? if($_REQUEST['invoice_kind']=="")echo "selected";?>>All</option>
<option value="country" <? if($_REQUEST['invoice_kind']=="country")echo "selected";?>>Country</option>
<option value="foreign" <? if($_REQUEST['invoice_kind']=="foreign")echo "selected";?>>Foreign</option>
</select>
</td>
</tr>
<tr>
<td class="dataLabel" width="10%" nowrap="nowrap">KS group</td>
<td class="dataField" width="30%" nowrap="nowrap">
<select name="group_ks">
<option value="" <? if($_REQUEST['group_ks']=="")echo "selected";?>>All</option>
<option value="1" <? if($_REQUEST['group_ks']=="1")echo "selected";?>>TH</option>
<option value="2" <? if($_REQUEST['group_ks']=="2")echo "selected";?>>WG</option>
<option value="3" <? if($_REQUEST['group_ks']=="3")echo "selected";?>>PP</option>
</select>
</td>
</tr>
</tbody>
</table>
<input class="button" name="submit" value="Search" type="submit">
<input class="button" name="clear" value="Clear" type="button" onClick="location.href='index.php?module=EcmReports&action=salesByCategory';"><?
foreach($_GET as $k=>$v){
if($k!="action")$str.='&'.$k.'='.$v;
}
//echo '&nbsp;<input type="button" class="button" name="CreateXLS" value="Create XLS" onclick="location.href=\'index.php?module=EcmReports&action=CreateXLS2'.$str.'&only_cat=1&to_pdf=1\';">';
?>
</form><br />
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td>
</td>
<td>
<a onClick="document.getElementById('plist').scrollLeft-=125;"><button class="button">&lt;&lt;</button></a>
</td>
<td>
<a onClick="document.getElementById('plist').scrollLeft+=125;"><button class="button">&gt;&gt;</button></a>
</td>
</tr>
</table>