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:
cproudlock
2025-12-09 07:24:20 -05:00
parent a52dd2e932
commit 81f905f0b0
8 changed files with 26 additions and 39 deletions

View File

@@ -293,8 +293,7 @@ strSQL = "SELECT m.machineid, m.machinenumber, m.alias, m.serialnumber, " &_
"LEFT JOIN vendors v ON mo.vendorid = v.vendorid " &_
"LEFT JOIN businessunits bu ON m.businessunitid = bu.businessunitid " &_
"LEFT JOIN machinestatus ms ON m.machinestatusid = ms.machinestatusid " &_
"WHERE mo.machinetypeid < 33 " &_
"AND m.pctypeid IS NULL " &_
"WHERE m.pctypeid IS NULL " &_
"AND m.isactive = 1 " &_
"AND m.mapleft IS NOT NULL " &_
"AND m.maptop IS NOT NULL " &_