Files
shopdb/api.asp
cproudlock c1f4412a52 api.asp: archive stale PC->equipment relationships on new PC self-registration
When a new PC POSTs updateCompleteAsset for a machine number, the previous
PC's "Controls" relationship to that equipment is now soft-archived
(isactive=0) before the new relationship is created. Prevents duplicate
active relationships when PCs are replaced floor-wide. Display pages
already filter on isactive=1 so archived rows just disappear from inventory
views (history preserved).

displaymachine.asp: added Controller field populated via the controllertypes
join.

displaypc.asp: fixed top-bar search bug - searching a machine number was
returning the PC row instead of the machine. Three lookup queries now scope
to pctypeid IS NOT NULL.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 17:10:33 -04:00

118 KiB