Replace machinetypeid 33-43 checks with pctypeid throughout codebase
- PCs now identified by pctypeid IS NOT NULL (not machinetypeid >= 33) - Equipment identified by pctypeid IS NULL (not machinetypeid < 33) - Updated 8 files: search.asp, savemachineedit.asp, displaymachine.asp, displaypc.asp, displaypcs.asp, machine_map.asp, displaymachines.asp, api.asp - Simplified queries and removed redundant machinetypeid checks - Updated all related comments to reflect new pattern 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -82,15 +82,14 @@
|
||||
|
||||
<%
|
||||
' Build WHERE clause with optional BU filter
|
||||
' NOTE: Filter on machines.machinetypeid to exclude PCs (33-43) and network devices (16-20)
|
||||
' Equipment types are 1-15
|
||||
' NOTE: pctypeid IS NULL filters out PCs; also exclude LocationOnly (1) and network devices (16-20)
|
||||
Dim whereClause
|
||||
whereClause = "models.machinetypeid = machinetypes.machinetypeid AND " &_
|
||||
"machines.modelnumberid = models.modelnumberid AND " &_
|
||||
"models.vendorid = vendors.vendorid AND " &_
|
||||
"machines.businessunitid = businessunits.businessunitID AND " &_
|
||||
"machines.isactive = 1 AND islocationonly=0 AND machines.pctypeid IS NULL AND " &_
|
||||
"models.machinetypeid NOT IN (1, 16, 17, 18, 19, 20, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43)"
|
||||
"models.machinetypeid NOT IN (1, 16, 17, 18, 19, 20)"
|
||||
|
||||
' Add BU filter if specified
|
||||
If filterBU <> "" And IsNumeric(filterBU) Then
|
||||
|
||||
Reference in New Issue
Block a user