| Server IP : 216.92.14.13 / Your IP : 216.73.217.126 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/home/rmlac2fmr/ |
Upload File : |
import json
db = json.load(open("/home/rmlac2fmr/public_html/jn.com/ops/data/db.json"))
fixed = 0
for h in db.get("hotelBookings", []):
if h.get("showId") != "S2":
continue
name = f"{h.get('lastName','')}, {h.get('firstName','')}"
# Find matching travel request
r = next((r for r in db["travelRequests"] if r.get("personId") == h.get("personId") and r.get("showId") == h.get("showId")), None)
if not r:
continue
bd = r.get("bookingDetails", {})
# Sync missing checkIn
if not h.get("checkIn") and (bd.get("hotelCheckIn") or r.get("depDate")):
old = h.get("checkIn", "")
h["checkIn"] = bd.get("hotelCheckIn") or r.get("depDate", "")
print(f" Synced {name} checkIn: '{old}' -> '{h['checkIn']}'")
fixed += 1
# Sync missing checkOut
if not h.get("checkOut") and (bd.get("hotelCheckOut") or r.get("retDate")):
old = h.get("checkOut", "")
h["checkOut"] = bd.get("hotelCheckOut") or r.get("retDate", "")
print(f" Synced {name} checkOut: '{old}' -> '{h['checkOut']}'")
fixed += 1
print(f"\nSynced {fixed} dates")
json.dump(db, open("/home/rmlac2fmr/public_html/jn.com/ops/data/db.json", "w"), indent=2)
print("Done!")