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

@@ -553,15 +553,12 @@
If Not rsCheck.EOF Then dualpathTypeID = rsCheck("relationshiptypeid")
rsCheck.Close
' Check if this machine is a PC (machinetypeid >= 33) to determine relationship direction
Dim isPC, currentMachineTypeID
' Check if this machine is a PC (pctypeid IS NOT NULL) to determine relationship direction
Dim isPC
isPC = False
Set rsCheck = objConn.Execute("SELECT machinetypeid FROM machines WHERE machineid = " & CLng(machineid))
Set rsCheck = objConn.Execute("SELECT pctypeid FROM machines WHERE machineid = " & CLng(machineid))
If Not rsCheck.EOF Then
currentMachineTypeID = rsCheck("machinetypeid")
If Not IsNull(currentMachineTypeID) And currentMachineTypeID >= 33 Then
isPC = True
End If
isPC = Not IsNull(rsCheck("pctypeid"))
End If
rsCheck.Close