Jayco Engineering
PO Management — staff sign in

Dashboard

Live snapshot of every PO in the system. Click any number to drill in.

Pending by age Click a bucket to see those lines
Items with the highest pending quantity
Top customers by pending quantity
Oldest open PO lines Ordered longest ago and still not fully despatched

New Purchase Order

Enter the PO once — every line item's pending quantity is tracked automatically from here on.

Record a Despatch

Pick a customer, then tick off every item that's going out in this despatch.

PO Register

Every PO line item and its live status.

Reports

Search across customer, item, PO and invoice at once. Click any row to drill in.

Itemwise pending
Customer-wise pending
Aging analysis
Despatch register
Monthly trend

Customers

Mark a customer as "exclusive" to track them separately, the way STC is tracked today.

Items

The standard item list — New PO entry suggests from this, so codes stay consistent (e.g. "SN 512", not "SN512" or "sn 512").

Import Masters & Opening Balances

One-time setup from your standardized workbook. Safe to re-run — existing customers, items, and PO lines are skipped, not duplicated.

Upload your standardized workbook (e.g. Jayco_App_Import_Final.xlsx). This reads three sheets: Customer Master, Item Master, and Open POs — each with a title row, a subtitle row, then a header row before the data starts. Customers and items are created first, then every Open POs line is imported as-is (Ordered / Despatched / Pending taken directly from that sheet — your own numbers, not recalculated) as an opening balance to start tracking from.

Firebase Setup

Do this once — takes about 10 minutes, now including login.

Step 1 — Create the project
Go to console.firebase.google.comAdd project → name it e.g. jayco-po-management → you can skip Google Analytics → Create project.

Step 2 — Create the database
In the left menu open Build → Firestore DatabaseCreate database → choose a location close to you (e.g. asia-south1) → start in production mode.

Step 3 — Set security rules
In the Firestore Rules tab, paste the rules shown below and click Publish. These require a signed-in user for every read and write — no login, no data, even if someone finds the URL.

Step 4 — Register a web app
Project settings (gear icon) → scroll to Your apps → click the </> web icon → name it anything → Register app. Firebase shows you a firebaseConfig object — copy the whole thing.

Step 5 — Paste it into this file
Open jayco_po_management.html in a text editor, find const firebaseConfig = {…} near the top of the script, and replace it with what you copied.

Step 6 — Turn on Email/Password sign-in
In the left menu, Build → Authentication → Get started → under Sign-in method, enable Email/Password → Save.

Step 7 — Create the one shared staff account
Still in Authentication, go to the Users tab → Add user. For the email, use exactly staff@jayco-po-management.local (this isn't a real inbox — it's just the login ID everyone will share). Set whatever password your team should use — that's the password staff will type on the sign-in screen. Save, re-upload the file to GitHub Pages, and reload.
Firestore security rules to paste
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if request.auth != null;
    }
  }
}

Everyone on staff signs in with the same email/password (Step 7). If you ever want individual named logins instead of one shared account, that's a small follow-up — just ask.