| 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"))
# Build list of what the push SHOULD write
push_records = []
for pd in db.get("perDiems", []):
if pd.get("showId") != "S2":
continue
req = next((r for r in db["travelRequests"] if r["id"] == pd.get("reqId") and r.get("showId") == "S2"), None)
if not req:
continue
bd = req.get("bookingDetails", {})
isIneligible = bd.get("pdEligible") == False or (req.get("checklist") or {}).get("pd_ineligible")
if isIneligible:
continue
person = next((p for p in db["persons"] if p["id"] == pd.get("personId")), None)
days = pd.get("manualDays") if pd.get("manualDays") is not None else pd.get("autoDays", 0)
rate = pd.get("manualRate") if pd.get("manualRate") is not None else pd.get("autoRate", 0)
total = (days or 0) * (rate or 0)
lastName = (person.get("lastName","") if person else "").upper()
firstName = person.get("firstName","") if person else ""
push_records.append({
"name": f"{lastName}, {firstName}",
"total": total,
"days": days,
"rate": rate,
"pdId": pd["id"]
})
print(f"Push should write {len(push_records)} records, total ${sum(r['total'] for r in push_records):,}")
print(f"\nAll records that equal $200:")
for r in push_records:
if r["total"] == 200:
print(f" {r['name']}: ${r['total']} ({r['days']} days @ ${r['rate']})")