Files
crm.twinpol.com/modules/EcmDevices/ListViewAddToPriceBook.php
2025-05-12 15:44:39 +00:00

55 lines
3.5 KiB
PHP
Executable File

<?
echo "\n<p>\n";
echo get_module_title($mod_strings['LBL_MODULE_ID'], $mod_strings['LBL_MODULE_TITLE'], true);
echo "\n</p>\n";
?>
<script language="javascript" src="modules/EcmProducts/helper.js"></script>
<ul class="tablist">
<li class="active"><a class="current" href="#">Basic Search</a></li>
</ul>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" noWrap class="dataLabel">&nbsp;</td>
<td valign="top" class="dataField">&nbsp;</td>
<td valign="top" class="dataLabel">&nbsp;</td>
<td valign="top" class="dataField">&nbsp;</td>
<td valign="top" class="dataLabel">&nbsp;</td>
<td valign="top" class="dataField">&nbsp;</td>
</tr>
<tr>
<td width="10%" valign="top" noWrap class="dataLabel">
<span sugar='slot1'><? print $mod_strings['LBL_NAME'];?></span sugar='slot'></td>
<td width="20%" valign="top" class="dataField">
<span sugar='slot1b'>
<input type=text name="name" id="name" class=dataField value="" />
</span sugar='slot'> </td>
<td width="10%" valign="top" class="dataLabel"><span sugar='slot2'><? print $mod_strings['LBL_INDEX'];?></span sugar='slot'></td>
<td width="20%" valign="top" class="dataField"><input name='code' id='code' type="text" tabindex='2' title="Code" value="" maxlength='40' /></td>
<td width="15%" valign="top" class="dataLabel"><? print $mod_strings['LBL_UNIT_PRICE'];?> &nbsp;</td>
<td width="15%" valign="top" class="dataField"><input name='unit_price' id='unit_price' type="text" tabindex='2' value="" maxlength='40' /></td>
</tr>
<tr><td width="10%" valign="top" class="dataLabel"><? print $mod_strings['LBL_MANUFACTURER'];?></td>
<td width="20%" valign="top" class="dataField"><select style="width:121px;" name="manufacturer" id="manufacturer"><option value=""><? print $mod_strings['LBL_ALL'];?></option><?
$w=$GLOBALS['db']->query("select name,id from ecmproductmanufacturers order by name asc");
while($r=$GLOBALS['db']->fetchByAssoc($w))
{
print '<option value="'.$r['id'].'">'.$r['name'].'</option>';
}
?></select></td>
<td width="20%" valign="top" class="dataLabel"><? print $mod_strings['LBL_PRODUCT_CATEGORY'];?></td>
<td width="20%" valign="top" class="dataField"><select style="width:121px;" name="product_category" id="product_category"><option value=""><? print $mod_strings['LBL_ALL'];?></option><?
$w=$GLOBALS['db']->query("select name,id from ecmproductcategories order by name asc");
while($r=$GLOBALS['db']->fetchByAssoc($w))
{
print '<option value="'.$r['id'].'">'.$r['name'].'</option>';
}
?></select></td>
<td width="10%" valign="top" class="dataLabel"><input class="button" name="search" type="button" id="search" value="Search" onclick="mintajaxget('index.php?to_pdf=1&pricebook_id=<?print $_REQUEST['pricebook_id'];?>&module=EcmDevices&action=ListViewAddToPriceBookAjax&name='+document.getElementById('name').value+'&unit_price='+document.getElementById('unit_price').value+'&code='+document.getElementById('code').value+'&product_category='+document.getElementById('product_category').value+'&manufacturer='+document.getElementById('manufacturer').value,'list');"></td>
<td width="20%" valign="top" class="dataField">&nbsp;</td>
</tr>
<tr>
</table>
<div id="list"></div>
<script language="javascript">mintajaxget('index.php?to_pdf=1&pricebook_id=<?print $_REQUEST['pricebook_id'];?>&module=EcmDevices&action=ListViewAddToPriceBookAjax','list');</script>