diff --git a/Dockerfile b/Dockerfile
index d3386e3f6f4c30bd9c2c8a380084f52d5fe253d2..a76e7f7df4e89b323b955bd18c4948475dbe474f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,25 +1,68 @@
-# CFO OS — Streamlit on a Hugging Face Docker Space (private).
-FROM python:3.11-slim
+# AIOS web — the React shell + FastAPI over the platform data layer. THE CANONICAL IMAGE:
+# this is the one that actually runs, and the one a host migration re-points (C1e).
+#
+# ⛔ WHY A SECOND DOCKERFILE EXISTS (ops/Dockerfile.api), stated here so nobody "tidies" the wrong
+# one away. It is NOT a duplicated service — it is the SAME service built from a DIFFERENT BUILD
+# CONTEXT:
+# * HF Spaces: the context is the Space repo root, which `deploy_web.py` uploads FLATTENED —
+# `api/`, `web/`, `platform/`, `requirements.txt` all at top level. Hence the paths here.
+# * ops/compose.yml: the context is the local repo root, where the same files live at
+# `aios-web/api/`, `aios-web/web/`, `platform/`. Different prefixes, same content.
+# ⇒ THE REAL FIX, and it is a follow-up rather than something to do the day of a first deploy:
+# make `deploy_web.py` upload with the REPO layout so both contexts are identical, then this file
+# serves both and `ops/Dockerfile.api` is deleted. Until then `ops/verify_portability.py` gates
+# the two against each other on every property that matters (same app object, same launcher
+# contract, non-root, healthchecked, no baked secrets), so they cannot drift silently.
+#
+# Two stages: node builds the React bundle, python serves it + the JSON API. Login is the app's own
+# branded page over a signed session cookie (wave 1 removed the HTTP Basic gate).
-# non-root user (HF Spaces run as uid 1000)
-RUN useradd -m -u 1000 user
-ENV HOME=/home/user \
- PATH=/home/user/.local/bin:$PATH \
- STREAMLIT_SERVER_HEADLESS=true \
- STREAMLIT_BROWSER_GATHER_USAGE_STATS=false
+# ---- stage 1: build the React bundle ----
+FROM node:22-slim AS web
+WORKDIR /web
+# Resolve deps FRESH from the public registry (the local lockfile pinned a mirror-only lodash
+# 4.18.1 that isn't on npmjs.org; a fresh install gets the public 4.17.x that glide accepts).
+COPY web/package.json ./
+RUN npm install --no-audit --no-fund --no-package-lock
+COPY web/ ./
+RUN rm -f package-lock.json && npm run build # -> /web/dist
+# ---- stage 2: python API serving the bundle ----
+FROM python:3.12-slim
WORKDIR /app
+COPY requirements.txt ./
+RUN pip install --no-cache-dir -r requirements.txt
+COPY api/ ./api/
+# the reused data layer (modules/core/harness)
+# ⛔ COMMENT ON ITS OWN LINE. Docker does NOT support a trailing comment on an instruction:
+# it parsed `# the reused data layer ...` as extra SOURCE PATHS and the first build ever run
+# died with `failed to calculate checksum ... "/the": not found`. Only RUN tolerates it, and
+# only because the shell eats the `#`. Gated in ops/verify_portability.py.
+COPY platform/ ./platform/
+COPY --from=web /web/dist ./web/dist
-COPY --chown=user requirements.txt ./
-RUN pip install --no-cache-dir --upgrade pip && \
- pip install --no-cache-dir -r requirements.txt
-
-COPY --chown=user . .
-
+# Run unprivileged — the C2 security baseline, and matched to ops/Dockerfile.api so the two images
+# do not differ on a property that would only surface after a migration. uid 1000 is what HF
+# Spaces expects.
+RUN useradd --create-home --uid 1000 user && chown -R user:user /app
USER user
+
+ENV RI_DIR=/app/platform \
+ PORT=7860 \
+ PYTHONUNBUFFERED=1 \
+ AIOS_PREWARM=1
+# ⛔ AIOS_INSECURE_SSL is deliberately NOT set. It disables TLS verification for every outbound
+# call in the process and exists for one developer laptop. ops/verify_portability.py fails if any
+# deploy config sets it.
EXPOSE 7860
-# HF injects ODOO_* and APP_PASSWORD as env vars (Space secrets).
-CMD ["streamlit", "run", "app.py", \
- "--server.port=7860", "--server.address=0.0.0.0", \
- "--server.headless=true", "--browser.gatherUsageStats=false"]
+# Liveness via stdlib rather than curl — it keeps the image free of an apt layer that exists only
+# for the healthcheck.
+HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
+ CMD python -c "import os,urllib.request,sys; sys.exit(0 if urllib.request.urlopen(f'http://127.0.0.1:{os.environ.get(\"PORT\",\"7860\")}/api/health',timeout=4).status==200 else 1)"
+
+# ⚠ THE PORT COMES FROM THE ENVIRONMENT, ALWAYS. The application itself reads PORT nowhere — it is
+# a launcher argument — which is what makes moving hosts a config change instead of a code change.
+# Secrets (Odoo creds, APP_PASSWORD, AIOS_SESSION_SECRET, APP_BASE_URL) arrive as env at RUN time
+# and are never baked; the repo-root .dockerignore drops **/.env from the build context.
+CMD ["sh", "-c", "uvicorn api.main:app --host 0.0.0.0 --port ${PORT}"]
diff --git a/README.md b/README.md
index 0cb8d7f41cb4a56560863b95e4bbb030c411fad8..4c85e80460f02f7944ba8a5681309e80c3ad9a9e 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,13 @@
---
-title: Loopable — Royal Imports
-emoji: "📊"
-colorFrom: blue
-colorTo: indigo
+title: Loopable
+emoji: 🗂
+colorFrom: indigo
+colorTo: gray
sdk: docker
app_port: 7860
pinned: false
-short_description: Loopable — data platform for the Royal Imports tenant
---
-# Loopable — Royal Imports tenant
-
-Loopable, the AIOS data platform, serving Royal Imports / Fisch Floral Supply live from Odoo
-(read-only). Password-gated; Business-Unit scoping (Fisch / Royal) supports per-user
-permissioning. Dashboards: Sales, Financial, Customers, SKU, Inventory, Collections/AR, Data Health.
+Loopable — the AIOS platform shell: a React front end (Airtable-grade grid + dashboard pages)
+over a FastAPI service reusing the platform data layer. Login-gated: a branded login page over an HMAC-signed session cookie, with per-user
+business-unit scope and module grants. Separate from the Streamlit app.
diff --git a/api/aios_session.py b/api/aios_session.py
new file mode 100644
index 0000000000000000000000000000000000000000..25739fae016ad54499d8fcbe6897c170bf9ad716
--- /dev/null
+++ b/api/aios_session.py
@@ -0,0 +1,124 @@
+"""aios_session.py — X3: the signed, STATELESS session cookie (EXIT-3a, 2026-07-30).
+
+ aios_session = base64url(json {t,u,e,i,x}) . base64url(HMAC-SHA256)
+
+`t` tenant slug · `u` username · `e` the user's revocation epoch · `i` idle deadline ·
+`x` absolute expiry. Signed with `AIOS_SESSION_SECRET` using stdlib `hmac` — no new dependency,
+and nothing to store server-side, which is the whole point: EXIT-4 requires a process that holds
+no per-tenant state, and a session TABLE is per-tenant state. D2's Postgres sessions-MIRROR (an
+audit view, not the source of truth) arrives with C-2 and is deliberately deferred.
+
+WHY STATELESS STILL REVOKES. A cookie nobody can delete sounds like a cookie nobody can revoke.
+The answer is the `epoch` integer on the user record (`core.users.epoch` / `bump_epoch`): the
+cookie carries the epoch it was minted under, every verification re-reads the account's current
+epoch, and a password change or a deactivation bumps it — so every outstanding cookie for that
+user dies at once, without a session table.
+
+⚠ NO FALLBACK SECRET, EVER. With `AIOS_SESSION_SECRET` unset this module mints a RANDOM
+per-process key: sessions then die on restart, which is an inconvenience. A hardcoded default
+would instead let anyone who has read this repo forge a cookie for any user of any tenant — an
+inconvenience is the correct trade against a forgery key. `EPHEMERAL_SECRET` records which
+happened so the app can say so at startup and a gate can assert it.
+"""
+import base64
+import hmac
+import json
+import os
+import secrets
+import time
+from hashlib import sha256
+
+COOKIE_NAME = "aios_session"
+IDLE_SECONDS = 8 * 60 * 60 # D2: reissued on every authenticated request
+ABSOLUTE_SECONDS = 30 * 24 * 60 * 60 # D2: a hard ceiling no amount of activity extends
+
+_env_secret = os.environ.get("AIOS_SESSION_SECRET") or ""
+EPHEMERAL_SECRET = not _env_secret
+_SECRET = _env_secret.encode("utf-8") if _env_secret else secrets.token_bytes(32)
+
+
+def _b64(raw: bytes) -> str:
+ return base64.urlsafe_b64encode(raw).decode("ascii").rstrip("=")
+
+
+def _unb64(txt: str) -> bytes:
+ return base64.urlsafe_b64decode(txt + "=" * (-len(txt) % 4))
+
+
+def _sign(payload: bytes) -> str:
+ return _b64(hmac.new(_SECRET, payload, sha256).digest())
+
+
+def mint(tenant, username, epoch, now=None, absolute_expiry=None):
+ """A fresh cookie value. `absolute_expiry` carries over on reissue so refreshing the idle
+ window can never extend the 30-day ceiling — that would make the ceiling unreachable."""
+ now = int(now if now is not None else time.time())
+ claims = {"t": str(tenant), "u": str(username), "e": int(epoch),
+ "i": now + IDLE_SECONDS,
+ "x": int(absolute_expiry if absolute_expiry is not None
+ else now + ABSOLUTE_SECONDS)}
+ payload = json.dumps(claims, separators=(",", ":"), sort_keys=True).encode("utf-8")
+ return f"{_b64(payload)}.{_sign(payload)}", claims
+
+
+def read(value, now=None):
+ """Parse + verify a cookie value → claims dict, or None.
+
+ None for EVERY failure mode — bad shape, bad signature, expired, unparseable. The caller
+ answers 401 and must not learn which: an error that distinguishes "signature wrong" from
+ "expired" tells a forger whether their key is right.
+ """
+ if not value or not isinstance(value, str) or value.count(".") != 1:
+ return None
+ body, sig = value.split(".", 1)
+ try:
+ payload = _unb64(body)
+ except Exception:
+ return None
+ # compare_digest on the SIGNATURE, always — a byte-wise early exit is a timing oracle.
+ if not hmac.compare_digest(sig, _sign(payload)):
+ return None
+ try:
+ claims = json.loads(payload.decode("utf-8"))
+ except Exception:
+ return None
+ if not isinstance(claims, dict):
+ return None
+ if not isinstance(claims.get("u"), str) or not isinstance(claims.get("t"), str):
+ return None
+ if not claims["u"] or not claims["t"]:
+ return None
+ try:
+ idle, absolute, epoch = int(claims["i"]), int(claims["x"]), int(claims["e"])
+ except (KeyError, TypeError, ValueError):
+ return None
+ now = int(now if now is not None else time.time())
+ if now >= idle or now >= absolute:
+ return None
+ claims["e"], claims["i"], claims["x"] = epoch, idle, absolute
+ return claims
+
+
+def is_secure_request(request):
+ """Secure flag ON unless this is plain-HTTP localhost. Set unconditionally in production;
+ unset on a local http:// dev origin, where a Secure cookie is simply never sent back and
+ login would appear to succeed and then not work."""
+ host = (request.headers.get("host") or "").split(":")[0].lower()
+ proto = (request.headers.get("x-forwarded-proto")
+ or request.url.scheme or "http").split(",")[0].strip().lower()
+ if proto == "https":
+ return True
+ return host not in ("localhost", "127.0.0.1", "[::1]", "::1")
+
+
+def set_cookie(response, request, value):
+ response.set_cookie(
+ COOKIE_NAME, value, httponly=True, samesite="lax",
+ secure=is_secure_request(request), max_age=ABSOLUTE_SECONDS, path="/")
+
+
+def clear_cookie(response, request):
+ # Same attributes as when it was set: a browser matches on path/secure/samesite when
+ # deleting, and a mismatched delete silently leaves the cookie in place.
+ response.delete_cookie(COOKIE_NAME, path="/", httponly=True, samesite="lax",
+ secure=is_secure_request(request))
diff --git a/api/automation_engine.py b/api/automation_engine.py
new file mode 100644
index 0000000000000000000000000000000000000000..a160e43548e22ba5cd7225152ee484bd044b3682
--- /dev/null
+++ b/api/automation_engine.py
@@ -0,0 +1,2031 @@
+"""automation_engine.py — wave-18 item 5 (contract C4-AUTO): the automation RUNTIME.
+
+THE SHAPE, and why it is this shape. An automation is a DEFINITION that lives in the tenant
+store and a RUN that lives in this process. The definition is durable, small and rarely written;
+the run is hot, chatty and worthless five minutes later. Conflating them is the failure this file
+is built to avoid, and it has two halves:
+
+ * **Run state is NEVER persisted while it is running.** A `state: 'running'` written to the
+ store outlives the process that wrote it, so a container restart mid-run leaves an automation
+ that can never run again — the 409 sees a `running` nothing will ever clear. Hot state lives
+ in `_RUNNING` (a process dict, cleared by definition on restart) and the store is written
+ exactly ONCE per run, at the end.
+ * **One coalesced store update per run per bucket.** `core/store.py` coalesces on a 20 s
+ floor per key against a 256-commits/hour repo budget, so a per-ROW write is the wrong shape
+ by two orders of magnitude — the S&P demo alone is ~500 rows. Every runner below computes
+ its whole result first and commits it in a single `update` callback.
+
+WHAT IS VENDORED HERE AND WHY. `.claude/skills/browse/scrape.py` is not on `sys.path` and is not
+deployed, so its extraction core is copied into this file (the wave doc's instruction), ported
+httpx → requests (the only HTTP dependency this API already carries). The SSRF rail comes with
+it, HARDENED rather than merely preserved — see `guard`/`fetch`. That hardening is the point:
+the skill version takes a URL from a developer on a CLI; this takes one from a request body.
+"""
+from __future__ import annotations
+
+import datetime as _dt
+import ipaddress
+import json
+import os
+import re
+import socket
+import threading
+import time
+from urllib.parse import urljoin, urlparse
+
+import requests
+
+try: # the parser the extraction half needs
+ from bs4 import BeautifulSoup
+except Exception: # pragma: no cover — deploy lag; see mailbox ②
+ BeautifulSoup = None
+
+# ---------------------------------------------------------------------------------------------
+# THE BUCKET (C4-AUTO)
+# ---------------------------------------------------------------------------------------------
+
+#: The per-tenant store key. Colocated with its reader, the `routes_nav._NAV_PREFS_KEY` pattern.
+STORE_KEY = "automations"
+#: The user-table bucket. ⚠ Read/written HERE through `TenantRuntime`, never through
+#: `core.user_tables` — that module writes the UNPREFIXED module-global key, which is correct for
+#: tenant #0 (empty prefix) and silently cross-tenant for every R2 tenant after it. Booked in the
+#: session-D mailbox as a finding against A's file rather than fixed from here.
+UT_STORE_KEY = "user_tables"
+UT_PREFIX = "ut_"
+
+MAX_AUTOMATIONS = 40
+MAX_RUNS = 20 # trimmed history per automation
+MAX_NAME = 80
+MAX_UT_ROWS = 5000 # mirrors core.user_tables.MAX_ROWS
+MAX_UT_TABLES = 40
+
+#: ⚠ THE APPEND TABLES NEED A DIFFERENT CAP, and the reason is arithmetic rather than taste.
+#: `MAX_UT_ROWS` was sized for a scraped LIST — a page of ~500 companies that is re-read, so the
+#: row count is bounded by the page. The `ut_ig_*` tables are the opposite shape: every pull
+#: INSERTS a timestamped row (see `SNAPSHOT_FIELDS` and the compound keys below), so at R1's
+#: 1k-profiles-daily the snapshot table crosses 5000 rows on **day five** — and the old behaviour
+#: was a SILENT `skipped++`, i.e. the table would quietly stop growing and the run would still
+#: report success. A time series that stops after five days without saying so is worse than one
+#: that was never built.
+#: 200k is the owner-directed ceiling (R1's "~200k"). ⚠ IT BUYS VERY DIFFERENT HORIZONS FOR THE
+#: TWO APPEND TABLES, and the difference is worth knowing before anyone plans around it:
+#: ut_ig_snapshots 1 row per profile per pull -> ~200 days at 1k profiles/day
+#: ut_ig_post_snapshots maxPosts rows per pull -> ~8 days at 1k profiles x 24 posts
+#: So the post series is the one that fills, and it fills FAST. That is exactly why the breach had
+#: to become LOUD (a distinct `capped` count -> a `partial` run naming the table): at this rate the
+#: silent version would have flatlined a chart inside a fortnight with a green dot over it.
+#:
+#: ⚠ MEASURED COST AT THE CEILING (2026-08-04, this box): a full `ut_ig_post_snapshots` serialises
+#: to **35.8 MB** of JSON (~1.4 s). `UT_STORE_KEY` is ONE bucket for ALL of a tenant's user tables,
+#: so that cost is paid by every unrelated automation write in the tenant too. Booked for the B-3
+#: Postgres tripwires (R2 clause b) rather than papered over — the fix is a row store, not a
+#: smaller number.
+#: (W19-C; the GENERIC loud-breach for every other table stays booked as DEBT D-11.)
+MAX_UT_IG_ROWS = 200_000
+IG_TABLE_PREFIX = "ut_ig_"
+
+KINDS = ("scrape_db", "field_instagram")
+EXTRACTS = ("table", "jsonld")
+STATES = ("idle", "running", "ok", "error", "partial")
+#: Which capture rung a `field_instagram` automation is allowed to reach for (R1's hybrid).
+#: `anonymous` = the $0 ladder only. `hiker` = the paid rung FIRST, then the ladder as a fallback
+#: (unless the fallback is switched off — see `graph`'s `fallback` toggle).
+TIERS = ("anonymous", "hiker")
+
+
+def row_cap(table_key):
+ """The row ceiling for ONE table. Per-table rather than global — see `MAX_UT_IG_ROWS`."""
+ return MAX_UT_IG_ROWS if str(table_key or "").startswith(IG_TABLE_PREFIX) else MAX_UT_ROWS
+
+#: Schedule presets the editor offers. Kept here (not in the client) so the vocabulary the UI
+#: shows and the vocabulary the parser accepts cannot drift.
+CRON_PRESETS = [
+ {"cron": "*/15 * * * *", "label": "Every 15 minutes"},
+ {"cron": "0 * * * *", "label": "Hourly"},
+ {"cron": "0 6 * * *", "label": "Daily at 06:00"},
+ {"cron": "0 6 * * 1", "label": "Weekly (Monday 06:00)"},
+ {"cron": "0 6 1 * *", "label": "Monthly (1st, 06:00)"},
+]
+
+UA = "Mozilla/5.0 (compatible; AIOS-automation/1.0; +https://aios.local/automation)"
+
+
+def _now():
+ return _dt.datetime.now()
+
+
+def _stamp(dt=None):
+ return (dt or _now()).strftime("%Y-%m-%d %H:%M")
+
+
+def _iso(dt=None):
+ return (dt or _now()).strftime("%Y-%m-%dT%H:%M:%S")
+
+
+def _parse_iso(s):
+ try:
+ return _dt.datetime.strptime(str(s)[:19], "%Y-%m-%dT%H:%M:%S")
+ except Exception:
+ return None
+
+
+# ---------------------------------------------------------------------------------------------
+# THE SSRF RAIL — vendored from scrape.py `guard`, then hardened for a SERVER-SIDE fetcher
+# ---------------------------------------------------------------------------------------------
+# The skill version guards the URL a developer typed. This one guards a URL that arrived in a
+# request body, which changes the threat model in two ways the original does not cover:
+#
+# 1. REDIRECTS. `httpx.Client(follow_redirects=True)` / `requests.get(allow_redirects=True)`
+# never re-enter the guard, so `http://evil.example/x` → 302 → `http://169.254.169.254/…`
+# sails straight past a guard that only ever saw the first URL. The negative control ("a
+# localhost URL is refused") would still pass while the rail was wide open. `fetch` below
+# therefore takes the hops MANUALLY and re-guards every one.
+# 2. DNS. A perfectly public hostname may resolve to a private address. `guard` resolves the
+# host and checks EVERY answer, not just the literal.
+#
+# ⚠ STATED, NOT HIDDEN: this is check-then-connect, so a DNS-rebinding attacker who flips the
+# record between the guard and the socket is not stopped by it. Closing that needs a pinned
+# connection to the validated IP (a custom adapter). Out of scope for v1 and recorded here rather
+# than implied away — the rail refuses the realistic cases and says what it does not cover.
+
+class Refused(ValueError):
+ """The rail refused a URL. A distinct type so a refusal is never logged as a fetch error."""
+
+
+def _ip_public(ip):
+ return not (ip.is_private or ip.is_loopback or ip.is_link_local
+ or ip.is_reserved or ip.is_unspecified or ip.is_multicast)
+
+
+def guard(url, allowed=()):
+ """PUBLIC-WEB-ONLY rail: http(s) only, no loopback/private/link-local host, DNS answers
+ checked too, plus the optional `--allowed` domain rail scrape.py carries."""
+ p = urlparse(url or "")
+ if p.scheme not in ("http", "https"):
+ raise Refused(f"only http(s) allowed, not {p.scheme!r}")
+ host = (p.hostname or "").strip()
+ if not host:
+ raise Refused("no host in the URL")
+ low = host.lower()
+ if (low in ("localhost", "localhost.localdomain")
+ or low.endswith(".local") or low.endswith(".internal")
+ or low.endswith(".localhost")):
+ raise Refused(f"refused non-public host {host!r} (public web only)")
+ try: # a bare-IP host is decided on the literal
+ ip = ipaddress.ip_address(low)
+ except ValueError:
+ ip = None
+ if ip is not None and not _ip_public(ip):
+ raise Refused(f"refused non-public IP {host} (public web only)")
+ if allowed and not any(low == d.lower() or low.endswith("." + d.lower()) for d in allowed):
+ raise Refused(f"host {host!r} not in the allowed domains {list(allowed)}")
+ if ip is None:
+ try:
+ infos = socket.getaddrinfo(host, None)
+ except Exception as e:
+ raise Refused(f"could not resolve {host!r}: {type(e).__name__}")
+ for info in infos:
+ addr = info[4][0]
+ try:
+ resolved = ipaddress.ip_address(addr.split("%")[0])
+ except ValueError:
+ continue
+ if not _ip_public(resolved):
+ raise Refused(
+ f"refused {host!r}: it resolves to the non-public address {resolved}")
+ return True
+
+
+def fetch(url, timeout=20.0, max_kb=2048, allowed=(), max_hops=5, headers=None):
+ """GET `url`, taking redirects BY HAND so every hop passes `guard`.
+
+ Returns `(status, final_url, body_bytes)`. A hop chain longer than `max_hops` is a refusal,
+ not a silent truncation — an endless redirect is indistinguishable from an attempt to walk
+ the fetcher somewhere it was told not to go.
+ """
+ current = url
+ hdrs = {"User-Agent": UA, "Accept-Language": "en-US,en;q=0.9"}
+ hdrs.update(headers or {})
+ for _hop in range(max_hops + 1):
+ guard(current, allowed)
+ r = requests.get(current, timeout=timeout, headers=hdrs,
+ allow_redirects=False, stream=True)
+ if r.status_code in (301, 302, 303, 307, 308):
+ loc = r.headers.get("Location")
+ r.close()
+ if not loc:
+ raise Refused(f"redirect {r.status_code} with no Location header")
+ current = urljoin(current, loc)
+ continue
+ body = r.raw.read(max_kb * 1024, decode_content=True) or b""
+ status, final = r.status_code, str(r.url)
+ r.close()
+ return status, final, body
+ raise Refused(f"more than {max_hops} redirects — refusing to follow further")
+
+
+# ---------------------------------------------------------------------------------------------
+# EXTRACTION — vendored from scrape.py, unchanged in behaviour
+# ---------------------------------------------------------------------------------------------
+
+def _soup(body):
+ if BeautifulSoup is None:
+ raise RuntimeError(
+ "beautifulsoup4 is not installed in this environment — the automation engine's "
+ "extraction half needs it (see the wave-18 mailbox: add beautifulsoup4 + lxml to "
+ "aios-web/requirements.txt).")
+ try:
+ return BeautifulSoup(body, "lxml")
+ except Exception:
+ return BeautifulSoup(body, "html.parser")
+
+
+def tables(soup):
+ """Every HTML table as rows. Dict rows when the first row looks like a header."""
+ out = []
+ for t in soup.find_all("table"):
+ rows = []
+ for tr in t.find_all("tr"):
+ cells = [c.get_text(" ", strip=True) for c in tr.find_all(["th", "td"])]
+ if cells:
+ rows.append(cells)
+ if not rows:
+ continue
+ head, body = rows[0], rows[1:]
+ if body and len(head) == len(body[0]) and all(head):
+ out.append([dict(zip(head, r)) for r in body if len(r) == len(head)])
+ else:
+ out.append(rows)
+ return out
+
+
+def jsonld(soup):
+ out = []
+ for s in soup.find_all("script", attrs={"type": "application/ld+json"}):
+ try:
+ out.append(json.loads(s.string or s.get_text()))
+ except Exception:
+ pass
+ return out
+
+
+def meta(soup):
+ m = {}
+ if soup.title and soup.title.string:
+ m["title"] = soup.title.string.strip()
+ for tag in soup.find_all("meta"):
+ k = tag.get("name") or tag.get("property")
+ v = tag.get("content")
+ if k and v and (k in ("description", "keywords", "author")
+ or k.startswith(("og:", "twitter:"))):
+ m[k] = v.strip()
+ return m
+
+
+def preview(url, extract="table", table_index=0, allowed=()):
+ """The field-map preview the editor calls BEFORE anything is created: what columns does this
+ page actually offer, and what do the first rows look like? Never writes."""
+ status, final, body = fetch(url, allowed=allowed)
+ if not (200 <= status < 300):
+ return {"ok": False, "status": status, "url": final,
+ "note": f"the page answered {status} — it may be bot-gated or gone",
+ "columns": [], "sample": [], "rowCount": 0}
+ soup = _soup(body)
+ rows = []
+ if extract == "jsonld":
+ blocks = jsonld(soup)
+ flat = []
+ for b in blocks:
+ if isinstance(b, list):
+ flat.extend([x for x in b if isinstance(x, dict)])
+ elif isinstance(b, dict):
+ items = b.get("itemListElement")
+ flat.extend([x for x in items if isinstance(x, dict)] if isinstance(items, list)
+ else [b])
+ rows = [{k: _scalar(v) for k, v in d.items()} for d in flat]
+ else:
+ found = tables(soup)
+ idx = max(0, min(int(table_index or 0), len(found) - 1)) if found else 0
+ picked = found[idx] if found else []
+ rows = [r for r in picked if isinstance(r, dict)]
+ cols, seen = [], set()
+ for r in rows[:50]:
+ for k in r:
+ if k not in seen:
+ seen.add(k)
+ cols.append(k)
+ return {"ok": True, "status": status, "url": final, "columns": cols,
+ "sample": rows[:8], "rowCount": len(rows),
+ "tableCount": len(tables(soup)) if extract != "jsonld" else 0,
+ "title": (meta(soup) or {}).get("title", "")}
+
+
+def _scalar(v):
+ if isinstance(v, (str, int, float)) and not isinstance(v, bool):
+ return str(v)
+ if isinstance(v, bool):
+ return "1" if v else ""
+ if isinstance(v, dict):
+ return str(v.get("name") or v.get("@id") or "")
+ if isinstance(v, list):
+ return ", ".join(_scalar(x) for x in v[:8])
+ return ""
+
+
+# ---------------------------------------------------------------------------------------------
+# CRON — a 5-field parser and a "what was the last fire time" walk
+# ---------------------------------------------------------------------------------------------
+# Deliberately NOT `croniter` (a dependency for ~60 lines) and deliberately NOT a forward
+# scheduler. The question a tick asks is backwards-looking — *"was there a scheduled minute
+# between the last run and now?"* — and answering it that way is what makes a missed tick
+# self-healing: a container that was asleep for two hours runs once on wake, not eleven times and
+# not never.
+
+_FIELD_RANGES = [(0, 59), (0, 23), (1, 31), (1, 12), (0, 6)]
+
+
+def _parse_field(spec, lo, hi):
+ out = set()
+ for part in str(spec).split(","):
+ part = part.strip()
+ if not part:
+ raise ValueError("empty cron field part")
+ step = 1
+ if "/" in part:
+ part, _, s = part.partition("/")
+ step = int(s)
+ if step < 1:
+ raise ValueError("cron step must be >= 1")
+ if part in ("*", "?"):
+ a, b = lo, hi
+ elif "-" in part.lstrip("-"):
+ a_s, _, b_s = part.partition("-")
+ a, b = int(a_s), int(b_s)
+ else:
+ a = b = int(part)
+ if a < lo or b > hi or a > b:
+ raise ValueError(f"cron value {part!r} out of range {lo}..{hi}")
+ out.update(range(a, b + 1, step))
+ return out
+
+
+def parse_cron(expr):
+ """`'m h dom mon dow'` → `(minutes, hours, doms, months, dows, dom_restricted, dow_restricted)`.
+
+ Raises ValueError on anything malformed — a schedule that cannot be parsed must be refused at
+ WRITE time, because a cron string nobody can evaluate is an automation that silently never
+ runs and reports no error anywhere.
+ """
+ parts = str(expr or "").split()
+ if len(parts) != 5:
+ raise ValueError("a cron schedule has exactly 5 fields: minute hour day month weekday")
+ sets = [_parse_field(p, lo, hi) for p, (lo, hi) in zip(parts, _FIELD_RANGES)]
+ dom_r = parts[2].strip() not in ("*", "?")
+ dow_r = parts[4].strip() not in ("*", "?")
+ return (sets[0], sets[1], sets[2], sets[3], sets[4] | ({0} if 7 in sets[4] else set()),
+ dom_r, dow_r)
+
+
+def _day_matches(day, doms, months, dows, dom_r, dow_r):
+ if day.month not in months:
+ return False
+ # POSIX rule: with BOTH day-of-month and weekday restricted the match is the UNION, not the
+ # intersection. `0 6 1 * 1` means "the 1st, and every Monday" — getting this backwards makes
+ # a schedule that looks right fire almost never.
+ dow = (day.weekday() + 1) % 7 # python Mon=0 -> cron Sun=0
+ if dom_r and dow_r:
+ return day.day in doms or dow in dows
+ if dom_r:
+ return day.day in doms
+ if dow_r:
+ return dow in dows
+ return True
+
+
+def prev_fire(expr, now=None, lookback_days=400):
+ """The most recent scheduled minute at or before `now`, or None inside the lookback.
+
+ Walks by DAY (≤400 iterations) rather than by minute (≥500k) — the day fields decide first,
+ and only a matching day needs its hours/minutes searched.
+ """
+ minutes, hours, doms, months, dows, dom_r, dow_r = parse_cron(expr)
+ now = (now or _now()).replace(second=0, microsecond=0)
+ for back in range(lookback_days + 1):
+ day = (now - _dt.timedelta(days=back)).date()
+ if not _day_matches(day, doms, months, dows, dom_r, dow_r):
+ continue
+ same_day = back == 0
+ for h in sorted(hours, reverse=True):
+ if same_day and h > now.hour:
+ continue
+ for m in sorted(minutes, reverse=True):
+ if same_day and h == now.hour and m > now.minute:
+ continue
+ return _dt.datetime(day.year, day.month, day.day, h, m)
+ return None
+
+
+def is_due(defn, now=None):
+ """Should the scheduler run this automation right now?
+
+ Due when a scheduled minute exists strictly AFTER the reference point (the last run, else the
+ moment the schedule was enabled, else creation) and at or before now. Anchoring on
+ `enabledAt` rather than firing on the first tick is what stops "enable a daily 06:00 job at
+ 14:00" from running immediately and looking like a bug.
+ """
+ if not isinstance(defn, dict):
+ return False
+ sched = defn.get("schedule") or {}
+ if not sched.get("enabled"):
+ return False
+ try:
+ fire = prev_fire(sched.get("cron"), now=now)
+ except ValueError:
+ return False
+ if fire is None:
+ return False
+ since = (_parse_iso((defn.get("status") or {}).get("lastRunAt"))
+ or _parse_iso(sched.get("enabledAt"))
+ or _parse_iso(defn.get("created")))
+ return since is None or fire > since
+
+
+def next_fire(expr, now=None, lookahead_days=400):
+ """The next scheduled minute strictly after `now` — display only (the rail is `is_due`)."""
+ try:
+ minutes, hours, doms, months, dows, dom_r, dow_r = parse_cron(expr)
+ except ValueError:
+ return None
+ now = (now or _now()).replace(second=0, microsecond=0)
+ for ahead in range(lookahead_days + 1):
+ day = (now + _dt.timedelta(days=ahead)).date()
+ if not _day_matches(day, doms, months, dows, dom_r, dow_r):
+ continue
+ same_day = ahead == 0
+ for h in sorted(hours):
+ if same_day and h < now.hour:
+ continue
+ for m in sorted(minutes):
+ if same_day and h == now.hour and m <= now.minute:
+ continue
+ return _dt.datetime(day.year, day.month, day.day, h, m)
+ return None
+
+
+# ---------------------------------------------------------------------------------------------
+# THE UPSERT — pure, so the arithmetic is testable without a store or a network
+# ---------------------------------------------------------------------------------------------
+
+def upsert_rows(existing, incoming, key_field, cap=None):
+ """Merge scraped rows into a user table's rows BY KEY. Returns `(rows, counts)`.
+
+ THE RULE THAT MATTERS: **an orphan is COUNTED, NEVER DELETED.** A row that has stopped
+ appearing on the source page has not necessarily stopped existing — the page changed its
+ filter, the fetch was partial, the site paginated. Deleting on absence turns any upstream
+ hiccup into silent data loss, and the row may be carrying user-typed overlay values in
+ columns the scrape never touches. So the run reports `orphans: N` and leaves them alone.
+
+ Only MAPPED keys are written: a re-run never clobbers a column a user added by hand.
+
+ ⚠ CALL THIS ONCE PER TABLE PER RUN, NOT ONCE PER ROW. It rebuilds the whole row dict on
+ entry, so it is O(existing) per call — fine once, quadratic in a loop. The IG runner used to
+ call it per POST, which was survivable only because the cap was 5000; against `MAX_UT_IG_ROWS`
+ that same loop is hundreds of millions of dict copies and the automation simply never
+ finishes. Raising a cap and batching the writer are ONE change, not two. (W19-C.)
+
+ ⚠ `capped` IS ITS OWN COUNT, deliberately not folded into `skipped`. They are different
+ facts: `skipped` means "this row had no key, so it could not be upserted" — a property of the
+ DATA, and usually benign. `capped` means "this table is full and the run is now losing rows" —
+ a property of the SYSTEM, and never benign. One number for both meant a table hitting its
+ ceiling was indistinguishable from a page with a few blank cells, which is how a time series
+ stops silently. The runners turn any `capped` into a `partial` run that NAMES the table.
+ """
+ cap = MAX_UT_ROWS if cap is None else int(cap)
+ rows = {str(k): dict(v or {}) for k, v in (existing or {}).items()}
+ counts = {"inserted": 0, "updated": 0, "unchanged": 0,
+ "skipped": 0, "duplicates": 0, "orphans": 0, "capped": 0}
+ by_key, dupe_ids = {}, set()
+ for rid, row in rows.items():
+ kv = str(row.get(key_field, "") or "").strip()
+ if not kv:
+ continue
+ if kv in by_key:
+ dupe_ids.add(rid) # a pre-existing duplicate: first id wins, second left
+ continue
+ by_key[kv] = rid
+ next_id = max((int(r) for r in rows if str(r).isdigit()), default=0) + 1
+ seen_keys, incoming_dupes = set(), 0
+ for src in incoming or []:
+ kv = str((src or {}).get(key_field, "") or "").strip()
+ if not kv:
+ counts["skipped"] += 1 # no key -> cannot be upserted; never guessed
+ continue
+ if kv in seen_keys:
+ incoming_dupes += 1 # the SOURCE listed it twice; first wins
+ continue
+ seen_keys.add(kv)
+ rid = by_key.get(kv)
+ if rid is None:
+ if len(rows) >= cap:
+ counts["capped"] += 1 # LOUD: the runner turns this into a partial run
+ continue
+ rid = str(next_id)
+ next_id += 1
+ rows[rid] = dict(src)
+ by_key[kv] = rid
+ counts["inserted"] += 1
+ continue
+ before = rows[rid]
+ changed = {k: v for k, v in src.items() if str(before.get(k, "")) != str(v)}
+ if changed:
+ before.update(src)
+ counts["updated"] += 1
+ else:
+ counts["unchanged"] += 1
+ counts["duplicates"] = incoming_dupes + len(dupe_ids)
+ counts["orphans"] = sum(
+ 1 for kv, rid in by_key.items() if kv not in seen_keys and rid not in dupe_ids)
+ return rows, counts
+
+
+# ---------------------------------------------------------------------------------------------
+# USER TABLES — read/write through the RUNTIME (never core.user_tables' module-global key)
+# ---------------------------------------------------------------------------------------------
+
+def _ut_slug(label):
+ s = re.sub(r"[^a-z0-9]+", "_", str(label or "").strip().lower()).strip("_")
+ return (s or "table")[:40]
+
+
+def ut_all(rt):
+ try:
+ return dict(rt.get(UT_STORE_KEY) or {})
+ except Exception:
+ return {}
+
+
+def ut_get(rt, key):
+ return ut_all(rt).get(str(key))
+
+
+def ut_key_for(label, key=None):
+ """The table key a label resolves to. Factored out of `ut_ensure` so the DRY-RUN path (which
+ must not create anything) resolves the same key by construction rather than by copying the
+ derivation and drifting from it."""
+ k = str(key or (UT_PREFIX + _ut_slug(label)))
+ return k if k.startswith(UT_PREFIX) else UT_PREFIX + k
+
+
+def ut_ensure(rt, label, fields, username="automation", key=None):
+ """Create the table if it is missing; return its key. Idempotent — a re-run of an automation
+ that owns a table must not spawn `ut_x_2`, so the key is DERIVED from the label (or given)
+ and an existing table with that key is adopted, not duplicated.
+
+ Fields are MERGED, never replaced: a user who added a column to an automation's table keeps
+ it, and a new source column joins on the next run.
+ """
+ key = ut_key_for(label, key)
+ wanted = list(fields or [])
+ created = _iso()
+
+ # ⚠ SKIP THE WRITE WHEN NOTHING WOULD CHANGE. Without this, every re-run spends a store
+ # commit re-writing an identical definition — against a 20 s flush floor and a 256/hr repo
+ # budget, an idempotent helper that always writes is the same defect as a per-row insert.
+ have = ut_get(rt, key)
+ if have is not None and not [f for f in wanted
+ if f.get("key") not in {g.get("key")
+ for g in (have.get("fields") or [])}]:
+ return key
+
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ t = cur.get(key)
+ if t is None:
+ if len(cur) >= MAX_UT_TABLES:
+ return cur
+ cur[key] = {"key": key, "label": str(label)[:60], "source": "Automation",
+ "createdBy": username, "created": created,
+ "fields": wanted, "rows": {}}
+ return cur
+ have = {f.get("key") for f in (t.get("fields") or [])}
+ for f in wanted:
+ if f.get("key") not in have:
+ t.setdefault("fields", []).append(f)
+ have.add(f.get("key"))
+ # An automation's table SAYS an automation owns it — the nav badge reads from this.
+ t["source"] = t.get("source") or "Automation"
+ return cur
+
+ rt.update(UT_STORE_KEY, _up, flush="sync")
+ return key
+
+
+def ut_write_rows(rt, key, rows):
+ """ONE store update for the WHOLE row set — the flush-ceiling rule (see the module header)."""
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ t = cur.get(key)
+ if t is not None:
+ t["rows"] = rows
+ return cur
+ rt.update(UT_STORE_KEY, _up, flush="sync")
+
+
+def ut_set_cell(rt, key, row_id, field_key, value, extra_rows=None):
+ """Write one automation-owned cell (+ optional whole extra tables) in ONE update."""
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ t = cur.get(key)
+ if t is not None:
+ t.setdefault("rows", {}).setdefault(str(row_id), {})[field_key] = value
+ for k, rws in (extra_rows or {}).items():
+ tt = cur.get(k)
+ if tt is not None:
+ tt["rows"] = rws
+ return cur
+ rt.update(UT_STORE_KEY, _up, flush="sync")
+
+
+def field_def(text_key, label, ftype="text"):
+ return {"key": text_key, "label": label, "type": ftype, "source": "overlay"}
+
+
+# ---------------------------------------------------------------------------------------------
+# DEFINITIONS — validation and the bucket's read/write half
+# ---------------------------------------------------------------------------------------------
+
+def _s(v, n=200):
+ return str(v if v is not None else "")[:n]
+
+
+def clean_config(kind, raw, previous=None):
+ """Validate a kind's config. Returns `(config, error)`; error is a user-facing sentence.
+
+ ⚠ THE NODE-SWITCH FLAGS FALL BACK TO `previous` WHEN THE KEY IS ABSENT, and that is a rail
+ rather than a nicety. `patch` replaces the whole config, and the canvas's config panels do not
+ edit `tier` / `noFallback` / `dryRun` — those are node SWITCHES. So a plain "Save" from a
+ panel that never knew about them would silently reset the paid rung to `anonymous` and turn
+ off the dry run: a save that quietly changes what the automation costs. Absent ⇒ keep;
+ present ⇒ take it, including `false`.
+ """
+ raw = raw if isinstance(raw, dict) else {}
+ prev = previous if isinstance(previous, dict) else {}
+
+ def flag(name):
+ return bool(raw[name]) if name in raw else bool(prev.get(name))
+ if kind == "scrape_db":
+ url = _s(raw.get("url"), 2000).strip()
+ if not url:
+ return None, "a source URL is required"
+ try:
+ guard(url)
+ except Refused as e:
+ return None, str(e)
+ extract = raw.get("extract") if raw.get("extract") in EXTRACTS else "table"
+ fmap = {}
+ for k, v in list((raw.get("fieldMap") or {}).items())[:60]:
+ tk = re.sub(r"[^a-z0-9_]+", "_", _s(v, 60).strip().lower()).strip("_")
+ if tk:
+ fmap[_s(k, 120)] = tk[:60]
+ if not fmap:
+ return None, "map at least one source column to a field"
+ key_field = _s(raw.get("keyField"), 60).strip()
+ if key_field not in fmap.values():
+ return None, "the key field must be one of the mapped fields"
+ target = _s(raw.get("targetTable"), 60).strip()
+ if target and not target.startswith(UT_PREFIX):
+ target = UT_PREFIX + target
+ return {"url": url, "extract": extract,
+ "tableIndex": max(0, min(int(raw.get("tableIndex") or 0), 50)),
+ "fieldMap": fmap, "keyField": key_field,
+ "targetTable": target,
+ "dryRun": flag("dryRun"),
+ "targetLabel": _s(raw.get("targetLabel"), 60).strip() or "Scraped table"}, None
+ if kind == "field_instagram":
+ table = _s(raw.get("targetTable"), 60).strip()
+ if not table.startswith(UT_PREFIX):
+ return None, "an Instagram automation runs against a blank database (ut_*)"
+ fkey = _s(raw.get("fieldKey"), 80).strip()
+ if not fkey:
+ return None, "pick the automation column this run writes into"
+ return {"targetTable": table, "fieldKey": fkey,
+ "urlField": _s(raw.get("urlField"), 80).strip(),
+ # ⚠ UNKNOWN TIERS FALL BACK TO `anonymous`, NOT to the paid rung. A typo must
+ # never be the thing that starts spending money. An ABSENT tier keeps the one
+ # already stored (see the `flag` note above).
+ "tier": (raw["tier"] if raw.get("tier") in TIERS
+ else prev.get("tier") if "tier" not in raw and prev.get("tier") in TIERS
+ else "anonymous"),
+ "noFallback": flag("noFallback"),
+ "dryRun": flag("dryRun"),
+ "maxPosts": max(1, min(int(raw.get("maxPosts") or 24), 200))}, None
+ return None, f"unknown automation kind {kind!r}"
+
+
+def clean_schedule(raw, previous=None):
+ """Validate `{cron, enabled}` and stamp `enabledAt` on the OFF→ON edge (the anchor `is_due`
+ measures from — without it, enabling a daily job fires it immediately)."""
+ raw = raw if isinstance(raw, dict) else {}
+ cron = _s(raw.get("cron"), 120).strip() or "0 6 * * *"
+ parse_cron(cron) # raises -> the route answers 400
+ enabled = bool(raw.get("enabled"))
+ prev = previous or {}
+ out = {"cron": cron, "enabled": enabled}
+ if enabled:
+ out["enabledAt"] = (prev.get("enabledAt") if prev.get("enabled") else None) or _iso()
+ return out
+
+
+def clean_definition(raw, previous=None, username=""):
+ """Whole-definition validation. Returns `(defn, error)`."""
+ raw = raw if isinstance(raw, dict) else {}
+ prev = previous or {}
+ kind = _s(raw.get("kind") or prev.get("kind"), 40)
+ if kind not in KINDS:
+ return None, f"unknown automation kind {kind!r}"
+ name = " ".join(_s(raw.get("name") or prev.get("name") or "", MAX_NAME).split())
+ if not name:
+ return None, "name the automation"
+ cfg_raw = raw.get("config") if isinstance(raw.get("config"), dict) else prev.get("config")
+ config, err = clean_config(kind, cfg_raw, prev.get("config"))
+ if err:
+ return None, err
+ try:
+ schedule = clean_schedule(
+ raw.get("schedule") if isinstance(raw.get("schedule"), dict)
+ else prev.get("schedule"), prev.get("schedule"))
+ except ValueError as e:
+ return None, str(e)
+ return {
+ "id": _s(prev.get("id") or raw.get("id"), 40),
+ "name": name, "kind": kind, "config": config, "schedule": schedule,
+ "status": prev.get("status") or {"state": "idle", "lastRunAt": "", "lastSummary": ""},
+ "runs": list(prev.get("runs") or [])[:MAX_RUNS],
+ "created": prev.get("created") or _iso(),
+ "createdBy": prev.get("createdBy") or username,
+ }, None
+
+
+def all_definitions(rt):
+ try:
+ return dict(rt.get(STORE_KEY) or {})
+ except Exception:
+ return {}
+
+
+def _new_id(existing):
+ n = 1
+ while f"auto_{n}" in existing:
+ n += 1
+ return f"auto_{n}"
+
+
+def create(rt, raw, username=""):
+ existing = all_definitions(rt)
+ if len(existing) >= MAX_AUTOMATIONS:
+ return None, f"this workspace is at the {MAX_AUTOMATIONS}-automation limit"
+ defn, err = clean_definition(raw, None, username)
+ if err:
+ return None, err
+ defn["id"] = _new_id(existing)
+
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ cur[defn["id"]] = defn
+ return cur
+
+ rt.update(STORE_KEY, _up, flush="sync")
+ return defn, None
+
+
+def patch(rt, auto_id, raw, username=""):
+ existing = all_definitions(rt)
+ prev = existing.get(str(auto_id))
+ if prev is None:
+ return None, "no such automation"
+ merged = dict(prev)
+ for k in ("name", "config", "schedule", "kind"):
+ if k in (raw or {}):
+ merged[k] = raw[k]
+ defn, err = clean_definition(merged, prev, username)
+ if err:
+ return None, err
+ defn["id"] = str(auto_id)
+
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ cur[defn["id"]] = defn
+ return cur
+
+ rt.update(STORE_KEY, _up, flush="sync")
+ return defn, None
+
+
+def remove(rt, auto_id):
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ cur.pop(str(auto_id), None)
+ return cur
+ rt.update(STORE_KEY, _up, flush="sync")
+
+
+# ---------------------------------------------------------------------------------------------
+# RUN STATE — process memory only (see the module header for why this may never be persisted)
+# ---------------------------------------------------------------------------------------------
+
+_RUN_LOCK = threading.RLock()
+_RUNNING = {} # (tenant, id) -> {'startedAt', 'step'}
+
+
+def running(tenant, auto_id):
+ with _RUN_LOCK:
+ return dict(_RUNNING.get((tenant, str(auto_id))) or {}) or None
+
+
+def _claim(tenant, auto_id):
+ with _RUN_LOCK:
+ if (tenant, str(auto_id)) in _RUNNING:
+ return False
+ _RUNNING[(tenant, str(auto_id))] = {"startedAt": _iso(), "step": "starting"}
+ return True
+
+
+def _step(tenant, auto_id, text):
+ with _RUN_LOCK:
+ cur = _RUNNING.get((tenant, str(auto_id)))
+ if cur is not None:
+ cur["step"] = text
+
+
+def _release(tenant, auto_id):
+ with _RUN_LOCK:
+ _RUNNING.pop((tenant, str(auto_id)), None)
+
+
+def _commit_run(rt, auto_id, state, summary, counts, ok, affected=None, steps=None):
+ """THE ONE store write a run performs on the `automations` bucket.
+
+ `steps` is the per-NODE outcome map the canvas paints its dots from. It is recorded here
+ because it is a MEASUREMENT the runner took as it walked — see `graph`, which refuses to
+ invent a node status when this map is absent (every run stored before W19-C has no `steps`,
+ and painting those nodes green from the run's overall state would be a fabrication).
+ """
+ entry = {"ts": _iso(), "ok": bool(ok), "summary": _s(summary, 400),
+ "counts": {k: int(v) for k, v in (counts or {}).items()
+ if isinstance(v, (int, float))},
+ "steps": {str(k): str(v) for k, v in (steps or {}).items()},
+ "affected": list(affected or [])[:200]}
+
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ d = cur.get(str(auto_id))
+ if d is None:
+ return cur
+ d["status"] = {"state": state, "lastRunAt": entry["ts"],
+ "lastSummary": entry["summary"]}
+ d["runs"] = ([entry] + list(d.get("runs") or []))[:MAX_RUNS]
+ return cur
+
+ rt.update(STORE_KEY, _up, flush="sync")
+ return entry
+
+
+# ---------------------------------------------------------------------------------------------
+# INSTAGRAM (R7, extended by R1) — PUBLIC DATA ONLY, NEVER AN INSTAGRAM LOGIN
+# ---------------------------------------------------------------------------------------------
+# ⚠ AMENDED W19-C. This section read "ANONYMOUS PUBLIC ENDPOINTS ONLY" and that is no longer the
+# whole truth: R1 added a paid VENDOR rung (HikerAPI, further down) which does authenticate — to
+# the vendor. The rail that actually matters is unchanged and is the sharper statement of it:
+#
+# **NOTHING HERE EVER AUTHENTICATES TO INSTAGRAM.** No login, no password, no session cookie,
+# no account to get banned, public data only. The vendor key is a key to a SUPPLIER, and the
+# supplier takes the scraping risk; it is never an Instagram credential and this module must
+# never be given one.
+#
+# The rungs below this line are the ANONYMOUS ladder ($0, no key of any kind).
+#
+# ⚠ HONEST STATUSES ARE THE FEATURE. Instagram rate-limits and outright blocks datacenter egress
+# (the HF Space and any AWS Lambda are both in that class), and its anonymous surface has been
+# progressively closed for years. So this returns a STATE — ok / partial / blocked / error — and
+# the cell says which. A pull that quietly wrote zero posts and reported success would be worse
+# than no automation at all: the table would look maintained and be empty.
+#
+# THE LADDER, tried in order with pacing between rungs. Each rung records how it did in `via`,
+# so a run history answers "what still works anonymously?" from data rather than from memory.
+
+PACE_SECONDS = float(os.environ.get("AIOS_IG_PACE_SECONDS") or 2.5)
+IG_APP_ID = "936619743392459" # the public web client id the browser itself sends
+IG_MAX_RETRIES = 2
+
+SNAPSHOT_FIELDS = [
+ field_def("snapshot_key", "Snapshot"), field_def("influencer_key", "Influencer"),
+ field_def("pulled_at", "Pulled at"), field_def("followers", "Followers"),
+ field_def("following", "Following"), field_def("posts_count", "Posts"),
+ field_def("full_name", "Name"), field_def("bio", "Bio"),
+ field_def("verified", "Verified"), field_def("source", "Read via"),
+ field_def("approx", "Counts are approximate"),
+ # The link in bio — the paid rung's field, and commercially the most useful single string an
+ # influencer row can carry (it is the shop/affiliate destination). Blank on the anonymous
+ # rungs, which do not expose it; a blank here means "not read", never "they have none".
+ field_def("external_url", "Link in bio", "url"),
+]
+POST_FIELDS = [
+ field_def("shortcode", "Shortcode"), field_def("influencer_key", "Influencer"),
+ field_def("posted_at", "Posted at"), field_def("type", "Type"),
+ field_def("caption", "Caption"), field_def("url", "URL", "url"),
+]
+POST_SNAPSHOT_FIELDS = [
+ field_def("post_snapshot_key", "Snapshot"), field_def("shortcode", "Shortcode"),
+ field_def("pulled_at", "Pulled at"), field_def("likes", "Likes"),
+ field_def("comments", "Comments"),
+ # Plays/views move independently of likes on video, so it is its own series rather than a
+ # thing to derive. Paid rung only; blank means not read.
+ field_def("views", "Views"),
+]
+
+
+def ig_handle(url):
+ """The handle out of a profile URL (or a bare handle). '' when it is not one."""
+ raw = str(url or "").strip()
+ if not raw:
+ return ""
+ if raw.startswith("@"):
+ return re.sub(r"[^A-Za-z0-9._]", "", raw[1:])[:40]
+ if "instagram.com" not in raw:
+ return re.sub(r"[^A-Za-z0-9._]", "", raw)[:40] if "/" not in raw else ""
+ path = urlparse(raw if "//" in raw else "https://" + raw).path.strip("/")
+ first = (path.split("/") or [""])[0]
+ if first in ("p", "reel", "reels", "explore", "accounts", "stories", ""):
+ return ""
+ return re.sub(r"[^A-Za-z0-9._]", "", first)[:40]
+
+
+def _ig_get(url, headers=None, timeout=20.0):
+ """One anonymous GET with 429 backoff. Returns `(status, body_bytes, note)`."""
+ delay = PACE_SECONDS
+ for attempt in range(IG_MAX_RETRIES + 1):
+ try:
+ status, _final, body = fetch(url, timeout=timeout, headers=headers, max_kb=4096)
+ except Refused:
+ raise
+ except Exception as e: # noqa: BLE001
+ return 0, b"", f"{type(e).__name__}: {str(e)[:120]}"
+ if status == 429 and attempt < IG_MAX_RETRIES:
+ time.sleep(delay)
+ delay *= 2 # exponential, never a tight retry
+ continue
+ return status, body, ""
+ return 429, b"", "rate limited after retries"
+
+
+def _ig_int(v):
+ try:
+ return int(v)
+ except Exception:
+ return None
+
+
+def _profile_from_web_api(node, handle):
+ return {
+ "username": node.get("username") or handle,
+ "full_name": node.get("full_name") or "",
+ "bio": node.get("biography") or "",
+ "followers": _ig_int((node.get("edge_followed_by") or {}).get("count")),
+ "following": _ig_int((node.get("edge_follow") or {}).get("count")),
+ "posts_count": _ig_int((node.get("edge_owner_to_timeline_media") or {}).get("count")),
+ "verified": "1" if node.get("is_verified") else "",
+ }
+
+
+def _posts_from_edges(edges):
+ out = []
+ for e in edges or []:
+ n = (e or {}).get("node") or {}
+ code = n.get("shortcode")
+ if not code:
+ continue
+ caption = ""
+ for ce in ((n.get("edge_media_to_caption") or {}).get("edges") or []):
+ caption = ((ce or {}).get("node") or {}).get("text") or ""
+ break
+ ts = n.get("taken_at_timestamp")
+ out.append({
+ "shortcode": code,
+ "posted_at": (_dt.datetime.fromtimestamp(ts).strftime("%Y-%m-%d %H:%M")
+ if isinstance(ts, (int, float)) else ""),
+ "type": ("video" if n.get("is_video") else
+ "carousel" if n.get("__typename") == "GraphSidecar" else "image"),
+ "caption": caption,
+ "url": f"https://www.instagram.com/p/{code}/",
+ "likes": _ig_int((n.get("edge_liked_by") or n.get("edge_media_preview_like")
+ or {}).get("count")),
+ "comments": _ig_int((n.get("edge_media_to_comment") or {}).get("count")),
+ })
+ return out
+
+
+_OG_COUNTS = re.compile(
+ r"([\d.,KMkm]+)\s+Followers?,\s*([\d.,KMkm]+)\s+Following,\s*([\d.,KMkm]+)\s+Posts?")
+
+
+def _loose_count(txt):
+ """'1.2M' / '12,345' -> int. IG's og:description abbreviates, so the snapshot is honest
+ about being approximate rather than pretending to a precision it does not have."""
+ t = str(txt or "").strip().replace(",", "")
+ mult = 1
+ if t[-1:].lower() == "k":
+ mult, t = 1_000, t[:-1]
+ elif t[-1:].lower() == "m":
+ mult, t = 1_000_000, t[:-1]
+ try:
+ return int(float(t) * mult)
+ except Exception:
+ return None
+
+
+# ---------------------------------------------------------------------------------------------
+# HIKERAPI — THE PAID RUNG (owner ruling R1, contract C4)
+# ---------------------------------------------------------------------------------------------
+# WHY A VENDOR AT ALL, stated once so nobody re-opens it: the anonymous ladder above is honest but
+# it is ALSO geographically fenced — Instagram blocks datacenter egress, so from the HF Space or a
+# Lambda the ladder degrades to `blocked` and the whole automation becomes a thing that only works
+# on the owner's desk. HikerAPI takes the egress risk, returns EXACT counts (not og:description's
+# "204K") and reaches post-level data the anonymous surface has closed. ~$0.0006/req.
+#
+# ⛔ FOUR RAILS, and each one is a failure mode rather than a preference:
+# 1. **FAIL-CLOSED on the key.** No `AIOS_HIKERAPI_KEY` ⇒ this rung refuses with an honest
+# blocked ATTEMPT and the anonymous ladder still runs. Never a crash, never a silent skip.
+# 2. **The key is never logged, never in a URL, never in an exception.** It travels in the
+# `x-access-key` header only, and every error below quotes a STATUS, never the request. A
+# secret that reaches a log line has leaked to everyone who can read logs.
+# 3. **The base URL is guarded like any other.** `AIOS_HIKERAPI_BASE` is env-provided, so it
+# goes through the same SSRF rail — an env var pointed at the metadata endpoint would
+# otherwise be a credential-bearing request to it.
+# 4. **A rung failure is a RUNG failure.** `hiker_get` swallows its own `Refused`/transport
+# errors, because `run_now` turns a `Refused` into a whole-run error — and a mistyped base
+# URL must not kill a run whose anonymous rung would have answered.
+#
+# ⚠ THE KEY IS READ LAZILY, INSIDE THE CALL. A module-level snapshot would be taken at import,
+# which makes the "key absent ⇒ blocked, not crash" gate untestable (nothing could flip it between
+# checks) and would also mean a deploy that sets the secret after import silently has no key.
+
+#: Pinned from the live OpenAPI spec (`https://api.hikerapi.com/openapi.json`, read 2026-08-04) —
+#: see `.claude/wiki/research/instagram-capture.md` for the full mapping and its provenance tags.
+#: They live in ONE named block so a vendor rename is a one-line fix rather than a hunt.
+HIKER_BASE_DEFAULT = "https://api.hikerapi.com"
+HIKER_PATH_USER = "/v1/user/by/username" # -> exact counts + bio. param: username
+HIKER_PATH_MEDIAS = "/v1/user/medias/chunk" # -> posts. params: user_id, end_cursor
+HIKER_TIMEOUT = 30.0
+#: ⚠ NO PAGE-SIZE CONSTANT. The chunk endpoint takes `user_id` and `end_cursor` only — the page
+#: size is the vendor's to choose. A `HIKER_PAGE = 50` sat here unused, which reads as a parameter
+#: somebody forgot to send rather than one that does not exist.
+
+
+def hiker_key():
+ """The key, or ''. Read fresh every call — see the module note above on why."""
+ return (os.environ.get("AIOS_HIKERAPI_KEY") or "").strip()
+
+
+def hiker_base():
+ return (os.environ.get("AIOS_HIKERAPI_BASE") or HIKER_BASE_DEFAULT).strip().rstrip("/")
+
+
+def hiker_ready():
+ """Is the paid rung configured at all? The UI reads this to say so honestly."""
+ return bool(hiker_key())
+
+
+def hiker_get(path, params=None):
+ """One authenticated GET. Returns `(payload, note)`; a non-empty `note` means it did NOT
+ answer, and the note is safe to show a user and safe to write to a log.
+
+ Never raises. Every refusal shape — no key, a guarded base, a 402 out of credit, a 429, a
+ transport error, unparseable JSON — comes back as a note so the caller can record the attempt
+ and drop to the next rung.
+ """
+ key = hiker_key()
+ if not key:
+ # ⛔ THE FAIL-CLOSED PATH (C4). Named precisely, because "blocked" with no reason sends
+ # somebody to read Instagram's status page instead of setting an env var.
+ return None, "AIOS_HIKERAPI_KEY is not configured — the paid rung is closed"
+ qs = "&".join(f"{k}={requests.utils.quote(str(v))}"
+ for k, v in (params or {}).items() if v not in (None, ""))
+ url = f"{hiker_base()}{path}" + (f"?{qs}" if qs else "")
+ try:
+ status, _final, body = fetch(url, timeout=HIKER_TIMEOUT, max_kb=8192,
+ headers={"x-access-key": key, "Accept": "application/json"})
+ except Refused as e:
+ # The BASE was refused by the SSRF rail — a configuration fault, not a vendor outage.
+ return None, f"the HikerAPI base URL was refused by the URL rail: {e}"
+ except Exception as e: # noqa: BLE001
+ # ⚠ `type(e).__name__` only. A requests exception's str() can carry the full URL, and one
+ # day somebody will move the key into a query param; this line must not be what leaks it.
+ return None, f"HikerAPI did not answer ({type(e).__name__})"
+ if status == 402:
+ return None, "HikerAPI answered 402 — the account is out of credit"
+ if status == 401 or status == 403:
+ return None, f"HikerAPI refused the key ({status})"
+ if status == 429:
+ return None, "HikerAPI answered 429 — rate limited"
+ if not (200 <= status < 300):
+ return None, f"HikerAPI answered {status}"
+ try:
+ return json.loads(body.decode("utf-8", "replace")), ""
+ except Exception: # noqa: BLE001
+ return None, "HikerAPI answered with something that is not JSON"
+
+
+def _first(node, *names, default=None):
+ """The first of `names` present on `node` with a real value.
+
+ ⚠ THE TOLERANCE IS THE POINT, not laziness. The vendor's `components/schemas` was not readable
+ on 2026-08-04 (recorded as RECALLED in the digest), so every media field name below is a
+ hypothesis. Reading through a candidate list means a rename costs one more candidate instead
+ of a rung that returns nothing and cannot say why. **A field that matches nothing returns
+ `default` (None), never 0** — an invented zero is a measurement, and this module's whole
+ honest-status contract exists to stop those.
+ """
+ if not isinstance(node, dict):
+ return default
+ for n in names:
+ v = node.get(n)
+ if v not in (None, ""):
+ return v
+ return default
+
+
+def _hiker_profile(node, handle):
+ """The vendor's user object → our snapshot shape. CONFIRMED names (vendor quick-start,
+ 2026-08-04): pk, username, full_name, is_private, is_verified, media_count, follower_count,
+ following_count, biography. `external_url` is RECALLED — hence the candidates."""
+ return {
+ "username": _first(node, "username", default=handle),
+ "full_name": _first(node, "full_name", "fullname", default="") or "",
+ "bio": _first(node, "biography", "bio", default="") or "",
+ "followers": _ig_int(_first(node, "follower_count", "followers", "followers_count")),
+ "following": _ig_int(_first(node, "following_count", "following", "followings_count")),
+ "posts_count": _ig_int(_first(node, "media_count", "posts_count", "post_count")),
+ "verified": "1" if _first(node, "is_verified", default=False) else "",
+ "external_url": _first(node, "external_url", "external_link", default="") or "",
+ # ⛔ NO `approx` KEY. These counts are exact, and carrying the anonymous rung's rounding
+ # tag onto them would be a lie in the other direction (R1: "drop the approx tag when
+ # exact"). Its ABSENCE is what tells the snapshot row it is trustworthy.
+ }
+
+
+def _hiker_user_id(node):
+ return str(_first(node, "pk", "id", "pk_id", default="") or "")
+
+
+#: instagrapi-family media_type ints. `product_type == "clips"` is a reel, which is still a video.
+_HIKER_MEDIA_TYPES = {1: "image", 2: "video", 8: "carousel"}
+
+
+def _hiker_post(m):
+ """One vendor media object → our post shape (the same shape `_posts_from_edges` returns, so
+ everything downstream is rung-agnostic). Returns None when it has no shortcode — a post that
+ cannot be deduped cannot be appended to a time series."""
+ code = _first(m, "code", "shortcode", default="")
+ if not code:
+ return None
+ raw_type = _first(m, "media_type", "type")
+ kind = _HIKER_MEDIA_TYPES.get(raw_type) if isinstance(raw_type, int) else None
+ if kind is None:
+ kind = str(raw_type or "").lower() or "image"
+ if kind not in ("image", "video", "carousel"):
+ kind = "video" if kind in ("clips", "igtv", "reel", "reels") else "image"
+ taken = _first(m, "taken_at", "taken_at_timestamp", "device_timestamp")
+ if isinstance(taken, (int, float)):
+ try:
+ posted = _dt.datetime.fromtimestamp(taken).strftime("%Y-%m-%d %H:%M")
+ except Exception: # noqa: BLE001
+ posted = ""
+ else: # an ISO string ("2026-01-01T00:00:00+00:00")
+ posted = str(taken or "").replace("T", " ")[:16]
+ caption = _first(m, "caption_text", "caption")
+ if isinstance(caption, dict):
+ caption = _first(caption, "text", default="")
+ return {
+ "shortcode": str(code),
+ "posted_at": posted,
+ "type": kind,
+ "caption": str(caption or ""),
+ "url": f"https://www.instagram.com/p/{code}/",
+ # ⚠ NO `like_and_view_counts_disabled` CANDIDATE, however like-shaped its name is: it is
+ # a BOOLEAN in this family of schemas, and `_ig_int(True)` is 1 — so a post with likes
+ # hidden would have reported "1 like". A candidate list must only ever contain fields of
+ # the same TYPE as the thing it is reading.
+ "likes": _ig_int(_first(m, "like_count", "likes")),
+ "comments": _ig_int(_first(m, "comment_count", "comments")),
+ "views": _ig_int(_first(m, "play_count", "view_count", "video_play_count", "views")),
+ }
+
+
+def _hiker_media_items(payload):
+ """Unwrap a chunk answer into `(items, cursor)`.
+
+ The chunk shape is RECALLED (see the digest), so all four plausible envelopes are accepted:
+ a bare list, `[items, cursor]`, `{"response": {"items": [...]}}`, and `{"items": [...]}`.
+ """
+ cursor = ""
+ if isinstance(payload, list):
+ # `[items, next_cursor]` — the instagrapi chunk convention — vs. a plain list of medias.
+ if (len(payload) == 2 and isinstance(payload[0], list)
+ and isinstance(payload[1], (str, type(None)))):
+ return [x for x in payload[0] if isinstance(x, dict)], str(payload[1] or "")
+ return [x for x in payload if isinstance(x, dict)], ""
+ if isinstance(payload, dict):
+ inner = payload.get("response") if isinstance(payload.get("response"), dict) else payload
+ items = _first(inner, "items", "medias", "data", default=[])
+ # ⛔ LOOK FOR THE CURSOR AT BOTH LEVELS. It was read from `payload` only, so a
+ # `{"response": {"items": [...], "next_max_id": "..."}}` envelope — where the cursor sits
+ # NEXT TO the items, one level in — resolved to "", the caller's `if not cursor: break`
+ # fired, and a `maxPosts=200` pull returned ONE chunk and reported `ok`. A green run that
+ # silently fetched a quarter of what was asked for is precisely the failure this module's
+ # honest-status contract exists to prevent, and it arrives through the RECALLED half of
+ # the vendor schema — which is the half that has to be read defensively at every level.
+ for src in (inner, payload):
+ cursor = str(_first(src, "next_cursor", "end_cursor", "next_page_id",
+ "next_max_id", default="") or "")
+ if cursor:
+ break
+ if isinstance(items, list):
+ return [x for x in items if isinstance(x, dict)], cursor
+ return [], cursor
+
+
+def pull_profile_hiker(url, max_posts=24, log=print):
+ """The paid rung: one profile, EXACT counts, and posts the anonymous surface will not give.
+
+ Same return contract as `pull_profile` (`{state, profile, posts, via, note}`) so the runner
+ treats every rung identically. `blocked` here means the VENDOR rung did not answer — the
+ caller decides whether to drop to the anonymous ladder.
+ """
+ handle = ig_handle(url)
+ if not handle:
+ return {"state": "error", "note": f"{url!r} is not an Instagram profile URL",
+ "profile": {}, "posts": [], "via": ""}
+ payload, note = hiker_get(HIKER_PATH_USER, {"username": handle})
+ if note:
+ return {"state": "blocked", "profile": {}, "posts": [], "via": "hikerapi",
+ "note": note}
+ node = payload if isinstance(payload, dict) else {}
+ node = node.get("user") if isinstance(node.get("user"), dict) else node
+ profile = _hiker_profile(node, handle)
+ if profile.get("followers") is None and profile.get("posts_count") is None:
+ # It answered 200 with something we could not read. Say THAT — not "0 followers".
+ return {"state": "blocked", "profile": {}, "posts": [], "via": "hikerapi",
+ "note": "HikerAPI answered, but no follower/post counts were readable in it "
+ "(the field names may have moved — see instagram-capture.md)"}
+ posts, cursor, pages = [], "", 0
+ user_id = _hiker_user_id(node)
+ while user_id and len(posts) < max_posts and pages < 20:
+ pages += 1
+ page, mnote = hiker_get(HIKER_PATH_MEDIAS,
+ {"user_id": user_id, "end_cursor": cursor})
+ if mnote:
+ note = mnote
+ break
+ items, cursor = _hiker_media_items(page)
+ if not items:
+ break
+ for m in items:
+ p = _hiker_post(m)
+ if p:
+ posts.append(p)
+ if not cursor:
+ break
+ time.sleep(min(PACE_SECONDS, 1.0)) # the vendor is paid, but it is still someone's API
+ posts = posts[:max_posts]
+ # IDENTITY WITHOUT MEDIA IS STILL `partial`, on the paid rung too. The rule does not soften
+ # because we are paying: a run that wrote a follower count and no posts must not paint green
+ # over a posts table that did not grow.
+ return {"state": "ok" if posts else "partial", "profile": profile, "posts": posts,
+ "via": "hikerapi",
+ "note": note or ("" if posts else "profile read; HikerAPI returned no medias")}
+
+
+def pull_profile(url, max_posts=24, log=print, tier="anonymous", fallback=True):
+ """Everything readable about one public profile, cheapest-honest rung last.
+
+ Returns `{state, profile, posts, via, note}` with state ∈ ok | partial | blocked | error.
+ `partial` means the identity was read but the media was not — which is the outcome the
+ anonymous surface most often gives, and saying so is the point.
+
+ **RUNG 0 IS THE PAID ONE (R1's hybrid).** With `tier="hiker"` HikerAPI is tried FIRST and,
+ when it answers, this returns exact counts with no `approx` tag. When it does not answer the
+ attempt is RECORDED and the anonymous ladder runs underneath it — that is what "fail-closed
+ on the key, and the anonymous rung still works" means in C4.
+
+ `fallback=False` turns that safety net off on purpose: it means *"exact numbers or nothing"*.
+ An influencer table where some rows are exact and some are `og:description` roundings, with
+ no way to tell them apart at a glance, is a table you cannot do arithmetic on — so a user who
+ needs the guarantee can have it, and gets an honest `blocked` instead of a quiet downgrade.
+ (The `source`/`approx` columns tell them apart anyway; this makes it impossible to forget.)
+ """
+ handle = ig_handle(url)
+ if not handle:
+ return {"state": "error", "note": f"{url!r} is not an Instagram profile URL",
+ "profile": {}, "posts": [], "via": ""}
+ attempts = []
+
+ if tier == "hiker":
+ paid = pull_profile_hiker(url, max_posts=max_posts, log=log)
+ if paid["state"] in ("ok", "partial"):
+ return paid
+ attempts.append(f"hikerapi:{_s(paid.get('note'), 90)}")
+ if not fallback:
+ return {"state": "blocked", "profile": {}, "posts": [], "via": "hikerapi",
+ "note": "the paid rung did not answer and the anonymous fallback is turned "
+ f"off for this automation ({paid.get('note') or 'blocked'})"}
+ time.sleep(PACE_SECONDS)
+
+ # RUNG 1 — the web client's own profile endpoint. Public, no cookie; the one that used to
+ # carry both the profile AND the first page of media in a single answer.
+ api = f"https://www.instagram.com/api/v1/users/web_profile_info/?username={handle}"
+ status, body, note = _ig_get(api, headers={
+ "X-IG-App-ID": IG_APP_ID, "Accept": "*/*",
+ "Referer": f"https://www.instagram.com/{handle}/"})
+ attempts.append(f"web_profile_info:{status or note}")
+ if 200 <= status < 300 and body:
+ try:
+ node = ((json.loads(body.decode("utf-8", "replace")) or {})
+ .get("data") or {}).get("user") or {}
+ except Exception:
+ node = {}
+ if node:
+ profile = _profile_from_web_api(node, handle)
+ media = node.get("edge_owner_to_timeline_media") or {}
+ posts = _posts_from_edges(media.get("edges"))[:max_posts]
+ page = media.get("page_info") or {}
+ if page.get("has_next_page") and page.get("end_cursor") and len(posts) < max_posts:
+ more, pnote = _paginate(node.get("id"), page.get("end_cursor"),
+ max_posts - len(posts), log)
+ posts.extend(more)
+ if pnote:
+ attempts.append(pnote)
+ state = "ok" if posts else "partial"
+ return {"state": state, "profile": profile, "posts": posts,
+ "via": "web_profile_info",
+ "note": "" if posts else "profile read; media edges empty ("
+ + ", ".join(attempts) + ")"}
+
+ time.sleep(PACE_SECONDS)
+
+ # RUNG 2 — the profile HTML. Its og:description carries the three counts even when every
+ # JSON surface refuses, so it is the honest floor: identity without media.
+ status, body, note = _ig_get(f"https://www.instagram.com/{handle}/")
+ attempts.append(f"html:{status or note}")
+ if 200 <= status < 300 and body:
+ text = body.decode("utf-8", "replace")
+ if "/accounts/login" in text[:4000] and "og:description" not in text:
+ return {"state": "blocked", "profile": {}, "posts": [], "via": "html",
+ "note": "Instagram served the login wall (" + ", ".join(attempts) + ")"}
+ desc = ""
+ m = re.search(r']+property="og:description"[^>]+content="([^"]*)"', text)
+ if m:
+ desc = m.group(1)
+ counts = _OG_COUNTS.search(desc or "")
+ title = ""
+ mt = re.search(r']+property="og:title"[^>]+content="([^"]*)"', text)
+ if mt:
+ title = mt.group(1)
+ if counts:
+ profile = {
+ "username": handle, "full_name": title.split("(")[0].strip(),
+ # ⚠ NO BIO. `og:description` on a profile page is
+ # "204K Followers, 5,245 Following, 750 Posts - See Instagram photos and videos
+ # from Inayma (@inayma)" — the tail is Instagram's own boilerplate, not the
+ # person's biography. Storing it would fill a Bio column with the same sentence
+ # for every influencer, which reads as data and is not. Measured 2026-08-04.
+ "bio": "",
+ "followers": _loose_count(counts.group(1)),
+ "following": _loose_count(counts.group(2)),
+ "posts_count": _loose_count(counts.group(3)),
+ "verified": "",
+ # The page abbreviates ("204K"), so the number is the page's rounding, not a
+ # count we read. Recorded on the row rather than left for someone to discover
+ # when 204,000 fails to reconcile with anything.
+ "approx": "1",
+ }
+ return {"state": "partial", "profile": profile, "posts": [], "via": "og:description",
+ "note": "counts are the page's own abbreviations; media is not anonymously "
+ "readable (" + ", ".join(attempts) + ")"}
+ if status in (401, 403, 429) or status == 0:
+ return {"state": "blocked", "profile": {}, "posts": [], "via": "",
+ "note": f"Instagram refused the anonymous read ({', '.join(attempts)})"}
+ return {"state": "error", "profile": {}, "posts": [], "via": "",
+ "note": f"nothing anonymously readable ({', '.join(attempts)})"}
+
+
+#: The historical anonymous media query. Kept because trying it and RECORDING the refusal is
+#: what makes "as deep as anonymously accessible" (R7) a measurement instead of an assumption.
+IG_MEDIA_QUERY_HASH = "e769aa130647d2354c40ea6a439bfc08"
+
+
+def _paginate(user_id, cursor, want, log=print):
+ """Walk further back through the media edges while the anonymous surface allows it."""
+ out, note = [], ""
+ while user_id and cursor and len(out) < want:
+ time.sleep(PACE_SECONDS)
+ variables = json.dumps({"id": str(user_id), "first": min(50, want - len(out)),
+ "after": cursor}, separators=(",", ":"))
+ url = (f"https://www.instagram.com/graphql/query/?query_hash={IG_MEDIA_QUERY_HASH}"
+ f"&variables={requests.utils.quote(variables)}")
+ status, body, err = _ig_get(url, headers={"X-IG-App-ID": IG_APP_ID})
+ if not (200 <= status < 300) or not body:
+ note = f"graphql:{status or err}"
+ break
+ try:
+ media = (((json.loads(body.decode("utf-8", "replace")) or {}).get("data") or {})
+ .get("user") or {}).get("edge_owner_to_timeline_media") or {}
+ except Exception:
+ note = "graphql:unparseable"
+ break
+ edges = media.get("edges") or []
+ if not edges:
+ note = "graphql:empty"
+ break
+ out.extend(_posts_from_edges(edges))
+ page = media.get("page_info") or {}
+ if not page.get("has_next_page"):
+ break
+ cursor = page.get("end_cursor")
+ return out[:want], note
+
+
+# ---------------------------------------------------------------------------------------------
+# RUNNERS
+# ---------------------------------------------------------------------------------------------
+
+def cap_note(capped):
+ """The sentence a cap breach adds to a run summary. `capped` = [(table_key, rows_lost), ...].
+
+ ⛔ IT NAMES THE TABLE. "142 rows skipped" sends somebody to look at the source page; "the
+ ut_ig_post_snapshots database is FULL" sends them to the actual problem. A loud failure that
+ does not say WHERE is only marginally better than a silent one.
+ """
+ return "; ".join(
+ f"⚠ the {k} database is FULL ({row_cap(k):,} rows) — {n} row{'' if n == 1 else 's'} "
+ f"from this run were NOT written" for k, n in capped if n)
+
+
+def run_scrape_db(rt, defn, username="automation", log=print):
+ """Automation #1 (R6): a public page → a blank database, re-runnable, UPSERT by key."""
+ cfg = defn.get("config") or {}
+ fmap, key_field = cfg.get("fieldMap") or {}, cfg.get("keyField")
+ dry = bool(cfg.get("dryRun"))
+ # Per-NODE outcomes for the canvas. MEASURED as the run walks, never inferred afterwards from
+ # the rollup — inferring is exactly how a green dot ended up over an empty table (see the
+ # rollup comment in `run_field_instagram`).
+ steps = {"trigger": "ok", "fetch": "idle", "extract": "idle", "write": "idle"}
+ status, final, body = fetch(cfg["url"])
+ if not (200 <= status < 300):
+ steps["fetch"] = "error"
+ return ("error", f"{cfg['url']} answered {status} — nothing was written",
+ {"status": status}, [], steps)
+ steps["fetch"] = "ok"
+ soup = _soup(body)
+ if cfg.get("extract") == "jsonld":
+ blocks = jsonld(soup)
+ flat = []
+ for b in blocks:
+ if isinstance(b, list):
+ flat.extend([x for x in b if isinstance(x, dict)])
+ elif isinstance(b, dict):
+ items = b.get("itemListElement")
+ flat.extend([x for x in items if isinstance(x, dict)] if isinstance(items, list)
+ else [b])
+ raw_rows = [{k: _scalar(v) for k, v in d.items()} for d in flat]
+ else:
+ found = tables(soup)
+ idx = max(0, min(int(cfg.get("tableIndex") or 0), len(found) - 1)) if found else 0
+ raw_rows = [r for r in (found[idx] if found else []) if isinstance(r, dict)]
+ if not raw_rows:
+ steps["extract"] = "error"
+ return ("error", "the page parsed but the selected table had no rows", {"rows": 0}, [],
+ steps)
+ steps["extract"] = "ok"
+
+ incoming = []
+ for r in raw_rows:
+ mapped = {tgt: _s(r.get(src, ""), 500) for src, tgt in fmap.items()}
+ if any(v for v in mapped.values()):
+ incoming.append(mapped)
+
+ fields = [field_def(tgt, src if len(src) <= 60 else src[:60])
+ for src, tgt in fmap.items()]
+ # the key column leads, so the table opens on the identity it is upserted by
+ fields.sort(key=lambda f: 0 if f["key"] == key_field else 1)
+ label = cfg.get("targetLabel") or defn.get("name") or "Scraped table"
+ if dry:
+ # THE WRITE NODE IS OFF — read, compute, report, touch nothing. Not even `ut_ensure`,
+ # which would create the table: a dry run that leaves a new empty database behind is not
+ # a dry run.
+ table_key = ut_key_for(label, cfg.get("targetTable") or None)
+ else:
+ table_key = ut_ensure(rt, label, fields, username, key=cfg.get("targetTable") or None)
+ t = ut_get(rt, table_key) or {}
+ rows, counts = upsert_rows(t.get("rows") or {}, incoming, key_field,
+ cap=row_cap(table_key))
+ if not dry:
+ ut_write_rows(rt, table_key, rows)
+ counts["source_rows"] = len(incoming)
+ affected = [rid for rid, row in rows.items()
+ if str(row.get(key_field, "")) in {str(i.get(key_field)) for i in incoming}][:200]
+ summary = (f"{counts['inserted']} new, {counts['updated']} updated, "
+ f"{counts['unchanged']} unchanged, {counts['orphans']} no longer on the page "
+ f"(kept)")
+ capped = [(table_key, counts.get("capped", 0))]
+ note = cap_note(capped)
+ if note:
+ summary += f" — {note}"
+ steps["write"] = "partial"
+ if dry:
+ summary = f"DRY RUN (the Write step is turned off) — would have written: {summary}"
+ steps["write"] = "skipped"
+ elif not note:
+ steps["write"] = "ok"
+ state = "partial" if (counts.get("capped") or counts.get("skipped") or dry) else "ok"
+ log(f"[aios-auto] scrape_db {defn.get('id')} -> {table_key}: {summary}")
+ return (state, summary, counts, affected, steps)
+
+
+def run_field_instagram(rt, defn, username="automation", log=print):
+ """Automation #2 (R7 + R1's hybrid): for every row of a blank database that carries a profile
+ URL, pull the public profile — the PAID rung first when the tier says so, the anonymous
+ ladder underneath it — write a status string into the automation column, and append a
+ timestamped row to each of the three IG tables."""
+ cfg = defn.get("config") or {}
+ table_key, fkey = cfg.get("targetTable"), cfg.get("fieldKey")
+ tier = cfg.get("tier") if cfg.get("tier") in TIERS else "anonymous"
+ fallback = not cfg.get("noFallback")
+ dry = bool(cfg.get("dryRun"))
+ steps = {"trigger": "ok", "source": "idle", "capture": "idle",
+ "capture_hiker": "idle" if tier == "hiker" else "skipped",
+ "capture_anon": "idle" if (tier != "hiker" or fallback) else "skipped",
+ "write": "idle"}
+ t = ut_get(rt, table_key)
+ if not t:
+ steps["source"] = "error"
+ return ("error", f"{table_key} is not a database in this workspace", {}, [], steps)
+ url_field = cfg.get("urlField") or _auto_url_field(t, fkey)
+ if not url_field:
+ steps["source"] = "error"
+ return ("error", "the automation column has no URL field bound to it", {}, [], steps)
+ steps["source"] = "ok"
+ rows = dict(t.get("rows") or {})
+ # the relational tables the pull lands in (R7): every row timestamped for time-range filters
+ if dry:
+ # The Write node is off: resolve the keys, create nothing. (`ut_ensure` writes.)
+ snap_key, post_key, ps_key = ("ut_ig_snapshots", "ut_ig_posts", "ut_ig_post_snapshots")
+ else:
+ snap_key = ut_ensure(rt, "IG snapshots", SNAPSHOT_FIELDS, username, key="ut_ig_snapshots")
+ post_key = ut_ensure(rt, "IG posts", POST_FIELDS, username, key="ut_ig_posts")
+ ps_key = ut_ensure(rt, "IG post snapshots", POST_SNAPSHOT_FIELDS, username,
+ key="ut_ig_post_snapshots")
+ snaps = dict((ut_get(rt, snap_key) or {}).get("rows") or {})
+ posts = dict((ut_get(rt, post_key) or {}).get("rows") or {})
+ psnaps = dict((ut_get(rt, ps_key) or {}).get("rows") or {})
+
+ counts = {"profiles": 0, "ok": 0, "partial": 0, "blocked": 0, "error": 0,
+ "posts": 0, "new_posts": 0, "paid": 0, "capped": 0}
+ cells, affected, notes = {}, [], []
+ # ⛔ ACCUMULATE HERE, UPSERT ONCE PER TABLE AFTER THE LOOP. This used to call `upsert_rows`
+ # once per POST, which is O(existing) per call — survivable only while the cap was 5000 rows.
+ # `MAX_UT_IG_ROWS` makes the same loop hundreds of millions of dict copies, i.e. an automation
+ # that no longer finishes. **Raising a cap and batching its writer are ONE change.** (W19-C.)
+ in_snaps, in_posts, in_psnaps = [], [], []
+ hiker_tried = hiker_answered = anon_tried = anon_answered = False
+ targets = [(rid, str(r.get(url_field, "") or "").strip())
+ for rid, r in rows.items() if str(r.get(url_field, "") or "").strip()]
+ for i, (rid, url) in enumerate(targets):
+ if i:
+ time.sleep(PACE_SECONDS) # ≥2 s between profiles (R7)
+ counts["profiles"] += 1
+ res = pull_profile(url, max_posts=cfg.get("maxPosts") or 24, log=log,
+ tier=tier, fallback=fallback)
+ pulled = _iso()
+ via = res.get("via") or ""
+ read_ok = res["state"] in ("ok", "partial")
+ # WHICH RUNG ANSWERED — tracked per profile so the canvas's rung dots are a measurement.
+ if tier == "hiker":
+ hiker_tried = True
+ if via == "hikerapi" and read_ok:
+ hiker_answered = True
+ counts["paid"] += 1
+ elif fallback:
+ anon_tried = True
+ anon_answered = anon_answered or read_ok
+ else:
+ anon_tried = True
+ anon_answered = anon_answered or read_ok
+ if read_ok:
+ counts["ok" if res["state"] == "ok" else "partial"] += 1
+ prof = res["profile"]
+ in_snaps.append({
+ "snapshot_key": f"{prof['username']}@{pulled}",
+ "influencer_key": prof["username"], "pulled_at": pulled,
+ "followers": _s(prof.get("followers")), "following": _s(prof.get("following")),
+ "posts_count": _s(prof.get("posts_count")),
+ "full_name": _s(prof.get("full_name")),
+ "bio": _s(prof.get("bio"), 500), "verified": _s(prof.get("verified")),
+ "source": _s(res.get("via")), "approx": _s(prof.get("approx")),
+ "external_url": _s(prof.get("external_url"), 300)})
+ for p in res.get("posts") or []:
+ in_posts.append({
+ "shortcode": p["shortcode"], "influencer_key": prof["username"],
+ "posted_at": _s(p.get("posted_at")), "type": _s(p.get("type")),
+ "caption": _s(p.get("caption"), 800), "url": _s(p.get("url"), 300)})
+ in_psnaps.append({
+ "post_snapshot_key": f"{p['shortcode']}@{pulled}",
+ "shortcode": p["shortcode"], "pulled_at": pulled,
+ "likes": _s(p.get("likes")), "comments": _s(p.get("comments")),
+ "views": _s(p.get("views"))})
+ counts["posts"] += len(res.get("posts") or [])
+ detail = f"{prof.get('followers') or '?'} followers"
+ if prof.get("approx"):
+ detail += " (approx)"
+ if res.get("posts"):
+ detail += f", {len(res['posts'])} posts"
+ elif res["state"] == "partial":
+ detail += ", posts not readable on the rung that answered"
+ cells[rid] = f"{res['state']} · {_stamp()} · {detail}"
+ elif res["state"] == "blocked":
+ counts["blocked"] += 1
+ cells[rid] = f"blocked · {_stamp()} · {_s(res.get('note'), 90)}"
+ notes.append(res.get("note") or "blocked")
+ else:
+ counts["error"] += 1
+ cells[rid] = f"error · {_stamp()} · {_s(res.get('note'), 90)}"
+ notes.append(res.get("note") or "error")
+ affected.append(rid)
+
+ # --- THE THREE UPSERTS. Once each, over the whole run's accumulated rows.
+ snaps, c_snap = upsert_rows(snaps, in_snaps, "snapshot_key", cap=row_cap(snap_key))
+ posts, c_post = upsert_rows(posts, in_posts, "shortcode", cap=row_cap(post_key))
+ psnaps, c_ps = upsert_rows(psnaps, in_psnaps, "post_snapshot_key", cap=row_cap(ps_key))
+ counts["new_posts"] = c_post["inserted"]
+ capped = [(snap_key, c_snap["capped"]), (post_key, c_post["capped"]),
+ (ps_key, c_ps["capped"])]
+ counts["capped"] = sum(n for _k, n in capped)
+
+ if not dry:
+ def _up(cur):
+ cur = cur if isinstance(cur, dict) else {}
+ tt = cur.get(table_key)
+ if tt is not None:
+ for rid, val in cells.items():
+ tt.setdefault("rows", {}).setdefault(str(rid), {})[fkey] = val
+ for k, rws in ((snap_key, snaps), (post_key, posts), (ps_key, psnaps)):
+ tgt = cur.get(k)
+ if tgt is not None:
+ tgt["rows"] = rws
+ return cur
+
+ rt.update(UT_STORE_KEY, _up, flush="sync") # ONE coalesced update for all four tables
+
+ # ⚠ A RUN IS ONLY 'ok' IF EVERY PROFILE WAS. The first live run rolled up to 'ok' while
+ # every CELL said `partial`, because the rollup only asked about blocked/error — so the rail
+ # showed a green dot over a table with no posts in it. A summary that disagrees with the
+ # cells it summarises is the failure this whole module's honest-status rule exists to
+ # prevent, so `partial` now propagates. Measured 2026-08-04.
+ read = counts["ok"] + counts["partial"]
+ if not read:
+ state = "error" if counts["error"] else "partial" if counts["blocked"] else "ok"
+ elif counts["blocked"] or counts["error"] or counts["partial"]:
+ state = "partial"
+ else:
+ state = "ok"
+ # --- per-node outcomes for the canvas (see the same note in `run_scrape_db`)
+ if not targets:
+ cap_state = "idle"
+ elif not read:
+ cap_state = "error" if counts["error"] else "blocked"
+ else:
+ cap_state = "partial" if (counts["blocked"] or counts["error"]
+ or counts["partial"]) else "ok"
+ steps["capture"] = cap_state
+ steps["capture_hiker"] = ("ok" if hiker_answered
+ else "blocked" if hiker_tried else "skipped")
+ steps["capture_anon"] = ("ok" if anon_answered
+ else "blocked" if anon_tried else "skipped")
+
+ summary = (f"{read}/{counts['profiles']} profiles read, {counts['posts']} posts "
+ f"({counts['new_posts']} new)")
+ if counts["paid"]:
+ summary += f", {counts['paid']} exact via HikerAPI"
+ if counts["partial"]:
+ summary += f", {counts['partial']} profile-only (posts not readable)"
+ if counts["blocked"]:
+ summary += f", {counts['blocked']} blocked"
+ note = cap_note(capped)
+ if note:
+ summary += f" — {note}"
+ state = "partial" if state != "error" else state
+ steps["write"] = "partial"
+ elif not dry:
+ steps["write"] = "ok"
+ if dry:
+ summary = f"DRY RUN (the Write step is turned off) — would have written: {summary}"
+ steps["write"] = "skipped"
+ state = "partial" if state != "error" else state
+ if notes:
+ summary += f" — {notes[0][:120]}"
+ return (state, summary, counts, affected, steps)
+
+
+def _auto_url_field(table, fkey):
+ """The URL field an automation column is bound to: its own `automation.urlField`, else the
+ first url-typed column on the table. Never guessed silently — the caller reports which."""
+ for f in table.get("fields") or []:
+ if f.get("key") == fkey:
+ bound = ((f.get("automation") or {}).get("urlField") or "").strip()
+ if bound:
+ return bound
+ for f in table.get("fields") or []:
+ if f.get("type") == "url":
+ return f.get("key")
+ return ""
+
+
+RUNNERS = {"scrape_db": run_scrape_db, "field_instagram": run_field_instagram}
+
+
+# ---------------------------------------------------------------------------------------------
+# THE CANVAS GRAPH (R5) — topology on the SERVER, pixels on the client
+# ---------------------------------------------------------------------------------------------
+# WHY THE TOPOLOGY LIVES HERE. The canvas draws what an automation DOES; the runners above are
+# what it does. Two descriptions of one thing in two languages drift, and the drift is invisible —
+# a canvas that still shows a step the engine stopped running looks completely fine. So the node
+# list is derived from the DEFINITION by the same module that executes it, rides on the payload
+# the way `CRON_PRESETS` and the kind list already do, and is asserted in `verify_automation.py`.
+# The client owns layout (pixels, pan/zoom, hit targets) and nothing else.
+#
+# ⚠ BRANCHES RENDER, THEY DO NOT EXECUTE (R5, accepted at grill; DEBT D-7). The `capture` node is
+# a real branch in BEHAVIOUR — the paid rung answers or the anonymous ladder does — but the engine
+# walks it linearly. Nothing here should be read as a general branching runtime.
+
+#: A node's dot vocabulary. Deliberately WIDER than the run-level `STATES`: a node can be
+#: `blocked` or `skipped` in ways a whole run cannot, and folding those into `partial` would throw
+#: away the only information the dot is there to carry.
+NODE_STATES = ("idle", "ok", "partial", "error", "blocked", "skipped")
+
+#: node id -> the switch it flips. A node ABSENT from this map has no switch, and that is a
+#: deliberate answer rather than an omission: a "Fetch the page" step that can be turned off is
+#: not an automation with a disabled step, it is a broken automation with a lie on it. The ones
+#: here are all REAL — each changes what the next run does:
+#: schedule the trigger fires on its cron, or only by hand
+#: hiker the paid rung is reached for, or it is not (this is the one that spends money)
+#: fallback the anonymous ladder catches a refused paid rung, or the run says `blocked`
+#: instead of quietly writing an approximate number
+#: write DRY RUN — read everything, compute the counts, write nothing anywhere
+NODE_TOGGLES = {"trigger": "schedule", "capture_hiker": "hiker",
+ "capture_anon": "fallback", "write": "write"}
+
+
+def _cron_label(cron):
+ return next((p["label"] for p in CRON_PRESETS if p["cron"] == cron), cron or "")
+
+
+def node_status(steps, nid):
+ """A node's dot — from the last run's MEASURED step outcome, or `idle`.
+
+ ⛔ NEVER INFERRED FROM THE RUN'S OVERALL STATE, and this is a module-level function precisely
+ so a negative control can prove that. Every run stored before W19-C has no `steps` map at all,
+ and painting those nodes green because the run said `ok` would manufacture a measurement — the
+ same defect as the green dot over the empty posts table recorded in `run_field_instagram`.
+ No data ⇒ `idle`. An unrecognised word ⇒ `idle`, never passed through to the UI.
+ """
+ v = str((steps or {}).get(nid) or "")
+ return v if v in NODE_STATES else "idle"
+
+
+def graph(defn):
+ """One automation → `{nodes, edges}`, left to right. Pure over the definition."""
+ defn = defn if isinstance(defn, dict) else {}
+ cfg = defn.get("config") or {}
+ sched = defn.get("schedule") or {}
+ runs = defn.get("runs") or []
+ last = runs[0] if runs and isinstance(runs[0], dict) else {}
+ steps = last.get("steps") if isinstance(last.get("steps"), dict) else {}
+
+ def node(nid, kind, title, subtitle, col, row=0, panel="", detail="", on=True):
+ return {"id": nid, "kind": kind, "title": title, "subtitle": subtitle, "detail": detail,
+ "col": col, "row": row, "panel": panel or nid, "enabled": bool(on),
+ "toggle": NODE_TOGGLES.get(nid, ""), "status": node_status(steps, nid)}
+
+ on = bool(sched.get("enabled"))
+ nodes = [node("trigger", "trigger", "Schedule",
+ _cron_label(sched.get("cron")) if on else "Manual only", 0,
+ panel="schedule", on=on,
+ detail="" if on else "It still runs when you press Run now")]
+ edges = []
+
+ if defn.get("kind") == "field_instagram":
+ tier = cfg.get("tier") if cfg.get("tier") in TIERS else "anonymous"
+ paid = tier == "hiker"
+ fb = not cfg.get("noFallback")
+ anon_on = (not paid) or fb
+ nodes += [
+ node("source", "source", "Profile set", cfg.get("targetTable") or "No database", 1,
+ panel="source",
+ detail=f"URL column: {cfg.get('urlField')}" if cfg.get("urlField")
+ else "URL column: the one the field is bound to"),
+ node("capture", "branch", "Capture",
+ "HikerAPI, then anonymous" if paid else "Anonymous only", 2, panel="capture",
+ detail=f"Up to {cfg.get('maxPosts') or 24} posts per profile"),
+ node("capture_hiker", "capture", "HikerAPI",
+ "Exact counts, full posts" if paid else "Off — the paid rung is not used",
+ 3, row=-1, panel="capture", on=paid,
+ detail="" if hiker_ready() else "No AIOS_HIKERAPI_KEY is configured"),
+ node("capture_anon", "capture", "Anonymous",
+ "Approximate counts, $0" if anon_on else "Off — exact numbers or nothing",
+ 3, row=1, panel="capture", on=anon_on,
+ detail="Local egress only — Instagram blocks datacenters"),
+ node("write", "write", "Write",
+ cfg.get("targetTable") or "No database", 4, panel="write",
+ on=not cfg.get("dryRun"),
+ detail="+ ut_ig_snapshots · ut_ig_posts · ut_ig_post_snapshots"),
+ ]
+ edges = [{"from": "trigger", "to": "source", "label": ""},
+ {"from": "source", "to": "capture", "label": ""},
+ {"from": "capture", "to": "capture_hiker", "label": "paid"},
+ {"from": "capture", "to": "capture_anon", "label": "fallback"},
+ {"from": "capture_hiker", "to": "write", "label": ""},
+ {"from": "capture_anon", "to": "write", "label": ""}]
+ # When there is no paid rung the anonymous one is the ONLY rung, so it must not carry a
+ # switch that would leave the automation with nothing to run.
+ if not paid:
+ for n in nodes:
+ if n["id"] == "capture_anon":
+ n["toggle"] = ""
+ else:
+ url = str(cfg.get("url") or "")
+ host = (urlparse(url).hostname or url or "No URL") if url else "No URL"
+ which = ("Structured data (JSON-LD)" if cfg.get("extract") == "jsonld"
+ else f"HTML table #{int(cfg.get('tableIndex') or 0)}")
+ mapped = len(cfg.get("fieldMap") or {})
+ nodes += [
+ node("fetch", "source", "Fetch page", host, 1, panel="source", detail=url[:90]),
+ node("extract", "capture", "Extract", which, 2, panel="columns",
+ detail=f"{mapped} column{'' if mapped == 1 else 's'} mapped · key: "
+ f"{cfg.get('keyField') or '—'}"),
+ node("write", "write", "Write", cfg.get("targetLabel") or "Scraped table", 3,
+ panel="write", on=not cfg.get("dryRun"),
+ detail=cfg.get("targetTable") or "a new database"),
+ ]
+ edges = [{"from": "trigger", "to": "fetch", "label": ""},
+ {"from": "fetch", "to": "extract", "label": ""},
+ {"from": "extract", "to": "write", "label": ""}]
+ return {"nodes": nodes, "edges": edges}
+
+
+def toggle_node(rt, auto_id, node_id):
+ """Flip ONE node's switch. Returns `(defn, error)`.
+
+ The node → config mapping lives on the SERVER for the reason the whole graph does: a client
+ that knew which field each node writes would be a second copy of that knowledge, free to
+ drift. The canvas just says "this node was clicked".
+ """
+ prev = all_definitions(rt).get(str(auto_id))
+ if prev is None:
+ return None, "no such automation"
+ target = next((n for n in graph(prev)["nodes"] if n["id"] == str(node_id)), None)
+ if target is None:
+ return None, f"there is no {node_id!r} step in this automation"
+ if not target.get("toggle"):
+ return None, (f"the {target['title']} step cannot be turned off — it is what this "
+ f"automation is")
+ cfg, sched = dict(prev.get("config") or {}), dict(prev.get("schedule") or {})
+ which = target["toggle"]
+ if which == "schedule":
+ sched["enabled"] = not sched.get("enabled")
+ elif which == "hiker":
+ cfg["tier"] = "anonymous" if cfg.get("tier") == "hiker" else "hiker"
+ elif which == "fallback":
+ cfg["noFallback"] = not cfg.get("noFallback")
+ elif which == "write":
+ cfg["dryRun"] = not cfg.get("dryRun")
+ return patch(rt, auto_id, {"config": cfg, "schedule": sched})
+
+
+def run_now(rt, tenant, auto_id, username="automation", log=print):
+ """Execute one automation SYNCHRONOUSLY. The route wraps this in a thread; the tick calls it
+ directly. Returns the run entry, or None when it was already running (the 409)."""
+ defn = all_definitions(rt).get(str(auto_id))
+ if defn is None:
+ return None
+ if not _claim(tenant, auto_id):
+ return None
+ try:
+ _step(tenant, auto_id, "running")
+ runner = RUNNERS.get(defn.get("kind"))
+ if runner is None:
+ return _commit_run(rt, auto_id, "error",
+ f"unknown automation kind {defn.get('kind')!r}", {}, False)
+ try:
+ state, summary, counts, affected, steps = runner(rt, defn, username=username,
+ log=log)
+ except Refused as e:
+ return _commit_run(rt, auto_id, "error", f"refused: {e}", {}, False)
+ except Exception as e: # noqa: BLE001
+ log(f"[aios-auto] run {auto_id} failed: {type(e).__name__}: {e}")
+ return _commit_run(rt, auto_id, "error",
+ f"{type(e).__name__}: {str(e)[:200]}", {}, False)
+ return _commit_run(rt, auto_id, state, summary, counts, state != "error", affected,
+ steps)
+ finally:
+ _release(tenant, auto_id)
+
+
+def run_async(rt, tenant, auto_id, username="automation", log=print):
+ """Start a run on a background thread. False when one is already in flight (→ 409)."""
+ if running(tenant, auto_id):
+ return False
+ th = threading.Thread(target=run_now, args=(rt, tenant, auto_id, username, log),
+ daemon=True, name=f"automation-{tenant}-{auto_id}")
+ th.start()
+ return True
+
+
+# ---------------------------------------------------------------------------------------------
+# THE TICK + the in-process scheduler
+# ---------------------------------------------------------------------------------------------
+
+def due_ids(rt, now=None):
+ """Which of this tenant's automations a tick at `now` should start. Pure over the store."""
+ return sorted(aid for aid, d in all_definitions(rt).items() if is_due(d, now))
+
+
+def tick(rt, tenant, now=None, log=print):
+ """Fire every due automation for ONE tenant. Returns the ids started."""
+ started = []
+ for aid in due_ids(rt, now):
+ if run_async(rt, tenant, aid, username="scheduler", log=log):
+ started.append(aid)
+ if started:
+ log(f"[aios-auto] tick {tenant}: started {', '.join(started)}")
+ return started
+
+
+def tick_all(now=None, log=print):
+ """Every registered tenant. Fail-quiet per tenant: one tenant's broken store must not stop
+ the others' schedules."""
+ from harness import runtime as _rt
+ out = {}
+ for slug in _rt.known_tenants():
+ try:
+ out[slug] = tick(_rt.get_runtime(slug), slug, now=now, log=log)
+ except Exception as e: # noqa: BLE001
+ log(f"[aios-auto] tick {slug} skipped: {type(e).__name__}: {e}")
+ return out
+
+
+#: How often the in-process scheduler wakes. A minute is the cron resolution; anything finer
+#: would be a busy loop against a vocabulary that cannot express it.
+TICK_SECONDS = int(os.environ.get("AIOS_AUTOMATION_TICK_SECONDS") or 60)
+_SCHEDULER = [None]
+
+
+def scheduler_loop(log=print):
+ """The resync-daemon pattern (`api/main.py:313`): sleep FIRST, then work.
+
+ Sleeping first is deliberate and load-bearing for the gate battery — `verify_api` and
+ `verify_seam` import this module through `main.py`, run against fake stores in seconds and
+ exit. A loop that ticked on entry would fire inside them.
+ """
+ while True:
+ time.sleep(TICK_SECONDS)
+ try:
+ tick_all(log=log)
+ except Exception as e: # noqa: BLE001
+ log(f"[aios-auto] scheduler tick failed: {type(e).__name__}: {e}")
+
+
+def start_scheduler(log=print):
+ """Start the loop once per process. **OPT-IN: `AIOS_AUTOMATIONS=1`.**
+
+ ⚠ AMENDED 2026-08-03 (D), and the reason is a measurement rather than a preference. The wave
+ brief specified this thread DEFAULT-ON for the API. Then `verify_api.py` was timed: **196
+ seconds**, i.e. more than three 60 s tick intervals. A default-on scheduler therefore fires
+ two or three times inside a gate that imports `main.py` — and while a tick over a fake store
+ finds nothing due, `tick_all` reaches `runtime.get_runtime()`, which BUILDS tenants and
+ mutates the LRU cache that `verify_api`'s own isolation assertions read. A background thread
+ that can move a gate's subject is a flaky suite waiting to happen.
+
+ So it takes the convention `main.py:353` already established for exactly this hazard —
+ `AIOS_PREWARM=1` — for exactly the reason stated there: env-gated rather than a startup
+ event, so importing this module in a gate can never fire anything. The DEPLOY sets it; the
+ external EventBridge tick (R5) does not depend on it either way, since that POSTs the
+ endpoint rather than riding this thread.
+ """
+ if os.environ.get("AIOS_AUTOMATIONS") != "1":
+ return False
+ if _SCHEDULER[0] is not None:
+ return False
+ th = threading.Thread(target=scheduler_loop, kwargs={"log": log},
+ daemon=True, name="automation-scheduler")
+ _SCHEDULER[0] = th
+ th.start()
+ return True
diff --git a/api/deps.py b/api/deps.py
new file mode 100644
index 0000000000000000000000000000000000000000..5ce4e89daee94bf354fb4ac428c81df3c24ee4ba
--- /dev/null
+++ b/api/deps.py
@@ -0,0 +1,213 @@
+"""deps.py — the request-scoped session + tenant resolution every v1 route depends on.
+
+ONE place answers "who is asking, for which tenant, and what may they see?", because a
+permission check that exists in four routes has four chances to be forgotten. The routes take
+`session: Session = Depends(require_session)` and receive an object that has ALREADY failed
+closed if anything was wrong.
+
+FAIL-CLOSED, spelled out (X2): no cookie → **401**. Cookie present but unverifiable, expired,
+epoch-revoked, or naming an unknown tenant → **401**. Authenticated but not granted the surface →
+**403**. Never an empty 200: an empty list is a legitimate answer meaning "no rows", and using it
+to mean "you are not allowed" is how a permission bug becomes invisible.
+"""
+import os
+import sys
+import time
+from collections import OrderedDict
+from dataclasses import dataclass
+from pathlib import Path
+
+from fastapi import Depends, HTTPException, Request, Response
+
+import aios_session
+
+_RI = Path(os.environ.get("RI_DIR") or Path(__file__).resolve().parents[2] / "platform")
+if str(_RI) not in sys.path:
+ sys.path.insert(0, str(_RI))
+
+import core.perms as perms # noqa: E402
+import core.users as users # noqa: E402
+from harness import runtime # noqa: E402
+
+
+def err(status, code, message):
+ """The one error shape (X2): non-2xx JSON `{"error": {"code", "message"}}`."""
+ return HTTPException(status_code=status, detail={"error": {"code": code, "message": message}})
+
+
+@dataclass
+class Session:
+ """A verified request identity. `user` is the PUBLIC record (never a hash or a salt)."""
+ tenant: str
+ user: dict
+ claims: dict
+ runtime: object
+
+ @property
+ def uname(self):
+ return self.user.get("username", "")
+
+ @property
+ def admin(self):
+ return perms.is_admin(self.user)
+
+ def require(self, module_key):
+ """403 unless this session may open `module_key`. Returns nothing — it is a gate.
+
+ TWO walls, both fail-closed (wave 18, C1-TENANT): the ACCOUNT grant (`perms.may_open`)
+ and the TENANT catalogue — a registry module a tenant has not enabled is 403 even for
+ that tenant's admin, or a freshly provisioned Nurilab admin (role=admin ⇒ may_open
+ everything) would open Royal's Odoo-backed surfaces through any module route. One
+ chokepoint: `module_gate` and every inline `session.require` pass through here."""
+ if not perms.may_open(self.user, module_key):
+ raise err(403, "forbidden", f"your account does not have access to {module_key}")
+ tcfg = getattr(self.runtime.tenant, "config", None) or {}
+ tmods = tcfg.get("modules", "all")
+ if tmods != "all" and str(module_key) not in {str(k) for k in (tmods or [])}:
+ raise err(403, "forbidden",
+ f"this workspace does not include {module_key}")
+
+
+def _user_for(claims):
+ """The account named by a verified cookie, or None — with the epoch check that makes a
+ stateless cookie revocable.
+
+ ⛔ THE RULE THIS FUNCTION MUST OBEY: **it has to accept exactly the identities `users.verify`
+ issues.** Any divergence produces the worst failure shape there is — a login that returns 200
+ with a cookie and then 401s every request after it. This function got that wrong once (the
+ emergency-master branch below ran only when NO record existed, while `verify` grants the master
+ identity even when one does), so it is now written as a deliberate mirror of `verify`'s
+ structure: try the record, else the master.
+
+ TWO CASES, in `verify`'s own order:
+ * THE RECORD, if it is readable and satisfies everything a session adds on top of a login:
+ the account is active, and its CURRENT epoch equals the cookie's — otherwise the session
+ is revoked (a password change or a deactivation bumped it).
+ * THE EMERGENCY MASTER — username 'admin' with APP_PASSWORD configured — exactly as
+ `verify`'s last branch grants it, whether or not a record exists. This is what stops a
+ store outage, a self-deactivation or a bumped epoch locking the owner out of the product.
+ ⚠ AND IT MEANS AN `admin` SESSION IS NOT EPOCH-REVOCABLE while APP_PASSWORD is set. That
+ is not a weakening: whoever holds APP_PASSWORD can simply log in again, so bumping admin's
+ epoch never revoked them in the first place. Rotating APP_PASSWORD is how you revoke it.
+ Every OTHER account is fully epoch-revocable, which is asserted in `verify_api.py`.
+ * anything else → None. An unknown username is NOT admitted just because its signature was
+ valid: a signature proves the cookie is ours, not that the account still exists.
+ """
+ uname = (claims.get("u") or "").strip().lower()
+ if not uname:
+ return None
+ claim_tenant = str(claims.get("t") or "").strip().lower()
+ try:
+ reg = users.registry() or {}
+ except Exception:
+ reg = {}
+ rec = reg.get(uname)
+ if (rec and rec.get("active", True)
+ and int(rec.get("epoch") or 0) == int(claims.get("e") or 0)):
+ pub = users._public(uname, rec)
+ # ⛔ Wave 18 (C1-TENANT, R1): the cookie's tenant must be THE ACCOUNT'S tenant. Before
+ # this line, any valid credential could mint a session for any registered slug
+ # (login validated the slug's existence, never the membership) — with
+ # AIOS_ENABLE_QA_TENANT=1 that was a working cross-tenant session. A signature proves
+ # the cookie is ours; THIS proves the account belongs where the cookie says it does.
+ if claim_tenant != pub.get("tenant", "royal-imports"):
+ return None
+ return pub
+ if (uname == "admin" and os.environ.get("APP_PASSWORD", "")
+ and claim_tenant == "royal-imports"):
+ # The emergency master is TENANT #0's break-glass, not the platform's: a synthetic
+ # all-access identity minted into another tenant's session would be the exact
+ # cross-tenant widening the rule above closes.
+ return {"username": "admin", "name": "Administrator", "role": "admin",
+ "bus": "all", "modules": "all", "tenant": "royal-imports",
+ "epoch": int(claims.get("e") or 0)}
+ return None
+
+
+# --- wave 19 (R4): the LAST-ACTIVE stamp, throttled in this process ------------------------------
+# "Is anyone actually using this account?" is one of the two questions the Loopable admin plane
+# answers, and the only place that can honestly answer it is the session resolver — every
+# authenticated request passes through here.
+#
+# ⛔ THEREFORE IT MUST COST ALMOST NOTHING. A store write per request would put the HF store's
+# 256-commits/hour budget on the critical path of the entire API, and a store READ per request to
+# decide whether to write would be little better. So the staleness decision is made from a
+# PROCESS-LOCAL map: no I/O at all on the 99.97% of requests inside the window, and the write
+# itself (once an hour per account) happens on `core.users`' own background thread, so no request
+# ever waits for a hub round-trip. `core.users` explains why that write is SYNC and not the
+# coalesced async path — `users.json` is shared with the Streamlit host and an async flush rebases
+# on this process's cache, which would let a stamp revert somebody else's deactivation.
+#
+# HONEST LIMITS, stated rather than discovered later: the map is per-process, so N workers can each
+# write once per window (still bounded); a restart re-arms every user's first request; and the
+# resolution of `last_active` is therefore "within the last hour", which is exactly what the plane
+# renders it as. Bounded like `routes_auth._FAILS` so it cannot grow into a leak on a deployment
+# with many accounts.
+_ACTIVE_SEEN: "OrderedDict[str, float]" = OrderedDict()
+_ACTIVE_EVERY = float(os.environ.get("AIOS_ACTIVE_STAMP_SECONDS") or 3600)
+_ACTIVE_MAX_TRACKED = 4096
+
+
+def note_active(uname, when=None):
+ """Record that `uname` was just seen — WITHOUT writing. The login path calls this because it
+ has already stamped `last_active` itself; without it the very next request would find no entry
+ and stamp again immediately, making the "at most once an hour" rule false by one write per
+ sign-in."""
+ key = (uname or "").strip().lower()
+ if not key:
+ return
+ _ACTIVE_SEEN[key] = when if when is not None else time.time()
+ _ACTIVE_SEEN.move_to_end(key)
+ while len(_ACTIVE_SEEN) > _ACTIVE_MAX_TRACKED:
+ _ACTIVE_SEEN.popitem(last=False)
+
+
+def _touch_active(uname):
+ """Stamp `last_active` at most once per window per account, per process. Never raises."""
+ try:
+ key = (uname or "").strip().lower()
+ if not key:
+ return
+ now = time.time()
+ last = _ACTIVE_SEEN.get(key)
+ if last is not None and (now - last) < _ACTIVE_EVERY:
+ return
+ note_active(key, now)
+ users.touch_active(key)
+ except Exception: # noqa: BLE001 — telemetry may never break a request
+ pass
+
+
+def require_session(request: Request, response: Response) -> Session:
+ """Verify the cookie, resolve the tenant, and REISSUE the cookie (the 8h idle window is
+ refreshed on use; the 30-day absolute expiry is carried over, never extended)."""
+ raw = request.cookies.get(aios_session.COOKIE_NAME)
+ if not raw:
+ raise err(401, "no_session", "sign in to continue")
+ claims = aios_session.read(raw)
+ if not claims:
+ raise err(401, "invalid_session", "your session has expired — sign in again")
+ user = _user_for(claims)
+ if not user:
+ raise err(401, "invalid_session", "your session has expired — sign in again")
+ try:
+ rt = runtime.get_runtime(claims["t"])
+ except KeyError:
+ # An unknown tenant slug is a 401, not a 404: the cookie is not a valid identity for this
+ # deployment, and confirming which slugs exist would answer a question we were not asked.
+ raise err(401, "invalid_session", "your session has expired — sign in again")
+ fresh, _ = aios_session.mint(claims["t"], user["username"], int(user.get("epoch") or 0),
+ absolute_expiry=claims["x"])
+ aios_session.set_cookie(response, request, fresh)
+ # R4: last AFTER the session is fully resolved — a stamp is only true of a request that was
+ # actually admitted, and putting it here means no failed-auth path can ever write one.
+ _touch_active(user.get("username"))
+ return Session(tenant=claims["t"], user=user, claims=claims, runtime=rt)
+
+
+def module_gate(module_key):
+ """A dependency that 401s without a session and 403s without the grant for `module_key`."""
+ def _dep(session: Session = Depends(require_session)) -> Session:
+ session.require(module_key)
+ return session
+ return _dep
diff --git a/api/main.py b/api/main.py
new file mode 100644
index 0000000000000000000000000000000000000000..d5ed01a0e3ce6a7c1b094c5474de878e6fdaecf5
--- /dev/null
+++ b/api/main.py
@@ -0,0 +1,373 @@
+"""AIOS web API — the ONE shared, stateless process the Streamlit exit is aimed at.
+
+It REUSES the `platform/` data layer verbatim (nothing re-implemented): the canonical,
+reconciled Odoo model stays server-side and the browser only ever sees derived JSON. Serves the
+JSON API under `/api/*` and the built React bundle (`aios-web/web/dist`) at `/`.
+
+WHAT CHANGED IN EXIT WAVE 1 (2026-07-30) — three things, all of them load-bearing:
+
+ * **Real sessions replace HTTP Basic.** The whole app used to sit behind one shared
+ `APP_PASSWORD` with the browser's native Basic prompt, which means every caller was the same
+ anonymous principal and no route could scope anything. Now a signed stateless cookie carries
+ a real `core/users` identity (X3), and every v1 route resolves BU + own-book scope from the
+ user RECORD. `/api/health` stays unauthenticated (liveness only).
+ * **The overlay fork is deleted.** `aios-web/api/data/overlay.json` was a second writable home
+ for user-owned fields the Streamlit app keeps in the tenant store. ONE store now (C1c).
+ * **The SSL shim is env-gated.** It used to run at import, unconditionally.
+
+⚠ TENANT RESOLUTION IS PER REQUEST (X7). Nothing tenant-shaped is held at module level; the
+session's tenant claim resolves through `harness.runtime.get_runtime`, which is LRU-bounded. This
+is the rule the ~30–80 MB/tenant target depends on — EXIT-0 measured the alternative at a ~0.6 GB
+commit FLOOR per tenant, duplicated within 2% per tenant, nothing shared.
+"""
+import os
+import sys
+from pathlib import Path
+
+# --- the local Odoo SSL quirk, now BEHIND A GATE -------------------------------------------------
+# The Windows trust store reports the (valid) Odoo cert as expired, so local runs need an
+# unverified default context; the HF Space and the container are unaffected. This used to run
+# unconditionally at import — i.e. the shipped container disabled TLS verification for every
+# outbound HTTPS call it ever made, to Odoo and to everything else, forever. That is a
+# man-in-the-middle away from being someone else's data. It is now opt-in, must be set
+# deliberately, and is never on by default.
+# ⛔ NEVER set AIOS_INSECURE_SSL in a deployed environment. It exists for one developer laptop.
+if os.environ.get("AIOS_INSECURE_SSL") == "1":
+ import ssl
+ ssl._create_default_https_context = ssl._create_unverified_context # noqa: S323
+
+# --- reuse the tenant #0 data layer verbatim. RI_DIR overrides the location in the container
+# (where the layout differs from the local sibling-dir default). ---
+_HERE = Path(__file__).resolve()
+_RI = Path(os.environ.get("RI_DIR") or (_HERE.parents[2] / "platform"))
+for _p in (str(_RI), str(_HERE.parent)):
+ if _p not in sys.path:
+ sys.path.insert(0, _p)
+
+from dotenv import load_dotenv # noqa: E402
+load_dotenv(_RI / ".env") # Odoo creds + APP_PASSWORD, git-ignored, never committed/printed
+
+from fastapi import Body, Depends, FastAPI, Request # noqa: E402
+from fastapi.middleware.gzip import GZipMiddleware # noqa: E402
+from fastapi.responses import JSONResponse # noqa: E402
+from fastapi.staticfiles import StaticFiles # noqa: E402
+from starlette.exceptions import HTTPException as StarletteHTTPException # noqa: E402
+
+import aios_session # noqa: E402
+import routes_admin # noqa: E402
+import routes_assets # noqa: E402 (wave 18 C2-ASSET — catalog product imagery)
+import routes_auth # noqa: E402
+import routes_automation # noqa: E402 (wave 18 C4-AUTO — SESSION D's router, mounted by A)
+import routes_customers # noqa: E402
+import routes_grid # noqa: E402
+import routes_keychain # noqa: E402 (wave 18 C7 — keychain + connectors admin surfaces)
+import routes_statements # noqa: E402 (EXIT-6 — the statement sender, off Streamlit)
+import routes_nav # noqa: E402
+import routes_pages # noqa: E402
+import routes_platform_admin # noqa: E402 (wave 19 R3/R4 — the Loopable cross-tenant plane)
+import routes_products # noqa: E402 (wave 15 C-TOPIC — gated, not yet in the nav)
+import routes_records # noqa: E402
+import routes_tables # noqa: E402 (wave 18 C3-UT — user-created databases over the wire)
+from core import grid_events # noqa: E402
+from deps import Session, module_gate # noqa: E402
+
+_WEB_DIST = _HERE.parents[1] / "web" / "dist"
+
+# --- THE CANONICAL FIELD CONTRACT: a startup assertion, and the referee gate's subject ----------
+# Every field tags its semantic TYPE and its SOURCE. `source='odoo'` is READ-ONLY (Odoo is never
+# written); `source='overlay'` is the editable stratum that lives OUTSIDE Odoo. Loaded from the
+# ONE canonical file shared with the embedded host (`platform/aios_grid_fields.json`), so
+# embed == standalone by construction.
+#
+# TWO REASONS THIS IS HERE and not folded into the routes:
+# 1. It FAILS LOUDLY at import when the file is missing — which means the deploy or the RI_DIR
+# layout is broken, and discovering that from a 500 on the first customer request instead of
+# at startup costs a debugging session. (The pre-wave main.py had this guard; the EXIT-2a
+# rewrite dropped it and this restores it.)
+# 2. `aios-web/verify_fields_contract.py` — the cross-side REFEREE — reads `FIELDS` and
+# `_PASSTHROUGH_KEYS` from this module to prove the canonical file, `aios_grid.py` and this
+# API have not drifted. The rewrite removed them and the referee went red; retargeting the
+# gate would have been the wrong repair ([[gate-can-report-green-on-nothing]]: retarget, do
+# not delete — but only when the subject genuinely moved. Here it should not have moved).
+#
+# ⚠ THE ROUTES SERVE A SUPERSET OF THIS. `routes_customers._payload` derives its field list from
+# `aios_grid.fields_from_workspace(ws)`, which is `FIELDS` PLUS the session user's own custom_ and
+# measure_ columns — the same list the Streamlit host renders. That is the point: the standalone
+# shell now sees the user's own columns instead of the bare base contract. `FIELDS` is the
+# canonical FLOOR, asserted below to be exactly what `aios_grid` starts from.
+import json as _json_contract # noqa: E402
+_FIELDS_PATH = _RI / "aios_grid_fields.json"
+if not _FIELDS_PATH.is_file():
+ raise FileNotFoundError(
+ f"AIOS web API: canonical field contract missing at {_FIELDS_PATH}. Set RI_DIR to the "
+ "platform root (it also carries the data layer this API imports)."
+ )
+_contract = _json_contract.loads(_FIELDS_PATH.read_text(encoding="utf-8"))
+FIELDS = _contract["fields"] if isinstance(_contract, dict) else _contract
+# text/status/select/date pass through untouched; every OTHER odoo field is numeric -> rounded.
+# Derived from field TYPE (not a hand-kept key list) so a new text/date field can never be
+# wrongly rounded. `select` joined 2026-08-02 (dba) — a choice label rounded would be garbage.
+_PASSTHROUGH_KEYS = {f["key"] for f in FIELDS
+ if f["source"] == "odoo" and f["type"] in ("text", "status", "select",
+ "date")}
+
+app = FastAPI(title="AIOS web API")
+
+# The customers payload measured 1.15 MB of JSON on the live Space, shipped UNCOMPRESSED — with
+# the 754 KB bundle behind it, most of "the app is slow" was bytes on the wire. gzip takes the
+# payload to ~10–15% of that. minimum_size spares the tiny acks the overhead.
+app.add_middleware(GZipMiddleware, minimum_size=1024)
+
+
+@app.exception_handler(StarletteHTTPException)
+def _error_shape(request: Request, exc: StarletteHTTPException):
+ """ONE error shape for every non-2xx (X2): `{"error": {"code", "message"}}`.
+
+ `deps.err` already raises detail in that shape; anything FastAPI raises on its own (a 404, a
+ 422 from a malformed path param) is wrapped here so a client never has to branch on two
+ different error bodies.
+ """
+ detail = exc.detail
+ if isinstance(detail, dict) and "error" in detail:
+ body = detail
+ else:
+ body = {"error": {"code": f"http_{exc.status_code}", "message": str(detail)}}
+ return JSONResponse(body, status_code=exc.status_code,
+ headers=getattr(exc, "headers", None))
+
+
+@app.exception_handler(grid_events.StoreUnavailable)
+def _store_unavailable(request: Request, exc: grid_events.StoreUnavailable):
+ """THE SAFETY NET for "the store is down" → 503, from anywhere.
+
+ ⚠ WHY THIS IS APP-LEVEL AND NOT A `try` PER ROUTE. It was a try per route first, and a
+ `StoreUnavailable` raised while BUILDING THE PAYLOAD — before the route reached its own
+ try/except — surfaced as a 500. A store outage is a normal operational state and every route
+ here touches the store at least twice (the workspace read, then the write), so "remember to
+ wrap it" is a rule that gets forgotten once and then reports the wrong thing. One handler
+ means a store outage can only ever be a 503, whichever call raised it.
+
+ The seam raises this only when the caller passed no `fallback_ws` — i.e. exactly on this
+ adapter, which has no durable session dict to degrade into. A 200 over a write that
+ evaporated is the failure the whole rule exists to prevent.
+ """
+ return JSONResponse(
+ {"error": {"code": "store_unavailable",
+ "message": "the tenant store is unavailable — no change was saved"}},
+ status_code=503)
+
+
+@app.get("/api/health")
+def health():
+ """Unauthenticated LIVENESS only — it must answer before anyone can sign in, so it may not
+ reveal anything about the deployment beyond "the process is up". No version, no tenant list,
+ no config: a health endpoint is the one URL every scanner finds first."""
+ return {"ok": True}
+
+
+app.include_router(routes_auth.router)
+app.include_router(routes_nav.router)
+app.include_router(routes_customers.router)
+app.include_router(routes_products.router)
+app.include_router(routes_assets.router)
+app.include_router(routes_tables.router)
+app.include_router(routes_grid.router)
+app.include_router(routes_records.router)
+# EXIT wave 2: the Y1 page-data envelope (one route for every ported dashboard) and Y4's user
+# administration. `routes_pages` imports `pages`, which lazily imports each `pages_*` builder — so
+# a new page is a builder module plus one registry line, and nothing here changes.
+app.include_router(routes_pages.router)
+app.include_router(routes_admin.router)
+app.include_router(routes_automation.router)
+app.include_router(routes_keychain.router)
+app.include_router(routes_statements.router)
+# Wave 19 (owner item 13, R3): the LOOPABLE admin plane — the platform's own cross-tenant view.
+# Its own prefix (`/api/v1/platform-admin`), never nested under `/admin`, so there is no path
+# ambiguity with `routes_admin`'s `{username}` params and no chance of a tenant-admin route and a
+# platform-operator route ever shadowing each other. Every path it declares is gated by
+# `core.platform_admin.is_platform_admin`, and `verify_api` enumerates this router to prove it.
+app.include_router(routes_platform_admin.router)
+
+
+# --- DEPRECATED ALIASES (removed when S2's shell flips; kept so the current bundle keeps working)
+# They are the v1 handlers with the v1 session requirement — NOT the old unauthenticated Basic
+# behavior. An alias that kept the old auth would be a bypass of everything above it.
+_GATE = module_gate(routes_customers.MODULE)
+
+
+@app.get("/api/customers", deprecated=True)
+def _customers_alias(session: Session = Depends(_GATE)):
+ return routes_customers._payload(session)
+
+
+@app.patch("/api/customers/{pid}", deprecated=True)
+def _patch_alias(pid: int, body: dict = Body(default=None),
+ session: Session = Depends(_GATE)):
+ return routes_customers.patch_customer(pid, body, session)
+
+
+def _assert_contract_floor():
+ """The canonical FIELDS must be exactly what `aios_grid` starts an empty workspace from.
+
+ This is what stops `FIELDS` becoming a constant that exists only to satisfy a gate. If the
+ canonical JSON and `aios_grid.fields_from_workspace({})` ever disagree, the standalone API and
+ the embedded host are serving two different schemas and the grid's own contract has forked —
+ the exact drift `verify_fields_contract.py` was written to catch, now also caught at startup
+ on whatever machine is actually running.
+ """
+ import aios_grid
+ base = [f for f in aios_grid.fields_from_workspace({}) if not f.get("custom")]
+ if [f["key"] for f in base] != [f["key"] for f in FIELDS]:
+ raise RuntimeError(
+ "AIOS web API: the canonical field contract and aios_grid.fields_from_workspace({}) "
+ "disagree on the base field set — embed and standalone would serve different schemas. "
+ "Run aios-web/verify_fields_contract.py.")
+
+
+def _startup_notes():
+ """Say the two things an operator must know, once, at import — never in a response body."""
+ if aios_session.EPHEMERAL_SECRET:
+ print("[aios-api] AIOS_SESSION_SECRET is not set — signing with a random per-process "
+ "key. Sessions will not survive a restart and will not work across workers. "
+ "Set it in production.")
+ if os.environ.get("AIOS_INSECURE_SSL") == "1":
+ print("[aios-api] AIOS_INSECURE_SSL=1 — TLS verification is DISABLED for outbound "
+ "requests. Local development only; never in a deployed environment.")
+
+
+_assert_contract_floor()
+_startup_notes()
+
+
+# ⛔ THE STATIC MOUNT IS NOW UNAUTHENTICATED, and that is a change this wave made on purpose.
+# Before EXIT-3a, `BasicAuth` middleware gated the WHOLE app including this mount. A branded login
+# page cannot live behind a password prompt, so the shell's own assets must be public — which they
+# are: `index.html`, the JS/CSS bundle and the favicon reveal nothing.
+#
+# ⚠ WHAT THAT SILENTLY DE-GATED, caught in review rather than in production. `web/dist/` also
+# carries `sample_customers.json`, a DEV FIXTURE copied from `web/public/`. Its 8 customers are
+# synthetic, but the `agent` column holds REAL EMPLOYEE NAMES, and it went from Basic-gated to
+# publicly fetchable in this commit. Nothing needs it: both the API bridge and `useCustomerData`
+# deleted their sample fallback on purpose ("NOTHING HERE FALLS BACK TO sample_customers.json"),
+# and it survives only because it sits in `web/public/`. So it is refused here — 404, the same
+# answer as any other path that is not part of the app.
+#
+# The right long-term fix is deleting it from `web/public/` (S2's lane — flagged in the mailbox);
+# this guard is what makes the API safe regardless of what the bundle happens to contain.
+_DEV_FIXTURES = {"sample_customers.json"}
+
+
+class _AppStatic(StaticFiles):
+ async def get_response(self, path, scope):
+ if Path(path).name in _DEV_FIXTURES:
+ raise StarletteHTTPException(status_code=404, detail="Not Found")
+ resp = await super().get_response(path, scope)
+ # Vite content-hashes everything under assets/ (a change is a NEW url), so those are
+ # immutable — a repeat visit re-downloads zero bytes instead of the whole 750 KB bundle.
+ # index.html must stay revalidated or a deploy would strand returning browsers on the old
+ # bundle; ETag/304 makes that revalidation a header exchange, not a transfer.
+ # ⚠ Normalised first: on a Windows host StaticFiles hands this path with backslashes,
+ # and `startswith("assets/")` silently skipped every asset (measured on the local probe).
+ if path.replace("\\", "/").lstrip("/").startswith("assets/"):
+ resp.headers["Cache-Control"] = "public, max-age=31536000, immutable"
+ else:
+ resp.headers["Cache-Control"] = "no-cache"
+ return resp
+
+
+# static bundle LAST so /api/* wins; html=True serves index.html at / plus the built assets
+if _WEB_DIST.is_dir():
+ app.mount("/", _AppStatic(directory=str(_WEB_DIST), html=True), name="web")
+
+
+# --- boot prewarm (AIOS_PREWARM=1 — set by the Dockerfile, never by tests) -----------------------
+# Without this, the first visitor after every deploy/restart pays the full Odoo pool build in
+# their request. The thread warms the CONSOLIDATED scope (None, None) + every registered page's
+# default envelope; scoped users still pay their own scope's first build, once.
+# Env-gated rather than a startup event so importing `api.main` in a gate (verify_api and friends
+# run against fakes) can never fire a live Odoo pull.
+def _seed_and_sync_store():
+ """Bring the analytical store (harness.datastore) LIVE for this container — the app.py
+ bootstrap, mirrored (2026-07-31, owner item 1).
+
+ `harness.datastore` powers every measure column/condition, and ONLY app.py used to call
+ `ensure_seed()` — so on a fresh Space disk this container resolved measures against a store
+ that never existed and every measure cell served blank. Seeding alone was NOT enough either,
+ and that was measured live the same day: "datastore seeded in 1.7s" followed by an endless
+ `api:measure-column: ModelError the data cache is still warming up` — `ready()` demands
+ EVERY entity at phase 'live', and a seed that predates a newer entity leaves it un-synced
+ forever in a process with no sync loop. The SYNC SPRINT after the seed is what closes the
+ write_date gap and backfills anything the seed lacks (app.py:7779's exact pattern, bounded
+ passes). Fail-quiet throughout: no seed/token/Odoo → the columns stay blank, the rows still
+ serve.
+ """
+ import time as _t
+ t0 = _t.time()
+ try:
+ from harness import datastore as _ds
+ if _ds.ensure_seed():
+ print(f"[aios-api] datastore seeded in {_t.time() - t0:.1f}s")
+ # DEDICATED Odoo connection for this thread (the W6 postmortem rule): the sync's
+ # search_reads must never interleave on the shared client's xmlrpc transport.
+ import core.odoo as _odoo
+ try:
+ _odoo._tlocal.client = _odoo.OdooClient()
+ except Exception:
+ pass
+ res = {}
+ for i in range(12):
+ res = _ds.sync_all(log=lambda *a, **k: None)
+ print(f"[aios-api] datastore sync pass {i + 1}: "
+ + ", ".join(f"{k}={v.get('phase')}" for k, v in sorted(res.items())))
+ if all(v.get("phase") == "live" for v in res.values()):
+ break
+ print(f"[aios-api] datastore sync done in {_t.time() - t0:.1f}s "
+ f"(ready={_ds.ready()})")
+ except Exception as e: # noqa: BLE001
+ print(f"[aios-api] datastore seed/sync skipped: {e}")
+
+
+def _store_resync_loop():
+ """Keep the analytical mirror current — the API-process stand-in for the re-sync the
+ Streamlit app piggybacks on page renders. Measure memos key on the pool stamp, so a
+ refreshed pool re-reads the freshly synced store."""
+ import time as _t
+ while True:
+ _t.sleep(1800)
+ try:
+ from harness import datastore as _ds
+ import core.odoo as _odoo
+ try:
+ _odoo._tlocal.client = _odoo.OdooClient()
+ except Exception:
+ pass
+ _ds.sync_all(log=lambda *a, **k: None)
+ except Exception as e: # noqa: BLE001
+ print(f"[aios-api] store resync failed: {e}")
+
+
+def _prewarm():
+ import time as _t
+ t0 = _t.time()
+ # ⚠ The store sync runs in its OWN thread, never ahead of the pool warm: a stale seed can
+ # take many minutes of XML-RPC to close, and the first live probe of this arrangement
+ # showed the pool warm (42s) silently queued behind it — the whole app cold for every
+ # visitor while a background column channel caught up. Measure cells retry via the
+ # transient rule until the sync lands; nothing else waits on it.
+ import threading as _th
+ _th.Thread(target=_seed_and_sync_store, daemon=True, name="store-seed-sync").start()
+ try:
+ from harness import runtime as _runtime
+ rt = _runtime.get_runtime("royal-imports")
+ routes_customers.warm_default(rt)
+ import pages as _pages
+ _pages.warm_default(rt)
+ print(f"[aios-api] prewarm done in {_t.time() - t0:.1f}s")
+ except Exception as e: # noqa: BLE001 — boot must not die on a warm-up
+ print(f"[aios-api] prewarm skipped: {e}")
+
+
+if os.environ.get("AIOS_PREWARM") == "1":
+ import threading as _threading
+ _threading.Thread(target=_prewarm, daemon=True, name="prewarm").start()
+ _threading.Thread(target=_store_resync_loop, daemon=True, name="store-resync").start()
diff --git a/api/pages.py b/api/pages.py
new file mode 100644
index 0000000000000000000000000000000000000000..2a6251decee0cfb0b763fe2deaf5039d3c640e33
--- /dev/null
+++ b/api/pages.py
@@ -0,0 +1,394 @@
+"""pages.py — Y1: the page-data envelope, and the ONE place its rules live (W2-2).
+
+THE POINT OF THIS FILE IS WAVE 3. Collections and Procurement must land by adding a BUILDER, not
+by inventing a shape — so every rule the envelope has (the closed `fmt` enum, the drill grammar,
+the no-silent-caps contract, how BU scope is resolved) lives here as a constructor a builder calls,
+never as a convention a builder is expected to remember. A rule that exists only in a docstring is
+a rule the second page gets wrong.
+
+WHAT A BUILDER OWES, and nothing more:
+ metrics(team_id, granularity, today) -> a dict of plain data, SCOPE-SHAPED ONLY
+ blocks(metrics, team_id, granularity) -> [block, ...] built with the constructors below
+ TITLE / SUBTITLE / MODULE / CONTROLS
+`build_envelope` does the rest: it resolves the BU, caches the metrics on the SCOPE key, assembles
+the per-request half, and returns the envelope.
+
+⛔ THE CACHE LINE, WHICH IS WHERE WAVE 1 SHIPPED A CROSS-USER LEAK. What may be cached on a
+`(page, team_id, doc_mode, day)` key is the BUILDER'S METRICS — the answer to a question two users
+with the same scope are asking identically. What may NEVER be cached there is anything with a
+per-USER stratum, and on this envelope that is `controls` (its `bu.options` come from
+`perms.allowed_bu_labels(user)`, i.e. from the user RECORD). Wave 1's defect was exactly this shape
+one layer down: a whole payload cached on a scope key while carrying per-user fields and overlay
+cells. It survived 129 green checks because every fixture user had a distinct scope pair. So the
+split is structural here, not remembered: `metrics()` cannot see the session at all — it takes
+`team_id`, and `verify_api.py` asserts the cached object holds nothing user-shaped.
+
+⚠ THE CLIENT FORMATS. The server never sends a pre-formatted number, so one formatter change fixes
+every page — and `fmt` is a CLOSED enum for the same reason. Two vocabularies exist and they are
+not interchangeable: `FMTS` for kpi/table/validation, and viz `FieldType` for a chart block's
+`fields[]` (those objects are fed straight into `chartData`). `money` vs `currency` is the trap.
+"""
+import time
+
+# `deps` FIRST, deliberately: it is what puts `platform/` on `sys.path`, so importing it
+# ahead of any `core.*` makes this module importable in whatever order a caller reaches it.
+from deps import Session, err, perms # noqa: I001
+
+import core.context as ctxlib # noqa: E402
+
+# ── the two vocabularies ─────────────────────────────────────────────────────────────────────────
+#: The Y1 client-format enum for kpi / table / validation values. CLOSED on purpose: a page that
+#: needs a new one adds it HERE and to the client's `fmt` at the same time, which is the property
+#: that keeps one formatter authoritative. A table column with NO `fmt` renders verbatim — that is
+#: how a text column is expressed without opening the enum.
+FMTS = ("money", "num", "pct", "int", "date")
+
+#: The viz `FieldType` values a chart block's `fields[]` may use — a DIFFERENT vocabulary, because
+#: `chartData(spec, rows, fieldByKey)` consumes those objects directly. `currency`, not `money`.
+VIZ_TYPES = ("text", "status", "currency", "int", "pct", "date")
+
+#: `chartData`'s own display cap (`MAX_BUCKETS`). A payload must fit it at the SOURCE: the engine
+#: truncates past 12 and, on a date axis, sorts ASCENDING first — so a 13-month series loses the
+#: CURRENT month, the one anybody actually looks at. Mirrored here so a builder can size its own
+#: series without importing anything from the client tree.
+MAX_BUCKETS = 12
+
+#: Drill kinds the client is expected to understand. `decomp` names a WINDOW + a scope; the others
+#: name an ENTITY. ⚠ THIS WAVE THEY ARE DECLARATIONS — there is no resolver route (§5 Y1 amendment
+#: 4). Each descriptor is COMPLETE, so wave 3 adds the resolver with no shape change, and Y6's
+#: panel must say it is thin rather than look finished.
+DRILL_KINDS = ("decomp", "customer", "sku", "rep", "bu")
+
+
+def _fmt_ok(fmt, allowed, where):
+ if fmt is not None and fmt not in allowed:
+ # A wrong `fmt` renders — wrongly — and nothing complains. Refusing it at construction is
+ # the only moment anybody finds out, so this raises rather than coercing.
+ raise ValueError(f"{where}: fmt {fmt!r} is not one of {allowed}")
+ return fmt
+
+
+# ── block constructors ───────────────────────────────────────────────────────────────────────────
+def kpi(key, label, value, fmt="money", delta=None, delta_fmt=None, delta_label=None,
+ delta_dir=None, note=None, drill=None):
+ """One KPI card. `delta` is a NUMBER or None — never a string.
+
+ THE ZERO-REVENUE RULE, ported from `app.py:2846`: a period with no orders yet must not show an
+ alarming −100%. It sends NO number (`delta=None`) plus a `delta_label` and `delta_dir='off'`,
+ so no formatter is involved and the card states the situation instead of computing a ratio
+ against nothing.
+
+ THE BIG-RATIO RULE IS THE CLIENT'S: a tiny LY base makes `+14,975%` read as noise, and
+ Streamlit rewrites it per-card as `+150× LY`. That belongs in ONE formatter (`fmt.pct` renders
+ |v| ≥ 999 as a multiple), so the server just sends the number.
+ """
+ out = {"key": key, "label": label, "value": value,
+ "fmt": _fmt_ok(fmt, FMTS, f"kpi {key}")}
+ if delta is not None:
+ out["delta"] = delta
+ out["delta_fmt"] = _fmt_ok(delta_fmt or "pct", FMTS, f"kpi {key} delta")
+ if delta_label:
+ out["delta_label"] = delta_label
+ if delta_dir:
+ out["delta_dir"] = delta_dir # up | down | flat | off — a TONE hint, not the sign
+ if note:
+ out["note"] = note
+ if drill:
+ out["drill"] = drill
+ return out
+
+
+def kpis(key, items):
+ return {"type": "kpis", "key": key, "items": list(items)}
+
+
+def section(key, label, note=None):
+ out = {"type": "section", "key": key, "label": label}
+ if note:
+ out["note"] = note
+ return out
+
+
+def column(key, label, fmt=None, align=None):
+ """A table column. `fmt` omitted ⇒ render verbatim (that is how text columns work)."""
+ out = {"key": key, "label": label}
+ if fmt:
+ out["fmt"] = _fmt_ok(fmt, FMTS, f"column {key}")
+ if align:
+ out["align"] = align
+ elif fmt in ("money", "num", "pct", "int"):
+ out["align"] = "right" # numbers align right by default, everywhere
+ return out
+
+
+def table(key, columns, rows, total=None, drill=None, download=None, empty=None):
+ """A table block. `shown`/`total` ALWAYS ship — `shown == total` still sends both.
+
+ Owner rule [[no-unverifiable-aggregates]]: a silent `[:N]` cap is a defect. `total` defaults to
+ `len(rows)` so a builder that forgot to truncate cannot accidentally claim it did not.
+ """
+ rows = list(rows)
+ out = {"type": "table", "key": key, "columns": list(columns), "rows": rows,
+ "shown": len(rows), "total": int(total if total is not None else len(rows))}
+ if drill:
+ out["drill"] = drill
+ if download:
+ out["download"] = download
+ if empty:
+ out["empty"] = empty
+ return out
+
+
+def chart(key, spec, series, fields, rows, x_order=None, drill=None, total=None,
+ delta_key=None):
+ """A chart block: ONE x, N SERIES.
+
+ ⛔ WHY `series[]` AND NOT `ChartSpec.splitBy`. The viz engine has no series dimension:
+ `chartData()` buckets on `x` only and `DashboardView` draws one flat `buckets[]`. `splitBy` is
+ persisted, validated and offered in the chart editor but never reaches the arithmetic or the
+ renderer, so a `splitBy` chart draws identically to one without it. A YoY comparison is
+ therefore N `chartData` calls over the SAME wide rows, one per series `y` — which also means
+ nothing about `chartData` changes and `verify_charts.py`'s verdict stays put, which W2-5's
+ pure-move proof requires.
+
+ ⛔ WHY `x_order`. The engine sorts buckets by VALUE unless the x field is date-family — a trend
+ would render as a revenue-ordered sawtooth. And date-family is not an escape: it buckets to
+ `YYYY-MM`, so a weekly axis would collapse into months. So the SERVER declares the chronology
+ and the client re-orders the buckets it got back.
+ """
+ for f in fields:
+ if f.get("type") not in VIZ_TYPES:
+ raise ValueError(f"chart {key}: field {f.get('key')!r} type {f.get('type')!r} is not a "
+ f"viz FieldType {VIZ_TYPES} — `money` is the kpi/table vocabulary")
+ rows = list(rows)
+ out = {"type": "chart", "key": key, "spec": dict(spec), "series": list(series),
+ "fields": list(fields), "rows": rows,
+ "shown": len(rows), "total": int(total if total is not None else len(rows))}
+ if x_order is not None:
+ out["x_order"] = list(x_order)
+ if drill:
+ out["drill"] = drill
+ if delta_key:
+ # The internal-tool rule: a YoY chart PRINTS the % on the chart. The SERVER computes the
+ # per-bucket delta (this row key) so the client never re-derives a figure — a partial
+ # period sends None and honestly gets no label.
+ out["delta_key"] = str(delta_key)
+ return out
+
+
+def validation(checks, note=None):
+ """The reconciliation panel, from a module's `validate()` output.
+
+ `actual` is the module's `a` — the number the page shows. `expected` is its `b` — the
+ INDEPENDENT aggregate it must tie to. The signed gap rides in `note` rather than being
+ recomputed client-side, because the module's own tolerance decided `ok` and a second
+ subtraction in the client could disagree with it.
+ """
+ out = {"type": "validation", "key": "validation",
+ "checks": [{"name": c.get("check") or c.get("name") or "",
+ "ok": bool(c.get("ok")),
+ "actual": c.get("a"), "expected": c.get("b"),
+ "fmt": "money" if isinstance(c.get("a"), float) else "num",
+ "note": f"gap {c.get('gap')}"} for c in (checks or [])]}
+ if note:
+ out["note"] = note
+ return out
+
+
+# ── drill descriptors: ONE grammar, three placements ─────────────────────────────────────────────
+def decomp_drill(window_row, scope_type="period", scope_value=None, label=None):
+ """A WINDOW + scope descriptor. Mirrors `ui/drawers._decomp_desc` key-for-key, so the eventual
+ resolver can serve both front-ends from one function — and accepts both row shapes the sales
+ module produces (`date_from`/`date_to` on the scorecard, `start`/`end` on a trend row)."""
+ return {"kind": "decomp", "label": label,
+ "scope_type": scope_type, "scope_value": scope_value,
+ "date_from": window_row.get("date_from") or window_row.get("start"),
+ "date_to": window_row.get("date_to") or window_row.get("end"),
+ "cmp_from": window_row.get("cmp_from"), "cmp_to": window_row.get("cmp_to")}
+
+
+def entity_drill(kind, id_key, label_key=None):
+ """Block-level: every row of this block opens the same kind of entity panel."""
+ if kind not in DRILL_KINDS:
+ raise ValueError(f"drill kind {kind!r} is not one of {DRILL_KINDS}")
+ out = {"kind": kind, "id_key": id_key}
+ if label_key:
+ out["label_key"] = label_key
+ return out
+
+
+def row_drill(row_key="_drill"):
+ """Block-level: each row carries its OWN descriptor under `row_key`."""
+ return {"kind": "decomp", "row_key": row_key}
+
+
+def truncate(rows, limit):
+ """`(rows[:limit], total)` — the ONLY sanctioned way to cap a list. Returning the total beside
+ the slice is what makes "showing N of M" possible; a bare `[:N]` is the defect."""
+ rows = list(rows)
+ return rows[:limit], len(rows)
+
+
+# ── BU scope: the one line that could fail open ──────────────────────────────────────────────────
+def resolve_bu(session: Session, bu):
+ """The effective `team_id` for this request. `bu` NARROWS; it never authorises.
+
+ ⛔ THE RULE, AND WHY IT IS SHAPED THIS WAY. `perms.scope_team_id` derives scope from the user
+ RECORD precisely because a UI selector defaults to 'All' → consolidated, and mirroring that
+ default on an API with no selector would BE the leak. So a query parameter cannot widen:
+
+ * absent / 'all' → `scope_team_id(user)`, which is None ONLY when the user may see every BU
+ and is the PINNED team_id otherwise. A Royal-only user asking for 'all' gets 6, and 'all'
+ for them honestly means "everything you may see".
+ * an explicit id → must be in `allowed_team_ids(user)`, else **403**. Never silently coerced
+ to their own BU: a coerced parameter hides a client bug behind data that looks right.
+ * anything else → 400.
+ """
+ raw = "" if bu is None else str(bu).strip().lower()
+ if raw in ("", "all"):
+ return perms.scope_team_id(session.user)
+ try:
+ want = int(raw)
+ except (TypeError, ValueError):
+ raise err(400, "bad_bu", "bu must be 'all' or a business-unit id")
+ if want not in perms.allowed_team_ids(session.user):
+ raise err(403, "bu_forbidden",
+ "your account does not have access to that business unit")
+ return want
+
+
+def bu_control(session: Session, team_id):
+ """The BU picker, built from the user's OWN permitted labels — which is exactly why `controls`
+ is assembled per request and never cached on a scope key."""
+ labels = perms.allowed_bu_labels(session.user)
+ options = []
+ for lab in labels:
+ if lab == "All":
+ options.append({"value": "all", "label": "All"})
+ continue
+ tid = ctxlib.BRANDS.get(lab)
+ if tid is not None:
+ options.append({"value": tid, "label": lab})
+ return {"key": "bu", "kind": "bu", "label": "Business Unit",
+ "value": "all" if team_id is None else team_id, "options": options}
+
+
+def choice_control(key, label, value, options):
+ return {"key": key, "kind": "choice", "label": label, "value": value,
+ "options": [{"value": v, "label": l} for v, l in options]}
+
+
+def bu_label(team_id):
+ """'All Business Units' / 'Fisch' / 'Royal' — for prose, never for a permission decision."""
+ if team_id is None:
+ return "All Business Units"
+ for lab, tid in ctxlib.BRANDS.items():
+ if tid == team_id:
+ return lab
+ return str(team_id)
+
+
+# ── the registry + the assembler ─────────────────────────────────────────────────────────────────
+#: page key -> builder module. Wave 3 adds `'ar'` and `'procurement'` HERE and nowhere else — the
+#: route, the grant wall, the BU resolution, the caching and the envelope are already written.
+#: ⚠ The key must be the REGISTRY key, because it is what `session.require()` gates on.
+_BUILDERS = {}
+
+
+def register(key, builder):
+ _BUILDERS[str(key)] = builder
+
+
+def builder_for(key):
+ """The builder for `key`, or None. A missing key is a 404 at the route — NOT a 403: an
+ unported page is a fact about our roadmap, not about this user's grants.
+
+ ⚠ Wave 16 (owner item 7, R3/R11): `pages_sales` is UNREGISTERED — the lazy self-import
+ that used to live here is gone, so a production process holds ZERO builders and every
+ /pages/{key} is a 404 until the next surface (Collections / Procurement) registers.
+ The registry mechanism itself is untouched: a future builder self-registers on import,
+ and routes_pages.py should import it at module level so deploy_web.py's import walk can
+ see it (the wave-9 missing-module scar). pages_sales.py stays on disk as the template
+ and as verify_api section G's fixture — the gate imports it explicitly.
+ """
+ return _BUILDERS.get(str(key or "").strip().lower())
+
+
+def known_pages():
+ return sorted(_BUILDERS)
+
+
+#: How long a scope's metrics stay warm. Matches `routes_customers._CACHE_TTL` — the underlying
+#: pull is the same order of cost and a second TTL would be a second thing to reason about.
+_CACHE_TTL = 900
+#: The metrics cache is bounded for the reason every cache in this process is: an entry per
+#: (page × scope × day) that is never evicted is a memory leak with a tenant-shaped growth curve.
+_CACHE_MAX = 24
+
+
+def _cached_metrics(session: Session, page_key, team_id, granularity, builder):
+ """The SCOPE-shaped half, cached on the runtime (per tenant, LRU-bounded).
+
+ The key carries the DAY: every metric here is relative to "today" (YTD, WTD, the trailing 12
+ months), so an entry that outlives midnight serves yesterday's question with today's label.
+ """
+ return _metrics_for(session.runtime, page_key, team_id, granularity, builder)
+
+
+def _metrics_for(rt, page_key, team_id, granularity, builder):
+ """Session-free half of `_cached_metrics` (the prewarm thread calls it too).
+
+ STALE-WHILE-REFRESH (scope_cache): the first `/pages/sales` per scope is genuinely slow (it
+ runs `sales.validate()`); after that, expiry serves the stale copy and refreshes off-thread
+ instead of parking a person on a 20-second rebuild.
+ """
+ import scope_cache
+
+ today = time.strftime("%Y-%m-%d")
+ key = ("page", page_key, team_id, granularity, today)
+
+ def _build():
+ return builder.metrics(team_id=team_id, granularity=granularity)
+
+ def _evict():
+ # A `while`, not a one-shot slice: evicting a fixed batch leaves the map above its own
+ # bound whenever it is more than that batch over, which is a bound that does not bind.
+ # ⚠ This dict is SHARED with `routes_customers`'s pool entries (they key on `("pool", …)`,
+ # these on `("page", …)`), so either side's eviction can drop the other's entry. Harmless —
+ # a miss is a rebuild — and deliberately one bounded map per tenant rather than two.
+ while len(rt.pool_cache) > _CACHE_MAX:
+ rt.pool_cache.pop(min(rt.pool_cache, key=lambda k: rt.pool_cache[k][0]), None)
+
+ return scope_cache.get(rt.pool_cache, key, _CACHE_TTL, _build, _evict)
+
+
+def warm_default(rt):
+ """Boot prewarm: every registered page's consolidated metrics at its default granularity —
+ the envelope the first visitor after a deploy actually asks for. main.py's thread only."""
+ for key in known_pages():
+ builder = builder_for(key)
+ if builder is not None:
+ _metrics_for(rt, key, None, builder.resolve_granularity(None), builder)
+
+
+def build_envelope(session: Session, page_key, bu=None, period=None):
+ """The Y1 envelope for `page_key`, scoped to this session. Raises the contracted errors."""
+ builder = builder_for(page_key)
+ if builder is None:
+ raise err(404, "unknown_page", f"no page data is published for {page_key!r}")
+ # The GRANT WALL, on the builder's registry key. 403, never an empty 200 — an empty page reads
+ # as "you have no data" and is how a permission bug hides in plain sight.
+ session.require(builder.MODULE)
+ team_id = resolve_bu(session, bu)
+ granularity = builder.resolve_granularity(period)
+ metrics = _cached_metrics(session, page_key, team_id, granularity, builder)
+ return {
+ "key": page_key,
+ "title": builder.TITLE,
+ "subtitle": builder.subtitle(team_id),
+ # UTC with an explicit Z. A naive local timestamp from a container whose TZ nobody set is
+ # indistinguishable from a wrong one.
+ "as_of": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime(metrics["pulled_at"])),
+ "controls": [bu_control(session, team_id)] + builder.controls(granularity),
+ "blocks": builder.blocks(metrics, team_id, granularity),
+ }
diff --git a/api/routes_admin.py b/api/routes_admin.py
new file mode 100644
index 0000000000000000000000000000000000000000..3d60221ba14e969e414cd5587771d864fcad0564
--- /dev/null
+++ b/api/routes_admin.py
@@ -0,0 +1,780 @@
+"""routes_admin.py — Y4: user administration + the session's own settings (W2-3).
+
+These routes are the standalone shell's replacement for `app.py`'s `users_dialog` / `settings_dialog`
+modals, over the SAME `core/users` account store — so both front-ends administer one set of
+accounts and the eventual OIDC migration (D-3) swaps the CREDENTIAL check, not the user model.
+
+ADMIN-ONLY, FAIL-CLOSED. `admin_gate` is a role check (`perms.is_admin`), mirroring the Streamlit
+dialog's `if not is_admin()`. A default record has `role: 'user'`, so an unreadable or partial record
+is denied rather than admitted. `verify_api.py` proves it by having a viewer TRY every route.
+
+⛔ THIS IS THE FIRST WRITER OF `modules` THAT HAS EVER EXISTED. `core.users.set_access(modules=…)`
+has no caller anywhere in the shipped app — module grants are only settable by editing the store
+JSON out of band. That matters because the record format carries TWO documented fail-OPENS, both
+asserted in `verify_api.py` section A:
+
+ * `modules: []` is FALSY, so `perms.allowed_modules` reads it as 'all' = UNRESTRICTED. An admin
+ clearing every checkbox to lock an account down would grant it everything.
+ * `bus: []` falls through `allowed_bus_labels`'s "no recognisable label" branch to
+ `['All','Fisch','Royal']` — so one typo'd BU id is FULL cross-BU access, in the model whose
+ whole point is strict isolation.
+
+Y4 says do not "fix" `modules: []` in this wave, and that is right: the READER is mirrored in
+`ui/session.py` and `core/perms.py` and diverging one of them mid-wave breaks lock-step. But the
+WRITER is new, and it can simply refuse to create either footgun. So both are 400s here and both
+read semantics are untouched — the seam is write-strict / read-unchanged.
+
+⚠ A STORE OUTAGE IS A 503, NEVER AN EMPTY LIST. `users.registry()` swallows a failed read into `{}`
+one level down, and serving that as `{"users": []}` would tell an administrator their tenant has no
+accounts. Same rule as the write path: an empty 200 is never how this API says "something is wrong".
+"""
+import re
+
+from fastapi import APIRouter, Body, Depends, Response
+
+import core.platform_admin as platform_admin # wave 19 R3 — the /settings chrome flag
+import core.registry as registry
+import core.store as store
+
+from deps import Session, err, perms, require_session, users
+from routes_auth import _public_user
+
+router = APIRouter(prefix="/api/v1")
+
+#: A username is a STORE KEY (`users.json`) and also the key the table workspace is filed under
+#: (`data[username]`), so it is constrained rather than trusted: lowercase, no separators, no
+#: whitespace, nothing that could traverse or collide once it becomes part of a path or a filename.
+_UNAME_RE = re.compile(r"^[a-z0-9][a-z0-9._-]{1,31}$")
+#: Passwords are PBKDF2-200k, which is only as strong as what it is given. The Streamlit dialog
+#: enforces nothing; this does, and the two are allowed to differ because only one of them is
+#: reachable from the internet.
+_MIN_PW = 8
+_ROLES = ("user", "admin")
+
+
+def admin_gate(session: Session = Depends(require_session)) -> Session:
+ """401 without a session, 403 without the admin role. Role, not a module grant — mirroring
+ `app.py`'s `users_dialog`, whose only wall is `is_admin()`."""
+ if not perms.is_admin(session.user):
+ raise err(403, "forbidden", "administrators only")
+ return session
+
+
+def _require_store():
+ """A 503 the moment the store cannot serve, so no route below can report emptiness as truth."""
+ try:
+ ok = store.available()
+ except Exception:
+ ok = False
+ if not ok:
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — accounts cannot be read or changed")
+
+
+def _registry():
+ _require_store()
+ try:
+ reg = users.registry() or {}
+ except Exception:
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ return reg
+
+
+def _view(uname, rec):
+ """What an administrator may see about an account. NEVER `salt` or `hash` — this function is
+ the only projection these routes use, so there is one place that can leak and it does not."""
+ return {"username": uname,
+ "name": rec.get("name") or uname,
+ "role": rec.get("role", "user"),
+ "bus": rec.get("bus", "all"),
+ "bu_labels": perms.allowed_bu_labels(rec),
+ "modules": rec.get("modules", "all"),
+ "agent": rec.get("agent") or None,
+ "email": rec.get("email") or None,
+ "tenant": _tenant_of(rec),
+ "active": bool(rec.get("active", True)),
+ # The session-revocation handle. An admin needs it: it is the only visible evidence
+ # that "sign them out everywhere" actually happened.
+ "epoch": int(rec.get("epoch") or 0),
+ # S3 ask 4 — one sentence for the roster's Access column, so the list does not need
+ # a /perms round trip per row to fill one cell. Computed from the same record the
+ # editor will open, so the two cannot disagree.
+ "accessSummary": _access_summary(rec),
+ "perms_v": int(rec.get("perms_v") or 0)}
+
+
+def _access_summary(rec):
+ """One sentence describing what this account may reach. Deliberately says LESS than the
+ editor: it is a signpost, not a rule listing, and a summary that tried to spell out filters
+ would be wrong the moment a filter got interesting."""
+ import core.perm_scope as perm_scope
+
+ if perms.is_admin(rec):
+ # amendment 4: an admin bypasses `perms` entirely, so rendering their stored rules as if
+ # they applied is the one misreading of that clause that could actually hurt.
+ return "Everything (admin)"
+ if not perm_scope.is_migrated(rec):
+ mods = perms.allowed_modules(rec)
+ return "All modules (legacy rules)" if mods is None else \
+ f"{len(mods)} module{'' if len(mods) == 1 else 's'} (legacy rules)"
+ entries = (rec.get("perms") or {})
+ opened = [k for k, e in entries.items() if isinstance(e, dict) and e.get("access", True)]
+ restricted = sum(1 for k in opened
+ if (entries[k].get("filter") or entries[k].get("hiddenFields")))
+ if not opened:
+ return "No modules"
+ base = f"{len(opened)} module{'' if len(opened) == 1 else 's'}"
+ return f"{base}, {restricted} restricted" if restricted else base
+
+
+# ── request validation: every rule below is fail-closed ──────────────────────────────────────────
+def _clean_username(v):
+ uname = str(v or "").strip().lower()
+ if not _UNAME_RE.match(uname):
+ raise err(400, "bad_username",
+ "a username is 2-32 characters: lowercase letters, digits, dot, dash or "
+ "underscore, starting with a letter or digit")
+ return uname
+
+
+def _clean_password(v):
+ pw = str(v or "")
+ if len(pw) < _MIN_PW:
+ raise err(400, "weak_password", f"a password must be at least {_MIN_PW} characters")
+ return pw
+
+
+def _clean_role(v):
+ role = str(v or "").strip().lower()
+ if role not in _ROLES:
+ raise err(400, "bad_role", f"role must be one of {list(_ROLES)}")
+ return role
+
+
+def _clean_bus(v):
+ """'all', or a non-empty list of KNOWN business-unit ids.
+
+ Refusing an unknown id is the whole point: `allowed_bus_labels` treats a list with no
+ recognisable label as full access, so `bus: [7]` would be a cross-BU grant created by a typo.
+ """
+ if isinstance(v, str):
+ if v.strip().lower() == "all":
+ return "all"
+ raise err(400, "bad_bus", "bus must be 'all' or a list of business-unit ids")
+ if not isinstance(v, (list, tuple)) or not v:
+ raise err(400, "bad_bus",
+ "bus must be 'all' or a NON-EMPTY list of business-unit ids (an empty list "
+ "would read as unrestricted)")
+ out = []
+ for b in v:
+ try:
+ b = int(b)
+ except (TypeError, ValueError):
+ raise err(400, "bad_bus", "a business-unit id must be a number")
+ if b not in users.BU_LABELS:
+ raise err(400, "bad_bus",
+ f"{b} is not a known business unit {sorted(users.BU_LABELS)} — an "
+ "unrecognised id would widen access to every BU")
+ out.append(b)
+ return sorted(set(out))
+
+
+def _clean_modules(v):
+ """'all', or a non-empty list of KNOWN module keys.
+
+ `[]` is refused because it READS as unrestricted (see the module docstring). An unknown key is
+ refused because `may_open` is fail-closed on it: an admin who typed `sale` for `sales` would
+ silently lock the account out of the page they meant to grant.
+ """
+ if isinstance(v, str):
+ if v.strip().lower() == "all":
+ return "all"
+ raise err(400, "bad_modules", "modules must be 'all' or a list of module keys")
+ if not isinstance(v, (list, tuple)) or not v:
+ raise err(400, "bad_modules",
+ "modules must be 'all' or a NON-EMPTY list of module keys — an empty list "
+ "reads as UNRESTRICTED, which is the opposite of locking an account down")
+ known = set(registry.BY_KEY) | set(perms._LEGACY_KEYS)
+ out, bad = [], []
+ for k in v:
+ k = str(k or "").strip()
+ (out if k in known else bad).append(k)
+ if bad:
+ raise err(400, "bad_modules", f"unknown module keys: {sorted(bad)}")
+ return sorted(set(out))
+
+
+def _tenant_of(rec):
+ """The account's company, with the pre-wave default. ONE spelling of the default, used by
+ every admin route — two spellings is how a tenant wall grows a gap."""
+ return str((rec or {}).get("tenant") or "royal-imports").strip().lower()
+
+
+# ── the routes ───────────────────────────────────────────────────────────────────────────────────
+@router.get("/admin/users")
+def list_users(session: Session = Depends(admin_gate)):
+ """Wave 18 (C1-TENANT): scoped to the CALLER'S tenant. The user registry is a global
+ control-plane bucket, so without this filter a Nurilab admin would read Royal's whole
+ roster — names, emails, agents — from one URL."""
+ reg = _registry()
+ mine = _tenant_of(session.user)
+ return {"users": [_view(u, reg[u]) for u in sorted(reg)
+ if _tenant_of(reg[u]) == mine]}
+
+
+@router.post("/admin/users", status_code=201)
+def create_user(body: dict = Body(default=None), session: Session = Depends(admin_gate)):
+ """Create an account. **409 if the username already exists — `PATCH` is the update path.**
+
+ ⛔ WHY 409 AND NOT AN UPSERT. `core.users.create_user` writes a fresh `_record()`, and a fresh
+ record has NO `epoch` — so overwriting an existing account used to drop its epoch back to 0 and
+ RESURRECT every cookie minted before its last password change. `core/users.py` now
+ preserves-and-bumps on overwrite (which also closes it for `app.py`'s dialog, where "Add /
+ update a user" calls the same function), but this route still refuses: an upsert that silently
+ replaces an account's password, role and BU access because someone reused a username is not an
+ update anybody asked for.
+ """
+ body = body or {}
+ _require_store()
+ uname = _clean_username(body.get("username"))
+ pw = _clean_password(body.get("password"))
+ role = _clean_role(body.get("role") or "user")
+ bus = _clean_bus(body.get("bus") if body.get("bus") is not None else "all")
+ modules = _clean_modules(body.get("modules") if body.get("modules") is not None else "all")
+ name = str(body.get("name") or "").strip() or uname
+ agent = str(body.get("agent") or "").strip() or None
+ email = str(body.get("email") or "").strip() or None
+
+ if uname in _registry():
+ raise err(409, "user_exists", f"{uname} already exists — PATCH it to change it")
+ # Wave 18 (C1-TENANT): an admin creates accounts in their OWN company, never another's —
+ # the tenant is stamped from the session, not taken from the body.
+ users.create_user(uname, pw, name, role=role, bus=bus, modules=modules,
+ agent=agent, email=email, tenant=_tenant_of(session.user))
+ reg = _registry()
+ if uname not in reg:
+ # The store accepted the write and does not have it. Reporting 201 here would be the
+ # "200 over a write that evaporated" failure the whole store-outage rule exists to prevent.
+ raise err(503, "store_unavailable", "the account was not saved — try again")
+ return {"user": _view(uname, reg[uname])}
+
+
+@router.patch("/admin/users/{username}")
+def update_user(username: str, body: dict = Body(default=None),
+ session: Session = Depends(admin_gate)):
+ """Change access on an existing account. Only the keys PRESENT in the body change.
+
+ ⚠ NO EPOCH BUMP, and that is not an omission. `deps._user_for` re-reads the record on every
+ request, so a narrowed role / BU / module grant applies to the target's LIVE session on its very
+ next call — bumping the epoch would only add a forced re-login on top. `active: false` is the
+ exception and it bumps, inside `core.users.set_active`, because a disabled account must lose its
+ session rather than keep working until the cookie expires.
+ """
+ body = body if isinstance(body, dict) else {}
+ reg = _registry()
+ uname = str(username or "").strip().lower()
+ if uname not in reg or _tenant_of(reg[uname]) != _tenant_of(session.user):
+ # Wave 18 (C1-TENANT): a cross-tenant username answers exactly like a missing one —
+ # 404, never 403, because "that account exists in another company" is itself a leak.
+ raise err(404, "no_such_user", f"no account named {uname!r}")
+ if not body:
+ raise err(400, "empty_patch", "no fields to update")
+
+ unknown = sorted(set(body) - {"name", "role", "bus", "modules", "active", "agent", "email"})
+ if unknown:
+ # A silently-ignored field is how a UI ends up believing it saved something it did not.
+ raise err(400, "unknown_fields", f"cannot update: {unknown}")
+
+ is_self = uname == session.uname
+ role = _clean_role(body["role"]) if "role" in body else None
+ active = bool(body["active"]) if "active" in body else None
+ # THE ONE-CLICK LOCKOUT GUARD. APP_PASSWORD remains the real backstop for 'admin', so this is
+ # not the thing that keeps the product reachable — it just stops an administrator removing
+ # their own access with a toggle and having to go find the master password.
+ if is_self and role is not None and role != "admin":
+ raise err(400, "self_demote",
+ "you cannot remove your own administrator role — ask another admin")
+ if is_self and active is False:
+ raise err(400, "self_deactivate", "you cannot deactivate your own account")
+
+ kw = {}
+ if role is not None:
+ kw["role"] = role
+ if "name" in body:
+ kw["name"] = str(body["name"] or "").strip() or uname
+ if "bus" in body:
+ kw["bus"] = _clean_bus(body["bus"])
+ if "modules" in body:
+ kw["modules"] = _clean_modules(body["modules"])
+ if "agent" in body:
+ kw["agent"] = str(body["agent"] or "").strip() # '' clears the link
+ if "email" in body:
+ kw["email"] = str(body["email"] or "").strip()
+ if kw:
+ users.set_access(uname, **kw)
+ if active is not None and active != bool(reg[uname].get("active", True)):
+ users.set_active(uname, active) # bumps the epoch: kills live sessions
+
+ fresh = _registry()
+ return {"user": _view(uname, fresh[uname])}
+
+
+@router.post("/admin/users/{username}/password", status_code=204)
+def set_password(username: str, body: dict = Body(default=None),
+ session: Session = Depends(admin_gate)):
+ """Rotate a password. **Revokes every outstanding session for that account** — the epoch bump
+ happens inside the same read-modify-write as the hash (`core.users.set_password`), so the two
+ can never disagree.
+
+ 204 with no body: there is nothing to say that the caller did not already know, and echoing the
+ account back would invite a client to diff a response for a password change.
+ """
+ reg = _registry()
+ uname = str(username or "").strip().lower()
+ if uname not in reg or _tenant_of(reg[uname]) != _tenant_of(session.user):
+ # Wave 18 (C1-TENANT): a cross-tenant username answers exactly like a missing one —
+ # 404, never 403, because "that account exists in another company" is itself a leak.
+ raise err(404, "no_such_user", f"no account named {uname!r}")
+ pw = _clean_password((body or {}).get("password"))
+ before = int(reg[uname].get("epoch") or 0)
+ users.set_password(uname, pw)
+ after = int((_registry().get(uname) or {}).get("epoch") or 0)
+ if after <= before:
+ # The whole value of this route is the revocation. If the epoch did not move, the sessions
+ # were not revoked, and answering 204 would say they were.
+ raise err(503, "store_unavailable",
+ "the password change did not persist — outstanding sessions were NOT revoked")
+ return Response(status_code=204)
+
+
+# ── C-PERM (wave 15): per-module access + permanent filters + hidden fields ──────────────────
+#: The modules the permission editor governs — the GRID surfaces, the ones with a field schema
+#: to filter and hide. Amendment 6 shipped the wall on `customer_data` alone and said this list
+#: is the one place that changes when C-TOPIC lands. WAVE 16: it landed, so `product_data`
+#: joins — and it is not cosmetic. `perms_v: 1` means an UNDECLARED module DENIES (amendment 4),
+#: so a migrated account would be locked out of Product with no control anywhere to grant it:
+#: fail-closed, but unadministrable. The editor grows its section with zero client edits
+#: (S3 built it off this route's `modules` + `fields_by_module`).
+_PERM_MODULES = ("customer_data", "product_data")
+
+
+def _module_fields(key):
+ """The field schema the editor builds its pickers from — the SAME vocabulary the grid uses,
+ so an admin filters on exactly what the user sees.
+
+ ⛔ Returned WITHOUT any per-user hiding applied, deliberately: this is the admin choosing
+ what to hide, so hiding the choices would make a field unhideable the moment it was hidden
+ once for somebody. The route is admin-gated; the projection a MEMBER receives is the one
+ `perm_scope.visible_fields` narrows.
+
+ ⚠ PER TOPIC (wave 16). `product_data` has its OWN canonical contract, and handing the
+ editor the customer schema for it would let an admin build a wall out of columns that
+ module does not have — `_clean_perms` would then 400 on the admin's own choices, or worse,
+ a filter naming a field the product rows lack would DENY every row via `permits()`.
+ The product contract is served CONSOLIDATED (every column) on purpose: a BU-scoped reader
+ is served fewer columns, but the ADMIN is choosing what may ever be hidden.
+ """
+ import aios_grid
+ src = aios_grid.product_fields() if key == "product_data" else aios_grid.FIELDS
+ out = []
+ for f in src:
+ if not isinstance(f, dict) or not f.get("key"):
+ continue
+ out.append({"key": f["key"], "label": f.get("label") or f["key"],
+ "type": f.get("type") or "text",
+ **({"options": f["options"]} if isinstance(f.get("options"), list) else {}),
+ **({"pinned": True} if f.get("pinned") else {})})
+ return out
+
+
+def _clean_perms(v):
+ """Validate a whole `perms` block. FAIL-CLOSED, and LOUD rather than lenient.
+
+ ⛔ WHY THIS REFUSES WHERE `clean_filter_tree` DROPS. The view sanitiser is deliberately
+ drop-per-node: one bad rule must never cost a user their whole saved view. A PERMISSION
+ filter is the opposite situation — an admin types "agent is Tara", a leaf is silently
+ dropped, and the stored wall is EMPTY. The admin sees "Saved", the account sees the whole
+ book, and nothing anywhere says so. So anything that would be dropped is a 400 instead:
+ the filter is re-validated with `clean_filter_tree` and the result must come back with the
+ SAME leaf count it went in with.
+
+ Shape (C-PERM amendment 2 — a `FilterTree` is a PAIR, `{conj?, nodes}`; `clean_filter_tree`
+ validates the NODE LIST alone and never sees the root conjunction, so the two are checked
+ separately and a bare node list is refused rather than silently read as `and`).
+ """
+ import aios_grid
+
+ if v is None:
+ return None
+ if not isinstance(v, dict):
+ raise err(400, "bad_perms", "perms must be an object keyed by module")
+ unknown = sorted(set(v) - set(_PERM_MODULES))
+ if unknown:
+ raise err(400, "bad_perms",
+ f"unknown module keys: {unknown} — the permission editor governs "
+ f"{list(_PERM_MODULES)}")
+ out = {}
+ for key, raw in v.items():
+ if not isinstance(raw, dict):
+ raise err(400, "bad_perms", f"{key}: each entry must be an object")
+ valid_keys = {f["key"] for f in _module_fields(key)}
+ hidden = raw.get("hiddenFields") or []
+ if not isinstance(hidden, list):
+ raise err(400, "bad_perms", f"{key}: hiddenFields must be a list")
+ bad = sorted({str(h) for h in hidden} - valid_keys)
+ if bad:
+ # A hiddenFields entry naming nothing hides nothing — and reads as a restriction
+ # that is not there.
+ raise err(400, "bad_perms",
+ f"{key}: hiddenFields names unknown fields {bad}")
+ tree = raw.get("filter")
+ clean_tree = None
+ if tree not in (None, {}, []):
+ if not isinstance(tree, dict) or not isinstance(tree.get("nodes"), list):
+ raise err(400, "bad_filter",
+ f"{key}: filter must be {{conj?, nodes:[…]}} — a bare list would lose "
+ f"the root conjunction, and an 'or' wall read as 'and' restricts "
+ f"nothing it was meant to")
+ conj = tree.get("conj", "and")
+ if conj not in ("and", "or"):
+ raise err(400, "bad_filter", f"{key}: conj must be 'and' or 'or'")
+ nodes = tree["nodes"]
+ cleaned = aios_grid.clean_filter_tree(nodes, valid_keys, cohort_ids=None)
+ if _leaf_count(cleaned) != _leaf_count(nodes):
+ raise err(400, "bad_filter",
+ f"{key}: the filter contains conditions this module cannot evaluate "
+ f"(an unknown field, an unknown operator, or a cohort leaf — cohorts "
+ f"are per-user and cannot be a permanent rule). Refused rather than "
+ f"saved with the bad conditions silently removed, which would store a "
+ f"weaker wall than the one on screen.")
+ clean_tree = {"conj": conj, "nodes": cleaned}
+ out[key] = {"access": bool(raw.get("access", True)),
+ "filter": clean_tree,
+ "hiddenFields": sorted({str(h) for h in hidden})}
+ _refuse_unshapeable_bu(out)
+ return out
+
+
+def _refuse_unshapeable_bu(perms_out):
+ """⛔ A BU CONDITION THE PUSHDOWN CANNOT READ IS A VALUE LEAK WEARING A CORRECT ROW LIST.
+
+ Amendment 3 in one more place. `perm_scope.derive_pool_scope` recognises exactly the shapes
+ that PIN a business unit: a top-level `dba eq` leaf, or a top-level OR-group of them — which
+ is what `perm_migrate` emits and what the condition builder produces for "is any of". An
+ admin composing the same intent a slightly different way (a NESTED group, `dba neq Royal`, a
+ `dba` leaf one level down) produces a filter that still narrows the ROWS correctly through
+ `permits()` — and leaves the pool built CONSOLIDATED, so every surviving row carries
+ Fisch+Royal numbers. The row list looks right. The revenue is another BU's.
+
+ That is precisely the defect amendment 3 exists for, re-entering through the editor R9 just
+ shipped, and it cannot be caught downstream: by then the numbers are simply wrong, with
+ nothing anomalous about them.
+
+ So it is refused at the WRITE, where a person is present to fix it. The discriminator is
+ narrow on purpose — the filter must MENTION `dba` and must fail to pin a team. A wall like
+ `dba is Fisch OR revenue > 1000` genuinely does not confine anyone to one BU, and
+ consolidated values are the correct answer for it, so it is not caught here (`derive` also
+ refuses it) and must not be.
+ """
+ import core.perm_scope as perm_scope
+
+ for key, e in perms_out.items():
+ tree = e.get("filter")
+ if not tree or not _mentions_dba(tree.get("nodes")):
+ continue
+ probe = {"role": "user", "perms_v": perm_scope.PERMS_VERSION,
+ "perms": {key: {"access": True, "filter": tree, "hiddenFields": []}}}
+ team_id, _ = perm_scope.derive_pool_scope(probe, key)
+ if team_id is None and _confines_to_one_bu(tree):
+ raise err(400, "bu_condition_shape",
+ f"{key}: this filter restricts the business unit in a way the data layer "
+ f"cannot push into the query, so the rows would be correct while the "
+ f"revenue figures on them stayed consolidated across both units. Express "
+ f"the business-unit condition as a TOP-LEVEL condition — 'DBA is Fisch', "
+ f"or an 'any of' over the brands — and keep any other rules alongside it.")
+
+
+def _guard_bu_widening(rec, cleaned, confirmed):
+ """⛔ THE TWO-CLICK LEAK: a SECOND save that silently drops the business-unit condition.
+
+ `_fold_legacy_scope` runs only while a record is un-migrated, which is correct — after the
+ first save the filter IS the whole wall and the admin owns it. But the first save also
+ CHANGES the tree (it folds the BU condition in), so a client holding the tree it submitted
+ rather than the one the server returned will, on its next save, PUT a payload with no BU
+ condition — and a whole-record replace deletes it. Measured, not theorised: the same client
+ payload saved twice takes the pool scope from `(6, 'Ann')` to `(None, 'Ann')`, which is both
+ business units.
+
+ So a save that REMOVES the brand confinement is refused unless it says it means to. Widening
+ BU access is a legitimate thing for an administrator to do — it is just never a thing to do
+ by accident, and the difference between the two is one explicit flag.
+
+ ⚠ Deliberately NOT solved by always folding the legacy scope: that would make a BU
+ restriction permanent and unremovable, which contradicts R1 (the filter is the wall, and the
+ admin edits it). The right shape is "you may widen, say so".
+ """
+ import core.perm_scope as perm_scope
+
+ if confirmed:
+ return
+ stored = (rec.get("perms") or {}) if isinstance(rec.get("perms"), dict) else {}
+ for key, new_entry in cleaned.items():
+ if not new_entry.get("access", True):
+ # Revoking the module entirely is the OPPOSITE of widening, and the filter on a
+ # denied entry governs nothing. Guarding it would make "lock this account out"
+ # require a confirm_widen flag, which reads as nonsense to whoever hits it.
+ continue
+ old = stored.get(key)
+ if not isinstance(old, dict):
+ continue # nothing stored yet: the fold already handled it
+ old_tree, new_tree = old.get("filter"), new_entry.get("filter")
+ if not old_tree or not _confines_to_one_bu(old_tree):
+ continue # was not confined -> this save cannot widen it
+ if new_tree and _confines_to_one_bu(new_tree):
+ continue # still confined -> not a widening
+ raise err(400, "bu_widening",
+ f"{key}: this would REMOVE the business-unit restriction and give the account "
+ f"both units. If that is intended, resend with confirm_widen: true. If it is "
+ f"not, reload the account's permissions first — saving a filter loaded before "
+ f"the last change drops the conditions it did not know about.")
+ # A guard is only as good as its trigger: `perm_scope` is imported so a future reader sees
+ # the connection to derive_pool_scope, which is what the removed condition was feeding.
+ _ = perm_scope
+
+
+def _mentions_dba(nodes):
+ for n in nodes or ():
+ if not isinstance(n, dict):
+ continue
+ if isinstance(n.get("children"), list):
+ if _mentions_dba(n["children"]):
+ return True
+ elif n.get("colId") == "dba":
+ return True
+ return False
+
+
+def _confines_to_one_bu(tree):
+ """Does the BRAND STRUCTURE ALONE confine the reader to one business unit?
+
+ ⚠ "Alone" is the whole precision of this function, and getting it wrong makes the guard
+ refuse legitimate walls. `dba is Fisch OR ar_open > 1000` does NOT confine anybody — a
+ high-balance Royal customer satisfies it — so consolidated values are the correct answer and
+ refusing it would be a false positive. My first attempt evaluated synthetic rows carrying
+ only `dba`, which made `ar_open > 1000` read false on every probe row and turned that exact
+ wall into a "confinement" it is not.
+
+ So every NON-`dba` leaf is treated as TRUE — the most generous reading, i.e. "suppose the
+ reader satisfies everything else; can they still see both brands?" If yes, the wall does not
+ confine and the pool is correctly consolidated. If no, the brand structure is doing the
+ confining and `derive_pool_scope` must be able to see it, or the numbers are wrong.
+ """
+ def admits(node, brand):
+ if isinstance(node.get("children"), list):
+ kids = [admits(k, brand) for k in node["children"] if isinstance(k, dict)]
+ if not kids:
+ return True
+ return any(kids) if node.get("conj") == "or" else all(kids)
+ if node.get("colId") != "dba":
+ return True # every other condition: assume satisfied
+ want = str(node.get("value") or "").strip().lower()
+ op = node.get("op")
+ if op == "eq":
+ return brand.lower() == want
+ if op == "neq":
+ return brand.lower() != want
+ if op == "contains":
+ return want in brand.lower()
+ if op == "doesNotContain":
+ return want not in brand.lower()
+ if op == "isEmpty":
+ return False # a probe brand is never blank
+ if op == "isNotEmpty":
+ return True
+ return True # an op that cannot judge a brand does not confine
+
+ nodes, conj = (tree.get("nodes") or []), tree.get("conj", "and")
+ root = {"conj": conj, "children": nodes}
+ admitted = {b for b in ("Fisch", "Royal", "Both") if admits(root, b)}
+ if not admitted:
+ return False # admits nothing at all — a different problem
+ # 'Both' belongs to either unit, so it cannot by itself widen the answer.
+ return not ({"Fisch", "Royal"} <= admitted)
+
+
+def _leaf_count(nodes):
+ n = 0
+ for node in nodes or ():
+ if isinstance(node, dict) and isinstance(node.get("children"), list):
+ n += _leaf_count(node["children"])
+ else:
+ n += 1
+ return n
+
+
+def _fold_legacy_scope(rec, cleaned):
+ """⛔ MIGRATING A RECORD MUST NEVER WIDEN IT. The invariant this function exists to hold.
+
+ Writing perms stamps `perms_v: 1`, and that marker SWITCHES OFF the legacy `bus`/`agent`
+ fallback in `perm_scope` (amendment 4 — absence must start meaning DENY). So a first write
+ whose filter carries no BU condition silently promotes a Royal-only account to BOTH business
+ units: the wall that used to come from `bus` is gone and nothing replaced it.
+
+ Caught by the end-to-end leg in `verify_api` and by nothing else — every model-level check
+ passed, because the model was doing exactly what it was told. The account simply received
+ the other BU's customers on the wire.
+
+ So on the FIRST perms write we fold the legacy scope in, as ordinary conditions, exactly as
+ `perm_migrate` would: this IS R1's migration, performed at the moment the record acquires a
+ perms block. From then on the admin sees those leaves in the editor (GET returns the folded
+ filter) and can change them like any other condition — which is R1's whole point, and why
+ this is a one-time fold rather than a permanent floor AND-ed on every write.
+
+ Idempotent by construction: it runs only while the record is un-migrated, and the write that
+ calls it is the write that migrates it.
+ """
+ import core.perm_migrate as perm_migrate
+ import core.perm_scope as perm_scope
+
+ if perm_scope.is_migrated(rec):
+ return cleaned
+ legacy = perm_migrate.filter_for(rec)
+ if not legacy:
+ return cleaned # nothing to preserve: the account was unrestricted
+ out = {}
+ for key, e in cleaned.items():
+ tree = e.get("filter")
+ if not tree or not tree.get("nodes"):
+ folded = legacy
+ else:
+ # AND the two roots together. The submitted tree keeps its own conjunction by being
+ # nested as a GROUP — flattening an `or` tree into an `and` root would turn the
+ # admin's "A or B" into "A and B", which is a different and much narrower wall.
+ folded = {"conj": "and",
+ "nodes": list(legacy["nodes"]) + [{"conj": tree.get("conj", "and"),
+ "children": list(tree["nodes"])}]}
+ out[key] = dict(e, filter=folded)
+ return out
+
+
+@router.get("/admin/users/{username}/perms")
+def get_perms(username: str, session: Session = Depends(admin_gate)):
+ """This account's permission block plus the field schema the editor needs to render it."""
+ reg = _registry()
+ uname = str(username or "").strip().lower()
+ if uname not in reg or _tenant_of(reg[uname]) != _tenant_of(session.user):
+ # Wave 18 (C1-TENANT): a cross-tenant username answers exactly like a missing one —
+ # 404, never 403, because "that account exists in another company" is itself a leak.
+ raise err(404, "no_such_user", f"no account named {uname!r}")
+ import core.perm_scope as perm_scope
+
+ rec = reg[uname]
+ stored = rec.get("perms") or {}
+ # S3 ask 3 — AN ENTRY FOR EVERY DECLARED MODULE, never a gap the client has to default.
+ # The PUT is a whole-record replace over this same module list, so a key declared here and
+ # omitted from `perms` would become an explicit DENY the moment anyone pressed Save. The
+ # default sent is the EFFECTIVE one (`may_access`), so an un-migrated record shows the
+ # access its legacy grant currently gives rather than a guess in either direction.
+ perms_out = {}
+ for k in _PERM_MODULES:
+ e = stored.get(k)
+ perms_out[k] = e if isinstance(e, dict) else {
+ "access": bool(perm_scope.may_access(rec, k)), "filter": None, "hiddenFields": []}
+ return {"username": uname,
+ "perms": perms_out,
+ # S3 ask 2 — the marker rides the GET. An absent module entry means DENY on a
+ # migrated record and LEGACY on an un-migrated one: opposite meanings for identical
+ # JSON, so the client cannot render honestly without knowing which world it is in.
+ "perms_v": int(rec.get("perms_v") or 0),
+ # `role == 'admin'` bypasses perms entirely (amendment 4) — sent so the editor can
+ # say "Everything (admin)" instead of rendering stored rules that do not apply.
+ "is_admin": perms.is_admin(rec),
+ "modules": [{"key": k, "label": _MODULE_LABELS.get(k, k)} for k in _PERM_MODULES],
+ # S3 ask 1 — CANONICAL SHAPE: a BARE ARRAY of fields per module key. Not the nav
+ # schema envelope; the editor needs the field list and nothing else, and one shape
+ # beats two readings of a sentence.
+ "fields_by_module": {k: _module_fields(k) for k in _PERM_MODULES}}
+
+
+@router.put("/admin/users/{username}/perms")
+def put_perms(username: str, body: dict = Body(default=None),
+ session: Session = Depends(admin_gate)):
+ """Replace this account's permission block wholesale.
+
+ WHOLESALE, not a merge: "remove this restriction" has to be expressible, and a merge cannot
+ express a deletion without a second vocabulary for it.
+
+ ⚠ NO EPOCH BUMP, for the same reason `PATCH /admin/users/{u}` does not bump one:
+ `deps._user_for` re-reads the record on every request, so a narrowed wall applies to the
+ target's LIVE session on its very next call. Bumping would only add a forced re-login on top
+ of a change that has already taken effect.
+ """
+ body = body if isinstance(body, dict) else {}
+ reg = _registry()
+ uname = str(username or "").strip().lower()
+ if uname not in reg or _tenant_of(reg[uname]) != _tenant_of(session.user):
+ # Wave 18 (C1-TENANT): a cross-tenant username answers exactly like a missing one —
+ # 404, never 403, because "that account exists in another company" is itself a leak.
+ raise err(404, "no_such_user", f"no account named {uname!r}")
+ if "perms" not in body:
+ raise err(400, "empty_patch", "no perms to save")
+
+ # THE SELF-LOCKOUT GUARD, the twin of `self_demote` on the PATCH route. An admin bypasses
+ # perm_scope entirely, so this cannot brick them today — but it stops an administrator
+ # writing a wall for themselves that would bite the moment their role changed.
+ if uname == session.uname:
+ raise err(400, "self_perms",
+ "you cannot set permissions on your own account — ask another admin")
+
+ cleaned = _clean_perms(body.get("perms")) or {}
+ cleaned = _fold_legacy_scope(reg[uname], cleaned)
+ _guard_bu_widening(reg[uname], cleaned, bool(body.get("confirm_widen")))
+ users.set_access(uname, perms=cleaned)
+ fresh = _registry()
+ rec = fresh.get(uname) or {}
+ if int(rec.get("perms_v") or 0) < users.PERMS_VERSION:
+ # The store took the write and did not record it. A 200 here would tell an administrator
+ # the wall is up when it is not — the one direction this must never fail in.
+ raise err(503, "store_unavailable",
+ "the permissions were not saved — the account is UNCHANGED")
+ return {"username": uname, "perms": rec.get("perms") or {},
+ "perms_v": int(rec.get("perms_v") or 0)}
+
+
+_MODULE_LABELS = {"customer_data": "Customer", "product_data": "Product"}
+
+
+@router.get("/settings")
+def settings(session: Session = Depends(require_session)):
+ """The session's OWN settings — any authenticated user, not admin-only.
+
+ `user` comes from `routes_auth._public_user`, deliberately reusing the ONE definition of what a
+ client may know about itself (never a hash, never the epoch). `scope` restates it as the two
+ things the Settings UI shows, and `tenant` names only THIS tenant — enumerating the others
+ would answer a question about our customer list.
+ """
+ modules = perms.allowed_modules(session.user)
+ return {
+ "user": _public_user(session.user),
+ "scope": {
+ "bus": perms.allowed_bu_labels(session.user),
+ "team_id": perms.scope_team_id(session.user),
+ "agent": perms.scope_agent(session.user),
+ "modules": sorted(modules) if modules is not None else "all",
+ # C-PERM: the caller's OWN effective wall, read-only. The grid uses it to grey
+ # pickers rather than to enforce — hidden fields are stripped from every data wire
+ # regardless, so a client that ignores this is narrowed anyway, never widened.
+ "perms": session.user.get("perms") or {},
+ },
+ "tenant": {"key": session.tenant, "name": getattr(session.runtime, "name",
+ session.tenant)},
+ # CHROME ONLY. Every /admin route re-checks the role server-side; this exists so the client
+ # does not paint a "Manage users" button that 403s.
+ "admin": perms.is_admin(session.user),
+ # Wave 19 (R3, contract C2): the same courtesy for the LOOPABLE plane — the Settings rail
+ # paints its entry iff this is true, and `routes_platform_admin` refuses every request
+ # that is not, so a client that ignored this would gain exactly nothing. Derived from the
+ # ONE predicate rather than restated: a second copy of a two-condition wall is a second
+ # place for one of the conditions to go missing.
+ "platformAdmin": platform_admin.is_platform_admin(session.user),
+ }
diff --git a/api/routes_assets.py b/api/routes_assets.py
new file mode 100644
index 0000000000000000000000000000000000000000..01d0914916d2b1d32ec90de6f0fc470e984284f9
--- /dev/null
+++ b/api/routes_assets.py
@@ -0,0 +1,433 @@
+"""routes_assets.py — product image service (wave 18, contract C2-ASSET).
+
+Serves the catalog's product imagery. Two sources, checked in order:
+
+ 1. `AIOS_ASSET_DIR` — a local directory of master images whose FILENAME STEM is the product
+ `code` (Odoo default_code, case-insensitive). Dev mode: the owner's master folder on this
+ machine. Derivatives are generated on demand into a disk cache.
+ 2. `AIOS_ASSET_REPO` — a private HF dataset (default `royal-imports/product-assets`) laid out
+ by `platform/ingest_product_assets.py`:
+ assets/products/orig/ originals, archived verbatim (R9)
+ assets/products/web/.png ~800px alpha-preserving derivative
+ manifest.json {"codes": {"": {"ext": ".png"}}, ...}
+ Files download once per container into the HF cache; responses carry immutable cache
+ headers so the browser re-fetches nothing.
+
+QUALITY (R9): `q=web` = the low-res derivative the app displays; `q=print` and `q=orig` BOTH
+serve the ORIGINAL bytes — v1's "high quality" IS the master file (dated amendment in the wave
+doc). The gate is the PRODUCT grant: images decorate the product surface, so whoever may open
+`product_data` may fetch them; nobody else may.
+
+Codes are validated against a closed charset before they touch a filesystem or a repo path —
+a path separator can never reach the lookup, so traversal is refused at the door (400), and an
+unknown code is 404 `asset_not_found`, never an empty 200.
+"""
+import base64
+import io
+import os
+import re
+import tempfile
+import time
+import uuid
+from pathlib import Path
+
+from fastapi import Body, Depends
+from fastapi import APIRouter
+from fastapi.responses import FileResponse
+
+from deps import Session, err, module_gate, require_session
+from routes_admin import admin_gate
+
+router = APIRouter(prefix="/api/v1")
+
+#: Same grant as the product surface these images decorate (routes_products.MODULE, restated
+#: here to avoid importing that module for one string).
+MODULE = "product_data"
+
+_WEB_EDGE = 800 # max edge (px) of the in-app derivative
+_QUALITIES = ("web", "print", "orig")
+_EXT_MEDIA = {".png": "image/png", ".jpg": "image/jpeg", ".jpeg": "image/jpeg"}
+#: closed charset — no slashes, no backslashes, no colons, so a code can never be a path.
+_CODE_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9 ._+&()\-]{0,63}$")
+_IMMUTABLE = "public, max-age=31536000, immutable"
+
+#: per-process index of the local master dir: rebuilt when the dir path or its mtime changes.
+_DIR_INDEX = {"path": None, "mtime": None, "map": {}}
+
+
+def _norm(code):
+ return str(code or "").strip().upper()
+
+
+def _local_dir():
+ d = os.environ.get("AIOS_ASSET_DIR", "").strip()
+ if not d:
+ return None
+ p = Path(d)
+ return p if p.is_dir() else None
+
+
+def _cache_root():
+ root = Path(os.environ.get("AIOS_ASSET_CACHE", "").strip()
+ or Path(tempfile.gettempdir()) / "aios_asset_cache")
+ root.mkdir(parents=True, exist_ok=True)
+ return root
+
+
+def _dir_index(d):
+ """{CODE: Path} over the master dir. Two files sharing an upper-cased stem keep the
+ lexicographically first — the same rule the ingest script applies, so dir mode and repo
+ mode resolve identically."""
+ try:
+ mtime = d.stat().st_mtime_ns
+ except OSError:
+ return {}
+ if _DIR_INDEX["path"] == str(d) and _DIR_INDEX["mtime"] == mtime:
+ return _DIR_INDEX["map"]
+ idx = {}
+ for p in sorted(d.iterdir()):
+ if not p.is_file() or p.name.startswith("."):
+ continue
+ if p.suffix.lower() not in _EXT_MEDIA:
+ continue
+ idx.setdefault(p.stem.upper(), p)
+ _DIR_INDEX.update(path=str(d), mtime=mtime, map=idx)
+ return idx
+
+
+def _web_derivative(src, code):
+ """The ~800px alpha-preserving PNG for one master file, built lazily into the disk cache.
+ Rebuilt when the master is newer than the cached copy."""
+ out = _cache_root() / "web"
+ out.mkdir(parents=True, exist_ok=True)
+ dst = out / f"{code}.png"
+ try:
+ if dst.is_file() and dst.stat().st_mtime >= src.stat().st_mtime:
+ return dst
+ except OSError:
+ pass
+ try:
+ from PIL import Image
+ except ImportError:
+ raise err(503, "pillow_missing",
+ "image derivatives need Pillow — `pip install pillow` on this host")
+ with Image.open(src) as im:
+ im.load()
+ if im.mode not in ("RGBA", "RGB", "LA", "L"):
+ im = im.convert("RGBA")
+ im.thumbnail((_WEB_EDGE, _WEB_EDGE))
+ im.save(dst, format="PNG", optimize=True)
+ return dst
+
+
+def _assets():
+ """The asset SOURCE lives in `platform/core/assets.py`, not here.
+
+ ⛔ NOT TIDINESS — a CONTRACT. `ops/verify_portability.py` B1/B2 assert the HuggingFace SDK
+ appears only in its declared homes and NEVER under `aios-web/api/`, because this process is
+ meant to lift to Hetzner/EC2 without a hub client. The first version of this file imported
+ `huggingface_hub` directly and the gate caught it."""
+ import core.assets as assets
+ return assets
+
+
+@router.get("/assets/products")
+def asset_manifest(session: Session = Depends(module_gate(MODULE))):
+ """The codes that HAVE an image — so the catalog designer can mark gaps instead of
+ rendering broken tiles. `source` names which backend answered."""
+ d = _local_dir()
+ if d is not None:
+ return {"codes": sorted(_dir_index(d).keys()), "source": "dir"}
+ codes = _assets().manifest()
+ if codes:
+ return {"codes": sorted(codes.keys()), "source": "repo"}
+ return {"codes": [], "source": "none"}
+
+
+@router.get("/assets/products/{code}")
+def product_asset(code: str, q: str = "web",
+ session: Session = Depends(module_gate(MODULE))):
+ if q not in _QUALITIES:
+ raise err(400, "bad_quality", f"q must be one of {', '.join(_QUALITIES)}")
+ norm = _norm(code)
+ if not _CODE_RE.match(norm):
+ raise err(400, "bad_code", "that is not a product code")
+
+ path = None
+ d = _local_dir()
+ if d is not None:
+ src = _dir_index(d).get(norm)
+ if src is not None:
+ path = _web_derivative(src, norm) if q == "web" else src
+ if path is None:
+ path = _assets().fetch(norm, q)
+ if path is None or not Path(path).is_file():
+ raise err(404, "asset_not_found", f"no image for {norm}")
+
+ media = _EXT_MEDIA.get(Path(path).suffix.lower(), "application/octet-stream")
+ return FileResponse(str(path), media_type=media,
+ headers={"Cache-Control": _IMMUTABLE})
+
+
+# ------------------------------------------------------------------ editorial (DEBT-5)
+# Non-SKU imagery for catalog GALLERY pages — the 2027 book's full-bleed lifestyle
+# photography, which has no product code to live under. Second prefix in the same repo:
+# assets/editorial/orig/ masters, verbatim
+# assets/editorial/web/.png ~1600px derivative (full-page display)
+# manifest.json gains {"editorial": {"": {"ext": ...}}}
+# The designer addresses these as `ed:` in a page's imageCode — a prefix the product
+# charset can never produce (':' is outside _CODE_RE), so the two namespaces cannot collide.
+#
+# MODAL, not layered: with AIOS_ASSET_DIR set, `/editorial/` is AUTHORITATIVE (dev and
+# the hermetic gate); otherwise the repo is. Falling through dir→repo here would let a gate
+# with a temp dir silently read the production repo and go green on prod state.
+
+_ED_WEB_EDGE = 1600 # full-page display derivative; print still serves the master
+_SLUG_RE = re.compile(r"^[a-z0-9][a-z0-9-]{0,63}$")
+_ED_MAX_BYTES = 25 * 1024 * 1024
+
+
+def _ed_dir(create=False):
+ d = _local_dir()
+ if d is None:
+ return None
+ p = d / "editorial"
+ if create:
+ p.mkdir(parents=True, exist_ok=True)
+ return p
+
+
+def _ed_dir_index(ed):
+ idx = {}
+ try:
+ for p in sorted(ed.iterdir()):
+ if p.is_file() and p.suffix.lower() in _EXT_MEDIA and not p.name.startswith("."):
+ idx.setdefault(p.stem.lower(), p)
+ except OSError:
+ pass
+ return idx
+
+
+@router.get("/assets/editorial")
+def editorial_manifest(session: Session = Depends(module_gate(MODULE))):
+ """The slugs that HAVE an editorial image — the designer's picker reads this."""
+ if _local_dir() is not None:
+ ed = _ed_dir()
+ return {"slugs": sorted(_ed_dir_index(ed).keys()) if ed else [], "source": "dir"}
+ slugs = _assets().editorial()
+ return {"slugs": sorted(slugs.keys()), "source": "repo" if slugs else "none"}
+
+
+@router.get("/assets/editorial/{slug}")
+def editorial_asset(slug: str, q: str = "web",
+ session: Session = Depends(module_gate(MODULE))):
+ if q not in _QUALITIES:
+ raise err(400, "bad_quality", f"q must be one of {', '.join(_QUALITIES)}")
+ slug = str(slug or "").strip().lower()
+ if not _SLUG_RE.match(slug):
+ raise err(400, "bad_slug", "that is not an editorial slug")
+
+ path = None
+ if _local_dir() is not None:
+ ed = _ed_dir()
+ src = _ed_dir_index(ed).get(slug) if ed else None
+ if src is not None:
+ path = _web_derivative(src, f"ed_{slug}") if q == "web" else src
+ else:
+ path = _assets().fetch_editorial(slug, q)
+ if path is None or not Path(path).is_file():
+ raise err(404, "asset_not_found", f"no editorial image named {slug}")
+ media = _EXT_MEDIA.get(Path(path).suffix.lower(), "application/octet-stream")
+ return FileResponse(str(path), media_type=media,
+ headers={"Cache-Control": _IMMUTABLE})
+
+
+@router.post("/assets/editorial", status_code=201)
+def editorial_upload(body: dict = Body(default=None),
+ session: Session = Depends(admin_gate)):
+ """Store one editorial image: `{slug, data}` with `data` base64 (JSON keeps the API free
+ of a multipart dependency; an admin upload is rare enough to wear the +33%). The bytes
+ must OPEN as an image — a corrupt file is refused here, not discovered on a printed page."""
+ body = body or {}
+ slug = str(body.get("slug") or "").strip().lower()
+ if not _SLUG_RE.match(slug):
+ raise err(400, "bad_slug",
+ "slugs are lowercase letters, digits and hyphens (max 64)")
+ raw = str(body.get("data") or "")
+ raw = raw.split(",", 1)[1] if raw.startswith("data:") and "," in raw else raw
+ try:
+ blob = base64.b64decode(raw, validate=True)
+ except Exception:
+ raise err(400, "bad_image", "data must be base64 image bytes")
+ if not blob:
+ raise err(400, "bad_image", "the upload is empty")
+ if len(blob) > _ED_MAX_BYTES:
+ raise err(400, "image_too_large",
+ f"editorial masters cap at {_ED_MAX_BYTES // (1024 * 1024)} MB")
+ try:
+ from PIL import Image
+ except ImportError:
+ raise err(503, "pillow_missing",
+ "image validation needs Pillow — `pip install pillow` on this host")
+ try:
+ with Image.open(io.BytesIO(blob)) as im:
+ im.load()
+ fmt = (im.format or "").upper()
+ if fmt not in ("PNG", "JPEG"):
+ raise err(400, "bad_image", "PNG or JPEG only")
+ ext = ".png" if fmt == "PNG" else ".jpg"
+ web = im.convert("RGB") if im.mode not in ("RGB", "RGBA", "L", "LA") else im.copy()
+ web.thumbnail((_ED_WEB_EDGE, _ED_WEB_EDGE))
+ buf = io.BytesIO()
+ web.save(buf, format="PNG", optimize=True)
+ except Exception as e:
+ if getattr(e, "status_code", None):
+ raise
+ raise err(400, "bad_image", "that file does not open as an image")
+
+ if _local_dir() is not None:
+ ed = _ed_dir(create=True)
+ (ed / f"{slug}{ext}").write_bytes(blob)
+ return {"slug": slug, "source": "dir"}
+ try:
+ _assets().put_editorial(slug, blob, ext, buf.getvalue())
+ except Exception:
+ raise err(503, "asset_repo_unavailable",
+ "the asset repo did not accept the upload — try again")
+ return {"slug": slug, "source": "repo"}
+
+
+# ───────────────────────────────── RECORD IMAGES (wave 19, owner item 5 / R7 / contract C5)
+#
+# The third namespace, and the first one ORDINARY USERS write. An `image` field's cell holds a
+# string reference; `rec:` names a picture uploaded here.
+#
+# ⛔ THREE WALLS, and each exists because of a specific way this could go wrong:
+#
+# 1. SESSION-GATED, NOT ADMIN-GATED. R7 is explicit — a non-admin attaches a picture to their
+# own record. The editorial upload above IS admin-only because it publishes into Royal's
+# shared catalogue library; this writes a per-record attachment, which is the same class of
+# act as typing a note.
+# 2. TENANT FROM THE SESSION, NEVER FROM THE STRING. The stored address is `/` and
+# both halves of it are composed server-side. A `rec:` reference pasted from another
+# tenant's cell is looked up under THIS tenant's prefix, finds nothing, and 404s. There is
+# no code path in which a client-supplied string chooses a tenant.
+# 3. IT MUST OPEN AS AN IMAGE. A 2 MB cap on the DECODED bytes (the client checks too, but a
+# client check only spares the user a pointless upload) and Pillow must parse it. Without
+# the parse, "upload an image" is "upload 2 MB of anything to the tenant's dataset".
+#
+# The id is server-minted hex, so a client never names a path component at all — traversal is
+# not refused so much as unreachable. The read route re-validates it anyway (defence in depth,
+# and the same closed-charset posture `_CODE_RE` takes for product codes).
+
+_REC_MAX_BYTES = 2 * 1024 * 1024 # C5's cap, enforced on the DECODED bytes
+_REC_WEB_EDGE = 1200 # bigger than a SKU thumbnail; smaller than editorial
+_REC_ID_RE = re.compile(r"^[a-f0-9]{8,32}$")
+
+
+def _rec_dir(tenant, create=False):
+ """Dir-mode home for one tenant's record images: `/records//`.
+
+ Dir mode is MODAL exactly as editorial is (see that section's note): with `AIOS_ASSET_DIR`
+ set it is authoritative and the repo is never consulted, so a hermetic gate cannot silently
+ read production state and go green on it.
+ """
+ d = _local_dir()
+ if d is None:
+ return None
+ p = d / "records" / str(tenant or "").strip().lower()
+ if create:
+ p.mkdir(parents=True, exist_ok=True)
+ return p
+
+
+@router.post("/assets/records", status_code=201)
+def record_upload(body: dict = Body(default=None),
+ session: Session = Depends(require_session)):
+ """Store one record image and return the REFERENCE to put in the cell.
+
+ `{data: ""}` → `{"ref": "rec:"}`. The caller PATCHes that ref onto
+ the row through the ordinary overlay wall; this route never writes a cell. That separation is
+ deliberate: the per-key `permissions.edit` wall, the pid wall and the hidden-field wall all
+ live in `core.grid_events`, and an asset route that wrote cells directly would be a second
+ write path with none of them.
+ """
+ body = body or {}
+ raw = str(body.get("data") or "")
+ raw = raw.split(",", 1)[1] if raw.startswith("data:") and "," in raw else raw
+ try:
+ blob = base64.b64decode(raw, validate=True)
+ except Exception:
+ raise err(400, "bad_image", "data must be base64 image bytes")
+ if not blob:
+ raise err(400, "bad_image", "the upload is empty")
+ if len(blob) > _REC_MAX_BYTES:
+ raise err(400, "image_too_large",
+ f"record images cap at {_REC_MAX_BYTES // (1024 * 1024)} MB")
+ try:
+ from PIL import Image
+ except ImportError:
+ raise err(503, "pillow_missing",
+ "image validation needs Pillow — `pip install pillow` on this host")
+ try:
+ with Image.open(io.BytesIO(blob)) as im:
+ im.load()
+ fmt = (im.format or "").upper()
+ if fmt not in ("PNG", "JPEG"):
+ raise err(400, "bad_image", "PNG or JPEG only")
+ ext = ".png" if fmt == "PNG" else ".jpg"
+ web = im.convert("RGB") if im.mode not in ("RGB", "RGBA", "L", "LA") else im.copy()
+ web.thumbnail((_REC_WEB_EDGE, _REC_WEB_EDGE))
+ buf = io.BytesIO()
+ web.save(buf, format="PNG", optimize=True)
+ except Exception as e:
+ if getattr(e, "status_code", None):
+ raise
+ raise err(400, "bad_image", "that file does not open as an image")
+
+ asset_id = uuid.uuid4().hex[:24]
+ tenant = session.tenant
+ d = _rec_dir(tenant, create=True)
+ if d is not None:
+ (d / f"{asset_id}{ext}").write_bytes(blob)
+ (d / f"{asset_id}.web.png").write_bytes(buf.getvalue())
+ return {"ref": f"rec:{asset_id}", "source": "dir"}
+ try:
+ _assets().put_record(tenant, asset_id, blob, ext, buf.getvalue())
+ except Exception:
+ raise err(503, "asset_repo_unavailable",
+ "the asset repo did not accept the upload — try again")
+ return {"ref": f"rec:{asset_id}", "source": "repo"}
+
+
+@router.get("/assets/records/{asset_id}")
+def record_asset(asset_id: str, q: str = "web",
+ session: Session = Depends(require_session)):
+ """Serve one record image for THIS session's tenant. Any signed-in user of the tenant may
+ read it — a picture on a row is visible to whoever can open the row, and the row walls
+ already decided that."""
+ if q not in _QUALITIES:
+ raise err(400, "bad_quality", f"q must be one of {', '.join(_QUALITIES)}")
+ asset_id = str(asset_id or "").strip().lower()
+ if not _REC_ID_RE.match(asset_id):
+ raise err(400, "bad_asset_id", "that is not a record image id")
+
+ tenant = session.tenant
+ d = _rec_dir(tenant)
+ path = None
+ if d is not None:
+ # Dir mode is MODAL: this tenant's folder, or nothing. Never a fall-through to the repo.
+ cand = (d / f"{asset_id}.web.png") if q == "web" else None
+ if cand is None or not cand.is_file():
+ cand = next((d / f"{asset_id}{e}" for e in _EXT_MEDIA
+ if (d / f"{asset_id}{e}").is_file()), None)
+ path = cand if cand is not None and cand.is_file() else None
+ else:
+ path = _assets().fetch_record(tenant, asset_id, q)
+ if path is None or not Path(path).is_file():
+ # 404 — and it is the SAME answer for "no such picture" and "that picture belongs to
+ # another tenant", which is the cross-tenant wall stated as a status code.
+ raise err(404, "asset_not_found", "no image for that reference")
+ media = _EXT_MEDIA.get(Path(path).suffix.lower(), "application/octet-stream")
+ return FileResponse(str(path), media_type=media,
+ headers={"Cache-Control": _IMMUTABLE})
diff --git a/api/routes_auth.py b/api/routes_auth.py
new file mode 100644
index 0000000000000000000000000000000000000000..20b3c2f581cb4eede9bbfeb41e07cb099869b61d
--- /dev/null
+++ b/api/routes_auth.py
@@ -0,0 +1,217 @@
+"""routes_auth.py — X2's auth leg: login / logout / me (EXIT-3a).
+
+Password auth against the SAME `core/users` accounts the Streamlit `gate()` uses, so both
+front-ends share one identity today. The amended D-3 (our own OIDC client against Authentik, with
+a branded login page) lands when D-1/D-2 unblock (owner blocker B-4); this is the interim leg it
+replaces, and it is deliberately the same account store so the migration is a swap of the
+CREDENTIAL check, not of the user model.
+"""
+import base64 as _b64
+import hmac
+import os
+import re as _re
+import time
+from collections import OrderedDict
+
+from fastapi import APIRouter, Body, Depends, Request, Response
+
+import aios_session
+from deps import Session, err, require_session, users, perms
+
+router = APIRouter(prefix="/api/v1/auth")
+
+#: THE SERVER OWNS BACKOFF (X5): the login page shows an inline error and never paces itself, so
+#: the pacing has to be here or it does not exist. Bounded so it cannot grow into a memory leak.
+#: ⚠ HONEST LIMIT: per-PROCESS. Behind several workers an attacker gets this budget per worker,
+#: and it resets on deploy. It raises the cost of online guessing against PBKDF2-200k; it is not
+#: a substitute for the real thing, which arrives with Authentik (D-1) owning rate limits centrally.
+#: ⚠ KEYED BY (TENANT, USERNAME), not by username. Two tenants can each have an 'admin' or a
+#: 'boss', and a shared bucket would mean failed logins against tenant B lock the same name out of
+#: tenant A — a cross-tenant coupling in the one wave whose point is that tenants cannot reach
+#: each other. It is also a (weak) existence oracle: a 429 for a name you never tried here would
+#: tell you somebody else did.
+_FAILS = OrderedDict()
+_MAX_TRACKED = 2048
+_LOCKOUT_AFTER = 8
+_LOCKOUT_SECONDS = 60
+
+
+def _throttled(key, now=None):
+ now = now or time.time()
+ hit = _FAILS.get(key)
+ if not hit:
+ return 0
+ count, last = hit
+ if count < _LOCKOUT_AFTER:
+ return 0
+ remaining = int(_LOCKOUT_SECONDS - (now - last))
+ return remaining if remaining > 0 else 0
+
+
+def _note_failure(key, now=None):
+ now = now or time.time()
+ count, last = _FAILS.get(key, (0, 0.0))
+ # A window that has fully elapsed starts the count again — a user who mistypes twice today
+ # and twice next week is not an attacker.
+ if now - last > _LOCKOUT_SECONDS:
+ count = 0
+ _FAILS[key] = (count + 1, now)
+ _FAILS.move_to_end(key)
+ while len(_FAILS) > _MAX_TRACKED:
+ _FAILS.popitem(last=False)
+
+
+def _clear_failures(key):
+ _FAILS.pop(key, None)
+
+
+def _public_user(user):
+ """What the client is allowed to know about itself. Never a hash, a salt, or the epoch —
+ the epoch is a server-side revocation handle and a client has no use for it."""
+ return {"username": user.get("username", ""), "name": user.get("name", ""),
+ "role": user.get("role", "user"),
+ # Wave 18 (C1-TENANT, R1): the company this session is bound to — the client shows
+ # it and tests assert the binding; the SERVER-side truth stays in the signed cookie.
+ "tenant": str(user.get("tenant") or "royal-imports").strip().lower(),
+ "bus": perms.allowed_bu_labels(user),
+ "team_id": perms.scope_team_id(user),
+ "agent": perms.scope_agent(user),
+ "modules": sorted(perms.allowed_modules(user) or []) or "all",
+ "landing": perms.landing_page(user),
+ # Wave 14 C-AVATAR — the user's OWN photo (Settings preview + the shell chip).
+ # Everyone else's rides workspace.userAvatars, keyed by display name.
+ "avatar": user.get("avatar") or None}
+
+
+#: Wave 14 C-AVATAR — the write-side wall. PNG/JPEG data URLs only; the client downscales to
+#: <=128px before posting, and the server re-validates because a stored data URL is served to
+#: every grid session verbatim.
+_AVATAR_RE = _re.compile(r"^data:image/(png|jpeg);base64,([A-Za-z0-9+/=]+)$")
+_AVATAR_MAX_BYTES = 64 * 1024
+
+
+@router.post("/me/avatar")
+def set_avatar(body: dict = Body(default=None),
+ session: Session = Depends(require_session)):
+ import core.store as _store
+ raw = str((body or {}).get("dataUrl") or "")
+ m = _AVATAR_RE.match(raw)
+ if not m:
+ raise err(400, "bad_avatar",
+ "expected a data:image/png;base64,... or image/jpeg data URL")
+ try:
+ blob = _b64.b64decode(m.group(2), validate=True)
+ except Exception:
+ raise err(400, "bad_avatar", "that data URL is not valid base64")
+ if len(blob) > _AVATAR_MAX_BYTES:
+ raise err(400, "bad_avatar",
+ f"avatar too large - {_AVATAR_MAX_BYTES // 1024}KB decoded max "
+ f"(downscale to 128px before posting)")
+ if not _store.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ # session.uname is the canonical account handle; the session's user RECORD does not
+ # carry a "username" key (it is the registry's dict key), so keying the write off the
+ # record would silently no-op — caught by X7's fresh /me read.
+ users.set_avatar(session.uname, raw)
+ u2 = dict(session.user)
+ u2["avatar"] = raw
+ return {"user": _public_user(u2)}
+
+
+@router.delete("/me/avatar")
+def clear_avatar(session: Session = Depends(require_session)):
+ import core.store as _store
+ if not _store.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ users.set_avatar(session.uname, None)
+ u2 = dict(session.user)
+ u2.pop("avatar", None)
+ return {"user": _public_user(u2)}
+
+
+@router.post("/login")
+def login(request: Request, response: Response, body: dict = Body(default=None)):
+ """Wave 18 (C1-TENANT, R1): ONE login box — the ACCOUNT decides the tenant.
+
+ The pre-wave flow validated a caller-posted tenant slug and minted the session for it, so
+ the same credential could sign in to any registered tenant. Now the credential resolves
+ FIRST (username or email — `users.verify` takes both) and the session binds to the tenant
+ ON THE RECORD; the posted `tenant` field is accepted for wire-compat and ignored. An
+ account whose tenant no longer resolves (deleted / suspended record) gets the same 401 as
+ a bad password — "which tenants exist" is not the login form's question to answer.
+ """
+ body = body or {}
+ uname = str(body.get("username") or "").strip().lower()
+ pw = str(body.get("password") or "")
+
+ # Throttle on the IDENTIFIER alone: the tenant is not known until the credential resolves,
+ # and a per-(tenant, uname) key would let an attacker reset their budget by rotating slugs.
+ throttle_key = ("*", uname)
+ wait = _throttled(throttle_key)
+ if wait:
+ raise err(429, "too_many_attempts",
+ f"too many failed attempts — try again in {wait} seconds")
+
+ user = users.verify(uname, pw) if (uname and pw) else None
+ if not user:
+ # CONSTANT-TIME-ISH 401. `users.verify` returns immediately for an unknown username (no
+ # record, no PBKDF2) and burns ~200k iterations for a known one, so the response time
+ # answers "does this account exist?" to anyone with a stopwatch. Burning one equivalent
+ # hash on the failure path removes that oracle. It costs nothing on the happy path.
+ try:
+ users._hash(pw or "x", "00" * 16)
+ except Exception:
+ pass
+ _note_failure(throttle_key)
+ raise err(401, "invalid_credentials", "that username and password do not match")
+
+ tenant = str(user.get("tenant") or "royal-imports").strip().lower()
+ from harness import runtime
+ try:
+ runtime.get_runtime(tenant)
+ except KeyError:
+ _note_failure(throttle_key)
+ raise err(401, "invalid_credentials", "that username and password do not match")
+
+ _clear_failures(throttle_key)
+ value, _claims = aios_session.mint(tenant, user["username"], int(user.get("epoch") or 0))
+ aios_session.set_cookie(response, request, value)
+ # Wave 19 (R4): the login stamp. THE RESOLVED username, never the posted identifier — the
+ # person may have typed an email address and `users.verify` resolved it to the registry key;
+ # stamping what was typed would write onto a key that does not exist. Fail-silent inside
+ # `touch_login` and a no-op for the emergency-master identity (which has no record to stamp),
+ # so the one thing this cannot do is turn a good credential into a failed sign-in.
+ users.touch_login(user["username"])
+ # `touch_login` also sets `last_active`, so tell the session resolver it has been seen —
+ # otherwise the very next request stamps it again and the hourly throttle is off by one write
+ # per sign-in.
+ import deps as _deps
+ _deps.note_active(user["username"])
+ return {"user": _public_user(user)}
+
+
+@router.post("/logout", status_code=204)
+def logout(request: Request):
+ """204 and the cookie is cleared. Deliberately NOT session-gated: logging out must work from
+ an already-invalid session, or a user holding a broken cookie has no way to get rid of it.
+
+ ⚠ THE COOKIE IS CLEARED ON THE RETURNED RESPONSE, not on an injected `response` param. When a
+ handler RETURNS a Response object, FastAPI ships that object — anything written to the
+ injected `response` is silently dropped. The first version of this route took `response:
+ Response`, called `clear_cookie` on it, then returned a fresh `Response(204)`: the 204 was
+ correct, no `Set-Cookie` was ever sent, and the session stayed alive after a "successful"
+ logout. Caught by asserting `/auth/me` is 401 AFTER the logout rather than trusting the 204.
+
+ ⚠ This clears the BROWSER's copy only — the signed value stays cryptographically valid until
+ it expires, which is the honest cost of a stateless session. "Sign me out everywhere" is
+ `core.users.bump_epoch` (a password change already does it); D2's Postgres session mirror
+ makes per-device revocation possible and arrives with C-2.
+ """
+ out = Response(status_code=204)
+ aios_session.clear_cookie(out, request)
+ return out
+
+
+@router.get("/me")
+def me(session: Session = Depends(require_session)):
+ return {"user": _public_user(session.user), "tenant": session.tenant}
diff --git a/api/routes_automation.py b/api/routes_automation.py
new file mode 100644
index 0000000000000000000000000000000000000000..2054d73e3e1b5e59e6c774f9b0ee90f2d72fe0c8
--- /dev/null
+++ b/api/routes_automation.py
@@ -0,0 +1,246 @@
+"""routes_automation.py — wave-18 item 5 (contract C4-AUTO): the automation surface's API.
+
+The router is thin on purpose: everything that can be wrong about an automation — a malformed
+cron, a URL the SSRF rail refuses, a key field that is not one of the mapped columns — is decided
+in `automation_engine`, which is a pure-ish module a gate can drive without a server. This file
+does auth, shape and status codes.
+
+⛔ THE TICK ENDPOINT IS THE ONE UNAUTHENTICATED ROUTE, AND IT IS FAIL-CLOSED TWICE OVER. It takes
+no session (an external cron has no cookie), so it is gated on a shared secret in
+`X-AIOS-TICK-TOKEN`; and when `AIOS_AUTOMATION_TICK_TOKEN` is UNSET the route refuses everything
+rather than admitting everyone. A "no token configured means no check" default is how an internal
+trigger becomes a public one — the same class of mistake as an empty-200 permission answer.
+"""
+import os
+import time
+
+from fastapi import APIRouter, Body, Depends, Header, Request
+
+import automation_engine as engine
+from deps import Session, err, module_gate, require_session
+
+router = APIRouter(prefix="/api/v1")
+
+#: The registry key this surface carries (C-AUTONAV — A adds the row; the gate is live now, so
+#: the day the row lands the wall is already the one that was tested).
+MODULE = "automation"
+
+_GATE = module_gate(MODULE)
+
+
+def _wire(defn, tenant):
+ """One automation, as the client reads it. `running` is PROCESS state, never store state —
+ see the engine header on why a persisted 'running' is a permanent lock."""
+ live = engine.running(tenant, defn.get("id"))
+ sched = defn.get("schedule") or {}
+ nxt = engine.next_fire(sched.get("cron")) if sched.get("enabled") else None
+ status = dict(defn.get("status") or {})
+ if live:
+ status = {**status, "state": "running", "startedAt": live.get("startedAt"),
+ "step": live.get("step")}
+ return {
+ "id": defn.get("id"), "name": defn.get("name"), "kind": defn.get("kind"),
+ "config": defn.get("config") or {}, "schedule": sched, "status": status,
+ "runs": list(defn.get("runs") or [])[:engine.MAX_RUNS],
+ "created": defn.get("created"), "createdBy": defn.get("createdBy"),
+ "nextRunAt": nxt.strftime("%Y-%m-%d %H:%M") if nxt else "",
+ "running": bool(live),
+ # THE CANVAS TOPOLOGY (R5) rides with the automation rather than being rebuilt in the
+ # client, for the same reason `cronPresets` does: the engine that RUNS the steps is the
+ # only thing entitled to say what the steps are.
+ "graph": engine.graph(defn),
+ }
+
+
+@router.get("/automations")
+def list_automations(session: Session = Depends(_GATE)):
+ """`{automations: [...], kinds: [...], cronPresets: [...]}` — the rail's whole payload.
+
+ The vocabularies ride WITH the list rather than sitting in a client constant: the cron
+ presets and the kind list are the server's, and a client copy of either is a thing that goes
+ stale silently (the editor would offer a preset the parser rejects)."""
+ defs = engine.all_definitions(session.runtime)
+ items = [_wire(d, session.tenant) for _, d in
+ sorted(defs.items(), key=lambda kv: (kv[1].get("name") or "").lower())]
+ return {"automations": items,
+ "kinds": [{"key": "scrape_db", "label": "Web page to database"},
+ {"key": "field_instagram", "label": "Instagram profile column"}],
+ "cronPresets": engine.CRON_PRESETS,
+ # ⚠ A BOOLEAN, NEVER THE KEY. The surface needs to say "the paid rung is not
+ # configured" honestly instead of offering a tier that will silently refuse — and
+ # that needs exactly one bit. Shipping the key itself to a browser would put a
+ # billable secret in every user's devtools.
+ "hikerReady": engine.hiker_ready(),
+ "storeAvailable": bool(session.runtime.available())}
+
+
+@router.get("/automations/tables")
+def automation_tables(session: Session = Depends(_GATE)):
+ """The blank databases an automation can target, with their fields.
+
+ ⚠ A READ-ONLY MIRROR of C3-UT's `GET /api/v1/tables`, under this router's own prefix so the
+ two can never collide. It exists because the automation editor needs the table+field list to
+ build a config at all, and D must not block on A's route landing. When C3-UT is live this
+ keeps working (same bucket) — it is a duplicate reader, never a second writer.
+ """
+ out = []
+ for key, t in sorted(engine.ut_all(session.runtime).items(),
+ key=lambda kv: (kv[1].get("label") or "").lower()):
+ if not (session.admin or t.get("createdBy") in (session.uname, "automation",
+ "scheduler")):
+ continue # user_tables.may_open's rule, mirrored fail-closed
+ out.append({"key": key, "label": t.get("label") or key,
+ "source": t.get("source") or "Blank",
+ "rowCount": len(t.get("rows") or {}),
+ "fields": [{"key": f.get("key"), "label": f.get("label"),
+ "type": f.get("type") or "text",
+ "automation": f.get("automation") or None}
+ for f in (t.get("fields") or [])]})
+ return {"tables": out}
+
+
+@router.get("/automations/{auto_id}")
+def get_automation(auto_id: str, session: Session = Depends(_GATE)):
+ defn = engine.all_definitions(session.runtime).get(str(auto_id))
+ if defn is None:
+ raise err(404, "unknown_automation", "no automation with that id")
+ return {"automation": _wire(defn, session.tenant)}
+
+
+@router.post("/automations")
+def create_automation(body: dict = Body(default=None), session: Session = Depends(_GATE)):
+ if not session.runtime.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable — nothing was saved")
+ defn, error = engine.create(session.runtime, body or {}, username=session.uname)
+ if error:
+ raise err(400, "invalid_automation", error)
+ return {"automation": _wire(defn, session.tenant)}
+
+
+@router.patch("/automations/{auto_id}")
+def patch_automation(auto_id: str, body: dict = Body(default=None),
+ session: Session = Depends(_GATE)):
+ if not session.runtime.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable — nothing was saved")
+ defn, error = engine.patch(session.runtime, auto_id, body or {}, username=session.uname)
+ if error:
+ raise err(400 if error != "no such automation" else 404,
+ "invalid_automation" if error != "no such automation" else "unknown_automation",
+ error)
+ return {"automation": _wire(defn, session.tenant)}
+
+
+@router.delete("/automations/{auto_id}")
+def delete_automation(auto_id: str, session: Session = Depends(_GATE)):
+ """Delete the DEFINITION. ⚠ The database it filled is NOT touched — an automation is the
+ thing that writes rows, not the thing that owns them, and deleting a job must never be a way
+ to lose data (the same rule the orphan count encodes)."""
+ if engine.running(session.tenant, auto_id):
+ raise err(409, "automation_running", "it is running — wait for it to finish")
+ engine.remove(session.runtime, auto_id)
+ return {"deleted": str(auto_id)}
+
+
+@router.post("/automations/preview")
+def preview_source(body: dict = Body(default=None), session: Session = Depends(_GATE)):
+ """What does this URL actually offer? The field-map step — never writes anything."""
+ body = body or {}
+ url = str(body.get("url") or "").strip()
+ if not url:
+ raise err(400, "no_url", "give a page URL to read")
+ try:
+ return engine.preview(url, str(body.get("extract") or "table"),
+ int(body.get("tableIndex") or 0))
+ except engine.Refused as e:
+ raise err(400, "refused_url", str(e))
+ except Exception as e: # noqa: BLE001
+ raise err(502, "fetch_failed", f"could not read that page — {type(e).__name__}: "
+ f"{str(e)[:160]}")
+
+
+@router.post("/automations/{auto_id}/run")
+def run_automation(auto_id: str, session: Session = Depends(_GATE)):
+ """Start a run on a background thread. 409 when one is already in flight."""
+ defn = engine.all_definitions(session.runtime).get(str(auto_id))
+ if defn is None:
+ raise err(404, "unknown_automation", "no automation with that id")
+ if not engine.run_async(session.runtime, session.tenant, auto_id, username=session.uname):
+ raise err(409, "automation_running", "that automation is already running")
+ return {"started": str(auto_id), "startedAt": time.strftime("%Y-%m-%dT%H:%M:%S")}
+
+
+@router.post("/automations/{auto_id}/nodes/{node_id}/toggle")
+def toggle_automation_node(auto_id: str, node_id: str, session: Session = Depends(_GATE)):
+ """Flip one step on the canvas. The SERVER decides what a node's switch means (see
+ `engine.NODE_TOGGLES`) — the client only reports which node was clicked.
+
+ A node with no switch answers 400 with the sentence saying why, rather than silently doing
+ nothing: a control that appears to work and does not is worse than one that refuses.
+ """
+ if not session.runtime.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable — nothing was saved")
+ if engine.running(session.tenant, auto_id):
+ raise err(409, "automation_running", "it is running — wait for it to finish")
+ defn, error = engine.toggle_node(session.runtime, auto_id, node_id)
+ if error:
+ raise err(404 if error == "no such automation" else 400,
+ "unknown_automation" if error == "no such automation" else "node_not_toggleable",
+ error)
+ return {"automation": _wire(defn, session.tenant)}
+
+
+@router.post("/automations/tick")
+def tick(request: Request, x_aios_tick_token: str = Header(default="")):
+ """Fire every due schedule, for every tenant. The durable-cron entry point (R5).
+
+ Unauthenticated BY DESIGN and gated on a shared secret instead — an EventBridge rule has no
+ cookie. Refuses when the secret is not configured (see the module header)."""
+ want = os.environ.get("AIOS_AUTOMATION_TICK_TOKEN") or ""
+ if not want:
+ raise err(403, "tick_disabled",
+ "AIOS_AUTOMATION_TICK_TOKEN is not configured — the tick endpoint is closed")
+ got = x_aios_tick_token or request.headers.get("X-AIOS-TICK-TOKEN") or ""
+ if got != want:
+ raise err(403, "bad_tick_token", "that token is not valid for this deployment")
+ started = engine.tick_all()
+ return {"started": started, "at": time.strftime("%Y-%m-%dT%H:%M:%S")}
+
+
+@router.get("/automations/{auto_id}/rows")
+def run_rows(auto_id: str, session: Session = Depends(_GATE)):
+ """The rows the LAST run touched — the drill-down behind a run's counts.
+
+ Every count in this product drills to the exact rows behind it ([[no-unverifiable-aggregates]]);
+ a run history that said "412 updated" and could not show which would be the thing that rule
+ exists to forbid.
+ """
+ defn = engine.all_definitions(session.runtime).get(str(auto_id))
+ if defn is None:
+ raise err(404, "unknown_automation", "no automation with that id")
+ last = (defn.get("runs") or [{}])[0]
+ table_key = (defn.get("config") or {}).get("targetTable") or ""
+ t = engine.ut_get(session.runtime, table_key) or {}
+ rows = t.get("rows") or {}
+ ids = [str(i) for i in (last.get("affected") or [])]
+ return {"table": table_key, "label": t.get("label") or table_key,
+ "fields": [{"key": f.get("key"), "label": f.get("label")}
+ for f in (t.get("fields") or [])],
+ "rows": [{"id": i, **(rows.get(i) or {})} for i in ids if i in rows],
+ "truncated": len(ids) >= 200}
+
+
+# --- the in-process scheduler ------------------------------------------------------------
+# ⚠ OPT-IN (`AIOS_AUTOMATIONS=1`), and that is an AMENDMENT to the wave brief's "default-on",
+# made on a measurement: `verify_api.py` runs for 196 s, i.e. longer than three tick intervals,
+# and `tick_all` reaches `runtime.get_runtime()` — which builds tenants and moves the LRU cache
+# that verify_api's own isolation checks read. Default-on would put a background thread inside
+# the subject of another session's gate. `AIOS_PREWARM=1` at `main.py:353` is the same decision
+# for the same reason, so this follows it rather than inventing a second convention.
+#
+# The loop also SLEEPS FIRST (`engine.scheduler_loop`) — defence in depth, proven in
+# verify_automation.py section T rather than assumed.
+#
+# ⛔ THE DEPLOY MUST SET `AIOS_AUTOMATIONS=1` (with `AIOS_AUTOMATION_TICK_TOKEN`) or schedules
+# only ever fire from the external cron POSTing /automations/tick. Both paths work; neither is
+# implicit. Booked in the session-D mailbox.
+engine.start_scheduler()
diff --git a/api/routes_customers.py b/api/routes_customers.py
new file mode 100644
index 0000000000000000000000000000000000000000..18f22b79575a4f5f4833c6f0ba4f621f7983e31a
--- /dev/null
+++ b/api/routes_customers.py
@@ -0,0 +1,346 @@
+"""routes_customers.py — X2's read + write of the customer table, BU-SCOPED (EXIT-3b / EXIT-2a).
+
+Two things happen here that did not happen in the pre-wave `main.py`:
+
+ 1. **ROWS ARE SCOPED TO THE SESSION.** The old `/api/customers` served `cl.pool()` — the whole
+ book, to anyone holding the shared APP_PASSWORD. Now the pool is built with
+ `(team_id, agent_name)` derived from the USER RECORD, so a Royal-only user never receives a
+ Fisch row and an agent-linked login never receives another rep's book. The scope is applied
+ at the QUERY, not as a post-filter, so there is no moment at which the other BU's rows exist
+ in this response.
+
+ 2. **THE OVERLAY FORK IS GONE.** `aios-web/api/data/overlay.json` was a SECOND writable home
+ for the same user-owned fields the Streamlit app keeps in the tenant store — two truths, and
+ whichever process you asked last was right. Reads and writes now both go through
+ `modules.customer_data`'s table-workspace functions: ONE store (C1c, ARCHITECTURE §1a rule 3).
+
+⚠ ONE STORE IS NOT YET ONE CACHE (strangler-period, booked honestly). `core.store.get()` is
+cache-first per PROCESS, so a write from the Streamlit container is invisible to a running API
+container until its cache is refreshed, and vice versa. Deleting the fork removes the second
+SOURCE OF TRUTH; it does not make the two runtimes coherent. The fix is X4/Postgres (task C-4,
+owner-blocked on B-3), and no test here may claim read-your-writes ACROSS runtimes — a TestClient
+proof is single-process and would report green on exactly the thing that is still broken.
+"""
+import time
+
+from fastapi import APIRouter, Body, Depends
+
+import scope_cache
+from deps import Session, err, module_gate, perms
+
+router = APIRouter(prefix="/api/v1")
+
+#: The surface these routes serve. Both legs are gated on it, so a user without the grant gets a
+#: 403 rather than an empty table that looks like "you have no customers".
+MODULE = "customer_data"
+
+_CACHE_TTL = 900 # the pool build is slow (Odoo + reconciliation); 15 min, as before
+
+
+def _pool_rows(session: Session):
+ """The reconciled Odoo pool for this session's SCOPE — the slow part, and the only part that
+ may be shared between users.
+
+ ⛔ WHAT MAY BE CACHED HERE, AND WHY THE LINE IS EXACTLY HERE. The cache key is
+ `(team_id, agent)` and the cached value is the raw pool: Odoo-source columns only. That is
+ genuinely scope-shaped — two users with the same BU and the same book are asking the same
+ question, and `cl.pool()` is expensive (an Odoo pull plus reconciliation).
+
+ The FULL PAYLOAD is NOT cacheable on this key, and caching it here was a real defect I shipped
+ and then removed. `fields` comes from `fields_from_workspace(ws)` — that user's own `custom_`
+ and `measure_` columns — and every overlay cell comes from `ws['overlays']`; the table
+ workspace is read as `data[username]` and written as `patch_table_overlay(uname, …)`, i.e.
+ PER USER. So two Royal-only users with no agent link share `(6, None)` and the second one
+ would have been served the FIRST one's private notes and private columns. The scope key was
+ right for the pool and wrong for everything wrapped around it.
+
+ It survived a green 129-check battery because every fixture user had a DISTINCT
+ `(team_id, agent)` pair, so no two of them ever collided on the key — the test set could not
+ express the bug. `verify_api.py` now carries a same-scope second user for exactly this.
+ """
+ rt = session.runtime
+ team_id, agent = _team_agent(session)
+ return _pool_for(rt, team_id, agent)
+
+
+def _pool_for(rt, team_id, agent):
+ """The cached pool for an explicit scope — session-free so the prewarm thread and the
+ stale-refresh path can call it. STALE-WHILE-REFRESH (scope_cache): once a copy exists no
+ request blocks on the 10–30s Odoo rebuild again; only a scope's FIRST-ever build does.
+
+ DEBT-2 (2026-08-04): while the tenant's RESOLVED Odoo source is PAUSED this path never
+ goes live — it serves the in-process copy at any age, else the persisted pause-time
+ snapshot (restart-safe), else answers 503. Never a WIDER scope's snapshot: handing a
+ scoped user the consolidated rows would widen their book, which is worse than an error."""
+ import modules.customer_data as cl
+ import routes_keychain
+
+ key = ("pool", team_id, agent)
+
+ if routes_keychain.odoo_paused(rt):
+ hit = rt.pool_cache.get(key)
+ if hit:
+ return hit[1]
+ snap = routes_keychain.load_pool_snapshot(rt, team_id, agent)
+ if snap is not None:
+ rt.pool_cache[key] = snap # seed, so the memo stamps stay coherent
+ return snap[1]
+ raise err(503, "connector_paused",
+ "this data source is paused and no snapshot exists for your scope — "
+ "an admin can resume it under Settings → Connectors")
+
+ def _build():
+ # ⚠ THE SCOPE GOES INTO THE BUILDER. `pool(agent_name, team_id)` is the same reconciled
+ # builder the Streamlit page uses — passing the scope here is what makes the isolation a
+ # property of the QUERY instead of a filter someone can forget to apply downstream.
+ return cl.pool(agent, team_id)
+
+ def _evict():
+ # Bounded: a scope cache that only ever grows is a memory leak in a shared process.
+ if len(rt.pool_cache) > 16:
+ for stale in sorted(rt.pool_cache, key=lambda k: rt.pool_cache[k][0])[:8]:
+ rt.pool_cache.pop(stale, None)
+
+ return scope_cache.get(rt.pool_cache, key, _CACHE_TTL, _build, _evict)
+
+
+def warm_default(rt):
+ """Boot prewarm: the consolidated pool `(None, None)` — the scope every admin and every
+ all-BU account lands on. Called from main.py's prewarm thread only."""
+ _pool_for(rt, None, None)
+
+
+def _team_agent(session: Session):
+ """The `(team_id, agent)` this session's POOL is built with — ONE derivation point, used by
+ `_pool_rows` and `grid_assembly` alike, so the cache key and the query can never disagree.
+
+ ⛔ WAVE 15 R1: THIS NOW COMES FROM THE PERMANENT FILTER (C-PERM amendment 3). `team_id` is
+ not a row filter — `customer_data._pool_build` passes it into `cust._cust_rev` three times
+ and into `_cadence_bulk`, so it decides what `rev`/`ly`/`ltm`/`aov`/`status` MEAN. Enforcing
+ a BU purely as a post-filter would keep the row list right and silently consolidate every
+ number. So the pushdown survives as a DERIVATION OF the declared filter rather than a second
+ wall beside it, and `perm_scope.derive_pool_scope` falls back to the legacy `bus`/`agent`
+ derivation for any record the migration has not reached yet.
+ """
+ import core.perm_scope as perm_scope
+ return perm_scope.derive_pool_scope(session.user, MODULE)
+
+
+def _pool_stamp(rt, team_id, agent):
+ """The cached pool's build timestamp — the DATA STAMP in every measure-memo key, so a pool
+ refresh invalidates the memoised answers exactly when the underlying rows changed."""
+ entry = rt.pool_cache.get(("pool", team_id, agent))
+ return entry[0] if isinstance(entry, tuple) and entry else 0
+
+
+def _measure_err(tag, e):
+ try:
+ import harness.telemetry as _tel
+ _tel.error(f"api:{tag}", e)
+ except Exception:
+ pass
+
+
+def grid_assembly(session: Session, scope: str = "customer", storage_key: str = "",
+ consume_corrections: bool = True):
+ """ONE assembly of this session's grid state, shared by `/customers`, `/workspace` and the
+ events route (2026-07-31 — the standalone measure gap, owner item 1).
+
+ What it adds over the pre-wave hand-rolled `_payload` loop, and why it replaced it:
+
+ * rows go through `aios_grid.rows_from_pool` — the SAME builder the embedded host uses,
+ so `lat`/`lon` (the Map view's data), `_created` and every derived column ride each row
+ by construction instead of by a second loop that drifts. The hand loop was written to
+ mirror the pre-Map contract and silently dropped the coordinates: the shell's Map view
+ had nothing to plot ("the Map no longer works").
+ * `derived` carries the cohort column's cells AND the measure columns' values, resolved
+ through `core.measure_resolve` (EXIT-5's extraction of the `_cl_measure_*` family).
+ Without them every measure column the owner built rendered BLANK in the shell.
+ * `measures` (the offer) and `measure_sets` (condition answers) are computed here so the
+ events route can finally validate measure fields/conditions instead of refusing them
+ (an empty `measure_offer` made `clean_measure_field` reject every create over HTTP).
+
+ Memos live on the TENANT RUNTIME (`rt.measure_memo` / `rt.mset_memo`) — bounded by the
+ module's own clear-past-cap rule, keyed on (stamp, scope, pool identity, question), nothing
+ user-shaped in them.
+ """
+ import aios_grid
+ from core import grid_events, measure_resolve
+
+ import core.perm_scope as perm_scope
+
+ rt = session.runtime
+ team_id, agent = _team_agent(session)
+ rows_src = _pool_for(rt, team_id, agent)
+ # ⛔ THE ROW WALL, APPLIED BEFORE `pids` IS TAKEN. Everything downstream is bounded by that
+ # frozenset — `allowed_pids` for the workspace, cohort membership, measure resolution — so
+ # scoping here means a row this account may not see never enters ANY of them, rather than
+ # being filtered out of one payload and surviving in another.
+ #
+ # Evaluated against the CANONICAL field list, not the per-user assembled one, for two
+ # reasons: the assembled list is not built yet (it needs `pids`), and a permanent filter may
+ # only ever name a canonical field anyway — `routes_admin._clean_perms` validates it against
+ # exactly this schema and 400s otherwise. `permits()` denies on anything it cannot answer.
+ rows_src = perm_scope.apply_row_scope(rows_src, session.user, MODULE, aios_grid.FIELDS)
+ pids = frozenset(r["pid"] for r in rows_src if r.get("pid") is not None)
+ ws = grid_events.table_workspace(
+ _ctx_for(session, pids), allowed_pids=pids,
+ consume_corrections=consume_corrections)
+ workspace, fields, views, lists = aios_grid.workspace_wire(
+ ws, session.uname, set(pids), defs={}, scope_key=scope, storage_key=storage_key)
+ # THE FIELD WALL — a TRANSITIVE closure (C-PERM amendment 5), so hiding a field also hides
+ # every formula computed FROM it. Formulas evaluate in the browser from `{ref}`s, so
+ # shipping a dependent formula while withholding its input either leaks the input through
+ # the formula's value or silently computes a wrong one; only removing both is coherent.
+ # Applied AFTER workspace_wire because custom + measure columns are what it must cover.
+ hidden = perm_scope.hidden_keys(session.user, MODULE, fields)
+ if hidden:
+ fields = [f for f in fields if f.get("key") not in hidden]
+ # The field LIST and the ROW payload are two different wires. Narrowing only the first
+ # would leave the value sitting in the second, where anything can read it.
+ rows_src = [perm_scope.strip_row(r, hidden) for r in rows_src]
+
+ today = time.strftime("%Y-%m-%d")
+ stamp = _pool_stamp(rt, team_id, agent)
+ measures = measure_resolve.offer(team_id, on_error=_measure_err)
+ measure_sets = measure_resolve.condition_sets(
+ [v.get("config") or {} for v in (views or [])], None, team_id, pids, today, stamp,
+ rt.mset_memo, on_error=_measure_err)
+ # The derived channel: cohort membership cells + measure column values, ONE dict — the
+ # same read-only channel the embed host hands to rows_from_pool.
+ derived = aios_grid.cohort_cells(lists)
+ for pid, cells in measure_resolve.column_values(
+ fields, team_id, pids, today, stamp, rt.measure_memo,
+ on_error=_measure_err).items():
+ derived.setdefault(pid, {}).update(cells)
+
+ return {"rows_src": rows_src, "pids": pids, "ws": ws, "workspace": workspace,
+ "fields": fields, "views": views, "lists": lists, "derived": derived,
+ "measures": measures, "measure_sets": measure_sets, "today": today,
+ "team_id": team_id}
+
+
+def _payload(session: Session):
+ """`{fields, rows, today, pulled_at}` — X2's shape, which `verify_fields_contract.py`
+ referees. Rows are now built by `aios_grid.rows_from_pool` (embed == standalone by
+ construction); see `grid_assembly` for what that fixed.
+
+ ⚠ `rows_src` is the SHARED cached list — `rows_from_pool` reads it and builds NEW dicts,
+ never mutating a cached row (the same-scope-second-user leak rule).
+ """
+ import aios_grid
+
+ g = grid_assembly(session)
+ rows = aios_grid.rows_from_pool(
+ g["rows_src"], g["fields"], g["ws"].get("overlays"), derived=g["derived"])
+ return {"fields": g["fields"], "rows": rows,
+ # `today` rides the payload because every relative date condition must resolve against
+ # the TENANT's day, never the browser's — a client that falls back to its own clock
+ # disagrees with the server for everyone west of it.
+ "today": g["today"],
+ "pulled_at": time.strftime("%Y-%m-%d %H:%M")}
+
+
+def _ctx_for(session: Session, pids):
+ """An EventCtx for the READ path — no fallback workspace, so a store outage is a 503 rather
+ than a phantom in-memory workspace an API request cannot persist."""
+ from core import grid_events
+ return grid_events.EventCtx(
+ uname=session.uname, allowed_pids=frozenset(pids or ()), fields=[],
+ # C-PERM: the write wall's field half. Computed from the CANONICAL contract because
+ # `fields=[]` here — the closure only needs the schema, not this user's column list.
+ hidden_keys=_hidden_for(session),
+ admin=session.admin, fallback_ws=None, seen_ids={})
+
+
+
+def _hidden_for(session: Session):
+ """The fields this session's permissions hide — the write wall's half of C-PERM.
+
+ Read paths strip these from both wires so they cannot be SEEN; this is what stops them
+ being WRITTEN by a caller who knows the key. Evaluated against the canonical contract, the
+ same schema `routes_admin._clean_perms` validates a hiddenFields entry against.
+ """
+ import aios_grid
+ import core.perm_scope as perm_scope
+
+ return perm_scope.hidden_keys(session.user, MODULE, aios_grid.FIELDS)
+
+def allowed_pids(session: Session):
+ """The pids this session may touch — the POOL's own ids, so the write wall and the read scope
+ can never disagree.
+
+ Reads `_pool_rows` rather than `_payload`: the wall only needs identities, and going through
+ the full payload would pay for a workspace read and a row assembly on every write.
+
+ ⛔ THE PERMANENT FILTER APPLIES HERE TOO, AND FORGETTING IT IS A WRITE-WITHOUT-READ HOLE.
+ `_pool_rows` is built with the DERIVED pushdown, which expresses only what a `(team_id,
+ agent)` pair can express. Any part of the wall the pushdown cannot carry — `revenue > 1000`,
+ a nested group, a condition on any other column — leaves the pool WIDER than the filter. Read
+ paths close that gap with `apply_row_scope`; without the same call here the write wall would
+ be the wider set, and a restricted user could PATCH a row this API will not show them.
+ Same function, same order as `grid_assembly`, so the two walls cannot drift.
+ """
+ import core.perm_scope as perm_scope
+ import aios_grid
+
+ rows = perm_scope.apply_row_scope(_pool_rows(session), session.user, MODULE,
+ aios_grid.FIELDS)
+ return frozenset(r["pid"] for r in rows if r.get("pid") is not None)
+
+
+@router.get("/customers")
+def customers(session: Session = Depends(module_gate(MODULE))):
+ return _payload(session)
+
+
+@router.patch("/customers/{pid}")
+def patch_customer(pid: int, body: dict = Body(default=None),
+ session: Session = Depends(module_gate(MODULE))):
+ """Write the EDITABLE overlay stratum only — Odoo stays read-only, forever.
+
+ Routed through `core.grid_events.handle_one` as an `overlay_patch` event rather than writing
+ the store directly: that handler is where the per-key `permissions.edit` wall, the pid wall
+ and the truncation rules live, and a second implementation of those would be a second set of
+ them to keep in step. The response reports what was ACCEPTED, which is not always what was
+ asked for.
+ """
+ from core import grid_events
+
+ updates = dict(body or {})
+ if not updates:
+ raise err(400, "empty_patch", "no fields to update")
+ pool = allowed_pids(session)
+ if pid not in pool:
+ # 403, not 404: the pid may well exist — it is simply not in this session's book, and
+ # saying "no such customer" would confirm the opposite to anyone who guessed right.
+ raise err(403, "out_of_scope", "that customer is not in your book")
+ payload = _payload(session)
+ ctx = grid_events.EventCtx(
+ uname=session.uname, allowed_pids=pool, fields=payload["fields"],
+ admin=session.admin, fallback_ws=None, seen_ids={},
+ hidden_keys=_hidden_for(session))
+ try:
+ grid_events.handle_one(
+ {"id": f"patch:{pid}:{time.time_ns()}", "type": "overlay_patch",
+ "pid": pid, "updates": updates}, ctx)
+ except grid_events.StoreUnavailable:
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — your change was not saved")
+
+ # What actually landed, read back from the store rather than echoed from the request: a
+ # refused key or a truncated value must not be reported as accepted.
+ stored = (grid_events.table_workspace(_ctx_for(session, pool), allowed_pids=None)
+ .get("overlays") or {}).get(str(pid)) or {}
+ accepted = {k: stored.get(k) for k in updates if k in stored}
+ refused = sorted(k for k in updates if k not in accepted or stored.get(k) != str(updates[k]))
+ # No cache to patch: the overlay stratum is re-read from the store on every `_payload`, so
+ # read-your-writes within this runtime is a property of the design rather than of a
+ # write-through step somebody has to remember. (It was a write-through step while the whole
+ # payload was cached on a scope key — the arrangement that leaked one user's notes to
+ # another. See `_pool_rows`.) Cross-RUNTIME coherence is still not claimed: the module
+ # docstring says why, and Postgres is the fix.
+ out = {"ok": True, "pid": pid, "updates": accepted}
+ if refused:
+ out["refused"] = refused
+ return out
diff --git a/api/routes_grid.py b/api/routes_grid.py
new file mode 100644
index 0000000000000000000000000000000000000000..f322e0121c49a7c4e7c7f086e6a4e5a7710cea1a
--- /dev/null
+++ b/api/routes_grid.py
@@ -0,0 +1,805 @@
+"""routes_grid.py — X2's write seam over HTTP: the SECOND adapter on `core.grid_events` (EXIT-1c).
+
+`POST /api/v1/grid/events` takes the component's event objects VERBATIM — the same objects the
+Streamlit host receives through the component value slot, unchanged — and runs them through the
+same `core.grid_events.handle_events` the Streamlit adapter runs. That is the whole point of
+EXIT-1a: one implementation of every permission wall, two transports. A route that re-validated
+anything here would be a second wall to keep in step, and the two would drift on the first change.
+
+DEDUP IS PER REQUEST, and that is a deliberate limit, not an oversight. The Streamlit adapter's
+`seen_ids` lives in `st.session_state` — genuinely per user session — because the client resends
+its recent 24-event window on every emit inside one page session. A stateless API has no such
+dict, and inventing a per-user server-side one would be exactly the resident per-tenant state
+EXIT-4a exists to remove. So: ids are deduped WITHIN a request body (the resend window's whole
+purpose — a batch that repeats an id processes it once), and a genuinely replayed request is
+handled by the operations being idempotent. The one event where a replay is observable is
+`add_to_list` (it would add the same pids to the same cohort twice — a set union, so the
+membership is unchanged, but the toast count repeats). Noted rather than papered over; a
+server-side idempotency key belongs with D2's session mirror (C-2).
+
+STORE DOWN = 503. `fallback_ws` is None on this adapter, so `core.grid_events` raises
+`StoreUnavailable` rather than writing to an in-memory workspace no API request could ever read
+back. A 200 over a write that evaporated is the failure this rule exists to prevent.
+"""
+import datetime as dt
+import time
+
+from fastapi import APIRouter, Body, Depends
+
+from deps import Session, err, module_gate, perms
+
+router = APIRouter(prefix="/api/v1")
+
+MODULE = "customer_data"
+
+#: The client's own resend window (`app.py`'s `[-24:]`). A body larger than this is not a
+#: legitimate client — refuse it rather than doing 500 store writes on one request.
+_MAX_EVENTS = 24
+
+
+def _ctx(session: Session, fields, pids, **kw):
+ from core import grid_events
+ import aios_grid
+ import core.perm_scope as perm_scope
+
+ # Wave 16 C-TOPIC: the ctx is TOPIC-SHAPED. The product scope swaps all three of the
+ # things a write is validated against — the module the permission wall reads, the canonical
+ # contract the hidden-field closure runs over, and the TABLE OPS the write lands in.
+ # Getting any one of them from the other topic is the "validated against the wrong field
+ # contract" near-miss the wave-15 routes_products header warned about.
+ scope_key = str(kw.get("scope_key") or "")
+ if scope_key == "product":
+ import modules.product_data as pd
+ from routes_products import MODULE as _PMOD, pd_fields
+
+ module, canonical = _PMOD, pd_fields(consolidated=True)
+ kw.setdefault("table", pd.TABLE_OPS)
+ hidden = perm_scope.hidden_keys(session.user, module, canonical)
+ elif scope_key.startswith("ut_"):
+ # Wave 18 C3-UT: a user table has no module in the permission wall (its wall is
+ # `user_tables.may_open`, already applied by the assembly this route ran first), so
+ # the hidden-field closure is EMPTY rather than borrowed from another topic's contract.
+ import core.table_store as table_store
+
+ kw.setdefault("table",
+ table_store.make(f"{scope_key}_table_workspace", st=session.runtime))
+ hidden = frozenset()
+ else:
+ module, canonical = MODULE, aios_grid.FIELDS
+ hidden = perm_scope.hidden_keys(session.user, module, canonical)
+ return grid_events.EventCtx(
+ uname=session.uname, allowed_pids=pids, fields=fields, admin=session.admin,
+ # C-PERM: the write wall's field half, on the EVENTS transport too. This route takes the
+ # component's event objects verbatim, so a hidden key would otherwise arrive here with
+ # nothing between it and the store.
+ hidden_keys=hidden,
+ fallback_ws=None, seen_ids={}, **kw)
+
+
+#: The surfaces the ONE grid serves. `cohort` is the same table over hand-curated SETS rather
+#: than over the whole scoped pool — `app.py:page_cohort` calls the same `_table_grid` with
+#: `cohort_mode=True, scope_key='cohort'`. `product` (wave 16 C-TOPIC) is the SKU table:
+#: same engine, its own pool, field contract and workspace BUCKET (routes_products).
+_SCOPES = ("customer", "cohort", "product")
+
+
+def _scope_or_400(raw):
+ """⛔ REFUSE AN UNKNOWN SCOPE, never default it. A typo silently served as `customer` would
+ hand a user the whole book on a page they opened to see one cohort — the widening direction,
+ which is the one that must fail closed.
+
+ Wave 18 (C3-UT): a `ut_`-prefixed scope names a USER TABLE and passes through here —
+ existence and the per-table wall are enforced by `routes_tables.ut_assembly` (404/403),
+ which every consumer of such a scope goes through. Passing an unknown ut key therefore
+ still fails closed, just one layer down where the store can actually be consulted."""
+ scope = (raw or "customer").strip().lower()
+ if scope.startswith("ut_"):
+ return scope
+ if scope not in _SCOPES:
+ raise err(400, "bad_scope",
+ f"scope must be one of {', '.join(_SCOPES)} — refusing to guess")
+ return scope
+
+
+@router.get("/workspace")
+def workspace(scope: str = "customer",
+ session: Session = Depends(module_gate(MODULE))):
+ """The durable table workspace for this session: views, fields, overlays, folders.
+
+ ⚠ WHY THIS EXISTS (S1↔S2, 2026-07-30 — an X2 AMENDMENT, see the split doc). X2 fixes
+ `/customers` at the exact shape `verify_fields_contract.py` referees, so the workspace cannot
+ ride along in it without forking the thing that gate keeps single-sourced. Without a
+ workspace route the standalone shell's write path would be WRITE-ONLY: events persist
+ server-side and nothing reads them back on reload, so a saved view looks lost to the user
+ even though the store has it. This route closes that read-back gap at its own URL.
+
+ `allowed_pids` is passed so a SHARED view's `memberPids` are re-scoped to THIS reader — the
+ wave-9 leak rule. Omitting it would hand a Fisch-scoped user a member list built by a
+ full-access user.
+ """
+ from core import grid_events
+ from routes_customers import grid_assembly
+
+ scope = _scope_or_400(scope)
+ # ── Wave 18 C3-UT: a USER TABLE'S workspace — the third topic through the one wire. The
+ # storage key has no (bu, agent) because a user table has no Odoo scope; per-user by the
+ # table's own wall (creator or admin, `user_tables.may_open`).
+ if scope.startswith("ut_"):
+ from routes_tables import ut_assembly
+
+ storage_key = f"{session.tenant}:{scope}:{session.uname}"
+ try:
+ g = ut_assembly(session, scope, storage_key=storage_key)
+ except grid_events.StoreUnavailable:
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ workspace = g["workspace"]
+ workspace["overlays"] = g["ws"].get("overlays") or {}
+ # The field contract rides the cheap re-read on EVERY topic — see the customer branch
+ # below for why (a user table's first cohort changes its contract too: `_cohorts(ctx)`
+ # is scope-parameterized, so `ut_` surfaces have their own sets).
+ workspace["fields"] = g["fields"]
+ workspace["measures"] = g["measures"]
+ workspace["measureSets"] = g["measure_sets"]
+ # ⚠ `g["derived"]`, NOT `{}` (2026-08-04). R9 gave every topic its own cohort sets, and
+ # `ut_assembly` has been building this topic's cohort CELLS since — but this route threw
+ # them away, so the Locked-views column arrived on the cheap re-read with permanently
+ # empty values. A column that exists and can never have one is worse than an absent
+ # column: it reads as "this record is in no locked view", which is a claim.
+ workspace["derived"] = {str(pid): cells for pid, cells in (g["derived"] or {}).items()}
+ workspace["viewer"] = {"name": session.uname, "isAdmin": bool(session.admin)}
+ try:
+ from core import users as _users
+ workspace["userOptions"] = _users.assignable_people(tenant=session.tenant)
+ workspace["userAvatars"] = {k: v for k, v in
+ _users.avatar_map(tenant=session.tenant).items()
+ if str(v).startswith("data:image/")}
+ except Exception:
+ workspace["userOptions"] = []
+ workspace["userAvatars"] = {}
+ workspace["scopeKey"] = scope
+ return {"workspace": workspace}
+
+ # ── Wave 16 C-TOPIC: the PRODUCT surface has its own assembly (own pool, own field
+ # contract, own workspace BUCKET) and the contract's own storage key. It branches before
+ # the customer derivation because the customer storage key embeds (bu, agent) while the
+ # product one is deliberately `all:all` — one product workspace per user (the wave doc's
+ # C-TOPIC line), since BU narrows the product VALUES, not which workspace you own.
+ if scope == "product":
+ from routes_products import MODULE as PRODUCT_MODULE, product_assembly
+
+ # ⛔ THE GATE CHANGES WITH THE SCOPE. This route's dependency asserts the CUSTOMER
+ # grant; a caller asking for the product surface must hold the PRODUCT grant too, or a
+ # customer-only account could read product workspaces through this one door.
+ session.require(PRODUCT_MODULE)
+ storage_key = f"{session.tenant}:product-list:{session.uname}:all:all"
+ try:
+ g = product_assembly(session, scope=scope, storage_key=storage_key)
+ except grid_events.StoreUnavailable:
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ workspace = g["workspace"]
+ workspace["overlays"] = g["ws"].get("overlays") or {}
+ # R9 made cohorts per-topic, so the PRODUCT surface has its own sets and its own
+ # first-cohort contract change. Same reason as the customer branch below.
+ workspace["fields"] = g["fields"]
+ # The measure channel is EMPTY on this topic (customer-grain descope) — stated
+ # explicitly so the client's pickers grey rather than guess.
+ workspace["measures"] = g["measures"]
+ workspace["measureSets"] = g["measure_sets"]
+ # `g["derived"]` — the same correction as the user-table branch above, for the same
+ # reason: `product_assembly` builds this topic's cohort cells and this route discarded
+ # them. The measure half stays empty on this topic by descope, which is a different
+ # statement and one the offer already makes.
+ workspace["derived"] = {str(pid): cells for pid, cells in (g["derived"] or {}).items()}
+ workspace["viewer"] = {"name": session.uname, "isAdmin": bool(session.admin)}
+ try:
+ from core import users as _users
+ workspace["userOptions"] = _users.assignable_people(tenant=session.tenant)
+ workspace["userAvatars"] = {k: v for k, v in
+ _users.avatar_map(tenant=session.tenant).items()
+ if str(v).startswith("data:image/")}
+ except Exception:
+ workspace["userOptions"] = []
+ workspace["userAvatars"] = {}
+ workspace["scopeKey"] = scope
+ return {"workspace": workspace}
+
+ # The storage key mirrors the host's own convention byte-for-byte (app.py's `_table_grid`
+ # call sites) with the session's TENANT in the host's hardcoded slot, so localStorage state
+ # carries across embed ⇄ standalone on the same browser.
+ # Wave 15 R1 — the SAME derivation the pool uses (`routes_customers._team_agent`), so the
+ # storage key cannot drift from the scope it names. Value-identical for every migrated
+ # record (verify_perm_scope section D proves the derivation reproduces the legacy scope
+ # exactly), so nobody's saved localStorage state moves when the migration runs.
+ import core.perm_scope as perm_scope
+ team_id, agent = perm_scope.derive_pool_scope(session.user, MODULE)
+ bu = team_id if team_id is not None else "all"
+ if scope == "cohort":
+ storage_key = f"{session.tenant}:cohort:{session.uname}:{bu}"
+ else:
+ storage_key = f"{session.tenant}:customer-list:{session.uname}:{bu}:{agent or 'all'}"
+
+ # ⛔ THE WIRE SHAPE IS THE SHARED PROJECTION (`aios_grid.workspace_wire`), not the store
+ # shape. The first version returned the store dict with no `storageKey` — and the client
+ # validator requires one, so the standalone shell DISCARDED the whole workspace: saved views
+ # never rendered, `cohortMode` never arrived, and the Cohort route silently drew the Customer
+ # surface. One projection for both servers is the fix that cannot drift.
+ try:
+ g = grid_assembly(session, scope=scope, storage_key=storage_key)
+ except grid_events.StoreUnavailable:
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ workspace = g["workspace"]
+ # ADDITIVE to the wire: the caller's own overlay cells. The grid reads overlays from the
+ # /customers rows, but this route is the cheap read-back a write can be verified against
+ # (verify_api's overlay probe) without paying the pool call. Per-user by construction —
+ # `table_workspace` is this session's workspace.
+ workspace["overlays"] = g["ws"].get("overlays") or {}
+ # ⭐ THE FIELD CONTRACT, 2026-08-04 — and it is NOT decoration.
+ #
+ # `fields_from_workspace(ws, cohorts=bool(cohort_lists))` appends the derived "Locked
+ # views" column ONLY when the caller owns at least one cohort. So a user's FIRST cohort
+ # CHANGES THE FIELD CONTRACT — and the rows call that used to be the only carrier of
+ # `fields` is deliberately never re-fetched on a write (it is a 15-minute-cached Odoo
+ # pull; this route is the cheap re-read). The client therefore had no way to learn about
+ # that column short of a remount, which is the second half of the owner's "it only shows
+ # up when I switch modules and come back".
+ #
+ # ⚠ `g["fields"]` is the SAME list `_payload` serves on `/customers` — same assembly,
+ # same permission wall (`hidden_keys` already applied) — so the two wires cannot disagree
+ # about what a column is. Taking it from anywhere else would fork the contract that
+ # verify_fields_contract.py exists to keep single-sourced.
+ workspace["fields"] = g["fields"]
+ # ── the STANDALONE measure channel (owner item 1, 2026-07-31) ────────────────────────────
+ # The embed receives these as top-level render args; standalone lifts them off THIS route
+ # (useCustomerData merges them into the payload slots the grid already reads). They ride
+ # the workspace rather than /customers because a durable write re-reads exactly this route
+ # (WORKSPACE_STALE), so a new measure column populates without refetching the heavy pool.
+ workspace["measures"] = g["measures"]
+ workspace["measureSets"] = g["measure_sets"]
+ # Derived cells (cohort column + measure columns), keyed by pid. JSON object keys are
+ # strings; the client indexes with String(pid).
+ workspace["derived"] = {str(pid): cells for pid, cells in g["derived"].items()}
+ # Who is looking (permissions verdicts) + the assignee choices for `user`-typed columns —
+ # the two other host-only render args the shell was missing (fail-closed without them:
+ # restricted fields uneditable, assignee picker empty).
+ workspace["viewer"] = {"name": session.uname, "isAdmin": bool(session.admin)}
+ try:
+ from core import users as _users
+ workspace["userOptions"] = _users.assignable_people(tenant=session.tenant)
+ # Wave 14 C-AVATAR — the options vocabulary's companion: display name -> data URL.
+ # Absent entries fall back to the client's initials disc; a non-data: value is
+ # dropped (defence in depth beside the write-side wall in routes_auth).
+ workspace["userAvatars"] = {k: v for k, v in
+ _users.avatar_map(tenant=session.tenant).items()
+ if str(v).startswith("data:image/")}
+ except Exception:
+ workspace["userOptions"] = []
+ workspace["userAvatars"] = {}
+
+ # THE SURFACE STAMP — a MIRROR of the host's own (`_table_grid`'s hide/cohort stamps).
+ # ⚠ Deliberately NOT `hideViews`: `cohortMode` is what swaps the Views panel for the cohort
+ # list, and two switches for one behaviour would drift.
+ workspace["scopeKey"] = scope
+ if scope == "cohort":
+ workspace["cohortMode"] = True
+ # The create pane offers "this cohort table only" (default) vs "all customer tables".
+ workspace["scopeChoice"] = True
+ return {"workspace": workspace}
+
+
+# ─────────────────────────────────────────────── the TIME-SERIES channel (C-TS, 2026-08-02)
+_TS_BUCKETS = ("week", "month", "quarter", "year")
+_TS_MAX_BUCKETS = 120
+_TS_MAX_FIELDS = 12
+_TS_MAX_PIDS = 5000
+_TS_MAX_LAST_N = 120
+#: C-TSWIN (wave 14): sliding windows cost ONE aggregate query per (metric, bucket) — the
+#: price of "bucket N == the grid cell at bucket N's end". The product cap keeps a legal
+#: 120-bucket × 12-metric ask from becoming 1,440 queries in one request; typical panels
+#: (12 × 3) sit two orders of magnitude under it. Dated amendment in the split doc.
+_TS_MAX_CELLS = 720
+
+
+def _ts_start_of(bucket, d):
+ """The calendar START of the bucket holding `d` (week = Monday, the vocabulary rule)."""
+ if bucket == "week":
+ return d - dt.timedelta(days=d.weekday())
+ if bucket == "month":
+ return d.replace(day=1)
+ if bucket == "quarter":
+ return d.replace(month=((d.month - 1) // 3) * 3 + 1, day=1)
+ return d.replace(month=1, day=1)
+
+
+def _ts_next(bucket, d):
+ if bucket == "week":
+ return d + dt.timedelta(days=7)
+ if bucket == "year":
+ return d.replace(year=d.year + 1)
+ step = 1 if bucket == "month" else 3
+ m = d.month + step
+ return dt.date(d.year + (m - 1) // 12, (m - 1) % 12 + 1, 1)
+
+
+def _ts_prev(bucket, d):
+ if bucket == "week":
+ return d - dt.timedelta(days=7)
+ if bucket == "year":
+ return d.replace(year=d.year - 1)
+ step = 1 if bucket == "month" else 3
+ y, m = d.year, d.month - step
+ while m < 1:
+ m += 12
+ y -= 1
+ return dt.date(y, m, 1)
+
+
+def _ts_label(bucket, start):
+ if bucket == "week":
+ return f"Wk of {start.strftime('%b %d')}"
+ if bucket == "month":
+ return start.strftime("%b %Y")
+ if bucket == "quarter":
+ return f"Q{(start.month - 1) // 3 + 1} {start.year}"
+ return str(start.year)
+
+
+@router.post("/grid/timeseries")
+def grid_timeseries(body: dict = Body(default=None), scope: str = "customer",
+ session: Session = Depends(module_gate(MODULE))):
+ """Pooled measure values per calendar bucket — the time-series view's data channel.
+
+ C-TSWIN (wave 14, ruling R1): AS-OF semantics. Each metric's OWN stored window is
+ re-resolved per bucket with `today := min(bucket end, real today)` — `ytd` is cumulative
+ from Jan 1, `last_90_days` trailing, `all_time` cumulative ever; bucket N equals what the
+ grid's measure column would show if today were bucket N's end. Fixed-range (`custom`)
+ windows cannot slide and are dropped per field as `window_fixed`. Rows carry
+ `window: {kind, label}` so a cumulative row cannot be misread as periodic, and there is
+ NO `total` column — sliding windows overlap, so a sum of columns would double-count.
+
+ The client sends the pids its view currently matches (the filter IS the scope); the server
+ intersects them with the session's book, so the request can only ever NARROW. Values are
+ POOLED aggregates computed by the semantic layer's own expression (the additivity law: an
+ average is computed at pool grain, never averaged over per-customer answers). A bucket
+ with no rows is 0 for a sum/count and null for anything else; a bucket that has not
+ STARTED yet is null for every kind — an unstarted period's YTD is unanswered, not 0.
+ """
+ from core import measure_resolve
+ from harness import windows as _wn
+ from routes_customers import _pool_stamp, _team_agent, allowed_pids
+
+ # Wave 16 C-TOPIC: the channel is CUSTOMER-GRAIN (measure_resolve's own grain), so the
+ # product surface is refused in words rather than answered with an id-space accident —
+ # product pids are CRC32 hashes and would mostly fall outside the customer book anyway,
+ # but "mostly" is not a wall. The client hides the mode for this topic; this is the
+ # server's half of the same refusal.
+ _sc = _scope_or_400(scope)
+ if _sc == "product" or _sc.startswith("ut_"):
+ raise err(400, "bad_timeseries",
+ "this surface has no time-series channel — measures are customer-grain")
+
+ body = body or {}
+ bucket = body.get("bucket")
+ if bucket not in _TS_BUCKETS:
+ raise err(400, "bad_timeseries", "bucket must be one of week, month, quarter, year")
+ raw_fields = body.get("fields")
+ if not isinstance(raw_fields, list) or not raw_fields:
+ raise err(400, "bad_timeseries", "fields must be a non-empty list of field keys")
+ if len(raw_fields) > _TS_MAX_FIELDS:
+ raise err(400, "bad_timeseries", f"at most {_TS_MAX_FIELDS} fields per request")
+ raw_pids = body.get("pids")
+ if not isinstance(raw_pids, list) or not raw_pids:
+ raise err(400, "bad_timeseries", "pids must be a non-empty list")
+ if len(raw_pids) > _TS_MAX_PIDS:
+ raise err(400, "bad_timeseries", f"at most {_TS_MAX_PIDS} pids per request")
+ try:
+ wanted = {int(p) for p in raw_pids}
+ except (TypeError, ValueError):
+ raise err(400, "bad_timeseries", "pids must be integers")
+ pool = wanted & {int(p) for p in allowed_pids(session)}
+ if not pool:
+ # 403, not an empty 200: the caller asked about customers outside their book, and an
+ # all-zero series over nobody would read as "no activity", not "not yours".
+ raise err(403, "out_of_scope", "none of those customers are in your book")
+
+ span = body.get("span")
+ if not isinstance(span, dict):
+ raise err(400, "bad_timeseries", "span must be {'lastN': n} or {'from': .., 'to': ..}")
+ today = time.strftime("%Y-%m-%d")
+ t = dt.date.fromisoformat(today)
+ n = span.get("lastN")
+ starts = []
+ if n is not None:
+ if not isinstance(n, int) or isinstance(n, bool) or not (1 <= n <= _TS_MAX_LAST_N):
+ raise err(400, "bad_timeseries", f"lastN must be 1..{_TS_MAX_LAST_N}")
+ cur = _ts_start_of(bucket, t)
+ starts = [cur]
+ for _ in range(n - 1):
+ cur = _ts_prev(bucket, cur)
+ starts.append(cur)
+ starts.reverse()
+ else:
+ try:
+ d_from = dt.date.fromisoformat(str(span.get("from")))
+ d_to = dt.date.fromisoformat(str(span.get("to")))
+ except (TypeError, ValueError):
+ raise err(400, "bad_timeseries", "span.from/to must be ISO dates (YYYY-MM-DD)")
+ if d_from > d_to:
+ d_from, d_to = d_to, d_from
+ cur = _ts_start_of(bucket, d_from)
+ while cur <= d_to:
+ starts.append(cur)
+ if len(starts) > _TS_MAX_BUCKETS:
+ raise err(400, "bad_timeseries",
+ f"that span is more than {_TS_MAX_BUCKETS} {bucket} buckets - "
+ f"narrow it")
+ cur = _ts_next(bucket, cur)
+ if not starts:
+ raise err(400, "bad_timeseries", "the span holds no buckets")
+ ends = [_ts_next(bucket, s) - dt.timedelta(days=1) for s in starts]
+
+ rt = session.runtime
+ if not rt.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ import modules.customer_data as cl_mod
+ # Read-only route: it must not consume a one-shot label-correction ack the browser has
+ # not seen yet (the same rule event validation follows).
+ ws = cl_mod.table_workspace(session.uname, consume_corrections=False)
+ fdefs = ws.get("fields") or {}
+ keys, dropped, seen = [], [], set()
+ for k in raw_fields:
+ k = str(k or "")
+ if not k or k in seen:
+ continue
+ seen.add(k)
+ fd = fdefs.get(k)
+ if not isinstance(fd, dict) or not isinstance(fd.get("measure"), dict):
+ # Named, never silent: v1 eligibility is measure-backed fields only (C-TS).
+ dropped.append({"field": k, "reason": "not_a_measure_field"})
+ continue
+ keys.append(k)
+ # ⚡ WAVE 17 R9 (amendment 2026-08-03, GRID's cross-fence ask) — A SHEET WITH NO MEASURE
+ # FIELDS IS NO LONGER A 400. It answers with the BUCKET GRID and no rows.
+ #
+ # Why this is the honest direction and not a loosening: the bucket starts and their labels
+ # are SERVER math (`_ts_start_of` / `_ts_next` / `_ts_label`), and R9 has the client
+ # synthesizing snapshot rows for preset columns that have no window to slide. Those rows
+ # must be painted under the SAME headings as everything else, so the client needs the
+ # columns even when the server has no series to put in them. Refusing the whole request
+ # meant the panel could offer nothing at all on this tenant — the shipped contract has zero
+ # measure-backed presets (`aios_grid.py`: "this branch is currently MEMBERLESS"), which is
+ # what item 5 is actually about.
+ #
+ # Nothing is invented by this: `rows` is empty and `meta.dropped` NAMES every field and why.
+ # A 400 is still returned for a request that is malformed (bad bucket, bad span, no fields
+ # at all) — this only stops treating "I asked about columns you cannot serve" as an error.
+ mfields, slid_keys = [], []
+ for k in keys:
+ m = dict(fdefs[k]["measure"])
+ if (m.get("window") or {}).get("kind") == "custom":
+ # C-TSWIN: a fixed date range cannot slide across buckets — named, never silent,
+ # the same posture as not_a_measure_field.
+ dropped.append({"field": k, "reason": "window_fixed"})
+ continue
+ mfields.append({"key": k, "measure": m})
+ slid_keys.append(k)
+ # Same amendment as above: every metric being fixed-range is a sheet with no SERIES, not a
+ # broken request. The columns still stand, and `window_fixed` still names each refusal.
+ if len(starts) * len(mfields) > _TS_MAX_CELLS:
+ raise err(400, "bad_timeseries",
+ "that ask is too wide - narrow the span or pick fewer metrics")
+
+ team_id, agent = _team_agent(session)
+ stamp = _pool_stamp(rt, team_id, agent)
+ problems = []
+ bucket_bounds = [(s.isoformat(), e.isoformat()) for s, e in zip(starts, ends)]
+ # No slidable metrics = nothing to resolve. Skipping the call rather than asking the
+ # resolver about an empty list keeps the memo free of a meaningless key.
+ answers = measure_resolve.series_values(
+ mfields, bucket, bucket_bounds,
+ team_id, frozenset(pool), today, stamp, rt.series_memo,
+ on_error=lambda tag, e: problems.append(str(e)[:200])) if mfields else {}
+
+ columns = []
+ for s, e in zip(starts, ends):
+ col = {"key": s.isoformat(), "label": _ts_label(bucket, s),
+ "from": s.isoformat(), "to": e.isoformat()}
+ if e > t:
+ col["partial"] = True
+ columns.append(col)
+ rows = []
+ for k in slid_keys:
+ ans = answers.get(k)
+ if ans is None:
+ dropped.append({"field": k, "reason": "unresolvable"})
+ continue
+ vals_by = ans.get("values") or {}
+ agg_kind = str(ans.get("agg") or "sum")
+ zero_fill = agg_kind in ("sum", "count")
+ vals = []
+ for s in starts:
+ if s > t:
+ # C-TSWIN: an unstarted period is unanswered for EVERY agg kind — a future
+ # month's YTD zero-filled to 0 would read as "the year reset".
+ vals.append(None)
+ else:
+ vals.append(vals_by.get(s.isoformat(), 0 if zero_fill else None))
+ wspec = (fdefs[k].get("measure") or {}).get("window")
+ wnorm = _wn.normalize(wspec) or {}
+ rows.append({"field": k, "label": str(fdefs[k].get("label") or k)[:120],
+ "agg": agg_kind, "values": vals,
+ "window": {"kind": str(wnorm.get("kind") or ""),
+ "label": _wn.label(wspec)}})
+ meta = {"pool": len(pool), "today": today, "bucket": bucket}
+ if dropped:
+ meta["dropped"] = dropped
+ if problems:
+ meta["problems"] = problems[:5]
+ return {"columns": columns, "rows": rows, "meta": meta}
+
+
+#: C-CAL caps (wave 17, owner item 9 / ruling R4). A month of days, a handful of metrics.
+#: Every one of these is a 400 WITH ITS REASON, never a silent trim: a calendar that quietly
+#: answered 20 of the 31 days asked about would paint eleven blank cells that look like days
+#: with no activity.
+_CAL_MAX_GROUPS = 31
+_CAL_MAX_FIELDS = 6
+_CAL_MAX_CELLS = 186
+
+
+@router.post("/grid/calendar_metrics")
+def grid_calendar_metrics(body: dict = Body(default=None), scope: str = "customer",
+ session: Session = Depends(module_gate(MODULE))):
+ """Per-DAY measure values with each metric's own window slid to that day (C-CAL / R4).
+
+ ⛔ WHY THIS EXISTS AT ALL. The calendar's summary cells used to aggregate the row VALUES the
+ grid already held — which for a measure column means "every member's YTD **as of today**",
+ summed and printed under a date in March. The number was arithmetically fine and semantically
+ a lie: it answered a question about today while sitting in a cell labelled with another day.
+ R4: a metric in a day cell is computed AS OF THAT DAY.
+
+ The shape differs from the time-series channel in exactly one way, and it is the reason this
+ is a separate route rather than a parameter: **every group carries its OWN pid set**. A
+ calendar day holds the records the date field placed there, so day-to-day the subject
+ changes. One `allowed_pids` for the whole request — the TS channel's shape — would compute
+ each day over everybody, which is a different question again.
+
+ Static (non-measure) fields are NOT served here. They have no window to slide, so the
+ client's own per-day aggregation over row values stays correct for them; sending them would
+ invite a second implementation of arithmetic that already works.
+ """
+ from core import measure_resolve
+ from harness import windows as _wn
+ from routes_customers import _pool_stamp, _team_agent, allowed_pids
+
+ # The same refusal the TS channel makes, for the same reason: measures are customer-grain
+ # and product pids are CRC32 hashes of SKU codes. "Mostly outside the book" is not a wall.
+ _sc_cal = _scope_or_400(scope)
+ if _sc_cal == "product" or _sc_cal.startswith("ut_"):
+ raise err(400, "bad_calendar_metrics",
+ "the product surface has no measure channel yet — measures are customer-grain")
+
+ body = body or {}
+ raw_groups = body.get("groups")
+ if not isinstance(raw_groups, list) or not raw_groups:
+ raise err(400, "bad_calendar_metrics",
+ "groups must be a non-empty list of {key: 'YYYY-MM-DD', pids: [...]}")
+ if len(raw_groups) > _CAL_MAX_GROUPS:
+ raise err(400, "bad_calendar_metrics",
+ f"at most {_CAL_MAX_GROUPS} days per request (one month)")
+ raw_fields = body.get("fields")
+ if not isinstance(raw_fields, list) or not raw_fields:
+ raise err(400, "bad_calendar_metrics", "fields must be a non-empty list of field keys")
+ if len(raw_fields) > _CAL_MAX_FIELDS:
+ raise err(400, "bad_calendar_metrics", f"at most {_CAL_MAX_FIELDS} metrics per request")
+ if len(raw_groups) * len(raw_fields) > _CAL_MAX_CELLS:
+ raise err(400, "bad_calendar_metrics",
+ "that ask is too wide - fewer days or fewer metrics")
+
+ book = {int(p) for p in allowed_pids(session)}
+ groups, seen_days = [], set()
+ for g in raw_groups:
+ if not isinstance(g, dict):
+ raise err(400, "bad_calendar_metrics", "every group must be an object")
+ day = str(g.get("key") or "")
+ try:
+ d = dt.date.fromisoformat(day)
+ except (TypeError, ValueError):
+ raise err(400, "bad_calendar_metrics",
+ "every group key must be an ISO date (YYYY-MM-DD)")
+ if day in seen_days:
+ raise err(400, "bad_calendar_metrics", f"day {day} appears twice")
+ seen_days.add(day)
+ raw_pids = g.get("pids")
+ if not isinstance(raw_pids, list):
+ raise err(400, "bad_calendar_metrics", "every group needs a pids list")
+ try:
+ wanted = {int(p) for p in raw_pids}
+ except (TypeError, ValueError):
+ raise err(400, "bad_calendar_metrics", "pids must be integers")
+ # NARROW-ONLY, per group. The client sends what its calendar placed; the server can
+ # only ever remove from that, never add.
+ groups.append((day, d, frozenset(wanted & book)))
+ if sum(len(p) for _, _, p in groups) > _TS_MAX_PIDS:
+ raise err(400, "bad_calendar_metrics",
+ f"at most {_TS_MAX_PIDS} customer references per request")
+
+ rt = session.runtime
+ if not rt.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ import modules.customer_data as cl_mod
+ ws = cl_mod.table_workspace(session.uname, consume_corrections=False)
+ fdefs = ws.get("fields") or {}
+ keys, dropped, seen = [], [], set()
+ for k in raw_fields:
+ k = str(k or "")
+ if not k or k in seen:
+ continue
+ seen.add(k)
+ fd = fdefs.get(k)
+ if not isinstance(fd, dict) or not isinstance(fd.get("measure"), dict):
+ # The TS channel's vocabulary, deliberately reused rather than re-coined: the client
+ # already knows how to say these three words to a reader.
+ dropped.append({"field": k, "reason": "not_a_measure_field"})
+ continue
+ if ((fd["measure"].get("window") or {}).get("kind") == "custom"):
+ dropped.append({"field": k, "reason": "window_fixed"})
+ continue
+ keys.append(k)
+ if not keys:
+ raise err(400, "bad_calendar_metrics",
+ "none of the requested fields are measure fields with a window that can "
+ "slide to a day")
+
+ today = time.strftime("%Y-%m-%d")
+ t = dt.date.fromisoformat(today)
+ team_id, agent = _team_agent(session)
+ stamp = _pool_stamp(rt, team_id, agent)
+ problems = []
+ values = {k: {} for k in keys}
+ for day, d, pids in groups:
+ # A day that has not happened is unanswered for EVERY aggregate kind — the unstarted
+ # bucket law at day grain. Answering 0 would say "we sold nothing", which is a claim
+ # about a day nobody has lived through yet.
+ if d > t or not pids:
+ for k in keys:
+ values[k][day] = None
+ continue
+ answers = measure_resolve.series_values(
+ [{"key": k, "measure": dict(fdefs[k]["measure"])} for k in keys],
+ "day", [(day, day)], team_id, pids, today, stamp, rt.series_memo,
+ on_error=lambda tag, e: problems.append(str(e)[:200]))
+ for k in keys:
+ ans = answers.get(k)
+ if ans is None:
+ values[k][day] = None
+ continue
+ vals_by = ans.get("values") or {}
+ zero_fill = str(ans.get("agg") or "sum") in ("sum", "count")
+ values[k][day] = vals_by.get(day, 0 if zero_fill else None)
+
+ for k in keys:
+ if all(v is None for v in values[k].values()):
+ # Every day unanswerable is a FIELD-level failure, and saying so is the difference
+ # between "no activity that month" and "this metric could not be computed".
+ dropped.append({"field": k, "reason": "unresolvable"})
+ out = {"values": values, "today": today,
+ "windows": {k: {"kind": str((_wn.normalize(
+ (fdefs[k].get("measure") or {}).get("window")) or {}).get("kind") or ""),
+ "label": _wn.label((fdefs[k].get("measure") or {}).get("window"))}
+ for k in keys}}
+ if dropped:
+ out["dropped"] = dropped
+ if problems:
+ out["problems"] = problems[:5]
+ return out
+
+
+@router.post("/grid/events")
+def grid_events_route(body: dict = Body(default=None),
+ session: Session = Depends(module_gate(MODULE))):
+ """`{events: []}` → `{results, doc?, toast?}`."""
+ from core import grid_events
+ from routes_customers import grid_assembly
+
+ events = (body or {}).get("events")
+ if events is None and isinstance(body, dict) and body.get("type"):
+ events = [body] # a single event object, the legacy shape
+ if not isinstance(events, list):
+ raise err(400, "bad_events", "expected {events: [...]}")
+ if len(events) > _MAX_EVENTS:
+ raise err(400, "too_many_events",
+ f"at most {_MAX_EVENTS} events per request (the client's resend window)")
+
+ # Validated with the SAME predicate as the read route. An unrecognised scopeKey used to be
+ # passed through verbatim, and `core.grid_events` only ever compares it to 'cohort' — so a
+ # typo degraded silently to customer-scope behaviour on a WRITE. Read and write must agree on
+ # what a scope is, or the surface you read is not the surface you wrote.
+ scope = _scope_or_400((body or {}).get("scopeKey"))
+ # This assembly validates the write; it is not a payload the browser will render. Leave
+ # one-shot field-name correction acks queued for the subsequent /workspace refresh.
+ # Wave 16 C-TOPIC: the PRODUCT topic gets the product assembly — product field contract,
+ # product pids, and (below) the product TABLE OPS, so a product event is validated against
+ # and lands in the product bucket. The measure/cohort context is honestly EMPTY there:
+ # `clean_measure_field` refuses measure creates on this surface by construction (the
+ # customer-grain descope), which is the fail-closed shape, not an accident.
+ if scope == "product":
+ from routes_products import MODULE as PRODUCT_MODULE, product_assembly
+
+ session.require(PRODUCT_MODULE) # the route's own dependency asserts only customer_data
+ g = product_assembly(session, consume_corrections=False)
+ elif scope.startswith("ut_"):
+ # Wave 18 C3-UT — the user-table wall (creator/admin) is inside the assembly; the
+ # measure/cohort context is honestly EMPTY (customer-grain machinery, no meaning here).
+ from routes_tables import ut_assembly
+
+ g = ut_assembly(session, scope, consume_corrections=False)
+ else:
+ g = grid_assembly(session, scope=scope, consume_corrections=False)
+ # ⚠ THE MEASURE CONTEXT IS NOT OPTIONAL (2026-07-31). Without `measure_offer`,
+ # `clean_measure_field` had an empty admission list and every measure-column create over
+ # HTTP was silently refused; without `measure_keys`, `clean_filter_tree` stripped every
+ # measure CONDITION out of a saved view. The embed always passed these; the API adapter
+ # simply had not been given them — the standalone shell could read measures it could
+ # never write.
+ ctx = _ctx(session, g["fields"], g["pids"], scope_key=scope,
+ measure_keys=frozenset(m["key"] for m in g["measures"]),
+ resolved_ids=frozenset(g["measure_sets"]),
+ cohort_ids=frozenset(c["id"] for c in g["lists"]),
+ measure_offer=tuple(g["measures"]),
+ visible_views=tuple(g["views"]))
+
+ # Per-event results so the client can tell which of a batch landed — the component's own
+ # bridge has no response channel at all, so this is strictly more than the embed gets.
+ results = []
+ try:
+ for one in events:
+ eid = str(one.get("id") or "") if isinstance(one, dict) else ""
+ rerender = grid_events.handle_one(one, ctx)
+ results.append({"id": eid, "rerender": bool(rerender)})
+ except grid_events.StoreUnavailable:
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — none of your changes were saved")
+
+ out = {"results": results, "rerender": any(r["rerender"] for r in results)}
+ if ctx.out.doc is not None:
+ out["doc"] = ctx.out.doc
+ if ctx.out.toast is not None:
+ out["toast"] = ctx.out.toast
+
+ # ── ⭐ owner item 2 (2026-08-03): THE NEW MEASURE COLUMN'S VALUES, ONE ROUND TRIP SOONER ──
+ #
+ # Creating a measure column cost the browser TWO sequential trips before a single number
+ # appeared: this one to persist the field, then a whole `/workspace` to compute it. The
+ # second cannot start until the first lands (the resolver reads the PERSISTED field), so the
+ # wait was structural, not slow code — the owner's "it takes some time for the data to
+ # populate". The values are computed here instead, immediately after the write, and ride
+ # this response.
+ #
+ # ⚠ IT COSTS NOTHING EXTRA TO COMPUTE. The expensive part is one DuckDB aggregate over the
+ # book, and `rt.measure_memo` is keyed on (pool stamp, scope, pool, measure, window) — so
+ # the `/workspace` re-read that still follows HITS the memo instead of doing this work. The
+ # query happens once either way; only its position moved.
+ #
+ # ⚠ NARROW ON PURPOSE. Gated to an actual measure-column write, so an overlay edit or a
+ # cohort add — the overwhelming majority of events — never pays for a second assembly.
+ #
+ # ⚠ AND IT IS A SHORTCUT, NOT A PATH. Any failure is swallowed: `WORKSPACE_STALE` still
+ # fires from `rerender`, and the re-read still delivers these values exactly as it does
+ # today. Nothing depends on this having worked.
+ if out["rerender"] and scope in ("customer", "cohort") and any(
+ isinstance(e, dict) and e.get("type") == "field_upsert"
+ and str(((e.get("field") or {}) if isinstance(e.get("field"), dict) else {})
+ .get("key") or "").startswith("measure_")
+ for e in events):
+ try:
+ fresh = grid_assembly(session, scope=scope, consume_corrections=False)
+ out["derived"] = {str(pid): cells for pid, cells in fresh["derived"].items()}
+ except Exception:
+ pass
+ # ⚠ NOTHING IS INVALIDATED HERE, on purpose. The runtime cache holds ONLY the scope-shaped
+ # Odoo pool (see `routes_customers._pool_rows`), and no event on this route can change an
+ # Odoo column — Odoo is read-only. Everything an event DOES change (overlays, fields, views,
+ # folders, cohorts) is re-read from the store on the next request. An earlier version cleared
+ # `pool_cache` after an `overlay_patch`, which threw away an expensive Odoo pull to refresh
+ # data that was never in it.
+ return out
diff --git a/api/routes_keychain.py b/api/routes_keychain.py
new file mode 100644
index 0000000000000000000000000000000000000000..f569c1cb7afb5df625a2ce45744c5f2a91300205
--- /dev/null
+++ b/api/routes_keychain.py
@@ -0,0 +1,244 @@
+"""routes_keychain.py — Keychains + Connectors admin surfaces (wave 18, C7 / R3).
+
+Keychain: encrypted per-tenant credential entries (`core/keychain.py`). The routes NEVER
+return a decrypted field — list rows carry a masked preview, and the decrypt function is a
+connector-layer internal. Connectors: the tenant's data sources as STATUS rows — Royal's
+env-configured Odoo, keychain-held sources — plus R3's guardrail: the **Unsynced records**
+count (rows holding overlay data whose pids the current pool no longer serves; counted and
+drillable, never silently dropped) and a pause toggle whose v1 semantics are stated honestly
+in the payload (`pausedNote`): pausing marks intent and warns; the source cutover ships with
+the keychain cutover wave R3 staged.
+"""
+import os
+
+from fastapi import Body, Depends
+from fastapi import APIRouter
+
+from deps import Session, err
+from routes_admin import admin_gate
+
+router = APIRouter(prefix="/api/v1")
+
+_CONNECTOR_FLAGS_KEY = "connectors"
+#: DEBT-2 (2026-08-04): the last-successful-sync snapshot bucket. Written when the RESOLVED
+#: odoo connector is paused; read by the pool path while paused; survives a Space restart.
+SNAPSHOT_KEY = "connector_snapshots"
+
+
+def _kc():
+ import core.keychain as keychain
+ return keychain
+
+
+def _resolved_odoo_key(rt):
+ """Which source would serve this tenant's Odoo queries — the ROUTE-LEVEL mirror of
+ TenantRuntime.odoo_source(): first unlocked keychain odoo entry, else env for tenant #0
+ only, else None. Takes the runtime (not the session) so the pool path can ask too."""
+ kc = _kc()
+ try:
+ entries = kc.list_entries(rt)
+ except Exception:
+ entries = []
+ first_odoo = next((e["id"] for e in entries if e["type"] == "odoo"), None)
+ if first_odoo and kc.unlocked():
+ return f"keychain:{first_odoo}", first_odoo
+ if rt.key == "royal-imports" and os.environ.get("ODOO_URL"):
+ return "env", "odoo-env"
+ return None, None
+
+
+def odoo_paused(rt):
+ """True when the tenant's RESOLVED Odoo source carries the pause flag. Pausing an entry
+ that is not the resolved source freezes nothing — it serves nothing."""
+ try:
+ _, flag_key = _resolved_odoo_key(rt)
+ if not flag_key:
+ return False
+ flags = rt.get(_CONNECTOR_FLAGS_KEY) or {}
+ return bool((flags.get(flag_key) or {}).get("paused"))
+ except Exception:
+ return False # an unreachable flags bucket must never freeze a live surface
+
+
+def _snap_scope_key(team_id, agent):
+ return f"t={team_id}|a={agent}"
+
+
+def load_pool_snapshot(rt, team_id, agent):
+ """(ts, rows) from the persisted snapshot for this exact scope, or None. NEVER a wider
+ scope's rows — serving the consolidated snapshot to a scoped user would widen their book."""
+ try:
+ snap = (rt.get(SNAPSHOT_KEY) or {}).get("odoo_pool") or {}
+ e = snap.get(_snap_scope_key(team_id, agent))
+ if isinstance(e, dict) and isinstance(e.get("rows"), list):
+ return float(e.get("ts") or 0), e["rows"]
+ except Exception:
+ pass
+ return None
+
+
+def save_pool_snapshots(rt, taken_by=""):
+ """Persist every currently-cached pool scope as the pause-time snapshot ('the last
+ successful sync', made concrete). Ensures the consolidated default scope exists first so
+ a pause on a cold process still captures something to serve."""
+ import time as _time
+ import routes_customers as _rc
+ try:
+ _rc._pool_for(rt, None, None) # the scope every admin/all-BU account lands on
+ except Exception:
+ pass # cold + Odoo down: persist whatever IS cached
+ pools = {}
+ for key, entry in list(rt.pool_cache.items()):
+ if (isinstance(key, tuple) and len(key) == 3 and key[0] == "pool"
+ and isinstance(entry, tuple) and len(entry) == 2
+ and isinstance(entry[1], list)):
+ pools[_snap_scope_key(key[1], key[2])] = {"ts": entry[0], "rows": entry[1]}
+ if not pools:
+ return 0
+
+ def _up(cur):
+ cur["odoo_pool"] = pools
+ cur["taken"] = _time.strftime("%Y-%m-%dT%H:%M:%S")
+ cur["takenBy"] = str(taken_by or "")
+ return cur
+
+ rt.update(SNAPSHOT_KEY, _up, flush="sync")
+ return len(pools)
+
+
+@router.get("/admin/keychain")
+def list_keychain(session: Session = Depends(admin_gate)):
+ kc = _kc()
+ return {"entries": kc.list_entries(session.runtime), "locked": not kc.unlocked()}
+
+
+@router.post("/admin/keychain", status_code=201)
+def add_key(body: dict = Body(default=None), session: Session = Depends(admin_gate)):
+ kc = _kc()
+ body = body or {}
+ if not session.runtime.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+ try:
+ row = kc.add_entry(session.runtime, body.get("label"), body.get("type"),
+ body.get("fields"), session.uname)
+ except kc.KeychainLocked as e:
+ raise err(503, "keychain_locked",
+ f"the keychain is locked — {e}. A secret is never stored unencrypted.")
+ except ValueError as e:
+ raise err(400, "bad_entry", str(e))
+ except Exception:
+ raise err(503, "store_unavailable", "the entry was not saved — try again")
+ return {"entry": row}
+
+
+@router.delete("/admin/keychain/{entry_id}")
+def delete_key(entry_id: str, session: Session = Depends(admin_gate)):
+ try:
+ _kc().delete_entry(session.runtime, entry_id)
+ except Exception:
+ raise err(503, "store_unavailable", "the delete did not land — try again")
+ return {"ok": True}
+
+
+@router.post("/admin/keychain/{entry_id}/test")
+def test_key(entry_id: str, session: Session = Depends(admin_gate)):
+ return _kc().test_entry(session.runtime, entry_id)
+
+
+def _unsynced_customer_records(session):
+ """R3's guardrail, tenant #0's customer topic: overlay-holding pids the CURRENT pool no
+ longer serves. Overlays are unioned across EVERY user of the table (the guardrail is a
+ tenant fact, not a per-user one). Honest degradation: when the pool cannot be built the
+ answer is `known: False`, never a fabricated zero."""
+ try:
+ import core.table_store as table_store
+ bucket = session.runtime.get("customer_table_workspace") or {}
+ overlay_pids = {}
+ for uname, ws in bucket.items():
+ if uname == table_store.SHARED_KEY or not isinstance(ws, dict):
+ continue
+ for pid, cells in (ws.get("overlays") or {}).items():
+ if isinstance(cells, dict) and cells:
+ overlay_pids.setdefault(str(pid), cells)
+ if not overlay_pids:
+ return {"known": True, "count": 0, "rows": []}
+ from routes_customers import allowed_pids
+ pool = {str(p) for p in allowed_pids(session)}
+ orphans = sorted((p for p in overlay_pids if p not in pool), key=lambda x: int(x)
+ if str(x).isdigit() else 0)
+ rows = []
+ for p in orphans[:50]:
+ cells = overlay_pids[p]
+ hint = next((str(v) for v in cells.values() if str(v).strip()), "")
+ rows.append({"pid": int(p) if str(p).isdigit() else p,
+ "fields": len(cells), "hint": hint[:80]})
+ return {"known": True, "count": len(orphans), "rows": rows,
+ "shown": min(len(orphans), 50)}
+ except Exception as e:
+ return {"known": False, "count": None, "rows": [],
+ "note": f"pool unavailable — {type(e).__name__}"}
+
+
+@router.get("/admin/connectors")
+def connectors(session: Session = Depends(admin_gate)):
+ kc = _kc()
+ flags = session.runtime.get(_CONNECTOR_FLAGS_KEY) or {}
+ entries = kc.list_entries(session.runtime)
+ # R3 cutover (2026-08-04): which source would actually serve this tenant's Odoo queries —
+ # mirrors TenantRuntime.odoo_source() exactly: first unlocked keychain odoo entry, else env
+ # for tenant #0 only, else nothing (fail closed — never another tenant's environment).
+ first_odoo = next((e["id"] for e in entries if e["type"] == "odoo"), None)
+ if first_odoo and kc.unlocked():
+ resolved = f"keychain:{first_odoo}"
+ elif session.tenant == "royal-imports" and os.environ.get("ODOO_URL"):
+ resolved = "env"
+ else:
+ resolved = None
+ rows = []
+ if session.tenant == "royal-imports" and os.environ.get("ODOO_URL"):
+ rows.append({"key": "odoo-env", "label": "Odoo (environment)", "type": "odoo",
+ "source": "env", "active": resolved == "env",
+ "paused": bool((flags.get("odoo-env") or {}).get("paused"))})
+ for e in entries:
+ rows.append({"key": e["id"], "label": e["label"], "type": e["type"],
+ "source": "keychain", "preview": e["preview"],
+ "active": (e["type"] == "odoo" and resolved == f"keychain:{e['id']}"),
+ "paused": bool((flags.get(e["id"]) or {}).get("paused"))})
+ out = {"connectors": rows, "locked": not kc.unlocked(), "resolved": resolved,
+ # DEBT-2 (2026-08-04): pause now MEANS something — the customer pool freezes on the
+ # pause-time snapshot (persisted, restart-safe) and Unsynced records counts against
+ # that snapshot. Stated honestly: measure/page computations still reach the source
+ # for questions not already memoized; their full freeze rides the module cutovers.
+ "pausedNote": ("Pausing a connector never deletes data — notes, custom fields and "
+ "views stay. While paused, the customer workspace serves the "
+ "pause-time snapshot instead of reading live; measures not already "
+ "computed may still reach the source until their cutover.")}
+ if session.tenant == "royal-imports":
+ out["unsynced"] = _unsynced_customer_records(session)
+ return out
+
+
+@router.post("/admin/connectors/{key}/pause")
+def pause_connector(key: str, body: dict = Body(default=None),
+ session: Session = Depends(admin_gate)):
+ paused = bool((body or {}).get("paused"))
+ if not session.runtime.available():
+ raise err(503, "store_unavailable", "the tenant store is unavailable")
+
+ # DEBT-2: pausing the RESOLVED Odoo source captures the snapshot FIRST, so there is a
+ # "last successful sync" to serve before the freeze takes effect. Capturing before the
+ # flag flips means a failed capture leaves the connector live (never paused-with-nothing).
+ snapshots = 0
+ _, flag_key = _resolved_odoo_key(session.runtime)
+ if paused and flag_key and str(key) == flag_key:
+ snapshots = save_pool_snapshots(session.runtime, taken_by=session.uname)
+
+ def _up(cur):
+ cur[str(key)] = {"paused": paused}
+ return cur
+
+ try:
+ session.runtime.update(_CONNECTOR_FLAGS_KEY, _up)
+ except Exception:
+ raise err(503, "store_unavailable", "the change was not saved — try again")
+ return {"key": key, "paused": paused, "snapshots": snapshots}
diff --git a/api/routes_nav.py b/api/routes_nav.py
new file mode 100644
index 0000000000000000000000000000000000000000..58bd90ef858a3e80bb944a089806349ef1d623d4
--- /dev/null
+++ b/api/routes_nav.py
@@ -0,0 +1,406 @@
+"""routes_nav.py — X2's `GET /api/v1/nav`: the registry, filtered by what this session may open.
+
+SERVER-FILTERED, not client-filtered. The client renders what it is given and never decides who
+may see what — a nav that hides a link the API would still serve is a UI courtesy, not a
+permission. `core.perms.nav_pages` is the single predicate (shared with `may_open`'s page gate),
+so the nav and the 403 can never disagree about a grant.
+
+The full rule set — archived is invisible to everyone, `group_only` rows are excluded so no
+`parent` reference can dangle, `nav: False` surfaces ship as `chrome: 'utility'`, and the
+`prefs.json` Library preference is deliberately NOT applied — is documented on
+`core.perms.nav_pages`, which is where it belongs: one place, both callers.
+"""
+from fastapi import APIRouter, Body, Depends
+
+from deps import Session, err, perms, require_session
+
+router = APIRouter(prefix="/api/v1")
+
+#: Wave 2026-08-02 (C-SCHEMA): per-user folders over the database list, the view-folder
+#: pattern applied to the nav. Cosmetic per-user state — placement never grants or hides a
+#: surface (the server-filtered nav still decides what exists).
+_NAV_PREFS_KEY = "nav_prefs"
+_MAX_NAV_FOLDERS = 16
+
+#: WAVE 19 (R8 / contract C1): the database's NAME and ICON overrides.
+#:
+#: ⚠ TENANT-WIDE, which is the whole difference from `nav_prefs` above and the reason it is a
+#: separate bucket rather than another field in that one. Folders and placement are one
+#: person's arrangement of their own rail — per-user by definition. What a database is CALLED
+#: and what it looks like are facts about the database: a workspace where two people call the
+#: same table different things has no shared vocabulary left to discuss it in. Same store, two
+#: buckets, because they answer to two different owners.
+#:
+#: Shape: {"": {"icon": {"shape": , "tone": },
+#: "name": ""}}
+_NAV_META_KEY = "nav_meta"
+
+#: The grid's folder-icon vocabulary, mirrored — 12 shapes x 5 tones. The CLIENT imports these
+#: from `customer-grid/types` rather than redefining them; this end cannot import TypeScript,
+#: so it is the one place the list is written twice.
+#:
+#: ⛔ WHAT AN UNKNOWN VALUE MUST NOT DO IS BE STORED. `FolderMark` indexes its path table by
+#: shape and maps the result, so a shape this whitelist let through and the renderer does not
+#: know is `undefined.map()` — a blank rail, from a stored preference, for every user in the
+#: tenant until somebody edits the store by hand. Refusing at the door is the cheap end of
+#: that. If the two lists ever drift the symptom is an icon that silently reverts to the
+#: default, which is the loudest SAFE failure available here.
+_ICON_SHAPES = frozenset({"folder", "star", "flag", "tag", "bookmark", "grid",
+ "chart", "map", "users", "clock", "heart", "bolt"})
+_ICON_TONES = frozenset({"neutral", "blue", "green", "yellow", "red"})
+_MAX_NAV_NAME = 60
+
+
+def _clean_nav_prefs(raw, page_keys):
+ """Validated wholesale replacement, the `clean_folders` posture: prune, never invent.
+
+ `page_keys` is the set of TOP-LEVEL keys this session may see; a placement of an unknown
+ or invisible key is dropped (it can return when the grant does — placement is cosmetic,
+ so pruning is loss-free). Unknown folder refs drop the placement, not the folder.
+ """
+ raw = raw if isinstance(raw, dict) else {}
+ folders, seen = [], set()
+ for f in (raw.get("folders") or [])[:_MAX_NAV_FOLDERS]:
+ if not isinstance(f, dict):
+ continue
+ fid = str(f.get("id") or "").strip()[:40]
+ name = " ".join(str(f.get("name") or "").split())[:40]
+ if not fid or fid in seen or not name:
+ continue
+ seen.add(fid)
+ folders.append({"id": fid, "name": name})
+ ids = {f["id"] for f in folders}
+ placement = {}
+ src = raw.get("placement")
+ if isinstance(src, dict):
+ for k, v in src.items():
+ k, v = str(k)[:60], str(v)[:40]
+ if v in ids and (page_keys is None or k in page_keys):
+ placement[k] = v
+ return {"folders": folders, "placement": placement}
+
+
+def _visible_top_keys(user):
+ """The keys a placement may name: top-level rows (group heads + parentless pages)."""
+ pages = perms.nav_pages(user) or []
+ return {p["key"] for p in pages if not p.get("parent")}
+
+
+def _clean_icon(raw):
+ """A stored/incoming icon, or None. Prune, never invent — `clean_folders`' posture."""
+ if not isinstance(raw, dict):
+ return None
+ shape, tone = raw.get("shape"), raw.get("tone")
+ if shape not in _ICON_SHAPES or tone not in _ICON_TONES:
+ return None
+ return {"shape": shape, "tone": tone}
+
+
+def _read_nav_meta(runtime):
+ """The tenant's `nav_meta`, validated on the way OUT as well as in.
+
+ Re-validating a read looks redundant and is not: the bucket outlives this code, an older
+ build may have written a shape this one no longer accepts, and the whitelist is mirrored
+ from a vocabulary that lives in another language. A row whose icon does not survive
+ validation renders the default mark — never a crash, and never a half-drawn glyph.
+ """
+ try:
+ stored = runtime.get(_NAV_META_KEY) or {}
+ except Exception:
+ return {} # a store blip must not take the nav down with it
+ if not isinstance(stored, dict):
+ return {}
+ out = {}
+ for key, meta in stored.items():
+ if not isinstance(meta, dict):
+ continue
+ entry = {}
+ icon = _clean_icon(meta.get("icon"))
+ if icon:
+ entry["icon"] = icon
+ # ⛔ THE `ut_` RULE IS RE-APPLIED ON READ, not trusted from the record. The write
+ # route refuses a name for a built-in key, but a record written by an older build (or
+ # by hand) could still carry one — and honouring it would let the store rename
+ # `customer_data` on screen while `core/registry.py` and every other reader went on
+ # calling it Customer. A name that could not be written today is not served today.
+ name = meta.get("name")
+ if str(key).startswith("ut_") and isinstance(name, str) and name.strip():
+ entry["name"] = " ".join(name.split())[:_MAX_NAV_NAME]
+ if entry:
+ out[str(key)] = entry
+ return out
+
+
+@router.get("/nav")
+def nav(session: Session = Depends(require_session)):
+ """`{pages: [{key,label,source?,chrome}], landing}`.
+
+ Note what this does NOT do: it never returns an empty `pages` list as a way of saying "you
+ are not allowed". A session that may open nothing at all is a misconfigured account, and it
+ gets an explicit 403 — an empty 200 is indistinguishable from "the registry is empty" and is
+ how a permission bug hides in plain sight (X2's never-an-empty-200 rule).
+ """
+ pages = list(perms.nav_pages(session.user) or [])
+ # Wave 18 C1-TENANT: the REGISTRY is the product's module catalogue — tenant #0's world.
+ # A tenant record may enable a subset (`modules: [...]`); absent/'all' means everything
+ # (royal-imports and the compiled builders). A blank tenant enables NOTHING: its nav is
+ # its own databases, which is what "different set of databases at later waves" means.
+ tcfg = getattr(session.runtime.tenant, "config", None) or {}
+ tmods = tcfg.get("modules", "all")
+ if tmods != "all":
+ allowed = {str(k) for k in (tmods or [])}
+ pages = [p for p in pages
+ if p.get("key") in allowed or (p.get("parent") or "") in allowed]
+ # Wave 18 C3-UT: this tenant's user-created databases, merged AFTER the registry rows —
+ # the host does the same at app.py:7796. Filtered by the per-table wall (`may_open`), so
+ # the nav cannot offer a row the table routes would refuse.
+ try:
+ import core.user_tables as user_tables
+ for e in user_tables.nav_entries(viewer=session.uname, is_admin=session.admin,
+ st=session.runtime):
+ pages.append({"key": e["key"], "label": e["label"],
+ "source": e.get("source") or "Blank", "chrome": "main"})
+ except Exception:
+ pass # a store blip must not take the whole nav down with it
+ if not pages:
+ if tmods != "all":
+ # A provisioned tenant with no modules and no databases YET is a legitimate empty
+ # state, not a misconfigured account — the client renders "create your first
+ # database", and X2's never-an-empty-200 rule is honoured by saying WHY it is
+ # empty rather than leaving 200-[] ambiguous.
+ return {"pages": [], "landing": None, "empty": "no_databases"}
+ raise err(403, "no_surfaces",
+ "your account has no dashboards assigned — ask an administrator")
+ # WAVE 19 (R8 / C1): the tenant's name + icon overrides, merged LAST — after the registry
+ # rows, after the tenant module filter, after the user tables. Merged HERE rather than
+ # applied by the client for one reason: `label` is what every reader of this payload shows,
+ # including the Settings modal's `moduleLabels` map, so a client-side merge would put the
+ # override in one door and the registry label in the other.
+ #
+ # ⛔ THIS MUTATES `pages` IN PLACE, WHICH IS SAFE ONLY BECAUSE `perms.nav_pages` BUILDS A
+ # FRESH `row = {...}` PER CALL (perms.py:194) and the ut_ rows are built fresh here. If
+ # either ever starts handing back cached or module-level dicts, this loop would write one
+ # tenant's chosen label into the object the NEXT tenant's request reads — a cross-tenant
+ # leak with no symptom until two tenants rename the same registry key. Copy the rows before
+ # merging on the day that invariant changes.
+ meta = _read_nav_meta(session.runtime)
+ for p in pages:
+ # `manage` (R14): may THIS session change this row's icon/name? Answered HERE because
+ # the server is the only end that knows — the client cannot see who created a user
+ # table. Additive and FAIL-CLOSED (absent reads as "no"), so the rail offers a control
+ # only where the write would actually land, and the route re-checks it regardless.
+ #
+ # ⚠ A `ut_` row's presence IS the answer: `user_tables.nav_entries` above filters by
+ # `may_open`, so a user table this session cannot manage never reached this list. That
+ # is why this line needs no second lookup — and why it must move if that filter ever
+ # widens to include tables a viewer may READ but not own.
+ if str(p.get("key", "")).startswith("ut_") or session.admin:
+ p["manage"] = True
+ entry = meta.get(p.get("key")) if meta else None
+ if not entry:
+ continue
+ if entry.get("icon"):
+ p["icon"] = entry["icon"]
+ if entry.get("name"):
+ p["label"] = entry["name"]
+ landing = perms.landing_page(session.user)
+ if landing and not any(p.get("key") == landing for p in pages):
+ landing = pages[0].get("key")
+ return {"pages": pages, "landing": landing}
+
+
+@router.post("/nav/meta")
+def save_nav_meta(body: dict = Body(default=None),
+ session: Session = Depends(require_session)):
+ """WAVE 19 (R8 / C1) — set one database's icon and/or name, tenant-wide.
+
+ A PATCH OF ONE KEY, not the wholesale replace `/nav/prefs` uses two routes up, and the
+ asymmetry is deliberate. Prefs are one user's complete picture of their own rail, so
+ replacing the document whole is what makes a deleted folder stay deleted. This bucket is
+ shared by every admin in the tenant: a wholesale write here means whoever saves last
+ silently erases what the other one named while their tab was open.
+
+ THREE WALLS, all fail-closed:
+ · the SESSION must be able to open the key at all (the same predicate the nav uses, so
+ the rail and this route cannot disagree about what exists);
+ · the WRITE is admin-only — renaming a database is a change every user in the tenant
+ sees, which is the definition of an administrative act here;
+ · `name` is refused outright for a non-`ut_` key. Built-in labels are compiled registry
+ literals: honouring an override would leave this payload and `core/registry.py`
+ calling the same module two different things, and the wave-16 lesson is that the
+ client must not be the place that decides what a payload meant.
+
+ `icon: null` CLEARS. An absent field is untouched — which is what makes a rename and an
+ icon change two independent writes rather than a race between them.
+ """
+ body = body if isinstance(body, dict) else {}
+ key = str(body.get("key") or "").strip()
+ if not key:
+ raise err(400, "bad_request", "no database was named")
+ # ── THE WALL (ruling R14, 2026-08-04) ────────────────────────────────────────────────────
+ # TWO DOORS, because a `ut_` database and a built-in module are owned by different people.
+ #
+ # · `ut_*` — the table's CREATOR or a tenant admin, which is exactly what
+ # `user_tables.may_open` already means. A database you made is yours to name; requiring
+ # an admin for that was the C1 consequence B flagged and R14 resolved. `session.require`
+ # is deliberately NOT used here: it is the MODULE gate and would 403 every ut_ key,
+ # because a user table is not a module. Same split `/nav/schema/{key}` makes.
+ # · everything else — admin only, and icon only. There is no owner of `customer_data` to
+ # defer to, and its label is a compiled registry literal (refused below regardless).
+ if key.startswith("ut_"):
+ import core.user_tables as user_tables
+ if not user_tables.get(key, st=session.runtime) or not user_tables.may_open(
+ key, session.uname, session.admin, st=session.runtime):
+ raise err(403, "forbidden", "that database belongs to another user")
+ else:
+ if not session.admin:
+ raise err(403, "forbidden",
+ "only an administrator can change a built-in database's icon")
+ session.require(key)
+
+ patch = {}
+ if "icon" in body:
+ icon = _clean_icon(body.get("icon"))
+ if body.get("icon") is not None and icon is None:
+ # Loud, not silent. A shape this build does not know is a CLIENT that has drifted
+ # from this whitelist, and answering 200 to a write that stored nothing is how
+ # that drift stays invisible until a user reports "my icon keeps resetting".
+ raise err(400, "bad_icon", "that icon is not one of the available shapes and tones")
+ patch["icon"] = icon
+ if "name" in body:
+ if not key.startswith("ut_"):
+ raise err(400, "name_not_allowed",
+ "only a database you created can be renamed — this one's name comes "
+ "from the module registry")
+ name = " ".join(str(body.get("name") or "").split())[:_MAX_NAV_NAME]
+ if not name:
+ raise err(400, "bad_request", "a database needs a name")
+ patch["name"] = name
+ if not patch:
+ raise err(400, "bad_request", "nothing to change")
+
+ if not session.runtime.available():
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — nothing was saved")
+
+ def _up(data):
+ data = data if isinstance(data, dict) else {}
+ entry = dict(data.get(key) or {}) if isinstance(data.get(key), dict) else {}
+ for field, value in patch.items():
+ if value is None:
+ entry.pop(field, None) # an explicit null CLEARS
+ else:
+ entry[field] = value
+ # An entry with nothing left in it is removed rather than stored empty: the read side
+ # skips empties anyway, and a bucket that accumulates `{}` per key is a document that
+ # grows forever and says nothing.
+ if entry:
+ data[key] = entry
+ else:
+ data.pop(key, None)
+ return data
+
+ try:
+ session.runtime.update(_NAV_META_KEY, _up)
+ except Exception:
+ raise err(503, "store_unavailable",
+ "the change was not saved — the store refused the write")
+ return {"key": key, "meta": _read_nav_meta(session.runtime).get(key, {})}
+
+
+@router.get("/nav/prefs")
+def nav_prefs(session: Session = Depends(require_session)):
+ """This user's database-list folders, re-validated at serve time against what they may
+ currently see (a revoked page's placement vanishes with the page, and returns with it)."""
+ try:
+ stored = (session.runtime.get(_NAV_PREFS_KEY) or {}).get(session.uname) or {}
+ except Exception:
+ stored = {}
+ return {"prefs": _clean_nav_prefs(stored, _visible_top_keys(session.user))}
+
+
+@router.post("/nav/prefs")
+def save_nav_prefs(body: dict = Body(default=None),
+ session: Session = Depends(require_session)):
+ """Wholesale replace, like the table folder stratum — the client sent its complete
+ picture, validated here; a partial merge would resurrect deleted folders forever."""
+ clean = _clean_nav_prefs(body or {}, _visible_top_keys(session.user))
+ if not session.runtime.available():
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — nothing was saved")
+
+ def _up(data):
+ data = data if isinstance(data, dict) else {}
+ if clean["folders"] or clean["placement"]:
+ data[session.uname] = clean
+ else:
+ data.pop(session.uname, None)
+ return data
+
+ try:
+ session.runtime.update(_NAV_PREFS_KEY, _up)
+ except Exception:
+ raise err(503, "store_unavailable",
+ "the folder change was not saved — the store refused the write")
+ return {"prefs": clean}
+
+
+@router.get("/nav/schema/{key}")
+def nav_schema(key: str, session: Session = Depends(require_session)):
+ """The database's schema drawer payload: its field contract + the semantic measures this
+ session may build with. Fail-closed on the SAME predicate as the nav — a key the session
+ may not open answers 403, never a redacted schema."""
+ # Wave 18 C3-UT: a user table's schema is its own definition, walled by ITS predicate
+ # (`may_open`) rather than the module grant machinery — `session.require` would 403 every
+ # ut key because a user table is deliberately not a module.
+ if key.startswith("ut_"):
+ import core.user_tables as user_tables
+ defn = user_tables.get(key, st=session.runtime)
+ if not defn or not user_tables.may_open(key, session.uname, session.admin,
+ st=session.runtime):
+ raise err(403, "forbidden", "that database belongs to another user")
+ # WAVE 19 (R8) — the drawer wears the RENAMED name. A rail that says one thing and a
+ # schema panel opened from it that says another is the drift a rename is supposed to
+ # remove, not create.
+ return {"key": key,
+ "label": (_read_nav_meta(session.runtime).get(key, {}).get("name")
+ or defn.get("label") or key),
+ "source": defn.get("source") or "Blank",
+ "fields": [{"key": f["key"], "label": f["label"], "type": f["type"],
+ "source": f.get("source") or "overlay", "description": ""}
+ for f in (defn.get("fields") or [])],
+ "measures": []}
+ session.require(key)
+ pages = perms.nav_pages(session.user) or []
+ page = next((p for p in pages if p.get("key") == key), None)
+ if page is None:
+ raise err(404, "unknown_page", f"{key!r} is not a database this session can see")
+ fields = []
+ if key in ("customer_data", "cohort", "customers"):
+ try:
+ import aios_grid
+ for f in aios_grid.FIELDS:
+ entry = {"key": f["key"], "label": f["label"], "type": f["type"],
+ "source": f["source"],
+ "description": str(f.get("description") or "")}
+ if f.get("options"):
+ entry["options"] = list(f["options"])
+ fields.append(entry)
+ except Exception:
+ fields = []
+ measures = []
+ try:
+ from core import measure_resolve
+ team_id = perms.scope_team_id(session.user)
+ for m in measure_resolve.offer(team_id) or []:
+ measures.append({"key": str(m.get("key") or ""),
+ "label": str(m.get("label") or m.get("key") or ""),
+ "type": str(m.get("type") or "")})
+ except Exception:
+ measures = []
+ out = {"key": key, "label": page.get("label") or key,
+ "source": page.get("source") or "", "fields": fields, "measures": measures}
+ if not fields:
+ # Honest, never a mock: a database whose contract is not yet published says so.
+ out["note"] = "This database has not published a field contract yet."
+ return out
diff --git a/api/routes_pages.py b/api/routes_pages.py
new file mode 100644
index 0000000000000000000000000000000000000000..4dcf66e5ae81195bcb1bd4300246cc663c5088fe
--- /dev/null
+++ b/api/routes_pages.py
@@ -0,0 +1,64 @@
+"""routes_pages.py — X2/Y1's read of a whole dashboard page: `GET /api/v1/pages/{key}`.
+
+ONE route serves every ported page. That is the wave-3 promise made mechanical: Collections and
+Procurement arrive as a builder registered in `pages.py`, and they inherit this route's session
+wall, grant wall, BU resolution, caching and error shape without a line being written here.
+
+WHY THE GATE IS INSIDE THE HANDLER and not `Depends(module_gate(...))`. `module_gate` closes over a
+FIXED module key at import; the key here is a PATH PARAMETER, so the check has to happen once the
+key is known. It is the same predicate (`Session.require` → `perms.may_open`), reached from
+`pages.build_envelope` so a future builder cannot be added without it.
+
+FAIL-CLOSED, and the order matters:
+ no cookie -> 401 (require_session)
+ unknown / unported page key -> 404 (a fact about our roadmap, not about this user)
+ no grant for the page -> 403 (never an empty 200 — an empty page reads as "no data")
+ a BU the account may not see -> 403 (never coerced to their own BU)
+ a malformed bu -> 400
+"""
+from fastapi import APIRouter, Depends, Query
+
+import pages
+# ⚠ Wave 16 (owner item 7): the module-level pages_sales import was REMOVED — the Sales page
+# is retired, so no builder registers in production and every /pages/{key} 404s (a roadmap
+# fact, not a grant fact). When the next builder lands (Collections / Procurement), import it
+# HERE at module level, not only lazily: deploy_web.py's import walk follows module-level
+# imports, and a builder registered from inside a function body is invisible to it — a
+# missing module CRASHED the live Space on 2026-07-04. (verify_api section G scans this file
+# for the retired import — phrase any mention of it so the scan cannot read prose as code.)
+from deps import Session, require_session
+
+router = APIRouter(prefix="/api/v1")
+
+
+@router.get("/pages/{key}")
+def page_data(key: str,
+ bu: str = Query(default=None,
+ description="'all' or a business-unit id. NARROWS the session's own "
+ "scope; it can never widen it."),
+ period: str = Query(default=None,
+ description="Page-specific display parameter. The resolved value "
+ "is echoed in controls[].value."),
+ session: Session = Depends(require_session)):
+ """The Y1 envelope for one page, scoped to this session's BU + own-book grant."""
+ return pages.build_envelope(session, key, bu=bu, period=period)
+
+
+@router.get("/pages")
+def page_index(session: Session = Depends(require_session)):
+ """Which pages have published data, filtered to what this session may open.
+
+ The shell needs this to know whether a nav entry leads to a ported page or to the Streamlit
+ host during the strangler period — and it is `may_open`-filtered for the same reason
+ `/api/v1/nav` is: the client renders what it is given and never decides who may see what.
+
+ ⚠ AN EMPTY LIST IS A LEGITIMATE 200 HERE, and that is not a hole in the never-an-empty-200 rule.
+ `/api/v1/nav` 403s on empty because a session that may open NOTHING is a misconfigured account.
+ This route answers "which of your pages have been PORTED yet", and during the strangler period
+ "none of them" is the ordinary, truthful answer for a user granted only surfaces that still
+ live in the Streamlit host. Returning 403 would say they lack access to pages they can see.
+ """
+ from deps import perms
+ keys = [k for k in pages.known_pages()
+ if perms.may_open(session.user, (pages.builder_for(k).MODULE))]
+ return {"pages": keys}
diff --git a/api/routes_platform_admin.py b/api/routes_platform_admin.py
new file mode 100644
index 0000000000000000000000000000000000000000..c8035e7769787fa699d0b35b4e3f29f5fb990978
--- /dev/null
+++ b/api/routes_platform_admin.py
@@ -0,0 +1,593 @@
+"""routes_platform_admin.py — THE LOOPABLE ADMIN PLANE (wave 19, owner item 13 / R3+R4).
+
+Every other admin surface in this product answers questions about ONE tenant. This one answers
+questions about the PLATFORM: who our customers are, what they are running, whether their data
+sources are alive, and what the automation fleet costs. It is the first cross-tenant reader that
+has ever existed here, which is why it is also the most carefully walled.
+
+⛔ THE WALL. `padmin_gate` is `core.platform_admin.is_platform_admin` — a DOUBLE lock (the record
+flag AND the `loopable` tenant), fail-closed, applied to every single route in this file through
+one dependency. A tenant admin is NOT admitted: `role: 'admin'` is Royal's or Nurilab's authority
+over their own workspace and it must never widen into a view of each other. `verify_api.py`'s
+W19-ADMIN section proves that by ENUMERATING this router and having a tenant admin try every path
+it declares, so a route added later cannot quietly ship without the wall.
+
+⛔ CROSS-TENANT READS GO THROUGH EACH TENANT'S OWN RUNTIME. `runtime.get_runtime(slug)` per tenant,
+then `rt.get(...)` — never `core.store.get("")`. The runtime is what applies the store
+NAMESPACE (`t//…`) or binds the tenant's OWN dataset repo (R2), so reading raw keys would
+silently return tenant #0's data labelled as somebody else's — a wrong answer that looks right,
+which is the worst failure this plane could have.
+
+HONEST DEGRADATION IS THE WHOLE DESIGN, NOT AN ERROR PATH. This plane reads six subsystems across
+N tenants; on any given day one of them can be unreachable (a suspended tenant record, a locked
+keychain, an HF repo hiccup, no AWS credentials in this container). A 500 would take the entire
+dashboard down because one cell could not be filled. So every collector catches, and every row can
+carry an `error` string that the pane RENDERS — "unknown" is a real answer and it is never
+rendered as a zero. ([[gate-can-report-green-on-nothing]]: a fabricated 0 and a true 0 must not
+look alike.)
+
+EVERY COUNT DRILLS TO ROWS. `/overview`'s per-tenant counts are computed by the SAME collector
+functions the `/users`, `/databases`, `/connectors` and `/automations` routes serve rows from, so
+a number and its drill-down cannot disagree — they are one computation, projected twice
+([[no-unverifiable-aggregates]]).
+"""
+import os
+import subprocess
+import sys
+import time
+from pathlib import Path
+
+from fastapi import APIRouter, Depends
+
+import core.platform_admin as platform_admin
+import core.store as store
+from deps import Session, err, require_session, users
+
+router = APIRouter(prefix="/api/v1/platform-admin")
+
+
+def _now_iso():
+ """UTC, offset-bearing — the one stamp format anything client-side may subtract from."""
+ import datetime as _dt
+ return _dt.datetime.now(_dt.timezone.utc).isoformat(timespec="seconds")
+
+
+def padmin_gate(session: Session = Depends(require_session)) -> Session:
+ """401 without a session, 403 unless this account is a Loopable platform operator.
+
+ ONE dependency for the whole router. A per-route check is a per-route chance to forget, and
+ the thing being forgotten here would be every customer's data at once.
+
+ The message deliberately does not confirm that a platform plane exists for somebody else —
+ a tenant admin who pokes at this URL learns only that their account cannot open it.
+ """
+ if not platform_admin.is_platform_admin(session.user):
+ raise err(403, "forbidden", "your account does not have access to this surface")
+ return session
+
+
+# ══════════════════════════════════════════════════════════════════════════ tenants
+
+
+def _tenant_bucket():
+ """The control-plane `tenants` records, or {} — a platform fact, in the DEFAULT store."""
+ from harness import runtime
+ try:
+ recs = store.get(runtime.TENANTS_KEY) or {}
+ return {str(k).strip().lower(): v for k, v in recs.items() if isinstance(v, dict)}
+ except Exception:
+ return {}
+
+
+def _slugs():
+ """Every tenant this deployment knows: compiled builders + control-plane records.
+
+ `runtime.known_tenants()` is the union and it is the same list login resolves against, so
+ this plane cannot show a customer the door does not recognise (or miss one it does).
+ """
+ from harness import runtime
+ try:
+ return list(runtime.known_tenants())
+ except Exception:
+ return sorted(_tenant_bucket())
+
+
+def _runtime_for(slug):
+ """(runtime, error). A tenant whose runtime will not build is a ROW WITH A NOTE, never a 500.
+
+ Two real cases produce one: a SUSPENDED record (`get_runtime` raises KeyError by design —
+ "which tenants exist" is not a question the login path answers), and tenant #0's builder,
+ which makes a LIVE Odoo call (`harness.tenants.royal_imports` → `excluded_customer_ids`) and
+ therefore fails on a box that cannot reach the ERP. Neither may take the dashboard down.
+ """
+ from harness import runtime
+ try:
+ return runtime.get_runtime(slug), ""
+ except KeyError:
+ return None, "not resolvable (suspended, or no builder and no active record)"
+ except Exception as e: # noqa: BLE001
+ return None, f"runtime unavailable ({type(e).__name__})"
+
+
+def _scan(want=""):
+ """[(row, runtime)] — every tenant (or one), with its runtime RESOLVED EXACTLY ONCE.
+
+ The one-resolution rule is not tidiness. `get_runtime` is LRU-cached on success, but a tenant
+ that FAILS to build is not cached, and tenant #0's builder makes a live Odoo call — so a route
+ that asked twice would pay the timeout twice, and `/overview` (which asks about six
+ subsystems) would pay it six times. Resolve once, pass the handle down.
+ """
+ bucket = _tenant_bucket()
+ want = str(want or "").strip().lower()
+ out = []
+ for slug in _slugs():
+ if want and slug != want:
+ continue
+ rec = bucket.get(slug) or {}
+ rt, error = _runtime_for(slug)
+ out.append(({
+ "slug": slug,
+ # The record's name, else the built runtime's, else the slug. Tenant #0 is compiled
+ # and has no record, so without the runtime fallback it would render as "royal-imports".
+ "name": str(rec.get("name") or (getattr(rt, "name", "") if rt else "") or slug),
+ "source": "record" if rec else "compiled",
+ "status": str(rec.get("status") or ("active" if rt else "unknown")),
+ "domains": list(rec.get("domains") or []),
+ "modules": rec.get("modules", "all" if not rec else []),
+ # R2: the isolation shape. "own repo" and "shared repo + prefix" are genuinely
+ # different blast radii and an operator should be able to see which is which.
+ "storeRepo": rec.get("store_repo") or ("shared (tenant #0 repo)" if not rec else ""),
+ "storePrefix": getattr(rt, "store_namespace", "") if rt else "",
+ "error": error,
+ }, rt))
+ return out
+
+
+# ══════════════════════════════════════════════════════════════════════════ users
+
+
+def _user_rows(tenant=None):
+ """Accounts across every tenant, from the GLOBAL registry (`users.json` is control-plane).
+
+ ⛔ NEVER `salt` OR `hash`. This projection is the only one these routes use, mirroring
+ `routes_admin._view`'s discipline: one function that can leak, and it does not.
+
+ R4's two new fields ride here — `lastLogin` / `lastActive`, absent on every pre-wave record,
+ rendered as "never" rather than as a fabricated date.
+ """
+ try:
+ reg = users.registry() or {}
+ except Exception:
+ return []
+ want = str(tenant or "").strip().lower()
+ rows = []
+ for uname, rec in sorted(reg.items()):
+ if not isinstance(rec, dict):
+ continue
+ slug = str(rec.get("tenant") or "royal-imports").strip().lower()
+ if want and slug != want:
+ continue
+ rows.append({
+ "username": uname,
+ "name": rec.get("name") or uname,
+ "email": rec.get("email") or "",
+ "tenant": slug,
+ "role": rec.get("role", "user"),
+ "active": bool(rec.get("active", True)),
+ "lastLogin": rec.get("last_login") or "",
+ "lastActive": rec.get("last_active") or "",
+ "platformAdmin": rec.get("platform_admin") is True,
+ })
+ return rows
+
+
+# ══════════════════════════════════════════════════════════════════════════ databases
+
+
+def _database_rows(slug, rt):
+ """A tenant's user-created databases (`ut_*`) with their row counts.
+
+ Via `core.user_tables.all_tables(st=rt)` — the TenantRuntime, never the module-global, which
+ the engine's own header (`automation_engine.py:49-52`) flags as a cross-tenant defect for
+ every R2 tenant. That booked defect is exactly the mistake a cross-tenant reader would make
+ most easily, so it is stated at the call site too.
+ """
+ try:
+ import core.user_tables as ut
+ tables = ut.all_tables(st=rt) or {}
+ except Exception as e: # noqa: BLE001
+ return [], f"databases unreadable ({type(e).__name__})"
+ rows = []
+ for key, t in sorted(tables.items(), key=lambda kv: (kv[1].get("label") or "").lower()):
+ if not isinstance(t, dict):
+ continue
+ rows.append({
+ "tenant": slug,
+ "key": key,
+ "label": t.get("label") or key,
+ "source": t.get("source") or "Blank",
+ "createdBy": t.get("createdBy") or "",
+ "created": t.get("created") or "",
+ "fields": len(t.get("fields") or []),
+ "rowCount": len(t.get("rows") or {}),
+ })
+ return rows, ""
+
+
+# ══════════════════════════════════════════════════════════════════════════ connectors
+
+
+def _connector_rows(slug, rt):
+ """A tenant's data sources and which one is actually RESOLVED (i.e. would serve a query).
+
+ `_resolved_odoo_key` is imported from `routes_keychain` rather than re-derived. It is the
+ route-level mirror of `TenantRuntime.odoo_source()`, it takes a runtime (not a session), and
+ a second copy of that resolution here would be a copy that drifts — at which point this plane
+ would confidently name the wrong live connector. Reused, not restated.
+ """
+ try:
+ import core.keychain as keychain
+ from routes_keychain import _CONNECTOR_FLAGS_KEY, _resolved_odoo_key
+ entries = keychain.list_entries(rt)
+ locked = not keychain.unlocked()
+ resolved, _flag = _resolved_odoo_key(rt)
+ flags = rt.get(_CONNECTOR_FLAGS_KEY) or {}
+ except Exception as e: # noqa: BLE001
+ return [], f"connectors unreadable ({type(e).__name__})", False
+
+ rows = []
+ if slug == "royal-imports" and os.environ.get("ODOO_URL"):
+ rows.append({"tenant": slug, "key": "odoo-env", "label": "Odoo (environment)",
+ "type": "odoo", "source": "env", "active": resolved == "env",
+ "paused": bool((flags.get("odoo-env") or {}).get("paused"))})
+ for e in entries:
+ rows.append({"tenant": slug, "key": e["id"], "label": e["label"], "type": e["type"],
+ "source": "keychain",
+ "active": e["type"] == "odoo" and resolved == f"keychain:{e['id']}",
+ "paused": bool((flags.get(e["id"]) or {}).get("paused"))})
+ return rows, "", locked
+
+
+# ══════════════════════════════════════════════════════════════════════════ automations + cost
+
+#: THE UNIT MODEL, from `ops/provision_automation_cron.py` (its cost note at :25-28 and the
+#: function it actually provisions at :211 / :269). Restated as constants rather than as prose so
+#: the arithmetic below is re-checkable against the thing that was really deployed:
+#: EventBridge Scheduler `rate(15 minutes)` → a 128 MB, 30 s-timeout Lambda that POSTs the tick.
+TICK_CADENCE = "rate(15 minutes)"
+TICK_PER_DAY = 96 # 1440 / 15
+LAMBDA_MB = 128
+FREE_LAMBDA_REQUESTS = 1_000_000 # AWS always-free, per month
+FREE_SCHEDULER_INVOCATIONS = 14_000_000
+DAYS_PER_MONTH = 30.4
+
+
+def _runs_per_day(cron):
+ """Scheduled runs/day for the five-field crons this product offers, or None.
+
+ ⚠ DELIBERATELY NARROW. It answers exactly the shapes `automation_engine.CRON_PRESETS` can
+ produce (every-N-minutes, hourly, daily, weekly, monthly) and returns None for anything else
+ — an unparsed cadence is reported as "custom", never as a guessed number that would then be
+ multiplied into a cost. A wrong denominator is worse than an absent one.
+
+ ⚠ AND IT IS NOT MEASURED FROM HISTORY, on purpose: `automation_engine.MAX_RUNS` trims run
+ history to 20 entries, so a 15-minute automation retains ~5 hours of it. Deriving runs/day
+ from that window would understate by ~5x. History is reported as what it is — the last N runs.
+ """
+ parts = str(cron or "").split()
+ if len(parts) != 5:
+ return None
+ minute, hour, dom, _mon, dow = parts
+ if minute.startswith("*/") and hour == "*":
+ try:
+ step = int(minute[2:])
+ except ValueError:
+ return None
+ return (1440.0 / step) if step > 0 else None
+ if minute.isdigit() and hour == "*":
+ return 24.0
+ if minute.isdigit() and hour.isdigit():
+ if dom.isdigit():
+ return 1.0 / DAYS_PER_MONTH # monthly
+ if dow.isdigit():
+ return 1.0 / 7.0 # weekly
+ return 1.0 # daily
+ return None
+
+
+def _automation_rows(slug, rt):
+ """A tenant's automations, their schedules, and their retained run history."""
+ try:
+ import automation_engine as engine
+ defs = engine.all_definitions(rt) or {}
+ max_runs = int(getattr(engine, "MAX_RUNS", 20))
+ except Exception as e: # noqa: BLE001
+ return [], f"automations unreadable ({type(e).__name__})", 20
+ rows = []
+ for auto_id, d in sorted(defs.items(), key=lambda kv: (kv[1].get("name") or "").lower()):
+ if not isinstance(d, dict):
+ continue
+ sched = d.get("schedule") or {}
+ status = d.get("status") or {}
+ runs = list(d.get("runs") or [])
+ cron = sched.get("cron") or ""
+ per_day = _runs_per_day(cron) if sched.get("enabled") else 0.0
+ rows.append({
+ "tenant": slug,
+ "id": auto_id,
+ "name": d.get("name") or auto_id,
+ "kind": d.get("kind") or "",
+ "enabled": bool(sched.get("enabled")),
+ "cron": cron,
+ "runsPerDay": round(per_day, 2) if per_day is not None else None,
+ "state": status.get("state") or "idle",
+ "lastRunAt": status.get("lastRunAt") or "",
+ "lastSummary": status.get("lastSummary") or "",
+ # The retained window, named as such — see `_runs_per_day`'s second warning.
+ "runsRetained": len(runs),
+ "failedRetained": sum(1 for r in runs if isinstance(r, dict) and not r.get("ok")),
+ "createdBy": d.get("createdBy") or "",
+ "created": d.get("created") or "",
+ })
+ return rows, "", max_runs
+
+
+def _automation_cost(auto_rows):
+ """The estimated monthly cost of running the automation fleet — and the honest shape of it.
+
+ THE POINT THIS BLOCK EXISTS TO MAKE, which is not intuitive: **the external cron does not
+ scale with automations or tenants.** One EventBridge schedule fires one Lambda, which POSTs
+ one tick, and that tick runs every DUE automation for every tenant (`provision_automation_cron`
+ states this as the reason it stays $0 "at ten tenants"). So the AWS bill is a function of the
+ CADENCE alone — the fleet below adds work inside the API container, which is already paid for.
+
+ WHAT IS NOT COMPUTED HERE, deliberately: Lambda GB-seconds. That needs the real average
+ duration of the function, which only CloudWatch knows; assuming one would be inventing the
+ larger half of the free-tier calculation. `/aws` reports the measured figure when credentials
+ are available, and this block says so rather than filling the gap with a plausible number.
+ """
+ invocations = TICK_PER_DAY * DAYS_PER_MONTH
+ fleet_runs = sum(r["runsPerDay"] or 0 for r in auto_rows if r.get("enabled"))
+ unknown_cadence = sum(1 for r in auto_rows if r.get("enabled") and r.get("runsPerDay") is None)
+ return {
+ "cadence": TICK_CADENCE,
+ "invocationsPerMonth": int(round(invocations)),
+ "freeRequestsPct": round(100.0 * invocations / FREE_LAMBDA_REQUESTS, 3),
+ "freeSchedulerPct": round(100.0 * invocations / FREE_SCHEDULER_INVOCATIONS, 4),
+ "lambdaMb": LAMBDA_MB,
+ "usd": 0.0,
+ "fleetRunsPerDay": round(fleet_runs, 2),
+ "unknownCadence": unknown_cadence,
+ "basis": (
+ f"One EventBridge schedule ({TICK_CADENCE}) fires one {LAMBDA_MB} MB Lambda that "
+ f"POSTs the tick; that ONE tick runs every due automation for every tenant, so the "
+ f"AWS cost is set by the cadence and does not grow with the fleet. "
+ f"{int(round(invocations)):,} invocations/month is "
+ f"{round(100.0 * invocations / FREE_LAMBDA_REQUESTS, 3)}% of the 1,000,000-request "
+ f"always-free tier, so the marginal cost of the automations below is $0.00. "
+ f"Compute (GB-seconds) depends on measured durations and is NOT estimated here — "
+ f"the AWS report reads the real figure when credentials are available."
+ ),
+ }
+
+
+# ══════════════════════════════════════════════════════════════════════════ the AWS report
+
+#: `ops/aws_usage_report.py`, relative to this file: aios-web/api/ -> repo root -> ops/.
+_AWS_REPORT = Path(__file__).resolve().parents[2] / "ops" / "aws_usage_report.py"
+_AWS_TIMEOUT = 60
+
+
+def _aws_report(days=7):
+ """The AWS usage report as text, or an honest block saying why there is none.
+
+ ⛔ SUBPROCESS, NEVER `import`. Two concrete reasons, both found by reading that file rather
+ than by running it:
+ * it reassigns `sys.stdout` to a UTF-8 wrapper AT MODULE IMPORT (a cp1252 fix for this
+ box) — importing it would mutate the API process's stdout as a side effect;
+ * its `main()` calls `argparse.parse_args()` with no argv, so inside a server it would
+ parse UVICORN's arguments and can `sys.exit(2)` — and `SystemExit` is a `BaseException`,
+ which `except Exception` does not catch. A route that "cannot crash" would crash.
+
+ ⚠ ON THE SPACE THIS IS THE NORMAL PATH, NOT THE ERROR PATH. `deploy_web.py` ships `api/*.py`
+ and `web/`; `ops/` is not in the image, and AWS credentials live in a local `.env` that is
+ never deployed. So the honest block below is what the deployed plane shows, and it is written
+ to be read by an operator as information ("run it here") rather than as a fault.
+ """
+ if not _AWS_REPORT.is_file():
+ return {"available": False, "text": "",
+ "note": ("The AWS usage report is not part of this deployment — `ops/` ships "
+ "with the repository, not with the container image. Run "
+ "`python ops/aws_usage_report.py` locally for the live figures.")}
+ try:
+ proc = subprocess.run(
+ [sys.executable, str(_AWS_REPORT), "--days", str(int(days))],
+ capture_output=True, text=True, timeout=_AWS_TIMEOUT,
+ cwd=str(_AWS_REPORT.parent.parent))
+ except subprocess.TimeoutExpired:
+ return {"available": False, "text": "",
+ "note": (f"The AWS report did not answer within {_AWS_TIMEOUT}s — CloudWatch may "
+ f"be unreachable from here. Nothing was assumed about usage.")}
+ except Exception as e: # noqa: BLE001
+ return {"available": False, "text": "",
+ "note": f"The AWS report could not be run here ({type(e).__name__})."}
+ out = (proc.stdout or "").strip()
+ if proc.returncode != 0 or not out:
+ detail = (proc.stderr or "").strip().splitlines()
+ return {"available": False, "text": out,
+ "note": ("AWS credentials are not available here, or boto3 is not installed — "
+ "no usage could be read, and none is guessed. "
+ + (detail[-1][:200] if detail else ""))}
+ return {"available": True, "text": out, "note": ""}
+
+
+# ══════════════════════════════════════════════════════════════════════════ routes
+
+
+@router.get("/overview")
+def overview(session: Session = Depends(padmin_gate)):
+ """THE PLANE'S ONE TABLE: every tenant, with the counts that drill to the rows below.
+
+ Each count is produced by the same collector its `/…` route serves, so the number and its
+ drill-down are one computation projected twice. A subsystem that cannot be read contributes
+ an `errors` entry on that tenant's row and a NULL count — never a zero, which would read as
+ "this customer has no databases" when the truth is "we could not look".
+ """
+ t0 = time.time()
+ all_users = _user_rows()
+ users_by_tenant = {}
+ for u in all_users:
+ users_by_tenant.setdefault(u["tenant"], []).append(u)
+
+ rows = []
+ for t, rt in _scan():
+ slug = t["slug"]
+ row = dict(t)
+ row["users"] = len(users_by_tenant.get(slug, []))
+ row["admins"] = sum(1 for u in users_by_tenant.get(slug, []) if u["role"] == "admin")
+ errors = [t["error"]] if t["error"] else []
+ if rt is None:
+ # An unresolvable tenant still shows its ACCOUNTS (they live in the global registry,
+ # which is readable regardless) — everything tenant-store-shaped is honestly unknown.
+ row.update({"databases": None, "rows": None, "connectors": None,
+ "automations": None, "keychainLocked": None, "errors": errors})
+ rows.append(row)
+ continue
+ dbs, db_err = _database_rows(slug, rt)
+ conns, conn_err, locked = _connector_rows(slug, rt)
+ autos, auto_err, _mr = _automation_rows(slug, rt)
+ errors += [e for e in (db_err, conn_err, auto_err) if e]
+ row.update({
+ "databases": None if db_err else len(dbs),
+ "rows": None if db_err else sum(d["rowCount"] for d in dbs),
+ "connectors": None if conn_err else len(conns),
+ "connectorsPaused": None if conn_err else sum(1 for c in conns if c["paused"]),
+ "automations": None if auto_err else len(autos),
+ "automationsEnabled": None if auto_err else sum(1 for a in autos if a["enabled"]),
+ "keychainLocked": None if conn_err else locked,
+ "errors": errors,
+ })
+ rows.append(row)
+
+ return {
+ "tenants": rows,
+ "totals": {
+ "tenants": len(rows),
+ # EVERY account, not the sum of the rows: an account whose `tenant` names a slug this
+ # deployment no longer knows belongs in the platform total and would vanish from a
+ # per-row sum. `orphanUsers` names that gap instead of hiding it.
+ "users": len(all_users),
+ "orphanUsers": len(all_users) - sum(r["users"] for r in rows),
+ # Sums SKIP unknowns rather than treating them as 0, and say how many were skipped —
+ # a total that silently absorbs an unreadable tenant is a fabricated total.
+ "databases": sum(r["databases"] or 0 for r in rows),
+ "rows": sum(r["rows"] or 0 for r in rows),
+ "automations": sum(r["automations"] or 0 for r in rows),
+ "unknownTenants": sum(1 for r in rows if r["databases"] is None),
+ },
+ "storeAvailable": bool(_store_ok()),
+ # ⚠ OFFSET-BEARING, and that is not pedantry. The client renders this as "read 2 minutes
+ # ago" via `Date.parse`, which reads a NAIVE stamp as browser-local — so a UTC container
+ # and a US viewer would turn "just now" into "5 hours ago", or into a future date that
+ # renders as "just now" forever. The stamps written by `core.users` carry an offset for
+ # the same reason; anything a browser subtracts from `Date.now()` must say what zone it
+ # is in. `verify_api` asserts the offset so this cannot regress to `strftime`.
+ "generatedAt": _now_iso(),
+ "tookMs": int((time.time() - t0) * 1000),
+ }
+
+
+def _store_ok():
+ try:
+ return store.available()
+ except Exception:
+ return False
+
+
+@router.get("/users")
+def platform_users(tenant: str = "", session: Session = Depends(padmin_gate)):
+ """Every account on the platform, or one tenant's — the drill behind the Users count.
+
+ R4's stamps are the columns that did not exist before this wave: `lastLogin` is written by
+ `routes_auth.login`, `lastActive` by `deps.require_session` (throttled to once an hour per
+ account per process). Absent means never seen, and the pane renders it as "never".
+ """
+ rows = _user_rows(tenant)
+ return {"users": rows, "count": len(rows),
+ "stampsNote": ("Login and activity stamps started with this release — accounts that "
+ "have not signed in since show no date rather than an invented one. "
+ "Activity is recorded at most once an hour per account.")}
+
+
+@router.get("/databases")
+def platform_databases(tenant: str = "", session: Session = Depends(padmin_gate)):
+ """Every tenant's user-created databases and row counts — the drill behind Databases/Rows."""
+ out, errors = [], {}
+ for t, rt in _scan(tenant):
+ slug = t["slug"]
+ if rt is None:
+ errors[slug] = t["error"]
+ continue
+ rows, err = _database_rows(slug, rt)
+ if err:
+ errors[slug] = err
+ continue
+ out += rows
+ return {"databases": out, "count": len(out),
+ "rows": sum(d["rowCount"] for d in out), "errors": errors}
+
+
+@router.get("/connectors")
+def platform_connectors(tenant: str = "", session: Session = Depends(padmin_gate)):
+ """Every tenant's data sources, which one is live, and which are paused.
+
+ METADATA ONLY — `keychain.list_entries` never decrypts, so no credential, and no masked
+ preview either: a platform operator needs to know a source EXISTS and whether it serves, not
+ what the secret looks like. The tenant's own admin surface is where previews belong.
+ """
+ out, errors, locked_any = [], {}, {}
+ for t, rt in _scan(tenant):
+ slug = t["slug"]
+ if rt is None:
+ errors[slug] = t["error"]
+ continue
+ rows, err, locked = _connector_rows(slug, rt)
+ if err:
+ errors[slug] = err
+ continue
+ locked_any[slug] = locked
+ out += rows
+ return {"connectors": out, "count": len(out), "keychainLocked": locked_any,
+ "errors": errors,
+ "note": ("A locked keychain means this container has no `AIOS_KEYCHAIN_KEY` — stored "
+ "credentials cannot be read, so a tenant's sources fail closed rather than "
+ "falling back to anyone else's.")}
+
+
+@router.get("/automations")
+def platform_automations(tenant: str = "", session: Session = Depends(padmin_gate)):
+ """Every tenant's automations, their schedules and run history, plus the fleet cost model."""
+ out, errors, retained = [], {}, 20
+ for t, rt in _scan(tenant):
+ slug = t["slug"]
+ if rt is None:
+ errors[slug] = t["error"]
+ continue
+ rows, err, max_runs = _automation_rows(slug, rt)
+ if err:
+ errors[slug] = err
+ continue
+ retained = max_runs
+ out += rows
+ return {"automations": out, "count": len(out),
+ "enabled": sum(1 for a in out if a["enabled"]),
+ "historyRetained": retained,
+ "cost": _automation_cost(out), "errors": errors,
+ "tickEnabled": os.environ.get("AIOS_AUTOMATIONS") == "1"}
+
+
+@router.get("/aws")
+def platform_aws(days: int = 7, session: Session = Depends(padmin_gate)):
+ """The AWS cron's usage report, verbatim, or an honest note explaining its absence."""
+ days = max(1, min(int(days or 7), 90))
+ return {"days": days, "report": _aws_report(days)}
diff --git a/api/routes_products.py b/api/routes_products.py
new file mode 100644
index 0000000000000000000000000000000000000000..dd0eca9e1aaf5e9ac9300e5e305f3c15324eda83
--- /dev/null
+++ b/api/routes_products.py
@@ -0,0 +1,270 @@
+"""routes_products.py — the PRODUCT table's read seam (wave 15 item 9/10, contract C-TOPIC).
+
+The proof that C-TOPIC's bet is real: **a second table object is a pool module plus a route, not
+a second component tree**. Everything structural here is borrowed rather than re-implemented —
+the permission wall (`core.perm_scope`), the row builder (`aios_grid.rows_from_pool`), the
+scope-keyed stale-while-refresh cache (`scope_cache`), the error shape, the module gate.
+
+Landed nav-less in wave 15 ON PURPOSE (no registry row, so no user could navigate to a
+half-built surface while the server half hardened); wave 16 shipped the `product_data`
+registry row, the client `topic` prop and the write path, so the surface has been REACHABLE
+from the nav since — this header stayed stale until 2026-08-04 (the wave-18 debt sweep) and
+cost readers a false "you can't get there from here".
+
+Wave 16 (C-TOPIC's second half): the WRITE PATH exists now, and it is exactly what the wave-15
+header demanded before one could — its OWN table workspace bucket
+(`modules.product_data.TABLE_OPS`, store key 'product_table_workspace') and its own event
+validation (the events route builds the ctx over the PRODUCT field contract + product pids +
+the product ops). ⛔ The separate bucket is load-bearing, not tidy: product pids are CRC32
+hashes and customer pids are Odoo partner ids — one shared overlay bucket and a hash collision
+silently writes a product note onto somebody's customer.
+"""
+import time
+
+from fastapi import Body, Depends
+
+from fastapi import APIRouter
+
+import scope_cache
+from deps import Session, err, module_gate
+
+router = APIRouter(prefix="/api/v1")
+
+#: The registry key this surface WILL carry. The gate is live now even though the nav is not, so
+#: the day the registry row appears the wall is already the one that was tested.
+MODULE = "product_data"
+
+_CACHE_TTL = 900
+
+
+def _pool_for(rt, team_id):
+ """The cached SKU pool for one scope. Same stale-while-refresh discipline as the customer
+ pool: only a scope's FIRST-ever build blocks, and the cache key is the SCOPE, never the user
+ — the customer route learned that the hard way (a per-user payload cached on a scope key
+ served one user's private columns to another)."""
+ import modules.product_data as pd
+
+ # ⚠ Signature is (cache, key, ttl, build) — the wave-15 version passed `ttl=` as a keyword
+ # after the build lambda and DIED on every call ("multiple values for 'ttl'"). Latent until
+ # wave 16 because nothing drove this route end-to-end: verify_perm_scope's section H stubs
+ # the pool a layer below. verify_api's W16 section now exercises the real call.
+ return scope_cache.get(rt.pool_cache, ("product_pool", team_id), _CACHE_TTL,
+ lambda: pd.pool(team_id=team_id))
+
+
+def scoped_pool(session: Session):
+ """`(pids, team_id, rows_src, fields_base)` — THE PRODUCT WALL, on its own.
+
+ Extracted from `product_assembly` (wave 19, item 12) so a caller that needs only "which
+ products may this session touch" — record comments, say — asks the SAME question in the same
+ order rather than re-deriving it: pool scope from the permanent filter, rows, THEN the row
+ wall, THEN the pids. Re-deriving it is how a second wall drifts from the first, and the
+ walls are the whole point of this route.
+
+ ⚠ The caller is responsible for the GRANT (`session.require(MODULE)`); this is the row half.
+ """
+ import core.perm_scope as perm_scope
+
+ team_id, _agent = perm_scope.derive_pool_scope(session.user, MODULE)
+ try:
+ rows_src = _pool_for(session.runtime, team_id)
+ except Exception as e:
+ raise err(503, "pool_unavailable",
+ f"the product catalogue could not be built — {str(e)[:160]}")
+ fields_base = pd_fields(consolidated=team_id is None)
+ # The SAME wall the customer assembly applies, in the same order: rows first (before pids
+ # are taken, so an out-of-filter row never enters allowed_pids), then the field closure,
+ # then the values stripped from the rows as well as the field list.
+ rows_src = perm_scope.apply_row_scope(rows_src, session.user, MODULE, fields_base)
+ pids = frozenset(r["pid"] for r in rows_src if r.get("pid") is not None)
+ return pids, team_id, rows_src, fields_base
+
+
+def product_assembly(session: Session, scope: str = "product", storage_key: str = "",
+ consume_corrections: bool = True):
+ """The product topic's mirror of `routes_customers.grid_assembly` — SAME g-dict keys, so
+ the /workspace and events routes consume either interchangeably.
+
+ One deliberate absence, a topic fact rather than a gap:
+ * `measures`/`measure_sets` are EMPTY — `core.measure_resolve` is CUSTOMER-grain (the
+ C-TOPIC v1 descope, booked in the wave doc); the events ctx therefore refuses measure
+ creates on this surface, which is the correct fail-closed shape.
+
+ ⭐ WAVE 19 / R9 — `lists` IS NO LONGER EMPTY. Wave 16 passed `with_cohorts=False` because
+ there was one customer-keyed cohort bucket and product pids are CRC32 hashes of SKU codes;
+ intersecting the two id spaces would have printed a plausible, meaningless member count. The
+ owner's ruling is that a cohort belongs to its database, so `modules.cohort` grew a bucket
+ per topic and the product surface reads `product_cohorts` — ids from this pool, resolved
+ against this pool. `derived` carries their membership cells (the Cohorts column) for the same
+ reason it does on the customer surface; the measure half of that channel stays empty.
+ """
+ import aios_grid
+ import core.perm_scope as perm_scope
+ import modules.product_data as pd
+ from core import grid_events
+
+ pids, team_id, rows_src, fields_base = scoped_pool(session)
+
+ ctx = grid_events.EventCtx(
+ uname=session.uname, allowed_pids=pids, fields=[],
+ hidden_keys=perm_scope.hidden_keys(session.user, MODULE, fields_base),
+ admin=session.admin, fallback_ws=None, seen_ids={},
+ scope_key="product", table=pd.TABLE_OPS)
+ ws = grid_events.table_workspace(ctx, allowed_pids=pids,
+ consume_corrections=consume_corrections)
+ workspace, fields, views, lists = aios_grid.workspace_wire(
+ ws, session.uname, set(pids), defs={}, scope_key=scope, storage_key=storage_key,
+ fields_base=fields_base)
+
+ hidden = perm_scope.hidden_keys(session.user, MODULE, fields)
+ if hidden:
+ fields = [f for f in fields if f.get("key") not in hidden]
+ rows_src = [perm_scope.strip_row(r, hidden) for r in rows_src]
+
+ return {"rows_src": rows_src, "pids": pids, "ws": ws, "workspace": workspace,
+ "fields": fields, "views": views, "lists": lists,
+ # R9: the Cohorts column's cells, built from THIS topic's lists. Same read-only
+ # `derived` channel the customer assembly uses — the measure half stays empty.
+ "derived": aios_grid.cohort_cells(lists),
+ "measures": [], "measure_sets": {}, "today": time.strftime("%Y-%m-%d"),
+ "team_id": team_id}
+
+
+@router.get("/products")
+def products(session: Session = Depends(module_gate(MODULE))):
+ """The product table for this session's scope — the /customers envelope byte-for-byte
+ (`{fields, rows, today, pulled_at}`) plus two additive keys (`identity`, `scope`).
+
+ The BU scope is DERIVED FROM THE PERMANENT FILTER (`perm_scope.derive_pool_scope`), exactly
+ as the customer route derives it — and for the same reason, which is worth restating because
+ it is the wave's central lesson: `team_id` shapes the revenue VALUES on each row, so a BU
+ enforced as a post-filter yields a correct row list carrying both units' numbers.
+ """
+ import aios_grid
+
+ g = product_assembly(session)
+ rows = _seed_image(aios_grid.rows_from_pool(
+ g["rows_src"], g["fields"], g["ws"].get("overlays"), derived=g["derived"]),
+ g["fields"])
+ return {"fields": g["fields"], "rows": rows,
+ "today": g["today"], "pulled_at": time.strftime("%Y-%m-%d %H:%M"),
+ "identity": {"pid": "pid", "businessKey": "code"},
+ "scope": {"team_id": g["team_id"], "consolidated": g["team_id"] is None}}
+
+
+@router.patch("/products/{pid}")
+def patch_product(pid: int, body: dict = Body(default=None),
+ session: Session = Depends(module_gate(MODULE))):
+ """Write the product table's EDITABLE overlay stratum — the customers PATCH, on the product
+ topic's ctx. Routed through `core.grid_events.handle_one` so the per-key `permissions.edit`
+ wall, the pid wall and the truncation rules stay ONE implementation; the ctx's `table` ops
+ aim the write at the PRODUCT bucket."""
+ import modules.product_data as pd
+ from core import grid_events
+
+ updates = dict(body or {})
+ if not updates:
+ raise err(400, "empty_patch", "no fields to update")
+ g = product_assembly(session, consume_corrections=False)
+ if pid not in g["pids"]:
+ # 403, not 404 — the code may exist; it is simply not in this session's catalogue.
+ raise err(403, "out_of_scope", "that product is not in your catalogue")
+ import core.perm_scope as perm_scope
+
+ ctx = grid_events.EventCtx(
+ uname=session.uname, allowed_pids=g["pids"], fields=g["fields"],
+ admin=session.admin, fallback_ws=None, seen_ids={},
+ hidden_keys=perm_scope.hidden_keys(
+ session.user, MODULE, pd_fields(consolidated=g["team_id"] is None)),
+ scope_key="product", table=pd.TABLE_OPS)
+ try:
+ grid_events.handle_one(
+ {"id": f"patch:product:{pid}:{time.time_ns()}", "type": "overlay_patch",
+ "pid": pid, "updates": updates}, ctx)
+ except grid_events.StoreUnavailable:
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — your change was not saved")
+
+ # What actually landed, read back from the PRODUCT bucket rather than echoed from the
+ # request: a refused key or a truncated value must not be reported as accepted.
+ stored = (grid_events.table_workspace(ctx, allowed_pids=None)
+ .get("overlays") or {}).get(str(pid)) or {}
+ accepted = {k: stored.get(k) for k in updates if k in stored}
+ refused = sorted(k for k in updates
+ if k not in accepted or stored.get(k) != str(updates[k]))
+ out = {"pid": pid, "updates": accepted}
+ if refused:
+ out["refused"] = refused
+ return out
+
+
+#: ⭐ WAVE 19 R7 — the RI Product table's built-in picture column. `source: 'overlay'` (editable,
+#: so a user can upload a different shot for one SKU) with its DEFAULT supplied per render from
+#: the row's `code` — see `_seed_image`. A stamped overlay value would have been the other way to
+#: do it and it is the wrong one twice over: it is a 1,142-row migration that has to be right
+#: once, and it FREEZES the code into the cell, so a re-coded SKU would keep pointing at the old
+#: master with nothing saying why.
+PRODUCT_IMAGE_KEY = "image"
+
+
+def _seed_image(rows, fields):
+ """R7's "auto-seeded from SKU `code`", as a per-render DEFAULT rather than stored data.
+
+ Royal's 1,142 masters are named for `default_code`, so an untouched product row already names
+ its own picture; this is what makes them appear with nothing uploaded. A user's own value is
+ NON-EMPTY and therefore wins — the fallback only fills a cell nobody has set.
+
+ ⚠ Clearing the cell restores the SKU's own picture rather than blanking it, and that is the
+ documented meaning of empty on this column ("no override"). A product with no master on file
+ still shows an empty frame, because the reference resolves to a 404 — the honest outcome, and
+ the record modal names the failing reference in words.
+
+ ⛔ GATED ON THE SERVED FIELD LIST, and that is C-PERM, not tidiness. `product_assembly` strips
+ a hidden field from BOTH wires — the field list and the row payload — because narrowing only
+ the first leaves the value sitting in the second where anything can read it. An unconditional
+ seed would put the key straight back onto every row AFTER that strip, re-creating exactly the
+ shape the rule forbids. (The value here is the visible `code`, so nothing new escapes today;
+ the contract is the point, and a future non-code default would escape.)
+
+ ⚠ STATED CONSEQUENCE: hiding `code` blanks this column, because the reference IS the code.
+ That coupling is inherent to seeding from a business key, not a bug — and it fails in the safe
+ direction (an empty frame, never another row's picture).
+ """
+ if not any(f.get("key") == PRODUCT_IMAGE_KEY for f in fields or ()):
+ return rows
+ for row in rows:
+ if not row.get(PRODUCT_IMAGE_KEY):
+ row[PRODUCT_IMAGE_KEY] = row.get("code") or ""
+ return rows
+
+
+def pd_fields(consolidated=True):
+ """The product field contract, minus the CONSOLIDATED-only columns when the caller is scoped.
+
+ ⛔ The omission is the SCOPE RULE, not a display preference (see `modules/product_data`
+ decision 2): `inventory.sku_inventory` is brand-independent, so serving those columns to a
+ BU-scoped caller would put company-wide stock beside BU-shaped revenue in one row. A column
+ that is absent asks a question; one that is silently company-wide answers a different one.
+ """
+ import json
+ from pathlib import Path
+
+ import aios_grid
+
+ doc = json.loads((Path(aios_grid.__file__).resolve().parent /
+ "aios_grid_fields.json").read_text(encoding="utf-8"))
+ fields = list((doc.get("product_data") or {}).get("fields") or [])
+ # R7: the Image column is BUILT IN on this table, injected here rather than added to
+ # `aios_grid_fields.json`. That file is the ODOO-SOURCED contract — every key in it is a
+ # column `modules.product_data.pool()` reads off a SKU — and this one is neither read from
+ # Odoo nor written to it. Injected after the JSON so the canonical file stays the answer to
+ # "what does Odoo give us", which is the question `verify_fields_contract` referees.
+ fields = fields + [{
+ "key": PRODUCT_IMAGE_KEY, "label": "Image", "type": "image", "source": "overlay",
+ "note": "The product's picture. Empty shows the SKU's own master image; upload one "
+ "from the record panel to override it.",
+ }]
+ if consolidated:
+ return fields
+ import modules.product_data as pd
+ return [f for f in fields if f.get("key") not in pd.CONSOLIDATED_ONLY]
diff --git a/api/routes_records.py b/api/routes_records.py
new file mode 100644
index 0000000000000000000000000000000000000000..bb6d7f3e4886b82bb4520f1267d0c20e54285f70
--- /dev/null
+++ b/api/routes_records.py
@@ -0,0 +1,156 @@
+"""Record detail routes: durable comments, scoped to the caller's book — ON EVERY DATABASE.
+
+⭐ WAVE 19 (owner item 12). This file used to be the CUSTOMER record's comment routes with a
+customer-shaped wall bolted to the module import line: `_in_book` asked
+`routes_customers.allowed_pids` whatever surface the browser was on. Opening a PRODUCT record and
+typing a comment therefore asked the customer book about a CRC32 hash of a SKU code, and the
+panel answered "that customer is not in your book" — the owner's report. The dangerous half is
+the one nobody sees: a hash that collides with a real partner id passes the wall, and the comment
+is filed against somebody's customer where the whole team can read it.
+
+THE SHAPE NOW: `?scope=` names the database (the same vocabulary `/workspace?scope=` and the
+events route's `scopeKey` already speak), and `_pool_or_refuse` resolves BOTH halves of the wall
+per scope — the GRANT and the ROW SET — by asking that topic's own route, never by re-deriving
+one here:
+
+ customer / cohort `routes_customers.allowed_pids` behind the `customer_data` grant
+ product `routes_products.scoped_pool` behind the `product_data` grant
+ ut_ `routes_tables.scoped_pool`, whose `_defn_or_refuse` IS the wall
+ (404 unknown / 403 not yours — a user table has no module grant)
+
+⚠ THE PATH KEEPS ITS `/customers/` SEGMENT. It is the shipped URL and `verify_api.py`'s E1a
+section pins it; the scope now travels beside it explicitly. A nicer noun is not worth churning
+another session's gate mid-wave — the WALL is the query parameter, not the word.
+
+⚠ NO DEFAULT BEYOND THE LEGACY ONE. An absent `scope` means `customer`, which is what every
+shipped client sent and what keeps the old callers byte-identical; an UNRECOGNISED scope is a
+400, never a silent fallback to the customer book (`routes_grid._scope_or_400`'s rule, and for
+the same reason: a typo served as `customer` answers a question nobody asked).
+"""
+from fastapi import APIRouter, Body, Depends, Query
+
+from deps import Session, err, require_session
+
+router = APIRouter(prefix="/api/v1")
+
+#: The customer topic's two names — one book, two surfaces (the Cohort page is the customer table
+#: over hand-curated sets). Mirrors `modules.cohort.LEGACY_SCOPES` / `core.record_comments`.
+_CUSTOMER_SCOPES = ("", "customer", "cohort")
+
+
+def _scope_or_400(raw):
+ scope = str(raw or "customer").strip().lower()
+ if scope in _CUSTOMER_SCOPES or scope == "product" or scope.startswith("ut_"):
+ return "customer" if scope in _CUSTOMER_SCOPES else scope
+ raise err(400, "bad_scope",
+ "scope must be customer, cohort, product or a ut_ database — refusing to guess")
+
+
+def _pool_or_refuse(session: Session, scope: str):
+ """The pids this session may attach comments to ON THIS DATABASE — grant wall included.
+
+ Returns the frozenset. Raises the topic's own 403/404/503, so a caller who may not open the
+ surface never learns anything about the row they asked about.
+ """
+ if scope == "product":
+ from routes_products import MODULE as PRODUCT_MODULE, scoped_pool
+
+ session.require(PRODUCT_MODULE)
+ pids, _team, _rows, _fields = scoped_pool(session)
+ return pids
+ if scope.startswith("ut_"):
+ # No module grant exists for a user table — `_defn_or_refuse` inside `scoped_pool` IS
+ # the wall (creator or admin, fail-closed), and it answers 404 before 403 exactly as the
+ # rows routes do.
+ from routes_tables import scoped_pool
+
+ pids, _rows, _fields, _defn = scoped_pool(session, scope)
+ return pids
+ from routes_customers import MODULE as CUSTOMER_MODULE, allowed_pids
+
+ session.require(CUSTOMER_MODULE)
+ return frozenset(allowed_pids(session))
+
+
+def _in_book(pid, session, scope):
+ if pid not in _pool_or_refuse(session, scope):
+ # 403, not 404: the record may exist, but this session may not inspect it.
+ raise err(403, "out_of_scope", "that record is not in your book")
+
+
+def _unavailable():
+ return err(
+ 503,
+ "store_unavailable",
+ "record comments are temporarily unavailable — no change was saved",
+ )
+
+
+@router.get("/customers/{pid}/comments")
+def comments(pid: int, scope: str = Query(default="customer"),
+ session: Session = Depends(require_session)):
+ from core import record_comments
+
+ scope = _scope_or_400(scope)
+ _in_book(pid, session, scope)
+ try:
+ rows = record_comments.list_comments(session.runtime, pid, scope=scope)
+ except record_comments.CommentsUnavailable:
+ raise _unavailable()
+ return {"comments": rows}
+
+
+@router.post("/customers/{pid}/comments", status_code=201)
+def create_comment(
+ pid: int,
+ body: dict = Body(default=None),
+ scope: str = Query(default="customer"),
+ session: Session = Depends(require_session),
+):
+ from core import record_comments
+
+ scope = _scope_or_400(scope)
+ _in_book(pid, session, scope)
+ try:
+ comment = record_comments.add_comment(
+ session.runtime,
+ pid,
+ (body or {}).get("body"),
+ session.uname,
+ session.user.get("name") or session.uname,
+ scope=scope,
+ )
+ except ValueError as exc:
+ raise err(400, "bad_comment", str(exc))
+ except record_comments.CommentsUnavailable:
+ raise _unavailable()
+ return {"comment": comment}
+
+
+@router.delete("/customers/{pid}/comments/{comment_id}")
+def remove_comment(
+ pid: int,
+ comment_id: str,
+ scope: str = Query(default="customer"),
+ session: Session = Depends(require_session),
+):
+ from core import record_comments
+
+ scope = _scope_or_400(scope)
+ _in_book(pid, session, scope)
+ try:
+ deleted = record_comments.delete_comment(
+ session.runtime,
+ pid,
+ comment_id,
+ session.uname,
+ admin=session.admin,
+ scope=scope,
+ )
+ except record_comments.CommentForbidden:
+ raise err(403, "comment_forbidden", "only the author may delete this comment")
+ except record_comments.CommentsUnavailable:
+ raise _unavailable()
+ if not deleted:
+ raise err(404, "comment_not_found", "that comment no longer exists")
+ return {"ok": True, "id": comment_id}
diff --git a/api/routes_statements.py b/api/routes_statements.py
new file mode 100644
index 0000000000000000000000000000000000000000..fb608f0da2cfb35c3dccd25d431893e6c8a1b141
--- /dev/null
+++ b/api/routes_statements.py
@@ -0,0 +1,168 @@
+"""routes_statements.py — the statement-of-account sender, ported off Streamlit (EXIT-6).
+
+⛔ THIS IS THE ONE SANCTIONED ODOO WRITER IN THE ENTIRE SYSTEM. Everything else in AIOS is
+read-only on Odoo by hard block. `modules/collections_send.py` owns a narrow client that whitelists
+exactly `mail.mail create` (queueing an outbound email) and nothing else; these routes call it and
+add no write of their own.
+
+WHY IT EXISTS SEPARATELY FROM THE COLLECTIONS PAGE. Owner ruling wave-17 item 15 retired the
+Collections *dashboard* — the worklist is the shared "Collections" view on the Customer grid, from
+the same reconciled blocks. What that ruling explicitly left "untouched" is this send workflow, so
+when `app.py` is deleted it is the ONLY live Streamlit-only feature, and it moves here rather than
+dying with the host. Ported faithfully: same tiers, same filters, same template placeholders, same
+preview, same test-send, same two-step confirm.
+
+THE THREE GUARDRAILS, and where each is enforced:
+ 1. SAFE_MODE (default ON) — in the DATA LAYER (`collections_send.queue_statement`), so no route,
+ payload or UI can bypass it. These routes only REPORT it; they never re-implement the check.
+ 2. Admin only — `admin_gate` (role, fail-closed), mirroring the Streamlit `if not is_admin()`.
+ 3. ⭐ TENANT — NEW HERE, and it did not exist in Streamlit because it could not. `cs_mod.Odoo()`
+ reads Odoo credentials from the ENVIRONMENT, which after the keychain cutover belongs to
+ TENANT #0 ALONE. On the multi-tenant API an unguarded route would let a nurilab or gtmlab
+ admin queue mail from Royal Imports' Odoo, as Royal Imports. `_royal_only` closes that; the
+ single-tenant Streamlit host never had the exposure, so this is a port that must ADD a wall
+ rather than copy one.
+
+NOTHING SENDS ON A GET. The send route requires an explicit customer list in the body; there is no
+"send all" parameter, deliberately — the confirm step is a product requirement, not a formality.
+"""
+from fastapi import APIRouter, Body, Depends
+
+from deps import Session, err
+from routes_admin import admin_gate
+
+router = APIRouter(prefix="/api/v1")
+
+#: Cache the Odoo follow-up pull briefly. The Streamlit page used `@st.cache_data(ttl=1800)`; the
+#: list moves slowly (it is a dunning worklist, not a live feed) and the pull is a multi-model read.
+_TTL = 1800
+_cache = {"at": 0.0, "rows": None}
+
+
+def _cs():
+ import modules.collections_send as cs
+ return cs
+
+
+def _royal_only(session: Session) -> Session:
+ """⛔ See the module docstring, guardrail 3. The send client is env-credentialed, so it is
+ tenant #0's and only tenant #0's. Refuse for anyone else rather than send as the wrong company.
+
+ Keyed on the runtime, never on a request field: a tenant is a property of the SESSION."""
+ if getattr(session.runtime, "key", None) != "royal-imports":
+ raise err(404, "not_found", "statements are not configured for this workspace")
+ return session
+
+
+def _gate(session: Session = Depends(admin_gate)) -> Session:
+ return _royal_only(session)
+
+
+def _rows(force=False):
+ import time
+ cs = _cs()
+ if force or _cache["rows"] is None or (time.time() - _cache["at"]) > _TTL:
+ _cache["rows"] = cs.load_collection_list(cs.Odoo())
+ _cache["at"] = time.time()
+ return _cache["rows"], time.strftime("%Y-%m-%d %H:%M", time.localtime(_cache["at"]))
+
+
+def _public(row):
+ """Strip the internals the Streamlit grid also hid (`_`-prefixed + partner_id is kept, because
+ the client needs a stable row identity that is not the display name)."""
+ return {k: v for k, v in row.items() if not str(k).startswith("_")}
+
+
+@router.get("/admin/statements")
+def statements(refresh: int = 0, session: Session = Depends(_gate)):
+ """The worklist + everything the sender UI needs to render itself honestly."""
+ cs = _cs()
+ try:
+ rows, loaded_at = _rows(force=bool(refresh))
+ except Exception as e:
+ raise err(502, "odoo_unavailable", f"could not load the collection list: {str(e)[:200]}")
+ return {
+ "rows": [_public(r) for r in rows],
+ "loadedAt": loaded_at,
+ # The guardrail is reported, never decided, here — the data layer owns it.
+ "safeMode": bool(cs.SAFE_MODE),
+ "safeRecipients": sorted(cs.SAFE_RECIPIENTS),
+ "sender": {"name": cs.SENDER_NAME, "email": cs.SENDER_EMAIL,
+ "replyTo": cs.REPLY_TO, "company": cs.COMPANY},
+ "templates": {"subject": cs.DEFAULT_SUBJECT, "intro": cs.DEFAULT_INTRO,
+ "footer": cs.DEFAULT_FOOTER},
+ "tiers": ["A-Urgent", "B-Active", "C-Light", "Monitor"],
+ }
+
+
+def _find(rows, customer):
+ return next((r for r in rows if r.get("Customer") == customer), None)
+
+
+@router.post("/admin/statements/preview")
+def preview(body: dict = Body(default=None), session: Session = Depends(_gate)):
+ """Render ONE customer's statement exactly as the send path would."""
+ cs = _cs()
+ body = body or {}
+ rows, _ = _rows()
+ row = _find(rows, body.get("customer"))
+ if row is None:
+ raise err(404, "not_found", "no such customer on the collection list")
+ t = body.get("templates") or {}
+ import datetime as dt
+ month = dt.date.today().strftime("%B %Y")
+ subject = (t.get("subject") or cs.DEFAULT_SUBJECT)
+ try:
+ subject = subject.format(customer=row["Customer"], company=cs.COMPANY, month=month)
+ except (KeyError, IndexError):
+ # An unknown placeholder is the user's typo, not a 500. Show the template verbatim so they
+ # can see what they typed rather than getting an opaque error.
+ pass
+ return {
+ "html": cs.render_statement_html(row, t.get("intro") or cs.DEFAULT_INTRO,
+ t.get("footer") or cs.DEFAULT_FOOTER),
+ "to": row.get("Email") or "",
+ "subject": subject,
+ }
+
+
+@router.post("/admin/statements/send")
+def send(body: dict = Body(default=None), session: Session = Depends(_gate)):
+ """Queue statements. Returns per-customer outcomes — NEVER a bare count.
+
+ `overrideTo` is the test-send path: one customer, one address. SAFE_MODE still applies (the
+ data layer refuses an address outside the allow-list), which is why the route does not check it.
+ """
+ cs = _cs()
+ body = body or {}
+ names = [str(n) for n in (body.get("customers") or []) if str(n).strip()]
+ if not names:
+ raise err(400, "bad_request", "name at least one customer")
+ override = (body.get("overrideTo") or "").strip() or None
+ if override and len(names) != 1:
+ raise err(400, "bad_request", "a test send takes exactly one customer")
+ t = body.get("templates") or {}
+ rows, _ = _rows()
+
+ sent, failed, skipped = [], [], []
+ for name in names:
+ row = _find(rows, name)
+ if row is None:
+ failed.append({"customer": name, "error": "not on the current collection list"})
+ continue
+ if not override and not row.get("Email"):
+ # The Streamlit page warned and skipped these. Reporting them SEPARATELY from failures
+ # keeps "we could not" distinct from "there was nowhere to send".
+ skipped.append({"customer": name, "reason": "no email address on the customer record"})
+ continue
+ try:
+ mid = cs.queue_statement(cs.Odoo(), row, t.get("subject") or cs.DEFAULT_SUBJECT,
+ t.get("intro") or cs.DEFAULT_INTRO,
+ t.get("footer") or cs.DEFAULT_FOOTER, override_to=override)
+ sent.append({"customer": name, "to": override or row.get("Email"), "mailId": mid})
+ except Exception as e:
+ # SafeModeBlocked lands here too, and that is correct: to the caller a guardrail refusal
+ # and an Odoo error are both "this one did not go", each with its own honest message.
+ failed.append({"customer": name, "error": str(e)[:200]})
+ return {"sent": sent, "failed": failed, "skipped": skipped,
+ "safeMode": bool(cs.SAFE_MODE), "test": bool(override)}
diff --git a/api/routes_tables.py b/api/routes_tables.py
new file mode 100644
index 0000000000000000000000000000000000000000..1c7355c74d8d3c2821d921527a909a74e3399a4d
--- /dev/null
+++ b/api/routes_tables.py
@@ -0,0 +1,257 @@
+"""routes_tables.py — USER TABLES over the wire (wave 18, contract C3-UT).
+
+The runtime-database primitive: `core/user_tables.py` (wave-9 C6, host-only until now) served
+through the SAME grid machinery every other topic rides — `table_store` for the per-user
+workspace strata, `aios_grid.workspace_wire` for the wire shape, `core.grid_events` for every
+durable write except rows. Rows are the one genuinely new channel: the events seam has no row
+event types (the user_tables docstring's `row_add` gate was described, never built), so row
+add/delete/patch are REST endpoints here, walled by `user_tables.is_user_table` +
+`user_tables.may_open` — a connector-backed table can never accept an invented row.
+
+TENANCY: every store touch goes through `session.runtime` (the tenant's store handle), so a
+Nurilab admin's tables live under Nurilab's prefix/repo, and the isolation gate's proof #3
+covers them for free.
+
+VISIBILITY is `user_tables.may_open` — creator or admin, fail-closed. There is no module grant
+to check because a user table is not a module; the per-table wall is the whole wall, and it is
+applied in `_defn_or_refuse` before any payload is built.
+"""
+import time
+
+from fastapi import Body, Depends
+from fastapi import APIRouter
+
+from deps import Session, err, require_session
+
+router = APIRouter(prefix="/api/v1")
+
+
+def _ut():
+ import core.user_tables as user_tables
+ return user_tables
+
+
+def _ops(session, table_key):
+ import core.table_store as table_store
+ return table_store.make(f"{table_key}_table_workspace", st=session.runtime)
+
+
+def _defn_or_refuse(session, table_key):
+ """The per-table wall: 404 for a key that does not exist, 403 for one this session may not
+ open. 404-before-403 leaks nothing useful — ut keys are guessable slugs, and 'exists but
+ not yours' is exactly what may_open is for."""
+ ut = _ut()
+ defn = ut.get(table_key, st=session.runtime)
+ if not defn:
+ raise err(404, "unknown_table", "that database does not exist")
+ if not ut.may_open(table_key, session.uname, session.admin, st=session.runtime):
+ raise err(403, "forbidden", "that database belongs to another user")
+ return defn
+
+
+def scoped_pool(session: Session, table_key: str):
+ """`(pids, rows_src, fields_base, defn)` — THE USER-TABLE WALL, on its own.
+
+ `routes_products.scoped_pool`'s sibling, extracted for the same reason (wave 19, item 12): a
+ caller that only needs "which rows of this database may this session touch" — record comments
+ — must ask through `_defn_or_refuse` (404/403, the whole wall) rather than growing a second
+ idea of what a user table's pool is.
+ """
+ defn = _defn_or_refuse(session, table_key)
+ fields_base = [dict(f) for f in (defn.get("fields") or [])]
+ field_keys = {f["key"] for f in fields_base}
+ rows_src = []
+ for rid, row in (defn.get("rows") or {}).items():
+ if not str(rid).isdigit():
+ continue
+ r = {k: v for k, v in (row or {}).items() if k in field_keys}
+ r["pid"] = int(rid)
+ rows_src.append(r)
+ rows_src.sort(key=lambda r: r["pid"])
+ return frozenset(r["pid"] for r in rows_src), rows_src, fields_base, defn
+
+
+def ut_assembly(session: Session, table_key: str, storage_key: str = "",
+ consume_corrections: bool = True):
+ """The user-table mirror of `grid_assembly` / `product_assembly` — SAME g-dict keys, so
+ `/workspace` and the events route consume any of the three interchangeably.
+
+ Honest absence: `measures`/`measure_sets` are EMPTY — `core.measure_resolve` is
+ customer-grain, so there is nothing to offer over user rows.
+
+ ⭐ WAVE 19 / R9 — `lists` IS NO LONGER EMPTY. "For ANY database new/old": a user table gets
+ cohorts like every other database, out of its OWN bucket (`ut__cohorts`), holding its
+ own row ids. The wave-18 refusal was correct while there was one customer-keyed bucket and
+ wrong the moment the store learned about topics."""
+ import aios_grid
+ from core import grid_events
+
+ pids, rows_src, fields_base, defn = scoped_pool(session, table_key)
+
+ ops = _ops(session, table_key)
+ ctx = grid_events.EventCtx(
+ uname=session.uname, allowed_pids=pids, fields=[], hidden_keys=frozenset(),
+ admin=session.admin, fallback_ws=None, seen_ids={},
+ scope_key=table_key, table=ops)
+ ws = grid_events.table_workspace(ctx, allowed_pids=pids,
+ consume_corrections=consume_corrections)
+ workspace, fields, views, lists = aios_grid.workspace_wire(
+ ws, session.uname, set(pids), defs={}, scope_key=table_key,
+ storage_key=storage_key, fields_base=fields_base)
+
+ return {"rows_src": rows_src, "pids": pids, "ws": ws, "workspace": workspace,
+ "fields": fields, "views": views, "lists": lists,
+ # R9: the Cohorts column's cells from this table's own lists.
+ "derived": aios_grid.cohort_cells(lists),
+ "measures": [], "measure_sets": {}, "today": time.strftime("%Y-%m-%d"),
+ "defn": defn}
+
+
+@router.get("/tables")
+def list_tables(session: Session = Depends(require_session)):
+ """This session's user tables — the list the '+ New database' surface renders."""
+ ut = _ut()
+ out = []
+ for key, t in sorted(ut.all_tables(st=session.runtime).items(),
+ key=lambda kv: (kv[1].get("label") or "").lower()):
+ if not ut.may_open(key, session.uname, session.admin, st=session.runtime):
+ continue
+ out.append({"key": key, "label": t.get("label") or key,
+ "source": t.get("source") or "Blank",
+ "createdBy": t.get("createdBy") or "",
+ "created": t.get("created") or "",
+ "fields": [dict(f) for f in (t.get("fields") or [])],
+ "rowCount": len(t.get("rows") or {})})
+ return {"tables": out}
+
+
+@router.post("/tables", status_code=201)
+def create_table(body: dict = Body(default=None),
+ session: Session = Depends(require_session)):
+ ut = _ut()
+ body = body or {}
+ label = str(body.get("label") or "").strip()
+ if not label:
+ raise err(400, "bad_label", "give the database a name")
+ if not session.runtime.available():
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — nothing was created")
+ source = body.get("source")
+ try:
+ key = ut.create(label, session.uname, fields=body.get("fields"),
+ source=source, st=session.runtime)
+ except Exception:
+ raise err(503, "store_unavailable",
+ "the tenant store refused the write — nothing was created")
+ if not key:
+ raise err(400, "refused",
+ f"could not create it — the name may be empty or this tenant already has "
+ f"{ut.MAX_TABLES} databases")
+ return {"key": key}
+
+
+@router.delete("/tables/{table_key}")
+def delete_table(table_key: str, session: Session = Depends(require_session)):
+ """Creator or admin only — the same actors `may_open` admits, and deletion is the one
+ operation the client must confirm explicitly (the server cannot tell a click from a plan)."""
+ _defn_or_refuse(session, table_key)
+ try:
+ _ut().delete(table_key, st=session.runtime)
+ except Exception:
+ raise err(503, "store_unavailable", "the delete did not land — try again")
+ # The workspace bucket (views/custom fields/overlays) is left in place: a delete that also
+ # destroyed per-user state would make an accidental delete unrecoverable, and the bucket is
+ # invisible without its definition. Booked, not hidden.
+ return {"ok": True}
+
+
+@router.get("/tables/{table_key}/rows")
+def table_rows(table_key: str, session: Session = Depends(require_session)):
+ """The `/customers`-shaped envelope for one user table: `{fields, rows, today, pulled_at,
+ identity}` — so the client's generic topic fetch consumes it with zero new parsing.
+
+ ⚠ THE MERGE ORDER IS THE CONTRACT. `rows_from_pool` sources an overlay-typed field's cell
+ from the OVERLAY stratum only (that is what makes a custom column render standalone) — a
+ user table's base values live in its DEFINITION rows, so they are layered UNDER the user's
+ overlay edits here: base first, overlay wins. Without this every base cell reads empty
+ (found by this route's own gate check, not by luck)."""
+ import aios_grid
+
+ g = ut_assembly(session, table_key)
+ merged = {str(r["pid"]): {k: v for k, v in r.items() if k != "pid"}
+ for r in g["rows_src"]}
+ for pid, cells in (g["ws"].get("overlays") or {}).items():
+ if isinstance(cells, dict):
+ merged.setdefault(str(pid), {}).update(cells)
+ rows = aios_grid.rows_from_pool(
+ g["rows_src"], g["fields"], merged, derived=g["derived"])
+ return {"fields": g["fields"], "rows": rows, "today": g["today"],
+ "pulled_at": time.strftime("%Y-%m-%d %H:%M"),
+ "identity": {"pid": "pid"},
+ "scope": {"table": table_key, "rowCount": len(rows)}}
+
+
+@router.post("/tables/{table_key}/rows", status_code=201)
+def add_row(table_key: str, body: dict = Body(default=None),
+ session: Session = Depends(require_session)):
+ _defn_or_refuse(session, table_key)
+ ut = _ut()
+ values = (body or {}).get("values") or {}
+ if not isinstance(values, dict):
+ raise err(400, "bad_values", "values must be an object of {fieldKey: value}")
+ try:
+ rid = ut.add_row(table_key, values, session.uname, st=session.runtime)
+ except Exception:
+ raise err(503, "store_unavailable", "the row was not saved — the store refused")
+ if rid is None:
+ raise err(400, "refused",
+ f"row refused — the table may be at its {ut.MAX_ROWS}-row cap")
+ return {"rid": rid, "pid": int(rid)}
+
+
+@router.delete("/tables/{table_key}/rows/{rid}")
+def delete_row(table_key: str, rid: str, session: Session = Depends(require_session)):
+ _defn_or_refuse(session, table_key)
+ try:
+ ok = _ut().delete_row(table_key, rid, st=session.runtime)
+ except Exception:
+ raise err(503, "store_unavailable", "the delete did not land — try again")
+ if not ok:
+ raise err(400, "refused", "rows can only be deleted from user-created databases")
+ return {"ok": True}
+
+
+@router.patch("/tables/{table_key}/rows/{pid}")
+def patch_row(table_key: str, pid: int, body: dict = Body(default=None),
+ session: Session = Depends(require_session)):
+ """Cell edits — the products PATCH on the user-table ctx. Routed through
+ `core.grid_events.handle_one` so truncation and permission rules stay ONE implementation;
+ the accepted values are read BACK from the bucket, never echoed from the request."""
+ from core import grid_events
+
+ updates = dict(body or {})
+ if not updates:
+ raise err(400, "empty_patch", "no fields to update")
+ g = ut_assembly(session, table_key, consume_corrections=False)
+ if pid not in g["pids"]:
+ raise err(403, "out_of_scope", "that row is not in this database")
+ ctx = grid_events.EventCtx(
+ uname=session.uname, allowed_pids=g["pids"], fields=g["fields"],
+ admin=session.admin, fallback_ws=None, seen_ids={}, hidden_keys=frozenset(),
+ scope_key=table_key, table=_ops(session, table_key))
+ try:
+ grid_events.handle_one(
+ {"id": f"patch:{table_key}:{pid}:{time.time_ns()}", "type": "overlay_patch",
+ "pid": pid, "updates": updates}, ctx)
+ except grid_events.StoreUnavailable:
+ raise err(503, "store_unavailable",
+ "the tenant store is unavailable — your change was not saved")
+ stored = (grid_events.table_workspace(ctx, allowed_pids=None)
+ .get("overlays") or {}).get(str(pid)) or {}
+ accepted = {k: stored.get(k) for k in updates if k in stored}
+ refused = sorted(k for k in updates
+ if k not in accepted or stored.get(k) != str(updates[k]))
+ out = {"pid": pid, "updates": accepted}
+ if refused:
+ out["refused"] = refused
+ return out
diff --git a/api/scope_cache.py b/api/scope_cache.py
new file mode 100644
index 0000000000000000000000000000000000000000..9c433a8ef595e5177014baaf2fd96124bf22c3e2
--- /dev/null
+++ b/api/scope_cache.py
@@ -0,0 +1,82 @@
+"""scope_cache.py — stale-while-refresh for the scope-shaped caches (the owner cache rule).
+
+THE RULE, ported from the Streamlit host's cache architecture ([[ri-os-cache-architecture]]):
+once a copy exists, NO request ever blocks on a rebuild. A fresh hit returns. A STALE hit
+returns the stale copy immediately and refreshes ONCE in a background thread (per-key
+single-flight). Only a true miss — no copy at all — builds synchronously, and concurrent
+missers wait on the builder's lock instead of stampeding Odoo with N identical pulls.
+
+WHY THIS EXISTS. The wave-2 caches were expire-and-block: at TTL+1s the next visitor paid the
+full Odoo pool build (10–30s) in the request path, every 15 minutes, per scope — measured live
+as the "extremely long loads". Serving 15-minute-old figures for the seconds a refresh takes is
+the documented, owner-chosen trade; blocking a person on an Odoo pull is not.
+
+WHAT THIS DOES NOT CHANGE. The cache MAP and its entry shape stay exactly as the routes had
+them — `rt.pool_cache[key] = (ts, value)` — because `verify_api.py` asserts that map holds only
+scope-keyed raw values (the cross-user-leak gate). This module only decides WHEN `build()` runs
+and on which thread.
+
+⚠ `build` runs with no request context on the refresh path — it must be scope-shaped only
+(team_id/agent/granularity), never session-shaped. That is already the routes' own leak rule.
+"""
+import threading
+import time
+
+#: (id(cache), key) -> Lock. Keyed by the cache object's identity so two tenants' runtimes can
+#: never share a flight; bounded by the caches' own eviction (a lock per live cache key).
+_FLIGHTS = {}
+_FLIGHTS_GUARD = threading.Lock()
+
+
+def _flight(cache, key):
+ fk = (id(cache), key)
+ with _FLIGHTS_GUARD:
+ lk = _FLIGHTS.get(fk)
+ if lk is None:
+ lk = _FLIGHTS[fk] = threading.Lock()
+ # The map only grows with distinct live keys; prune anything not currently held once it
+ # gets silly. Cheap and rare — this is hygiene, not a hot path.
+ if len(_FLIGHTS) > 512:
+ for k in [k for k, v in _FLIGHTS.items() if not v.locked()][:256]:
+ _FLIGHTS.pop(k, None)
+ return lk
+
+
+def get(cache, key, ttl, build, evict=None):
+ """The value for `key`, per the rule above. `evict` (optional callable) runs after a write
+ to apply the caller's own bound — bounds differ per cache and stay owned by the caller."""
+ now = time.time()
+ hit = cache.get(key)
+ if hit and now - hit[0] < ttl:
+ return hit[1]
+
+ lk = _flight(cache, key)
+
+ if hit:
+ # STALE: serve it now; refresh once in the background. If a refresh is already in
+ # flight, this request just rides the stale copy — that is the whole point.
+ if lk.acquire(blocking=False):
+ def _refresh():
+ try:
+ cache[key] = (time.time(), build())
+ if evict:
+ evict()
+ except Exception:
+ pass # stale stays servable; the next expiry retries
+ finally:
+ lk.release()
+ threading.Thread(target=_refresh, daemon=True,
+ name=f"scope-refresh:{key!r}").start()
+ return hit[1]
+
+ # MISS: nothing to serve — build in the request path, single-flight. Late arrivals block
+ # on the lock and then reuse the winner's entry instead of rebuilding.
+ with lk:
+ hit = cache.get(key)
+ if hit and time.time() - hit[0] < ttl:
+ return hit[1]
+ value = build()
+ cache[key] = (time.time(), value)
+ if evict:
+ evict()
+ return value
diff --git a/platform/aios_grid.py b/platform/aios_grid.py
new file mode 100644
index 0000000000000000000000000000000000000000..a3c653a8da08130237ba1db43c84c982103e091b
--- /dev/null
+++ b/platform/aios_grid.py
@@ -0,0 +1,1811 @@
+"""aios_grid — embed the AIOS React/glide Airtable-style grid inside Streamlit.
+
+This is REUSABLE MODULE INFRASTRUCTURE: the same self-contained grid that runs as the
+standalone aios-web app is inlined into a single HTML file and hosted inside a Streamlit
+component. The React bundle reads its data from `window.__AIOS_GRID__` (an object
+`{fields, rows}`) that we inject into the page before the app's module script runs
+— so there is NO backend and NO /api call in the Streamlit container; the browser only ever
+sees the derived JSON we hand it.
+
+Usage (from any page):
+ import aios_grid
+ aios_grid.render(aios_grid.rows_from_pool(pool_rows), aios_grid.FIELDS)
+
+Design notes:
+ * ZERO app-internal imports (no `modules.*` / `core.*`). FIELDS is a literal and
+ `rows_from_pool` takes already-built rows — so this helper is tenant/module-agnostic and
+ sidesteps deploy_hf.py's import guard entirely.
+ * The built HTML ships as `aios_grid_embed.html` in THIS directory (added to
+ deploy_hf.py INCLUDE). Build it with `npm run build:embed` in aios-web/web, then copy
+ dist-embed/index.html -> platform/aios_grid_embed.html (see build_embed.py).
+ For LOCAL dev before that copy, we fall back to reading dist-embed/index.html directly.
+ * The preferred host is a Streamlit Components v1 bridge. It sends data/view/schema args
+ into the React app and returns guarded events for persistence in the tenant store. The old
+ injected-HTML path remains a read/local-write fallback when component assets are absent.
+"""
+import json
+import re
+from pathlib import Path
+
+_HERE = Path(__file__).resolve().parent
+
+# Where the inlined single-file build lives. FIRST match wins:
+# 1. the shipped copy in this dir (what deploy_hf.py uploads to the Space)
+# 2. the raw build output in the sibling aios-web tree (local dev, pre-copy)
+_EMBED_CANDIDATES = [
+ _HERE / "aios_grid_embed.html",
+ _HERE.parent / "aios-web" / "web" / "dist-embed" / "index.html",
+]
+_COMPONENT_CANDIDATES = [
+ _HERE / "aios_grid_component",
+ _HERE.parent / "aios-web" / "web" / "dist-embed",
+]
+_DECLARED_COMPONENTS = {}
+
+# --- the FIELD CONTRACT — loaded from the CANONICAL source `aios_grid_fields.json` in THIS
+# directory (the SINGLE source of truth, shared with aios-web/api/main.py). source='odoo' is
+# READ-ONLY; source='overlay' is the editable stratum (notes/tags) that lives OUTSIDE Odoo.
+#
+# Why a sibling JSON and NOT an import: aios_grid.py's contract is ZERO app-internal imports so
+# it stays tenant/module-agnostic and sidesteps deploy_hf.py's import guard. A JSON next to the
+# module preserves that exactly — no import, no guard interaction — while still single-sourcing
+# the values (a build-time copy from another tree would reintroduce the drift we're removing).
+# The file ships to the Space via deploy_hf.py INCLUDE. Edit the JSON, then run
+# aios-web/verify_fields_contract.py. ---
+_FIELDS_PATH = _HERE / "aios_grid_fields.json"
+
+
+def _load_fields():
+ if not _FIELDS_PATH.is_file():
+ raise FileNotFoundError(
+ f"aios_grid: canonical field contract missing at {_FIELDS_PATH}. It is the single "
+ "source of truth for the grid schema and MUST ship (deploy_hf.py INCLUDE lists it)."
+ )
+ doc = json.loads(_FIELDS_PATH.read_text(encoding="utf-8"))
+ fields = doc.get("fields") if isinstance(doc, dict) else doc
+ if not isinstance(fields, list) or not fields:
+ raise ValueError(f"aios_grid: {_FIELDS_PATH} has no 'fields' list.")
+ return fields
+
+
+FIELDS = _load_fields()
+
+
+def product_fields():
+ """The PRODUCT table's canonical contract (wave 15 C-TOPIC, `product_data` key in the same
+ JSON). A separate accessor rather than a second module constant so the one file-read and the
+ one failure mode stay shared with `FIELDS`."""
+ doc = json.loads(_FIELDS_PATH.read_text(encoding="utf-8"))
+ fields = (doc.get("product_data") or {}).get("fields")
+ if not isinstance(fields, list) or not fields:
+ raise ValueError(f"aios_grid: {_FIELDS_PATH} has no product_data.fields list.")
+ return fields
+
+# text/date fields pass through untouched; every OTHER odoo (numeric) field is rounded —
+# mirrors aios-web/api/main.py _payload() exactly so embed == standalone byte-for-byte.
+
+
+def _round(v):
+ return round(v) if isinstance(v, (int, float)) and not isinstance(v, bool) else v
+
+
+# Types a USER may create from the column menu (owner item 7, 2026-07-26). Mirrors
+# customer-grid/types.ts CREATABLE_TYPES; verify_fields_contract.py holds the two in step.
+# select — a single-select with its own `options` (the "Status" a user wants to add; distinct
+# from the Odoo-sourced `status` lifecycle, which is not user-defined)
+# user — an assignee, whose choices come from the HOST's real user list, never from here
+#: `multiselect` (wave-2 item 5, 2026-07-27): the Airtable-style MULTI select — declared
+#: options like `select`, but the cell holds a comma-joined SET and the row belongs to every
+#: member of it (the `multi` grouping/cell contract the Cohorts column established).
+#: Wave-5 item 11 (2026-07-27): `checkbox` (cell = bool; the overlay stores '1' or '') ·
+#: `phone` / `email` / `url` (text-family with per-type rendering) · `rating` (top-level
+#: `max`, SVG stars client-side — never emoji) · `created_time` (READ-ONLY, renders the row's
+#: `_created`) · `formula` (READ-ONLY, client-computed from the row's other cells).
+#: ⭐ Wave-19 R7 / contract C5: `image` — a PICTURE on a record. The cell holds a string
+#: REFERENCE, never bytes: a product `code`, an `ed:` editorial asset, or `rec:` for
+#: something uploaded through the field (`POST /api/v1/assets/records`). Storing a reference is
+#: what lets Royal's 1,142 existing SKU masters appear with nothing re-uploaded, and it keeps the
+#: overlay stratum the size it is — base64 bytes in a JSON blob read on every render would be a
+#: megabyte-per-row tax on the whole store. Editable by NATURE (deliberately NOT in
+#: `READONLY_CUSTOM_TYPES`): the ref is what the upload endpoint hands back, and the client PATCHes
+#: it through the ordinary overlay wall rather than the asset route writing cells behind it.
+CUSTOM_FIELD_TYPES = {"text", "select", "multiselect", "user", "int", "currency", "pct", "date",
+ "checkbox", "phone", "email", "url", "rating", "created_time", "formula",
+ "automation", "image"}
+#: User-created types whose CELLS are read-only: their values are computed (formula — client
+#: side, any error degrades to BLANK) or system-owned (created_time = the row's `_created`).
+#: Emitted with the cohort column's read-only mechanism — `source: 'odoo'` + `derived` — so
+#: the client never offers an editor and the host never accepts a cell write for them.
+READONLY_CUSTOM_TYPES = {"created_time", "formula"}
+MAX_FIELD_OPTIONS = 50
+MAX_FORMULA_LEN = 500
+#: `rating` bounds. Airtable caps at 10; below 2 a rating is a checkbox.
+RATING_MAX_DEFAULT, RATING_MAX_MIN, RATING_MAX_MAX = 5, 2, 10
+
+#: Key prefix of a FORMULA-MEASURE column (owner item 7, 2026-07-27): a user-created field that
+#: IS a measure over a window — `Sales · the last 90 days` as a column. Mirrors the client's
+#: `measure_` keys in CustomerGrid.createField. Distinct from `custom_` because the two strata
+#: could not be more different: `custom_` is the EDITABLE overlay (user-typed values), while a
+#: measure field is READ-ONLY and its values are computed by the host per render.
+MEASURE_FIELD_PREFIX = "measure_"
+#: The numeric types a measure can render as (semantic._FORMAT_TYPE's range).
+MEASURE_FIELD_TYPES = {"currency", "int", "pct"}
+
+
+def _clean_options(raw):
+ """Choices for a `select`: strings, trimmed, de-duplicated case-insensitively, capped.
+ Mirrors types.ts parseOptions — a choice list that means one thing in the picker and
+ another in the filter dropdown is a column with two vocabularies."""
+ out, seen = [], set()
+ for v in list(raw or [])[:MAX_FIELD_OPTIONS * 2]:
+ if not isinstance(v, (str, int, float)) or isinstance(v, bool):
+ continue
+ s = str(v).strip()[:120]
+ if not s or s.lower() in seen:
+ continue
+ seen.add(s.lower())
+ out.append(s)
+ return out[:MAX_FIELD_OPTIONS]
+
+
+def _clean_option_colors(raw, options):
+ """Choice-label -> #RRGGBB, limited to the field's canonical option vocabulary."""
+ if not isinstance(raw, dict):
+ return {}
+ supplied = {}
+ for label, color in raw.items():
+ if not isinstance(label, str) or not isinstance(color, str):
+ continue
+ clean = color.strip().upper()
+ if re.fullmatch(r"#[0-9A-F]{6}", clean):
+ supplied[label.strip().lower()] = clean
+ out = {}
+ for option in options or []:
+ color = supplied.get(str(option).strip().lower())
+ if color:
+ out[str(option)] = color
+ return out
+
+
+def _choice_appearance(raw, options):
+ """Validated select-family appearance. Absent colour toggle means legacy-on."""
+ if not isinstance(raw, dict):
+ return {}
+ out = {}
+ if isinstance(raw.get("colorCodeOptions"), bool):
+ out["colorCodeOptions"] = raw["colorCodeOptions"]
+ colors = _clean_option_colors(raw.get("optionColors"), options)
+ if colors:
+ out["optionColors"] = colors
+ return out
+
+
+def _clean_rating_max(raw):
+ """A rating's star count, bounded. Anything unusable is the default, not a refusal — the
+ field still holds its 1..max integers either way."""
+ try:
+ return max(RATING_MAX_MIN, min(int(raw), RATING_MAX_MAX))
+ except (TypeError, ValueError):
+ return RATING_MAX_DEFAULT
+
+
+#: The field types a number-style display format may apply to. `formula` is here because its
+#: RESULT is a number the client renders; `pct` already renders in points and takes decimals.
+_NUMBER_FORMAT_TYPES = {"int", "currency", "pct", "formula"}
+
+
+def _clean_format(raw, ftype):
+ """Per-type DISPLAY format (wave-5 item 10), fail-closed: unknown keys are DROPPED, wrong
+ types return None (the property is simply absent). Rendering-only — a format can change how
+ a value reads, never what it is, which is why this needs no parity gate of its own."""
+ if not isinstance(raw, dict):
+ return None
+ out = {}
+ if ftype in _NUMBER_FORMAT_TYPES:
+ if isinstance(raw.get("thousands"), bool):
+ out["thousands"] = raw["thousands"]
+ if raw.get("decimals") is not None:
+ try:
+ d = int(raw["decimals"])
+ except (TypeError, ValueError):
+ d = None
+ if d is not None and 0 <= d <= 4:
+ out["decimals"] = d
+ if isinstance(raw.get("abbrev"), bool):
+ out["abbrev"] = raw["abbrev"]
+ elif ftype in ("date", "created_time"):
+ if isinstance(raw.get("time"), bool):
+ out["time"] = raw["time"]
+ if raw.get("tz") in ("local", "utc"):
+ out["tz"] = raw["tz"]
+ return out or None
+
+
+def _clean_permissions(raw):
+ """`{edit: 'everyone' | 'creator' | 'admins'}` or None (wave-5 item 1). WHO may set it is
+ the host handler's business (creator/admin, enforced fail-closed there); this validates
+ only the shape, like every other property here."""
+ if isinstance(raw, dict) and raw.get("edit") in ("everyone", "creator", "admins"):
+ return {"edit": raw["edit"]}
+ return None
+
+
+#: ⛔ THE CHARSET MUST ADMIT EVERY TOKEN THE CLIENT ENGINE PARSES, or a legal formula is
+#: refused by a wall that is supposed to be structural (2026-08-03).
+#:
+#: This regex was written when a formula was arithmetic over refs. On 2026-07-31 the client
+#: engine (owner item 2) gained STRING literals, `&` concatenation and `^` — CONCATENATE, TEXT,
+#: LEFT/RIGHT/MID, and any `IF(cond, "yes", "no")`. This list was never widened to match, so
+#: every such formula died here: `field_upsert` refused the create, and `fields_from_workspace`
+#: dropped the column on read. Nothing went red — a refused create looks like a quiet failure
+#: and a dropped column looks like a column nobody made.
+#:
+#: Found by trying to ship the owner's own Buy signal formula, which is `IF(..., "Buy now",
+#: "OK")` and could not be created through the product UI at all.
+#:
+#: ⚠ IT IS STILL STRUCTURAL, and deliberately not a second grammar — that is the filter_sql-class
+#: drift risk this file's docstring names. The charset says which characters may appear; the
+#: engine says what they mean. `_quotes_balanced` below is the one structural rule the quote
+#: character brings with it.
+_FORMULA_CHARS = re.compile(r"^[\w\s{}()+\-*/.,<>=!^&\"]*$")
+_FORMULA_REF = re.compile(r"\{([^{}]*)\}")
+
+
+def _quotes_balanced(s):
+ """An even number of `"` — the structural half of string support.
+
+ Sound because the engine's own escape is Excel's: `""` inside a string is one quote, and it
+ contributes TWO characters. So a well-formed expression always has an even count and an
+ unterminated string always has an odd one. What a balanced pair MEANS is the engine's
+ business, exactly as with parentheses.
+ """
+ return s.count('"') % 2 == 0
+
+
+#: Wave-18 C5-AUTOFIELD. `kind` is a whitelist because an unknown kind would be a column that
+#: silently never runs; `source` names where the run's subject comes from.
+AUTOMATION_KINDS = {"instagram_profile"}
+AUTOMATION_SOURCES = {"record_url_field", "self"}
+MAX_AUTOMATION_SETTINGS = 12
+
+
+def _clean_automation(raw, valid_keys=None):
+ """Validate an `automation` config bag. Returns the clean dict, or None when there is
+ nothing valid to store (the column then renders as unconfigured — never invented)."""
+ if not isinstance(raw, dict):
+ return None
+ kind = str(raw.get('kind') or '').strip()
+ if kind not in AUTOMATION_KINDS:
+ return None
+ source = str(raw.get('source') or 'record_url_field').strip()
+ if source not in AUTOMATION_SOURCES:
+ source = 'record_url_field'
+ out = {'kind': kind, 'source': source}
+ url_field = str(raw.get('urlField') or '').strip()[:80]
+ # fail closed on a ref that does not exist, exactly as _clean_formula does at WRITE time
+ if url_field and (valid_keys is None or url_field in valid_keys):
+ out['urlField'] = url_field
+ settings = {}
+ for k, v in list((raw.get('settings') or {}).items())[:MAX_AUTOMATION_SETTINGS]:
+ if isinstance(v, bool) or isinstance(v, (int, float)):
+ settings[str(k)[:40]] = v
+ elif isinstance(v, str):
+ settings[str(k)[:40]] = v[:200]
+ if settings:
+ out['settings'] = settings
+ return out
+
+
+def _clean_formula(raw, valid_keys=None):
+ """STRUCTURAL passthrough for a formula field's expression (wave-5 item 9).
+
+ Meaning is NOT checked here: the CLIENT engine owns the grammar (arithmetic over `{field}`
+ refs, ABS/ROUND/MIN/MAX/IF), and any evaluation error degrades to a BLANK cell — never a
+ wrong number. That is the `_clean_window` split one stratum up, and deliberately NOT a
+ Python mirror of the grammar: a second engine is the filter_sql-class drift risk.
+ Structure IS checked — charset, length, balanced parens, BALANCED QUOTES, well-formed
+ non-empty `{refs}` — and at WRITE time (`valid_keys` given) every ref must name a field this
+ table has, fail closed. At READ time refs are left alone: a referenced field deleted later
+ must blank the CELLS, not vaporise the column.
+
+ ⚠ A `{ref}` INSIDE A STRING LITERAL is still checked against `valid_keys` at write time, so
+ `IF(x, "see {notafield}", "")` is refused. That is a false rejection and it is the
+ fail-closed direction: the alternative is teaching this function where strings begin and
+ end, which is the second grammar the paragraph above refuses to write.
+ """
+ if not isinstance(raw, str):
+ return None
+ s = raw.strip()
+ if not s or len(s) > MAX_FORMULA_LEN or not _FORMULA_CHARS.match(s):
+ return None
+ depth = 0
+ for ch in s:
+ if ch == "(":
+ depth += 1
+ elif ch == ")":
+ depth -= 1
+ if depth < 0:
+ return None
+ if depth:
+ return None
+ if not _quotes_balanced(s):
+ return None
+ refs = _FORMULA_REF.findall(s)
+ leftover = _FORMULA_REF.sub("", s)
+ if "{" in leftover or "}" in leftover: # unbalanced / nested braces
+ return None
+ if any(not r.strip() for r in refs): # a `{}` ref names nothing
+ return None
+ if valid_keys is not None and any(r not in valid_keys for r in refs):
+ return None
+ return s
+
+
+def _field_extras(saved, ftype):
+ """createdBy / permissions / format / scope — the validated passthrough the created strata
+ share (wave 5). `createdBy` is only ever WRITTEN host-side (the handler stamps it); here it
+ is carried so the client can gate its menus and the handler can enforce against it.
+ `scope` (wave-6 item 9): 'cohort' marks a field created as cohort-specific — the handler
+ stamps it at create (cohort page only) and preserves it like createdBy; carried here so the
+ client can label the field, filtered OUT of other pages by fields_from_workspace."""
+ out = {}
+ who = saved.get("createdBy")
+ if isinstance(who, str) and who.strip():
+ out["createdBy"] = who.strip()[:80]
+ perms = _clean_permissions(saved.get("permissions"))
+ if perms:
+ out["permissions"] = perms
+ fmt = _clean_format(saved.get("format"), ftype)
+ if fmt:
+ out["format"] = fmt
+ if saved.get("scope") == "cohort":
+ out["scope"] = "cohort"
+ corrected_from = saved.get("labelCorrectedFrom")
+ correction_id = saved.get("labelCorrectionId")
+ if (isinstance(corrected_from, str) and corrected_from.strip()
+ and isinstance(correction_id, str) and correction_id.strip()):
+ out["labelCorrectedFrom"] = corrected_from.strip()[:120]
+ out["labelCorrectionId"] = correction_id.strip()[:180]
+ return out
+
+
+#: The DERIVED column listing the cohorts a customer is in (owner, 2026-07-27).
+#:
+#: NOT in `aios_grid_fields.json`, deliberately. That contract is per-TABLE and shared with the
+#: standalone API and the dev sample; a cohort is per-USER, so the column exists exactly when the
+#: caller has cohorts — the same condition under which the `__cohort__` FILTER field is offered.
+#: Putting it in the canonical contract would mean an always-present column that is empty for
+#: everyone else, plus three consumers to keep in step for a value none of them can produce.
+COHORT_COLUMN = 'cohorts'
+
+
+def cohort_field(label='Locked views'):
+ """The derived membership column's descriptor.
+
+ ⚠ WAVE 17 item 14 / C-STR — THE LABEL AND THE NOTE SPEAK THE NEW VOCABULARY; THE KEY DOES
+ NOT. `COHORT_COLUMN` is still `'cohorts'` and the function is still `cohort_field`, because
+ every stored view that shows or groups by this column names it by KEY, and every gate in
+ two runtimes names the function. The owner renamed a CONCEPT ("we should stop calling it
+ Cohort, but locked instead"), which is a change to what a reader sees — renaming the
+ identifiers would break saved views to change a word nobody reads.
+
+ `source: 'odoo'` is doing ONE job here and it is not provenance: the client keys editability
+ off `source == 'overlay'`, and `_cl_handle_grid_event` accepts cell writes only for overlay
+ keys. So 'odoo' is what makes this column READ-ONLY at both ends. `derived: True` is what
+ stops the column menu calling it a "source field" on that basis.
+
+ ⚠ `filterable: False`, and the replacement is the `Where [Cohort] […]` CONDITION, not another
+ column. Text ops over a joined string would ALMOST work and disagree at the edges — `contains
+ "VIP"` also matches a cohort called "VIP club" — and a filter that is nearly right is worse
+ than one that is absent.
+ """
+ return {
+ 'key': COHORT_COLUMN, 'label': label, 'type': 'text', 'source': 'odoo',
+ 'default': False, 'filterable': False, 'derived': True, 'multi': True,
+ 'note': 'The locked views this customer is in, newest first. A locked view holds a SET, '
+ 'so grouping by this column puts a customer under EVERY view they are in — the '
+ 'group counts therefore add up to more than the record count, which stays the '
+ 'number of distinct customers. Read-only: membership changes only by adding or '
+ 'removing customers on the locked view itself.',
+ }
+
+
+def cohort_cells(cohorts, allowed_pids=None):
+ """`{pid: {'cohorts': 'Q3 calls, Lost'}}` from `[{id,name,pids}, ...]`.
+
+ Built per render from the caller's OWN cohorts and handed to `rows_from_pool` as `derived`,
+ never merged into the cached pool rows — those are shared across users, and stamping one
+ user's cohorts onto them would leak the membership to everybody else on the next render.
+ """
+ cells = {}
+ for c in cohorts or []:
+ # ⚠ The COMMA is the separator the client splits on to group a customer into EVERY
+ # cohort they are in, so it cannot also occur inside a name. Cohort names are free text
+ # ("Q3 calls, west" is a name somebody will type), so a comma is replaced here rather
+ # than left to break the split silently — one group called "Q3 calls" and another called
+ # "west" would be two lists that do not exist. The cost is cosmetic and confined to the
+ # cell; the Cohort page still shows the name the user typed.
+ name = str(c.get('name') or c.get('id') or '').replace(',', ' ').strip()
+ for pid in c.get('pids') or ():
+ if allowed_pids is not None and pid not in allowed_pids:
+ continue
+ cells.setdefault(pid, []).append(name)
+ return {pid: {COHORT_COLUMN: ', '.join(names)} for pid, names in cells.items()}
+
+
+def clean_measure_field(raw, offered):
+ """Validate one UNTRUSTED formula-measure field (owner item 7) against the caller's OFFER.
+
+ `offered` is `{measure key: {label, type}}` from `measure_filter.measure_fields(team_id)` —
+ the same admission the condition builder uses, so a field can only name a measure this
+ caller could also filter by. Returns the canonical stored shape, or None (fail closed).
+
+ `source:'odoo'` + `derived:True` is the cohort column's read-only mechanism, reused:
+ the client keys editability off `source == 'overlay'` and the host accepts cell writes only
+ for overlay keys, so a measure column cannot be typed into at either end. `filterable:False`
+ because the REPLACEMENT is the measure CONDITION with the same measure and window — the
+ governed, gate-proved path (CG-8/CG-12) — not text ops over a derived cell.
+ """
+ if not isinstance(raw, dict):
+ return None
+ key = str(raw.get("key") or "")
+ if not key.startswith(MEASURE_FIELD_PREFIX) or len(key) > 80:
+ return None
+ spec = raw.get("measure")
+ if not isinstance(spec, dict):
+ return None
+ m = (offered or {}).get(spec.get("key"))
+ if not m:
+ return None # not admitted for this caller -> fail closed
+ window = _clean_window(spec.get("window"))
+ if window is None:
+ return None # a measure column with no period is not a column
+ mtype = m.get("type") if m.get("type") in MEASURE_FIELD_TYPES else "currency"
+ return {
+ "key": key,
+ "label": str(raw.get("label") or m.get("label") or "Measure")[:120],
+ "type": mtype,
+ "source": "odoo",
+ "default": True,
+ "custom": True,
+ "derived": True,
+ "filterable": False,
+ "agg": "sum" if mtype in ("currency", "int") else None,
+ "note": str(raw.get("note") or "")[:2000],
+ "measure": {"key": str(spec.get("key"))[:80], "window": window},
+ }
+
+
+def measure_fields_of(fields):
+ """The formula-measure columns among `fields` — the ones whose values the host must compute
+ per render (see `rows_from_pool`'s `derived`)."""
+ return [f for f in fields or [] if isinstance(f.get("measure"), dict)]
+
+
+def fields_from_workspace(workspace=None, cohorts=False, scope_key=None, fields_base=None):
+ """Overlay persisted notes/custom fields onto the immutable source-field contract.
+
+ `cohorts=True` appends the derived cohort column — see `cohort_field`. Appended LAST and
+ `default: False`, so it never displaces a column somebody already reads; the Fields menu is
+ where you turn it on.
+
+ Three saved strata pass through: notes on base fields, `custom_` overlay fields (editable),
+ and `measure_` formula-measure fields (read-only, host-computed — owner item 7). A measure
+ field was validated against the caller's measure OFFER when it was written
+ (`clean_measure_field`); here only its SHAPE is re-checked, because this module has zero
+ app-internal imports and cannot know the offer. A measure that has since become
+ unanswerable (a BU scope on a company-level measure) degrades to a BLANK column at value
+ time, never to an error.
+
+ `scope_key` (wave-6 item 9) names the PAGE doing the asking ('customer' / 'cohort'). A
+ saved def carrying `scope` is emitted only when it matches — so a cohort-specific field
+ never appears on the Customer table. FAIL-CLOSED: a caller that passes no scope_key sees
+ only unscoped (global) fields; base contract fields are never scoped.
+
+ `fields_base` (wave 16 C-TOPIC) — the canonical contract to overlay onto. Absent = the
+ CUSTOMER contract (`FIELDS`), byte-identical to before the parameter existed; the product
+ surface passes `product_fields()`. The workspace dict a caller hands in must already be the
+ matching table object's bucket — this function cannot tell a customer overlay from a
+ product one, which is exactly why the buckets are separate stores.
+ """
+ saved = dict((workspace or {}).get("fields") or {})
+ out = []
+ base_fields = fields_base if fields_base is not None else FIELDS
+ base_keys = {field["key"] for field in base_fields}
+ for base in base_fields:
+ meta = saved.get(base["key"]) or {}
+ field = dict(base)
+ if isinstance(meta.get("note"), str):
+ field["note"] = meta["note"][:2000]
+ # Wave-5 item 10: a saved DISPLAY format on any base field (a preset included) — how a
+ # number or date READS, per user. Rendering-only, so this is the whole acceptance.
+ fmt = _clean_format(meta.get("format"), base.get("type"))
+ if fmt:
+ field["format"] = fmt
+ # PRESET measure fields (wave-2 item 8): a preset+measure base may take a saved
+ # window/label override. Wave 6 deleted every preset member (the owner's
+ # no-buildable-presets rule) so this branch is currently MEMBERLESS — kept as the
+ # measure_ path's twin for any future preset-carrying contract, and because deleting
+ # it would silently change what a re-added preset means.
+ if base.get("preset") and isinstance(base.get("measure"), dict):
+ saved_measure = meta.get("measure") if isinstance(meta.get("measure"), dict) else {}
+ window = _clean_window(saved_measure.get("window"))
+ if window is not None:
+ field["measure"] = {"key": base["measure"]["key"], "window": window}
+ if isinstance(meta.get("label"), str) and meta["label"].strip():
+ field["label"] = meta["label"][:120]
+ out.append(field)
+ for key, field in saved.items():
+ if key in base_keys or not isinstance(field, dict):
+ continue
+ if field.get("scope") and field.get("scope") != scope_key:
+ continue # a cohort-specific field on another page (wave-6 item 9)
+ if (str(key).startswith(MEASURE_FIELD_PREFIX)
+ and isinstance(field.get("measure"), dict)):
+ window = _clean_window(field["measure"].get("window"))
+ mkey = str(field["measure"].get("key") or "")
+ if window is None or not mkey:
+ continue
+ mtype = field.get("type") if field.get("type") in MEASURE_FIELD_TYPES else "currency"
+ out.append({
+ "key": str(key)[:80],
+ "label": str(field.get("label") or "Measure")[:120],
+ "type": mtype,
+ "source": "odoo",
+ "default": bool(field.get("default", True)),
+ "custom": True,
+ "derived": True,
+ "filterable": False,
+ "agg": "sum" if mtype in ("currency", "int") else None,
+ "note": str(field.get("note") or "")[:2000],
+ "measure": {"key": mkey[:80], "window": window},
+ **_field_extras(field, mtype),
+ })
+ continue
+ if not str(key).startswith("custom_"):
+ continue
+ ftype = field.get("type")
+ if ftype not in CUSTOM_FIELD_TYPES:
+ continue
+ if ftype in READONLY_CUSTOM_TYPES:
+ # Wave-5 items 9/11: the read-only user-created pair. Emitted with the cohort
+ # column's mechanism (source 'odoo' + derived) so the client never offers an
+ # editor and the host's overlay-write guard excludes them by construction.
+ # FILTERABLE since wave 6 (owner item 6): their values live client-side
+ # (formula computes over the row, created_time renders `_created`), this
+ # table's counts are client-mode, and the windowed count path never sees
+ # these tables — so the client engine answers them soundly.
+ entry = {
+ "key": str(key)[:80],
+ "label": str(field.get("label") or "Untitled")[:120],
+ "type": ftype,
+ "source": "odoo",
+ "derived": True,
+ "filterable": True,
+ "default": bool(field.get("default", True)),
+ "custom": True,
+ "note": str(field.get("note") or "")[:2000],
+ **_field_extras(field, ftype),
+ }
+ if ftype == "formula":
+ formula = _clean_formula(field.get("formula"))
+ if formula is None:
+ continue # a formula field without a formula is nothing
+ entry["formula"] = formula
+ out.append(entry)
+ continue
+ if field.get("source") != "overlay":
+ continue
+ options = (_clean_options(field.get("options"))
+ if ftype in ("select", "multiselect") else [])
+ if ftype in ("select", "multiselect") and not options:
+ # A select with no surviving choices can never hold a value. Dropping the COLUMN
+ # would lose the user's data; degrading it to text keeps every stored value
+ # readable and lets them re-add choices.
+ ftype = "text"
+ out.append({
+ "key": str(key)[:80],
+ "label": str(field.get("label") or "Untitled")[:120],
+ "type": ftype,
+ "source": "overlay",
+ "default": bool(field.get("default", True)),
+ "custom": True,
+ "agg": field.get("agg") if field.get("agg") in {"sum"} else None,
+ "note": str(field.get("note") or "")[:2000],
+ **({"options": options} if ftype in ("select", "multiselect") else {}),
+ **(_choice_appearance(field, options)
+ if ftype in ("select", "multiselect") else {}),
+ # comma-joined SET semantics (the Cohorts column's contract): the row belongs to
+ # every member, groups count it under each, the toolbar count stays distinct.
+ **({"multi": True} if ftype == "multiselect" else {}),
+ **({"max": _clean_rating_max(field.get("max"))} if ftype == "rating" else {}),
+ **({"automation": _clean_automation(field.get("automation"))}
+ if ftype == "automation" and _clean_automation(field.get("automation")) else {}),
+ **_field_extras(field, ftype),
+ })
+ if cohorts and not any(f.get('key') == COHORT_COLUMN for f in out):
+ # ⚠ The emptiness check is WAVE 19's, and it is about the topics R9 opened this column to.
+ # A user table's field keys are slugged from whatever its creator typed, so a column
+ # literally called "Cohorts" produces the key `cohorts` — and appending here unguarded
+ # would put TWO fields with one key on the wire. The client indexes fields by key, so the
+ # duplicate does not error: it silently paints one column's values under the other's
+ # header. The user's own column wins; the derived one steps aside rather than shadowing it.
+ out.append(cohort_field())
+ return out
+
+
+def rows_from_pool(pool_rows, fields=None, overlays=None, derived=None):
+ """Map customer_data.pool() dicts -> the API row shape the grid expects:
+ pid + each Odoo field (numeric fields rounded, text/date passed through) + the
+ persisted external overlay. Mirrors the standalone API payload contract.
+
+ `derived` is `{pid: {key: value}}` for columns the HOST computes per render rather than
+ reads off the pool row — today just the cohort column. A separate argument from `overlays`
+ on purpose: `overlays` is the PERSISTED user stratum, and putting a value there that is
+ never written back would make the dict mean two things.
+ """
+ fields = fields or FIELDS
+ odoo_fields = [field for field in fields if field["source"] == "odoo"]
+ overlay_fields = [field for field in fields if field["source"] == "overlay"]
+ derived_keys = [field["key"] for field in fields if field.get("derived")]
+ overlays = overlays or {}
+ derived = derived or {}
+ out = []
+ for r in pool_rows:
+ pid = r.get("pid")
+ # `_created` (wave-5 item 11) rides every row like `pid` does — the datum the
+ # `created_time` field type renders, regardless of that field's own key. Not a Field:
+ # it has no column of its own until a user creates one. `lat`/`lon` (wave-7 W11) ride
+ # the same way: the Map VIEW's data, nullable, deliberately not a column.
+ row = {"pid": pid, "_created": r.get("_created") or "",
+ "lat": r.get("lat"), "lon": r.get("lon")}
+ for field in odoo_fields:
+ k = field["key"]
+ if field.get("derived"):
+ continue # not on the pool row — filled from `derived` below
+ v = r.get(k)
+ row[k] = v if field["type"] in {"text", "status", "date"} else _round(v)
+ saved = overlays.get(str(pid), {}) or {}
+ for field in overlay_fields:
+ row[field["key"]] = saved.get(field["key"], "")
+ got = derived.get(pid) or {}
+ for k in derived_keys:
+ # '' not None: a customer in no cohort has an EMPTY cohort list, and `is empty` on a
+ # text column is the question somebody will ask of it.
+ row[k] = got.get(k, "")
+ out.append(row)
+ return out
+
+
+# --- the FILTER-TREE contract (mirrors customer-grid/types.ts) ---------------
+# Ops the Airtable-parity condition builder can emit. isEmpty/isNotEmpty are
+# VALUE-FREE (they legitimately carry no value and must never be dropped for it).
+FILTER_OPS = {'contains', 'doesNotContain', 'eq', 'neq', 'isEmpty', 'isNotEmpty',
+ 'gt', 'gte', 'lt', 'lte', 'between', 'within',
+ # Wave 2026-08-02 (C-OPS): RANK operators — evaluated as a SET pass over the
+ # sibling-filtered domain by the client engine (useVisibleRows). The validator
+ # accepts them like any op (structural, not semantic); filter_sql REFUSES to
+ # compile them to row SQL (a per-row WHERE cannot express Top-N). aboveAvg /
+ # belowAvg are VALUE-FREE; the rest encode their argument in `value` as a
+ # string int (topN/bottomN 1..10000, inTopPct/inBottomPct 1..100,
+ # inQuartile 1..4, inDecile 1..10). Deliberately NOT in MEASURE_OPS: on a
+ # measure-carrying column they rank the field's own derived values.
+ 'topN', 'bottomN', 'inTopPct', 'inBottomPct',
+ 'aboveAvg', 'belowAvg', 'inQuartile', 'inDecile'}
+#: The RESERVED pseudo-column of a cohort-membership leaf (owner item 5, 2026-07-26). It is not
+#: a Field and never will be — a cohort is a hand-curated SET, so making it a column would mean
+#: a cell per row per cohort. Mirrors customer-grid/types.ts COHORT_FIELD.
+COHORT_FIELD = '__cohort__'
+#: Ops a cohort leaf may carry (owner, 2026-07-27): set operators over a SET of cohorts.
+#: Anything else is dropped. Deliberately DISJOINT from FILTER_OPS — see types.ts COHORT_OPS:
+#: a set op reaching a column leaf would fall through the client engine's switch to "no
+#: narrowing", so keeping the vocabularies apart makes the existing fail-closed drop do the work.
+COHORT_OPS = {'anyOf', 'allOf', 'noneOf'}
+#: The single-cohort ops this leaf shipped with, kept as PERMANENT aliases and REWRITTEN here:
+#: `is part of [one]` is `is any of [that one]`, so a saved view keeps answering and upgrades the
+#: next time it is written. Mirrors types.ts COHORT_OP_ALIASES.
+COHORT_OP_ALIASES = {'eq': 'anyOf', 'neq': 'noneOf'}
+#: How many cohorts one condition may name. Mirrors types.ts MAX_COHORT_IDS.
+MAX_COHORT_IDS = 20
+
+
+def parse_cohort_ids(value):
+ """The cohorts a leaf names, parsed out of `value`. Mirrors types.ts `cohortIds()`.
+
+ Comma-separated in one string because `FilterRule.value` is what all four layers persist and
+ round-trip, and a one-element list is byte-identical to what the single-cohort leaf already
+ stored — so every shipped view parses with no migration. Safe because a cohort id is built
+ from `[a-z0-9_]` only (modules/cohort.new_id), so a comma cannot occur inside one.
+ """
+ out = []
+ for raw in ('' if value is None else str(value)).split(','):
+ cid = raw.strip()[:120]
+ if not cid or cid in out:
+ continue
+ out.append(cid)
+ if len(out) >= MAX_COHORT_IDS:
+ break
+ return out
+# Airtable allows 3 nesting levels (root conditions -> group -> group), then grays
+# the button out. MAX_FILTER_DEPTH in types.ts must stay in lock-step with this.
+MAX_FILTER_DEPTH = 3
+MAX_FILTER_NODES = 100 # total nodes across the whole tree
+MAX_FILTER_SIBLINGS = 50 # per level
+
+
+#: Shape of a measure condition's date window. aios_grid has ZERO app-internal imports by
+#: design, so it does NOT know the window VOCABULARY — `harness/windows.py` owns that, mirrored
+#: in `customer-grid/windows.ts`, and a third copy here is exactly the drift those two already
+#: need a gate to prevent. This validates SHAPE only.
+WINDOW_MAX_N = 3650
+
+
+def _clean_window(raw):
+ """Structural passthrough for a measure condition's `{kind, n?, from?, to?}` window.
+
+ Meaning is NOT checked here: an unrecognised `kind` survives this function and is REFUSED by
+ `harness.measure_filter.resolve_rule`, the layer that owns the vocabulary. Splitting it this
+ way keeps the grid module reusable and keeps one definition of what "last quarter" means.
+ """
+ if not isinstance(raw, dict):
+ return None
+ kind = raw.get('kind')
+ if not isinstance(kind, str) or not kind or len(kind) > 40:
+ return None
+ out = {'kind': kind}
+ if raw.get('n') is not None:
+ try:
+ out['n'] = max(1, min(int(raw['n']), WINDOW_MAX_N))
+ except (TypeError, ValueError):
+ return None
+ for side in ('from', 'to'):
+ if raw.get(side) not in (None, ''):
+ out[side] = str(raw[side])[:32]
+ return out
+
+
+def _clean_rhs(raw, valid_keys):
+ """CG-9 — validate `{kind, colId, window?}`, the "compare against another attribute" side.
+
+ SHAPE and KEY only: `colId` must be something this table has (the caller widens `valid_keys`
+ with the measure keys, exactly as it does for the left side), and a measure rhs must carry a
+ window. What the window MEANS is `harness/windows.py`'s business, same split as `_clean_window`.
+ """
+ if not isinstance(raw, dict):
+ return None
+ kind = raw.get('kind')
+ if kind not in ('field', 'measure', 'stat'):
+ return None
+ if kind == 'stat':
+ # A STATISTIC carries no column: the population is the comparand. Shape only — which
+ # statistics exist is `harness/measure_filter.STATS`'s business, and an unrecognised one
+ # is REFUSED there rather than guessed at, exactly like an unrecognised window kind.
+ stat = raw.get('stat')
+ if not isinstance(stat, str) or not stat or len(stat) > 24:
+ return None
+ return {'kind': 'stat', 'stat': stat}
+ col = raw.get('colId')
+ if col not in valid_keys:
+ return None
+ out = {'kind': kind, 'colId': col}
+ if kind == 'measure':
+ window = _clean_window(raw.get('window'))
+ if window is None:
+ return None # a measure comparand with no period is not a question
+ out['window'] = window
+ return out
+
+
+#: View DISPLAY MODES beside the grid (wave-6 item 10; 'map' wave-7 W11; 'dashboard' wave-8
+#: I19). Mirrors customer-grid/types.ts DISPLAY_MODES; 'grid' is what an absent/unknown
+#: display means, so it is never stored.
+#: ⚠ 'dashboard' is RETAINED FOREVER (wave-9 I10, contract C2). The owner renamed the mode to
+#: "Chart" (a Dashboard MODULE is coming and the two would collide), but this set is the
+#: gatekeeper for a STORED value: `_clean_display` DROPS an unknown mode, so removing
+#: 'dashboard' here would silently downgrade every already-saved chart view to grid — and live
+#: views are sitting in mode:'dashboard' right now (wave 8's own close-out records one). The
+#: rename is therefore a stored-value MIGRATION, not a constant rename: accept 'dashboard' on
+#: READ forever, only ever WRITE 'chart'.
+DISPLAY_MODES = {'grid', 'list', 'calendar', 'kanban', 'map', 'dashboard', 'chart',
+ 'timeseries', 'catalog'}
+
+#: C-DISP (wave 2026-08-02): the time-series view's bucket vocabulary and caps, plus the
+#: calendar-summary metric cap. types.ts mirrors these as TS_BUCKETS / TS_MAX_LAST_N /
+#: TS_MAX_FIELDS / MAX_CALENDAR_METRICS, and cleanDisplay applies the same per-entry drops,
+#: so an accepted save reads back byte-identically on both engines.
+TS_BUCKETS = {'week', 'month', 'quarter', 'year'}
+TS_MAX_LAST_N = 120
+TS_MAX_FIELDS = 12
+MAX_CALENDAR_METRICS = 4
+_ISO_DAY = re.compile(r'^\d{4}-\d{2}-\d{2}$')
+
+#: C6-CATALOG (wave 18) — the catalog view's vocabulary and caps. types.ts mirrors every name
+#: below, and `cleanDisplay` applies the same drops in the SAME ORDER, so an accepted save reads
+#: back identically on both engines. The code budget is the order-sensitive one — see
+#: `_clean_catalogs`.
+MAX_CATALOGS = 12
+MAX_CATALOG_PAGES = 40
+MAX_CATALOG_CODES = 500 # cumulative across ONE catalog's pages, spent in PAGE ORDER
+CATALOG_PAPERS = {'letter', 'a4', 'tabloid'}
+CATALOG_ORIENTATIONS = {'portrait', 'landscape'}
+CATALOG_QUALITIES = {'web', 'print'}
+CATALOG_PAGE_KINDS = {'cover', 'intro', 'section', 'gallery'}
+CATALOG_COLS = (2, 3, 4)
+CATALOG_ID_MAX, CATALOG_NAME_MAX = 40, 80
+CATALOG_TITLE_MAX, CATALOG_BODY_MAX, CATALOG_CODE_MAX = 120, 2000, 60
+_HEX6 = re.compile(r'^#[0-9A-Fa-f]{6}$')
+
+#: Wave 14 C-ACC ([[loopable-wave14-split]]; rulings R2/R3). Mirrored by types.ts
+#: TS_DELTA_KINDS / TS_MAX_CUSTOM_ROWS / TS_MAX_STYLES — the C-DISP byte-identical law.
+TS_DELTA_KINDS = ('abs', 'pct', 'yoy', 'ytd')
+TS_MAX_CUSTOM_ROWS = 12
+TS_MAX_STYLES = 200
+#: R2 — a formula row's `expr` is stored VERBATIM and NEVER parsed here (evaluation is client
+#: law; the client refuses unknown refs/cycles/div-zero itself). The charset wall is the whole
+#: server-side contract: row refs `[...]`, arithmetic, numbers — no markup, no control chars.
+_TS_EXPR_OK = re.compile(r'^[A-Za-z0-9_ .+\-*/()\[\]]+$')
+
+#: Old wire value -> the value we store today. Applied AFTER the membership test so an unknown
+#: mode is still rejected rather than accidentally aliased.
+_LEGACY_MODES = {'dashboard': 'chart'}
+
+#: Chart kinds a chart-mode view may hold (wave-8 I19, contract C2). Mirrors the client's
+#: union. Deliberately small: the owner asked to "start with simple charts" and expand, and a
+#: kind the client cannot draw is worse than one that does not exist yet.
+#: Wave-16 C-CHARTCAP: + 'table' — the group-by aggregate table (by-rep / by-BU /
+#: top-customers, the third Sales block shape). Client renderer: DashboardView's
+#: GroupTableView over salesParity.tableFromSpec.
+CHART_KINDS = {'bar', 'line', 'area', 'donut', 'kpi', 'table'}
+CHART_AGGS = {'sum', 'avg', 'count', 'min', 'max'}
+MAX_CHARTS = 12 #: per view — a dashboard, not an unbounded render loop
+MAX_CHART_TITLE = 60
+
+#: Wave-9 I11 (contract C2) — chart customisation, host-validated.
+#:
+#: `palette` names a colour JOB, never a colour. A browser must not be able to post a raw hex:
+#: the four names below map to the four jobs a palette can do (identity / magnitude / polarity)
+#: and resolve to brand ramps client-side, so a tenant restyle cannot be defeated by a stored
+#: literal. STATUS colours (good/warning/serious/critical) are deliberately NOT selectable —
+#: they are reserved signal, and reusing them as "series 4" is how a chart starts lying.
+CHART_PALETTES = {'brand', 'categorical', 'sequential', 'diverging'}
+CHART_FORMATS = {'auto', 'number', 'currency', 'percent', 'compact'}
+MAX_AXIS_LABEL = 40
+#: `size` is the I10 drag. Width is in GRID COLUMNS (a 12-column board), height in px.
+CHART_W_RANGE = (1, 12)
+CHART_H_RANGE = (120, 800)
+
+
+def _clean_chart(raw, valid_keys):
+ """One dashboard chart, fail-closed. Returns None if the chart cannot be drawn.
+
+ A chart's `y` is optional (absent = count of rows, which is what "how many customers per
+ state" means). `x` is NOT: a chart with no category axis has nothing to plot against, and
+ silently keeping it would put an empty card on the dashboard with no way to tell why.
+ """
+ if not isinstance(raw, dict):
+ return None
+ kind = raw.get('kind')
+ if kind not in CHART_KINDS:
+ return None
+ x = raw.get('x')
+ if x not in valid_keys:
+ return None # dead category ref -> the chart goes, not the board
+ cid = raw.get('id')
+ if not isinstance(cid, str) or not cid.strip():
+ return None # the client owns chart ids; an unidentified card
+ # cannot be edited or removed, so it must not persist
+ out = {'id': cid.strip()[:64], 'kind': kind, 'x': x,
+ 'agg': raw.get('agg') if raw.get('agg') in CHART_AGGS else 'sum'}
+ if raw.get('y') in valid_keys:
+ out['y'] = raw['y']
+ else:
+ # no measurable column -> the only honest aggregation left is "how many rows"
+ out['agg'] = 'count'
+ title = raw.get('title')
+ if isinstance(title, str) and title.strip():
+ out['title'] = title.strip()[:MAX_CHART_TITLE]
+
+ # ── wave-9 I11 (contract C2): customisation ────────────────────────────────────────────
+ # `splitBy` is the field whose values become the SERIES. It is deliberately not called
+ # `colorBy`: that name already means two other things here (`config.colorBy` = row
+ # colouring, `display.colorField` = map pin colour) and a third sense would be unreadable.
+ if raw.get('splitBy') in valid_keys and raw['splitBy'] != x:
+ out['splitBy'] = raw['splitBy']
+ # Stacking is only a question once there are series to stack, and only for the two kinds
+ # that can express it. Anywhere else it is dropped rather than stored as a lie the client
+ # would have to re-decide.
+ if out.get('splitBy') and kind in ('bar', 'area') and raw.get('stacked') is True:
+ out['stacked'] = True
+ if raw.get('palette') in CHART_PALETTES:
+ out['palette'] = raw['palette']
+
+ axis = raw.get('axis')
+ if isinstance(axis, dict):
+ # ⛔ ONE y-scale, always. There is no second-axis key here and there must never be:
+ # two y-scales on one frame can manufacture any correlation you like by rescaling, and
+ # the honest alternatives are two charts, small multiples, or indexing to a common base.
+ # Ruled explicitly in contract C2 against the "Tableau versatility" brief.
+ clean_axis = {}
+ for side in ('x', 'y'):
+ spec = axis.get(side)
+ if not isinstance(spec, dict):
+ continue
+ one = {}
+ lab = spec.get('label')
+ if isinstance(lab, str) and lab.strip():
+ one['label'] = lab.strip()[:MAX_AXIS_LABEL]
+ if spec.get('format') in CHART_FORMATS:
+ one['format'] = spec['format']
+ if one:
+ clean_axis[side] = one
+ if clean_axis:
+ out['axis'] = clean_axis
+
+ size = raw.get('size')
+ if isinstance(size, dict):
+ one = {}
+ for key, (lo, hi) in (('w', CHART_W_RANGE), ('h', CHART_H_RANGE)):
+ try:
+ one[key] = max(lo, min(hi, int(size[key])))
+ except (KeyError, TypeError, ValueError):
+ pass # a partial size is fine: the client defaults the missing axis
+ if one:
+ out['size'] = one
+
+ # ── Wave 14 R3 ([[loopable-wave14-split]]): a METRIC chart may carry a PERIOD — the
+ # trend-over-buckets encoding. Kept only when the chart's value field is measure-backed:
+ # a category column has no time dimension, and a stored period on it would promise a
+ # trend the TS channel must refuse. `span` is meaningful only beside `bucket`.
+ if isinstance(out.get('y'), str) and out['y'].startswith('measure_'):
+ if raw.get('bucket') in TS_BUCKETS:
+ out['bucket'] = raw['bucket']
+ sp = raw.get('span')
+ if isinstance(sp, dict):
+ n = sp.get('lastN')
+ if (isinstance(n, int) and not isinstance(n, bool)
+ and 1 <= n <= TS_MAX_LAST_N):
+ out['span'] = {'lastN': n}
+ # ── Wave-16 C-CHARTCAP: the YoY companion. Kept ONLY where it can mean something —
+ # beside a kept bucket (the compare series) or on a sum-of-metric KPI (the delta
+ # line). Anything else is a stored claim the renderer would have to re-refuse.
+ # Mirrors the client's cleanCharts rule key for key.
+ if raw.get('compare') == 'prior_year' and (
+ out.get('bucket') or (kind == 'kpi' and out.get('agg') == 'sum')):
+ out['compare'] = 'prior_year'
+ return out
+
+
+def _clean_catalog_page(raw, budget):
+ """C6-CATALOG — one page of a catalog. Returns `(page | None, codes_spent)`.
+
+ `budget` is what is LEFT of the catalog's 500-code allowance. Codes are deduped WITHIN a
+ page and not across the catalog: a product legitimately appears on a gallery page and again
+ in its section listing, and de-duplicating globally would silently delete the second
+ appearance. The budget is spent in page order, so a catalog that runs out loses the TAIL of
+ its last pages — never a random scatter, and never a page (a page with no products is a
+ heading the user can still see and fix).
+ """
+ if not isinstance(raw, dict):
+ return None, 0
+ page_id = str(raw.get('id') or '')[:CATALOG_ID_MAX]
+ kind = raw.get('kind')
+ if not page_id or kind not in CATALOG_PAGE_KINDS:
+ return None, 0
+ out = {'id': page_id, 'kind': kind}
+ for key, cap in (('title', CATALOG_TITLE_MAX), ('body', CATALOG_BODY_MAX),
+ ('imageCode', CATALOG_CODE_MAX)):
+ v = raw.get(key)
+ if isinstance(v, str) and v:
+ out[key] = v[:cap]
+ products = raw.get('products')
+ if isinstance(products, list) and budget > 0:
+ clean_p, seen_p = [], set()
+ for c in products:
+ if not isinstance(c, str) or not c:
+ continue
+ c = c[:CATALOG_CODE_MAX]
+ if c in seen_p:
+ continue
+ seen_p.add(c)
+ clean_p.append(c)
+ if len(clean_p) >= budget:
+ break
+ if clean_p:
+ out['products'] = clean_p
+ layout = raw.get('layout')
+ if isinstance(layout, dict):
+ clean_l = {}
+ cols = layout.get('cols')
+ if isinstance(cols, int) and not isinstance(cols, bool) and cols in CATALOG_COLS:
+ clean_l['cols'] = cols
+ # The kanbanClamp/tsSparkline asymmetry, one per direction: pack and colour SHOW by
+ # default (the 2027 catalogue shows both), price does NOT (it shows no prices at all).
+ # So only the opt-OUT is storable for the first two and only the opt-IN for the third —
+ # a second spelling of a default is how a round trip starts churning.
+ if layout.get('showPack') is False:
+ clean_l['showPack'] = False
+ if layout.get('showColor') is False:
+ clean_l['showColor'] = False
+ if layout.get('showPrice') is True:
+ clean_l['showPrice'] = True
+ if clean_l:
+ out['layout'] = clean_l
+ return out, len(out.get('products') or ())
+
+
+def _clean_catalogs(raw, valid_keys):
+ """C6-CATALOG (wave 18) — `display.catalogs`, fail-closed. Returns a list or None.
+
+ A catalog is a PRINT artifact, so the two structural keys that decide how it paginates
+ (`paper`, `orientation`) are NORMALISED WITH A DEFAULT rather than dropped: a page box with
+ no size is not a smaller catalog, it is an unrenderable one. Everything else follows the
+ house rules — unknown keys dropped, per-entry drops never cost the neighbours, empty
+ sub-objects omitted entirely (`brand`, `fields`, `layout`, `products`) so an absent key and
+ an empty one are not two spellings of the same nothing.
+
+ `fields` binds the listing lines to real columns (the 2027 listing prints description / SKU /
+ pack / colour, and `product_data` carries no pack or colour of its own — the user binds
+ custom fields). Refs are checked against `valid_keys` HERE and not on the client, the same
+ split `dateField`/`stackField` already run.
+ """
+ if not isinstance(raw, list):
+ return None
+ out = []
+ for c in raw:
+ if len(out) >= MAX_CATALOGS:
+ break
+ if not isinstance(c, dict):
+ continue
+ cat_id = str(c.get('id') or '')[:CATALOG_ID_MAX]
+ name = c.get('name')
+ # An EMPTY name is legal (the user cleared the box and will type again) — an ABSENT one
+ # is a malformed record. The `tsRows` label rule, same reasoning.
+ if not cat_id or not isinstance(name, str):
+ continue
+ cat = {'id': cat_id, 'name': name[:CATALOG_NAME_MAX]}
+ cat['paper'] = c['paper'] if c.get('paper') in CATALOG_PAPERS else 'letter'
+ cat['orientation'] = (c['orientation']
+ if c.get('orientation') in CATALOG_ORIENTATIONS else 'portrait')
+ if c.get('quality') in CATALOG_QUALITIES:
+ cat['quality'] = c['quality']
+ brand = c.get('brand')
+ if isinstance(brand, dict):
+ clean_b = {}
+ for k in ('primary', 'accent'):
+ v = brand.get(k)
+ if isinstance(v, str) and _HEX6.match(v):
+ clean_b[k] = v
+ company = brand.get('company')
+ if isinstance(company, str) and company:
+ clean_b['company'] = company[:CATALOG_NAME_MAX]
+ # An asset CODE (resolved through C2-ASSET), never a URL: an arbitrary host inside
+ # print CSS is exactly the tokens-not-values rule this contract carries.
+ logo = brand.get('logo')
+ if isinstance(logo, str) and logo:
+ clean_b['logo'] = logo[:CATALOG_CODE_MAX]
+ if clean_b:
+ cat['brand'] = clean_b
+ binds = c.get('fields')
+ if isinstance(binds, dict):
+ clean_bind = {k: binds[k] for k in ('name', 'pack', 'color', 'price')
+ if binds.get(k) in valid_keys}
+ if clean_bind:
+ cat['fields'] = clean_bind
+ pages, budget = [], MAX_CATALOG_CODES
+ raw_pages = c.get('pages')
+ if isinstance(raw_pages, list):
+ for p in raw_pages:
+ if len(pages) >= MAX_CATALOG_PAGES:
+ break
+ page, spent = _clean_catalog_page(p, budget)
+ if page is None:
+ continue
+ budget -= spent
+ pages.append(page)
+ # ALWAYS emitted, even empty: a catalog with no pages yet is the state every catalog
+ # starts in, and dropping the key would make "new" and "corrupt" the same wire value.
+ cat['pages'] = pages
+ out.append(cat)
+ return out or None
+
+
+def _clean_display(raw, valid_keys):
+ """Structural passthrough for a view's `config.display` (wave-6 item 10), fail-closed.
+
+ `{mode, dateField?, stackField?, titleField?, colorField?, sizeField?, charts?}` — mode
+ must be a known non-grid mode (grid is the absent default, so storing it would be a second
+ way to say nothing); every field ref must name a field this table has (a ref to a deleted
+ field is DROPPED and the client falls back to its per-mode default); unknown keys are
+ dropped. What each mode MEANS — calendar wants a date-family field, kanban a select-family
+ stack, map a single-select to colour by and a numeric to size by — is the client's
+ business: it is the only layer that renders them, and a wrong-typed ref degrades to that
+ surface's default rather than to an error (the `_clean_window` split).
+
+ Wave-8 (contract C2) adds the map encodings (`colorField` I3, `sizeField` I5) and
+ dashboard `charts` (I19). A chart whose x/y names a deleted field is dropped INDIVIDUALLY —
+ never the whole array, because losing one column should not cost the user a dashboard they
+ spent time building.
+ """
+ if not isinstance(raw, dict):
+ return None
+ mode = raw.get('mode')
+ if mode not in DISPLAY_MODES or mode == 'grid':
+ return None
+ # Wave-9 I10 (C2): normalise the legacy wire value AFTER the membership test, so an unknown
+ # mode is still rejected rather than accidentally aliased into a real one. Every already
+ # saved 'dashboard' view reads back as 'chart' from here on; nothing writes 'dashboard'.
+ mode = _LEGACY_MODES.get(mode, mode)
+ out = {'mode': mode}
+ for ref in ('dateField', 'stackField', 'titleField', 'colorField', 'sizeField'):
+ if raw.get(ref) in valid_keys:
+ out[ref] = raw[ref]
+ # ── C-DISP (wave 2026-08-02) ─────────────────────────────────────────────────────────
+ # kanbanClamp: stored ONLY as the literal opt-OUT. Absent means clamped — the new
+ # standardized default — so storing True would be a second way to say nothing (the same
+ # rule that keeps mode:'grid' out of the store).
+ if raw.get('kanbanClamp') is False:
+ out['kanbanClamp'] = False
+ if raw.get('calendarMode') in ('records', 'summary'):
+ out['calendarMode'] = raw['calendarMode']
+ metrics = raw.get('calendarMetrics')
+ if isinstance(metrics, list):
+ clean_m, seen_m = [], set()
+ for m in metrics[:MAX_CALENDAR_METRICS]:
+ # Dropped INDIVIDUALLY (the charts precedent): one dead metric must not cost the
+ # user the summary card they configured around it.
+ if not isinstance(m, dict):
+ continue
+ mid = str(m.get('id') or '')[:40]
+ if (not mid or mid in seen_m or m.get('field') not in valid_keys
+ or m.get('agg') not in CHART_AGGS):
+ continue
+ seen_m.add(mid)
+ clean_m.append({'id': mid, 'field': m['field'], 'agg': m['agg']})
+ if clean_m:
+ out['calendarMetrics'] = clean_m
+ if raw.get('tsBucket') in TS_BUCKETS:
+ out['tsBucket'] = raw['tsBucket']
+ span = raw.get('tsSpan')
+ if isinstance(span, dict):
+ clean_span = {}
+ n = span.get('lastN')
+ if isinstance(n, int) and not isinstance(n, bool) and 1 <= n <= TS_MAX_LAST_N:
+ clean_span['lastN'] = n
+ else:
+ f, t = span.get('from'), span.get('to')
+ f = f if isinstance(f, str) and _ISO_DAY.match(f) else None
+ t = t if isinstance(t, str) and _ISO_DAY.match(t) else None
+ if f and t and f > t:
+ f, t = t, f
+ if f:
+ clean_span['from'] = f
+ if t:
+ clean_span['to'] = t
+ if clean_span:
+ out['tsSpan'] = clean_span
+ ts_fields = raw.get('tsFields')
+ if isinstance(ts_fields, list):
+ clean_f, seen_f = [], set()
+ for k in ts_fields[:TS_MAX_FIELDS]:
+ if k in valid_keys and k not in seen_f:
+ seen_f.add(k)
+ clean_f.append(k)
+ if clean_f:
+ out['tsFields'] = clean_f
+ # ── Wave 14 C-ACC ([[loopable-wave14-split]] R2; items 17/18) ────────────────────────
+ deltas = raw.get('tsDeltas')
+ if isinstance(deltas, list):
+ clean_d, seen_d = [], set()
+ for d in deltas:
+ if d in TS_DELTA_KINDS and d not in seen_d:
+ seen_d.add(d)
+ clean_d.append(d)
+ if clean_d:
+ out['tsDeltas'] = clean_d
+ # Gridlines: stored ONLY as the literal opt-OUT (absent = shown), sparkline ONLY as the
+ # literal opt-IN (absent = off) — the kanbanClamp asymmetry, one per direction.
+ if raw.get('tsGridlines') is False:
+ out['tsGridlines'] = False
+ if raw.get('tsSparkline') is True:
+ out['tsSparkline'] = True
+ rows = raw.get('tsRows')
+ if isinstance(rows, list):
+ clean_r, seen_r = [], set()
+ for r in rows[:TS_MAX_CUSTOM_ROWS]:
+ if not isinstance(r, dict):
+ continue
+ rid = str(r.get('id') or '')[:40]
+ r_kind = r.get('kind')
+ if not rid or rid in seen_r or r_kind not in ('note', 'formula'):
+ continue
+ label = r.get('label')
+ if not isinstance(label, str):
+ continue # ABSENT label = malformed; an EMPTY one is a legal spacer row
+ # (GRID's dated asymmetry amendments, 2026-08-02)
+ one = {'id': rid, 'kind': r_kind, 'label': label.strip()[:120]}
+ if r_kind == 'formula':
+ expr = r.get('expr')
+ if (isinstance(expr, str) and expr.strip()
+ and len(expr) <= 200 and _TS_EXPR_OK.match(expr)):
+ one['expr'] = expr
+ # else: keep the ROW, drop the EXPR — it renders "—". Vanishing the row
+ # would delete the user's label to punish their arithmetic (GRID's dated
+ # asymmetry amendment; the calendarMetrics per-entry-drop precedent).
+ seen_r.add(rid)
+ clean_r.append(one)
+ if clean_r:
+ out['tsRows'] = clean_r
+ styles = raw.get('tsStyles')
+ if isinstance(styles, dict):
+ clean_s = {}
+ for s_key, s_val in styles.items():
+ if len(clean_s) >= TS_MAX_STYLES:
+ break # capped, not truncated silently: the gate names this
+ if not isinstance(s_key, str) or not s_key or len(s_key) > 96:
+ continue # key = rowId or "rowId:colKey" — the client's grammar
+ if not isinstance(s_val, dict):
+ continue
+ one = {}
+ if s_val.get('bold') is True:
+ one['bold'] = True
+ if s_val.get('line') is True:
+ one['line'] = True
+ if one:
+ clean_s[s_key] = one
+ if clean_s:
+ out['tsStyles'] = clean_s
+ charts = raw.get('charts')
+ if isinstance(charts, list):
+ clean = [c for c in (_clean_chart(x, valid_keys) for x in charts[:MAX_CHARTS]) if c]
+ # de-dupe by id: two cards sharing an id are one card as far as the client's keyed
+ # render is concerned, and the second would silently shadow the first
+ seen, uniq = set(), []
+ for c in clean:
+ if c['id'] in seen:
+ continue
+ seen.add(c['id'])
+ uniq.append(c)
+ if uniq:
+ out['charts'] = uniq
+ # ── C6-CATALOG (wave 18) ─────────────────────────────────────────────────────────────
+ catalogs = _clean_catalogs(raw.get('catalogs'), valid_keys)
+ if catalogs:
+ out['catalogs'] = catalogs
+ return out
+
+
+#: FOLDERS over the saved views / cohorts sidebars (wave-8 I11, contract C4).
+#:
+#: ⚠ Folder membership is stored as a SIDE MAP (`itemFolders`), not as a `folderId` ON each
+#: view or cohort — a deliberate amendment to C4's first wording, recorded in the split doc.
+#: Two reasons. (1) A cohort lives in a DIFFERENT store (`customer_cohorts`, keyed by cohort
+#: id) and adding a `folders` key beside those ids would collide with a cohort whose generated
+#: id happened to be 'folders'. (2) Folder placement is a per-user ORGANISING act, not part of
+#: what a view IS: keeping it out of the view config means duplicating or exporting a view does
+#: not drag a folder reference along with it. One map, one home, both surfaces.
+FOLDER_SURFACES = {"views", "cohorts"}
+MAX_FOLDERS = 60
+MAX_FOLDER_NAME = 80
+
+#: Wave-9 I15 (contract C5) — a user-chosen folder icon, as {shape, tone}.
+#:
+#: Both halves are WHITELISTS, never free values: `shape` names geometry the client already
+#: draws (one source, `iconShapes.ts`, read by both painters) and `tone` names a palette token,
+#: not a colour — so a browser cannot post a hex and defeat a tenant restyle, and a shape the
+#: client cannot render can never reach the store.
+#: ⚠ MIRRORS CLIENT'S `iconShapes.ts` ENUMERATION EXACTLY (C5: CLIENT enumerates, HOST mirrors —
+#: posted in the split doc 2026-07-29, HOST adopted it the same day, replacing a provisional
+#: 12-shape guess of mine that contained shapes the client cannot draw). Do not extend this set
+#: without the matching client geometry: an unknown shape falls back to the default folder mark,
+#: which is also I14's "existing folders get the folder icon" for every pre-wave-9 folder.
+FOLDER_ICON_SHAPES = {"folder", "star", "flag", "tag", "bookmark", "box", "circle", "square"}
+#: Tones are the C1 pastels — FILLS ONLY, never text (the standing palette rule). 'grey' is the
+#: default, and is CLIENT's key name: not 'neutral', which is what HOST first guessed.
+FOLDER_ICON_TONES = {"blue", "green", "yellow", "red", "grey"}
+FOLDER_ICON_DEFAULT_TONE = "grey"
+
+
+#: Wave-9 I17 (contract C4) — who may EDIT a saved view.
+#:
+#: ⚠ READ THIS BEFORE BUILDING ON IT. Views are stored PER USER today
+#: (`core/table_store.TableStore.workspace` reads `store.get(table_key)[username]`), so one
+#: user's views are invisible to every other user and "collaborative" has nothing to act on
+#: yet. This validator is therefore CORRECT-BUT-INERT plumbing: it makes the setting durable
+#: and fail-closed now, so that when shared views land the permission does not need a data
+#: migration and no saved view is retro-restricted. It does NOT make anything shared, and
+#: nothing in the app currently reads it to grant or deny cross-user access.
+#: Recorded as the C4 amendment in .claude/wiki/research/grid-wave9-split.md.
+VIEW_EDIT_MODES = {'personal', 'collaborative', 'users'}
+MAX_VIEW_USERS = 50
+
+
+def clean_view_permissions(raw, default, known_users=None):
+ """{edit, users?} — fail-closed on both halves.
+
+ `default` is supplied by the CALLER because it splits by path, and that split is a
+ permission rule rather than a formatting one: absent on a view that already exists means a
+ pre-wave-9 view and must stay 'collaborative' (retro-restricting somebody's saved view is a
+ silent takeaway), while absent on CREATE must be 'personal' (a new view must never be
+ anyone-can-edit purely by omission).
+
+ `known_users` (when given) is the real account list: an unknown name is DROPPED, and an
+ 'users' grant left with nobody in it collapses to 'personal' rather than to everyone.
+ """
+ mode = (raw or {}).get('edit') if isinstance(raw, dict) else None
+ if mode not in VIEW_EDIT_MODES:
+ mode = default if default in VIEW_EDIT_MODES else 'personal'
+ if mode != 'users':
+ return {'edit': mode}
+ names, seen = [], set()
+ for u in list((raw or {}).get('users') or [])[:MAX_VIEW_USERS]:
+ u = str(u or '').strip()
+ if not u or u.lower() in seen:
+ continue
+ if known_users is not None and u not in known_users:
+ continue # fail-closed: a name we cannot resolve grants nothing
+ seen.add(u.lower())
+ names.append(u)
+ if not names:
+ return {'edit': 'personal'} # an empty grant is NOT "everyone"
+ return {'edit': 'users', 'users': names}
+
+
+def clean_folder_icon(raw):
+ """{shape, tone} or None. Fail-closed on both halves, independently.
+
+ A folder with a valid shape but a junk tone keeps the shape and defaults the tone rather
+ than losing the icon entirely — losing a user's pick because one half was wrong is the kind
+ of silent data loss the folder events already avoid elsewhere.
+ """
+ if not isinstance(raw, dict):
+ return None
+ shape = raw.get("shape")
+ if shape not in FOLDER_ICON_SHAPES:
+ return None
+ tone = raw.get("tone")
+ return {"shape": shape,
+ "tone": tone if tone in FOLDER_ICON_TONES else FOLDER_ICON_DEFAULT_TONE}
+
+
+def clean_folders(raw):
+ """Validate the per-surface folder lists, fail-closed. {surface: [{id, name, order}]}."""
+ out = {}
+ for surface in FOLDER_SURFACES:
+ items, seen = [], set()
+ for f in list((raw or {}).get(surface) or [])[:MAX_FOLDERS]:
+ if not isinstance(f, dict):
+ continue
+ fid = str(f.get("id") or "").strip()[:80]
+ name = str(f.get("name") or "").strip()[:MAX_FOLDER_NAME]
+ if not fid or not name or fid in seen:
+ continue # an unidentified or unnamed folder cannot be shown or edited
+ seen.add(fid)
+ try:
+ order = int(f.get("order", len(items)))
+ except (TypeError, ValueError):
+ order = len(items)
+ row = {"id": fid, "name": name, "order": order}
+ icon = clean_folder_icon(f.get("icon")) # wave-9 I15 (C5); absent = default mark
+ if icon:
+ row["icon"] = icon
+ items.append(row)
+ items.sort(key=lambda x: x["order"])
+ for i, f in enumerate(items):
+ f["order"] = i # re-index so `order` is always dense and total
+ if items:
+ out[surface] = items
+ return out
+
+
+def clean_item_folders(raw, folders, valid_ids):
+ """{surface: {itemId: folderId}} — dropping any placement whose ITEM or FOLDER is gone.
+
+ This is what makes a deleted folder's contents fall back to the root rather than vanish:
+ nothing stores "this item is in no folder", so an unresolvable placement simply disappears
+ and the item renders at the top level. Same for an item that was deleted elsewhere — its
+ stale placement can never resurrect it, because the sidebars render ITEMS and consult this
+ map, never the other way round.
+ """
+ out = {}
+ for surface in FOLDER_SURFACES:
+ fids = {f["id"] for f in (folders or {}).get(surface, [])}
+ ok = {}
+ for item_id, fid in ((raw or {}).get(surface) or {}).items():
+ if not isinstance(item_id, str) or not isinstance(fid, str):
+ continue
+ if item_id in (valid_ids or {}).get(surface, ()) and fid in fids:
+ ok[item_id[:120]] = fid
+ if ok:
+ out[surface] = ok
+ return out
+
+
+def clean_filter_tree(raw, valid_keys, depth=1, budget=None, cohort_ids=None):
+ """Recursively validate an UNTRUSTED filter tree (conditions + nested groups).
+
+ Returns a clean tree of leaf conditions ({colId, op, value, value2}) and
+ groups ({conj, children}). Module-agnostic on purpose: any module embedding
+ the grid validates its own view state through this one function.
+
+ Fail-closed PER NODE: anything unrecognised is DROPPED rather than raised —
+ the same contract the rest of the view sanitiser follows, so one bad rule can
+ never cost a user their whole saved view. Depth, per-level width and total
+ node count are all capped: the tree is re-evaluated for every row on every
+ render, so an unbounded structure would be a persistent client-side DoS.
+ Empty groups are dropped (they carry no meaning once persisted).
+
+ `cohort_ids` is the set of cohorts the CALLER may see. A cohort leaf naming anything else is
+ DROPPED here rather than left for the engine — a deleted cohort would otherwise leave a
+ condition that can only match nothing, so `List is not [deleted]` would show an empty table
+ forever with no way to tell why. `None` means this host has no cohorts, and then every
+ cohort leaf is dropped: fail-closed, like every other unknown key.
+ """
+ if budget is None:
+ budget = [MAX_FILTER_NODES]
+ out = []
+ for node in list(raw or [])[:MAX_FILTER_SIBLINGS]:
+ if budget[0] <= 0:
+ break
+ if not isinstance(node, dict):
+ continue
+ if isinstance(node.get('children'), list): # a condition GROUP
+ if depth >= MAX_FILTER_DEPTH:
+ continue # too deep -> drop
+ budget[0] -= 1
+ children = clean_filter_tree(node['children'], valid_keys,
+ depth + 1, budget, cohort_ids)
+ if children:
+ out.append({'conj': 'or' if node.get('conj') == 'or' else 'and',
+ 'children': children})
+ continue
+ if node.get('colId') == COHORT_FIELD: # a cohort-membership leaf
+ op = COHORT_OP_ALIASES.get(node.get('op'), node.get('op'))
+ named = parse_cohort_ids(node.get('value'))
+ # ALL of them, or the leaf goes. A set that quietly lost a member asks a DIFFERENT
+ # question, and for `noneOf` a strictly wider one: `is none of [A, B]` degrading to
+ # `is none of [A]` would show every row in B under a count nobody would doubt. This
+ # is the same all-or-nothing the single-cohort leaf already had, extended to a set.
+ if op in COHORT_OPS and named and all(c in (cohort_ids or ()) for c in named):
+ budget[0] -= 1
+ out.append({'colId': COHORT_FIELD, 'op': op,
+ 'value': ','.join(named), 'value2': ''})
+ continue
+ if node.get('colId') in valid_keys and node.get('op') in FILTER_OPS:
+ budget[0] -= 1
+ # `or ''` would be wrong here: it maps every FALSY value to '', and '' is the
+ # signal for "inactive". A numeric 0 (or 0.0, or False) is a real value the client
+ # treats as active — `0 === ""` is false in TS — so `revenue = 0` would silently
+ # stop filtering and show every row instead of the zero-revenue ones.
+ val, val2 = node.get('value'), node.get('value2')
+ leaf = {'colId': node['colId'], 'op': node['op'],
+ 'value': ('' if val is None else str(val))[:500],
+ 'value2': ('' if val2 is None else str(val2))[:500]}
+ # CG-8. A MEASURE condition ("Sales, in the last 90 days, > 5,000") carries two
+ # extra members: a stable client-generated `id`, which is how the server's answer
+ # finds its way back to the condition that asked (positional matching silently
+ # re-associates every answer the moment a user deletes a condition), and the
+ # `window`. Emitted ONLY when the input has them — a column condition's cleaned
+ # shape is unchanged, so every persisted view deserialises byte-identically and
+ # `clean_filter_tree` stays idempotent (verify_filter_engine.py asserts that by
+ # exact structural comparison).
+ rid = node.get('id')
+ if rid not in (None, ''):
+ leaf['id'] = str(rid)[:64]
+ window = _clean_window(node.get('window'))
+ if window is not None:
+ leaf['window'] = window
+ # Owner items 3 + 4, carried under the SAME rule as CG-8's `id`/`window`: emitted
+ # only when the input has them, so a plain column condition's cleaned shape is
+ # byte-identical to what it always was and `clean_filter_tree` stays idempotent
+ # (verify_filter_engine.py asserts that by exact structural comparison). Drop the
+ # carry-through and the next autosave silently strips a date condition back to a
+ # bare comparison against an empty value — i.e. back to INACTIVE.
+ date_window = _clean_window(node.get('dateWindow'))
+ if date_window is not None:
+ leaf['dateWindow'] = date_window
+ mode = node.get('dateMode')
+ # SHAPE only. An unrecognised mode survives here and is refused by
+ # `windows.resolve_anchor`, which returns None and makes the condition match
+ # NOTHING — the same split as `_clean_window`, and the reason this module can stay
+ # free of the date vocabulary it would otherwise have to keep in step.
+ if isinstance(mode, str) and 0 < len(mode) <= 40:
+ leaf['dateMode'] = mode
+ rhs = _clean_rhs(node.get('rhs'), valid_keys)
+ if rhs is not None:
+ leaf['rhs'] = rhs
+ out.append(leaf)
+ return out
+
+
+def _default_view_config(fields):
+ shown = [field["key"] for field in fields
+ if field.get("default") is not False or field["source"] == "overlay"]
+ hidden = [field["key"] for field in fields if field["key"] not in shown]
+ return {
+ # `filters` is the ROOT of the filter tree: leaf conditions and/or nested
+ # condition groups ({conj, children}); `filterConj` joins the root level.
+ "filters": [], "filterConj": "and",
+ "sorts": [], "groupBy": None, "colorBy": None,
+ "rowHeightMode": "short", "order": shown + hidden, "visible": shown,
+ "widths": {}, "memberPids": [],
+ }
+
+
+#: Wave 17 R1 / C-LOCKV — the `kind` a PROJECTED locked view wears. A cohort is not a separate
+#: kind of object any more: it is a saved view whose rows are a hand-curated set.
+LOCKED_VIEW_KIND = 'locked'
+
+
+def locked_view_projection(entry, base_config):
+ """One cohort -> the saved-view row that IS it (wave 17 R1, contract C-LOCKV).
+
+ ⛔ THE LOCK IS THE VIEW'S IDENTITY, NOT ITS CONFIGURATION. `config.cohortLock` names the
+ view's OWN id, which is what makes the shipped engine law (`useVisibleRows`: intersect the
+ named set FIRST, unconditionally, and match NOTHING when the membership is unresolvable) do
+ all the work with no second mechanism. Membership itself is NEVER copied in here — it stays
+ in `customer_cohorts` and travels as `workspace.lists`, because a per-reader-scoped
+ collection inside a client-writable `config` is deleted by the next autosave (see the
+ contract's reason 2).
+
+ ⚠ `locked: True` is the LEGACY "undeletable/mode-frozen" flag and is deliberately NOT set:
+ these views are ordinary in every respect the owner asked for — reorder, folder, sort,
+ filter, change display mode. The lock mark in the rail is driven by `kind`.
+ """
+ return {
+ 'id': entry['id'],
+ 'name': entry.get('name') or entry['id'],
+ 'kind': LOCKED_VIEW_KIND,
+ 'config': {**base_config, 'cohortLock': entry['id']},
+ }
+
+
+def views_from_defs(defs, saved_views, fields, system_name="All customers", locked_lists=None):
+ """Convert legacy list formulas into the shared serializable SavedView contract.
+
+ `system_name` (wave 16 C-TOPIC) labels the system view per TOPIC ("All products" on the
+ product surface). The ID stays "all-customers" on every topic — the client pins it
+ (UNDELETABLE_VIEW_IDS, the landing default), and an id that varies by surface would fork
+ that contract for a label's sake.
+
+ `locked_lists` (wave 17 R1) are the caller's cohorts, each PROJECTED as a saved view whose
+ id IS the cohort id — so every stored reference to that id (a `cohortLock` on another view,
+ an `is part of` condition, a folder placement) keeps pointing at the same thing and no
+ rewrite map is needed. Saved config OVERLAYS the projection through the same mechanism the
+ `list:` views have always used, which is what gives a locked view its own sort, filter,
+ columns and display mode with no new storage."""
+ base = _default_view_config(fields)
+ views = [{
+ "id": "all-customers", "name": system_name, "kind": "system",
+ "locked": True, "config": dict(base),
+ }]
+ op_map = {">=": "gte", ">": "gt", "<=": "lte", "<": "lt", "=": "eq",
+ "contains": "contains"}
+ for name, definition in (defs or {}).items():
+ filters = []
+ for rule in definition.get("rules") or []:
+ if rule.get("field") not in {field["key"] for field in fields}:
+ continue
+ filters.append({
+ "colId": rule["field"],
+ "op": op_map.get(rule.get("op"), "eq"),
+ "value": str(rule.get("value") if rule.get("value") is not None else ""),
+ })
+ sort = str(definition.get("sort") or "")
+ sorts = ([{"colId": sort.lstrip("-"),
+ "dir": "desc" if sort.startswith("-") else "asc"}]
+ if sort.lstrip("-") in {field["key"] for field in fields} else [])
+ views.append({
+ "id": "list:" + str(name),
+ "name": str(name),
+ "kind": "list",
+ "note": str(definition.get("note") or ""),
+ "config": {
+ **base, "filters": filters, "sorts": sorts,
+ "memberPids": [int(pid) for pid in definition.get("members") or []
+ if isinstance(pid, int) or str(pid).isdigit()],
+ },
+ })
+ # Wave 17 R1 — the cohorts, as ordinary views. Appended BEFORE the saved-config overlay
+ # below so a user's own edits to a locked view (its sort, its columns, its display mode)
+ # land on the projection instead of creating a second row with the same id.
+ for _entry in (locked_lists or []):
+ if isinstance(_entry, dict) and _entry.get('id'):
+ views.append(locked_view_projection(_entry, base))
+ index = {view["id"]: i for i, view in enumerate(views)}
+ for view_id, saved in (saved_views or {}).items():
+ if not isinstance(saved, dict) or not isinstance(saved.get("config"), dict):
+ continue
+ clean = dict(saved)
+ clean["id"] = str(view_id)
+ if view_id in index:
+ views[index[view_id]] = clean
+ else:
+ views.append(clean)
+ # ⛔ WAVE 17 R1 — RE-STAMP THE LOCK AFTER THE OVERLAY. The loop above REPLACES a projected
+ # view with its saved record, and a saved record that omits `cohortLock` would hand back a
+ # view that shows the WHOLE BOOK under a locked view's name. That is not hypothetical: the
+ # client rebuilds `config` on every autosave (a column resize is enough), and the lock is
+ # identity here, not something the browser is the source of truth for. Read-side rather than
+ # write-side-only on purpose — this also repairs any record already written by another path.
+ _locked_ids = {e['id']: e for e in (locked_lists or [])
+ if isinstance(e, dict) and e.get('id')}
+ if _locked_ids:
+ for _v in views:
+ _entry = _locked_ids.get(_v.get('id'))
+ if not _entry:
+ continue
+ _v['kind'] = LOCKED_VIEW_KIND
+ _v['config'] = {**(_v.get('config') or {}), 'cohortLock': _v['id']}
+ # One thing, one name: the cohort store owns it (the rename event routes there), so
+ # a stale `name` on the saved record can never fork into a second title.
+ _v['name'] = _entry.get('name') or _v['id']
+ return views
+
+
+def workspace_wire(ws, uname, pool_pids, defs=None, scope_key='customer', storage_key=None,
+ fields_base=None, with_cohorts=True):
+ """The client's `GridWorkspace` WIRE SHAPE from the stored table workspace — the ONE
+ projection, shared by both servers (app.py's `_table_grid` and the API's `/workspace`).
+
+ ⛔ WHY THIS EXISTS (2026-07-30). The API route used to return the STORE shape with no
+ `storageKey` — and the client validator (`fetchWorkspace`) requires one, so the standalone
+ shell silently discarded the whole workspace: saved views never rendered and `cohortMode`
+ never arrived (the Cohort route drew the Customer surface). Duplicating the host's inline
+ projection into the route would have re-created the same drift one wave later; extracting it
+ means the wire can only be one thing.
+
+ Returns `(workspace, fields, views, cohort_lists)` — the extra three because the host
+ interleaves further work (docs, derived cells, measure sets) that consumes them.
+
+ HOST-ONLY extras stay with the host: `docs`/`docPayload`, `pool`, `hideViews`,
+ `cohortMode`/`scopeChoice` (the API stamps its own from `?scope=`).
+
+ Wave 16 C-TOPIC: `fields_base` selects the canonical contract (absent = customer,
+ byte-identical).
+
+ ⭐ WAVE 19 / R9 — `with_cohorts` NO LONGER MEANS "customer only". Wave 16 set it False on the
+ product surface because cohorts were a single customer-keyed bucket, so resolving them against
+ product pids would have intersected two unrelated id spaces and printed a plausible,
+ meaningless member count. `modules.cohort` is scope-parameterized now: the lists come from
+ THIS topic's bucket (`cohort_mod.scoped(scope_key)`), so their ids are this topic's ids and
+ the intersection with `pool_pids` is the ordinary one. The flag survives as an honest OFF
+ switch for a surface that wants no membership channel at all — it is not a topic wall.
+ """
+ import modules.cohort as cohort_mod
+
+ cohort_lists = []
+ if with_cohorts:
+ for cid, c in sorted(cohort_mod.scoped(scope_key).visible(uname, pool_pids).items(),
+ key=lambda kv: (kv[1].get('name') or '').lower()):
+ members = [p for p in (c.get('members') or []) if p in pool_pids]
+ entry = {'id': cid, 'name': c.get('name') or cid, 'pids': members}
+ # Rule 8b: a member can drop out of the 24-month pool without the cohort being
+ # wrong, and a silently smaller cohort is exactly what the unverifiable-count rule
+ # forbids.
+ missing = len(c.get('members') or []) - len(members)
+ if missing:
+ entry['missing'] = missing
+ cohort_lists.append(entry)
+
+ fields = fields_from_workspace(ws, cohorts=bool(cohort_lists), scope_key=scope_key,
+ fields_base=fields_base)
+ views = views_from_defs(defs or {}, ws.get('views'), fields,
+ system_name=("All products" if scope_key == 'product'
+ else "All customers"),
+ locked_lists=cohort_lists)
+ workspace = {'storageKey': storage_key, 'views': views, 'lists': cohort_lists}
+ # Owner item 3 (2026-07-31): where this user left off. The client's own localStorage copy
+ # wins when present; this is the server's answer for a FRESH browser, which used to fall
+ # all the way to the system default view (and whatever display mode was stored on it).
+ if ws.get('activeViewId'):
+ workspace['activeViewId'] = str(ws['activeViewId'])
+
+ # FOLDERS (owner item 11, contract C4), re-validated at SERVE time: a view or cohort can be
+ # deleted by a path that knows nothing about folders, and the placement map must not outlive
+ # the thing it points at.
+ _folders = clean_folders(ws.get('folders'))
+ _view_ids = {v['id'] for v in (views or []) if isinstance(v, dict) and v.get('id')}
+ # ── WAVE 17 R1 (C-LOCKV amendment 2026-08-03): the two folder surfaces become ONE, AT
+ # SERVE TIME rather than by a store migration. A locked view is an ordinary view now, so
+ # its folder has to be an ordinary view folder — but rewriting the stored map would be a
+ # one-shot write that has to be got right once, while this is a projection that is right
+ # every time it runs. New drags write to `views` anyway (the client only knows that
+ # surface), so `cohorts` drains on its own and never needs a second pass.
+ # ⚠ A cohorts-surface folder whose id ALREADY names a views folder is DROPPED, not merged:
+ # re-parenting somebody's list into a folder that merely shares an id is a worse outcome
+ # than the list appearing at the root, where it is visible and one drag from home.
+ _cf = list(_folders.get('cohorts') or [])
+ if _cf:
+ _vf = list(_folders.get('views') or [])
+ _taken = {f['id'] for f in _vf}
+ _order = len(_vf)
+ for _f in _cf:
+ if _f['id'] in _taken:
+ continue
+ _vf.append({**_f, 'order': _order})
+ _order += 1
+ _folders['views'] = _vf
+ _raw_item_folders = dict(ws.get('itemFolders') or {})
+ if _raw_item_folders.get('cohorts'):
+ # Cohort placements now describe VIEWS (same ids — that is the point of preserving them).
+ # A placement already stored on the views surface WINS: it is the more recent act.
+ _raw_item_folders['views'] = {**dict(_raw_item_folders.get('cohorts') or {}),
+ **dict(_raw_item_folders.get('views') or {})}
+ _placed = clean_item_folders(
+ _raw_item_folders, _folders,
+ {'views': _view_ids, 'cohorts': {c['id'] for c in cohort_lists}})
+ if _folders.get('views'):
+ workspace['folders'] = _folders['views']
+ # ⛔ `cohortFolders` IS NO LONGER EMITTED. The rail has no cohorts section to fold, and a
+ # wire that still described one would invite a second rendering of rows that are now views.
+ _vplaced = _placed.get('views') or {}
+ for _v in (views or []):
+ if isinstance(_v, dict) and _v.get('id') in _vplaced:
+ _v['folderId'] = _vplaced[_v['id']]
+ _cplaced = _placed.get('cohorts') or {}
+ for _c in cohort_lists:
+ if _c['id'] in _cplaced:
+ _c['folderId'] = _cplaced[_c['id']]
+
+ # RECORD LAYOUT (wave 2026-08-02, C-LAYOUT): the per-user record-detail field order,
+ # re-validated at SERVE time exactly like folders — a field can be deleted by a path
+ # that knows nothing about this stratum, and a stale key must not outlive its field.
+ _rl = ws.get('recordLayout')
+ if isinstance(_rl, dict) and isinstance(_rl.get('order'), list):
+ _fkeys = {f['key'] for f in fields if isinstance(f, dict) and f.get('key')}
+ _order, _seen = [], set()
+ for _k in _rl['order'][:200]:
+ _k = str(_k or '')
+ if _k and _k in _fkeys and _k not in _seen:
+ _seen.add(_k)
+ _order.append(_k)
+ if _order:
+ workspace['recordLayout'] = {'order': _order}
+
+ return workspace, fields, views, cohort_lists
+
+
+def embed_html_path():
+ """The first existing candidate path for the inlined single-file build, or None."""
+ for p in _EMBED_CANDIDATES:
+ if p.is_file():
+ return p
+ return None
+
+
+def scope_counts(shown, matched, total):
+ """The honest 'N of M' a SERVER-WINDOWED table must carry (CG-2).
+
+ `matched` and `total` MUST come from their own queries over the whole scope. Never pass
+ `len(rows)` as `matched` — that is the silent [:N] this exists to prevent: the page would
+ report the window size as though it were the result size.
+
+ Refuses the shapes that could only be a mistake, because a wrong count here is invisible on
+ screen (it looks like a smaller dataset, not like an error).
+ """
+ shown, matched, total = int(shown), int(matched), int(total)
+ if matched > total:
+ raise ValueError(f"matched ({matched}) exceeds total ({total}) — a filter cannot match "
+ f"more rows than the scope holds")
+ if shown > matched:
+ raise ValueError(f"shown ({shown}) exceeds matched ({matched}) — the window cannot hold "
+ f"more rows than the filter matched")
+ return {"shown": shown, "matched": matched, "total": total, "windowed": True}
+
+
+
+# ⛔ EXIT-6 (2026-08-04): `build_html`, `component_dir`, `render` and `_DECLARED_COMPONENTS` WERE
+# HERE, and they are gone with Streamlit. They were the EMBED HOST — the path that declared the
+# prebuilt bundle as a `streamlit.components.v1` custom component (or injected the single-file
+# HTML build as a fallback) so the React grid could be drawn inside a Streamlit page.
+#
+# THIS MODULE ITSELF SURVIVES, and that distinction is the whole point: `aios_grid.py` is imported
+# at 11 sites across `aios-web/api/` plus `harness/semantic.py` — it owns the canonical field
+# contract, the workspace wire and the count envelope. Only the ~95 lines that knew about a HOST
+# went; the rest never did. Its one and only `import streamlit` lived inside `render`, lazily, and
+# left with it. `api/verify_no_streamlit.py` now gates that nothing here re-imports it.
+#
+# Deleted with them: `aios_grid_embed.html` + `aios_grid_component/index.html` (a 2.1 MB prebuilt
+# bundle), `build_embed.py` that produced them, and `deploy_hf.py`'s embed-staleness guard. The
+# React app is now served directly by the FastAPI container — there is no twin to keep fresh, so
+# the entire class of "the code shipped but the bundle did not" is retired rather than guarded.
diff --git a/platform/aios_grid_fields.json b/platform/aios_grid_fields.json
new file mode 100644
index 0000000000000000000000000000000000000000..0a41e40d4ded61168a129885c8c3bd596487890c
--- /dev/null
+++ b/platform/aios_grid_fields.json
@@ -0,0 +1,413 @@
+{
+ "_comment": "CANONICAL field contract for the AIOS Airtable-style grid \u2014 the SINGLE source of truth. Consumed by platform/aios_grid.py (embed/Space host) and aios-web/api/main.py (standalone API), and regenerated into aios-web/web/public/sample_customers.json. Edit HERE only, then run aios-web/verify_fields_contract.py. source=odoo is READ-ONLY; source=overlay is the editable stratum (notes/tags) outside Odoo. type in {text,status,select,currency,int,date,pct} (select = a fixed-choice READ-ONLY brand attribute; dba is the first, wave 2026-08-02). `description` (wave 5) is the CANONICAL per-field description \u2014 every field must carry one, and since wave 7 (owner W8, 2026-07-28) every description is ONE SHORT PLAIN sentence (two only when a fact would otherwise mislead): what the field IS, nothing else \u2014 no filter tips, no '(none)' coaching, no rationale; the user's workspace NOTE overrides it in the (i) hover, never in this file. BUILDER FACT (documented here, deliberately NOT in user-facing text): blank text attributes display as '(none)', so `is '(none)'` \u2014 not `is empty` \u2014 finds the blanks on agent/city/state/country/zip/payment_terms/pricelist/tags. filterable:false = the CONDITION BUILDER does not offer it (still displayed, still sortable); every such field must have a replacement declared in aios-web/verify_fields_contract.py. 2026-07-27 partner attributes: country/zip/payment_terms/pricelist/tags/customer_since all ship default:false. zip is TEXT because a postal code has leading zeros. Odoo's credit_limit (1% populated) and user_id salesperson (2%) are deliberately ABSENT; agent_ids is the salesperson field and AR is where credit exposure comes from. Wave-5 item 8 (2026-07-27): ltm_rev and at_risk are DELETED \u2014 LTM's replacement is a creatable Sales measure column (the demo column IS Sales \u00b7 the last 12 months), at_risk's replacement is a formula field, e.g. MAX(0, {revenue_ly} - {revenue_ytd}). Wave-6 item 8 (2026-07-27, the no-buildable-presets rule): revenue_ytd, revenue_ly, orders_24m, aov and yoy_pct are DELETED \u2014 every one is self-buildable, so a frozen pre-set beside the builder was two ways to ask one question. Replacements (recorded in verify_fields_contract.py): creatable measure columns for Sales / Orders / Avg order $ over any period (harness/measure_filter.py ADMITTED carries revenue, orders and the composite aov), and a formula over two measure columns for YoY, e.g. ({sales_ytd} - {sales_ly}) / {sales_ly}. Stale view colIds naming the five self-heal on the next autosave (the established rule).",
+ "fields": [
+ {
+ "key": "customer",
+ "label": "Customer",
+ "type": "text",
+ "source": "odoo",
+ "pinned": true,
+ "default": true,
+ "description": "The customer's name in Odoo. One row per customer who ordered in the last 24 months."
+ },
+ {
+ "key": "odoo_status",
+ "label": "Odoo record",
+ "type": "status",
+ "source": "odoo",
+ "default": false,
+ "description": "Whether this customer still exists in Odoo. Archived means deleted there."
+ },
+ {
+ "key": "agent",
+ "label": "Agent",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "The sales agent who owns this account."
+ },
+ {
+ "key": "dba",
+ "label": "DBA",
+ "type": "select",
+ "source": "odoo",
+ "default": false,
+ "options": [
+ "Fisch",
+ "Royal",
+ "Both"
+ ],
+ "description": "The brand this customer buys from - Fisch, Royal, or both. Amazon-channel orders are not a DBA."
+ },
+ {
+ "key": "salesperson",
+ "label": "Salesperson",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Who keyed in most of this customer's orders \u2014 not the Agent, who owns the account."
+ },
+ {
+ "key": "city",
+ "label": "City",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "City on the customer's Odoo address."
+ },
+ {
+ "key": "state",
+ "label": "State",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "State or province on the customer's Odoo address."
+ },
+ {
+ "key": "country",
+ "label": "Country",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Country on the customer's Odoo address."
+ },
+ {
+ "key": "zip",
+ "label": "ZIP",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Postal code on the customer's Odoo address."
+ },
+ {
+ "key": "customer_since",
+ "label": "Customer since",
+ "type": "date",
+ "source": "odoo",
+ "default": false,
+ "description": "When this customer was first set up in Odoo."
+ },
+ {
+ "key": "tags",
+ "label": "Tags",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Odoo labels on this customer, comma-separated."
+ },
+ {
+ "key": "pricelist",
+ "label": "Price list",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The price list this customer buys on."
+ },
+ {
+ "key": "payment_terms",
+ "label": "Payment terms",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Payment terms on this customer's account \u2014 Net 30, for example."
+ },
+ {
+ "key": "last_order",
+ "label": "Last order",
+ "type": "date",
+ "source": "odoo",
+ "default": true,
+ "description": "Date of the most recent confirmed order."
+ },
+ {
+ "key": "overdue_days",
+ "label": "Overdue days",
+ "type": "int",
+ "source": "odoo",
+ "default": true,
+ "description": "How many days late this customer is running against their own usual ordering rhythm."
+ },
+ {
+ "_note": "filterable:false \u2014 DERIVED ANALYTIC: est_missed is min(cycles missed, 3) x AOV, a score we compute rather than an object the business has, so a condition on it would read as a fact about the customer when it is a fact about our arithmetic. It still displays and still sorts. Until wave 6 this flag also covered the frozen-window presets (revenue_ytd / revenue_ly / orders_24m / aov / yoy_pct); those are now DELETED outright under the owner's no-buildable-presets rule \u2014 see _comment. est_missed itself STAYS: no creatable measure or formula reproduces the cadence model behind it.",
+ "key": "est_missed",
+ "label": "Est. missed $",
+ "type": "currency",
+ "source": "odoo",
+ "default": true,
+ "agg": "sum",
+ "filterable": false,
+ "description": "Estimated sales missed while quiet: missed orders (capped at 3) times average order value. An estimate, not money owed."
+ },
+ {
+ "key": "ar_open",
+ "label": "AR open $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Invoiced money owed, not yet overdue."
+ },
+ {
+ "key": "ar_overdue",
+ "label": "AR overdue $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Invoiced money past due \u2014 same basis as the Collections page."
+ },
+ {
+ "key": "ar_exposure",
+ "label": "Credit exposure $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "The most you could be out if they stopped paying today: open, overdue, draft and not-yet-invoiced."
+ },
+ {
+ "key": "ar_aged_1_30",
+ "label": "1-30 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 1 and 30 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_31_60",
+ "label": "31-60 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 31 and 60 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_61_90",
+ "label": "61-90 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 61 and 90 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_90_plus",
+ "label": "90+ days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue by more than 90 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "days_to_pay",
+ "label": "Days to pay",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Average days to pay an invoice in full. Blank means no fully paid invoice yet."
+ },
+ {
+ "key": "top_category",
+ "label": "Top category",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The category this customer spent the most on in the last 12 months."
+ },
+ {
+ "key": "top_category_pct",
+ "label": "Top category %",
+ "type": "pct",
+ "source": "odoo",
+ "default": false,
+ "description": "Share of last-12-months spend that went to the top category."
+ },
+ {
+ "key": "sku_count",
+ "label": "SKUs bought",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Distinct products bought in the last 12 months."
+ },
+ {
+ "key": "top_sku",
+ "label": "Top SKU",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The product this customer spent the most on in the last 12 months."
+ },
+ {
+ "key": "days_since",
+ "label": "Days since order",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Days since the last confirmed order."
+ },
+ {
+ "key": "typical_gap_days",
+ "label": "Typical gap days",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Days this customer usually goes between orders, from their own history."
+ },
+ {
+ "key": "notes",
+ "label": "Notes",
+ "type": "text",
+ "source": "overlay",
+ "default": false,
+ "description": "Your notes on this customer. Saved in this app only, visible only to you."
+ }
+ ],
+ "_product_comment": "ADDITIVE, wave 15 C-TOPIC. The PRODUCT table's field contract. Kept as a SEPARATE top-level key rather than restructuring `fields` into {customer_data, product_data}: both existing readers (aios_grid._load_fields, aios-web/api/main.py) index doc['fields'] directly, and reshaping that mid-wave would break the embed for a cosmetic gain. The keyed shape can arrive when both readers move in ONE commit; until then this is the product half and `fields` is the customer half.",
+ "_product_removed_buy_now": "OWNER, 2026-08-03: 'Buy signal' (key buy_now, a select of Buy now / OK) is NO LONGER A PRESET FIELD. It never earned one: it is a formula over two columns that are both still right here, and the platform has a formula field type for exactly that. THE FORMULA, which reproduces the retired column row for row (modules/product_data.validate proves the equivalence, and goes red if it ever stops holding): IF({lead_days} > 0, IF({dos} < {lead_days}, \"Buy now\", \"OK\"), \"\") . Every branch matches the old server rule, including the blanks - the formula engine refuses a comparison against a blank rather than coercing it to 0, so a SKU with no days-of-supply or no lead time comes out empty, which is 'we do not know' and not 'you are fine'. NOTE the column is still COMPUTED in product_data.pool(): it ships nowhere (rows_from_pool projects strictly through this contract, so no Field means no cell on the wire) and exists only as validate()'s oracle. A formula field is PER-USER, so nothing shared may filter on it - the Buy list view filters on dos/lead_days directly (_seed_wave17).",
+ "product_data": {
+ "identity": "pid",
+ "business_key": "code",
+ "fields": [
+ {
+ "key": "code",
+ "label": "SKU",
+ "type": "text",
+ "source": "odoo",
+ "pinned": true,
+ "default": true,
+ "description": "The SKU code \u2014 the product's real business key. `pid` is a stable CRC32 of it because the grid keys on an integer."
+ },
+ {
+ "key": "product",
+ "label": "Product",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "Product name as it appears in Odoo."
+ },
+ {
+ "key": "category",
+ "label": "Category",
+ "type": "select",
+ "source": "odoo",
+ "default": true,
+ "description": "Product category; '(uncategorized)' when Odoo carries none."
+ },
+ {
+ "key": "supplier",
+ "label": "Supplier",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "Who makes it, from the inventory mastersheet. Not an Odoo field."
+ },
+ {
+ "key": "origin_country",
+ "label": "Country",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Country of origin, from the inventory mastersheet."
+ },
+ {
+ "key": "lead_days",
+ "label": "Lead time (days)",
+ "type": "int",
+ "source": "odoo",
+ "default": true,
+ "description": "Order-to-arrival days for this supplier. Drives the buy signal."
+ },
+ {
+ "key": "first_cost",
+ "label": "First cost",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Quoted unit cost at origin, before freight and duty."
+ },
+ {
+ "key": "rev_ytd",
+ "label": "Revenue YTD",
+ "type": "currency",
+ "source": "odoo",
+ "default": true,
+ "description": "Year-to-date revenue for this SKU, BU-scoped when the caller is."
+ },
+ {
+ "key": "rev_ly",
+ "label": "Revenue LY",
+ "type": "currency",
+ "source": "odoo",
+ "description": "Same period last year \u2014 seasonal wholesale compares like for like."
+ },
+ {
+ "key": "yoy_pct",
+ "label": "YoY %",
+ "type": "pct",
+ "source": "odoo",
+ "description": "Year-over-year change; null when last year was zero (a ratio to zero is not a number)."
+ },
+ {
+ "key": "qty_ytd",
+ "label": "Units YTD",
+ "type": "int",
+ "source": "odoo",
+ "description": "Units sold year to date."
+ },
+ {
+ "key": "orders_ytd",
+ "label": "Orders YTD",
+ "type": "int",
+ "source": "odoo",
+ "description": "Distinct orders containing this SKU, year to date."
+ },
+ {
+ "key": "on_hand",
+ "label": "On hand",
+ "type": "int",
+ "source": "odoo",
+ "description": "Units in stock. CONSOLIDATED \u2014 one physical warehouse, not brand-tagged, so this column is ABSENT for a BU-scoped caller rather than silently company-wide."
+ },
+ {
+ "key": "unit_cost",
+ "label": "Unit cost",
+ "type": "currency",
+ "source": "odoo",
+ "description": "Inventory unit cost. Consolidated; absent for a BU-scoped caller."
+ },
+ {
+ "key": "inv_value",
+ "label": "Stock value",
+ "type": "currency",
+ "source": "odoo",
+ "description": "On-hand value at cost. Consolidated; absent for a BU-scoped caller."
+ },
+ {
+ "key": "qty_ltm",
+ "label": "Units LTM",
+ "type": "int",
+ "source": "odoo",
+ "description": "Units sold in the last twelve months. Consolidated; absent for a BU-scoped caller."
+ },
+ {
+ "key": "dos",
+ "label": "Days of supply",
+ "type": "int",
+ "source": "odoo",
+ "description": "Days of supply at the LTM rate; null means it never sells through. Consolidated; absent for a BU-scoped caller."
+ },
+ {
+ "key": "cover_gap_d",
+ "label": "Cover gap (days)",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Days of supply minus lead time. Negative means it runs out before a reorder lands."
+ },
+ {
+ "key": "stock_bucket",
+ "label": "Stock status",
+ "type": "select",
+ "source": "odoo",
+ "description": "Dead / excess / healthy bucket from the inventory module. Consolidated; absent for a BU-scoped caller."
+ }
+ ]
+ }
+}
diff --git a/platform/core/assets.py b/platform/core/assets.py
new file mode 100644
index 0000000000000000000000000000000000000000..0b8b950a1fee8296ce08e4625cbcaec75d7f1bd6
--- /dev/null
+++ b/platform/core/assets.py
@@ -0,0 +1,218 @@
+"""core/assets.py — the product-image ASSET SOURCE (wave 18, C2-ASSET).
+
+WHY THIS FILE EXISTS AT ALL, given the route is three functions long: the API process is
+HOST-AGNOSTIC by contract (`ops/verify_portability.py` checks B1/B2 — the HuggingFace SDK may
+appear ONLY in its declared homes, all of which live under `platform/`, so the FastAPI
+service can be lifted to Hetzner/EC2 without dragging a hub client with it). The first version
+of `routes_assets.py` imported `huggingface_hub` directly and the gate caught it. The fetch is
+a STORE-shaped concern anyway, so it belongs beside `core/store.py`.
+
+Two sources, checked by the caller in order:
+ * a local master directory (`AIOS_ASSET_DIR`) — dev, and the fastest path on the owner's box;
+ * the private HF dataset `AIOS_ASSET_REPO` (default `royal-imports/product-assets`), laid out
+ by `ingest_product_assets.py`:
+ assets/products/orig/ masters, archived verbatim (owner ruling R9)
+ assets/products/web/.png ~800px derivatives (what the app displays)
+ manifest.json {"codes": {"": {"ext": ".png"}}, ...}
+
+Every failure returns None/{} rather than raising: a missing image is "no picture for that SKU",
+never a broken catalog page.
+"""
+import os
+import time
+from pathlib import Path
+
+DEFAULT_REPO = 'royal-imports/product-assets'
+_MANIFEST_TTL = 300
+#: (fetched_at, {"CODE": {...}}, {"slug": {...}}) — one manifest read per process per TTL.
+#: DEBT-5 (2026-08-04): the same manifest.json now carries a second, NON-SKU half under
+#: "editorial" — full-bleed lifestyle imagery for catalog gallery pages, keyed by slug.
+#: ⭐ WAVE 19 R7 / C5: and a THIRD, under "records" — pictures uploaded through an `image` FIELD,
+#: namespaced BY TENANT (`/`). The other two namespaces are Royal's catalogue assets
+#: and are tenant-#0 material by nature; this one is written by any signed-in user of any tenant,
+#: so the tenant is part of the address and comes from the SESSION on both write and read.
+_MANIFEST = {'at': 0.0, 'codes': None, 'editorial': None, 'records': None}
+
+
+def repo_id():
+ return os.environ.get('AIOS_ASSET_REPO', '').strip() or DEFAULT_REPO
+
+
+def _token():
+ return os.environ.get('HF_TOKEN') or None
+
+
+def _load():
+ now = time.time()
+ if _MANIFEST['codes'] is not None and now - _MANIFEST['at'] < _MANIFEST_TTL:
+ return
+ try:
+ import json
+
+ from huggingface_hub import hf_hub_download
+ p = hf_hub_download(repo_id(), 'manifest.json', repo_type='dataset', token=_token())
+ man = json.loads(Path(p).read_text(encoding='utf-8')) or {}
+ codes = man.get('codes') or {}
+ editorial_ = man.get('editorial') or {}
+ records_ = man.get('records') or {}
+ except Exception:
+ codes, editorial_, records_ = {}, {}, {}
+ _MANIFEST.update(at=now, codes=codes, editorial=editorial_, records=records_)
+
+
+def manifest():
+ """{CODE: {'ext': '.png'}} for the configured asset repo, or {} when unreachable."""
+ _load()
+ return _MANIFEST['codes']
+
+
+def editorial():
+ """{slug: {'ext': ...}} — the editorial (non-SKU) half of the manifest; {} when unreachable."""
+ _load()
+ return _MANIFEST['editorial'] or {}
+
+
+def fetch(code, quality='web'):
+ """A local Path to one asset, or None. The hub cache dedupes across requests, so a container
+ downloads each file at most once."""
+ meta = manifest().get(code)
+ if not meta:
+ return None
+ rel = (f'assets/products/web/{code}.png' if quality == 'web'
+ else f"assets/products/orig/{code}{meta.get('ext', '.png')}")
+ try:
+ from huggingface_hub import hf_hub_download
+ return Path(hf_hub_download(repo_id(), rel, repo_type='dataset', token=_token()))
+ except Exception:
+ return None
+
+
+def fetch_editorial(slug, quality='web'):
+ """A local Path to one EDITORIAL asset, or None — same shape as fetch()."""
+ meta = editorial().get(slug)
+ if not meta:
+ return None
+ rel = (f'assets/editorial/web/{slug}.png' if quality == 'web'
+ else f"assets/editorial/orig/{slug}{meta.get('ext', '.png')}")
+ try:
+ from huggingface_hub import hf_hub_download
+ return Path(hf_hub_download(repo_id(), rel, repo_type='dataset', token=_token()))
+ except Exception:
+ return None
+
+
+def put_editorial(slug, orig_bytes, ext, web_png):
+ """Store one editorial image: the original, its web derivative and the updated manifest in
+ ONE commit (a partial upload can never leave a listed-but-unfetchable slug). Raises on
+ failure — the route turns that into an honest 503, never a silent success.
+
+ ⚠ manifest.json is read-modify-write with no lock; two admins uploading in the same
+ second could drop one entry. Accepted for an admin-rare action; the fix (a server-side
+ merge) rides the day uploads become routine."""
+ import json
+
+ from huggingface_hub import CommitOperationAdd, HfApi, hf_hub_download
+ api = HfApi(token=_token())
+ try:
+ p = hf_hub_download(repo_id(), 'manifest.json', repo_type='dataset', token=_token(),
+ force_download=True)
+ man = json.loads(Path(p).read_text(encoding='utf-8')) or {}
+ except Exception:
+ man = {}
+ man.setdefault('editorial', {})[slug] = {'ext': ext}
+ api.create_commit(
+ repo_id(), repo_type='dataset',
+ operations=[
+ CommitOperationAdd(f'assets/editorial/orig/{slug}{ext}', orig_bytes),
+ CommitOperationAdd(f'assets/editorial/web/{slug}.png', web_png),
+ CommitOperationAdd('manifest.json',
+ json.dumps(man, indent=1, sort_keys=True).encode('utf-8')),
+ ],
+ commit_message=f'editorial asset: {slug}')
+ reset_cache()
+ return True
+
+
+# ───────────────────────────────────────── record images (wave 19, R7 / contract C5)
+#
+# A picture attached to ONE ROW through an `image` field, by any signed-in user. Two things make
+# this namespace different from the two above, and both are about who may write it:
+#
+# * it is TENANT-ADDRESSED (`/`), because a nurilab user uploading a photo must not
+# land anywhere a royal-imports read can reach. The tenant comes from the SESSION at both
+# ends — never from the reference string, which is why a `rec:` ref copied between tenants
+# resolves to a 404 rather than to somebody else's photograph.
+# * the id is SERVER-MINTED hex, so the client never names a path component.
+
+
+def records():
+ """{'/': {'ext': ...}} — the record-image half of the manifest; {} if unreachable."""
+ _load()
+ return _MANIFEST['records'] or {}
+
+
+def record_ref(tenant, asset_id):
+ """The manifest key for one tenant's asset. ONE composition point, so read and write cannot
+ disagree about where a picture lives."""
+ return f"{str(tenant or '').strip().lower()}/{str(asset_id or '').strip().lower()}"
+
+
+def fetch_record(tenant, asset_id, quality='web'):
+ """A local Path to one RECORD image, or None — same shape as fetch()/fetch_editorial().
+
+ ⛔ Returns None for an id this tenant does not own, and that is the cross-tenant wall: the
+ lookup key is composed from the caller's own tenant, so an id belonging to another tenant is
+ simply absent from the manifest under this address. Indistinguishable from "no such picture",
+ which is exactly what the caller is entitled to know.
+ """
+ ref = record_ref(tenant, asset_id)
+ meta = records().get(ref)
+ if not meta:
+ return None
+ rel = (f'assets/records/{ref}/web.png' if quality == 'web'
+ else f"assets/records/{ref}/orig{meta.get('ext', '.png')}")
+ try:
+ from huggingface_hub import hf_hub_download
+ return Path(hf_hub_download(repo_id(), rel, repo_type='dataset', token=_token()))
+ except Exception:
+ return None
+
+
+def put_record(tenant, asset_id, orig_bytes, ext, web_png):
+ """Store one record image: original, web derivative and the updated manifest in ONE commit
+ (a partial upload can never leave a listed-but-unfetchable reference). Raises on failure —
+ the route turns that into an honest 503, never a silent success.
+
+ ⚠ Shares `put_editorial`'s read-modify-write caveat on manifest.json: two uploads landing in
+ the same second could drop one entry. Uploads through a field are rarer than a scroll but far
+ from admin-rare, so this is the first namespace where that will actually bite — booked in the
+ wave doc rather than quietly inherited.
+ """
+ import json
+
+ from huggingface_hub import CommitOperationAdd, HfApi, hf_hub_download
+ ref = record_ref(tenant, asset_id)
+ api = HfApi(token=_token())
+ try:
+ p = hf_hub_download(repo_id(), 'manifest.json', repo_type='dataset', token=_token(),
+ force_download=True)
+ man = json.loads(Path(p).read_text(encoding='utf-8')) or {}
+ except Exception:
+ man = {}
+ man.setdefault('records', {})[ref] = {'ext': ext}
+ api.create_commit(
+ repo_id(), repo_type='dataset',
+ operations=[
+ CommitOperationAdd(f'assets/records/{ref}/orig{ext}', orig_bytes),
+ CommitOperationAdd(f'assets/records/{ref}/web.png', web_png),
+ CommitOperationAdd('manifest.json',
+ json.dumps(man, indent=1, sort_keys=True).encode('utf-8')),
+ ],
+ commit_message=f'record image: {ref}')
+ reset_cache()
+ return True
+
+
+def reset_cache():
+ """Drop the memoized manifest — for gates and for a post-ingest refresh."""
+ _MANIFEST.update(at=0.0, codes=None, editorial=None, records=None)
diff --git a/platform/core/auth_google.py b/platform/core/auth_google.py
new file mode 100644
index 0000000000000000000000000000000000000000..43f656d44078f18c71eaf50fb179e6a6a189f3b3
--- /dev/null
+++ b/platform/core/auth_google.py
@@ -0,0 +1,91 @@
+"""Sign in with Google — TEMPLATE ONLY (wave-7 W10, 2026-07-28). Nothing here runs in
+production yet: every flow function raises until the wiring checklist in
+docs/GOOGLE_LOGIN_TODO.md is completed and GOOGLE_LOGIN_ENABLED=1 is set.
+
+DESIGN (recorded now so the full build has a contract to meet):
+ - OAuth 2.0 authorization-code flow with PKCE against Google Identity
+ (https://accounts.google.com/.well-known/openid-configuration). No SDK dependency —
+ three HTTPS calls (authorize redirect, token exchange, JWKS fetch) keep the surface
+ auditable and the requirements.txt unchanged until we commit.
+ - Google is an IDENTITY, not an ACCOUNT SOURCE. A Google sign-in maps to an EXISTING
+ core/users.py account via its `email` attribute (set_access(..., email=...)); an
+ unknown email FAILS CLOSED with "no account for this Google identity" — Google login
+ never creates users, so the per-BU/per-module grant model stays the only door.
+ - The password gate stays byte-for-byte intact beside it. APP_PASSWORD remains the
+ bootstrap master; removing password auth is a separate, owner-approved step.
+
+ENV (placeholders — see .env.example additions in docs/GOOGLE_LOGIN_TODO.md):
+ GOOGLE_OAUTH_CLIENT_ID OAuth client id from Google Cloud console
+ GOOGLE_OAUTH_CLIENT_SECRET its secret (Space secret / .env — never committed)
+ GOOGLE_OAUTH_REDIRECT_URI e.g. https://royal-imports-cfo-os.hf.space/ (must be
+ registered VERBATIM in the console; localhost:8501 for dev)
+ GOOGLE_LOGIN_ENABLED '1' arms the flow; anything else keeps this a template
+"""
+from __future__ import annotations
+
+import os
+
+AUTH_ENDPOINT = "https://accounts.google.com/o/oauth2/v2/auth"
+TOKEN_ENDPOINT = "https://oauth2.googleapis.com/token"
+JWKS_URI = "https://www.googleapis.com/oauth2/v3/certs"
+SCOPES = "openid email profile"
+
+
+def configured() -> bool:
+ """True when the console credentials exist — the LOGIN BUTTON renders iff this is True.
+ (Separate from enabled(): a configured-but-disabled deploy shows nothing either, so a
+ half-finished setup never paints a dead button.)"""
+ return bool(os.environ.get("GOOGLE_OAUTH_CLIENT_ID")) and enabled()
+
+
+def enabled() -> bool:
+ return os.environ.get("GOOGLE_LOGIN_ENABLED", "") == "1"
+
+
+def auth_url(state: str, code_challenge: str) -> str:
+ """The Google consent-screen URL for the authorization-code + PKCE flow.
+
+ `state` must be an unguessable per-session token the callback VERIFIES (CSRF);
+ `code_challenge` is BASE64URL(SHA256(code_verifier)) with the verifier held in the
+ session. Template guard: raises until the TODO checklist lands.
+ """
+ raise NotImplementedError(
+ "Google login is a template — complete docs/GOOGLE_LOGIN_TODO.md, then implement "
+ "auth_url() (urlencode client_id, redirect_uri, response_type=code, scope, state, "
+ "code_challenge, code_challenge_method=S256 onto AUTH_ENDPOINT)."
+ )
+
+
+def exchange_code(code: str, code_verifier: str) -> dict:
+ """POST the authorization code to TOKEN_ENDPOINT → {'id_token', 'access_token', ...}.
+ Template guard: raises until implemented (requests.post with client_id/secret,
+ redirect_uri, grant_type=authorization_code, code, code_verifier)."""
+ raise NotImplementedError(
+ "Google login is a template — implement exchange_code() per docs/GOOGLE_LOGIN_TODO.md."
+ )
+
+
+def verify_id_token(id_token: str) -> dict:
+ """Validate the JWT against Google's JWKS (signature, iss, aud=client_id, exp) and
+ return its claims ({'email', 'email_verified', 'name', ...}). MUST reject
+ email_verified=False. Template guard: raises until implemented."""
+ raise NotImplementedError(
+ "Google login is a template — implement verify_id_token() per docs/GOOGLE_LOGIN_TODO.md."
+ )
+
+
+def account_for_claims(claims: dict):
+ """Map verified Google claims → the core/users.py account, FAIL-CLOSED.
+
+ The one function already real: the mapping rule is the design's heart and testable
+ today. Returns the users.registry() record whose `email` equals the verified claim
+ (case-insensitive), only if the account is active; None otherwise — never a new user.
+ """
+ email = str(claims.get("email") or "").strip().lower()
+ if not email or claims.get("email_verified") is not True:
+ return None
+ from core import users
+ for username, u in (users.registry() or {}).items():
+ if str(u.get("email") or "").strip().lower() == email and u.get("active", True):
+ return users._public(username, u)
+ return None
diff --git a/platform/core/context.py b/platform/core/context.py
new file mode 100644
index 0000000000000000000000000000000000000000..bc5bc93c11e360b10755f192414d113682339f48
--- /dev/null
+++ b/platform/core/context.py
@@ -0,0 +1,59 @@
+"""Request context — the single object that carries the GLOBAL filters through a page render.
+
+Instead of threading date_from / date_to / team_id / ... through every function, a page builds
+one `Ctx` from the sidebar controls and passes it (or its primitives) down. Modules read only
+what they need. Add a new global filter once here and every module can opt into it.
+
+The DBA (doing-business-as) brand filter lives here as `team_id`:
+ None -> All / consolidated (Fisch + Royal)
+ 5 -> Fisch
+ 6 -> Royal
+HQ / company-level modules (cash flow, balance sheet, AR/AP, consolidated P&L) ignore brand and
+call `ctx.consolidated()`; operational modules (sales, customers, products, margins) honour it.
+"""
+from dataclasses import dataclass, replace
+import core.odoo as O
+import core.periods as P
+
+# label -> team_id used by the sidebar Brand (DBA) selector
+BRANDS = {'All': None, 'Fisch': 5, 'Royal': 6}
+
+
+@dataclass(frozen=True)
+class Ctx:
+ date_from: str
+ date_to: str
+ period_label: str = 'Year to date'
+ team_id: int | None = None # None = All DBAs (consolidated); 5 = Fisch; 6 = Royal
+ doc_mode: str = 'order' # reserved: 'order' vs 'invoice' recognition basis
+
+ @property
+ def brand(self) -> str:
+ return O.TEAM_NAMES.get(self.team_id, 'All') if self.team_id else 'All'
+
+ @property
+ def teams(self) -> list:
+ """Team ids in scope (single brand, or both when consolidated)."""
+ return [self.team_id] if self.team_id else list(O.TEAM_IDS)
+
+ @property
+ def window(self) -> tuple:
+ return self.date_from, self.date_to
+
+ def consolidated(self) -> 'Ctx':
+ """All-DBA copy — HQ modules use this so the brand filter never scopes company numbers."""
+ return replace(self, team_id=None)
+
+ def with_period(self, date_from, date_to, label=None) -> 'Ctx':
+ return replace(self, date_from=date_from, date_to=date_to,
+ period_label=label or self.period_label)
+
+
+def from_ui(period_label, period_window, brand_label='All', doc_mode='order') -> Ctx:
+ df, dt = period_window
+ return Ctx(df, dt, period_label, BRANDS.get(brand_label), doc_mode)
+
+
+def default(t=None) -> Ctx:
+ df, dt = P.ytd(t)
+ return Ctx(df, dt, 'Year to date', None)
diff --git a/platform/core/grid_events.py b/platform/core/grid_events.py
new file mode 100644
index 0000000000000000000000000000000000000000..40b64777ad6fb69854c7fde8976ab6b4941a87fb
--- /dev/null
+++ b/platform/core/grid_events.py
@@ -0,0 +1,1396 @@
+"""core/grid_events.py — THE WRITE SEAM, lifted out of Streamlit (EXIT-1a, X1, 2026-07-30).
+
+This is the grid's event handler: the code that takes an UNTRUSTED event object from the
+browser component and decides what may be persisted. It was `app.py:_cl_handle_grid_event` /
+`_cl_handle_one` and moved here as a PURE MOVE — no behavior change inside a move (MA principle
+5). Every body below is the app.py body verbatim; the ONLY mechanical rewrites are the
+Streamlit couplings the contract names:
+
+ st.session_state['_cl_grid_seen_ids'] -> ctx.seen_ids (adapter-owned dedup state)
+ st.session_state['_cl_doc_payload'] -> ctx.out.doc (EventResult.doc)
+ st.session_state['_cohort_toast'] -> ctx.out.toast (EventResult.toast)
+ st.session_state['cl_table_workspace'] -> ctx.fallback_ws (store-unavailable fallback)
+ is_admin() (the bare call inside doc_delete, and _cl_table_workspace's admin=None default)
+ -> ctx.admin
+
+There is NO `import streamlit` in this file and there must never be one — `verify_no_streamlit.py`
+enforces that with a `sys.meta_path` block, which is the only proof that survives refactoring.
+(That gate was `verify_seam.py` until EXIT-6 retired it with `app.py`; the block, its negative
+control and the AST walk moved over intact.)
+
+ONE ADAPTER, ONE HANDLER — it was TWO until 2026-08-04:
+ * ⛔ the Streamlit adapter is GONE. `app.py::_cl_handle_grid_event` built an EventCtx whose
+ `seen_ids` and `fallback_ws` were session-state-backed dicts and applied the Result to session
+ state. EXIT-6 deleted it. The host-neutrality this file was written for is what let that
+ happen without touching a line of the handler — which is the argument for the design, recorded
+ at the moment it paid out.
+ * the HTTP adapter — `aios-web/api` builds an EventCtx with `fallback_ws=None`. A None
+ fallback with the store unavailable is a **503**, never a silent in-memory workspace: an
+ API request has no durable session dict to fall back to, so pretending to persist would
+ lose the write with a 200 on it.
+
+⚠ LAYERING, stated honestly. `core/` is not supposed to import `modules/` (ARCHITECTURE §1's
+one-directional rule). This handler genuinely straddles: it is the WRITE half of the customer
+table and its persistence verbs live in `modules.customer_data` / `modules.cohort`. The
+contracted path for the strangler is `core/grid_events.py` (both adapters import it from here),
+so the import stays and the violation is RECORDED rather than hidden. It is the one file in
+`core/` that points up; when EXIT-5 ports the surfaces, the persistence verbs are what move
+down, and this note is the marker for that work.
+"""
+import datetime as dt
+from dataclasses import dataclass, field
+from typing import MutableMapping, Optional
+
+import core.store as store
+import core.table_store as _tstore # wave-9 I17: the shared-view authorisation predicates
+import core.users as users
+import harness.telemetry as _tel # _tel.error() = THE error sink (all caught errors log)
+import modules.cohort as cohort_mod
+import modules.customer_data as cl_mod
+
+#: C5 (owner item 12): customer documents. The cap is enforced HOST-side on the DECODED byte
+#: count — the client checks the same number first, but a client check only spares the user a
+#: pointless upload; this is what bounds what the tenant's dataset can be made to hold.
+#: MOVED from app.py:1410–1412 with the handler (app.py re-imports these during the strangler).
+_DOCS_KEY = 'customer_docs'
+_DOC_MAX_BYTES = 5 * 1024 * 1024
+_DOC_MAX_PER_ROW = 50
+
+#: The props of a field def the CLIENT actually draws — the wave-6 no-blip comparison set.
+#: Host-only stamps (createdBy, permissions) are deliberately absent: the client renders
+#: nothing from its own copy of those, and a permissions refusal is answered explicitly.
+_FIELD_ECHO_PROPS = ('label', 'type', 'note', 'options', 'colorCodeOptions',
+ 'optionColors', 'max', 'formula', 'agg', 'scope', 'format', 'measure')
+
+
+class StoreUnavailable(RuntimeError):
+ """The store is down AND the caller offered no durable fallback (HTTP adapter → 503).
+
+ The Streamlit adapter never sees this: it passes a session-state-backed `fallback_ws`, so
+ its store-down path degrades to the same captioned in-memory workspace it always had. An
+ API caller has no such dict, and the honest answer to "persist this" with nowhere to
+ persist it is an error — not a 200 over a write that evaporates.
+ """
+
+
+@dataclass
+class EventResult:
+ """What the HANDLER needs to tell its adapter — the three things it cannot do itself.
+
+ `rerender` is the old return value with its old meaning: "this page must re-render from
+ server state", NOT "handled" (see `handle_one`'s docstring — the distinction is the
+ difference between a snappy grid and a sluggish one).
+ """
+ rerender: bool = False
+ doc: Optional[dict] = None # doc_fetch's answer — the bridge has no response channel
+ toast: Optional[str] = None # add_to_list's confirmation
+
+
+@dataclass
+class EventCtx:
+ """Everything the handler is allowed to know, and nothing about how it is being served.
+
+ ⚠ `allowed_pids` is a SECURITY parameter: it is the pool this caller may touch at all, and
+ every row-scoped event (overlay_patch, doc_*, cohort membership, add_to_list, memberPids)
+ is intersected with it. `admin` and `uname` are likewise the HOST's statement of identity —
+ never anything the browser said about itself.
+
+ `seen_ids` is ADAPTER-OWNED dedup state (the event log resends its recent window on every
+ emit, so consumed ids must stay consumed): Streamlit passes a session-state dict, HTTP
+ passes the caller's per-session mapping.
+
+ `fallback_ws` is the store-unavailable workspace home, the OUTER dict keyed by username
+ (exactly what `st.session_state.setdefault('cl_table_workspace', {})` is). HTTP passes
+ None, and None + store down raises StoreUnavailable (→ 503).
+
+ `out` is the sink for the two parked answers, so `handle_one` can keep returning a bare
+ bool exactly as it did in app.py while doc/toast still escape. (Additive amendment to X1's
+ field list, 2026-07-30 — defaulted; recorded in the S1 mailbox.)
+ """
+ uname: str
+ allowed_pids: frozenset
+ fields: list
+ measure_keys: frozenset = frozenset()
+ resolved_ids: frozenset = frozenset()
+ cohort_ids: frozenset = frozenset()
+ measure_offer: tuple = ()
+ visible_views: tuple = ()
+ admin: bool = False
+ #: ⛔ WAVE 15 C-PERM — the fields this caller's PERMANENT PERMISSIONS hide, transitive
+ #: closure included (`core.perm_scope.hidden_keys`). A SECURITY parameter in the same class
+ #: as `allowed_pids`, and here for the same reason: the read paths strip a hidden field from
+ #: both wires, so a caller cannot SEE it — but without this they could still WRITE it by
+ #: naming the key, because `overlay_keys` only asks whether the column exists. Empty means
+ #: "nothing hidden", which is every legacy record and therefore every caller today.
+ hidden_keys: frozenset = frozenset()
+ scope_key: str = 'customer'
+ #: Wave 16 C-TOPIC — the TABLE OPS this ctx reads and writes (a `core.table_store.make`
+ #: object). None = the CUSTOMER table (`modules.customer_data.TABLE_OPS`), which keeps
+ #: every existing caller byte-identical. The PRODUCT surface passes
+ #: `modules.product_data.TABLE_OPS` so its views/fields/overlays land in the product
+ #: bucket — never the customer one, whose pids are a different id space entirely.
+ table: Optional[object] = None
+ seen_ids: Optional[MutableMapping] = None
+ fallback_ws: Optional[MutableMapping] = None
+ out: EventResult = field(default_factory=EventResult)
+
+ def __post_init__(self):
+ # A caller that forgets `seen_ids` gets per-call dedup rather than a crash — the SET is
+ # what makes re-delivery idempotent, and its absence must not be the thing that decides
+ # whether an event is processed at all.
+ if self.seen_ids is None:
+ self.seen_ids = {}
+
+
+def _tops(ctx):
+ """The table-ops object this ctx operates on — the customer table unless the caller chose
+ another topic. ONE resolution point so 'which bucket does this write land in' has exactly
+ one answer per event."""
+ return ctx.table if ctx.table is not None else cl_mod.TABLE_OPS
+
+
+def _cohorts(ctx):
+ """The COHORT store this ctx operates on — `_tops`'s sibling, and here for the same reason.
+
+ ⭐ WAVE 19 / R9: a cohort belongs to its database. Every cohort verb below used to name
+ `cohort_mod` directly, so a list built on the Product surface landed in `customer_cohorts`
+ beside somebody's real customer lists — with PRODUCT pids in it (CRC32 hashes of SKU codes),
+ which the customer page would then try to resolve against partner ids. Wave 16 answered that
+ by REFUSING cohorts on other topics (`with_cohorts=False`); R9 says scope-parameterize
+ instead. `modules.cohort.scoped` returns the module itself for the customer topic, so the
+ customer path is byte-unchanged.
+ """
+ return cohort_mod.scoped(ctx.scope_key)
+
+
+def _docs_key(ctx):
+ """The DOCUMENTS bucket this ctx operates on — `_cohorts`'s sibling (wave 19, item 12's
+ silent third case).
+
+ ⛔ `_DOCS_KEY` STAYS the module constant with its shipped value: app.py re-imports it for the
+ Streamlit docs payload and `verify_seam.py` asserts the two resolve to the same string. This
+ resolves the CUSTOMER topic to exactly that constant and gives every other database its own
+ bucket, so the pid keys inside one bucket all come from one id space.
+ """
+ scope = str(getattr(ctx, 'scope_key', '') or 'customer').strip().lower()
+ if scope in cohort_mod.LEGACY_SCOPES:
+ return _DOCS_KEY
+ return f'{scope}_docs'
+
+
+# ------------------------------------------------------------------ the workspace family (X1 amd.)
+def table_workspace(ctx, allowed_pids=None, consume_corrections=True):
+ """Durable Airtable-style view/schema/overlay state, with an honest session fallback.
+
+ Wave-9 I17: the returned `views` are this user's OWN views MERGED with every view SHARED
+ with them. Own views win a same-id collision — a personal view is the user's own object and
+ must never be shadowed by somebody else's share.
+
+ ⚠ `allowed_pids` is a SECURITY parameter, not a convenience. A shared view carries
+ `memberPids`, which the writer's scope validated on the way IN — but the READER may have a
+ narrower scope. Handing a Fisch-scoped user a view whose member list was built by a
+ full-access user would leak the other BU's customers straight through the strict-isolation
+ rule. So membership is re-filtered against the READER on the way OUT. Pass it wherever the
+ result reaches a renderer or an event handler; omitting it drops memberPids entirely rather
+ than trusting the stored list (fail-closed: a smaller view, never a wider one).
+
+ MOVED from app.py:5323 (`_cl_table_workspace`). `admin` was a parameter defaulting to a live
+ `is_admin()` call; it now always comes from `ctx.admin`, which is identical at the one call
+ site because app.py computes `admin = bool(is_admin())` once per render. `allowed_pids`
+ stays an EXPLICIT argument because the folder leg deliberately omits it.
+ """
+ uname = ctx.uname
+ if store.available():
+ ws = _tops(ctx).workspace(
+ uname, consume_corrections=bool(consume_corrections))
+ try:
+ shared = _tops(ctx).shared_views(uname, bool(ctx.admin))
+ except Exception as _se:
+ _tel.error('sharedviews:read', _se)
+ shared = {}
+ if shared:
+ merged = dict(shared)
+ merged.update(ws.get('views') or {}) # own views win the id collision
+ ws['views'] = {vid: scope_view(v, uname, allowed_pids)
+ for vid, v in merged.items()}
+ return ws
+ # Store down. Streamlit degrades to its captioned session workspace exactly as before; an
+ # API caller has no durable dict and must be told, not quietly served memory.
+ if ctx.fallback_ws is None:
+ raise StoreUnavailable('table workspace unavailable: no store and no session fallback')
+ return ctx.fallback_ws.setdefault(
+ uname, {'views': {}, 'fields': {}, 'overlays': {}})
+
+
+def scope_view(view, uname, allowed_pids):
+ """Re-scope a view to the READER. A no-op for a view the reader created.
+
+ Two things travel inside a shared view that are SCOPE, not presentation:
+ 1. `memberPids` — a customer list. Re-filtered against the reader's permitted pool.
+ 2. cohort conditions — a cohort id is a permission handle owned by ONE user. For a reader
+ who does not own it the leaf is UNANSWERABLE, and partial evaluation of an unanswerable
+ leaf WIDENS `is none of` ([[cg-cohort-set-conditions]]) — i.e. it would show MORE rows,
+ not fewer. So the whole filter tree is dropped for a foreign reader rather than
+ evaluated with a hole in it. A visibly unfiltered shared view is recoverable; a
+ silently widened one is a leak.
+ """
+ if not isinstance(view, dict) or view.get('createdBy') == uname:
+ return view
+ out = dict(view)
+ cfg = dict(out.get('config') or {})
+ mp = cfg.get('memberPids')
+ if isinstance(mp, list):
+ cfg['memberPids'] = ([p for p in mp if p in (allowed_pids or ())]
+ if allowed_pids is not None else [])
+ if tree_has_cohort(cfg.get('filters')):
+ cfg['filters'] = []
+ cfg['_scopedOut'] = 'cohort' # the client says so rather than pretending
+ out['config'] = cfg
+ return out
+
+
+def tree_has_cohort(node):
+ """True when a filter tree references the Cohorts column anywhere (any depth)."""
+ import aios_grid as _agc
+ col = _agc.COHORT_COLUMN
+ if isinstance(node, list):
+ return any(tree_has_cohort(n) for n in node)
+ if not isinstance(node, dict):
+ return False
+ if node.get('colId') == col or node.get('field') == col:
+ return True
+ return tree_has_cohort(node.get('conditions') or node.get('children'))
+
+
+def measure_leaves(nodes):
+ """Every leaf of a filter tree that carries a date WINDOW — i.e. every measure condition.
+
+ Keyed off the window rather than the column name on purpose: a window is the one thing no
+ column condition has, so this cannot mistake `revenue_ytd > 5000` for a measure.
+ """
+ out = []
+ for node in nodes or []:
+ if not isinstance(node, dict):
+ continue
+ if isinstance(node.get('children'), list):
+ out.extend(measure_leaves(node['children']))
+ elif node.get('window') is not None:
+ out.append(node)
+ return out
+
+
+# ------------------------------------------------------------------ private handler helpers
+def _field_echo_equal(accepted, raw):
+ """Does the ACCEPTED def match what the client already renders? (wave-6 item 3)
+
+ The no-blip law: a field_upsert whose acceptance changed NOTHING the client draws needs no
+ re-render — the client is the ORIGIN of the change, its optimistic copy is already right,
+ and the rerun it would buy costs a full payload re-serialisation plus an iframe remount
+ (the "blip" the owner named). STRICT per-prop equality after collapsing the empty forms
+ ('' / [] / {} / absent all render identically): any normalisation a validator applied is a
+ real difference the client must be SHOWN. Fail-closed — unsure means not equal means rerun.
+ """
+ empty = ('', [], {})
+ for k in _FIELD_ECHO_PROPS:
+ a, b = accepted.get(k), raw.get(k) if isinstance(raw, dict) else None
+ if k == 'scope':
+ # 'global' and absent are the SAME rendering (an unscoped field) — the event may
+ # say 'global' explicitly while the stored def says it by omission.
+ a = None if a == 'global' else a
+ b = None if b == 'global' else b
+ if (None if a in empty else a) != (None if b in empty else b):
+ return False
+ return True
+
+
+def _unique_name(wanted, existing, *, fallback='Untitled', max_len=120):
+ """Return a durable, case-insensitively unique field/view display name."""
+ limit = max(1, int(max_len))
+
+ def _clean(value):
+ return ' '.join(str(value or '').split())
+
+ base = (_clean(wanted) or _clean(fallback) or 'Untitled')[:limit].rstrip()
+ taken = {_clean(value).casefold() for value in existing if _clean(value)}
+ if base.casefold() not in taken:
+ return base
+ index = 2
+ while True:
+ suffix = f' {index}'
+ stem = base[:max(0, limit - len(suffix))].rstrip()
+ candidate = f'{stem}{suffix}' if stem else str(index)[-limit:]
+ if candidate.casefold() not in taken:
+ return candidate
+ index += 1
+
+
+def _known_usernames():
+ """Real account names, for C4's fail-closed `users` grant. None = "could not resolve".
+
+ None means DO NOT FILTER, deliberately. Returning an empty set on a transient registry
+ error would silently collapse a user's stored 'specific users' grant to 'personal' on the
+ very next autosave — destroying a setting because a read blipped. The grant is inert today
+ anyway (views are per-user; nothing reads it to allow cross-user access), so the honest
+ trade is: never invent access, never destroy a stored intent either.
+ """
+ try:
+ reg = set(users.registry() or {})
+ except Exception as _ue:
+ _tel.error('viewperms:users', _ue)
+ return None
+ # ⚠ EMPTY IS "UNRESOLVED", NOT "NOBODY EXISTS". registry() returns {} rather than raising
+ # when the user store cannot be read (a store blip logs `store:get:users` and hands back an
+ # empty dict) — and a working app ALWAYS has at least the bootstrap admin. Treating {} as a
+ # real answer would filter every name out of a stored grant and collapse it to 'personal'
+ # on the next autosave. Caught by testing this in BARE mode with no store token.
+ return reg or None
+
+
+# ------------------------------------------------------------------ THE SEAM
+def handle_events(events, ctx):
+ """The event LOG entry point → one EventResult. The `[-24:]` window lives here.
+
+ ⚠ THE VALUE IS AN EVENT LOG `{'events': [...]}`, NOT ONE EVENT (2026-07-27). A component
+ has exactly one value slot, and two quick emits share it: creating a field emits
+ `field_upsert` and the insertColumn autosave emits `view_upsert` 420ms later — with the
+ server still inside the first rerun, the second write clobbered the slot before any run
+ read it, and the field creation VANISHED with no error anywhere (measured live; the same
+ race sat latent under overlay-field creation, masked by localStorage). The client now
+ sends its recent window of events; each is processed exactly once, keyed by its id. The
+ single-event shape is still accepted — it is what an older client in a stale tab sends.
+
+ Accepts everything the component value can be: the log dict, a bare list of events (what
+ the HTTP body's `events` array unwraps to), or one legacy single-event object.
+
+ `EventResult.rerender` is True when ANY processed event demands a re-render from server
+ state — the same OR-fold `_cl_handle_grid_event` did.
+ """
+ if isinstance(events, dict) and isinstance(events.get('events'), list):
+ seq = events['events'][-24:]
+ elif isinstance(events, list):
+ seq = events[-24:]
+ else:
+ seq = [events]
+ rerun = False
+ for one in seq:
+ rerun = handle_one(one, ctx) or rerun
+ ctx.out.rerender = rerun
+ return ctx.out
+
+
+def handle_one(event, ctx):
+ """Validate ONE untrusted component event.
+
+ Odoo-source fields are never accepted as cell updates. View and schema objects are
+ user-scoped; row patches additionally require the pid to be in the currently permitted
+ Customer List pool.
+
+ RETURN VALUE = "this page must re-render from server state", NOT "handled".
+ The distinction is the difference between a snappy grid and a sluggish one.
+ Persisting is not by itself a reason to rerun: Streamlit has ALREADY re-run the
+ script once simply to deliver the component value, and the client is the ORIGIN
+ of the change, so its own state is correct before the server hears about it. An
+ extra st.rerun() therefore buys nothing and costs a second full page run.
+ Measured on the 1,550-row book (2026-07-25): one filter tweak produced TWO
+ page_customer_data runs ~2.8s apart, each re-serialising the whole ~576 KB row
+ payload — and the handler on the second run is a guaranteed no-op, because the
+ event-id dedupe two lines below has already consumed that id.
+
+ THE WAVE-6 NO-BLIP LAW (item 3, 2026-07-27) — True ONLY when the next render
+ genuinely differs from what the client already draws:
+ field_upsert — False when the accepted def ECHOES the client's copy
+ (_field_echo_equal); True on any validator mutation, any
+ permissions refusal, and ALWAYS when a measure window changed
+ (values must be re-resolved server-side).
+ overlay_patch — False when every requested update was accepted verbatim;
+ True the moment anything was refused or truncated.
+ field_delete — False: the client removed the column optimistically and the
+ store scrub is invisible to the next render.
+ field_duplicate — True only when host-held VALUES must flow back (custom_ cell
+ copies, measure_ recomputes); formula/created_time clones
+ compute client-side.
+ view_delete — False (the deleted view simply stops being served).
+ view_upsert — unchanged: False, except an unresolved measure condition.
+ cohort_* / add_to_list — True: the lists payload is server truth, and these are
+ not the hot path.
+
+ The id dedupe is a SET (not a last-id slot): the event log resends the whole recent
+ window on every emit, so every id must stay consumed, not just the latest one.
+ """
+ # The ctx fields the moved body reads as plain locals — bound once here so every branch
+ # below is textually the app.py body (which is what makes this move reviewable).
+ uname = ctx.uname
+ allowed_pids = ctx.allowed_pids
+ fields = ctx.fields
+ measure_keys = ctx.measure_keys
+ resolved_ids = ctx.resolved_ids
+ cohort_ids = ctx.cohort_ids
+ measure_offer = ctx.measure_offer
+ visible_views = ctx.visible_views
+ admin = ctx.admin
+ scope_key = ctx.scope_key
+
+ if not isinstance(event, dict):
+ return False
+ event_id = str(event.get('id') or '')[:180]
+ seen = ctx.seen_ids
+ if not event_id or event_id in seen:
+ return False
+ seen[event_id] = True
+ if len(seen) > 400: # a session-lifetime set, kept bounded
+ for stale in list(seen)[:200]:
+ seen.pop(stale, None)
+ kind = event.get('type')
+ field_by_key = {f['key']: f for f in fields}
+ valid_keys = set(field_by_key)
+ overlay_keys = {f['key'] for f in fields if f.get('source') == 'overlay'}
+ # Event validation is not a render payload. It must not consume a one-shot label
+ # correction before the browser has had a chance to receive it.
+ ws = table_workspace(
+ ctx, allowed_pids=allowed_pids, consume_corrections=False)
+
+ def _session_ready():
+ ws.setdefault('views', {})
+ ws.setdefault('fields', {})
+ ws.setdefault('overlays', {})
+
+ if kind == 'view_select':
+ # Owner item 3 (2026-07-31): remember WHERE THE USER IS so a fresh browser resumes
+ # there instead of the system default view. Presentation state only — the read side
+ # re-validates the id against what the caller may see, so nothing here needs an
+ # authorisation wall beyond the length cap. Never a re-render: the client is already
+ # on that view.
+ vid = str(event.get('viewId') or '').strip()[:120]
+ if vid and store.available():
+ try:
+ _tops(ctx).save_active_view(uname, vid)
+ except Exception as _ae:
+ _tel.error('grid:view-select', _ae)
+ return False
+
+ if kind == 'record_layout':
+ # Wave 2026-08-02 (C-LAYOUT): the per-user record-detail field order. Presentation
+ # state for one surface; grid column order is untouched. Unknown keys are pruned
+ # against the LIVE field set, dupes collapse, and the wire re-validates at serve
+ # time — so a client racing a field delete degrades to default order, never an error.
+ raw_order = event.get('order')
+ if not isinstance(raw_order, list):
+ return False
+ order, seen = [], set()
+ for k in raw_order[:200]:
+ k = str(k or '').strip()[:80]
+ if k and k in valid_keys and k not in seen:
+ seen.add(k)
+ order.append(k)
+ if store.available():
+ _tops(ctx).save_record_layout(uname, order)
+ else:
+ _session_ready()
+ if order:
+ ws['recordLayout'] = {'order': order}
+ else:
+ ws.pop('recordLayout', None)
+ # Autosave hot path, like view_select: the client already renders the order it asked
+ # for, and the wire echoes it back on the next workspace read.
+ return False
+
+ if kind == 'view_upsert':
+ raw = event.get('view')
+ if not isinstance(raw, dict) or not isinstance(raw.get('config'), dict):
+ return False
+ view_id = str(raw.get('id') or '').strip()[:120]
+ name = str(raw.get('name') or '').strip()[:120]
+ requested_name = name
+ if not view_id or not name:
+ return False
+ cfg = raw['config']
+ # The filter TREE (leaf conditions and/or nested condition groups) is
+ # validated by the module-agnostic grid contract helper — imported lazily
+ # here for the same reason the page does it: a missing embed build must
+ # never break page import.
+ import aios_grid as _ag
+ # A MEASURE key is valid in a FILTER and nowhere else (CG-8): it may not be ordered,
+ # shown, grouped or coloured by, because it is not a column of this table. Hence the
+ # widened key set here and the plain `valid_keys` everywhere below.
+ # `cohort_ids` is a PERMISSION list, not a convenience: a cohort rule naming anything
+ # else is dropped here. Leaving it in would persist a condition the engine can only
+ # answer with "nothing", so `Cohort is not [a list I deleted]` would show an empty table
+ # forever with nothing on screen explaining why.
+ filters = _ag.clean_filter_tree(cfg.get('filters'),
+ valid_keys | set(measure_keys),
+ cohort_ids=set(cohort_ids))
+ sorts = []
+ for rule in list(cfg.get('sorts') or [])[:20]:
+ if (isinstance(rule, dict) and rule.get('colId') in valid_keys
+ and rule.get('dir') in ('asc', 'desc')):
+ sorts.append({'colId': rule['colId'], 'dir': rule['dir']})
+ order = list(dict.fromkeys(
+ key for key in list(cfg.get('order') or []) if key in valid_keys))
+ order += [field['key'] for field in fields if field['key'] not in order]
+ visible = list(dict.fromkeys(
+ key for key in list(cfg.get('visible') or []) if key in valid_keys))
+ widths = {}
+ raw_widths = cfg.get('widths') if isinstance(cfg.get('widths'), dict) else {}
+ for key, value in raw_widths.items():
+ if key in valid_keys:
+ try:
+ widths[key] = max(60, min(600, round(float(value))))
+ except (TypeError, ValueError):
+ pass
+ # C-LOCK (wave 2026-08-02, item 12's mechanism): a view may be LOCKED to one cohort.
+ # `cohort_ids` is the same permission list the cohort filter leaf uses — a lock naming
+ # a cohort this session cannot see is DROPPED at write, exactly like a cohort rule.
+ # (Readers of a SHARED locked view resolve the id against their OWN visible sets; an
+ # unresolvable lock matches NOTHING client-side — the cohort-leaf law, never a widen.)
+ cohort_lock = str(cfg.get('cohortLock') or '').strip()[:120]
+ # ⛔ WAVE 17 R1 (C-LOCKV guard a) — A PROJECTED LOCKED VIEW RE-STAMPS ITS OWN LOCK.
+ # A locked view IS its set: its id and its lock are the same fact. The client rebuilds
+ # `config` from scratch on every autosave (a column resize is enough), so taking the
+ # lock from the browser would mean one omitted key turns "the 40 accounts we agreed to
+ # call" into the whole book, under the same name, with nothing going red. The read side
+ # re-stamps too (aios_grid.views_from_defs) — this keeps the STORE from accumulating the
+ # wrong record in the first place.
+ _is_locked_view = view_id in set(cohort_ids)
+ if _is_locked_view:
+ cohort_lock = view_id
+ config = {
+ 'filters': filters,
+ # conjunction joining the ROOT-level conditions; anything but an
+ # explicit 'or' means 'and' (legacy views had an implicit AND).
+ 'filterConj': 'or' if cfg.get('filterConj') == 'or' else 'and',
+ **({'cohortLock': cohort_lock}
+ if cohort_lock and cohort_lock in set(cohort_ids) else {}),
+ 'sorts': sorts,
+ 'groupBy': cfg.get('groupBy') if cfg.get('groupBy') in valid_keys else None,
+ 'colorBy': cfg.get('colorBy') if cfg.get('colorBy') in valid_keys else None,
+ 'rowHeightMode': (cfg.get('rowHeightMode')
+ if cfg.get('rowHeightMode') in ('short', 'medium', 'tall')
+ else 'short'),
+ 'order': order,
+ 'visible': visible,
+ 'widths': widths,
+ 'memberPids': [pid for pid in list(cfg.get('memberPids') or [])
+ if isinstance(pid, int) and pid in allowed_pids],
+ }
+ # Wave-6 item 10: a non-grid display mode rides the view config, validated
+ # structurally (mode whitelist, refs must be this table's fields).
+ display = _ag._clean_display(cfg.get('display'), valid_keys)
+ if display:
+ config['display'] = display
+ # Wave-6 item 11 (pin): how many leading columns stay frozen while scrolling
+ # sideways. Clamped 1..8 — 0 would unfreeze the identity column the whole
+ # surface pivots on; absent = the legacy single frozen column.
+ if cfg.get('frozenCount') is not None:
+ try:
+ config['frozenCount'] = max(1, min(8, int(cfg['frozenCount'])))
+ except (TypeError, ValueError):
+ pass
+ # ── wave-9 C3 (lock) + C4 (permissions) ────────────────────────────────────────────
+ # The PRIOR stored view decides both: whether this is a create or an update (C4's
+ # default splits on exactly that) and who is allowed to change the lock (C3).
+ prior = (ws.get('views') or {}).get(view_id) or {}
+ # ⚠ THE SHARED WALL (wave-9 I17). `ws` is already visibility-filtered, so a view the
+ # caller may not SEE reads as absent — which would look like a CREATE and let anybody
+ # overwrite somebody else's shared view by guessing its id. Ask the store for the raw
+ # record and refuse before deciding anything else. Fail-closed on both branches.
+ _raw_shared = _tops(ctx).shared_view(view_id) if store.available() else None
+ if _raw_shared is not None and not prior:
+ return False # exists, not visible to this caller: refuse
+ if _raw_shared is not None and not _tstore._may_edit(_raw_shared, uname, admin):
+ return False # visible but not editable by this caller
+ is_new = not prior
+ # C4: the creator is HOST-STAMPED and never read from the browser — the same rule as
+ # the field-level createdBy. An existing view keeps whoever made it.
+ creator = prior.get('createdBy') or uname
+ # Only the creator or an admin may change the PERMISSIONS themselves. A collaborator who
+ # could rewrite them could grant themselves sole ownership of someone else's view, or
+ # quietly widen a users-scoped view to everyone — privilege escalation by edit.
+ if not is_new and not _tstore._may_administer(prior, uname, admin):
+ raw = dict(raw)
+ raw['permissions'] = prior.get('permissions')
+ raw['locked'] = prior.get('locked')
+ # ── I12/C3 BELT (2026-07-31): a LOCKED view's DISPLAY MODE is frozen HOST-SIDE too.
+ # The client's switcher already refuses (setDisplayMode), and its comment has claimed
+ # "the host refuses too" since wave 9 — this makes that claim true for direct API
+ # callers. ⚠ MIRRORS types.ts `isModeFrozen` EXACTLY: SYSTEM views and the undeletable
+ # list:/cohort: projections are EXEMPT — their `locked` is legacy "undeletable", not
+ # mode-frozen, and freezing them would trap the default view in whatever mode it last
+ # saved (the owner's stuck-in-Map report is that trap, client-made). An upsert that
+ # UNLOCKS in the same write (authorised above) may change display freely.
+ _mode_frozen = (prior.get('locked') and raw.get('locked') is not False
+ and prior.get('kind') != 'system'
+ and view_id != 'all-customers')
+ if _mode_frozen:
+ if prior.get('config', {}).get('display'):
+ config['display'] = dict(prior['config']['display'])
+ else:
+ config.pop('display', None)
+ # ⚠ A SYSTEM VIEW IS PER-USER STATE AND MUST NEVER BE SHARED. Caught in the wave-9
+ # integration pass, before deploy: `all-customers` is every user's DEFAULT view and it
+ # carries their own column widths, visible fields and row height. C4's read-default
+ # ('collaborative' when permissions are absent, so nobody's saved view is
+ # retro-restricted) is right for a view somebody AUTHORED — but applied to the system
+ # view it routed `all-customers` into the shared bucket, and the first user to resize a
+ # column would have published their layout to everyone. Verified in the store:
+ # shared_table_views() was returning ['all-customers'].
+ # System views are pinned personal, so they stay in each user's own workspace exactly as
+ # before this wave. `kind` is host-validated two lines below; read it here from `raw` and
+ # treat the stored kind as authoritative for an existing view.
+ _kind = (prior.get('kind') if not is_new
+ else (raw.get('kind') if raw.get('kind') in ('system', 'list', 'custom')
+ else 'custom'))
+ if _kind == 'system' or view_id == 'all-customers':
+ perms = {'edit': 'personal'}
+ else:
+ perms = _ag.clean_view_permissions(
+ raw.get('permissions'),
+ default='personal' if is_new else 'collaborative',
+ known_users=_known_usernames())
+ # C3: only the creator or an admin may SET or CLEAR the lock; anyone else keeps whatever
+ # is already stored. Enforced here rather than hidden in the client. This composes with
+ # C4 and does not override it: C4 governs who may edit the CONTENTS, C3 who may freeze
+ # the display MODE.
+ # ⚠ Inert in practice TODAY — a user can only ever write their own per-user workspace,
+ # so `uname == creator` always holds. Correct plumbing for shared views, not a live gate.
+ may_lock = admin or uname == creator
+ locked = bool(raw.get('locked')) if may_lock else bool(prior.get('locked'))
+ # C3: the LOCK's actual job — a locked view's display mode is frozen, so a locked Kanban
+ # stays Kanban. This half IS live per-user and is the part the owner asked for. Filters,
+ # sorts and columns stay editable by design.
+ if _mode_frozen:
+ was = (prior.get('config') or {}).get('display')
+ now = config.get('display')
+ if (was or {}).get('mode') != (now or {}).get('mode'):
+ if was:
+ config['display'] = was
+ else:
+ config.pop('display', None)
+ # WAVE 17 R1 (C-LOCKV guard b) — ONE THING, ONE NAME. Renaming a locked view renames
+ # the SET it is, in the store that owns it; the view record must not grow a second title
+ # that the read side would then have to arbitrate. Routed rather than duplicated.
+ if _is_locked_view and store.available():
+ _sets = _cohorts(ctx) # R9: the SET lives in this topic's bucket
+ _cur = (_sets.all_for(uname).get(view_id) or {}).get('name')
+ if name and name != _cur:
+ try:
+ _sets.rename(uname, view_id, name)
+ except ValueError as _e:
+ _tel.error('cohort:rename-via-view', _e)
+ view = {'id': view_id, 'name': name,
+ # ⚠ DERIVED FROM THE ID, never taken from the browser: `kind` is what paints the
+ # lock mark, so a client claiming it for an ordinary view would be claiming a
+ # guarantee the engine is not making about that view's rows.
+ 'kind': _ag.LOCKED_VIEW_KIND if _is_locked_view
+ else raw.get('kind') if raw.get('kind') in ('system', 'list', 'custom')
+ else 'custom',
+ 'locked': locked,
+ 'createdBy': creator,
+ 'permissions': perms,
+ 'note': str(raw.get('note') or '')[:2000],
+ 'config': config}
+ # System/list projections are not all persisted in this table store, but custom views
+ # may not impersonate their visible names. Persisted view names are allocated
+ # tenant-globally by TableStore inside the write transaction.
+ _reserved_view_names = [
+ value.get('name') for value in visible_views
+ if (isinstance(value, dict) and value.get('id') != view_id
+ and value.get('kind') in ('system', 'list'))
+ ]
+ if view_id != 'all-customers':
+ _reserved_view_names.append('All customers')
+ if store.available():
+ view = (_tops(ctx).save_view(
+ uname, view, reserved_names=_reserved_view_names, is_admin=admin) or view)
+ else:
+ _session_ready()
+ _view_names = list(_reserved_view_names)
+ _view_names.extend(
+ value.get('name')
+ for candidate_id, value in ws['views'].items()
+ if candidate_id != view_id and isinstance(value, dict)
+ )
+ view['name'] = _unique_name(view.get('name'), _view_names)
+ ws['views'][view_id] = view
+ name_changed = view.get('name') != requested_name
+ # PERSISTED, but deliberately NO rerun — see the return-value contract in
+ # this function's docstring. This is the hot path: every filter, sort,
+ # group, colour, column-resize and column-toggle autosaves through here.
+ #
+ # CG-8 is the ONE exception, and it is self-limiting. A measure condition is answered
+ # server-side, so if this view carries one whose answer was NOT in the payload we just
+ # shipped, the client is showing a pending marker with nothing coming. Ask for exactly
+ # one more run — and only then, so the common case (a column filter) still costs zero.
+ # If the top-of-run read of the component's own value already covered it, this is False
+ # and nothing extra happens; if that read is ever stale, this is what stops the
+ # condition hanging unresolved.
+ #
+ # ⚠ COMPLETE rules only (wave-6 item 3, found by the live roundtrip on this rev):
+ # picking a measure FIELD mints a valueless rule whose autosave used to land here as
+ # "unresolved" and trigger a rerun that could resolve NOTHING — `rule_complete` refuses
+ # half-asked questions — so the only effect was a remount that closed the builder
+ # popover mid-build (the wave-5 "gate flake" runs, now explained). A rule still being
+ # typed stays client-side PENDING by design; the run that matters fires when its VALUE
+ # arrives and the question becomes answerable.
+ from harness import measure_filter as _mfc
+ unresolved = {str(r.get('id') or '') for r in measure_leaves(filters)
+ if _mfc.rule_complete(r)} - set(resolved_ids)
+ return name_changed or bool(unresolved - {''})
+
+ if kind == 'view_delete':
+ view_id = str(event.get('viewId') or '')[:120]
+ if not view_id or view_id == 'all-customers':
+ return False
+ # WAVE 17 R1 (C-LOCKV guard c) — deleting a LOCKED view deletes the set it is. Without
+ # this the store would drop the saved config and the projection would rebuild the view
+ # on the very next render: the row would come back, minus the user's sort and columns,
+ # which reads as a corruption rather than as a refusal. Own sets only (`all_for`), the
+ # same wall `cohort_delete` rides.
+ if store.available() and view_id in _cohorts(ctx).all_for(uname):
+ _cohorts(ctx).delete(uname, view_id)
+ _tops(ctx).delete_view(uname, view_id)
+ # True, unlike an ordinary view_delete: the lists payload IS server truth and the
+ # client cannot know the membership channel changed.
+ return True
+ # Wave-9 I17: deleting a SHARED view is narrower than editing it — creator or admin
+ # only. A collaborator can change what a shared view shows; they cannot destroy
+ # everybody else's copy of it, because there is only one copy.
+ if store.available():
+ _raw_shared = _tops(ctx).shared_view(view_id)
+ if _raw_shared is not None and not _tstore._may_administer(
+ _raw_shared, uname, admin):
+ return False
+ _tops(ctx).delete_view(uname, view_id)
+ else:
+ _session_ready()
+ ws['views'].pop(view_id, None)
+ # Wave-6 item 3: the client removed the view optimistically; a deleted view simply
+ # stops being served, so the next render differs in nothing the client still shows.
+ return False
+
+ if kind == 'field_upsert':
+ raw = event.get('field')
+ if not isinstance(raw, dict):
+ return False
+ key = str(raw.get('key') or '')[:80]
+ import aios_grid as _ag2
+ if key.startswith(_ag2.MEASURE_FIELD_PREFIX):
+ # A FORMULA-MEASURE column (owner item 7). Validated against THIS caller's measure
+ # offer — the same admission the condition builder uses — so a field can only name a
+ # measure this user could also filter by. Fail closed on anything else.
+ field = _ag2.clean_measure_field(raw, {m['key']: m for m in measure_offer})
+ if field is None:
+ return False
+ fmt = _ag2._clean_format(raw.get('format'), field.get('type'))
+ if fmt:
+ field['format'] = fmt
+ elif key in field_by_key and not key.startswith('custom_'):
+ base = field_by_key[key]
+ field = {**base, 'note': str(raw.get('note') or '')[:2000]}
+ # Wave-5 item 10: a DISPLAY format on any base field (presets included) — how a
+ # number/date reads, per user. Rendering-only; validated fail-closed per type.
+ fmt = _ag2._clean_format(raw.get('format'), base.get('type'))
+ if fmt:
+ field['format'] = fmt
+ else:
+ field.pop('format', None) # cleared -> back to the type's default render
+ # PRESET measure fields (wave-2 item 8): the browser may change the PERIOD (and the
+ # auto-renamed label) of revenue_ytd / revenue_ly / orders_24m — nothing else. The
+ # whitelist IS the base contract: only a field that shipped with preset+measure can
+ # take a window here, and the measure KEY is pinned to the base's (fail closed).
+ if (base.get('preset') and isinstance(base.get('measure'), dict)
+ and isinstance(raw.get('measure'), dict)):
+ window = _ag2._clean_window(raw['measure'].get('window'))
+ if window is not None:
+ field['measure'] = {'key': base['measure']['key'], 'window': window}
+ if isinstance(raw.get('label'), str) and raw['label'].strip():
+ field['label'] = str(raw['label'])[:120]
+ elif key.startswith('custom_') and raw.get('type') in _ag2.CUSTOM_FIELD_TYPES:
+ ftype = raw['type']
+ readonly = ftype in _ag2.READONLY_CUSTOM_TYPES
+ # The editable family must SAY it is overlay (the client's own contract); the
+ # read-only pair (formula / created_time) is stored under the cohort column's
+ # mechanism instead, so no cell write can ever be accepted for it.
+ if not readonly and raw.get('source') != 'overlay':
+ return False
+ field = {'key': key, 'label': str(raw.get('label') or 'Untitled')[:120],
+ 'type': ftype, 'source': 'odoo' if readonly else 'overlay',
+ 'default': True, 'custom': True,
+ 'note': str(raw.get('note') or '')[:2000]}
+ if readonly:
+ field['derived'] = True
+ # FILTERABLE since wave 6 (owner item 6): formula/created_time values live
+ # client-side, and this table's counts are client-mode — the client engine
+ # answers conditions on them soundly. Mirrors fields_from_workspace.
+ field['filterable'] = True
+ if raw.get('agg') == 'sum' and not readonly:
+ field['agg'] = 'sum'
+ # A `select`/`multiselect` carries its own vocabulary; a `user` does NOT — its
+ # choices are the tenant's accounts, resolved fresh on every render, so persisting
+ # a snapshot here would go stale the moment somebody joins or leaves.
+ if ftype in ('select', 'multiselect'):
+ field['options'] = _ag2._clean_options(raw.get('options'))
+ if not field['options']:
+ return False # a select with no choices can never hold a value
+ field.update(_ag2._choice_appearance(raw, field['options']))
+ if ftype == 'rating':
+ field['max'] = _ag2._clean_rating_max(raw.get('max'))
+ if ftype == 'formula':
+ # WRITE-time is where refs must exist (fail closed); read-time leaves them
+ # alone so a later-deleted ref blanks the CELLS, not the column.
+ formula = _ag2._clean_formula(raw.get('formula'), valid_keys)
+ if formula is None:
+ return False
+ field['formula'] = formula
+ if ftype == 'automation':
+ # C5-AUTOFIELD (wave 18): persist the validated config bag. No `return False`
+ # when absent — an unconfigured automation column is a legitimate intermediate
+ # state (create the column, then configure it in the gear).
+ auto = _ag2._clean_automation(raw.get('automation'), valid_keys)
+ if auto:
+ field['automation'] = auto
+ fmt = _ag2._clean_format(raw.get('format'), ftype)
+ if fmt:
+ field['format'] = fmt
+ else:
+ return False
+ # Wave-5 item 1 — createdBy + permissions on the CREATED strata (custom_/measure_).
+ # `createdBy` is stamped HOST-SIDE at create and preserved on every later write: the
+ # client never supplies it, so a browser cannot claim someone else's field. A
+ # permissions CHANGE is accepted only from the creator or an admin; a legacy field
+ # with no createdBy is admin-only (fail closed, both directions). The table workspace
+ # is per-user today, so this wall becomes load-bearing when sharing arrives — but the
+ # admin path and the legacy path are enforceable (and NC'd) right now.
+ needs_values = False
+ refused_perms = False
+ if key.startswith('custom_') or key.startswith(_ag2.MEASURE_FIELD_PREFIX):
+ prior = ws.get('fields', {}).get(key)
+ prior = prior if isinstance(prior, dict) else None
+ if prior is None:
+ field['createdBy'] = uname
+ # Wave-6 item 9: scope is chosen at CREATE, on the cohort page only —
+ # 'cohort' marks the field cohort-specific; 'global' or absent stays
+ # unscoped, so an old bundle that sends no scope keeps today's behavior.
+ if scope_key == 'cohort' and raw.get('scope') == 'cohort':
+ field['scope'] = 'cohort'
+ else:
+ if isinstance(prior.get('createdBy'), str) and prior['createdBy'].strip():
+ field['createdBy'] = prior['createdBy']
+ # Scope is PRESERVED like createdBy: the client copy never moves an
+ # existing field between scopes.
+ if prior.get('scope') == 'cohort':
+ field['scope'] = 'cohort'
+ want = _ag2._clean_permissions(raw.get('permissions'))
+ have = _ag2._clean_permissions((prior or {}).get('permissions'))
+ owner = field.get('createdBy')
+ if want is not None and (admin or (owner and owner == uname)):
+ field['permissions'] = want
+ else:
+ if have is not None:
+ field['permissions'] = have
+ # Asked for a permissions change and did not get it: the client's
+ # optimistic copy is a lie that must be repainted (wave-6 item 3).
+ refused_perms = want is not None and want != have
+ # A NEW measure column, or an existing one whose window moved: the VALUES
+ # are host-computed, so the next render genuinely differs.
+ if key.startswith(_ag2.MEASURE_FIELD_PREFIX):
+ needs_values = prior is None or prior.get('measure') != field.get('measure')
+ # Canonical names are reserved outside the durable workspace. Persisted field names are
+ # allocated by TableStore from the transaction's current state, not this stale snapshot.
+ _workspace_field_keys = set((ws.get('fields') or {}))
+ _reserved_field_names = [
+ value.get('label') for candidate_key, value in field_by_key.items()
+ if (candidate_key != key and candidate_key not in _workspace_field_keys
+ and isinstance(value, dict))
+ ]
+ if store.available():
+ field = (_tops(ctx).save_field(
+ uname, field, reserved_names=_reserved_field_names,
+ correction_id=event_id) or field)
+ else:
+ _session_ready()
+ _field_names = list(_reserved_field_names)
+ _field_names.extend(
+ value.get('label')
+ for candidate_key, value in ws['fields'].items()
+ if candidate_key != key and isinstance(value, dict)
+ )
+ requested_label = ' '.join(
+ str(field.get('label') or 'Untitled').split())[:120].rstrip()
+ field.pop('labelCorrectedFrom', None)
+ field.pop('labelCorrectionId', None)
+ field['label'] = _unique_name(requested_label, _field_names)
+ if field['label'] != requested_label and event_id:
+ field['labelCorrectedFrom'] = requested_label
+ field['labelCorrectionId'] = str(event_id)[:180]
+ if not field.get('custom') and not str(field.get('note') or '').strip():
+ ws['fields'].pop(key, None)
+ else:
+ ws['fields'][key] = field
+ if needs_values or refused_perms:
+ return True
+ # THE NO-BLIP RETURN (wave-6 item 3): an accepted def that echoes what the client
+ # already renders needs no rerun — see _field_echo_equal and the docstring's law.
+ return not _field_echo_equal(field, raw)
+
+ if kind in ('cohort_add', 'cohort_remove', 'cohort_rename', 'cohort_delete'):
+ # Cohort membership/lifecycle edits from the grid's cohort panel (wave-2 item 2 —
+ # replaces the retired Manage popover, so rename/delete keep a surface). Fail-closed:
+ # only the caller's OWN cohorts (all_for), and member pids are intersected with the
+ # caller's permitted pool — the same guard add_to_list rides.
+ if not store.available():
+ return False
+ sets = _cohorts(ctx) # R9: this DATABASE's lists, never another's
+ cohort_id = str(event.get('cohortId') or '').strip()[:120]
+ if not cohort_id or cohort_id not in sets.all_for(uname):
+ return False
+ try:
+ if kind == 'cohort_rename':
+ name = str(event.get('name') or '').strip()[:120]
+ if not name:
+ return False
+ sets.rename(uname, cohort_id, name)
+ elif kind == 'cohort_delete':
+ sets.delete(uname, cohort_id)
+ else:
+ raw_pids = event.get('pids')
+ if not isinstance(raw_pids, list):
+ return False
+ pids = [p for p in raw_pids if isinstance(p, int) and p in allowed_pids]
+ if not pids:
+ return False
+ if kind == 'cohort_add':
+ sets.add_members(uname, cohort_id, pids)
+ else:
+ sets.remove_members(uname, cohort_id, pids)
+ except ValueError as e:
+ _tel.error('cohort:panel-edit', e)
+ return False
+ # True: the lists payload (names, membership, counts) must reflect this on the next
+ # render — the panel is showing server truth, not local optimism.
+ return True
+
+ if kind in ('doc_add', 'doc_delete', 'doc_fetch'):
+ # DOCUMENTS on a row (owner item 12, contract C5). Metadata in the store key
+ # `customer_docs`; the BYTES live at their own path in the tenant dataset, never in a
+ # JSON blob — see core.store.upload_bytes for why that distinction is load-bearing.
+ #
+ # ⭐ WAVE 19 / R9 — item 1's SILENT THIRD CASE, and the one nobody reported because the
+ # React shell cannot reach it yet (`payload.docs` is set only by app.py). Both homes are
+ # keyed by pid and both were topic-blind: the metadata bucket AND the byte path
+ # `docs//…`. Two topics' pid spaces overlap by construction (a CRC32 hash lands
+ # anywhere an Odoo partner id can), so a product's file could occupy the path of a
+ # customer's — one upload silently shadowing another tenant-visible document. Per-topic
+ # bucket AND per-topic prefix; the customer topic keeps both of its shipped names.
+ import base64 as _b64c
+ import re as _re_mod
+ if not store.available():
+ return False
+ docs_key = _docs_key(ctx)
+ docs_dir = 'docs' if docs_key == _DOCS_KEY else f'docs/{docs_key[:-5]}'
+ pid = event.get('pid')
+ doc_id = str(event.get('docId') or '').strip()[:80]
+ # The pid wall is the SAME one every other row-scoped event rides: a caller may only
+ # touch rows inside their own permitted pool. Without it, documents would be the
+ # one surface where a scoped agent could read another book's rows.
+ if not isinstance(pid, int) or pid not in allowed_pids or not doc_id:
+ return False
+ meta_all = store.get(docs_key) or {}
+ row = list((meta_all.get(str(pid)) or []))
+
+ if kind == 'doc_add':
+ raw_b64 = event.get('data_b64')
+ name = str(event.get('name') or 'document')[:200]
+ if not isinstance(raw_b64, str) or not raw_b64:
+ return False
+ try:
+ blob = _b64c.b64decode(raw_b64, validate=True)
+ except Exception:
+ return False # not base64 -> not a file we will store
+ # Re-check the DECODED size host-side. The client checks it too, but a client check
+ # is a courtesy: this is the number that bounds what the tenant's repo can be made
+ # to hold by anyone who can reach the endpoint.
+ if not blob or len(blob) > _DOC_MAX_BYTES:
+ return False
+ if len(row) >= _DOC_MAX_PER_ROW or any(d.get('id') == doc_id for d in row):
+ return False
+ safe = _re_mod.sub(r'[^A-Za-z0-9._-]', '_', name)[:80] or 'file'
+ path = f'{docs_dir}/{pid}/{doc_id}_{safe}'
+ try:
+ store.upload_bytes(path, blob, message=f'doc {doc_id} for {scope_key} {pid}')
+ except Exception as _ue:
+ _tel.error('docs:upload', _ue)
+ return False
+ row.append({'id': doc_id, 'name': name,
+ 'mime': str(event.get('mime') or 'application/octet-stream')[:120],
+ 'size': len(blob), 'by': uname,
+ 'ts': dt.datetime.now().strftime('%Y-%m-%dT%H:%M:%S'),
+ 'path': path})
+ elif kind == 'doc_delete':
+ hit = next((d for d in row if d.get('id') == doc_id), None)
+ if not hit:
+ return False
+ # THE WALL: the uploader or an admin. Enforced here regardless of what the client
+ # chose to render — `canDelete` in the payload only hides a button.
+ if hit.get('by') != uname and not admin:
+ return False
+ store.delete_path(hit.get('path') or '')
+ row = [d for d in row if d.get('id') != doc_id]
+ else: # doc_fetch
+ hit = next((d for d in row if d.get('id') == doc_id), None)
+ if not hit:
+ return False
+ blob = store.download_bytes(hit.get('path') or '')
+ if blob is None:
+ return False
+ # The bridge is a fire-and-forget event LOG with no response channel, so the answer
+ # is PARKED on the Result and rides the next render's payload (C5).
+ ctx.out.doc = {
+ 'pid': pid, 'docId': doc_id, 'name': hit.get('name') or 'document',
+ 'mime': hit.get('mime') or 'application/octet-stream',
+ 'data_b64': _b64c.b64encode(blob).decode('ascii')}
+ return True # re-render to deliver it
+
+ def _write(cur):
+ cur[str(pid)] = row
+ return cur
+ # ⚠ `docs_key`, NOT `_DOCS_KEY`. The read above and the byte path were both made
+ # per-topic and this line was not — so a product document's BYTES landed correctly under
+ # `docs/product/…` while its METADATA went into `customer_docs` beside the customer rows,
+ # keyed by a CRC32 hash. Found by `verify_scopes.py`'s own leg on its first run, which is
+ # the argument for asserting the ABSENCE from the legacy bucket and not just the presence
+ # in the new one: every "it saved" check here was green.
+ store.update(docs_key, _write, flush='async')
+ return True
+
+ if kind in ('folder_create', 'folder_rename', 'folder_delete', 'folder_duplicate',
+ 'item_move'):
+ # FOLDERS over the Views / Cohorts sidebars (owner item 11, contract C4). All five
+ # events touch ONE home — the table workspace's `folders` + `itemFolders` — so a cohort
+ # can be filed without the cohort STORE learning about folders at all.
+ import aios_grid as _agf
+ if not store.available():
+ return False
+ surface = str(event.get('surface') or '')
+ if surface not in _agf.FOLDER_SURFACES:
+ return False
+ # The ids this user may actually file: their own views, their own cohorts. Fail-closed —
+ # an item_move naming somebody else's cohort is dropped by clean_item_folders anyway,
+ # but refusing here means we never write it in the first place.
+ def _own_ids(sfc, cur_ws):
+ if sfc == 'views':
+ return set((cur_ws.get('views') or {}))
+ return set(_cohorts(ctx).all_for(uname))
+
+ def _mutate(cur_ws):
+ folders = _agf.clean_folders(cur_ws.get('folders'))
+ placed = dict(cur_ws.get('itemFolders') or {})
+ lst = list(folders.get(surface) or [])
+ # ⚠ the wire field is `folderId` on EVERY folder event (CLIENT's types.ts is the
+ # built contract; the split doc's first draft said `id`). Converged here rather
+ # than asking the client to re-emit — see the C4 reconciliation note in the doc.
+ fid = str(event.get('folderId') or '').strip()[:80]
+ if kind == 'folder_create':
+ name = str(event.get('name') or '').strip()[:_agf.MAX_FOLDER_NAME]
+ if not fid or not name or len(lst) >= _agf.MAX_FOLDERS:
+ return None
+ if any(f['id'] == fid for f in lst):
+ return None
+ row = {'id': fid, 'name': name, 'order': len(lst)}
+ icon = _agf.clean_folder_icon(event.get('icon')) # wave-9 I15 (C5)
+ if icon:
+ row['icon'] = icon
+ lst.append(row)
+ elif kind == 'folder_rename':
+ name = str(event.get('name') or '').strip()[:_agf.MAX_FOLDER_NAME]
+ hit = next((f for f in lst if f['id'] == fid), None)
+ if not hit or not name:
+ return None
+ hit['name'] = name
+ # wave-9 I15 (C5): the rename pane is also where the icon is changed. An event
+ # that carries NO icon key leaves the existing one alone (a rename must not
+ # silently strip a chosen icon); an explicit null clears it back to default.
+ if 'icon' in event:
+ icon = _agf.clean_folder_icon(event.get('icon'))
+ if icon:
+ hit['icon'] = icon
+ else:
+ hit.pop('icon', None)
+ elif kind == 'folder_delete':
+ if not any(f['id'] == fid for f in lst):
+ return None
+ lst = [f for f in lst if f['id'] != fid]
+ # CONTENTS MOVE TO ROOT, never delete. Dropping the placements is exactly that:
+ # an item with no placement renders at the top level.
+ placed[surface] = {k: v for k, v in (placed.get(surface) or {}).items()
+ if v != fid}
+ elif kind == 'folder_duplicate':
+ new_id = str(event.get('newId') or '').strip()[:80]
+ src = next((f for f in lst if f['id'] == fid), None)
+ if not src or not new_id or len(lst) >= _agf.MAX_FOLDERS:
+ return None
+ if any(f['id'] == new_id for f in lst):
+ return None
+ lst.append({'id': new_id, 'name': f"{src['name']} copy"[:_agf.MAX_FOLDER_NAME],
+ 'order': len(lst)})
+ # ⚠ The folder's CONTENTS are duplicated by the client emitting the ordinary
+ # per-item duplicate events it already owns (view_upsert with a fresh id, the
+ # cohort copy path) and then item_move-ing them here. Copying views/cohorts
+ # inside this handler would be a SECOND implementation of "duplicate an item",
+ # and the two would drift the first time either one changed.
+ else: # item_move
+ item_id = str(event.get('itemId') or '').strip()[:120]
+ target = event.get('folderId')
+ if not item_id or item_id not in _own_ids(surface, cur_ws):
+ return None
+ cur = dict(placed.get(surface) or {})
+ if target is None:
+ cur.pop(item_id, None) # back to the root
+ else:
+ tid = str(target)[:80]
+ if not any(f['id'] == tid for f in lst):
+ return None
+ cur[item_id] = tid
+ placed[surface] = cur
+ folders[surface] = lst
+ clean = _agf.clean_folders(folders)
+ return clean, _agf.clean_item_folders(
+ placed, clean,
+ {sfc: _own_ids(sfc, cur_ws) for sfc in _agf.FOLDER_SURFACES})
+
+ # ⚠ NO allowed_pids ON PURPOSE — this is app.py's bare `_cl_table_workspace(uname)`
+ # call at the old :6268, preserved exactly. Omitting the pool drops memberPids from
+ # any foreign shared view (fail-closed), which is harmless here because the folder
+ # legs read only view IDS and the folder maps. Passing the pool would be a behavior
+ # change inside a pure move.
+ _res = _mutate(table_workspace(ctx, consume_corrections=False))
+ if _res is None:
+ return False # refused: nothing is written
+ _tops(ctx).save_folders(uname, _res[0], _res[1])
+ # True: the sidebars render from server state (which folder holds what), not from local
+ # optimism — the same contract the cohort panel's membership edits ride.
+ return True
+
+ if kind == 'field_delete':
+ # Delete a USER-CREATED column outright (owner gap closed 2026-07-27). The prefix IS
+ # the permission: only the created strata (`custom_` overlay fields, `measure_` formula
+ # columns) are deletable — a base field's key fails the prefix test no matter what the
+ # browser claims, so the table's contract cannot be deleted from the client. The store
+ # scrubs the field's stored cell values with it (delete_table_field); views naming the
+ # key self-heal on their next autosave, the rule every stale colId already rides.
+ key = str(event.get('key') or '')[:80]
+ import aios_grid as _ag3
+ if not (key.startswith('custom_') or key.startswith(_ag3.MEASURE_FIELD_PREFIX)):
+ return False
+ if store.available():
+ _tops(ctx).delete_field(uname, key)
+ else:
+ _session_ready()
+ ws['fields'].pop(key, None)
+ for _row in ws['overlays'].values():
+ if isinstance(_row, dict):
+ _row.pop(key, None)
+ # Wave-6 item 3: the client dropped the column optimistically; the store scrub is
+ # invisible to the next render (the values leave WITH the column).
+ return False
+
+ if kind == 'field_duplicate':
+ # Wave-5 item 1. The DESTINATION key is client-generated (the established pattern —
+ # the client must know it synchronously to place the clone right of the source), and
+ # both keys must sit in the SAME created stratum: base odoo fields offer no Duplicate,
+ # because duplicating the source-of-truth into an editable copy would need a
+ # value-snapshot mechanism nobody asked for. Overlay VALUES are copied only for
+ # `custom_` sources (a measure clone recomputes; a formula clone re-evaluates).
+ # The duplicator becomes the clone's creator — it is a NEW field they made.
+ src_key = str(event.get('sourceKey') or '')[:80]
+ new_key = str(event.get('key') or '')[:80]
+ import aios_grid as _ag5
+ prefix = ('custom_' if src_key.startswith('custom_')
+ else _ag5.MEASURE_FIELD_PREFIX
+ if src_key.startswith(_ag5.MEASURE_FIELD_PREFIX) else None)
+ if (prefix is None or not new_key.startswith(prefix) or new_key == src_key
+ or new_key in field_by_key):
+ return False
+ src = ws.get('fields', {}).get(src_key)
+ if not isinstance(src, dict):
+ return False
+ clone = dict(src)
+ clone['key'] = new_key
+ label = str(event.get('label') or '').strip()[:120]
+ requested_label = label or (str(src.get('label') or 'Untitled')[:110] + ' copy')
+ _workspace_field_keys = set((ws.get('fields') or {}))
+ _reserved_field_names = [
+ value.get('label') for candidate_key, value in field_by_key.items()
+ if (candidate_key != new_key and candidate_key not in _workspace_field_keys
+ and isinstance(value, dict))
+ ]
+ clone['label'] = requested_label
+ clone['createdBy'] = uname
+ # Wave-6 item 9: the clone inherits the source's scope via dict(src); on the cohort
+ # page the duplicate surface may explicitly place it instead (same create-time rule
+ # as field_upsert — a page that is not the cohort page cannot mint a cohort field).
+ if scope_key == 'cohort' and event.get('scope') in ('cohort', 'global'):
+ if event['scope'] == 'cohort':
+ clone['scope'] = 'cohort'
+ else:
+ clone.pop('scope', None)
+ if store.available():
+ clone = (_tops(ctx).duplicate_field(
+ uname, src_key, new_key, clone,
+ reserved_names=_reserved_field_names,
+ correction_id=event_id) or clone)
+ else:
+ _session_ready()
+ _field_names = list(_reserved_field_names)
+ _field_names.extend(
+ value.get('label')
+ for candidate_key, value in ws['fields'].items()
+ if candidate_key != new_key and isinstance(value, dict)
+ )
+ clone.pop('labelCorrectedFrom', None)
+ clone.pop('labelCorrectionId', None)
+ clone['label'] = _unique_name(requested_label, _field_names)
+ if clone['label'] != requested_label and event_id:
+ clone['labelCorrectedFrom'] = requested_label
+ clone['labelCorrectionId'] = str(event_id)[:180]
+ ws['fields'][new_key] = clone
+ if src_key.startswith('custom_'):
+ for _row in ws['overlays'].values():
+ if isinstance(_row, dict) and src_key in _row:
+ _row[new_key] = _row[src_key]
+ # Wave-6 item 3: True only when host-held VALUES must flow back — copied overlay
+ # cells (custom_ sources) or host-computed measure values. formula/created_time
+ # clones compute client-side, so the optimistic insert is already complete.
+ label_changed = clone['label'] != requested_label
+ return label_changed or src.get('type') not in ('formula', 'created_time')
+
+ if kind == 'add_to_list':
+ # "Add to list" (owner item 6): a view's current matches become fixed cohort members.
+ #
+ # ⚠ `pids` arrives from the BROWSER. It is intersected with `allowed_pids` — the pool this
+ # user may actually see — before anything is stored. The client computing the set is a
+ # correctness decision (it is the only engine that already knows the answer, and asking a
+ # second engine the same question is the drift verify_filter_engine.py exists to prevent);
+ # it is NOT a trust decision.
+ raw_pids = event.get('pids')
+ if not isinstance(raw_pids, list):
+ return False
+ pids = [p for p in raw_pids if isinstance(p, int) and p in allowed_pids]
+ if not pids:
+ return False
+ cohort_id = str(event.get('cohortId') or '').strip()[:120]
+ name = str(event.get('name') or '').strip()[:120]
+ if not store.available():
+ return False
+ # ⭐ WAVE 19 / R9 — THE BUG THIS RULING NAMES. This branch is where a list is BORN, and it
+ # named `cohort_mod` directly: a list created from the Product surface was written into
+ # `customer_cohorts` with CRC32 product pids in it, then rendered on the Customer page as
+ # a list of customers nobody recognised. The set now belongs to the database it was
+ # created on, and `ctx.scope_key` is the only thing that decides which.
+ sets = _cohorts(ctx)
+ try:
+ if not cohort_id:
+ if not name:
+ return False
+ cohort_id = sets.create(uname, name, pids)
+ else:
+ if cohort_id not in sets.all_for(uname):
+ return False # not this user's cohort — fail closed, do not create
+ sets.add_members(uname, cohort_id, pids)
+ except ValueError as e:
+ _tel.error('cohort:add_to_list', e)
+ return False
+ # True: the Cohort page's list and counts must reflect this, and the toast below only
+ # renders on a fresh run.
+ #
+ # ⚠ The NOUN is the TOPIC's, not the literal "customer" this line carried since wave 2.
+ # "Added 12 customers" over a set of SKUs is the surface stating, in words, that the list
+ # went somewhere it did not — the user-visible half of the same leak.
+ _noun = sets.noun
+ ctx.out.toast = (
+ f"Added {len(pids):,} {_noun}{'' if len(pids) == 1 else 's'} to "
+ f"{name or 'the list'}.")
+ return True
+
+ if kind == 'overlay_patch':
+ pid = event.get('pid')
+ if not isinstance(pid, int) or pid not in allowed_pids:
+ return False
+ updates = {}
+ refused = False
+ raw_updates = event.get('updates') if isinstance(event.get('updates'), dict) else {}
+ for key, value in raw_updates.items():
+ if key not in overlay_keys or not isinstance(value, (str, int, float)):
+ refused = True
+ continue
+ # C-PERM: a field this caller's permissions HIDE cannot be written, only refused.
+ # `overlay_keys` asks whether the column exists, not whether this person may touch
+ # it — so without this line a restricted user who knows a hidden key could PATCH a
+ # value they are not allowed to read back. Refused LOUDLY (repaint) so the client
+ # reverts rather than showing a value the store never took.
+ if key in (ctx.hidden_keys or frozenset()):
+ refused = True
+ continue
+ # Wave-5 item 1: `permissions.edit` is enforced HERE, per key — the client hiding
+ # its editor is courtesy, this is the wall. Fail-closed: a restricted field with
+ # no readable createdBy admits only admins.
+ perms = (field_by_key.get(key) or {}).get('permissions') or {}
+ edit = perms.get('edit')
+ if edit == 'admins' and not admin:
+ refused = True
+ continue
+ if edit == 'creator' and not (
+ admin or (field_by_key.get(key) or {}).get('createdBy') == uname):
+ refused = True
+ continue
+ # C5-AUTOFIELD (wave 18): an automation cell is MACHINE-WRITTEN. The client marks
+ # the type read-only (READONLY_CELL_TYPES) but that is courtesy — this is the wall.
+ # Without it the UI hides the editor while the API still takes a PATCH, which is
+ # exactly the shape a "read-only" type must not have.
+ if (field_by_key.get(key) or {}).get('type') == 'automation':
+ refused = True
+ continue
+ clean = str(value)[:10000]
+ if isinstance(value, str) and clean != value:
+ # Truncated: the stored truth is shorter than the client's copy. (An
+ # int/float arriving as its string form renders identically — not a refusal.)
+ refused = True
+ definition = field_by_key.get(key) or {}
+ if definition.get('type') in ('select', 'multiselect') and clean:
+ options = [str(v) for v in definition.get('options') or []]
+ canonical = {v.strip().lower(): v for v in options}
+ if definition.get('type') == 'select':
+ normalized = canonical.get(clean.strip().lower())
+ if normalized is None:
+ refused = True
+ continue
+ else:
+ normalized_parts = []
+ seen = set()
+ invalid = False
+ for part in clean.split(','):
+ match = canonical.get(part.strip().lower())
+ if match is None:
+ invalid = True
+ break
+ if match.lower() not in seen:
+ seen.add(match.lower())
+ normalized_parts.append(match)
+ if invalid:
+ refused = True
+ continue
+ normalized = ','.join(normalized_parts)
+ if normalized != clean:
+ refused = True
+ clean = normalized
+ updates[key] = clean
+ if updates:
+ if store.available():
+ _tops(ctx).patch_overlay(uname, pid, updates)
+ else:
+ _session_ready()
+ ws['overlays'].setdefault(str(pid), {}).update(updates)
+ # Wave-6 item 3: the client's cell already shows the typed value — rerun ONLY when
+ # some of what it shows was refused or clamped and must be repainted to the truth.
+ return refused
+
+ return False
diff --git a/platform/core/keychain.py b/platform/core/keychain.py
new file mode 100644
index 0000000000000000000000000000000000000000..1f6eef4894ec27db25aef35f3aa33db93a9f0134
--- /dev/null
+++ b/platform/core/keychain.py
@@ -0,0 +1,182 @@
+"""core/keychain.py — per-tenant CREDENTIAL STORE (wave 18, contract C7 / ruling R3).
+
+An admin stores a data source's secrets (Royal's Odoo API key today; any tenant's sources
+tomorrow) encrypted at rest in the TENANT's store bucket. The runtime posture is R3's
+"live with env fallback": the connector layer asks `odoo_creds(rt)` FIRST and falls back to
+the process environment (tenant #0's `.env` / Space secrets), so Royal keeps working with an
+empty keychain and a new tenant needs no code to bring keys. The FULL cutover (env retired)
+is staged for a later wave — R3, verbatim.
+
+CRYPTO: Fernet (AES128-CBC + HMAC, the `cryptography` package) under ONE platform key,
+`AIOS_KEYCHAIN_KEY` (a `Fernet.generate_key()` value; a Space secret, never in the store).
+No key ⇒ the keychain is LOCKED: metadata still lists (labels are not secrets), but nothing
+decrypts and writes are refused — fail closed, never a plaintext fallback.
+
+SHAPE (bucket `keychain`, per-tenant via the runtime handle):
+
+ {entries: {id: {id, label, type, enc, preview, created, createdBy}}}
+
+`enc` = Fernet token over the JSON fields dict. `preview` = a masked hint ("····1234")
+computed ONCE at write from the entry's most secret-looking field — the ONLY part of a
+secret that ever leaves this module through a route. `read_fields` exists for the CONNECTOR
+LAYER; no route returns its output.
+"""
+import datetime as _dt
+import json
+import os
+import secrets as _secrets
+
+KEY = 'keychain'
+ENTRY_TYPES = {'odoo', 'generic'}
+#: which stored field feeds the masked preview, per type (first present wins)
+_PREVIEW_FIELDS = ('api_key', 'value', 'password', 'token')
+MAX_ENTRIES = 40
+MAX_FIELD_LEN = 500
+
+
+class KeychainLocked(Exception):
+ """Raised when AIOS_KEYCHAIN_KEY is absent/wrong — callers answer 503, never {}."""
+
+
+def _fernet():
+ key = (os.environ.get('AIOS_KEYCHAIN_KEY') or '').strip()
+ if not key:
+ raise KeychainLocked('AIOS_KEYCHAIN_KEY is not configured')
+ try:
+ from cryptography.fernet import Fernet
+ return Fernet(key.encode('ascii'))
+ except Exception as e:
+ raise KeychainLocked(f'keychain key unusable: {type(e).__name__}')
+
+
+def unlocked():
+ try:
+ _fernet()
+ return True
+ except KeychainLocked:
+ return False
+
+
+def _bucket(rt):
+ return rt.get(KEY) or {}
+
+
+def list_entries(rt):
+ """Metadata ONLY — never a decrypted field, never `enc` itself."""
+ out = []
+ for eid, e in sorted((_bucket(rt).get('entries') or {}).items()):
+ if not isinstance(e, dict):
+ continue
+ out.append({'id': eid, 'label': e.get('label') or eid,
+ 'type': e.get('type') or 'generic',
+ 'preview': e.get('preview') or '',
+ 'created': e.get('created') or '',
+ 'createdBy': e.get('createdBy') or ''})
+ return out
+
+
+def add_entry(rt, label, etype, fields, username):
+ """Encrypt + store. Returns the metadata row, or raises ValueError on shape problems and
+ KeychainLocked when there is no key (a secret must never be stored in the clear)."""
+ label = ' '.join(str(label or '').split())[:80]
+ etype = str(etype or '').strip().lower()
+ if not label:
+ raise ValueError('give the key a label')
+ if etype not in ENTRY_TYPES:
+ raise ValueError(f"type must be one of {', '.join(sorted(ENTRY_TYPES))}")
+ if not isinstance(fields, dict) or not fields:
+ raise ValueError('fields must be a non-empty object')
+ clean = {}
+ for k, v in list(fields.items())[:12]:
+ k = str(k).strip()[:40]
+ if k and isinstance(v, (str, int, float, bool)):
+ clean[k] = str(v)[:MAX_FIELD_LEN]
+ if not clean:
+ raise ValueError('no usable fields')
+ token = _fernet().encrypt(json.dumps(clean, ensure_ascii=False).encode('utf-8'))
+ secretish = next((clean[k] for k in _PREVIEW_FIELDS if clean.get(k)), '')
+ preview = ('····' + secretish[-4:]) if len(secretish) >= 4 else ('····' if secretish else '')
+ eid = f'k_{_secrets.token_hex(6)}'
+ row = {'id': eid, 'label': label, 'type': etype, 'enc': token.decode('ascii'),
+ 'preview': preview,
+ 'created': _dt.datetime.now().strftime('%Y-%m-%dT%H:%M:%S'),
+ 'createdBy': str(username or '')}
+
+ def _up(cur):
+ entries = cur.setdefault('entries', {})
+ if len(entries) >= MAX_ENTRIES:
+ raise ValueError(f'this keychain is at its {MAX_ENTRIES}-entry cap')
+ entries[eid] = row
+ return cur
+
+ rt.update(KEY, _up, flush='sync')
+ return {'id': eid, 'label': label, 'type': etype, 'preview': preview,
+ 'created': row['created'], 'createdBy': row['createdBy']}
+
+
+def delete_entry(rt, entry_id):
+ def _drop(cur):
+ (cur.get('entries') or {}).pop(str(entry_id), None)
+ return cur
+ rt.update(KEY, _drop, flush='sync')
+ return True
+
+
+def read_fields(rt, entry_id):
+ """Decrypt ONE entry's fields — for the CONNECTOR LAYER only; no route returns this.
+ None when the entry does not exist; KeychainLocked when the key is absent/wrong (a wrong
+ key must be loud — silently empty creds would read as 'not configured')."""
+ e = (_bucket(rt).get('entries') or {}).get(str(entry_id))
+ if not isinstance(e, dict) or not e.get('enc'):
+ return None
+ try:
+ raw = _fernet().decrypt(str(e['enc']).encode('ascii'))
+ except KeychainLocked:
+ raise
+ except Exception:
+ raise KeychainLocked('this entry does not decrypt under the configured key')
+ try:
+ data = json.loads(raw.decode('utf-8'))
+ return data if isinstance(data, dict) else None
+ except Exception:
+ return None
+
+
+def odoo_creds(rt):
+ """R3's resolver seam: the FIRST odoo-type entry's fields, else None (the caller falls
+ back to the environment). Deterministic order = insertion-id sort, so 'first' is stable."""
+ for row in list_entries(rt):
+ if row['type'] == 'odoo':
+ return read_fields(rt, row['id'])
+ return None
+
+
+def test_entry(rt, entry_id, timeout=8):
+ """A cheap, READ-ONLY liveness probe. odoo: xmlrpc `common.version()` (no auth, no data);
+ generic: shape-only. Always answers {ok, message} — an exception here is a result, not a
+ crash."""
+ try:
+ e = (_bucket(rt).get('entries') or {}).get(str(entry_id))
+ if not isinstance(e, dict):
+ return {'ok': False, 'message': 'no such entry'}
+ fields = read_fields(rt, entry_id) or {}
+ if e.get('type') != 'odoo':
+ return {'ok': bool(fields), 'message': f'{len(fields)} field(s) stored'}
+ url = str(fields.get('url') or '').rstrip('/')
+ if not url.startswith(('http://', 'https://')):
+ return {'ok': False, 'message': 'url must start with http(s)://'}
+ import socket
+ import xmlrpc.client
+ old = socket.getdefaulttimeout()
+ socket.setdefaulttimeout(timeout)
+ try:
+ common = xmlrpc.client.ServerProxy(f'{url}/xmlrpc/2/common', allow_none=True)
+ ver = common.version()
+ finally:
+ socket.setdefaulttimeout(old)
+ sv = (ver or {}).get('server_version') if isinstance(ver, dict) else None
+ return {'ok': True, 'message': f'Odoo answered (server {sv or "unknown"})'}
+ except KeychainLocked as e:
+ return {'ok': False, 'message': str(e)}
+ except Exception as e:
+ return {'ok': False, 'message': f'{type(e).__name__}: {str(e)[:120]}'}
diff --git a/platform/core/links.py b/platform/core/links.py
new file mode 100644
index 0000000000000000000000000000000000000000..46ea71d46633a9bfe59545777ed5d0acc3cb3d25
--- /dev/null
+++ b/platform/core/links.py
@@ -0,0 +1,59 @@
+"""Deep links into the app — ?page=&entity=:&src=.
+
+The app (app.py) consumes these params once per session right after login and routes to the page,
+opening the entity drawer when an entity is present. Digest/alert/mention emails build their links
+here so every emailed number lands the reader on the exact row it came from. `src` tags where the
+click came from (digest / alert / mention) — the app logs it as the click-through read receipt.
+"""
+import os
+import sys
+from urllib.parse import quote
+
+#: ⛔ THE ONE HOST LITERAL LEFT IN THE RUNTIME PATH, and it is a MIGRATION HAZARD — named here
+#: rather than buried in a default argument, because the day we change hosts this is what silently
+#: keeps mailing customers a link to the DEAD one. Found by `ops/verify_portability.py` on its
+#: first run (2026-07-30).
+#:
+#: Why it is still here instead of raising: `deeplink()` has exactly one family of callers
+#: (`modules/digest.py`, 7 sites, all building email hrefs), `DIGEST_ENABLED` defaults to ON, and
+#: no deploy sets `APP_BASE_URL` today — so refusing to guess would break a LIVE feature to fix a
+#: latent one. Instead: both deploy scripts now push `APP_BASE_URL`, which makes the fallback
+#: unreachable in a deployed environment, and reaching it prints an operator warning.
+#:
+#: ⇒ EXIT CONDITION for this constant: once a deploy has set `APP_BASE_URL` and it is confirmed
+#: present in the running environment, delete the fallback and let `deeplink()` raise instead. It
+#: is declared in the portability gate's RESIDUALS so the gate reports it honestly rather than
+#: reporting green over it.
+_LEGACY_HF_FALLBACK = 'https://royal-imports-cfo-os.hf.space'
+
+BASE_URL = (os.environ.get('APP_BASE_URL') or _LEGACY_HF_FALLBACK).rstrip('/')
+
+#: Warned LAZILY and ONCE — at the first link actually built, not at import. An import-time print
+#: fires in every gate, every subprocess and every unit test that so much as touches `core`, which
+#: is how a real warning becomes noise nobody reads.
+_WARNED = [False]
+
+
+def _warn_once_if_defaulted():
+ if _WARNED[0] or os.environ.get('APP_BASE_URL'):
+ return
+ _WARNED[0] = True
+ print(f"[links] APP_BASE_URL is not set - emailed deep links will point at "
+ f"{_LEGACY_HF_FALLBACK}, which is correct ONLY while that is where the app lives. "
+ f"Set APP_BASE_URL in the deployed environment.", file=sys.stderr)
+
+# entity kinds the URL scheme supports (must stay in sync with app.py's _desc_from_param)
+LINK_KINDS = ('customer', 'sku', 'agent', 'account')
+
+
+def deeplink(page=None, kind=None, ident=None, src=None):
+ """An absolute app URL. deeplink('customer_data', 'customer', 1234, src='digest')."""
+ _warn_once_if_defaulted()
+ parts = []
+ if page:
+ parts.append(f"page={quote(str(page), safe='')}")
+ if kind in LINK_KINDS and ident not in (None, ''):
+ parts.append(f"entity={quote(f'{kind}:{ident}', safe=':')}")
+ if src:
+ parts.append(f"src={quote(str(src), safe='')}")
+ return BASE_URL + ('/?' + '&'.join(parts) if parts else '/')
diff --git a/platform/core/management_pl.py b/platform/core/management_pl.py
new file mode 100644
index 0000000000000000000000000000000000000000..1546b097d465713ad2b19f039b91a1ee57d5f1d8
--- /dev/null
+++ b/platform/core/management_pl.py
@@ -0,0 +1,161 @@
+"""core/management_pl.py — reproduce the operating model's MANAGEMENT P&Ls
+(FFS-M / RI-M / GD-M / BU-M) monthly from RAW ODOO, Sep-2024 cutover onward. READ-ONLY.
+
+Decoded from v42 (see 17. Application development/financial_analysis/MODEL_LOGIC_MAP.md §10):
+
+ -M[entity][account] = clean_entity[account] # live from Odoo (PROVEN to the cent)
+ + hq_overlay[entity][account] # HQ cost allocated to the entity
+ + adj_overrides[entity][account] # tiny, transition-month only
+
+ clean_entity = account.analytic.line grouped by general_account_id (GL row) x account_id
+ (analytic = ENTITY column). Analytic ids: Fisch=1 Royal=2 GiftwareDeals=3
+ HQ=4 Internal=5. Sections by account_type. This is build_income_statements.py
+ (verified exact). Proven live: Oct-2025 acct 51000 -> Fisch 327,531.85 etc.
+
+ hq_overlay / adj_overrides come from data/mgmt_overlay.json (extracted read-only from v42 by
+ build_mgmt_overlay.py). The HQ allocation is HARDCODED in the model (PNL (HQ-*) tabs are literal
+ values, not formulas), so storing it is faithful to how the model is actually maintained.
+
+Consolidation: BU-M = FFS-M + RI-M + GD-M (the Internal analytic is eliminated; HQ is allocated out).
+
+Pure: data in -> plain dicts out. No Streamlit, no writes.
+"""
+from __future__ import annotations
+import json
+import os
+from functools import lru_cache
+
+from core import odoo as O
+
+# ---- entity <-> Odoo analytic account ids (confirmed live) --------------------------------------
+ENTITY_ANALYTIC = {'FFS': 1, 'RI': 2, 'GD': 3, 'HQ': 4, 'Internal': 5}
+ANALYTIC_ENTITY = {v: k for k, v in ENTITY_ANALYTIC.items()}
+BUS = ['FFS', 'RI', 'GD'] # the business units that get a -M statement
+ENTITY_LABEL = {'FFS': 'Fisch (FFS)', 'RI': 'Royal (RI)', 'GD': 'Giftware Deals (GD)', 'BU': 'Consolidated (BU)'}
+
+# P&L sections by Odoo account_type (mirrors build_income_statements.py)
+INCOME_TYPES = {'income'}
+OTHER_INCOME_TYPES = {'income_other'}
+COGS_TYPES = {'expense_direct_cost'}
+EXPENSE_TYPES = {'expense'}
+DEPREC_TYPES = {'expense_depreciation'}
+PL_TYPES = INCOME_TYPES | OTHER_INCOME_TYPES | COGS_TYPES | EXPENSE_TYPES | DEPREC_TYPES
+
+_OVERLAY_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),
+ 'data', 'mgmt_overlay.json')
+
+
+def month_bounds(year: int, month: int) -> tuple[str, str]:
+ import calendar
+ last = calendar.monthrange(year, month)[1]
+ return f'{year}-{month:02d}-01', f'{year}-{month:02d}-{last:02d}'
+
+
+@lru_cache(maxsize=1)
+def account_master() -> dict:
+ """{gl_account_id: {'code','name','type'}} for every account."""
+ rows = O.search_read('account.account', [], ['id', 'code', 'name', 'account_type'])
+ return {r['id']: {'code': r.get('code') or '', 'name': r.get('name') or '',
+ 'type': r.get('account_type')} for r in rows}
+
+
+def _display(acc_type: str, raw: float) -> float:
+ """Income shown raw; costs/expenses/depreciation flipped positive (model convention)."""
+ if acc_type in INCOME_TYPES or acc_type in OTHER_INCOME_TYPES:
+ return raw
+ return -raw
+
+
+@lru_cache(maxsize=64)
+def clean_entities(year: int, month: int) -> dict:
+ """The clean per-entity P&L straight from Odoo analytic lines, for one month.
+
+ Returns {entity_key: {account_code: display_amount}} for FFS/RI/GD/HQ/Internal, restricted to
+ P&L account types. This is the LIVE, proven-exact foundation (= build_income_statements.py).
+ """
+ start, end = month_bounds(year, month)
+ rows = O.read_group('account.analytic.line',
+ domain=[('date', '>=', start), ('date', '<=', end)],
+ fields=['amount:sum'], groupby=['general_account_id', 'account_id'], lazy=False)
+ am = account_master()
+ out = {k: {} for k in ENTITY_ANALYTIC}
+ for r in rows:
+ gen = r.get('general_account_id'); ana = r.get('account_id')
+ if not gen or not ana:
+ continue
+ gid, aid = gen[0], ana[0]
+ ent = ANALYTIC_ENTITY.get(aid)
+ acc = am.get(gid)
+ if ent is None or not acc or acc['type'] not in PL_TYPES:
+ continue
+ amt = _display(acc['type'], r.get('amount') or 0.0)
+ if abs(amt) < 0.005:
+ continue
+ out[ent][acc['code']] = out[ent].get(acc['code'], 0.0) + amt
+ return out
+
+
+@lru_cache(maxsize=1)
+def _overlay() -> dict:
+ """The stored HQ-allocation + transition-reconciliation overlay (build_mgmt_overlay.py).
+ Shape: {'YYYY-MM': {'FFS': {acct: amt}, ...}}. These are financial figures, so they live in the
+ PRIVATE HF Dataset store on the Space (never in the public Space repo); locally they load from the
+ committed JSON. File first, so local runs need no token. Empty -> -M = clean entity only."""
+ try:
+ with open(_OVERLAY_PATH, encoding='utf-8') as f:
+ return json.load(f)
+ except (FileNotFoundError, json.JSONDecodeError):
+ pass
+ try:
+ from core import store
+ return store.get('mgmt_overlay') or {}
+ except Exception:
+ return {}
+
+
+def management_pl(year: int, month: int, entity: str) -> dict:
+ """The management P&L for one entity-month: {account_code: amount} = clean + overlay.
+
+ entity in {'FFS','RI','GD'}; 'BU' returns the consolidation (sum of the three).
+ """
+ if entity == 'BU':
+ agg: dict = {}
+ for bu in BUS:
+ for code, amt in management_pl(year, month, bu).items():
+ agg[code] = agg.get(code, 0.0) + amt
+ return agg
+ clean = dict(clean_entities(year, month).get(entity, {}))
+ ov = _overlay().get(f'{year}-{month:02d}', {}).get(entity, {})
+ for code, amt in ov.items():
+ clean[code] = clean.get(code, 0.0) + amt
+ return clean
+
+
+# ---- section roll-ups (for the statement view) --------------------------------------------------
+def _bucket(code: str) -> str | None:
+ acc = next((a for a in account_master().values() if a['code'] == code), None)
+ if not acc:
+ return None
+ t = acc['type']
+ if t in INCOME_TYPES: return 'income'
+ if t in OTHER_INCOME_TYPES: return 'other_income'
+ if t in COGS_TYPES: return 'cogs'
+ if t in EXPENSE_TYPES: return 'expense'
+ if t in DEPREC_TYPES: return 'deprec'
+ return None
+
+
+def statement(year: int, month: int, entity: str) -> dict:
+ """Section subtotals + net for one entity-month (income / cogs / gross / opex / deprec / net)."""
+ lines = management_pl(year, month, entity)
+ sec = {'income': 0.0, 'other_income': 0.0, 'cogs': 0.0, 'expense': 0.0, 'deprec': 0.0}
+ for code, amt in lines.items():
+ b = _bucket(code)
+ if b:
+ sec[b] += amt
+ income = sec['income'] + sec['other_income']
+ gross = income - sec['cogs']
+ net = gross - sec['expense'] - sec['deprec']
+ return {'income': income, 'cogs': sec['cogs'], 'gross_profit': gross,
+ 'operating_expense': sec['expense'], 'depreciation': sec['deprec'], 'net_profit': net,
+ 'lines': lines}
diff --git a/platform/core/measure_resolve.py b/platform/core/measure_resolve.py
new file mode 100644
index 0000000000000000000000000000000000000000..392db565c3ba3a873e67f311e9d7dac5dae9ae78
--- /dev/null
+++ b/platform/core/measure_resolve.py
@@ -0,0 +1,190 @@
+"""core/measure_resolve.py — HOST-NEUTRAL measure resolution (EXIT-5, SHELL.md ladder step 3).
+
+The `_cl_measure_offer` / `_cl_resolve_measures` / `_cl_measure_columns` family, OUT of app.py:
+one implementation, two hosts. The Streamlit adapter passes its `st.session_state` memos and its
+pending-view read; the API passes runtime-level dicts and no pending view (over HTTP the
+`view_upsert` lands via `/grid/events` BEFORE the workspace re-read, so the saved views already
+carry the freshest rule — there is no mid-run component value to read).
+
+No streamlit import, no app import — harness only, so both adapters can call it.
+
+Memo discipline (unchanged from the app.py originals):
+ * keys carry (stamp, scope, POOL IDENTITY, question) — the pool's identity, never its size,
+ because Cohort passes a different pool per cohort and two same-sized cohorts must not be
+ handed each other's answers.
+ * `column_values` memoises permanent failures as None but NEVER a transient one (datastore
+ still warming after a restart) — a memoised transient means blank measure cells that stay
+ blank for the whole session long after the data landed.
+ * both memos are bounded by clearing wholesale past a cap — session/runtime-lifetime caches,
+ not leaks.
+"""
+import hashlib
+
+
+def offer(team_id=None, on_error=None):
+ """The measures the condition builder / measure columns may use, or [] if the semantic
+ store is unavailable. The caller's BU narrows the offer (a company-level measure cannot be
+ answered for one business unit)."""
+ try:
+ from harness import measure_filter as _mf
+ return _mf.measure_fields(team_id)
+ except Exception as e: # no store / model problem -> offer nothing
+ if on_error:
+ on_error('measures', e)
+ return []
+
+
+def _pool_key(allowed_pids):
+ """The pool's identity, hashed. Part of every ANSWER, not just the question: the zero-group
+ is reconstructed from it (a customer with no orders in the window has no row for SQL to
+ group, so `Sales < 100` would miss exactly the lapsed customers the filter is for)."""
+ return hashlib.blake2b(
+ repr(sorted(allowed_pids)).encode(), digest_size=8).hexdigest()
+
+
+def condition_sets(view_configs, pending_cfg, team_id, allowed_pids, today, stamp, memo,
+ on_error=None):
+ """Every measure condition across `view_configs` (+ the optional pending config, which goes
+ LAST and overwrites — the freshest statement of what the user wants) -> `{ruleId: [pid,…]}`.
+
+ A rule that is incomplete (mid-edit), unresolvable, or errors is left OUT of the answer —
+ the client reads a missing id as PENDING and says "Calculating…" rather than showing a count
+ it cannot stand behind. Never resolve an incomplete rule: `to_num(None)` is 0 by the
+ engines' shared contract, so a valueless `Sales > …` would become `Sales > 0` — a wrong set
+ under a confident count.
+ """
+ from harness import measure_filter as _mf
+ by_id = {}
+ for cfg in list(view_configs or []) + [pending_cfg or {}]:
+ for rule in _mf.collect((cfg or {}).get('filters')):
+ rid = str(rule.get('id') or '')
+ if rid:
+ by_id[rid] = rule
+ rules = list(by_id.values())
+ if not rules:
+ return {}
+ pk = _pool_key(allowed_pids)
+ out = {}
+ for rule in rules:
+ if not _mf.rule_complete(rule):
+ continue
+ key = (stamp, team_id, pk, _mf.signature(rule))
+ if key not in memo:
+ try:
+ memo[key] = _mf.resolve_rule(rule, today, team_id, allowed_pids)
+ except Exception as e:
+ # An unresolvable condition must NOT become "everything" or "nothing" silently.
+ if on_error:
+ on_error('measure-resolve', e)
+ continue
+ out[str(rule['id'])] = sorted(memo[key])
+ if len(memo) > 200: # a lifetime cache, not a leak
+ memo.clear()
+ return out
+
+
+def series_values(fields, bucket, buckets, team_id, allowed_pids, today, stamp,
+ memo, on_error=None):
+ """`{field key: {'values': {bucket_start: v}, 'agg': kind}}` for every measure column
+ among `fields`, over `buckets` = [(start_iso, end_iso), …] — the C-TS channel, C-TSWIN
+ semantics since wave 14: each field's OWN window slides across the buckets
+ (`today := bucket end`), so two fields on the same measure with different windows are
+ DIFFERENT questions — the memo key carries the window signature, which the wave-13 key
+ (measure-only) silently conflated. `custom` fixed-range windows are the CALLER's to drop
+ (`window_fixed`) before calling; one that slips through memoises as a permanent failure.
+
+ Same memo discipline as `column_values`: keys carry (stamp, scope, POOL IDENTITY, the
+ question); a permanent failure memoises as None (the caller reports that field as
+ dropped), a TRANSIENT one (datastore still warming) never memoises, so the next call
+ retries instead of freezing a blank panel for the session's lifetime.
+ """
+ out = {}
+ mfields = [f for f in fields or [] if isinstance(f.get('measure'), dict)]
+ if not mfields or not buckets:
+ return out
+ from harness import measure_filter as _mf
+ from harness import windows as _wn
+ pk = _pool_key(allowed_pids)
+ span_from, span_to = str(buckets[0][0]), str(buckets[-1][1])
+ for f in mfields:
+ spec = f.get('measure') or {}
+ mkey = spec.get('key')
+ w = _wn.normalize(spec.get('window'))
+ wsig = None if w is None else tuple(sorted(w.items()))
+ key = (stamp, team_id, pk, mkey, bucket, span_from, span_to, wsig)
+ if key not in memo:
+ try:
+ memo[key] = _mf.resolve_series_slid(mkey, spec.get('window'), buckets,
+ today, team_id, allowed_pids)
+ except Exception as e:
+ if on_error:
+ on_error('measure-series', e)
+ transient = False
+ try:
+ from harness import datastore as _ds
+ transient = not _ds.ready()
+ except Exception:
+ transient = False
+ if transient:
+ continue # no memo entry -> the next call tries again
+ memo[key] = None
+ ans = memo[key]
+ if ans is None:
+ continue
+ out[f['key']] = ans
+ if len(memo) > 200:
+ memo.clear()
+ return out
+
+
+def column_values(fields, team_id, allowed_pids, today, stamp, memo, on_error=None):
+ """Values for every FORMULA-MEASURE column among `fields` -> `{pid: {field key: value}}`,
+ handed to `rows_from_pool(derived=…)` beside the cohort cells.
+
+ A column that cannot be computed (store down, BU scope on a company-level measure,
+ unresolvable window) degrades to BLANK — the value dict simply omits that field key, and
+ the client renders empty cells, never $0: blank is "could not compute", 0 is a real zero.
+ """
+ mfields = [f for f in fields or [] if isinstance(f.get('measure'), dict)]
+ if not mfields:
+ return {}
+ from harness import measure_filter as _mf
+ from harness import windows as _wn
+ pk = _pool_key(allowed_pids)
+ out = {}
+ for f in mfields:
+ spec = f['measure']
+ w = _wn.normalize(spec.get('window'))
+ key = (stamp, team_id, pk, spec.get('key'),
+ None if w is None else tuple(sorted(w.items())))
+ if key not in memo:
+ try:
+ memo[key] = _mf.resolve_values(spec.get('key'), spec.get('window'),
+ today, team_id, allowed_pids)
+ except Exception as e:
+ if on_error:
+ on_error('measure-column', e)
+ # ⚠ ONLY A PERMANENT FAILURE MAY BE MEMOISED. "The data cache is still warming
+ # up after a restart" is TRANSIENT and self-healing — memoising it means a user
+ # who opened the page during that window gets blank measure cells that STAY
+ # blank for the whole session. A permanent failure (an unadmitted measure, an
+ # unresolvable window) still memoises, so the retry-storm this guard was
+ # written for cannot come back.
+ transient = False
+ try:
+ from harness import datastore as _ds
+ transient = not _ds.ready()
+ except Exception:
+ transient = False
+ if transient:
+ continue # no memo entry -> the next call tries again
+ memo[key] = None
+ vals = memo[key]
+ if vals is None:
+ continue
+ fkey = f['key']
+ for pid, v in vals.items():
+ out.setdefault(pid, {})[fkey] = v
+ if len(memo) > 100:
+ memo.clear()
+ return out
diff --git a/platform/core/odoo.py b/platform/core/odoo.py
new file mode 100644
index 0000000000000000000000000000000000000000..b1785b4b0bbef5acb9d2546d20bf9c1b493bfa5f
--- /dev/null
+++ b/platform/core/odoo.py
@@ -0,0 +1,321 @@
+"""CFO-OS shared Odoo data layer (READ-ONLY).
+
+Reuses the existing write-guarded client (ffs_dashboard/odoo_client.py) so there is
+a single source of truth for the connection. Adds:
+ - cached singleton client
+ - read_group / search_read passthroughs with light cleanup
+ - business constants (teams, excluded partners)
+ - the "sales universe" base domain (confirmed orders, RI+FFS only)
+
+NOTHING here writes to Odoo — the underlying client hard-blocks writes.
+"""
+import os
+import sys
+import queue as _queue
+import threading
+from concurrent.futures import ThreadPoolExecutor
+from contextlib import contextmanager
+from functools import lru_cache
+from pathlib import Path
+
+# Self-contained read-only client lives at the app root (platform/odoo_client.py) with its
+# own .env — so this whole folder can be moved/hosted anywhere without external paths.
+_ROOT = Path(__file__).resolve().parents[1] # platform/
+if str(_ROOT) not in sys.path:
+ sys.path.insert(0, str(_ROOT))
+from odoo_client import OdooClient # noqa: E402 (read-only, write-guarded)
+
+# ---- business constants (TENANT #0's scope, kept as module attributes for its modules) ----
+# These are Royal Imports' config — the default a request gets when nothing binds a tenant.
+# The canonical per-tenant home is `harness/tenants.py` Tenant.config; a BOUND tenant (see
+# `tenant_scope` below) carries its own team ids / exclusions and never reads these.
+TEAM_IDS = [5, 6]
+TEAM_NAMES = {5: 'Fisch', 6: 'Royal'}
+# Partners to exclude from analytics (not part of RI/FFS). Sourced from env so no
+# customer name is ever hardcoded in the (potentially public) repo; set as a Space secret.
+EXCLUDE_PARTNER_NAMES = {n.strip() for n in os.environ.get('EXCLUDE_PARTNER_NAMES', '').split(',') if n.strip()}
+
+# Confirmed sale.order.line scope for RI+FFS (the analytics "sales universe").
+# ⚠ Documentation of tenant #0's base scope — `sale_line_domain()` below BUILDS its domain from
+# `active_team_ids()` (binding-aware) rather than reading this list; edit both or neither.
+SALE_LINE_BASE = [
+ ('state', 'in', ['sale', 'done']),
+ ('order_id.team_id', 'in', TEAM_IDS),
+ ('product_id', '!=', False),
+]
+# Posted customer invoices/credit notes (AR + revenue recognised).
+INVOICE_BASE = [
+ ('move_type', 'in', ['out_invoice', 'out_refund']),
+ ('state', '=', 'posted'),
+]
+
+
+@lru_cache(maxsize=1)
+def _global_client():
+ """TENANT #0's read-only client (env/.env credentials) — the default for every unbound call."""
+ return OdooClient()
+
+
+# ---- per-tenant connections (R3 keychain cutover, 2026-08-04) --------------------------------
+# One client per tenant slug, keyed by a fingerprint of its credentials so a rotated key
+# reconnects on the next call with no restart. The DEFAULT slug maps to the env client above.
+# ⛔ FAIL-CLOSED: a bound NON-default tenant with no credentials raises — the env fallback
+# would silently answer tenant B's question over tenant A's connection, which is the exact
+# failure this section exists to remove.
+_DEFAULT_SLUG = 'royal-imports'
+_TENANT_CLIENTS = {} # slug -> (creds fingerprint, OdooClient)
+_TC_LOCK = threading.Lock()
+
+
+class TenantOdooUnavailable(RuntimeError):
+ """A bound tenant has no Odoo credentials. Callers surface 'connect a source', never
+ another tenant's data."""
+
+
+def _client_for(slug, creds):
+ """The client for a BOUND tenant. creds None: default slug -> env client; anyone else -> raise."""
+ slug = str(slug or _DEFAULT_SLUG)
+ if not creds:
+ if slug == _DEFAULT_SLUG:
+ return _global_client()
+ raise TenantOdooUnavailable(
+ f"tenant {slug!r} has no Odoo credentials — store them under Settings → Keychains. "
+ f"(Refusing the environment fallback: that is another tenant's connection.)")
+ fp = (str(creds.get('url') or ''), str(creds.get('db') or ''),
+ str(creds.get('user') or ''), str(creds.get('api_key') or ''))
+ with _TC_LOCK:
+ cur = _TENANT_CLIENTS.get(slug)
+ if cur and cur[0] == fp:
+ return cur[1]
+ cli = OdooClient(creds=creds) # built OUTSIDE the lock: it authenticates over the wire
+ with _TC_LOCK:
+ cur = _TENANT_CLIENTS.get(slug)
+ if cur and cur[0] == fp:
+ return cur[1] # another thread won the race — keep ONE client
+ _TENANT_CLIENTS[slug] = (fp, cli)
+ return cli
+
+
+@contextmanager
+def tenant_scope(slug, creds=None, team_ids=None, team_names=None, exclude_partner_names=None):
+ """Bind THIS THREAD's Odoo context to a tenant: its connection + its scope constants.
+
+ Unbound (the default) = tenant #0 via env, which is every existing Streamlit/API caller.
+ The connector layer (harness/connectors/odoo.py) wraps each query in this, so a second
+ tenant's keychain credentials reach the wire without any module knowing. Scope constants
+ are PUSHED here from Tenant.config because core/ may not import harness/ (layering)."""
+ prev = getattr(_tlocal, 'tenant_ctx', None)
+ _tlocal.tenant_ctx = {
+ 'slug': str(slug or _DEFAULT_SLUG),
+ 'creds': creds,
+ 'team_ids': list(team_ids) if team_ids else None,
+ 'team_names': dict(team_names) if team_names else None,
+ 'exclude_partner_names': set(exclude_partner_names) if exclude_partner_names else None,
+ }
+ try:
+ yield
+ finally:
+ _tlocal.tenant_ctx = prev
+
+
+def _ctx():
+ return getattr(_tlocal, 'tenant_ctx', None)
+
+
+def active_team_ids():
+ """The bound tenant's team ids; unbound or default slug -> tenant #0's TEAM_IDS."""
+ c = _ctx()
+ if c is not None and c['slug'] != _DEFAULT_SLUG:
+ return list(c['team_ids'] or [])
+ return list(TEAM_IDS)
+
+
+def active_team_names():
+ c = _ctx()
+ if c is not None and c['slug'] != _DEFAULT_SLUG:
+ return dict(c['team_names'] or {})
+ return dict(TEAM_NAMES)
+
+
+# ---- concurrent read pool -------------------------------------------------------------------
+# Each Odoo XML-RPC call is a round-trip; a heavy drawer fires a dozen of them and they add up to
+# many seconds when run one-by-one. `parallel()` runs independent READ tasks across a small pool of
+# extra connections, with each task transparently using its own connection via a thread-local — so
+# the existing read_group/search_read/sum_field helpers need no change. READ-ONLY only.
+_POOL_MAX = 8
+_tlocal = threading.local()
+_pool_q = _queue.Queue()
+_pool_n = 0
+_pool_lock = threading.Lock()
+
+
+def _checkout():
+ global _pool_n
+ try:
+ return _pool_q.get_nowait()
+ except _queue.Empty:
+ with _pool_lock:
+ grow = _pool_n < _POOL_MAX
+ if grow:
+ _pool_n += 1
+ return OdooClient() if grow else _pool_q.get() # else block until one frees
+
+
+def _checkin(c):
+ _pool_q.put(c)
+
+
+def get_odoo():
+ """The active read-only client, in priority order:
+ 1. a NON-default tenant binding (tenant_scope) — its own client, ALWAYS. The parallel()
+ pool below holds tenant-#0 connections, so a pooled client must never answer a bound
+ tenant's call (that is the cross-tenant leak R3's cutover removes);
+ 2. this task's pooled connection (parallel(), and the app's dedicated-bg-thread pattern);
+ 3. an explicit default-slug binding — the env client;
+ 4. unbound: the shared env singleton. Transparent to every read_group/... caller."""
+ c = _ctx()
+ if c is not None and c['slug'] != _DEFAULT_SLUG:
+ return _client_for(c['slug'], c['creds'])
+ task_client = getattr(_tlocal, 'client', None)
+ if task_client is not None:
+ return task_client
+ if c is not None:
+ return _client_for(c['slug'], c['creds'])
+ return _global_client()
+
+
+def set_doc_mode(mode):
+ """Recognition basis for THIS thread's domain builds: 'order' (all confirmed orders) or 'invoice'
+ (fully-invoiced orders only). Cached bundles call this before pulling; parallel() propagates it to
+ each worker. Thread-local, so concurrent user sessions never race on each other's basis."""
+ _tlocal.doc_mode = 'invoice' if mode == 'invoice' else 'order'
+
+
+def doc_mode():
+ return getattr(_tlocal, 'doc_mode', 'order')
+
+
+def parallel(tasks):
+ """Run independent zero-arg READ callables concurrently across the connection pool; returns
+ results in order. Inside each task, get_odoo() (hence read_group/search_read/sum_field/
+ search_count) uses that task's own connection. Never use for writes."""
+ tasks = list(tasks)
+ if not tasks:
+ return []
+ if len(tasks) == 1:
+ return [tasks[0]()]
+
+ caller_mode = doc_mode() # propagate the submitter's basis to each worker
+ caller_ctx = _ctx() # and the tenant binding — a worker thread must
+ # answer for the SAME tenant as its submitter
+ def _run(fn):
+ c = _checkout()
+ _tlocal.client = c
+ _tlocal.doc_mode = caller_mode
+ _tlocal.tenant_ctx = caller_ctx
+ try:
+ return fn()
+ finally:
+ _tlocal.client = None
+ _tlocal.doc_mode = 'order'
+ _tlocal.tenant_ctx = None
+ _checkin(c)
+ with ThreadPoolExecutor(max_workers=min(len(tasks), _POOL_MAX)) as ex:
+ return list(ex.map(_run, tasks))
+
+
+def parallel_map(task_dict):
+ """parallel() over a {name: callable} mapping -> {name: result}."""
+ keys = list(task_dict)
+ return dict(zip(keys, parallel([task_dict[k] for k in keys])))
+
+
+def m2o_id(v):
+ return v[0] if isinstance(v, list) and v else None
+
+
+def m2o_name(v):
+ return v[1] if isinstance(v, list) and len(v) > 1 else ''
+
+
+_EXCL_IDS = {} # slug -> tuple of excluded partner ids (resolved once per process)
+_EXCL_LOCK = threading.Lock()
+
+
+def excluded_partner_ids():
+ """Resolve the ACTIVE tenant's excluded partner names to ids, for fast domain filtering.
+ Cached per tenant slug — the old lru_cache(1) would have handed tenant B whatever tenant A
+ resolved first. Unbound/default = tenant #0's env-sourced names; a bound tenant's names come
+ from its scope config (none configured -> nothing excluded)."""
+ c = _ctx()
+ bound_other = c is not None and c['slug'] != _DEFAULT_SLUG
+ slug = c['slug'] if bound_other else _DEFAULT_SLUG
+ names = (c['exclude_partner_names'] or set()) if bound_other else EXCLUDE_PARTNER_NAMES
+ with _EXCL_LOCK:
+ if slug in _EXCL_IDS:
+ return _EXCL_IDS[slug]
+ if not names:
+ res = tuple()
+ else:
+ rows = get_odoo().search_read('res.partner', [('name', 'in', list(names))], ['id'])
+ res = tuple(r['id'] for r in rows)
+ with _EXCL_LOCK:
+ _EXCL_IDS[slug] = res
+ return res
+
+
+def sale_line_domain(date_from=None, date_to=None, team_id=None, extra=None, partner_ids=None):
+ """Build a sale.order.line domain in the RI+FFS confirmed-order scope, excluding
+ the configured house accounts, with optional date window / single team / extra clauses.
+ partner_ids (a collection, possibly empty) restricts to those customers — the carrier for
+ the Customer module's Agent filter; None = no partner restriction (an empty set matches none)."""
+ tids = active_team_ids()
+ dom = [('state', 'in', ['sale', 'done']), ('product_id', '!=', False)]
+ if tids:
+ dom.insert(1, ('order_id.team_id', 'in', tids))
+ if team_id is not None:
+ dom = [d for d in dom if not (isinstance(d, tuple) and d[0] == 'order_id.team_id')]
+ dom.append(('order_id.team_id', '=', team_id))
+ if date_from:
+ dom.append(('order_id.date_order', '>=', f'{date_from} 00:00:00'))
+ if date_to:
+ dom.append(('order_id.date_order', '<=', f'{date_to} 23:59:59'))
+ ex = excluded_partner_ids()
+ if ex:
+ dom.append(('order_partner_id', 'not in', list(ex)))
+ if partner_ids is not None:
+ dom.append(('order_partner_id', 'in', list(partner_ids)))
+ if doc_mode() == 'invoice':
+ dom.append(('order_id.invoice_status', '=', 'invoiced'))
+ if extra:
+ dom.extend(extra)
+ return dom
+
+
+def read_group(model, domain, fields, groupby, **kw):
+ return get_odoo().read_group(model, domain=domain, fields=fields, groupby=groupby, **kw)
+
+
+def search_read(model, domain=None, fields=None, **kw):
+ return get_odoo().search_read(model, domain=domain or [], fields=fields or [], **kw)
+
+
+def sum_field(model, domain, field):
+ """One-line aggregate sum of `field` over a domain (uses read_group, no row fetch).
+
+ Robust to the empty match set: a groupby=[] read_group over zero rows makes Odoo return a
+ None aggregate, which the server's XML-RPC layer cannot marshal ("cannot marshal None").
+ An empty set simply means the sum is 0.0, so we treat that specific Fault as zero."""
+ try:
+ g = get_odoo().read_group(model, domain=domain, fields=[f'{field}:sum'], groupby=[], lazy=False)
+ except Exception as e: # noqa: BLE001 — narrow check below
+ if 'cannot marshal None' in str(e):
+ return 0.0
+ raise
+ return (g[0].get(field) or 0.0) if g else 0.0
+
+
+def distinct_count(model, domain, field):
+ """Distinct count of a (m2o) field over a domain via grouped read_group."""
+ g = get_odoo().read_group(model, domain=domain, fields=[field], groupby=[field], lazy=False)
+ return sum(1 for r in g if r.get(field))
diff --git a/platform/core/periods.py b/platform/core/periods.py
new file mode 100644
index 0000000000000000000000000000000000000000..fe92ec7228c03056d11b149cc95eafb76c077ace
--- /dev/null
+++ b/platform/core/periods.py
@@ -0,0 +1,155 @@
+"""Period helpers — floral wholesale is highly seasonal, so YoY / same-period
+comparisons are first-class. Everything returns ISO date strings (yyyy-mm-dd).
+
+`today` is injectable for testing/reproducibility.
+"""
+import datetime as dt
+
+
+def _d(x):
+ return x.isoformat()
+
+
+def today():
+ return dt.date.today()
+
+
+def ytd(t=None):
+ """(start, end) for year-to-date through `t`."""
+ t = t or today()
+ return _d(dt.date(t.year, 1, 1)), _d(t)
+
+
+def ytd_last_year(t=None):
+ """Same calendar window one year earlier (Jan 1 LY → same month/day LY).
+ Clamps Feb 29 → Feb 28 in non-leap years."""
+ t = t or today()
+ try:
+ end = dt.date(t.year - 1, t.month, t.day)
+ except ValueError:
+ end = dt.date(t.year - 1, t.month, t.day - 1)
+ return _d(dt.date(t.year - 1, 1, 1)), end if isinstance(end, str) else _d(end)
+
+
+def ltm(t=None):
+ """Trailing 12 months ending `t`."""
+ t = t or today()
+ return _d(t - dt.timedelta(days=365)), _d(t)
+
+
+def prior_ltm(t=None):
+ t = t or today()
+ return _d(t - dt.timedelta(days=730)), _d(t - dt.timedelta(days=365))
+
+
+def mtd(t=None):
+ t = t or today()
+ return _d(dt.date(t.year, t.month, 1)), _d(t)
+
+
+def wtd(t=None):
+ """(Monday of this ISO week, t) — week-to-date."""
+ t = t or today()
+ return _d(t - dt.timedelta(days=t.weekday())), _d(t)
+
+
+def qtd(t=None):
+ """(first day of this calendar quarter, t) — quarter-to-date."""
+ t = t or today()
+ q_start_month = ((t.month - 1) // 3) * 3 + 1
+ return _d(dt.date(t.year, q_start_month, 1)), _d(t)
+
+
+def quarter_range(t=None):
+ """(first day, last day) of the calendar quarter containing t."""
+ t = t or today()
+ qs = ((t.month - 1) // 3) * 3 + 1
+ first = dt.date(t.year, qs, 1)
+ nxt = dt.date(t.year + (1 if qs + 3 > 12 else 0), ((qs + 2) % 12) + 1, 1)
+ return _d(first), _d(nxt - dt.timedelta(days=1))
+
+
+def shift_year(date_from, date_to, weeks=False):
+ """Same window one year earlier. For week-aligned comparisons (weeks=True) shift by exactly 52
+ weeks (364 days) so the weekday lines up; otherwise shift by calendar year (clamping Feb 29)."""
+ f = dt.date.fromisoformat(date_from)
+ t = dt.date.fromisoformat(date_to)
+ if weeks:
+ return _d(f - dt.timedelta(days=364)), _d(t - dt.timedelta(days=364))
+
+ def back(d):
+ try:
+ return dt.date(d.year - 1, d.month, d.day)
+ except ValueError:
+ return dt.date(d.year - 1, d.month, d.day - 1)
+ return _d(back(f)), _d(back(t))
+
+
+def last_n_days(n, t=None):
+ t = t or today()
+ return _d(t - dt.timedelta(days=n)), _d(t)
+
+
+def year_range(year):
+ return f'{year}-01-01', f'{year}-12-31'
+
+
+def month_range(year, month):
+ """(first day, last day) of a given calendar month, ISO strings."""
+ first = dt.date(year, month, 1)
+ nxt = dt.date(year + (1 if month == 12 else 0), 1 if month == 12 else month + 1, 1)
+ return _d(first), _d(nxt - dt.timedelta(days=1))
+
+
+def period_options(t=None, n_months=15):
+ """Ordered {label: (date_from, date_to)} for the close/reconciliation period picker."""
+ t = t or today()
+ opts = {}
+ opts['This month (to date)'] = (_d(dt.date(t.year, t.month, 1)), _d(t))
+ lm_year, lm_month = (t.year, t.month - 1) if t.month > 1 else (t.year - 1, 12)
+ lf, lt = month_range(lm_year, lm_month)
+ opts[f'Last month ({lf[:7]})'] = (lf, lt)
+ opts['Quarter to date'] = (_d(dt.date(t.year, ((t.month - 1) // 3) * 3 + 1, 1)), _d(t))
+ opts['Year to date'] = (_d(dt.date(t.year, 1, 1)), _d(t))
+ for label, mf, mt in reversed(month_starts(n_months, t)):
+ if label == f'{t.year}-{t.month:02d}' or label == lf[:7]:
+ continue
+ opts[label] = (mf, mt)
+ return opts
+
+
+def month_starts(n_back=13, t=None):
+ """List of (yyyy-mm, start, end) for the last n_back months including current."""
+ t = t or today()
+ out = []
+ y, m = t.year, t.month
+ for _ in range(n_back):
+ start = dt.date(y, m, 1)
+ end = (dt.date(y + (m // 12), (m % 12) + 1, 1) - dt.timedelta(days=1))
+ out.append((f'{y}-{m:02d}', _d(start), _d(end)))
+ m -= 1
+ if m == 0:
+ m = 12
+ y -= 1
+ return list(reversed(out))
+
+
+def week_starts(n_back=12, t=None):
+ """List of (label, start, end) for the last n_back ISO weeks (Mon–Sun) including the current
+ (partial) week. label = the Monday as 'MM-DD' (compact, chart-friendly); end is clamped to t
+ for the current week so weekly totals never include future days."""
+ t = t or today()
+ this_mon = t - dt.timedelta(days=t.weekday())
+ out = []
+ for i in range(n_back):
+ mon = this_mon - dt.timedelta(weeks=i)
+ sun = mon + dt.timedelta(days=6)
+ end = min(sun, t)
+ out.append((f'{mon.month:02d}-{mon.day:02d}', _d(mon), _d(end)))
+ return list(reversed(out))
+
+
+def yoy_pct(this_v, last_v):
+ if last_v:
+ return (this_v - last_v) / last_v * 100.0
+ return None
diff --git a/platform/core/perm_migrate.py b/platform/core/perm_migrate.py
new file mode 100644
index 0000000000000000000000000000000000000000..ee7aaca3bcfd5fc979d385cd630d3542bf42d984
--- /dev/null
+++ b/platform/core/perm_migrate.py
@@ -0,0 +1,156 @@
+"""core/perm_migrate.py — R1's one-time migration: `bus`/`agent` become a PERMANENT FILTER.
+
+Owner ruling R1: BU access stops being its own field and becomes an ordinary permanent filter
+under the permissioning engine, declared and edited exactly like "Agent is Tara". This module
+builds that filter from the legacy record and — the part that matters — PROVES the swap is a
+no-op before anything relies on it.
+
+⛔ WHY THE PROOF IS ABOUT VALUES AND NOT ABOUT ROWS (C-PERM amendment 3).
+`modules/customer_data._pool_build` passes `team_id` into `cust._cust_rev` three times (YTD, LY,
+LTM) and into `cust._cadence_bulk`. It therefore decides what `rev`, `ly`, `ltm`, `aov`,
+`est_missed` and the derived `status` MEAN — it is not a row filter. Swap it for a post-filter
+and a Fisch-only user keeps a plausible row LIST while every number on it quietly becomes
+Fisch+Royal, worst for `dba = Both` customers, who are precisely the ones a BU filter admits.
+A pid-set reconciliation reports GREEN on that. So `reconcile()` compares VALUES.
+
+The pushdown survives as `perm_scope.derive_pool_scope` — a DERIVATION OF the filter rather than
+a wall beside it — so a correctly migrated record produces the IDENTICAL pool call, and the
+reconciliation below should be exact rather than merely close. If it is not exact, that is a
+finding for the owner, not a tolerance to widen.
+"""
+import core.perm_scope as perm_scope
+import core.perms as perms
+
+MODULE = 'customer_data'
+
+#: `_dba_attrs` emits exactly {'Fisch','Royal','Both'} (blank = no brand attributable in 24
+#: months). A BU grant admits its own brand AND the dual-brand customers: a Both customer IS a
+#: Fisch customer. Mirrors `perm_scope._DBA_TEAM`, inverted.
+#:
+#: ⚠ TWO VALUES, AND THE COLUMN VOCABULARY HAS NO "IS ANY OF". `FILTER_OPS` is single-valued by
+#: design (`eq`, `neq`, `contains`, …) — `anyOf` belongs to the COHORT vocabulary and is
+#: deliberately DISJOINT from it, so a column leaf carrying `anyOf` is refused by every engine
+#: (`filter_eval` returns False, `clean_filter_tree` drops it). This migration's first draft
+#: emitted exactly that and `reconcile()` caught it as two lost customers. So the BU condition
+#: is an OR GROUP of `eq` leaves, which is what the condition builder itself produces.
+_TEAM_DBA = {5: ('Fisch', 'Both'), 6: ('Royal', 'Both')}
+
+
+def filter_for(rec):
+ """The permanent filter equivalent to this record's legacy `bus` + `agent`, or None when the
+ record was unrestricted (an admin, or `bus:'all'` with no agent link).
+
+ AND-conjoined at the root, and top-level by construction — which is also what makes it
+ pushdown-derivable (`derive_pool_scope` reads top-level AND leaves only).
+ """
+ nodes = []
+ team_id = perms.scope_team_id(rec)
+ if team_id in _TEAM_DBA:
+ nodes.append({'conj': 'or',
+ 'children': [{'colId': 'dba', 'op': 'eq', 'value': v, 'value2': ''}
+ for v in _TEAM_DBA[team_id]]})
+ agent = perms.scope_agent(rec)
+ if agent:
+ nodes.append({'colId': 'agent', 'op': 'eq', 'value': str(agent), 'value2': ''})
+ if not nodes:
+ return None
+ return {'conj': 'and', 'nodes': nodes}
+
+
+def perms_for(rec, modules=(MODULE,)):
+ """The `perms` block this legacy record becomes.
+
+ ⚠ ACCESS IS COPIED FROM THE OLD GRANT, NOT ASSUMED. `may_open` is what decided reachability
+ before this wave, so migrating a record must not widen it — and on a migrated record an
+ undeclared module DENIES (amendment 4), so every module the user could reach has to be
+ declared here or the migration is a lockout.
+ """
+ out = {}
+ for key in modules:
+ out[key] = {'access': bool(perms.may_open(rec, key)),
+ 'filter': filter_for(rec),
+ 'hiddenFields': []}
+ return out
+
+
+def plan(registry_dict, modules=(MODULE,)):
+ """`{username: perms_block}` for every record that is not already migrated.
+
+ Admins are included and get an all-access block with no filter: they bypass `perm_scope`
+ anyway, but leaving them un-migrated would keep the legacy reader alive for the one account
+ most likely to be inspected when something looks wrong.
+ """
+ out = {}
+ for uname, rec in (registry_dict or {}).items():
+ if not isinstance(rec, dict) or perm_scope.is_migrated(rec):
+ continue
+ out[uname] = perms_for(rec, modules)
+ return out
+
+
+#: The row members whose meaning depends on `team_id` — the ones amendment 3 is about. A
+#: reconciliation that skipped these would be the pid-only gate that cannot see the leak.
+VALUE_KEYS = ('rev', 'ly', 'ltm', 'aov', 'est_missed', 'status', 'orders', 'last_order')
+
+
+def reconcile(rec, pool_fn, modules=(MODULE,)):
+ """Prove the migrated record sees EXACTLY what the legacy record saw.
+
+ `pool_fn(agent, team_id) -> rows` is injected so this is testable without Odoo and so the
+ caller decides whether to hit the live builder or a fixture.
+
+ Returns `{ok, legacy_scope, derived_scope, lost, gained, value_diffs}`:
+ * `lost` — pids the legacy wall admitted and the migrated one drops. Expected to be
+ EMPTY. One narrow class is known and must be REPORTED rather than tolerated:
+ `_dba_attrs` uses a 731-day window while `_cust_rev`'s LY window can reach a
+ little further back, so a customer whose only in-scope revenue predates that
+ window carries a BLANK `dba` and fails a `dba` leaf. Blank is the honest "no
+ brand attributable" state, so such a customer is NAMED here, never rounded
+ away.
+ * `gained` — pids the migrated wall admits and the legacy one did not. Must be empty: it
+ is the widening direction, and there is no acceptable non-empty value.
+ * `value_diffs` — per-pid disagreements on VALUE_KEYS. The assertion amendment 3 exists
+ for; a non-empty list means the pushdown was not applied and the numbers are
+ consolidated.
+ """
+ legacy_scope = (perms.scope_agent(rec), perms.scope_team_id(rec))
+ migrated = dict(rec)
+ migrated['perms'] = perms_for(rec, modules)
+ migrated['perms_v'] = perm_scope.PERMS_VERSION
+ team_id, agent = perm_scope.derive_pool_scope(migrated, MODULE)
+ derived_scope = (agent, team_id)
+
+ legacy_rows = pool_fn(legacy_scope[0], legacy_scope[1])
+ derived_rows = pool_fn(agent, team_id)
+ fields = _fields_of(legacy_rows)
+ kept = perm_scope.apply_row_scope(derived_rows, migrated, MODULE, fields)
+
+ legacy_by = {r.get('pid'): r for r in legacy_rows}
+ kept_by = {r.get('pid'): r for r in kept}
+ lost = sorted(set(legacy_by) - set(kept_by))
+ gained = sorted(set(kept_by) - set(legacy_by))
+
+ value_diffs = []
+ for pid in sorted(set(legacy_by) & set(kept_by)):
+ a, b = legacy_by[pid], kept_by[pid]
+ for k in VALUE_KEYS:
+ if k in a and a.get(k) != b.get(k):
+ value_diffs.append({'pid': pid, 'key': k,
+ 'legacy': a.get(k), 'migrated': b.get(k)})
+ return {'ok': not lost and not gained and not value_diffs,
+ 'legacy_scope': legacy_scope, 'derived_scope': derived_scope,
+ 'lost': lost, 'gained': gained, 'value_diffs': value_diffs,
+ 'names': {r.get('pid'): r.get('customer') for r in legacy_rows
+ if r.get('pid') in set(lost)}}
+
+
+def _fields_of(rows):
+ """A field list good enough to EVALUATE with, inferred from the assembled rows.
+
+ The permanent filters this module builds name `dba` (text) and `agent` (text) only, so the
+ inference is exact for them. It is deliberately not a schema: `permits()` needs types to
+ dispatch comparisons, and inferring `text` for an unknown key would be a guess with
+ consequences — so anything not recognised is left out, which makes its leaf unanswerable and
+ therefore DENYING rather than silently mistyped.
+ """
+ return [{'key': 'dba', 'type': 'text'}, {'key': 'agent', 'type': 'text'}]
diff --git a/platform/core/perm_scope.py b/platform/core/perm_scope.py
new file mode 100644
index 0000000000000000000000000000000000000000..8267a4902756280d0475592351f3d0730b5f0a6c
--- /dev/null
+++ b/platform/core/perm_scope.py
@@ -0,0 +1,286 @@
+"""core/perm_scope.py — the permission WALL for table modules (wave 15, C-PERM).
+
+ONE place answers the three questions a restricted account raises on a grid surface:
+
+ may_access(user, module) may they open it at all?
+ visible_fields(fields, u, mod) which COLUMNS may they receive?
+ apply_row_scope(rows, u, mod, …) which ROWS may they receive?
+
+plus one that exists only because of how the pool is built:
+
+ derive_pool_scope(user, module) which (team_id, agent) must the pool be BUILT with?
+
+Both hosts call these — `aios-web/api` (`grid_assembly`) and `app.py` (`_table_grid`) — because
+a wall that exists on one runtime and not the other is not a wall. `core/perms.py` stays what it
+is (module GRANTS + the legacy BU derivation); this module is the row/field/pushdown layer that
+sits on top, and it is deliberately a separate file so the legacy readers can keep their
+semantics untouched while this one fails closed.
+
+────────────────────────────────────────────────────────────────────────────────────────────
+THE RECORD
+
+ user['perms'] = {'': {'access': bool,
+ 'filter': {'conj'?: 'and'|'or', 'nodes': [...]} | None,
+ 'hiddenFields': ['', ...]}}
+ user['perms_v'] = 1 stamped by the migration and by every write
+
+`perms_v` is the EXPLICIT-RESOLUTION marker, and it is here because of `permissioning.md`
+Part II gap #5: "`allowed_modules() is None` is fail-open by default … make 'resolved:
+unrestricted' an explicit value so absence/uncertainty DENIES." The same class already shipped
+twice in this codebase (`modules: []` and `bus: []` both read as UNRESTRICTED —
+`routes_admin.py`'s own docstring documents both). So:
+
+ * `perms_v` ABSENT → the record is UN-MIGRATED, and the LEGACY wall applies unchanged
+ (`core.perms` module grants + the `bus`/`agent` query scope). That is not fail-open: it is
+ today's real wall, and it bounds the rollout window to "until the migration runs".
+ * `perms_v == 1` and the module has NO entry → **DENY**. Absence now means what it says.
+ * `role == 'admin'` bypasses all of it — which is also what keeps BREAK-GLASS alive.
+ `deps._user_for` hands back a hardcoded master dict on a store outage
+ (`{'username':'admin','role':'admin','bus':'all','modules':'all'}`) that will never carry a
+ perms block; without this clause an explicit-marker scheme locks the owner out of their own
+ product at exactly the moment the store is broken.
+"""
+import re
+
+import core.perms as perms
+
+#: `aios_grid._FORMULA_REF`'s pattern, restated rather than imported: this module is imported by
+#: the API's request path and `aios_grid` pulls in the whole grid stack. Same regex, one line,
+#: and `verify_api` asserts the two agree so it cannot drift into a different grammar.
+_FORMULA_REF = re.compile(r"\{([^{}]*)\}")
+
+PERMS_VERSION = 1
+
+
+def _rec(user):
+ return user if isinstance(user, dict) else {}
+
+
+def is_migrated(user):
+ """True once this record carries an explicit resolution. See the module docstring."""
+ return int(_rec(user).get('perms_v') or 0) >= PERMS_VERSION
+
+
+def entry(user, module):
+ """This user's declared permissions for `module`, or None if nothing is declared.
+
+ None is AMBIGUOUS on purpose and every caller must resolve it against `is_migrated`:
+ on a migrated record it means DENY, on a legacy one it means "ask the old wall".
+ """
+ p = _rec(user).get('perms')
+ if not isinstance(p, dict):
+ return None
+ e = p.get(module)
+ return e if isinstance(e, dict) else None
+
+
+def may_access(user, module):
+ """May this account open `module` at all? Fail-closed on a migrated record."""
+ if perms.is_admin(user):
+ return True
+ e = entry(user, module)
+ if e is not None:
+ return bool(e.get('access', True))
+ if is_migrated(user):
+ # Migrated and undeclared = denied. This is the whole point of the marker.
+ return False
+ return perms.may_open(user, module) # legacy record: the old grant wall
+
+
+# ── FIELDS ───────────────────────────────────────────────────────────────────────────────────
+def hidden_keys(user, module, fields):
+ """The TRANSITIVE closure of hidden field keys (C-PERM amendment 5).
+
+ ⛔ WHY A CLOSURE AND NOT A SET DIFFERENCE. A formula field is computed in the BROWSER
+ (`formulaEngine.ts`, injected by `computedRows`) from `{ref}`s into other columns, and a
+ measure column's value arrives precomputed in `derived`. So hiding field X has exactly three
+ possible outcomes and only one of them is coherent:
+
+ strip X, keep formulas → every formula over X computes blank or wrong, silently
+ keep X's value for them → X has leaked, wearing a formula's name
+ strip X AND its dependents→ the only honest answer
+
+ So a hidden field drags every formula that references it — and every formula that references
+ THAT formula, hence the fixpoint loop — out of the payload with it.
+
+ ⚠ This runs on every assembly, so it is a fixpoint over a handful of custom fields, not a
+ graph library. `MAX_PASSES` bounds a reference cycle the client would refuse to evaluate
+ anyway; without it a self-referential pair would spin here.
+ """
+ e = entry(user, module)
+ if perms.is_admin(user) or not e:
+ return frozenset()
+ hidden = {str(k) for k in (e.get('hiddenFields') or ()) if k}
+ if not hidden:
+ return frozenset()
+
+ refs = {}
+ for f in fields or ():
+ if not isinstance(f, dict) or not f.get('key'):
+ continue
+ expr = f.get('formula')
+ if isinstance(expr, str) and expr:
+ refs[f['key']] = {m.strip() for m in _FORMULA_REF.findall(expr) if m.strip()}
+
+ MAX_PASSES = 12
+ for _ in range(MAX_PASSES):
+ grew = False
+ for key, deps in refs.items():
+ if key not in hidden and deps & hidden:
+ hidden.add(key)
+ grew = True
+ if not grew:
+ break
+ return frozenset(hidden)
+
+
+def visible_fields(fields, user, module):
+ """`fields` minus the hidden closure. Order preserved — the column order is the user's."""
+ hide = hidden_keys(user, module, fields)
+ if not hide:
+ return list(fields or ())
+ return [f for f in (fields or ())
+ if not (isinstance(f, dict) and f.get('key') in hide)]
+
+
+def strip_row(row, hide):
+ """Drop hidden keys from ONE assembled row. Cheap enough to run per row, and it must run
+ per row: the field list and the row payload are two different wires, and stripping only the
+ first would leave the value sitting in the second where anyone can read it."""
+ if not hide or not isinstance(row, dict):
+ return row
+ return {k: v for k, v in row.items() if k not in hide}
+
+
+# ── ROWS ─────────────────────────────────────────────────────────────────────────────────────
+def apply_row_scope(rows, user, module, fields, ctx=None):
+ """The rows this account may receive: `filter_eval.permits` over the permanent filter.
+
+ `permits`, never `matches` — an unanswerable permanent filter DENIES rather than being
+ ignored. See `harness/filter_eval`'s docstring for the field-rename walkthrough that makes
+ the difference a leak rather than a preference.
+ """
+ if perms.is_admin(user):
+ return list(rows or ())
+ e = entry(user, module)
+ tree = (e or {}).get('filter')
+ if not tree:
+ return list(rows or ())
+ from harness import filter_eval as fe
+ return [r for r in (rows or ()) if fe.permits(tree, r, fields, ctx)]
+
+
+# ── THE PUSHDOWN ─────────────────────────────────────────────────────────────────────────────
+#: `dba` value sets that pin a BU, and the Odoo team they pin. `_dba_attrs` emits exactly
+#: {'Fisch','Royal','Both'} (blank for "no brand attributable in 24 months"), so a permission
+#: filter admitting Fisch admits {Fisch, Both} — a Both customer IS a Fisch customer.
+_DBA_TEAM = ((frozenset({'fisch', 'both'}), 5), (frozenset({'royal', 'both'}), 6))
+
+#: Only equality pushes down. `FILTER_OPS` is single-valued (there is no column-level "is any
+#: of" — that vocabulary belongs to cohort leaves and is disjoint), so a multi-value BU
+#: condition arrives as an OR GROUP of `eq` leaves, handled by `_group_dba_team` below.
+_PUSHDOWN_OPS = frozenset({'eq'})
+
+
+def derive_pool_scope(user, module):
+ """`(team_id, agent)` the POOL must be BUILT with, derived from the permanent filter.
+
+ ⛔ THIS EXISTS BECAUSE `team_id` SHAPES VALUES, NOT ROW MEMBERSHIP (C-PERM amendment 3).
+ `modules/customer_data._pool_build` passes `team_id` into `cust._cust_rev` three times (YTD,
+ LY, LTM) and into `cust._cadence_bulk`, so it decides what `rev`, `ly`, `ltm`, `aov`,
+ `est_missed` and the derived `status` MEAN. Enforce a BU purely as a post-filter and a
+ Fisch-only user keeps a correct-looking row LIST while every number on it silently becomes
+ Fisch+Royal — worst for `dba = Both` customers, who are exactly the ones a BU filter admits.
+ A pid-level reconciliation cannot see that; the values one can, and does.
+
+ So the query-level pushdown SURVIVES — but as a DERIVATION OF the permanent filter rather
+ than a second wall beside it, which is what keeps R1's "BU access is just a filter" true at
+ the level the owner asked for it (one declaration, one UI, one engine).
+
+ Pure, and recomputed per request rather than stored: a stored derivation drifts from the
+ filter it came from, and then two things disagree about what an account may see.
+
+ Reads TOP-LEVEL AND-conjunction leaves ONLY. A leaf under `or` guarantees no narrowing —
+ `dba is Fisch OR revenue > 10` must not pin the pool to Fisch — so it never pushes down.
+ Anything not recognised here simply is not pushed down; `apply_row_scope` still applies the
+ whole tree, so the wall is unchanged either way. Belt AND braces, deliberately: the pushdown
+ is what makes the VALUES right, `permits()` is what makes the ROWS right.
+ """
+ if perms.is_admin(user):
+ return None, None
+ e = entry(user, module)
+ tree = (e or {}).get('filter')
+ if not tree:
+ # Un-migrated records still answer through the legacy derivation, so the old wall keeps
+ # working until the migration has run.
+ if not is_migrated(user):
+ return perms.scope_team_id(user), perms.scope_agent(user)
+ return None, None
+
+ from harness import filter_eval as fe
+ nodes, conj = fe.tree_parts(tree)
+ if conj == 'or':
+ return None, None
+
+ team_id, agent = None, None
+ for n in nodes:
+ if not isinstance(n, dict):
+ continue
+ if isinstance(n.get('children'), list):
+ # A top-level OR GROUP under an AND root IS a guaranteed narrowing — every row must
+ # satisfy it — so it may push down, unlike a leaf under an OR ROOT (refused above).
+ # This is the shape a multi-value BU condition actually takes; see `_group_dba_team`.
+ tid = _group_dba_team(n)
+ if tid is not None:
+ team_id = tid if team_id in (None, tid) else None
+ continue
+ if n.get('op') not in _PUSHDOWN_OPS:
+ continue
+ col = n.get('colId')
+ raw = n.get('value')
+ if col == 'dba':
+ vals = {v.strip().lower() for v in str(raw or '').split(',') if v.strip()}
+ if not vals:
+ continue
+ for allowed, tid in _DBA_TEAM:
+ if vals <= allowed:
+ # Both BUs named = no narrowing to push; leave it to the post-filter.
+ team_id = tid if team_id in (None, tid) else None
+ break
+ elif col == 'agent':
+ v = str(raw or '').strip()
+ # A SET of agents cannot become the pool's single `agent_name`; the post-filter
+ # handles it. Only an unambiguous single value pushes down.
+ if v and ',' not in v:
+ agent = v
+ return team_id, agent
+
+
+def _group_dba_team(group):
+ """The team a top-level `or` group pins, or None.
+
+ Recognises ONLY the exact shape "every child is a `dba eq ` leaf" — the group the
+ condition builder emits for a multi-value BU condition, and the one `perm_migrate` writes.
+ Every OTHER group returns None and is left entirely to the post-filter: a group mixing `dba`
+ with another column, or containing a nested group, does not pin a BU on its own, and
+ guessing that it does would build the pool from the wrong book. Narrow by construction —
+ the pushdown may only ever be an OPTIMISATION of a constraint the filter already expresses.
+ """
+ if group.get('conj') != 'or':
+ return None
+ children = group.get('children') or []
+ if not children:
+ return None
+ vals = set()
+ for c in children:
+ if (not isinstance(c, dict) or isinstance(c.get('children'), list)
+ or c.get('colId') != 'dba' or c.get('op') != 'eq'):
+ return None
+ v = str(c.get('value') or '').strip().lower()
+ if not v:
+ return None
+ vals.add(v)
+ for allowed, tid in _DBA_TEAM:
+ if vals <= allowed:
+ return tid
+ return None
diff --git a/platform/core/perms.py b/platform/core/perms.py
new file mode 100644
index 0000000000000000000000000000000000000000..f1f234422737ee5f548bbe22daf91238a4830634
--- /dev/null
+++ b/platform/core/perms.py
@@ -0,0 +1,215 @@
+"""core/perms.py — the permission + scope predicates as PURE functions of a user record.
+
+EXIT-3b (2026-07-30). `ui/session.py` holds the same predicates keyed off `st.session_state`;
+these take the user record explicitly, so the API can answer "what may this session see?" without
+a Streamlit session. ONE implementation of each rule, two callers — and `verify_api.py` asserts
+lock-step against `ui/session.py`'s source (the [[date-window-vocabulary]] discipline: a mirrored
+vocabulary that is not gated has already drifted).
+
+⚠ THE TRAP THIS FILE EXISTS TO AVOID. `ui/session.brand_team()` reads the sidebar's BU selector
+and defaults to `'All'` → `team_id=None` → CONSOLIDATED. Mirroring it literally on the API would
+be a fail-OPEN: an API session has no selector, so a Royal-only user would be handed Fisch rows —
+the exact leak strict isolation exists to prevent. The scope must be derived from the USER RECORD
+(`bus`), never from a UI default. `scope_team_id()` below is that derivation.
+
+Fail-closed everywhere: an unknown module key is denied, an unreadable `bus` narrows rather than
+widens, and a user with no grant sees nothing rather than everything.
+"""
+import core.context as ctxlib
+import core.registry as registry
+import core.users as users
+
+# Old module keys migrate ON READ — grants, Library prefs and ?page= deep links keep working
+# without ever editing a stored user record. MUST stay identical to ui/session._LEGACY_KEYS
+# (gated in verify_api.py): 'myday' shipped before the Customer List rename, 'customer_list'
+# before the 2026-07-26 rename to 'customer_data', 'map' joined in wave 8 when the Map PAGE
+# became a VIEW of the customer table. A chain is fine only if every hop resolves to the CURRENT
+# key, so 'myday' points at the END of the chain, not at the middle.
+# ⚠ 'customers' is deliberately NOT here. It is a real registry key — the parent of
+# customer_data + cohort — and may_open() gives a parent grant to its children. Mapping it away
+# would silently narrow every "customers" grant to one child.
+_LEGACY_KEYS = {'myday': 'customer_data', 'customer_list': 'customer_data',
+ 'map': 'customer_data', 'library': 'settings',
+ # wave 16 (item 5, R10): Cohort folded into the Customer rail as locked
+ # views — a cohort grant or ?page=cohort deep link lands on the grid that
+ # now hosts them.
+ 'cohort': 'customer_data',
+ # wave 16 (item 7, R11): the Agents PAGE is deleted; an 'agent'-granted
+ # login's surviving surface is the Customer grid over their OWN m2m book —
+ # the legacy query-scope (scope_agent reads the record's agent LINK, not
+ # this list) keeps that book exact, shared customers included. The R1
+ # migration deliberately SKIPS agent-linked records: `agent is X` cannot
+ # express m2m membership (a shared customer displays its primary agent),
+ # so their wall stays legacy until a membership predicate exists.
+ 'agent': 'customer_data',
+ # wave 17 (item 15, R2): the Collections PAGE is gone — its worklist is the
+ # shared "Collections" view on the Customer grid. An `ar` grant (or an
+ # ?page=ar deep link) lands on the surface that now does the job. The registry
+ # row survives as `validate_only`, so this is a grant migration, not a deletion:
+ # nobody loses access, they arrive somewhere that still exists.
+ 'ar': 'customer_data',
+ # wave 17 (item 13, R3): Procurement folded into the Product grid — the buy
+ # list is a view over formula fields there.
+ 'procurement': 'product_data'}
+
+
+def is_admin(user):
+ return (user or {}).get('role') == 'admin'
+
+
+def allowed_modules(user):
+ """Registry keys this user may open — None means ALL (admins / unrestricted users)."""
+ m = (user or {}).get('modules', 'all')
+ if not m or m == 'all':
+ return None
+ return {_LEGACY_KEYS.get(k, k) for k in m}
+
+
+def may_open(user, key):
+ """True iff `user` may OPEN module `key`. A PARENT grant covers its sub-modules (granting
+ 'customers' grants 'customer_data'). Fail-closed — an unknown key stays denied."""
+ am = allowed_modules(user)
+ if am is None or key in am:
+ return True
+ parent = registry.BY_KEY.get(key, {}).get('parent')
+ return parent in am if parent else False
+
+
+# ------------------------------------------------------------------ BU (business unit) scope
+def allowed_bu_labels(user):
+ """The BU labels this user may see — `core.users.allowed_bus_labels`, which is already a
+ pure function of the record. Named here so callers have one import for the whole rule set."""
+ return users.allowed_bus_labels(user)
+
+
+def allowed_team_ids(user):
+ """The concrete Odoo team_ids this user may see, as a frozenset. `All` expands to every BU."""
+ labels = allowed_bu_labels(user)
+ if 'All' in labels:
+ return frozenset(t for t in ctxlib.BRANDS.values() if t is not None)
+ return frozenset(ctxlib.BRANDS[l] for l in labels
+ if l in ctxlib.BRANDS and ctxlib.BRANDS[l] is not None)
+
+
+def scope_team_id(user):
+ """The `team_id` an API request must query with — the ONE number that enforces BU isolation.
+
+ None means CONSOLIDATED, and it is returned ONLY when the user may genuinely see every BU
+ (`bus='all'`, or a multi-BU grant, both of which put 'All' in the label list). A user
+ permitted exactly one BU gets that BU's id PINNED, never None.
+
+ ⚠ This is the opposite default from `ui/session.brand_team()`, which falls back to 'All'
+ because a UI selector has to start somewhere. Here there is no selector to read, so the
+ fallback would BE the leak. A single-BU user's rows are pinned at the query, not filtered
+ afterwards, so there is no window in which the other BU's rows exist in the response.
+ """
+ labels = allowed_bu_labels(user)
+ if 'All' in labels:
+ return None
+ ids = sorted(allowed_team_ids(user))
+ return ids[0] if len(ids) == 1 else None
+
+
+def scope_agent(user):
+ """The sales agent whose OWN BOOK this session is confined to, or None for the whole book.
+
+ ⚠ Mirrors `page_customer_data` (app.py), which reads `u.get('agent')` with NO admin
+ exemption — deliberately different from `page_agent`'s `None if is_admin() else …`. The
+ customer TABLE is the surface `/api/v1/customers` serves, so its rule is the one that
+ travels: an account linked to an agent sees that agent's book, admin or not. Getting this
+ wrong in the permissive direction would hand a restricted sales-agent login the whole book.
+ """
+ return (user or {}).get('agent') or None
+
+
+# ------------------------------------------------------------------ nav projection
+def nav_pages(user):
+ """The nav this user may see: registry order, `may_open`-filtered, archived EXCLUDED.
+
+ Shape (X2's `{key,label,source?,parent?}` plus ONE additive field, `chrome`):
+ [{key, label, source?, chrome: 'main'|'utility'}, …]
+
+ Four rules, each of which has bitten before:
+
+ * ARCHIVED IS INVISIBLE TO EVERYONE ([[module-archive-semantics]]) — not "hidden unless
+ admin". 18 of the 28 registry rows are archived and none may appear here.
+
+ * `group_only` ROWS ARE EXCLUDED ENTIRELY, and therefore **no `parent` is ever emitted**.
+ Wave-9 I8 flipped the host nav to a FLAT list: children became top-level and the folder
+ key was dropped, because a `group_only` key names a FAMILY and has no `PAGE_FUNCS` entry
+ — rendering a row for it is a white screen one click away (app.py:8182-8187 says exactly
+ this). `customers` is the only such row. Emitting `parent: 'customers'` on its children
+ while the parent itself is filtered out would hand the client a DANGLING reference to a
+ row that is not in the payload, which is worse than a flat list — so the flat list is
+ what ships, matching the surface a user actually sees today.
+
+ * `nav: False` IS NOT `archived`. `settings`, `analyst` and `dictionary` are LIVE surfaces
+ the host renders outside the module list (Analyst is the unrestricted landing page,
+ Settings sits in the chrome). Dropping them would leave the shell unable to reach two of
+ the nine live surfaces, so they ship flagged `chrome: 'utility'` and the client places
+ them where the host does. `chrome: 'main'` is the module list.
+
+ * NOT filtered by `ui/session.user_enabled_modules()`. That is a PREFERENCE read from
+ `platform/data/store/prefs.json` — a local file on one box. Consuming it here
+ would put per-user FILESYSTEM state inside a process EXIT-4 requires to be stateless,
+ and the same user's nav would differ per container. It is a Library setting, not a
+ permission; the permission gate is `may_open`, and that is what this applies.
+ """
+ out = []
+ for m in registry.REGISTRY:
+ if m.get('archived') or m.get('group_only'):
+ continue
+ # WAVE 17 (R2 + R8) — `validate_only` rows have NO SURFACE ANYWHERE. Not the module
+ # list, not the utility group behind the account menu, not a page. They exist so
+ # `validate.py` keeps proving contracts that a LIVE surface depends on:
+ # · `ar` — the Collections page is gone (its worklist is a saved view on the
+ # Customer grid now), but `ar.validate()` is what reconciles the
+ # AR columns that view is built from. Archiving the row would have
+ # skipped it (validate.py skips archived), deleting the proof while
+ # keeping the numbers — the worst of both.
+ # · `dictionary` — the semantic-layer contracts, the Analyst's grounding proof.
+ # `api_surface: False` is the NARROWER neighbour: the row still has a Streamlit page,
+ # but it is not a surface of the PRODUCT. `ar` is the case — its Collections worklist
+ # is a saved view on the Customer grid now, while the admin-only Statements sender
+ # (the one sanctioned Odoo writer) keeps its host page.
+ # ⚠ This is NOT `nav: False`. That flag means "a live surface the HOST renders outside
+ # the module list" and ships as `chrome: 'utility'`, which is exactly the account-menu
+ # row R8 says to delete.
+ if m.get('validate_only') or m.get('api_surface') is False:
+ continue
+ # WAVE 17 R8, the other half — `settings` STOPS being offered to the API's clients.
+ # It shipped as `chrome: 'utility'`, which the React shell rendered as "App settings":
+ # a hand-off that opens the STREAMLIT settings page in a new tab, beside the shell's
+ # own Profile modal that does the same job better. Two doors to one room, one of them
+ # leading out of the application. The owner's words were "I don't even know what it
+ # does — delete them".
+ # ⚠ The ROW STAYS, and so does the Streamlit page behind it: this host's own account
+ # menu still opens it, and the dispatch guard uses `settings` as its always-renderable
+ # last resort for a user whose whole grant has been retired. What changes is that the
+ # API no longer advertises it as a surface of the PRODUCT.
+ if m['key'] == 'settings':
+ continue
+ if not may_open(user, m['key']):
+ continue
+ row = {'key': m['key'], 'label': m['label'],
+ 'chrome': 'main' if m.get('nav', True) else 'utility'}
+ if m.get('source'):
+ row['source'] = m['source']
+ out.append(row)
+ return out
+
+
+def landing_page(user):
+ """Where a restricted user lands: the first MAIN-chrome page in their grant. None for
+ unrestricted users (the client lands on the Analyst, as the host does).
+
+ Mirrors `ui/session.first_allowed_module` minus its archived last-resort leg — that leg
+ exists so a misconfigured Streamlit login is not bricked; an API caller gets an explicit
+ answer instead, and serving an archived key would contradict the rule above.
+ """
+ if allowed_modules(user) is None:
+ return None
+ for row in nav_pages(user):
+ if row['chrome'] == 'main':
+ return row['key']
+ return None
diff --git a/platform/core/platform_admin.py b/platform/core/platform_admin.py
new file mode 100644
index 0000000000000000000000000000000000000000..86e8eecba53897f6f7e169ad26f2f717f8d25cb7
--- /dev/null
+++ b/platform/core/platform_admin.py
@@ -0,0 +1,58 @@
+"""core/platform_admin.py — THE PLATFORM-OPERATOR PREDICATE (wave 19, owner item 13 / ruling R3).
+
+There are now TWO kinds of administrator in this product and they must never be confused:
+
+ * a **tenant admin** (`role: 'admin'`) runs ONE company's workspace — its accounts, its
+ keychains, its databases. Nurilab's admin is one; Royal's is one. `core.perms.is_admin`
+ is that wall and it is scoped to the caller's own tenant everywhere it is used.
+ * a **platform admin** operates LOOPABLE ITSELF — the cross-tenant view of who our customers
+ are, what they are running, and what it costs. That is a different question and it needs a
+ different key, because every tenant already has an admin and none of them may see the others.
+
+⛔ THE DOUBLE LOCK, and why it is two conditions and not one (R3, verbatim: "NEW fail-closed
+`platform_admin` server predicate (tenant-scoped `is_admin` does NOT qualify)"):
+
+ record flag `platform_admin is True` AND `tenant == 'loopable'`
+
+Either half alone is a promotion path we do not want to exist. The flag alone would mean a
+tenant admin who can write user records (Y4's `POST /admin/users` is reachable by every tenant
+admin) could mint themselves a cross-tenant reader inside their OWN company. The tenant alone
+would mean every future account in the `loopable` workspace — a designer, a contractor — reads
+every customer's operational data by virtue of their email domain. Requiring both means the
+promotion needs a write to a record AND membership of a tenant that no customer's admin can
+create accounts in.
+
+FAIL-CLOSED IN THE STRICT SENSE: `is True`, not truthiness. A record carrying the string
+"false", a 0, a "yes", or a partially-read dict is NOT a platform admin. The flag is absent on
+every pre-wave record, which is the correct answer for all of them.
+
+⚠ THE FLAG MUST RIDE `users._public()` OR THIS PREDICATE IS BLIND. `deps._user_for` builds every
+API session from that projection, so a field that lives only on the stored record is invisible
+to every route that asks this question — the same rule `core.users` states for `perms`/`perms_v`
+("the wall travels on this projection or it does not travel"), recurring on a new field. Both
+sides land in the same change, and `verify_api.py`'s W19-ADMIN section drives the predicate
+through a real SESSION rather than through a hand-built dict, so a dropped projection is red.
+
+This module deliberately holds NO routes, NO store reads and NO imports of the permission layer:
+it is one question, answerable from the session's own user dict, callable from either host.
+"""
+
+#: The ONE tenant slug a platform administrator may belong to. A constant rather than an env var
+#: on purpose — "which company operates this platform" is not a per-deployment setting, and an
+#: env-var reader here would be one misconfigured container away from admitting another slug.
+PLATFORM_TENANT = 'loopable'
+
+
+def is_platform_admin(user):
+ """True iff `user` is a Loopable platform operator. Fail-closed on anything else.
+
+ `user` is the PUBLIC session projection (`core.users._public`) or a raw record — both carry
+ the same two keys, so the predicate answers identically wherever it is asked. None, {}, a
+ non-dict, a missing flag or a mismatched tenant are all False, and none of them are an error:
+ "not a platform admin" is the answer for almost every session the product will ever serve.
+ """
+ if not isinstance(user, dict):
+ return False
+ if user.get('platform_admin') is not True:
+ return False
+ return str(user.get('tenant') or 'royal-imports').strip().lower() == PLATFORM_TENANT
diff --git a/platform/core/record_comments.py b/platform/core/record_comments.py
new file mode 100644
index 0000000000000000000000000000000000000000..daf13d64c500cf5a6493ce3380298a6784e901d6
--- /dev/null
+++ b/platform/core/record_comments.py
@@ -0,0 +1,182 @@
+"""Durable comments attached to records, ONE BUCKET PER DATABASE.
+
+The service is deliberately unaware of HTTP and of the concrete store backend.
+It receives a tenant-bound ``TenantRuntime`` handle, so the same logical key can
+never cross a tenant boundary. Odoo remains read-only: comments live only in
+AIOS's writable tenant store.
+
+⭐ WAVE 19 (owner item 12) — THE BUCKET IS PER TOPIC. Every entry here is keyed by a bare pid,
+and a pid only identifies a row INSIDE one database: customer pids are Odoo partner ids, product
+pids are CRC32 hashes of SKU codes, a user table's are its own row numbers. One shared bucket
+therefore had two failure modes, and the quiet one is why this changed:
+
+ * loud — a product record asked the customer endpoint about its hash, which is not in the
+ caller's book, and the panel said "that customer is not in your book" on a screen
+ showing a product. This is what the owner reported.
+ * quiet — a hash that lands on a real partner id answers 200, and the comment is filed
+ against somebody's customer, readable by everyone who can open that customer.
+
+``key_for(scope)`` gives each database its own bucket. THE CUSTOMER TOPIC KEEPS THE LEGACY KEY,
+so nothing that has been written moves; ``STORE_KEY`` stays exported under its old name and value
+for the same reason.
+"""
+from __future__ import annotations
+
+import datetime as dt
+import uuid
+
+STORE_KEY = "customer_record_comments"
+MAX_BODY = 4000
+MAX_PER_RECORD = 500
+
+#: The scope names that mean THE CUSTOMER BOOK — mirrors ``modules.cohort.LEGACY_SCOPES``.
+#: Restated rather than imported: ``core/`` does not import ``modules/`` (ARCHITECTURE §1's
+#: one-directional rule), and this file has stayed on the right side of that line.
+LEGACY_SCOPES = frozenset({"", "customer", "cohort"})
+
+
+def key_for(scope=None):
+ """The comments bucket ONE topic's records live in. Customer keeps the shipped key."""
+ s = str(scope or "customer").strip().lower()
+ return STORE_KEY if s in LEGACY_SCOPES else f"{s}_record_comments"
+
+
+class CommentsUnavailable(RuntimeError):
+ """The tenant store cannot currently provide durable comments."""
+
+
+class CommentForbidden(RuntimeError):
+ """The caller tried to remove another user's comment."""
+
+
+def _now_iso():
+ return dt.datetime.now(dt.timezone.utc).replace(microsecond=0).isoformat().replace("+00:00", "Z")
+
+
+def _record_key(pid):
+ return str(int(pid))
+
+
+def _clean_comment(raw):
+ if not isinstance(raw, dict):
+ return None
+ cid = str(raw.get("id") or "").strip()
+ body = str(raw.get("body") or "").strip()
+ author_key = str(raw.get("authorKey") or "").strip().lower()
+ author = str(raw.get("author") or author_key).strip()
+ created_at = str(raw.get("createdAt") or "").strip()
+ if not cid or not body or not author_key or not created_at:
+ return None
+ return {
+ "id": cid,
+ "body": body[:MAX_BODY],
+ "authorKey": author_key,
+ "author": author[:120] or author_key,
+ "createdAt": created_at,
+ }
+
+
+def _read(runtime, scope=None):
+ if not runtime.available():
+ raise CommentsUnavailable("the tenant store is unavailable")
+ try:
+ data = runtime.get(key_for(scope))
+ except Exception as exc:
+ raise CommentsUnavailable("comments could not be read") from exc
+ return data if isinstance(data, dict) else {}
+
+
+def list_comments(runtime, pid, scope=None):
+ """Return one record's comments oldest-first, dropping malformed legacy entries."""
+ rows = _read(runtime, scope).get(_record_key(pid), [])
+ if not isinstance(rows, list):
+ return []
+ cleaned = [comment for raw in rows if (comment := _clean_comment(raw)) is not None]
+ cleaned.sort(key=lambda comment: (comment["createdAt"], comment["id"]))
+ return cleaned
+
+
+def add_comment(runtime, pid, body, author_key, author_name="", now=None, comment_id=None,
+ scope=None):
+ """Append one server-authored comment atomically and synchronously."""
+ text = str(body or "").strip()
+ if not text:
+ raise ValueError("write a comment before posting")
+ if len(text) > MAX_BODY:
+ raise ValueError(f"comments may be at most {MAX_BODY} characters")
+ uname = str(author_key or "").strip().lower()
+ if not uname:
+ raise ValueError("a signed-in author is required")
+ comment = {
+ "id": str(comment_id or uuid.uuid4().hex),
+ "body": text,
+ "authorKey": uname,
+ "author": str(author_name or uname).strip()[:120] or uname,
+ "createdAt": str(now or _now_iso()),
+ }
+ if not runtime.available():
+ raise CommentsUnavailable("the tenant store is unavailable")
+
+ def _append(data):
+ if not isinstance(data, dict):
+ data = {}
+ key = _record_key(pid)
+ rows = data.get(key)
+ if not isinstance(rows, list):
+ rows = []
+ if len(rows) >= MAX_PER_RECORD:
+ raise ValueError(f"a record may hold at most {MAX_PER_RECORD} comments")
+ rows.append(comment)
+ data[key] = rows
+ return data
+
+ try:
+ runtime.update(key_for(scope), _append, flush="sync")
+ except ValueError:
+ raise
+ except Exception as exc:
+ raise CommentsUnavailable("the comment was not saved") from exc
+ return dict(comment)
+
+
+def delete_comment(runtime, pid, comment_id, actor_key, admin=False, scope=None):
+ """Delete a comment owned by ``actor_key`` (or by an administrator)."""
+ cid = str(comment_id or "").strip()
+ actor = str(actor_key or "").strip().lower()
+ if not cid:
+ return False
+ if not runtime.available():
+ raise CommentsUnavailable("the tenant store is unavailable")
+ state = {"found": False, "forbidden": False}
+
+ def _delete(data):
+ if not isinstance(data, dict):
+ return {}
+ key = _record_key(pid)
+ rows = data.get(key)
+ if not isinstance(rows, list):
+ return data
+ kept = []
+ for raw in rows:
+ comment = _clean_comment(raw)
+ if comment is None or comment["id"] != cid:
+ kept.append(raw)
+ continue
+ state["found"] = True
+ if not admin and comment["authorKey"] != actor:
+ state["forbidden"] = True
+ kept.append(raw)
+ if kept:
+ data[key] = kept
+ else:
+ data.pop(key, None)
+ return data
+
+ try:
+ runtime.update(key_for(scope), _delete, flush="sync")
+ except Exception as exc:
+ raise CommentsUnavailable("the comment was not deleted") from exc
+ if state["forbidden"]:
+ raise CommentForbidden("only the author or an administrator may delete this comment")
+ return bool(state["found"])
+
diff --git a/platform/core/registry.py b/platform/core/registry.py
new file mode 100644
index 0000000000000000000000000000000000000000..5a291b417c3b517e80bb6d0087972ff711df89a0
--- /dev/null
+++ b/platform/core/registry.py
@@ -0,0 +1,199 @@
+"""Module registry — the single source of truth for the dashboards.
+
+`app.py` builds the sidebar nav from this, and decides whether the global Brand (DBA) filter
+applies to a page. `validate.py` runs each module's validate() from this. Adding a module =
+add one row here + a page function in app.py + a module in modules/.
+
+Fields:
+ key stable id (matches the modules/.py file and the app page_ function)
+ label sidebar/title text (no emojis)
+ brand True -> DBA-filterable (honours the Fisch/Royal selector)
+ False -> consolidated/company-level (ignores the brand selector)
+ hq True -> HQ / company-level (cash flow, balance sheet, AR/AP, consolidated)
+ validate True -> module exposes validate() and is included in validate.py
+ parent set -> this row is a SUB-MODULE of : it leaves the Workflows dropdown and
+ renders as a sub-nav button when its parent (or a sibling) is the active module; a
+ parent grant covers its sub-modules (owner nav redesign 2026-07-23)
+ archived True -> RETIRED from the UI for EVERYONE (owner 2026-07-27, supersedes the
+ 2026-07-23 per-user-restore semantics): no nav entry, no Settings>Modules checkbox,
+ prewarm and validate.py skip it. Code and data layer stay in the repo but are NOT
+ maintained — spend no effort on archived modules until the owner un-archives.
+ 2026-07-23 pass: backorders, pricecomp, o2c, bookings, spend, expenses.
+ 2026-07-27 pass (keep = Sales + Customers family + Agents + Procurement +
+ Collections + Analyst/plumbing): products, assortment, financial, management,
+ pricing, inventory, vendor, warehouse, returns, outreach, complexity, health.
+ note one-line scope note shown in the UI / docs
+"""
+# WAVE-9 I8 — `'source'`: which connected system a module's data comes from.
+#
+# The owner's model: every nav entry is "a piece of database from a source", so the nav shows the
+# source beside the name ("Sales · Odoo"). It is a REGISTRY FACT rather than a string in the nav
+# code precisely so the nav needs no edit when a second connector lands — a user-created blank
+# table simply carries a different source, and a module with no `source` (Metric Dictionary,
+# Settings, the Analyst) renders no badge because it is not a database at all.
+# See [[connector-onboarding]]: the plug-in seam is datastore.py, and Odoo has no delegated
+# OAuth, so the "+ New" connect flow is the credential-form shape, not an OAuth redirect.
+REGISTRY = [
+ # ARCHIVED wave 16 (owner item 7, R3/R11, 2026-08-02): the PAGE went on the strength of
+ # C-CHARTCAP — every Sales block shape (YoY compare series, KPI delta tiles, group-by
+ # tables) is now assemblable BY HAND from the grid's chart/dashboard views, which is what
+ # R3 required before deletion. `modules/sales.py` (the data layer) STAYS — drawers and the
+ # briefing still read it, and pages_sales.py survives UNREGISTERED as the Y1 envelope's
+ # template + verify_api's fixture.
+ {'key': 'sales', 'label': 'Sales', 'brand': True, 'hq': False, 'validate': True, 'source': 'Odoo', 'archived': True,
+ 'note': 'Revenue, YoY, seasonality, reps, customers, SKUs — by BU. Retired wave 16: '
+ 'rebuild as grid chart/dashboard views (compare series, KPI deltas, tables).'},
+ # ARCHIVED AS A PAGE (owner item 14, wave 8): "archive the current form of the Customer
+ # dashboard completely, i want to redesign it, exactly with the backend we have". So the
+ # PAGE goes and the DATA LAYER stays — modules/customers.py still powers the Customer table's
+ # metrics and still validates against Odoo, which is what the redesign will be built on.
+ #
+ # ⚠ NOT 'archived': True. Archived means invisible to everyone, and this row is the parent of
+ # customer_data + cohort — archiving it would take the whole family out of the nav and strand
+ # its children. 'group_only' says exactly what is true: this key names a FOLDER, never a
+ # destination. It has no PAGE_FUNCS entry, the nav never renders it as a leaf, and a stale
+ # deep link to it redirects to the family's first visible member.
+ {'key': 'customers', 'label': 'Customers', 'brand': True, 'hq': False, 'validate': True,
+ 'group_only': True,
+ 'note': 'Folder for the customer surfaces (Customer table, Cohort). The old Customers '
+ 'dashboard was retired for redesign (owner item 14, 2026-07-28); its metric layer '
+ '(modules/customers.py) still backs the table and still validates against Odoo.'},
+ # LABEL renamed 'Customer List' -> 'Data' (owner 2026-07-25) -> 'Customer' (owner item 5,
+ # 2026-07-27); KEY renamed 'customer_list' -> 'customer_data' (owner 2026-07-26). The key
+ # rename is safe ONLY because _LEGACY_KEYS (ui/session.py) migrates grants, Library prefs
+ # and ?page= deep links ON READ — stored user records are never edited, exactly as
+ # myday->customer_list was done. The STORE keys are deliberately NOT renamed:
+ # 'customer_table_workspace' and 'customer_lists' hold real user data, and renaming them
+ # would orphan every saved view. Label-only changes need none of that machinery.
+ {'key': 'customer_data', 'label': 'Customer', 'brand': True, 'hq': False, 'validate': False, 'source': 'Odoo', 'parent': 'customers',
+ 'note': 'Build, filter and save customer lists: the whole scoped book with per-customer '
+ 'metrics; saved lists are visible, editable formulas (Call list and Win-back ship '
+ 'as templates) plus hand-picked members. Sub-module of Customers (owner nav redesign 2026-07-23; replaced My Day).'},
+ # Cohort (owner item 6, 2026-07-26): the SAME table as Data over a FIXED set. The
+ # difference is membership semantics, not layout — a saved view re-populates as the
+ # data moves, a cohort only changes when a person edits it. validate:False because
+ # there is no Odoo aggregate to reconcile a hand-picked list against; its metrics are
+ # the customers module's, already validated there.
+ # ARCHIVED wave 16 (owner item 5, R10 — the fold-in): every cohort now projects as a
+ # LOCKED VIEW in the Customer rail's "Cohorts" section (wave-15 C-LOCK), so the separate
+ # nav destination is gone. ALL cohort machinery stays: `scope=cohort` still works
+ # (routes_grid._SCOPES, storage keys, events), page_cohort remains in app.py, and
+ # _LEGACY_KEYS maps cohort→customer_data so grants + ?page= deep links land on the grid
+ # that now hosts the cohorts.
+ {'key': 'cohort', 'label': 'Cohort', 'brand': True, 'hq': False, 'validate': False, 'source': 'Odoo', 'parent': 'customers', 'archived': True,
+ 'note': 'Hand-curated, unchanging customer lists — folded into the Customer rail as '
+ 'locked views (wave 16). The set is fixed: it changes only when someone adds '
+ 'or removes a member. Open them from Customer > Views > Cohorts.'},
+ # ARCHIVED wave 16 (owner item 7, R11, 2026-08-02) beside Sales. The agent DRAWER and the
+ # data layer (modules/agent.py, agent_* caches) STAY — agent entities still open from
+ # customer surfaces; an own-book agent login's home is the Customer grid narrowed by the
+ # R1 permanent filter ("Agent is X"), not this page.
+ {'key': 'agent', 'label': 'Agents', 'brand': True, 'hq': False, 'validate': True, 'source': 'Odoo', 'archived': True,
+ 'note': 'Per-agent book: sales (custom dates), returns, top SKUs, full customer list incl. inactive. '
+ 'Retired wave 16: agent drawers + the R1 own-book filter carry the use case.'},
+ # Wave 16 C-TOPIC (owner items 9+10, R4): the PRODUCT table family — the second object on
+ # the table-page factory. `products_family` is the folder head (the `customers` pattern:
+ # group_only, never a destination); `product_data` is the grid over the SKU dataset, with
+ # its OWN workspace bucket ('product_table_workspace') and the /products + scope=product
+ # seams. The archived Streamlit `products` (SKU) row below stays archived and untouched,
+ # exactly as R4 rules.
+ {'key': 'products_family', 'label': 'Products', 'brand': True, 'hq': False, 'validate': False,
+ 'group_only': True,
+ 'note': 'Folder for the product surfaces (Product table). The archived SKU dashboard is '
+ 'not part of this family.'},
+ {'key': 'product_data', 'label': 'Product', 'brand': True, 'hq': False, 'validate': True, 'source': 'Odoo', 'parent': 'products_family',
+ 'note': 'The SKU catalogue as a grid: per-product revenue, units and (consolidated) '
+ 'stock columns, with saved views and custom fields. Identity = the SKU code.'},
+ {'key': 'products', 'label': 'SKU', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'SKU movers, zombies, velocity, coverage, drawers — by BU (sales-derived).'},
+ {'key': 'assortment', 'label': 'Assortment', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Facet-level performance (category/color/occasion/collection/season) + season readiness — by BU.'},
+ {'key': 'financial', 'label': 'Financial', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Gross margin by BU/category/SKU. Cash-conversion cycle is HQ-consolidated.'},
+ {'key': 'pricing', 'label': 'Pricing', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Per-SKU margin/markup/LTM sales + allocated net P&L (channel-rate cost-to-SKU) for pricing decisions.'},
+ {'key': 'management', 'label': 'Management P&L', 'brand': False, 'hq': True, 'validate': True, 'archived': True,
+ 'nav': False, # rendered INSIDE the Financial module (view toggle) — archived WITH financial
+ 'note': 'Operating-model management income statements (FFS/RI/GD/BU-M) reproduced from raw Odoo, Sep-2024+.'},
+ {'key': 'inventory', 'label': 'Inventory', 'brand': False, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'On-hand stock is physically consolidated (shared warehouse); not DBA-split.'},
+ {'key': 'procurement', 'label': 'Procurement', 'brand': False, 'hq': False, 'validate': True, 'source': 'Odoo',
+ 'validate_only': True,
+ 'note': 'PAGE RETIRED 2026-08-03 (owner wave-17 item 13: "We should be able to replace '
+ 'Procurement completely, and add it as part of the Product database"). The buy '
+ 'list is now a saved VIEW on the Product grid, filtered on a FORMULA field over '
+ 'the supplier/lead-time columns and the demand measure — the owner\'s ruling R3: '
+ '"Buy list is just a View, with a Filter from a Formula field that taps into '
+ 'Metrics Fields... the 8-month demand baseline etc. is just math in a Formula '
+ 'field." The ROW STAYS validate_only: `modules/procurement.py` still owns the '
+ 'supplier master map (procurement_suppliers.json, 3,963 SKUs) that seeds those '
+ 'columns, and its validate() is the proof they reconcile.'},
+ {'key': 'vendor', 'label': 'Vendors', 'brand': False, 'hq': False, 'validate': False, 'archived': True,
+ 'note': 'Vendor master data + the SKUs each supplies; multiple-vendor / cheapest-price view.'},
+ {'key': 'warehouse', 'label': 'Warehouse', 'brand': False, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Movement & efficiency: on-time ship, Pick-Pack-Ship cycle times, throughput, backlog age, shrinkage. Physical ops (consolidated).'},
+ {'key': 'ar', 'label': 'Collections', 'brand': False, 'hq': True, 'validate': True,
+ 'source': 'Odoo', 'api_surface': False, 'admin_only': True,
+ 'note': 'PAGE RETIRED 2026-08-03 (owner wave-17 item 15: "Collections should also be '
+ 'entirely replicable as just a View under Customer"). The worklist is the shared '
+ '"Collections" view on the Customer grid — same numbers, from this module\'s own '
+ 'reconciled blocks (ar_open/ar_overdue/ar_exposure/days_to_pay + the four aging '
+ 'buckets). The ROW STAYS validate_only so validate.py keeps running ar.validate(), '
+ 'which is the proof those columns rest on; archiving it would have skipped the '
+ 'reconciliation while the numbers kept shipping. ⚠ NOT `validate_only`, and the '
+ 'difference is a LIVE WORKFLOW: this page also mounts the admin-gated STATEMENTS '
+ 'sender (app._collections_statements -> modules/collections_send), the ONE '
+ 'sanctioned Odoo writer, which the same ruling says stays untouched. So the row '
+ 'keeps a Streamlit page for ADMINS ONLY (`admin_only`) and leaves the API payload '
+ 'entirely (`api_surface: False`) — no "Collections" in the React nav, no second '
+ 'worklist, and the biweekly send keeps its door.'},
+ {'key': 'returns', 'label': 'Returns', 'brand': False, 'hq': True, 'validate': True, 'archived': True,
+ 'note': 'Credit-note lens: refund concentration by SKU (quality) and customer (behavior). Company-level.'},
+ {'key': 'outreach', 'label': 'Outreach', 'brand': True, 'hq': False, 'validate': False, 'archived': True,
+ 'note': 'Campaign emails to customer segments: templates, suppression, send log, revenue attribution. Sending is admin-gated behind SAFE_MODE.'},
+ {'key': 'backorders', 'label': 'Backorders', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Confirmed-undelivered order lines aged vs promise date, valued, with a supply-aware next action per row (ship / expedite / call). Wholesale scope.'},
+ {'key': 'pricecomp', 'label': 'Price Compliance', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Selling below the customer pricelist tier (LTM, per customer x SKU): the pocket-price floor worklist with annualized leak $. Sub-30% ratios usually mean a stale or pack-basis RULE — fix the rule, not the rep.'},
+ {'key': 'o2c', 'label': 'Cash Timing', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Order-to-cash stage decomposition (order-to-ship / ship-to-invoice / invoice-to-paid, each with its owner) + the terms-gap rollup: contractual vs actual days per payment term with the free-credit $ it strands.'},
+ {'key': 'bookings', 'label': 'Order Book', 'brand': True, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'Pre-season booking coverage: cumulative booked $ for Aug-Dec delivery vs last year same-week; category TY-vs-LY-as-of-date. The container-program decision, months ahead.'},
+ {'key': 'spend', 'label': 'Spend & Payables', 'brand': False, 'hq': True, 'validate': True, 'archived': True,
+ 'note': 'Vendor-bill side: payment-terms capture (early-pay cash surrendered), duplicate-bill review, the opex spend cube (fragmentation, consolidate+rebid) and freight recovery. Company-level.'},
+ {'key': 'complexity', 'label': 'SKU Complexity', 'brand': False, 'hq': False, 'validate': True, 'archived': True,
+ 'note': 'BCG tail rationalization: every SKU re-costed by ACTIVITY (lines, picks, returns) + 25%/yr carrying; KILL candidates rest on hard math (GM minus carrying), REVIEW on the pooled activity estimate. All-channel.'},
+ {'key': 'expenses', 'label': 'Expenses', 'brand': False, 'hq': True, 'validate': True, 'archived': True,
+ 'note': 'Operating expense from the GL (all expense-type accounts; COGS excluded): trend, operating leverage (opex % of revenue), the YoY cost bridge, XmR control-limit spike watch list, fixed/variable split and a drill-to-ledger category directory. Company-level.'},
+ {'key': 'health', 'label': 'Data Health', 'brand': False, 'hq': True, 'validate': True, 'archived': True,
+ 'note': 'Close/reconciliation scan; period-filtered, mostly company-level. ARCHITECTURE '
+ '(owner 2026-07-23): every discrepancy / potential-error marker lives here — '
+ 'procurement mapping gaps, count-trust (unverified on-hand counts), untracked-on-'
+ 'order — so operational workflows stay clean for doing the work.'},
+ {'key': 'dictionary', 'label': 'Metric Dictionary', 'brand': False, 'hq': True, 'validate': True,
+ 'nav': False, 'validate_only': True,
+ 'note': 'PAGE RETIRED 2026-07-23 (owner: broken/not customer-facing) — row kept ONLY so '
+ 'validate.py keeps running the semantic-layer contracts (the Analyst grounding '
+ 'proof). No nav, no page. Wave 17 R8 ("I don\'t even know what it does — delete '
+ 'them") made that literal: `validate_only` takes it out of the account menu too, '
+ 'which is the last place it was still visible. The proof survives; the door does not.'},
+ {'key': 'automation', 'label': 'Automation', 'brand': False, 'hq': True, 'validate': False,
+ 'nav': True,
+ 'note': 'Wave 18 (C-AUTONAV): the Automation surface — scheduled jobs that create and '
+ 'refresh user databases (website scrape-to-DB, the Instagram field). React-only '
+ 'surface (no PAGE_FUNCS entry, the no-new-Streamlit rule); admins hold it via '
+ '"all", other users need the explicit grant — fail-closed default.'},
+ {'key': 'settings', 'label': 'Settings', 'brand': False, 'hq': True, 'validate': False,
+ 'nav': False, # sidebar sentinel (account group) — owner IA 2026-07-12
+ 'note': 'User scope settings: the Business Unit toggle (strict isolation) and the Data basis '
+ 'toggle (Orders vs Invoiced) moved here from the sidebar.'},
+ {'key': 'analyst', 'label': 'AIOS Analyst', 'brand': False, 'hq': True, 'validate': False,
+ 'nav': False, # sidebar sentinel button; eval gate = harness/evals.py (run pre-ship, NOT in validate.py — live LLM cost)
+ 'note': 'Ask the business a question in plain language: a small AI model calls governed tools over the semantic layer — answers carry their query trace and drill links. AI-generated output (Art. 50 labeled).'},
+]
+
+BY_KEY = {m['key']: m for m in REGISTRY}
+
+
+def brand_filterable(key) -> bool:
+ return bool(BY_KEY.get(key, {}).get('brand'))
diff --git a/platform/core/store.py b/platform/core/store.py
new file mode 100644
index 0000000000000000000000000000000000000000..889e1d262afe8ef72cae9b69f2c9e2891c7d8c74
--- /dev/null
+++ b/platform/core/store.py
@@ -0,0 +1,369 @@
+"""Tiny JSON persistence on a PRIVATE Hugging Face Dataset repo — the platform's ONLY writable store
+(Odoo stays strictly read-only). Holds the user registry, customer notes and per-user tags.
+
+Auth uses HF_TOKEN (a Space secret / .env value with write access to the royal-imports org). The
+repo is created private on first write. Reads use a short in-process cache that writes refresh, so
+within a running instance reads are consistent with writes; a fresh instance re-fetches the latest.
+
+WAVE 18 (C1-TENANT, R2): the store is now a CLASS, one instance per repo. The module-level
+functions below delegate to the default instance (`OS_DATA_REPO`, tenant #0) — every existing
+`import core.store as store` caller is byte-for-byte unaffected, which the gate battery proves.
+`for_repo(repo_id)` hands back the bound instance for a tenant that owns its OWN dataset repo
+(nurilab, gtmlab, …); `harness.runtime.TenantRuntime` binds it from the tenant record. Each
+instance carries its own cache / dirty-marks / flush workers / commit-gap clock, so one tenant's
+write burst can never starve another's flush window.
+"""
+import io
+import os
+import json
+import threading
+import time as _time
+from pathlib import Path
+
+try:
+ from dotenv import load_dotenv
+ load_dotenv(Path(__file__).resolve().parents[1] / '.env')
+except Exception:
+ pass
+
+from huggingface_hub import HfApi, hf_hub_download
+from huggingface_hub.utils import EntryNotFoundError, RepositoryNotFoundError
+
+REPO = os.environ.get('OS_DATA_REPO', 'royal-imports/cfo-os-data')
+_FLUSH_DELAY = 2.0 # coalesce a burst of edits into one commit
+_FLUSH_MIN_GAP = 20.0 # floor between commits of one key (the 256-commits/hr budget)
+
+
+def _token():
+ return os.environ.get('HF_TOKEN') or None
+
+
+class Store:
+ """One repo's persistence: JSON-per-key + raw byte paths, with the wave-7 async flush.
+
+ Every method body is the pre-wave-18 module function, verbatim except globals→fields.
+ The behaviour contracts that matter are stated on each method and are UNCHANGED:
+ strict-read-guards-the-write, exists()-is-True-on-uncertainty, lenient display reads.
+ """
+
+ def __init__(self, repo):
+ self.repo = str(repo)
+ self._lock = threading.RLock()
+ self._cache = {}
+ # --- async flush state (wave-7 W3, 2026-07-28) ------------------------------------
+ # One typed character in a Notes cell used to cost THREE synchronous network calls
+ # inside the component round-trip. update(..., flush='async') applies the mutation to
+ # the in-process cache synchronously (read-your-writes: every reader consults the
+ # cache first) and a background worker coalesces uploads. The restart-wipe protection
+ # is UNCHANGED where it matters: the FIRST update of a key in a fresh process still
+ # strict-reads. Known, accepted: with a second concurrent writer the stale window
+ # widens from ~one round-trip to ~the flush gap.
+ self._owned = {} # name -> True once cache reflects our own last accepted write
+ self._dirty = {} # name -> cache is ahead of the hub
+ self._flushers = {} # name -> live worker thread
+ self._repo_ok = False # create_repo(exist_ok=True) confirmed once per instance
+ self._last_flush = {} # name -> monotonic time of the last completed upload
+
+ def available(self):
+ """True when a token is configured — callers degrade gracefully without one."""
+ return bool(_token())
+
+ def _download(self, name):
+ """Parse {name}.json into a dict. Returns {} ONLY when the file is genuinely absent.
+ Any other failure (network, auth, rate-limit, corrupt JSON) RAISES — a transient read
+ error must never be mistaken for an empty store, or a caller could overwrite real data
+ with an empty dict (this is what wiped the user registry on restart)."""
+ try:
+ path = hf_hub_download(self.repo, f'{name}.json', repo_type='dataset',
+ token=_token(), force_download=True)
+ with open(path, encoding='utf-8') as f:
+ return json.load(f)
+ except (EntryNotFoundError, RepositoryNotFoundError, FileNotFoundError):
+ return {}
+ except ValueError as e:
+ # Wave 18 (R2, found by SESSION D): current huggingface_hub wraps a missing REPO in
+ # ValueError("Force download failed…") with the 404 as __cause__ — so a brand-new
+ # tenant repo's very first strict read raised here and aborted its very first write.
+ # A genuinely-absent repo is the same fact as a genuinely-absent file: {}.
+ cause = getattr(e, '__cause__', None)
+ if isinstance(cause, (EntryNotFoundError, RepositoryNotFoundError)):
+ return {}
+ raise
+
+ def get(self, name, fresh=False):
+ """Load {name}.json as a dict. LENIENT (for display reads): on a transient fetch error,
+ hand back the last known-good cached value if we have one, else {}. Mutating callers go
+ through update()/_read_strict, which RAISE instead."""
+ with self._lock:
+ if not fresh and name in self._cache:
+ return json.loads(json.dumps(self._cache[name])) # hand back a copy
+ try:
+ data = self._download(name)
+ except Exception as e:
+ try: # lazy import — core stays layer-clean
+ import harness.telemetry as _tel # noqa: PLC0415
+ _tel.error(f'store:get:{name}', e,
+ fallback='cached' if name in self._cache else 'empty')
+ except Exception:
+ pass
+ if name in self._cache:
+ return json.loads(json.dumps(self._cache[name]))
+ return {}
+ self._cache[name] = data
+ return json.loads(json.dumps(data))
+
+ def _read_strict(self, name):
+ """Like get(fresh=True) but RAISES on any transient read error ({} only for a genuinely
+ absent file), so a failed read ABORTS a read-modify-write instead of merging into {}."""
+ with self._lock:
+ data = self._download(name)
+ self._cache[name] = data
+ return json.loads(json.dumps(data))
+
+ def exists(self, name):
+ """True if {name}.json is confirmed present, False if confirmed absent, and True on ANY
+ uncertainty — a seeder must never clobber a registry we merely failed to reach."""
+ try:
+ files = HfApi(token=_token()).list_repo_files(self.repo, repo_type='dataset')
+ return f'{name}.json' in files
+ except RepositoryNotFoundError:
+ return False
+ except Exception:
+ return True
+
+ def _upload(self, name, data):
+ """The raw hub write. create_repo is confirmed ONCE per instance — it was a full extra
+ API round-trip on every put(), pure latency after the first success."""
+ api = HfApi(token=_token())
+ if not self._repo_ok:
+ api.create_repo(self.repo, repo_type='dataset', private=True, exist_ok=True)
+ self._repo_ok = True
+ buf = io.BytesIO(json.dumps(data, ensure_ascii=False, indent=2).encode('utf-8'))
+ api.upload_file(path_or_fileobj=buf, path_in_repo=f'{name}.json', repo_id=self.repo,
+ repo_type='dataset', commit_message=f'update {name}')
+
+ def upload_bytes(self, path_in_repo, data, message=None):
+ """Persist RAW BYTES at an arbitrary path in the tenant dataset (wave-8 C5, documents).
+ Bytes are never cached in-process: large, cold, fetched on explicit user action."""
+ if not self.available():
+ raise RuntimeError('No HF_TOKEN configured — persistence is unavailable.')
+ with self._lock:
+ api = HfApi(token=_token())
+ if not self._repo_ok:
+ api.create_repo(self.repo, repo_type='dataset', private=True, exist_ok=True)
+ self._repo_ok = True
+ api.upload_file(path_or_fileobj=io.BytesIO(data), path_in_repo=path_in_repo,
+ repo_id=self.repo, repo_type='dataset',
+ commit_message=message or f'add {path_in_repo}')
+
+ def download_bytes(self, path_in_repo):
+ """Raw bytes back, or None when absent/unreachable — a missing attachment degrades to
+ "that file is gone", never to a broken page."""
+ if not self.available():
+ return None
+ try:
+ local = hf_hub_download(self.repo, path_in_repo, repo_type='dataset',
+ token=_token())
+ return Path(local).read_bytes()
+ except (EntryNotFoundError, RepositoryNotFoundError):
+ return None
+ except Exception:
+ return None
+
+ def delete_path(self, path_in_repo):
+ """Remove a stored file. Absent is SUCCESS — deleting what is already gone is the goal."""
+ if not self.available():
+ return False
+ try:
+ HfApi(token=_token()).delete_file(path_in_repo=path_in_repo, repo_id=self.repo,
+ repo_type='dataset',
+ commit_message=f'delete {path_in_repo}')
+ return True
+ except (EntryNotFoundError, RepositoryNotFoundError):
+ return True
+ except Exception:
+ return False
+
+ def put(self, name, data):
+ """Persist {name}.json (creates the private repo on first write). Updates the cache."""
+ if not self.available():
+ raise RuntimeError('No HF_TOKEN configured — persistence is unavailable.')
+ with self._lock:
+ self._upload(name, data)
+ self._cache[name] = json.loads(json.dumps(data))
+ self._owned[name] = True
+ self._last_flush[name] = _time.monotonic()
+ return self._cache[name]
+
+ def _flush_worker(self, name):
+ """Coalescing uploader for one key. Runs while dirty; retries with backoff on failure —
+ the cache stays the truth and the dirty mark survives, so nothing is lost silently."""
+ backoff = 2.0
+ while True:
+ _time.sleep(_FLUSH_DELAY)
+ with self._lock:
+ gap = _time.monotonic() - self._last_flush.get(name, 0.0)
+ if gap < _FLUSH_MIN_GAP:
+ wait = _FLUSH_MIN_GAP - gap
+ elif not self._dirty.get(name):
+ self._flushers.pop(name, None)
+ return
+ else:
+ self._dirty[name] = False
+ snapshot = json.loads(json.dumps(self._cache.get(name, {})))
+ wait = None
+ if wait is not None:
+ _time.sleep(wait)
+ continue
+ try:
+ self._upload(name, snapshot)
+ with self._lock:
+ self._last_flush[name] = _time.monotonic()
+ backoff = 2.0
+ except Exception as e:
+ with self._lock:
+ self._dirty[name] = True # keep it queued; cache is still the truth
+ try:
+ import harness.telemetry as _tel # noqa: PLC0415
+ _tel.error(f'store:flush:{name}', e)
+ except Exception:
+ pass
+ _time.sleep(backoff)
+ backoff = min(backoff * 2, 60.0)
+
+ def _schedule_flush(self, name):
+ """Mark dirty + ensure exactly one live worker for the key. Caller holds the lock."""
+ self._dirty[name] = True
+ t = self._flushers.get(name)
+ if t is not None and t.is_alive():
+ return
+ t = threading.Thread(target=self._flush_worker, args=(name,), daemon=True,
+ name=f'store-flush-{self.repo}:{name}')
+ self._flushers[name] = t
+ t.start()
+
+ def flush(self, name=None, timeout=30.0):
+ """Block until pending async writes for `name` (or ALL keys) reach the hub — QA gates
+ and shutdown hooks use this; the app itself never needs to."""
+ deadline = _time.monotonic() + timeout
+ names = [name] if name else None
+ while _time.monotonic() < deadline:
+ with self._lock:
+ pending = {k for k, v in self._dirty.items() if v} | {
+ k for k, t in self._flushers.items() if t.is_alive()}
+ if names is not None:
+ pending &= set(names)
+ if not pending:
+ return True
+ _time.sleep(0.2)
+ return False
+
+ def _flush_now_at_exit(self):
+ """Process-exit safety net: push any dirty keys synchronously, bypassing the coalescing
+ gap — a Space restart must not eat the last seconds of the async window."""
+ with self._lock:
+ dirty = [k for k, v in self._dirty.items() if v]
+ snaps = {k: json.loads(json.dumps(self._cache.get(k, {}))) for k in dirty}
+ for k in dirty:
+ self._dirty[k] = False
+ for k, d in snaps.items():
+ try:
+ self._upload(k, d)
+ except Exception:
+ pass # exiting anyway — nothing left to reschedule
+
+ def update(self, name, fn, flush='sync'):
+ """Read-modify-write. STRICT first read (raises on a transient error rather than
+ starting from an empty dict), apply fn(data)->data, persist.
+
+ flush='sync' (default) = fresh strict read + blocking upload. flush='async' (the
+ table-workspace hot path, wave-7 W3) = the mutation applies to the in-process cache and
+ returns immediately; a coalescing worker commits. The strict read still guards the
+ FIRST async update of a key per process."""
+ with self._lock:
+ if flush == 'async' and self._owned.get(name) and name in self._cache:
+ data = json.loads(json.dumps(self._cache[name]))
+ else:
+ data = self._read_strict(name)
+ result = fn(data)
+ data = result if result is not None else data
+ if flush == 'async':
+ if not self.available():
+ raise RuntimeError('No HF_TOKEN configured — persistence is unavailable.')
+ self._cache[name] = json.loads(json.dumps(data))
+ self._owned[name] = True
+ self._schedule_flush(name)
+ return data
+ self.put(name, data)
+ return data
+
+
+# ------------------------------------------------------------------- instances + module API
+_INSTANCES = {}
+_INSTANCES_LOCK = threading.RLock()
+
+
+def for_repo(repo_id):
+ """The Store bound to `repo_id` — one instance per repo per process (each with its own
+ cache and flush state). The default instance IS `for_repo(REPO)`."""
+ rid = str(repo_id or '').strip() or REPO
+ with _INSTANCES_LOCK:
+ inst = _INSTANCES.get(rid)
+ if inst is None:
+ inst = Store(rid)
+ _INSTANCES[rid] = inst
+ return inst
+
+
+_DEFAULT = for_repo(REPO)
+
+
+def available():
+ return _DEFAULT.available()
+
+
+def get(name, fresh=False):
+ return _DEFAULT.get(name, fresh=fresh)
+
+
+def _read_strict(name):
+ return _DEFAULT._read_strict(name)
+
+
+def exists(name):
+ return _DEFAULT.exists(name)
+
+
+def upload_bytes(path_in_repo, data, message=None):
+ return _DEFAULT.upload_bytes(path_in_repo, data, message=message)
+
+
+def download_bytes(path_in_repo):
+ return _DEFAULT.download_bytes(path_in_repo)
+
+
+def delete_path(path_in_repo):
+ return _DEFAULT.delete_path(path_in_repo)
+
+
+def put(name, data):
+ return _DEFAULT.put(name, data)
+
+
+def flush(name=None, timeout=30.0):
+ return _DEFAULT.flush(name=name, timeout=timeout)
+
+
+def update(name, fn, flush='sync'):
+ return _DEFAULT.update(name, fn, flush=flush)
+
+
+def _flush_all_at_exit():
+ with _INSTANCES_LOCK:
+ instances = list(_INSTANCES.values())
+ for inst in instances:
+ inst._flush_now_at_exit()
+
+
+import atexit # noqa: E402 (registered after the class it needs)
+atexit.register(_flush_all_at_exit)
diff --git a/platform/core/store_backend.py b/platform/core/store_backend.py
new file mode 100644
index 0000000000000000000000000000000000000000..0de29b97c099dc3dd3fe0bf66727937681045ea9
--- /dev/null
+++ b/platform/core/store_backend.py
@@ -0,0 +1,85 @@
+"""core/store_backend.py — which store is active: `STORE_BACKEND=hf|pg` (X4 / EXIT-2b).
+
+ import core.store_backend as store # new code
+ store.get('users') # goes to whichever backend is selected
+
+⛔ WHAT THIS DOES **NOT** DO, stated first because assuming otherwise would be a silent data
+split. Flipping `STORE_BACKEND=pg` does NOT redirect the ~40 existing callers that say
+`import core.store as store` — they are bound to the HF module directly. Rewiring them is task
+**C-4** (the HF→Postgres cutover with its dual-read window), and C-4 cannot start until the
+database exists (owner blocker **B-3**). Until then this selector is the SEAM, exercised by new
+code and by the gate, and the default is `hf`, which is exactly today's behaviour.
+
+Doing it any other way would be worse. The tempting shortcut — have `core/store.py` itself
+delegate — would mean every existing caller silently changes backend the moment an env var is set
+in some shell, with no dual-read window and no way to compare the two stores' contents first.
+"One store" is the goal; getting there through a flag nobody audited would produce two.
+
+THE DEFAULT IS `hf` AND STAYS `hf` until C-4 says otherwise. An unrecognised value is a
+configuration error and RAISES rather than falling back — a typo'd backend name that quietly
+served the old store would be discovered by data going missing.
+"""
+import os
+
+import core.store as _hf
+
+_NAMES = ('available', 'get', 'exists', 'put', 'update', 'upload_bytes', 'download_bytes',
+ 'delete_path', 'flush')
+
+
+def name():
+ """The selected backend name, validated. `hf` unless explicitly told otherwise."""
+ raw = (os.environ.get('STORE_BACKEND') or 'hf').strip().lower()
+ if raw not in ('hf', 'pg'):
+ raise RuntimeError(
+ f"STORE_BACKEND={raw!r} is not a backend. Use 'hf' (the HF Dataset store, the "
+ f"default) or 'pg' (Postgres, needs DATABASE_URL). Refusing to guess: a typo that "
+ f"silently served the other store is how data ends up in two places.")
+ return raw
+
+
+def active():
+ """The backend MODULE. Resolved per call, so a test can flip the env var without a reimport."""
+ if name() == 'pg':
+ import core.store_pg as _pg
+ return _pg
+ return _hf
+
+
+# --- the nine delegates. Written out rather than generated with setattr so that reading this file
+# tells you the whole interface, and so a new store operation cannot be added to core/store.py
+# without something here failing to match (verify_store_pg.py compares the signatures).
+def available():
+ return active().available()
+
+
+def get(name_, fresh=False):
+ return active().get(name_, fresh=fresh)
+
+
+def exists(name_):
+ return active().exists(name_)
+
+
+def put(name_, data):
+ return active().put(name_, data)
+
+
+def update(name_, fn, flush='sync'):
+ return active().update(name_, fn, flush=flush)
+
+
+def upload_bytes(path_in_repo, data, message=None):
+ return active().upload_bytes(path_in_repo, data, message=message)
+
+
+def download_bytes(path_in_repo):
+ return active().download_bytes(path_in_repo)
+
+
+def delete_path(path_in_repo):
+ return active().delete_path(path_in_repo)
+
+
+def flush(name_=None, timeout=30.0):
+ return active().flush(name_, timeout=timeout)
diff --git a/platform/core/store_pg.py b/platform/core/store_pg.py
new file mode 100644
index 0000000000000000000000000000000000000000..aedf46812814320003275107f1987ea3408277cc
--- /dev/null
+++ b/platform/core/store_pg.py
@@ -0,0 +1,251 @@
+"""core/store_pg.py — `core/store.py`'s interface, backed by Postgres (X4 / EXIT-2b, 2026-07-30).
+
+THE INTERFACE IS THE CONTRACT, and it is `core/store.py`'s nine functions:
+
+ available() · get(name, fresh=False) · exists(name) · put(name, data)
+ update(name, fn, flush='sync') · upload_bytes(path, data, message=None)
+ download_bytes(path) · delete_path(path) · flush(name=None, timeout=30.0)
+
+Same names, same signatures, same return types, same failure semantics — so switching backends is
+an env var (`STORE_BACKEND=hf|pg`) and not a rewrite of every caller. `core/store_backend.py`
+does the selection; nothing above it needs to know which store it is talking to.
+
+✅ VERIFIED against a real managed Postgres 2026-08-04 (W19: Neon us-east-2; `verify_store_pg.py`
+80/80 INCLUDING the integration half — schema apply, tenant provisioning, jsonb/bytea round-trips,
+80 concurrent FOR-UPDATE writes — run from HF egress; the owner's local network resets TLS:5432).
+The CUTOVER remains parked behind C1e's triggers and this module is not the default backend.
+Without `DATABASE_URL` the gate still SKIPS its integration half LOUDLY, never silently.
+The schema is `harness/pg/schema.sql`. Sequenced around the blocker, never stubbed past it.
+
+WHAT POSTGRES FIXES, precisely (C1c — these are the reasons, not a preference):
+ * **`get()` is cache-first on the HF store**, so a write from another process is invisible to a
+ running app until restart. Observed live in wave 11. Here a read is a SELECT: cross-process
+ coherence is the default rather than a thing to remember.
+ * **`update()` was read-modify-write with no concurrency control** — two writers raced and the
+ loser vanished silently. Here it runs inside ONE transaction with `SELECT … FOR UPDATE`, so
+ the second writer waits and then sees the first writer's value.
+ * **A write was an HTTP commit** against a 256-commits/hour repo budget, which is why the hot
+ path needed a coalescing async flusher at all. A Postgres write is a write; `flush='async'`
+ stays in the signature and becomes a no-op, because there is nothing to coalesce.
+
+⚠ ONE DELIBERATE DIFFERENCE FROM THE HF BACKEND, and it is a fix. `store.get()` swallows transient
+read failures and hands back a cached-or-empty dict, because a display read must not break a page.
+That leniency is exactly what wiped the user registry once (an empty read merged into a write), and
+`_read_strict` exists to opt out of it. Postgres has no equivalent "the network blipped" state
+worth hiding: a connection failure RAISES from `get()` here. Callers that must not break on a read
+should catch it — silently returning `{}` from a database that is simply unreachable is how an
+empty dict gets written back over real data.
+"""
+import json
+import os
+import threading
+
+_URL_ENV = 'DATABASE_URL'
+_LOCK = threading.RLock()
+_POOL = {'pool': None, 'url': None, 'schema': None}
+
+
+def _url():
+ return os.environ.get(_URL_ENV) or None
+
+
+def _schema_for(tenant_slug=None):
+ """`t_` with `-` normalised to `_` (a hyphen is not legal in an unquoted identifier).
+
+ Mirrors `control.provision_tenant_schema` exactly — the two MUST agree or a write lands in a
+ schema the DDL never created. `AIOS_TENANT` names the tenant this process serves; it defaults
+ to tenant #0 so the default behaviour is unchanged, the same rule `harness.datastore.path_for`
+ follows for the DuckDB filename.
+ """
+ slug = (tenant_slug or os.environ.get('AIOS_TENANT') or 'royal-imports').strip().lower()
+ return 't_' + slug.replace('-', '_')
+
+
+def _pool():
+ """The psycopg connection pool, opened once per process.
+
+ psycopg is imported LAZILY and only here: `STORE_BACKEND=hf` must not require the dependency
+ to be installed at all, which is what keeps this file safe to commit before B-3 unblocks.
+ """
+ with _LOCK:
+ url = _url()
+ if not url:
+ raise RuntimeError(
+ f'{_URL_ENV} is not set — the Postgres store backend has nothing to connect to.')
+ if _POOL['pool'] is not None and _POOL['url'] == url:
+ return _POOL['pool']
+ try:
+ from psycopg_pool import ConnectionPool
+ except ImportError as e: # pragma: no cover - depends on B-3
+ raise RuntimeError(
+ 'STORE_BACKEND=pg needs psycopg[binary,pool]. It is deliberately NOT in '
+ 'requirements.txt until the database exists (owner blocker B-3), so that the '
+ 'default hf backend installs nothing it does not use.') from e
+ if _POOL['pool'] is not None:
+ try:
+ _POOL['pool'].close()
+ except Exception:
+ pass
+ # min_size=0 so a process that never touches the store opens no connection at all — the
+ # shared API serves plenty of requests (health, static, a cached payload) that never read.
+ _POOL['pool'] = ConnectionPool(url, min_size=0, max_size=8, open=True, timeout=10.0)
+ _POOL['url'] = url
+ return _POOL['pool']
+
+
+def available():
+ """True when a connection can actually be MADE, not merely when a URL is configured.
+
+ `core.store.available()` only checks for a token, which is all it can cheaply do. Here the
+ honest answer needs a round-trip, so the result is memoised per process: callers use this to
+ decide whether to degrade the UI, and a `SELECT 1` per render would be absurd.
+ """
+ if not _url():
+ return False
+ if _POOL.get('ok'):
+ return True
+ try:
+ with _pool().connection() as con:
+ con.execute('SELECT 1')
+ _POOL['ok'] = True
+ return True
+ except Exception:
+ return False
+
+
+def _table(kind, tenant_slug=None):
+ """`"t_slug"."store_kv"` — the qualified table, safely quoted."""
+ from psycopg import sql
+ return sql.SQL('{}.{}').format(sql.Identifier(_schema_for(tenant_slug)),
+ sql.Identifier(kind))
+
+
+def _q(template, kind, tenant_slug=None):
+ """Compose `template` with `{tbl}` = the QUALIFIED table and `{bare}` = the table name alone.
+
+ ⚠ THE TWO ARE NOT INTERCHANGEABLE, and getting it wrong is a runtime syntax error nothing
+ local would catch (no database here — owner blocker B-3). Inside `ON CONFLICT … DO UPDATE`,
+ Postgres refers to the conflicting row by the table's ALIAS, which defaults to the bare
+ table name: `store_kv.rev` is valid, `t_royal_imports.store_kv.rev` is not. So the FROM
+ position takes `{tbl}` and the DO-UPDATE position takes `{bare}`.
+
+ Identifiers go through `psycopg.sql.Identifier`, so the schema name — derived from a tenant
+ slug — cannot be an injection vector even though it is interpolated. The slug is ALSO
+ regex-constrained at its source (`control.tenants`), which is the belt to this brace.
+ """
+ from psycopg import sql
+ return sql.SQL(template).format(tbl=_table(kind, tenant_slug),
+ bare=sql.Identifier(kind))
+
+
+def get(name, fresh=False, tenant_slug=None):
+ """The value stored under `name`, or `{}` when the key is genuinely absent.
+
+ `fresh` is accepted and IGNORED: it exists in the HF signature to bypass a process cache, and
+ there is no cache here — every read is a SELECT. Keeping the parameter means callers do not
+ branch on the backend.
+ """
+ with _pool().connection() as con:
+ row = con.execute(
+ _q('SELECT value FROM {tbl} WHERE key = %s', 'store_kv', tenant_slug),
+ (str(name),)).fetchone()
+ return dict(row[0]) if row and isinstance(row[0], dict) else (row[0] if row else {})
+
+
+def exists(name, tenant_slug=None):
+ """True/False — and unlike the HF backend this is NEVER "True on uncertainty".
+
+ `core.store.exists` returns True on any error so a caller that would seed the store cannot
+ clobber a registry it merely failed to reach. That guard exists because a FILE HOST cannot
+ distinguish "absent" from "unreachable". Postgres can: an absent row is a fact, and an
+ unreachable server raises instead of answering.
+ """
+ with _pool().connection() as con:
+ row = con.execute(
+ _q('SELECT 1 FROM {tbl} WHERE key = %s', 'store_kv', tenant_slug),
+ (str(name),)).fetchone()
+ return row is not None
+
+
+def put(name, data, tenant_slug=None):
+ with _pool().connection() as con:
+ con.execute(
+ _q('INSERT INTO {tbl} (key, value) VALUES (%s, %s::jsonb) '
+ 'ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value, '
+ 'updated_at = now(), rev = {bare}.rev + 1', 'store_kv', tenant_slug),
+ (str(name), json.dumps(data)))
+ return data
+
+
+def update(name, fn, flush='sync', tenant_slug=None):
+ """Read-modify-write inside ONE transaction, with the row LOCKED for the duration.
+
+ This is the operation the HF backend could not make safe. There, `update` read over HTTP,
+ applied `fn`, and uploaded — so two concurrent writers both read the old value and the second
+ upload silently discarded the first writer's change. `SELECT … FOR UPDATE` makes the second
+ writer WAIT and then apply `fn` to the first writer's result, which is what "read-modify-write"
+ was always supposed to mean.
+
+ `flush` is accepted and ignored (see the module docstring): there is no commit budget to
+ coalesce against, so 'async' has nothing to defer.
+ """
+ with _pool().connection() as con:
+ with con.transaction():
+ row = con.execute(
+ _q('SELECT value FROM {tbl} WHERE key = %s FOR UPDATE',
+ 'store_kv', tenant_slug),
+ (str(name),)).fetchone()
+ data = dict(row[0]) if row and isinstance(row[0], dict) else (row[0] if row else {})
+ result = fn(data)
+ data = result if result is not None else data
+ con.execute(
+ _q('INSERT INTO {tbl} (key, value) VALUES (%s, %s::jsonb) '
+ 'ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value, '
+ 'updated_at = now(), rev = {bare}.rev + 1', 'store_kv', tenant_slug),
+ (str(name), json.dumps(data)))
+ return data
+
+
+def upload_bytes(path_in_repo, data, message=None, tenant_slug=None):
+ with _pool().connection() as con:
+ con.execute(
+ _q('INSERT INTO {tbl} (path, bytes, message) VALUES (%s, %s, %s) '
+ 'ON CONFLICT (path) DO UPDATE SET bytes = EXCLUDED.bytes, '
+ 'message = EXCLUDED.message, updated_at = now()', 'store_blobs', tenant_slug),
+ (str(path_in_repo), bytes(data), message))
+
+
+def download_bytes(path_in_repo, tenant_slug=None):
+ """Raw bytes, or None when absent — the same contract as the HF backend: a missing attachment
+ degrades to "that file is gone", never to a broken page."""
+ with _pool().connection() as con:
+ row = con.execute(
+ _q('SELECT bytes FROM {tbl} WHERE path = %s', 'store_blobs', tenant_slug),
+ (str(path_in_repo),)).fetchone()
+ return bytes(row[0]) if row else None
+
+
+def delete_path(path_in_repo, tenant_slug=None):
+ """Absent is SUCCESS — deleting what is already gone is the goal (HF backend's contract)."""
+ with _pool().connection() as con:
+ con.execute(_q('DELETE FROM {tbl} WHERE path = %s', 'store_blobs', tenant_slug),
+ (str(path_in_repo),))
+ return True
+
+
+def flush(name=None, timeout=30.0):
+ """A no-op that returns True: every write above is already committed when it returns. Kept in
+ the interface because QA gates and shutdown hooks call it and must not branch on the backend."""
+ return True
+
+
+def close():
+ """Release the pool (tests, and a process that is shutting down cleanly)."""
+ with _LOCK:
+ if _POOL['pool'] is not None:
+ try:
+ _POOL['pool'].close()
+ finally:
+ _POOL['pool'] = None
+ _POOL['url'] = None
+ _POOL.pop('ok', None)
diff --git a/platform/core/table_store.py b/platform/core/table_store.py
new file mode 100644
index 0000000000000000000000000000000000000000..99c5467f4ddf8af7a01a66082c4f9860b6db826d
--- /dev/null
+++ b/platform/core/table_store.py
@@ -0,0 +1,479 @@
+"""The generic per-user TABLE WORKSPACE store — the persistence half of the table-page factory.
+
+One durable store key holds one table OBJECT's per-user Airtable-style state:
+
+ {username: {'views': {view_id: SavedView},
+ 'fields': {field_key: Field}, # notes + custom_ + measure_ strata
+ 'overlays': {str(pid): {field_key: value}}}}
+
+`make(table_key)` returns the six operations a table page's host loop needs, closed over that
+key. The Customer table's ops (`modules/customer_data.py`, key 'customer_table_workspace') are
+these exact functions — the logic MOVED here 2026-07-27 so that duplicating the Customer table
+pattern to a new object is a registry row + a config, not a copy of the store plumbing
+(owner directive: the table-page factory).
+
+A LIST (membership/formula semantics) is deliberately a different store from a VIEW
+(presentation/query state) — see modules/customer_data.py's customer_lists key.
+"""
+import core.store as store
+
+#: Wave-9 I17 — the SHARED bucket. Views whose permissions make them visible to anyone but
+#: their creator live here instead of in a personal workspace, under a key that cannot collide
+#: with a username (usernames come from core/users.py and are never dunder-wrapped; `is_shared`
+#: guards it anyway). ONE HOME PER VIEW, never both: a view moved to personal is REMOVED from
+#: here, and a view shared is removed from its creator's workspace. Two homes would mean two
+#: divergent copies the moment either was edited.
+SHARED_KEY = '__shared__'
+
+
+def _may_see(view, viewer, is_admin=False):
+ """Visibility for ONE shared view, fail-closed.
+
+ 'collaborative' = everyone who can already open the module (the caller has gated that).
+ 'users' = the named users, plus the creator, plus admins — an admin who could not
+ see a view could not administer it either.
+ Anything unrecognised returns False rather than defaulting open: an unreadable permission
+ must never widen access ([[aios-permissioning]] — no fail-open defaults).
+ """
+ if not isinstance(view, dict):
+ return False
+ if view.get('createdBy') == viewer or is_admin:
+ return True
+ perms = view.get('permissions') or {}
+ edit = perms.get('edit')
+ if edit == 'collaborative':
+ return True
+ if edit == 'users':
+ return viewer in set(perms.get('users') or ())
+ return False # 'personal', absent, or junk
+
+
+def _may_edit(view, viewer, is_admin=False):
+ """Who may WRITE a shared view. Same set as visibility today — the owner's item asks 'who
+ can edit' and lists who 'can have access', i.e. seeing and editing are one grant. Kept as a
+ separate function so they can diverge (a future read-only share) without hunting callers."""
+ return _may_see(view, viewer, is_admin)
+
+
+def _may_administer(view, viewer, is_admin=False):
+ """Who may change a view's PERMISSIONS, or delete it: the creator or an admin ONLY.
+
+ Deliberately narrower than _may_edit. If a collaborator could rewrite `permissions` they
+ could grant themselves sole ownership of somebody else's view, or quietly widen a
+ users-scoped view to everyone — the classic privilege-escalation-by-edit hole.
+ """
+ if not isinstance(view, dict):
+ return False
+ return bool(is_admin) or view.get('createdBy') == viewer
+
+
+def is_shared(view):
+ """A view belongs in the shared bucket when its permissions reach beyond its creator."""
+ return ((view or {}).get('permissions') or {}).get('edit') in ('collaborative', 'users')
+
+
+def _unique_name(wanted, existing, *, fallback='Untitled', max_len=120):
+ """Allocate one human-facing name inside a store.update transaction.
+
+ Keys/ids remain structural identity. Names compare case-insensitively after collapsing
+ whitespace, because those variants are indistinguishable in the UI. This helper belongs
+ in the store layer: allocating from a pre-write snapshot lets two concurrent requests both
+ choose the same free name before either write lands.
+ """
+ limit = max(1, int(max_len))
+
+ def _clean(value):
+ return ' '.join(str(value or '').split())
+
+ base = (_clean(wanted) or _clean(fallback) or 'Untitled')[:limit].rstrip()
+ taken = {_clean(value).casefold() for value in existing if _clean(value)}
+ if base.casefold() not in taken:
+ return base
+ index = 2
+ while True:
+ suffix = f' {index}'
+ stem = base[:max(0, limit - len(suffix))].rstrip()
+ candidate = f'{stem}{suffix}' if stem else str(index)[-limit:]
+ if candidate.casefold() not in taken:
+ return candidate
+ index += 1
+
+
+class TableStore:
+ """The six store operations for one table object's workspace, closed over its store key.
+
+ `st` (wave 18, C3-UT) is the STORE HANDLE — anything exposing `get(name)` /
+ `update(name, fn, flush=)`. Default = `core.store` (tenant #0, every existing caller,
+ zero behaviour change). The API passes the session's `TenantRuntime`, whose accessors
+ apply the tenant prefix / repo binding — which is what makes a user table created by a
+ Nurilab admin land in Nurilab's store instead of Royal's.
+ """
+
+ def __init__(self, table_key, st=None):
+ self.table_key = table_key
+ self._st = st if st is not None else store
+
+ # ---------------------------------------------------------------- read
+ def workspace(self, username, consume_corrections=True):
+ """One user's durable workspace: always the full three-strata shape."""
+ try:
+ data = self._st.get(self.table_key) or {}
+ ws = data.get(username, {}) or {}
+ # A collision acknowledgement is protocol state, not part of a field definition.
+ # Consume it with the first fresh workspace payload after the correcting write,
+ # then splice a bounded copy into that payload only. Keeping it out of `fields`
+ # prevents an old request id surviving forever and overriding a later rename.
+ corrections = {}
+ if consume_corrections and ws.get('fieldCorrections'):
+ def _take(current):
+ current_ws = current.get(username) or {}
+ pending = current_ws.get('fieldCorrections') or {}
+ corrections.update({
+ str(key)[:80]: dict(value)
+ for key, value in pending.items()
+ if isinstance(value, dict)
+ })
+ current_ws.pop('fieldCorrections', None)
+ return current
+
+ data = self._st.update(self.table_key, _take, flush='async')
+ ws = (data or {}).get(username, {}) or {}
+ except Exception:
+ ws = {}
+ corrections = {}
+ fields = {
+ key: dict(value) if isinstance(value, dict) else value
+ for key, value in (ws.get('fields') or {}).items()
+ }
+ for key, ack in corrections.items():
+ field = fields.get(key)
+ accepted_label = str(ack.get('label') or '')[:120]
+ requested_label = str(ack.get('labelCorrectedFrom') or '')[:120]
+ correction_id = str(ack.get('labelCorrectionId') or '')[:180]
+ # A newer field write clears/replaces the pending ack in the SAME transaction.
+ # The label check is an extra belt against ever attaching a stale ack to a newer
+ # definition if a future store implementation weakens that ordering.
+ if (isinstance(field, dict) and accepted_label
+ and str(field.get('label') or '') == accepted_label
+ and requested_label and correction_id):
+ field['labelCorrectedFrom'] = requested_label
+ field['labelCorrectionId'] = correction_id
+ out = {
+ 'views': dict(ws.get('views') or {}),
+ 'fields': fields,
+ 'overlays': dict(ws.get('overlays') or {}),
+ # wave-8 I11 (C4): folders over the saved views / cohorts sidebars. A FOURTH
+ # stratum rather than a key on each item — see aios_grid.clean_folders for why
+ # (a cohort lives in another store, and filing is an organising act, not part of
+ # what a view is). Absent for every workspace saved before this wave, which is
+ # exactly "no folders yet".
+ 'folders': dict(ws.get('folders') or {}),
+ 'itemFolders': dict(ws.get('itemFolders') or {}),
+ }
+ # 2026-07-31 (owner item 3): WHERE THE USER LEFT OFF survives a new browser. The
+ # client's localStorage copy wins when present; this is the server's answer for a
+ # fresh profile, which used to fall all the way to the system default view.
+ if ws.get('activeViewId'):
+ out['activeViewId'] = str(ws['activeViewId'])
+ # Wave 2026-08-02 (C-LAYOUT): the per-user record-detail field order. A fifth
+ # stratum, absent until the user first reorders — exactly "default order".
+ if isinstance(ws.get('recordLayout'), dict):
+ out['recordLayout'] = dict(ws['recordLayout'])
+ return out
+
+ # ---------------------------------------------------------------- write
+ def _update(self, username, change):
+ def _up(data):
+ ws = data.setdefault(username, {})
+ ws.setdefault('views', {})
+ ws.setdefault('fields', {})
+ ws.setdefault('overlays', {})
+ ws.setdefault('folders', {})
+ ws.setdefault('itemFolders', {})
+ change(ws)
+ return data
+ # flush='async' (wave-7 W3): this is THE hot path — every autosaved filter tweak,
+ # column note and typed overlay cell lands here inside the component round-trip, and
+ # the historical synchronous hub commit cost seconds per edit. The mutation applies to
+ # the in-process cache (read-your-writes for every subsequent render); the hub write
+ # coalesces in the background. Registry/auth writes elsewhere stay flush='sync'.
+ return self._st.update(self.table_key, _up, flush='async')
+
+ def save_active_view(self, username, view_id):
+ """Remember which view this user last opened (owner item 3, 2026-07-31).
+
+ Presentation state, not authorisation: the READ side re-validates the id against what
+ the caller may actually see, so a stale or foreign id degrades to the default view
+ rather than granting anything. Stored per user like every other stratum.
+ """
+ vid = str(view_id or '').strip()[:120]
+ if not vid or username == SHARED_KEY:
+ return
+
+ def _set(ws):
+ ws['activeViewId'] = vid
+ self._update(username, _set)
+
+ def save_record_layout(self, username, order):
+ """The per-user RECORD-DETAIL field order (wave 2026-08-02, C-LAYOUT).
+
+ Presentation state for ONE surface — the record modal. Deliberately not view config:
+ the owner's ask is per-user, not per-view, and it must never reorder grid columns.
+ The event handler validated keys against the live field set; the wire re-validates at
+ serve time (aios_grid.workspace_wire), so a deleted field cannot outlive itself here.
+ An empty order clears the stratum back to "default order".
+ """
+ if username == SHARED_KEY:
+ return
+ clean, seen = [], set()
+ for key in (order or [])[:200]:
+ key = str(key or '').strip()[:80]
+ if key and key not in seen:
+ seen.add(key)
+ clean.append(key)
+
+ def _set(ws):
+ if clean:
+ ws['recordLayout'] = {'order': clean}
+ else:
+ ws.pop('recordLayout', None)
+
+ self._update(username, _set)
+
+ def save_folders(self, username, folders, item_folders):
+ """Replace the folder stratum wholesale (wave-8 I11).
+
+ Wholesale rather than per-folder because the caller has ALREADY validated the complete
+ picture through aios_grid.clean_folders / clean_item_folders, and those two are
+ interdependent: a placement is only legal while its folder exists, so committing them
+ separately would leave a window where a reader sees an item filed into a folder that is
+ not there yet. One write, one consistent state.
+ """
+ def _set(ws):
+ ws['folders'] = dict(folders or {})
+ ws['itemFolders'] = dict(item_folders or {})
+ self._update(username, _set)
+
+ def shared_views(self, viewer, is_admin=False):
+ """Every SHARED view this viewer may see, by id (wave-9 I17).
+
+ Read-only and independent of the viewer's own workspace: the caller merges. Returns
+ only what `_may_see` allows, so a caller cannot accidentally render somebody else's
+ personal view by forgetting to filter.
+ """
+ try:
+ bucket = ((self._st.get(self.table_key) or {}).get(SHARED_KEY) or {}).get('views') or {}
+ except Exception:
+ return {}
+ return {vid: dict(v) for vid, v in bucket.items()
+ if _may_see(v, viewer, is_admin)}
+
+ def shared_view(self, view_id):
+ """One shared view RAW — no visibility filter. For authorisation decisions only: a
+ caller must know a view exists and who owns it before it can decide whether the actor
+ may touch it. Never hand the result to a renderer without checking `_may_see`."""
+ try:
+ return ((self._st.get(self.table_key) or {}).get(SHARED_KEY) or {}
+ ).get('views', {}).get(str(view_id))
+ except Exception:
+ return None
+
+ def save_view(self, username, view, shared=None, reserved_names=(), is_admin=False):
+ """Upsert a SavedView into its ONE home — personal workspace or the shared bucket.
+
+ `shared` defaults to reading the view's own permissions (`is_shared`). Whichever home
+ it lands in, the view is REMOVED from the other, so a view can never exist as two
+ copies that diverge on the next edit.
+
+ ⚠ AUTHORISATION IS THE CALLER'S JOB and must happen BEFORE this is called — this layer
+ moves data and does not know who is asking. `_cl_handle_one` is the wall.
+ """
+ view_id = str((view or {}).get('id') or '').strip()
+ if not view_id:
+ raise ValueError('view id is required')
+ if username == SHARED_KEY:
+ raise ValueError('reserved username')
+ to_shared = is_shared(view) if shared is None else bool(shared)
+ requested = dict(view)
+ accepted = {}
+
+ def _up(data):
+ # View names are tenant-global: every personal workspace plus the shared bucket.
+ # This deliberately includes views the actor cannot see. The only disclosed fact
+ # is that a display name is already taken, while the categorical "no duplicate
+ # view names" contract remains true when a personal view is later shared.
+ names = list(reserved_names or ())
+ for workspace in data.values():
+ if not isinstance(workspace, dict):
+ continue
+ names.extend(
+ value.get('name')
+ for candidate_id, value in (workspace.get('views') or {}).items()
+ if candidate_id != view_id and isinstance(value, dict)
+ )
+ payload = dict(requested)
+ payload['name'] = _unique_name(payload.get('name'), names)
+ accepted.clear()
+ accepted.update(payload)
+ if to_shared:
+ bucket = data.setdefault(SHARED_KEY, {})
+ bucket.setdefault('views', {})[view_id] = payload
+ # it may have lived in the creator's workspace before being shared
+ owner = data.get(payload.get('createdBy') or username) or {}
+ (owner.get('views') or {}).pop(view_id, None)
+ else:
+ ws = data.setdefault(username, {})
+ ws.setdefault('views', {})[view_id] = payload
+ (data.get(SHARED_KEY, {}).get('views') or {}).pop(view_id, None)
+ return data
+
+ self._st.update(self.table_key, _up, flush='async')
+ return dict(accepted)
+
+ def delete_view(self, username, view_id):
+ """Delete a custom/list view override. The system all-rows view is guarded by caller.
+
+ Removes from BOTH homes: the caller has already authorised the delete, and leaving a
+ stale copy in the other bucket would resurrect the view on the next read.
+ """
+ vid = str(view_id)
+
+ def _up(data):
+ (data.get(username, {}).get('views') or {}).pop(vid, None)
+ (data.get(SHARED_KEY, {}).get('views') or {}).pop(vid, None)
+ return data
+
+ self._st.update(self.table_key, _up, flush='async')
+
+ def save_field(self, username, field, reserved_names=(), correction_id=None):
+ """Persist a column note or a user-created (custom_/measure_) field definition."""
+ key = str((field or {}).get('key') or '').strip()
+ if not key:
+ raise ValueError('field key is required')
+ requested = dict(field)
+ accepted = {}
+
+ def _save(ws):
+ names = list(reserved_names or ())
+ names.extend(
+ value.get('label')
+ for candidate_key, value in (ws.get('fields') or {}).items()
+ if candidate_key != key and isinstance(value, dict)
+ )
+ payload = dict(requested)
+ payload.pop('labelCorrectedFrom', None)
+ payload.pop('labelCorrectionId', None)
+ requested_label = ' '.join(
+ str(payload.get('label') or 'Untitled').split())[:120].rstrip()
+ payload['label'] = _unique_name(requested_label, names)
+ corrections = ws.setdefault('fieldCorrections', {})
+ corrections.pop(key, None)
+ if payload['label'] != requested_label and correction_id:
+ corrections[key] = {
+ 'label': payload['label'],
+ 'labelCorrectedFrom': requested_label,
+ 'labelCorrectionId': str(correction_id)[:180],
+ }
+ if not corrections:
+ ws.pop('fieldCorrections', None)
+ accepted.clear()
+ accepted.update(payload)
+ # A cleared note on an immutable source field returns to the canonical schema
+ # instead of leaving a meaningless override row. Custom fields remain even with
+ # an empty note — and so does a PRESET field carrying a measure-window override
+ # (wave-2 item 8) or a DISPLAY-format override (wave-5 item 10): the note may be
+ # empty but the period/format is real user state.
+ if (not payload.get('custom') and not str(payload.get('note') or '').strip()
+ and not isinstance(payload.get('measure'), dict)
+ and not isinstance(payload.get('format'), dict)):
+ ws['fields'].pop(key, None)
+ else:
+ ws['fields'][key] = payload
+
+ self._update(username, _save)
+ return dict(accepted)
+
+ def duplicate_field(self, username, source_key, new_key, field,
+ reserved_names=(), correction_id=None):
+ """Clone a user-created field in ONE store transaction (wave-5 item 1): the new
+ definition plus — for `custom_` overlay sources only — every stored cell value under
+ the source key. One transaction, because a def without its values (or values without a
+ def) is exactly the orphan state delete_field exists to prevent, in reverse.
+ The caller validated both keys (same created stratum) and stamped the clone's
+ createdBy; this layer only moves data."""
+ source_key = str(source_key or '').strip()
+ new_key = str(new_key or '').strip()
+ if not source_key or not new_key or source_key == new_key:
+ raise ValueError('duplicate_field needs two distinct keys')
+ requested = dict(field)
+ accepted = {}
+
+ def _dup(ws):
+ names = list(reserved_names or ())
+ names.extend(
+ value.get('label')
+ for candidate_key, value in (ws.get('fields') or {}).items()
+ if candidate_key != new_key and isinstance(value, dict)
+ )
+ payload = dict(requested)
+ payload.pop('labelCorrectedFrom', None)
+ payload.pop('labelCorrectionId', None)
+ requested_label = ' '.join(
+ str(payload.get('label') or 'Untitled').split())[:120].rstrip()
+ payload['label'] = _unique_name(requested_label, names)
+ corrections = ws.setdefault('fieldCorrections', {})
+ corrections.pop(new_key, None)
+ if payload['label'] != requested_label and correction_id:
+ corrections[new_key] = {
+ 'label': payload['label'],
+ 'labelCorrectedFrom': requested_label,
+ 'labelCorrectionId': str(correction_id)[:180],
+ }
+ if not corrections:
+ ws.pop('fieldCorrections', None)
+ accepted.clear()
+ accepted.update(payload)
+ ws['fields'][new_key] = payload
+ if source_key.startswith('custom_'):
+ for row in ws['overlays'].values():
+ if isinstance(row, dict) and source_key in row:
+ row[new_key] = row[source_key]
+
+ self._update(username, _dup)
+ return dict(accepted)
+
+ def delete_field(self, username, key):
+ """Delete a USER-CREATED field definition outright (owner gap closed 2026-07-27).
+
+ Only the created strata ever reach here (`custom_` overlay fields, `measure_` formula
+ columns — the caller enforces the prefix). The stored overlay VALUES for the key are
+ scrubbed with it: a deleted column's cells must not linger as orphan data that would
+ silently resurface if the key were ever reused. Views referencing the key self-heal on
+ their next autosave (an unknown colId is dropped) — the rule every stale key rides.
+ """
+ key = str(key or '').strip()
+ if not key:
+ return
+
+ def _drop(ws):
+ ws['fields'].pop(key, None)
+ for row in ws['overlays'].values():
+ if isinstance(row, dict):
+ row.pop(key, None)
+
+ self._update(username, _drop)
+
+ def patch_overlay(self, username, pid, updates):
+ """Patch only the external editable stratum; never writes to the source system."""
+ clean = dict(updates or {})
+ if not clean:
+ return
+
+ def _patch(ws):
+ ws['overlays'].setdefault(str(int(pid)), {}).update(clean)
+
+ self._update(username, _patch)
+
+
+def make(table_key, st=None):
+ return TableStore(table_key, st=st)
diff --git a/platform/core/user_tables.py b/platform/core/user_tables.py
new file mode 100644
index 0000000000000000000000000000000000000000..ea38028b99c84f617b2f7d6ce1dbd7df4d9a187e
--- /dev/null
+++ b/platform/core/user_tables.py
@@ -0,0 +1,292 @@
+"""USER-CREATED TABLES (wave-9 I8 / contract C6) — databases that are not a connector.
+
+The owner's "+ New" flow has two branches: connect a SOURCE (Odoo today) or *"create a completely
+new database blank, where this time the user can actually insert row that they want."* The first
+branch is the connector seam and lives in `harness/datastore.py`; THIS module is the second.
+
+WHY A SEPARATE STORE AND NOT A REGISTRY ROW. `core/registry.py` is a static Python list read at
+import time — it is the catalogue of modules the PRODUCT ships, and a tenant cannot append to it
+at runtime without editing code. A user-created table is tenant data, so it lives in the tenant
+store and is MERGED into the nav beside the registry rows. That also keeps the archived/allowed
+machinery honest: a user table is never "archived", it is deleted, and it is never in
+`allowed_modules` because it is not a module.
+
+SHAPE (one store key, `user_tables`):
+
+ {table_key: {'key', 'label', 'source', 'createdBy', 'created', 'fields': [...], 'rows': {...}}}
+
+`source` is deliberately NOT 'Odoo' — the nav badge is generated from it, so a blank table reads
+"Blank" and can never be mistaken for connected data. `rows` is `{row_id: {field_key: value}}`,
+which is the same overlay shape `TableStore` already uses, so the grid's write path needs no new
+storage concept.
+
+⚠ ROW WRITES ARE ONLY EVER LEGAL HERE. An Odoo-sourced table is READ-ONLY at the source and the
+row endpoints refuse unless `is_user_table(key)` — a user must not be able to invent a customer
+in Odoo by typing into a grid. (Wave 18 note: the events seam has NO row event types; row
+add/delete are REST endpoints on `aios-web/api/routes_tables.py`, and this predicate is their
+wall.)
+
+WAVE 18 (C3-UT): every function takes an optional `st` STORE HANDLE — anything exposing
+`get(name)` / `update(name, fn, flush=)` / `exists(name)`. Default = `core.store` (tenant #0,
+the Streamlit host, unchanged). The API passes the session's `TenantRuntime`, whose accessors
+apply the tenant prefix / repo binding, so a Nurilab table lands in Nurilab's store.
+"""
+import datetime as _dt
+import re
+
+import core.store as store
+
+STORE_KEY = 'user_tables'
+MAX_TABLES = 40
+MAX_LABEL = 60
+MAX_ROWS = 5000
+MAX_FIELDS = 60
+#: the badge the nav paints for a table with no connector behind it
+BLANK_SOURCE = 'Blank'
+#: automation-created tables carry their maker instead (wave 18 C4-AUTO)
+AUTOMATION_SOURCE = 'Automation'
+#: every user table's key is prefixed, so it can never collide with a registry module key
+KEY_PREFIX = 'ut_'
+
+#: The field types a user table may declare. ⚠ Kept a SUBSET of
+#: `aios_grid.CUSTOM_FIELD_TYPES` (gated in verify_api's W18-UT section) — minus the two
+#: machine-written kinds (`formula` computes client-side over a workspace stratum; a base
+#: column of that type would have no author). Local literal rather than an aios_grid import so
+#: this module stays dependency-light for the API's boot path.
+UT_FIELD_TYPES = {'text', 'select', 'multiselect', 'user', 'int', 'currency', 'pct', 'date',
+ 'checkbox', 'phone', 'email', 'url', 'rating'}
+
+
+def _st(st):
+ return st if st is not None else store
+
+
+def _slug(label):
+ s = re.sub(r'[^a-z0-9]+', '_', str(label or '').strip().lower()).strip('_')
+ return (s or 'table')[:40]
+
+
+def clean_fields(raw):
+ """Validate a caller-supplied field list into the stored shape — refuse junk, never store
+ it. Returns a list of `{key,label,type,source}` dicts (source is always 'overlay': every
+ base column of a user table is user-editable by construction), or None when nothing
+ survives. Unknown types are DROPPED, not coerced — a column silently retyped is a lie."""
+ out, seen = [], set()
+ for f in (raw or [])[:MAX_FIELDS]:
+ if not isinstance(f, dict):
+ continue
+ label = ' '.join(str(f.get('label') or f.get('key') or '').split())[:80]
+ key = re.sub(r'[^a-z0-9_]+', '_', str(f.get('key') or _slug(label)).strip().lower())
+ key = key.strip('_')[:60]
+ ftype = str(f.get('type') or 'text').strip().lower()
+ if not key or key in seen or ftype not in UT_FIELD_TYPES or not label:
+ continue
+ seen.add(key)
+ entry = {'key': key, 'label': label, 'type': ftype, 'source': 'overlay'}
+ if ftype in ('select', 'multiselect'):
+ opts = [' '.join(str(o).split())[:60] for o in (f.get('options') or [])
+ if str(o).strip()][:50]
+ if opts:
+ entry['options'] = opts
+ if f.get('default') is True:
+ entry['default'] = True
+ out.append(entry)
+ return out or None
+
+
+def all_tables(st=None):
+ """{key: definition} — every user-created table in this tenant."""
+ try:
+ return dict(_st(st).get(STORE_KEY) or {})
+ except Exception:
+ return {}
+
+
+def get(table_key, st=None):
+ return all_tables(st).get(str(table_key))
+
+
+def is_user_table(table_key, st=None):
+ """THE permission predicate for row writes. Cheap and total: a key that is not in this store
+ is not a user table, so it cannot accept invented rows."""
+ return str(table_key or '').startswith(KEY_PREFIX) and get(table_key, st) is not None
+
+
+def create(label, username, fields=None, source=None, st=None):
+ """Create a blank table. Returns its key, or None if refused.
+
+ Refuses rather than raises on the ordinary conditions (no name, duplicate, cap reached) —
+ the caller is a UI form and a refusal is a message, not an exception.
+ """
+ label = str(label or '').strip()[:MAX_LABEL]
+ if not label:
+ return None
+ existing = all_tables(st)
+ if len(existing) >= MAX_TABLES:
+ return None
+ key = KEY_PREFIX + _slug(label)
+ if key in existing: # a second table of the same name gets a suffix
+ for n in range(2, 50):
+ if f'{key}_{n}' not in existing:
+ key = f'{key}_{n}'
+ break
+ else:
+ return None
+ # A blank table still needs ONE column to be a table at all: a row with no fields cannot be
+ # displayed, edited or identified. 'name' is the identity column, the same role `customer`
+ # plays in the Customer table.
+ defn = {
+ 'key': key,
+ 'label': label,
+ 'source': (source if source in (BLANK_SOURCE, AUTOMATION_SOURCE) else BLANK_SOURCE),
+ 'createdBy': username,
+ 'created': _dt.datetime.now().strftime('%Y-%m-%dT%H:%M:%S'),
+ 'fields': clean_fields(fields) or [{'key': 'name', 'label': 'Name', 'type': 'text',
+ 'source': 'overlay', 'default': True}],
+ 'rows': {},
+ }
+
+ def _add(cur):
+ cur[key] = defn
+ return cur
+
+ _st(st).update(STORE_KEY, _add, flush='sync') # a creation is not a hot path; commit it
+ return key
+
+
+def delete(table_key, st=None):
+ def _drop(cur):
+ cur.pop(str(table_key), None)
+ return cur
+ _st(st).update(STORE_KEY, _drop, flush='sync')
+
+
+def set_fields(table_key, fields, st=None):
+ """Replace a table's base-field contract (wave 18 — the automation engine grows tables it
+ creates). Cleaned with the same validator as `create`; refuses to leave a table fieldless."""
+ clean = clean_fields(fields)
+ if not clean or not is_user_table(table_key, st):
+ return False
+
+ def _set(cur):
+ t = cur.get(str(table_key))
+ if t is not None:
+ t['fields'] = clean
+ return cur
+
+ _st(st).update(STORE_KEY, _set, flush='sync')
+ return True
+
+
+def add_row(table_key, values=None, username=None, st=None):
+ """Append one row. Returns the new row id, or None if refused."""
+ if not is_user_table(table_key, st):
+ return None # ⚠ never on a connector-backed table
+ defn = get(table_key, st) or {}
+ rows = defn.get('rows') or {}
+ if len(rows) >= MAX_ROWS:
+ return None
+ rid = str(max((int(r) for r in rows if str(r).isdigit()), default=0) + 1)
+ valid = {f['key'] for f in (defn.get('fields') or [])}
+ clean = {k: str(v) for k, v in (values or {}).items() if k in valid}
+
+ def _add(cur):
+ t = cur.get(str(table_key))
+ if t is not None:
+ t.setdefault('rows', {})[rid] = clean
+ return cur
+
+ _st(st).update(STORE_KEY, _add, flush='async')
+ return rid
+
+
+def upsert_rows(table_key, rows_by_key, key_field, username=None, st=None):
+ """Bulk UPSERT for the automation engine (wave 18 C4-AUTO): match on `key_field`'s value,
+ update matched rows, insert the rest. Returns `{'updated': n, 'inserted': n, 'orphans': n}`
+ where orphans = existing rows whose key value did not appear this run — COUNTED, never
+ deleted (the contract's no-silent-delete rule). Refuses on a non-user table."""
+ if not is_user_table(table_key, st):
+ return None
+ defn = get(table_key, st) or {}
+ valid = {f['key'] for f in (defn.get('fields') or [])}
+ if key_field not in valid:
+ return None
+ incoming = {}
+ for kv, vals in (rows_by_key or {}).items():
+ kv = str(kv).strip()
+ if kv:
+ incoming[kv] = {k: str(v) for k, v in (vals or {}).items() if k in valid}
+ counts = {'updated': 0, 'inserted': 0, 'orphans': 0}
+
+ def _apply(cur):
+ t = cur.get(str(table_key))
+ if t is None:
+ return cur
+ rows = t.setdefault('rows', {})
+ by_val = {}
+ for rid, row in rows.items():
+ v = str((row or {}).get(key_field) or '').strip()
+ if v and v not in by_val:
+ by_val[v] = rid
+ next_id = max((int(r) for r in rows if str(r).isdigit()), default=0)
+ for kv, vals in incoming.items():
+ rid = by_val.get(kv)
+ if rid is not None:
+ rows[rid].update(vals)
+ counts['updated'] += 1
+ elif len(rows) < MAX_ROWS:
+ next_id += 1
+ rows[str(next_id)] = vals
+ counts['inserted'] += 1
+ counts['orphans'] = sum(1 for v in by_val if v not in incoming)
+ return cur
+
+ _st(st).update(STORE_KEY, _apply, flush='sync')
+ return counts
+
+
+def delete_row(table_key, row_id, st=None):
+ if not is_user_table(table_key, st):
+ return False
+
+ def _drop(cur):
+ t = cur.get(str(table_key))
+ if t is not None:
+ (t.get('rows') or {}).pop(str(row_id), None)
+ return cur
+
+ _st(st).update(STORE_KEY, _drop, flush='async')
+ return True
+
+
+def may_open(table_key, viewer, is_admin=False, st=None):
+ """FAIL-CLOSED visibility: the creator, or an admin. Nothing else.
+
+ A user table cannot be gated by `allowed_modules` — a module grant written last month cannot
+ describe a table created this morning — so it needs its own rule, and the safe rule is the
+ narrow one. Tables are stored tenant-wide under one key, so without this ANY user (including
+ a BU-scoped sales agent) could open a table somebody else created just by knowing its key.
+ Sharing a user table with named colleagues is a follow-on, and it should reuse the shared-
+ VIEW vocabulary rather than inventing a second one.
+ """
+ t = get(table_key, st)
+ if not t:
+ return False
+ return bool(is_admin) or t.get('createdBy') == viewer
+
+
+def nav_entries(viewer=None, is_admin=False, st=None):
+ """Registry-SHAPED dicts so the nav can render user tables beside real modules with no
+ special-casing: the same keys the flat nav reads (`key`, `label`, `source`).
+
+ Filtered by `may_open`, so the nav cannot offer a row the dispatcher would refuse.
+ """
+ out = []
+ for key, t in sorted(all_tables(st).items(),
+ key=lambda kv: (kv[1].get('label') or '').lower()):
+ if viewer is not None and not may_open(key, viewer, is_admin, st=st):
+ continue
+ out.append({'key': key, 'label': t.get('label') or key,
+ 'source': t.get('source') or BLANK_SOURCE,
+ 'user_table': True, 'nav': True, 'validate': False})
+ return out
diff --git a/platform/core/users.py b/platform/core/users.py
new file mode 100644
index 0000000000000000000000000000000000000000..a29435e3b3b9fe9b2c047f9f8d7bcda08d7375a5
--- /dev/null
+++ b/platform/core/users.py
@@ -0,0 +1,505 @@
+"""Per-user accounts for the platform, persisted in the HF Dataset store (users.json).
+
+Passwords are salted + PBKDF2-HMAC-SHA256 (200k iterations) — never stored or logged in plaintext.
+A bootstrap 'admin' account is seeded from APP_PASSWORD so the owner can always log in and create
+users; APP_PASSWORD also works as an emergency master for 'admin' if the registry is unreachable.
+
+Each account carries BU access ('all' or a list of team-ids [5=Fisch, 6=Royal]) which drives
+allowed_bus() — the basis for per-Business-Unit permissioning (a Royal-only user never sees Fisch).
+"""
+import os
+import hmac
+import hashlib
+import secrets
+
+import core.store as store
+
+BU_LABELS = {5: 'Fisch', 6: 'Royal'}
+_ITER = 200_000
+
+#: Wave 15 C-PERM — the explicit-resolution marker. Mirrors `core.perm_scope.PERMS_VERSION`;
+#: kept as a literal here so `users` does not import the permission layer it is read by.
+PERMS_VERSION = 1
+
+
+def _hash(pw, salt):
+ return hashlib.pbkdf2_hmac('sha256', str(pw).encode('utf-8'), bytes.fromhex(salt), _ITER).hex()
+
+
+def _record(pw, name, role, bus, active=True, modules='all', agent=None, email=None,
+ perms=None, tenant='royal-imports', platform_admin=False):
+ salt = secrets.token_hex(16)
+ rec = {'salt': salt, 'hash': _hash(pw, salt), 'name': name, 'role': role,
+ 'bus': bus, 'active': active, 'modules': modules,
+ 'agent': agent or None, 'email': email or None,
+ # Wave 18 (C1-TENANT, R1): the account's COMPANY. Absent == 'royal-imports' on every
+ # pre-wave record — no migration. Login binds the session to THIS value; the posted
+ # tenant field can hint but never override it.
+ 'tenant': str(tenant or 'royal-imports').strip().lower()}
+ if platform_admin is True:
+ # Wave 19 (R3): the PLATFORM-operator flag — half of `core.platform_admin`'s double lock
+ # (the other half is `tenant == 'loopable'`). Written ONLY for True, so every record that
+ # is not deliberately promoted keeps its pre-wave shape and answers False by absence.
+ # There is no UI writer and there never should be: it is set by provisioning, on purpose.
+ rec['platform_admin'] = True
+ if perms is not None:
+ # Wave 15 C-PERM. A record written WITH perms is migrated by construction — the marker
+ # and the block are set together, here, so no writer can create one without the other.
+ # (`core.perm_scope` reads an unmarked record as legacy, so a block without its marker
+ # would be silently ignored; a marker without a block would deny everything.)
+ rec['perms'] = perms
+ rec['perms_v'] = PERMS_VERSION
+ return rec
+
+
+def registry():
+ return store.get('users')
+
+
+def ensure_bootstrap():
+ """Seed an 'admin' account from APP_PASSWORD ONLY on a truly fresh store (no users file yet).
+ Idempotent; no-op if the store is unavailable (the app then falls back to the master-password
+ path in verify()).
+
+ Critically, this NEVER overwrites an existing registry: it seeds only when store.exists('users')
+ is definitively False. A transient read failure at startup used to return {} and make this
+ re-seed just {admin} over the real accounts — that is the bug that wiped users on restart."""
+ if not store.available():
+ return
+ if store.exists('users'): # present, or uncertain -> never clobber
+ return
+ try:
+ reg = store.get('users', fresh=True)
+ except Exception:
+ return
+ if reg:
+ return
+ master = os.environ.get('APP_PASSWORD', '')
+ if not master:
+ return
+ try:
+ store.put('users', {'admin': _record(master, 'Administrator', 'admin', 'all')})
+ except Exception:
+ pass
+
+
+def _public(username, u):
+ return {'username': username, 'name': u.get('name', username),
+ 'role': u.get('role', 'user'), 'bus': u.get('bus', 'all'),
+ 'modules': u.get('modules', 'all'),
+ 'agent': u.get('agent'), 'email': u.get('email'),
+ # Wave 18 (C1-TENANT): the session's tenant binding travels on the projection or it
+ # does not travel — the same rule the perms block states below.
+ 'tenant': str(u.get('tenant') or 'royal-imports').strip().lower(),
+ # Wave 14 C-AVATAR: the profile photo is public-safe by definition (it is served
+ # to every grid session via the workspace map); without it here the API session's
+ # user record silently drops it and /me can never show your own photo.
+ 'avatar': u.get('avatar') or None,
+ # ⛔ WAVE 15 C-PERM — THE WALL TRAVELS ON THIS PROJECTION OR IT DOES NOT TRAVEL.
+ # `deps._user_for` builds every API session from `_public()`, so a `perms` block
+ # dropped here is a restricted account served as an unrestricted one — silently, on
+ # every route, with nothing to notice. `perms_v` must ride ALONG WITH it and for the
+ # same reason inverted: the marker without the block denies everything, the block
+ # without the marker is ignored. Two keys, one fact, never separated.
+ # `verify_api` asserts a restricted user's SESSION OBJECT carries both, at the mount
+ # rather than by grep — a projection is exactly the kind of wiring that looks
+ # present in three files and is absent in the one that runs.
+ **({'perms': u['perms']} if isinstance(u.get('perms'), dict) else {}),
+ **({'perms_v': int(u['perms_v'] or 0)} if u.get('perms_v') else {}),
+ # ⛔ WAVE 19 R3 — THE SAME RULE, ON A NEW FIELD. `deps._user_for` builds every API
+ # session from this projection, so the platform-admin flag travels here or
+ # `core.platform_admin.is_platform_admin(session.user)` is blind and the Loopable
+ # admin plane 403s its own operator. Carried ONLY when the record says True, so a
+ # session dict for any other account is byte-identical to its pre-wave shape.
+ # Not a client leak: `routes_auth._public_user` is a whitelist projection and does
+ # not name this key, so it reaches no browser via /login or /me — the client's copy
+ # is the separate `platformAdmin` bool on GET /settings, which is derived from this.
+ **({'platform_admin': True} if u.get('platform_admin') is True else {}),
+ 'epoch': int(u.get('epoch') or 0)}
+
+
+# ------------------------------------------------------------------ session revocation (X3)
+# The API's session cookie is SIGNED AND STATELESS: there is no server-side session table to
+# delete from, so "log this user out everywhere" needs a number that lives with the account. The
+# cookie carries the epoch it was minted under; bumping the account's epoch makes every
+# outstanding cookie for that user fail verification on its next use. Absent == 0, so every
+# record written before this wave is valid without a migration.
+def epoch(username):
+ """The current session epoch for `username`. None when there is no such account.
+
+ None is NOT 0. 0 is "this account exists and has never been revoked"; None is "no record" —
+ which the session verifier must treat as a reason to refuse, not as a default to compare
+ against. (The APP_PASSWORD emergency-master admin has no record at all; the verifier handles
+ that case explicitly rather than inventing an epoch for it here.)
+ """
+ username = (username or '').strip().lower()
+ try:
+ u = (store.get('users') or {}).get(username)
+ except Exception:
+ return None
+ return int((u or {}).get('epoch') or 0) if u else None
+
+
+def bump_epoch(username):
+ """Revoke every outstanding API session for this account."""
+ username = (username or '').strip().lower()
+
+ def _set(reg):
+ u = reg.get(username)
+ if u:
+ u['epoch'] = int(u.get('epoch') or 0) + 1
+ return reg
+ store.update('users', _set)
+
+
+def verify(username, pw):
+ """Return a public user dict on success, else None. APP_PASSWORD is an emergency master for the
+ 'admin' login even if the store is unreachable, so the owner is never locked out."""
+ username = (username or '').strip().lower()
+ if not username or not pw:
+ return None
+ master = os.environ.get('APP_PASSWORD', '')
+ try:
+ # read fresh so accounts created moments ago (UI or out-of-band) are recognised at once
+ reg = store.get('users', fresh=True)
+ except Exception:
+ reg = {}
+ u = reg.get(username)
+ if u is None and '@' in username:
+ # Wave 18 (R1): the login box takes a username OR an email — admin@nurilab.id signs in
+ # without knowing the slug an admin chose. First case-insensitive email match wins;
+ # ambiguity is an admin data problem, not a login feature.
+ for k, r in reg.items():
+ if isinstance(r, dict) and str(r.get('email') or '').strip().lower() == username:
+ username, u = k, r
+ break
+ if u and u.get('active', True) and hmac.compare_digest(_hash(pw, u['salt']), u['hash']):
+ return _public(username, u)
+ # emergency master: admin + APP_PASSWORD always works (covers first run / store outage)
+ if username == 'admin' and master and hmac.compare_digest(str(pw), master):
+ # ⚠ CARRY THE RECORD'S CURRENT EPOCH when there is a record to read, so the session cookie
+ # the API mints from this dict AGREES with the stored account.
+ #
+ # This is not what stops the emergency lockout — `deps._user_for`'s master fallback does
+ # that, and a negative control confirmed the lockout is gone with or without this line.
+ # What it fixes is subtler and is a SCOPE question: a cookie whose epoch disagrees with the
+ # record falls through to that master fallback, which hands back a SYNTHETIC identity
+ # (`bus: 'all'`, `modules: 'all'`). An admin whose record narrows either field would
+ # therefore be silently WIDENED to consolidated, all-module access for the life of that
+ # session. Matching the epoch means the record branch wins and the account's real scope
+ # applies, leaving the master fallback as the true last resort it is meant to be.
+ # 0 when the store is unreachable, which is the case this branch was written for.
+ return {'username': 'admin', 'name': 'Administrator', 'role': 'admin', 'bus': 'all',
+ 'modules': 'all', 'epoch': int((reg.get('admin') or {}).get('epoch') or 0)}
+ return None
+
+
+def create_user(username, pw, name, role='user', bus='all', modules='all',
+ agent=None, email=None, tenant=None, platform_admin=None):
+ """Create — or, from app.py's dialog, OVERWRITE — an account.
+
+ ⛔ X3: OVERWRITING AN ACCOUNT MUST NOT RESURRECT ITS OLD SESSIONS. `_record()` builds a fresh
+ record with no `epoch` key, i.e. absent == 0. So re-saving an existing username used to reset
+ the epoch to 0, and every cookie minted before that account's last password rotation started
+ verifying again — a silent un-revocation. `app.py`'s "Add / update a user" calls this function
+ for BOTH add and update, so the hole was reachable from the shipped UI.
+
+ Epoch revocation is only ever as strong as the NARROWEST write path that touches the record, so
+ the carry-and-bump lives here rather than in each caller: an overwrite is at least as
+ session-invalidating as a password change, and it usually IS one.
+ """
+ username = (username or '').strip().lower()
+ if not username or not pw:
+ raise ValueError('username and password are required')
+
+ def _add(reg):
+ prior = reg.get(username) or {}
+ rec = _record(pw, name or username, role, bus, modules=modules,
+ agent=agent, email=email,
+ # An overwrite that names no tenant KEEPS the account's company — a
+ # rename must never quietly move a user between tenants.
+ tenant=(tenant or prior.get('tenant') or 'royal-imports'),
+ # Wave 19 (R3): CARRIED, for the same reason `epoch` is carried below —
+ # `_record` builds a FRESH record, so re-running the provisioner (it is
+ # documented as idempotent) or saving an account through this function
+ # would silently DEMOTE a platform admin and lock the operator out of
+ # their own plane. None = leave as it was; True/False = set it deliberately.
+ platform_admin=(prior.get('platform_admin') is True
+ if platform_admin is None else platform_admin is True))
+ if prior:
+ rec['epoch'] = int(prior.get('epoch') or 0) + 1
+ reg[username] = rec
+ return reg
+ store.update('users', _add)
+
+
+def set_password(username, pw):
+ username = (username or '').strip().lower()
+
+ def _set(reg):
+ u = reg.get(username)
+ if u:
+ u['salt'] = secrets.token_hex(16)
+ u['hash'] = _hash(pw, u['salt'])
+ # X3: a password change revokes every outstanding API session for the account. Bumped
+ # INSIDE the same read-modify-write as the hash so the two can never disagree — a
+ # separate update() could rotate the password and leave old cookies live if the second
+ # write failed.
+ u['epoch'] = int(u.get('epoch') or 0) + 1
+ return reg
+ store.update('users', _set)
+
+
+def set_active(username, active):
+ username = (username or '').strip().lower()
+
+ def _set(reg):
+ if username in reg:
+ reg[username]['active'] = bool(active)
+ # X3: DEACTIVATION must kill live sessions, not just future logins — otherwise a
+ # disabled account keeps working until its cookie expires. Bumped on reactivation too:
+ # cheap, and it means a re-enabled account never resurrects a stale cookie.
+ reg[username]['epoch'] = int(reg[username].get('epoch') or 0) + 1
+ return reg
+ store.update('users', _set)
+
+
+def set_platform_admin(username, on):
+ """Promote/demote a PLATFORM administrator (wave 19, R3) without touching the password.
+
+ The narrow write, deliberately: `create_user` is the destructive path (fresh salt, fresh
+ hash, bumped epoch) and promoting somebody should not sign them out or rotate a credential.
+ Cleared by REMOVING the key, so a demoted record goes back to its pre-wave shape rather than
+ carrying a `False` that reads as "somebody considered this".
+
+ ⚠ This is the flag only. It grants nothing on its own — `core.platform_admin` also demands
+ the `loopable` tenant, and there is no code path anywhere that moves an account between
+ tenants, which is what makes the second lock hold.
+ """
+ username = (username or '').strip().lower()
+
+ def _set(reg):
+ u = reg.get(username)
+ if u:
+ if on is True:
+ u['platform_admin'] = True
+ else:
+ u.pop('platform_admin', None)
+ return reg
+ store.update('users', _set)
+
+
+# ------------------------------------------------------------------ activity stamps (wave 19 R4)
+# "When did this account last sign in, and is anyone actually using it?" — the two questions the
+# Loopable admin plane exists to answer and that NOTHING in the product could answer before this
+# wave (there is no login history, no audit log, no request log anywhere).
+#
+# ⛔ THIS IS THE FIRST HIGH-FREQUENCY WRITER `users.json` HAS EVER HAD, and that bucket also holds
+# every password hash, `active`, `epoch` and the permission blocks. Three rules follow, and the
+# second one is a correctness rule, not a performance one:
+#
+# 1. **In-place mutation of ONE key.** Never `_record()`, never a whole-record replace: a stamp
+# that rebuilt the record would reset the salt/hash (locking the user out) or the epoch
+# (silently un-revoking every cookie ever minted for them). `set_password`'s docstring
+# explains why that class of bug is worth naming out loud.
+#
+# 2. **SYNCHRONOUS FLUSH — deliberately NOT the async path, and this reverses my first draft.**
+# `store.update(flush='async')` rebases on the PROCESS CACHE once a key is `_owned`
+# (`core/store.py:284`) and its worker uploads that whole cached blob. For a
+# table-workspace key, written by one process, that is exactly right. For `users` it is a
+# silent-revert machine: tenant #0's Streamlit host writes the SAME file, so an API process
+# holding a cache from an hour ago would, on its next stamp, upload a blob in which a
+# password rotation or a deactivation performed in the other host simply never happened.
+# A telemetry stamp must not be able to resurrect a disabled account. `flush='sync'` does a
+# FRESH strict read inside the store's lock and then uploads, which is the same discipline
+# every other `users` writer already uses.
+#
+# 3. **OFF THE REQUEST THREAD, so rule 2 costs nothing.** A sync commit is a hub round-trip, and
+# neither a sign-in nor a random request an hour later should wait for it. Each stamp runs on
+# a short-lived daemon thread; `flush_stamps()` is how a test or a shutdown waits for them.
+# Everything is fail-silent: a stamp is telemetry and may never turn a good login into a
+# failed one — the plane shows an honest "never" instead.
+def _now_iso():
+ import datetime as _dt
+ return _dt.datetime.now(_dt.timezone.utc).isoformat(timespec='seconds')
+
+
+#: Live stamp threads, so `flush_stamps()` can join them. Bounded by construction — one thread per
+#: stamp, and a stamp is at most one per login plus one per account per hour per process.
+_STAMPS = []
+_STAMPS_LOCK = __import__('threading').Lock()
+
+
+def _stamp(username, fields):
+ """Merge `fields` into ONE account record, on a background thread, with a fresh read."""
+ username = (username or '').strip().lower()
+ if not username or not fields:
+ return None
+
+ def _set(reg):
+ u = reg.get(username)
+ if isinstance(u, dict):
+ u.update(fields)
+ return reg
+
+ def _work():
+ try:
+ store.update('users', _set) # sync: fresh strict read + blocking upload
+ except Exception:
+ pass # a lost stamp is a lost stamp, never an error
+ import threading
+ t = threading.Thread(target=_work, daemon=True, name=f'user-stamp:{username}')
+ with _STAMPS_LOCK:
+ _STAMPS[:] = [x for x in _STAMPS if x.is_alive()]
+ _STAMPS.append(t)
+ t.start()
+ return t
+
+
+def flush_stamps(timeout=10.0):
+ """Block until outstanding stamp writes have been applied. For gates and shutdown hooks —
+ the app never needs it, exactly like `core.store.flush`."""
+ with _STAMPS_LOCK:
+ pending = list(_STAMPS)
+ for t in pending:
+ t.join(timeout=timeout)
+ return all(not t.is_alive() for t in pending)
+
+
+def touch_login(username, when=None):
+ """Stamp `last_login` (ISO-8601, UTC, OFFSET-BEARING) on a SUCCESSFUL login.
+
+ `username` must be the RESOLVED account key, not what the person typed: `verify()` accepts an
+ email address and resolves it to the registry key, so stamping the typed identifier would
+ write a stamp onto a key that does not exist and create a phantom account in the registry.
+
+ `last_active` rides along — signing in IS activity, and setting both here means the plane's
+ two columns agree the moment somebody logs in rather than an hour later.
+ """
+ stamp = when or _now_iso()
+ return _stamp(username, {'last_login': stamp, 'last_active': stamp})
+
+
+def touch_active(username, when=None):
+ """Stamp `last_active` — "this session did something". Throttled BY THE CALLER (`deps.py`
+ holds a process-local last-seen map), so this is not a store round-trip per request."""
+ return _stamp(username, {'last_active': when or _now_iso()})
+
+
+def set_access(username, role=None, bus=None, modules=None, agent=None, email=None,
+ name=None, perms=None):
+ """Update access fields. agent/email: pass '' to clear, None to leave unchanged —
+ the user↔agent link scopes the Customer List page / digests to that agent's book.
+
+ `name` follows the same None-means-unchanged idiom. It is here because it had no setter at all:
+ a display name could previously only be changed by re-creating the record through
+ `create_user`, i.e. by also resetting the password (and, before the fix above, the session
+ epoch). Y4's `PATCH {name?}` needs the narrow write, not the destructive one."""
+ username = (username or '').strip().lower()
+
+ def _set(reg):
+ u = reg.get(username)
+ if u:
+ if name is not None:
+ u['name'] = name
+ if role is not None:
+ u['role'] = role
+ if bus is not None:
+ u['bus'] = bus
+ if modules is not None:
+ u['modules'] = modules
+ if agent is not None:
+ u['agent'] = agent or None
+ if email is not None:
+ u['email'] = email or None
+ if perms is not None:
+ # Wave 15 C-PERM. Writing perms MIGRATES the record: the marker goes on in the
+ # same read-modify-write, so a record can never end up with one and not the
+ # other (see `_record`). Whole-block replace, matching the PUT route's shape —
+ # a merge would make "remove this restriction" unexpressible.
+ u['perms'] = perms
+ u['perms_v'] = PERMS_VERSION
+ return reg
+ store.update('users', _set)
+
+
+def allowed_bus_labels(user):
+ """BU labels this user may select. 'all' -> All+Fisch+Royal; a single BU -> just that BU (no
+ 'All', so the other BU is never reachable); multiple -> All + each."""
+ bus = (user or {}).get('bus', 'all')
+ if bus == 'all':
+ return ['All', 'Fisch', 'Royal']
+ labels = [BU_LABELS[b] for b in bus if b in BU_LABELS]
+ if not labels:
+ return ['All', 'Fisch', 'Royal']
+ return (['All'] + labels) if len(labels) > 1 else labels
+
+
+def assignable_people(tenant=None):
+ """Display names for `user`-typed overlay columns — the tenant's ACTIVE accounts.
+
+ Moved from app.py (2026-07-31) so both hosts serve the same choices. Resolved on every
+ call rather than persisted with the column: a snapshot would keep offering people who
+ have left and never offer people who joined. Deactivated accounts are excluded; a value
+ already stored on a row is untouched — history should still say who owned something.
+
+ Wave 18 (C1-TENANT): pass `tenant` to scope the choices to ONE company — the user registry
+ is a global control-plane bucket, and a Nurilab picker offering Royal's staff is a
+ cross-tenant name leak. None = unscoped (the Streamlit host, tenant #0's process).
+ """
+ try:
+ reg = registry() or {}
+ except Exception:
+ return []
+ want = str(tenant or '').strip().lower()
+ out = []
+ for username, u in reg.items():
+ if not isinstance(u, dict) or u.get('active') is False:
+ continue
+ if want and str(u.get('tenant') or 'royal-imports').strip().lower() != want:
+ continue
+ out.append(str(u.get('name') or username))
+ return sorted(set(out))
+
+
+def set_avatar(username, data_url):
+ """Set (or clear, with None/'') the user's profile photo — a data URL (wave 14 C-AVATAR,
+ [[loopable-wave14-split]] item 11). Stored VERBATIM; the API route owns validation (mime +
+ decoded size) because this value is served back to every grid session. Cleared by removing
+ the key, so records without a photo keep their pre-wave shape."""
+ username = (username or '').strip().lower()
+
+ def _set(reg):
+ u = reg.get(username)
+ if u:
+ if data_url:
+ u['avatar'] = str(data_url)
+ else:
+ u.pop('avatar', None)
+ return reg
+ store.update('users', _set)
+
+
+def avatar_map(tenant=None):
+ """{display name -> avatar data URL} for ACTIVE accounts with a photo — the companion of
+ `assignable_people()`, keyed by the SAME vocabulary: a `user` cell stores the display
+ name, so the display name is the only join a renderer has. Two active accounts sharing a
+ display name share one option; the first WITH a photo wins the key rather than a coin
+ flip deciding whether the option has a face. `tenant` scopes it exactly as
+ `assignable_people(tenant)` does, and for the same leak."""
+ try:
+ reg = registry() or {}
+ except Exception:
+ return {}
+ want = str(tenant or '').strip().lower()
+ out = {}
+ for username, u in sorted(reg.items()):
+ if not isinstance(u, dict) or u.get('active') is False:
+ continue
+ if want and str(u.get('tenant') or 'royal-imports').strip().lower() != want:
+ continue
+ av = u.get('avatar')
+ nm = str(u.get('name') or username)
+ if av and nm not in out:
+ out[nm] = str(av)
+ return out
diff --git a/platform/evals/analyst_golden.yml b/platform/evals/analyst_golden.yml
new file mode 100644
index 0000000000000000000000000000000000000000..a07bd1bb21f634affc9e55278365515601384b3d
--- /dev/null
+++ b/platform/evals/analyst_golden.yml
@@ -0,0 +1,104 @@
+# Analyst golden eval set v1 (OM-4 gate, 2026-07-11; truths REFRESHED 2026-07-17 after the
+# Jul-15 Odoo mass-recompute + hard-delete reconciliation — closed windows DO drift when docs
+# are edited/deleted; refresh truths from the parity-proven layer, never loosen tolerances).
+# Original header: truths computed from the PARITY-PROVEN
+# semantic layer over CLOSED windows (H1 2026 = 2026-01-01..2026-06-30) so live data drift cannot
+# break them. Checks are DETERMINISTIC (number within tolerance + required substrings + tool-use
+# assertions) — the validate() culture applied to AI answers. Run: harness/evals.py.
+# expect.value tolerance: abs or rel (fraction). expect.contains: ALL substrings (case-insensitive).
+# expect.tools: tool names that MUST appear in the trace (the answer must come FROM the tools).
+# expect.not_tools: tool names that must NOT appear (the over-refusal guard — an answerable ask
+# must never end in report_gap; a gap ask must never end in a forced wrong query).
+items:
+ - id: rev_h1
+ ask: "What was our wholesale revenue for the first half of 2026 (Jan 1 through Jun 30)?"
+ expect: {value: 3501508.33, rel: 0.001, tools: [run_semantic_query]}
+ - id: rev_h1_fisch
+ ask: "Fisch revenue only, H1 2026 (Jan 1 - Jun 30)?"
+ expect: {value: 2494244.70, rel: 0.001, tools: [run_semantic_query]}
+ - id: rev_h1_royal
+ ask: "And Royal's revenue for the same H1 2026 window?"
+ expect: {value: 1007263.63, rel: 0.001, tools: [run_semantic_query]}
+ - id: rev_june
+ ask: "Revenue for June 2026?"
+ expect: {value: 535046.06, rel: 0.001, tools: [run_semantic_query]}
+ - id: margin_h1
+ ask: "Gross margin dollars for H1 2026 (Jan-Jun), wholesale?"
+ expect: {value: 2067509.45, rel: 0.001, tools: [run_semantic_query]}
+ - id: margin_pct_h1
+ ask: "What gross margin percentage did we run in H1 2026?"
+ expect: {value: 0.59, abs: 0.005, allow_pct_form: true, tools: [run_semantic_query]}
+ - id: orders_h1
+ ask: "How many confirmed wholesale orders did we take in H1 2026 (Jan 1 - Jun 30)?"
+ expect: {value: 4989, abs: 1, tools: [run_semantic_query]}
+ - id: customers_h1
+ ask: "How many distinct customers bought from us in H1 2026?"
+ expect: {value: 1037, abs: 1, tools: [run_semantic_query]}
+ - id: top_customer
+ ask: "Who was our biggest customer by revenue in H1 2026?"
+ expect: {contains: ["Poppy Flowers"], tools: [run_semantic_query], not_tools: [report_gap]}
+ - id: opex_h1
+ ask: "Total operating expense on the GL for H1 2026 (Jan 1 - Jun 30)?"
+ expect: {value: 4683428.81, rel: 0.001, tools: [run_semantic_query]}
+ - id: top_expense
+ ask: "What is our single largest expense account in H1 2026?"
+ expect: {contains: ["FBA"], tools: [run_semantic_query]}
+ - id: chart_request
+ ask: "Make me a line chart of monthly wholesale revenue for H1 2026."
+ expect: {artifact: chart, tools: [run_semantic_query, make_chart]}
+ - id: bu_guard
+ ask: "Show one single revenue line combining Fisch and Royal together per month for H1 2026."
+ expect: {tools: [run_semantic_query]} # combined-total ok; the guard is it must NOT error
+ - id: name_resolution
+ ask: "How much revenue did the customer 'flower' — I don't remember the exact name, something with FLOWERS in it — bring in H1 2026? Pick the top match."
+ expect: {tools: [get_field_values, run_semantic_query]}
+ - id: map_request
+ ask: "Put my top 20 customers by H1 2026 revenue on a map."
+ expect: {artifact: chart, tools: [run_semantic_query, make_chart]}
+ # --- the gap loop + location/YoY competence (added 2026-07-16 with the debug fixes) ---
+ - id: city_filter
+ ask: "Which customer in Brooklyn brought us the most revenue in H1 2026 (Jan 1 - Jun 30)?"
+ expect: {value: 48785.00, rel: 0.001, contains: ["J KAY"],
+ tools: [get_field_values, run_semantic_query], not_tools: [report_gap]}
+ - id: yoy_decliners
+ ask: "Which Fisch customer declined the most in revenue in H1 2026 (Jan 1 - Jun 30) versus the same window of 2025? Give the dollar decline."
+ expect: {value: 16451.25, rel: 0.005, contains: ["JUNE"],
+ tools: [run_semantic_query, transform_result], not_tools: [report_gap]}
+ # --- the agent dimension (added 2026-07-17: res.partner.agent_ids m2m sync — the #1 logged
+ # gap, closed). agent_book is VERBATIM the old gap_refusal ask: yesterday's honest refusal
+ # must become today's answer.
+ - id: agent_book
+ ask: "Who are the top customers handled by our salesperson Naomi in H1 2026?"
+ expect: {contains: ["Poppy Flowers"], tools: [get_field_values, run_semantic_query],
+ not_tools: [report_gap]}
+ - id: agent_revenue
+ ask: "How much revenue did agent Naomi's book of customers bring in H1 2026 (Jan 1 - Jun 30)?"
+ expect: {value: 872869.98, rel: 0.005, tools: [run_semantic_query], not_tools: [report_gap]}
+ # --- the TWO agent sources (added 2026-07-28). Odoo holds a customer-master book AND a
+ # per-invoice-line commission agent; they name different people, and the commission table also
+ # carries internal SALESPEOPLE who are not agents. These three lock the distinction: the
+ # unallocated bucket must be answerable at all, and Anna/Shantal must never be called agents.
+ - id: agent_unallocated
+ ask: "Using the invoice-line basis, how much of Fisch's 2025 sales was NOT allocated to an agent?"
+ expect: {value: 1447579.59, rel: 0.01, tools: [run_semantic_query], not_tools: [report_gap]}
+ - id: agent_not_salesperson
+ ask: "Who are our agents on the Fisch invoice lines in 2025, and what did each generate?"
+ expect: {contains: ["Pasternak"], not_contains: ["Anna", "Shantal"],
+ tools: [run_semantic_query], not_tools: [report_gap]}
+ - id: agent_allocated_2025
+ ask: "On the invoice-line basis, how much of Fisch's 2025 sales was allocated to a real agent?"
+ expect: {value: 2995664.75, rel: 0.01, tools: [run_semantic_query], not_tools: [report_gap]}
+ - id: gap_refusal
+ ask: "How many units of our best-selling SKU do we physically have in stock right now?"
+ expect: {tools: [report_gap]} # stock-on-hand has NO topic in the store — must self-report, never guess
+ # --- the analytics transform library (added 2026-07-18: 60-op Tableau-class set). Truths from
+ # the parity-proven semantic layer over the CLOSED H1 2026 window.
+ - id: abc_a_tier
+ ask: "Using an ABC / Pareto analysis of H1 2026 revenue (Jan 1 - Jun 30), how many customers fall in the A tier — the vital few that make up the first 80% of revenue?"
+ expect: {value: 311, abs: 6, tools: [run_semantic_query, transform_result], not_tools: [report_gap]}
+ - id: ytd_customers
+ ask: "How many distinct customers had we sold to cumulatively from Jan 1 through the end of March 2026?"
+ expect: {value: 790, abs: 1, tools: [run_semantic_query], not_tools: [report_gap]}
+ - id: concentration_top5
+ ask: "What percent of our H1 2026 revenue (Jan 1 - Jun 30) is accounted for by our top 5 customers?"
+ expect: {value: 7.84, abs: 0.5, tools: [run_semantic_query], not_tools: [report_gap]}
diff --git a/platform/harness/__init__.py b/platform/harness/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..4855a958c985c127800ef1d441e4167a4b4770f3
--- /dev/null
+++ b/platform/harness/__init__.py
@@ -0,0 +1,3 @@
+"""Harness — the multi-source financial-dashboarding platform (connectors + canonical model + skills)."""
+from .canonical import Capability, Entity, Query, Filter
+from .base import Connector, Tenant, Skill, register_skill, skills_for
diff --git a/platform/harness/analyst.py b/platform/harness/analyst.py
new file mode 100644
index 0000000000000000000000000000000000000000..4cd20631d9f7571c66c081827492acb07e5201c5
--- /dev/null
+++ b/platform/harness/analyst.py
@@ -0,0 +1,325 @@
+"""harness/analyst.py — the AIOS Analyst loop (OM-4, 2026-07-11).
+
+A CHEAP small model (via OpenRouter, OpenAI-compatible) drives the compounding tool registry
+(harness/tools.py) to answer questions, build charts, and spawn dashboards over the semantic
+layer. The model NEVER writes SQL — it picks registry keys, guided by the in-product SKILL
+recipes (model/skills/*.skill.yml) injected into its system prompt. Plan: omni-adoption addendum.
+
+Architecture (mirrors the Omni coordinator pattern):
+ ask(question) -> bounded tool loop: chat -> tool_calls -> tools.dispatch() -> results -> chat …
+ until a plain answer or MAX_ITERS. chat_fn is INJECTABLE: live = OpenRouter POST; tests = a
+ scripted double — the loop mechanics are provable offline (no key, no tokens).
+
+Correctness posture: bounded iterations (never endless); tool errors go BACK to the model as
+readable envelopes (it self-corrects); the final answer carries the tool trace (auditability +
+the drill guarantee); exhausted-budget is reported AS exhausted, never as success (loop rules).
+Cost posture: DEFAULT_MODEL is a cheap tool-calling model; override per-tenant/env; prompt = the
+skills + topic summary (small, cacheable), NOT raw data.
+"""
+import json
+import os
+from pathlib import Path
+
+import harness.tools as T
+
+# Provider LADDER (owner 2026-07-12: "use Groq and Cerebras"): all OpenAI-compatible chat
+# endpoints; tried in order, failing over on payment/rate/server errors — an exhausted or
+# rate-limited provider degrades to the next instead of taking the Analyst down (the
+# OpenRouter-402 incident). Pin one with ANALYST_PROVIDER=groq|cerebras|openrouter; override
+# its model with ANALYST_MODEL. Every model here must re-pass the eval gate (§4b).
+PROVIDERS = [
+ {"name": "groq", "env": "GROQ_API_KEY",
+ "url": "https://api.groq.com/openai/v1/chat/completions",
+ "model": "llama-3.3-70b-versatile"},
+ {"name": "cerebras", "env": "CEREBRAS_API_KEY",
+ "url": "https://api.cerebras.ai/v1/chat/completions",
+ "model": "gpt-oss-120b"}, # this account's tool-capable model (from /v1/models)
+ {"name": "openrouter", "env": "OPENROUTER_API_KEY",
+ "url": "https://openrouter.ai/api/v1/chat/completions",
+ "model": "openai/gpt-4o-mini"},
+]
+DEFAULT_MODEL = None # None = the selected provider's default model
+MAX_ITERS = 8
+
+
+def available_providers():
+ pin = os.environ.get("ANALYST_PROVIDER")
+ ps = [p for p in PROVIDERS if os.environ.get(p["env"])]
+ if pin:
+ ps = [p for p in ps if p["name"] == pin] or ps
+ return ps
+
+
+def llm_configured():
+ return bool(available_providers())
+SKILLS_DIR = Path(__file__).resolve().parents[1] / "model" / "skills"
+
+
+def _skills_text():
+ parts = []
+ for f in sorted(SKILLS_DIR.glob("*.skill.yml")):
+ parts.append(f.read_text(encoding="utf-8"))
+ return "\n\n".join(parts) or "(no skill files installed)"
+
+
+def system_prompt():
+ """The small model's standing instructions: the platform rules + the skill recipes.
+ Stable content (cache-friendly); per-question content goes in the user turn."""
+ topics = T.list_topics()
+ topic_summary = "\n".join(
+ f"- {t['topic']}: {t['label']} | metrics: {', '.join(t['metrics'])} | dims: {', '.join(t['dims'])}"
+ for t in topics)
+ return f"""You are the AIOS Analyst for a wholesale business. You answer data questions by
+calling TOOLS over a governed semantic layer. THE RULES (non-negotiable):
+1. You NEVER write SQL or invent field names — only registry keys from the tools' schemas.
+2. Start unknown asks with list_topics/describe_topic. Resolve typed names (customers, products)
+ with get_field_values BEFORE filtering. Business units: Fisch=5, Royal=6 — never mix them in
+ one series unless explicitly comparing.
+3. Every number you present must come from a tool result and keep its result_id (drillable).
+ If a tool errors, read the error and correct your call — do not make numbers up, ever.
+4. Artifact actions (save_view, compose_dashboard, schedule_report, create_alert) need the
+ user's explicit confirmation first.
+5. Answer plainly and lead with the finding. State the window and scope you used — READ the
+ window from the tool result's 'window' field, never guess it: a query without dates covers
+ ALL recorded history (there is no hidden default window). Time-bound asks ("this year",
+ "past 4 weeks") must pass explicit date_from/date_to.
+6. A single-number question gets THE SINGLE NUMBER first (the total for the asked window/scope),
+ THEN any breakdown. Never answer a "what was X" question with only components: no monthly
+ lists without the total, no per-BU splits when the consolidated figure was asked. If the ask
+ is consolidated, query WITHOUT group_by (or sum before answering).
+7. NEVER state an aggregate you did not obtain from a tool result. If you want to mention a
+ total across the rows you fetched, either run the scalar query for it or ADD UP those exact
+ rows — a round "approximately" figure is a fabrication and forbidden. When in doubt, present
+ the rows without a total. Joining or diffing two result sets BY HAND (e.g. this year vs last
+ year per customer) is equally forbidden — that is transform_result's job ({{"op":"yoy"}} adds
+ _ly, _delta, _yoy_pct per row); if no transform can compute it, say you cannot.
+8. THE GAP PROTOCOL. If — and only if — after checking the schema (list_topics/describe_topic)
+ no registered dimension, metric, transform or chart kind can answer, do NOT guess and do NOT
+ force a wrong query: call report_gap(kind, missing, question, workaround) ONCE, then answer
+ in one honest sentence what is missing and offer the nearest ask that IS answerable. Before
+ concluding a gap, check the TRANSFORMS: year-over-year / decline / growth comparisons (yoy),
+ rankings (top_n/sort/head), shares, running totals and distributions are ALL answerable via
+ transform_result — a derived-analytics question is never a gap. Both directions are
+ failures: refusing without report_gap, and calling report_gap for something the tools
+ support.
+9. NEVER emit markdown images, data: URIs, or links to charts — you cannot draw. Charts exist
+ ONLY through make_chart / make_table; the platform renders them below your answer. Refer to
+ a chart as "the chart below". Derived analytics (top-N, YoY, shares, running totals, moving
+ averages, ranks, bins) exist ONLY through transform_result — never arithmetic in your head.
+
+CHART PICKER (the form follows the comparison — pick by what the question compares):
+- trend over time -> line (few periods -> bar); seasonal/two-dim intensity -> heatmap
+- this year vs last year by period -> transform_result [{{"op":"yoy"}}] then yoy_bars
+- ranking / "top N" -> transform_result top_n then ranked_bar (sorted, labeled)
+- part-to-whole -> pie|donut ONLY when <=6 slices (top_n first); over time -> stacked_bar;
+ shares of a shifting total -> stacked_pct; hierarchy of shares -> treemap
+- what drove the change / contribution -> waterfall (signed steps; platform adds the Total)
+- concentration ("do the top X carry the book?") -> pareto
+- correlation of two measures -> scatter; + a third measure -> bubble (size)
+- distribution of a measure -> histogram (or transform bin -> bar)
+- stage conversion -> funnel; actual vs target -> bullet (y=actual, y2=target)
+- level + rate together (e.g. GM$ + GM%) -> combo (y=bars left, y2=line right)
+- same small chart per segment -> facet on line|bar|area|scatter
+- exact figures, many columns, lists -> make_table (totals row included)
+- customer geography -> map. When two forms tie, pick the simpler one.
+
+DATASETS:
+{topic_summary}
+
+YOUR SKILL RECIPES (follow these plans; adjust the [bracketed] parameters):
+{_skills_text()}"""
+
+
+_DEAD_STATUS = {401, 402, 403} # payment/auth: skip the provider immediately, no retry
+_RETRY_STATUS = {429, 500, 502, 503} # rate/server: retry with backoff before failing over
+_MAX_ANSWER_TOKENS = 1500 # answers are short; also keeps low-credit providers usable
+_COOLDOWN = {} # provider name -> unix ts until which we skip it (in-proc)
+
+
+def _live_chat(messages, tools, model, tool_choice="auto"):
+ """POST down the provider ladder with LATENCY-FIRST failover (a chat user is waiting):
+ a rate-limited provider is SKIPPED IMMEDIATELY in favor of the next one — we only sleep
+ when the ENTIRE ladder is limited (then short ladder-level backoffs). A LONG Retry-After
+ (daily quota, e.g. Groq TPD) puts the provider in an in-process COOLDOWN; 401/402/403 skip
+ the provider outright."""
+ import time as _time
+
+ import requests
+ provs = available_providers()
+ if not provs:
+ raise RuntimeError("no LLM provider configured — set GROQ_API_KEY / CEREBRAS_API_KEY / "
+ "OPENROUTER_API_KEY in platform/.env")
+ last_err = None
+ # Two patience profiles: CHAT (default) fails over fast — a user is waiting; BATCH
+ # (ANALYST_PATIENT=1, set by the eval gate / insight runner) waits out per-minute rate
+ # windows across more ladder rounds instead of exhausting the ladder in seconds.
+ patient = os.environ.get("ANALYST_PATIENT") == "1"
+ round_sleeps = (5, 10, 20, 30, 45, 60) if patient else (2, 6, 12)
+ for rnd in range(len(round_sleeps)): # ladder rounds
+ saw_retryable = False
+ for p in provs:
+ if _COOLDOWN.get(p["name"], 0) > _time.time():
+ last_err = RuntimeError(f"{p['name']}: cooling down (quota)")
+ continue
+ try:
+ r = requests.post(p["url"], timeout=120,
+ headers={"Authorization": f"Bearer {os.environ[p['env']]}",
+ "HTTP-Referer": "https://aios.local",
+ "X-Title": "AIOS Analyst"},
+ json={"model": (model or os.environ.get("ANALYST_MODEL")
+ or p["model"]),
+ "messages": messages, "tools": tools,
+ "tool_choice": tool_choice, "temperature": 0.1,
+ "max_tokens": _MAX_ANSWER_TOKENS})
+ if r.status_code in _DEAD_STATUS:
+ last_err = RuntimeError(f"{p['name']}: HTTP {r.status_code}")
+ _COOLDOWN[p["name"]] = _time.time() + 300 # don't re-poke dead auth/payment
+ continue
+ if r.status_code in _RETRY_STATUS:
+ last_err = RuntimeError(f"{p['name']}: HTTP {r.status_code}")
+ try:
+ wait = float(r.headers.get("retry-after") or 0)
+ except ValueError:
+ wait = 0
+ if wait > 60: # daily/long quota — cool down
+ _COOLDOWN[p["name"]] = _time.time() + wait
+ else:
+ saw_retryable = True # NO sleep — next provider NOW
+ continue
+ r.raise_for_status()
+ usage = r.json().get("usage", {})
+ return r.json()["choices"][0]["message"], usage
+ except requests.RequestException as e:
+ last_err = e
+ continue # network blip — next provider
+ if not saw_retryable:
+ break # nothing retryable left anywhere
+ _time.sleep(round_sleeps[rnd]) # whole ladder limited — pause a round
+ raise RuntimeError(f"all LLM providers failed (last: {last_err})")
+
+
+#: Wave 15 R2 — what a restricted account is told instead of an answer.
+ANALYST_DENIED = ("The Analyst is not available on your account. It answers from the full "
+ "governed model, which is wider than what your account is permitted to see.")
+
+
+def may_ask(user):
+ """⛔ R2 — THE AI WALL, AND IT IS DELIBERATELY BLUNT.
+
+ Owner, verbatim: *"If the AI is triggered by a user, the AI ITSELF should not be able to see
+ the data."* Today the Analyst's tools run UNSCOPED — `harness/tools.run_semantic_query` takes
+ no subject and no filter, so every question it answers is answered over the whole tenant.
+ A restricted account asking "what were our top customers?" would therefore receive, in prose,
+ precisely the rows the grid's permanent filter exists to withhold. Prose is not a lesser leak
+ than a table; it is a harder one to notice.
+
+ So the wall is REFUSAL, not narrowing: an account with ANY declared restriction — or any
+ non-admin on a migrated record — does not reach the model at all. An AI that never runs
+ cannot leak what it never read. Fail-closed on an unreadable record for the same reason.
+
+ ⭢ NAMED DEBT, owner-mandated (R2, doc §Debt, log 2026-08-02). The RIGHT answer is to thread
+ the subject's permanent filter into every semantic query the Analyst runs — `filter_sql`
+ already compiles that tree to SQL, so the shape exists; what does not exist is a per-subject
+ query path through `harness/semantic.py`, which takes `team_id` and nothing else. Until that
+ lands this refusal is the whole enforcement, and it must NOT be relaxed into "narrow the
+ prompt" or "tell the model what it may not say" — a prompt is not a permission boundary.
+ """
+ import core.perms as perms
+ import core.perm_scope as perm_scope
+
+ if not isinstance(user, dict):
+ return False # no identity resolved -> no Analyst
+ if perms.is_admin(user):
+ return True
+ if perm_scope.is_migrated(user):
+ # Migrated and not an admin: the account is governed by a wall the Analyst cannot honour.
+ return False
+ # Legacy record: restricted the old way is still restricted.
+ return (perms.allowed_modules(user) is None
+ and perms.scope_team_id(user) is None
+ and not perms.scope_agent(user))
+
+
+def ask(question, history=None, chat_fn=None, model=DEFAULT_MODEL, max_iters=MAX_ITERS,
+ telemetry_kind="analyst", user=None):
+ """Run one Analyst turn. Returns {answer, artifacts, tool_trace, iterations, exhausted,
+ usage}. chat_fn(messages, tools, model) -> (assistant_message_dict, usage_dict).
+
+ `user` is the SUBJECT asking. Passing it engages the R2 wall (`may_ask`); omitting it keeps
+ the unscoped behaviour that `harness/evals.py` and `harness/routines.py` rely on — those run
+ as the SYSTEM, not on behalf of a person, and gating them on a user record they do not have
+ would break the eval ladder to no security benefit. Every call that IS on behalf of somebody
+ passes it, and `app.py`'s chat entry point does.
+ """
+ if user is not None and not may_ask(user):
+ return {"answer": ANALYST_DENIED, "artifacts": [], "tool_trace": [],
+ "iterations": 0, "exhausted": False, "denied": True,
+ "usage": {"prompt_tokens": 0, "completion_tokens": 0}}
+ chat = chat_fn or _live_chat
+ tools = T.openai_tools()
+ messages = [{"role": "system", "content": system_prompt()}]
+ messages += list(history or [])
+ # The model has no clock: anchor relative windows ("last week", "this month") to today.
+ # Lives in the USER turn so the system prompt stays byte-stable (prompt-cache friendly).
+ import datetime as _dt
+ messages.append({"role": "user",
+ "content": f"(today is {_dt.date.today().isoformat()})\n{question}"})
+ trace, artifacts, usage_total = [], [], {"prompt_tokens": 0, "completion_tokens": 0}
+
+ for i in range(max_iters):
+ msg, usage = chat(messages, tools, model)
+ for k in usage_total:
+ usage_total[k] += usage.get(k, 0) or 0
+ tool_calls = msg.get("tool_calls") or []
+ # Free-tier models INTERMITTENTLY answer a data question without calling any tool
+ # (~1 in 4 observed on gpt-oss-120b — the "no chart" defect). Deterministic fix: if
+ # the VERY FIRST turn used no tools, redo it once with tool_choice='required'. Meta
+ # questions just get a harmless schema lookup before answering.
+ if i == 0 and not tool_calls and chat is _live_chat:
+ msg, usage = _live_chat(messages, tools, model, tool_choice="required")
+ for k in usage_total:
+ usage_total[k] += usage.get(k, 0) or 0
+ tool_calls = msg.get("tool_calls") or []
+ messages.append({"role": "assistant", "content": msg.get("content") or "",
+ **({"tool_calls": tool_calls} if tool_calls else {})})
+ if not tool_calls:
+ answer = (msg.get("content") or "").strip()
+ if not answer:
+ # A model occasionally returns NO content and NO tool calls (observed live
+ # 2026-07-16: the reply bubble was simply empty and the next turn hallucinated).
+ # Never surface silence — report the failure honestly instead.
+ answer = ("(the model returned an empty answer — nothing was computed; "
+ "please rephrase or ask again)")
+ import harness.telemetry as _tel
+ # Wave 19 (R4): ATTRIBUTED. The token count was previously logged against nobody, so
+ # "which customer is spending model budget, and who inside it?" had no answer even in
+ # principle. Read defensively off `user` because this function is deliberately
+ # callable WITHOUT one — `harness/evals.py` and `harness/routines.py` run as the
+ # system, and telemetry omits both keys for them rather than inventing a subject.
+ _tel.log(telemetry_kind, question=question[:200],
+ user=(user or {}).get("username") if isinstance(user, dict) else None,
+ tenant=(user or {}).get("tenant") if isinstance(user, dict) else None,
+ model=model or (available_providers() or [{}])[0].get("name", "auto"),
+ iterations=i + 1,
+ tools=[t["tool"] for t in trace],
+ tokens=usage_total["prompt_tokens"] + usage_total["completion_tokens"])
+ return {"answer": answer, "artifacts": artifacts,
+ "tool_trace": trace, "iterations": i + 1, "exhausted": False,
+ "usage": usage_total}
+ for tc in tool_calls:
+ name = tc["function"]["name"]
+ args = tc["function"].get("arguments") or "{}"
+ res = T.dispatch(name, args)
+ trace.append({"tool": name, "args": args if isinstance(args, str) else json.dumps(args),
+ "ok": res["ok"], "error": res.get("error")})
+ if res["ok"] and isinstance(res["data"], dict) and (
+ "chart" in res["data"] or "kpi" in res["data"] or "table" in res["data"]
+ or "dashboard" in res["data"]):
+ artifacts.append(res["data"])
+ messages.append({"role": "tool", "tool_call_id": tc.get("id", name),
+ "content": json.dumps(res, default=str)[:8000]})
+ # budget exhausted — report honestly (never as success)
+ return {"answer": "(stopped: tool-call budget exhausted before a final answer — "
+ "narrow the question or raise max_iters)",
+ "artifacts": artifacts, "tool_trace": trace, "iterations": max_iters,
+ "exhausted": True, "usage": usage_total}
diff --git a/platform/harness/base.py b/platform/harness/base.py
new file mode 100644
index 0000000000000000000000000000000000000000..b538ac4474ad4e36f66e30b4edf6e5dcd8500822
--- /dev/null
+++ b/platform/harness/base.py
@@ -0,0 +1,123 @@
+"""Harness core — the platform contract that turns 'a dashboard' into 'a product'.
+
+Three concepts:
+ Connector a source adapter (Odoo / QuickBooks / Amazon / …). Declares its capabilities and
+ answers canonical Queries. Adding a source = subclass Connector.
+ Tenant one client (Royal Imports, …). Bundles the connectors they've hooked up + their scope
+ config (business units, excluded accounts, channel map, branding). Multi-tenant lives here.
+ Skill a portable dashboard/metric written ONCE against the canonical model; it declares the
+ capabilities it needs so a tenant only ever sees skills its sources can serve.
+
+The UI (app.py) becomes a thin renderer over (tenant → available skills). Nothing above the
+connector layer knows what Odoo is.
+"""
+from __future__ import annotations
+from abc import ABC, abstractmethod
+from dataclasses import dataclass, field
+from typing import Callable
+from .canonical import Capability, Query, Entity
+
+
+class Connector(ABC):
+ """A data source. Implement `capabilities()` + `aggregate()` (and optionally `records()`), map the
+ canonical model to the source, and the source is usable by every compatible skill."""
+ key: str = 'connector'
+ name: str = 'Connector'
+
+ @abstractmethod
+ def capabilities(self) -> set[Capability]:
+ """The canonical capabilities this source can serve for the given account."""
+
+ @abstractmethod
+ def aggregate(self, q: Query) -> list[dict]:
+ """Answer an aggregate Query → list of canonical dicts (keys = measures/group_by, + 'count')."""
+
+ def records(self, q: Query) -> list[dict]:
+ """Optional row-level fetch (canonical dicts). Default: not supported."""
+ raise NotImplementedError(f'{self.key}: row-level records() not implemented')
+
+ def distinct_count(self, q: Query, fieldname: str) -> int:
+ """Number of distinct values of a canonical field over the query's scope (e.g. active
+ customers). Default: derive from an aggregate group_by; connectors may override efficiently."""
+ from dataclasses import replace
+ rows = self.aggregate(replace(q, measures=(), aggregate='count', group_by=(fieldname,)))
+ return sum(1 for r in rows if r.get(fieldname) not in (None, False))
+
+ def supports(self, cap: Capability) -> bool:
+ return cap in self.capabilities()
+
+ def entities(self) -> set[Entity]:
+ """Canonical entities this connector can materialize (advertised by subclasses)."""
+ return set()
+
+
+@dataclass
+class Tenant:
+ """One client of the platform. `sources` maps a connector key → Connector instance. `config` holds
+ the client's scope semantics (which is what used to be hard-coded in core/odoo.py):
+ business_units {label: source_scope_value} e.g. {'Fisch': 5, 'Royal': 6}
+ confirmed_statuses [...] which order states count as 'real'
+ excluded_customers [ids] house / inter-co accounts to drop
+ channels {label: match} e.g. {'Amazon': } (marketplace split)
+ branding {...} palette, name, logo
+ A skill reads tenant.config for scope and asks tenant.source(capability) for the right connector."""
+ key: str
+ name: str
+ sources: dict[str, Connector] = field(default_factory=dict)
+ config: dict = field(default_factory=dict)
+
+ def add(self, conn: Connector) -> 'Tenant':
+ self.sources[conn.key] = conn
+ return self
+
+ def capabilities(self) -> set[Capability]:
+ caps: set[Capability] = set()
+ for c in self.sources.values():
+ caps |= c.capabilities()
+ return caps
+
+ def source(self, cap: Capability, prefer: str | None = None) -> Connector:
+ """The connector that serves `cap` (a tenant may hook several sources; `prefer` picks one,
+ else first that supports it). Raises if no connected source provides the capability."""
+ if prefer and prefer in self.sources and self.sources[prefer].supports(cap):
+ return self.sources[prefer]
+ for c in self.sources.values():
+ if c.supports(cap):
+ return c
+ raise LookupError(f"tenant {self.key!r} has no source for capability {cap.value!r}")
+
+ def has(self, *caps: Capability) -> bool:
+ mine = self.capabilities()
+ return all(c in mine for c in caps)
+
+
+# --------------------------------------------------------------------------- skill registry
+@dataclass(frozen=True)
+class Skill:
+ """A portable dashboard. `requires` are the capabilities it needs; the harness only offers it to a
+ tenant whose connected sources cover them. `render` is the UI entrypoint (given tenant + context)."""
+ key: str
+ label: str
+ requires: tuple[Capability, ...]
+ render: Callable | None = None
+ hq: bool = False # consolidated / company-level (ignores the business-unit filter)
+
+ def available_for(self, tenant: Tenant) -> bool:
+ return tenant.has(*self.requires)
+
+
+_SKILLS: dict[str, Skill] = {}
+
+
+def register_skill(skill: Skill) -> Skill:
+ _SKILLS[skill.key] = skill
+ return skill
+
+
+def skills_for(tenant: Tenant) -> list[Skill]:
+ """The skills a tenant can actually run, given its connected sources — this is the dynamic nav."""
+ return [s for s in _SKILLS.values() if s.available_for(tenant)]
+
+
+def all_skills() -> list[Skill]:
+ return list(_SKILLS.values())
diff --git a/platform/harness/canonical.py b/platform/harness/canonical.py
new file mode 100644
index 0000000000000000000000000000000000000000..8b0f3337e9ad132f6e8b9e3cff40875c1bc4cb78
--- /dev/null
+++ b/platform/harness/canonical.py
@@ -0,0 +1,101 @@
+"""Canonical financial data model — the SHARED vocabulary of the harness.
+
+Skills speak ONLY in these terms; connectors (Odoo / QuickBooks / Amazon / …) translate them to
+their own source. This is the seam that decouples the dashboards from any single system: add a new
+source by writing a connector that maps its API onto these entities/fields — every skill that needs
+only the capabilities that source provides then works, unchanged.
+
+Design rules:
+- Entities and canonical field names are source-agnostic (no `amount_untaxed`, no `sale.order`).
+- A skill builds a `Query` (what business question), a connector answers it (how, per source).
+- Capabilities let a skill declare what it needs and a tenant show only the dashboards its
+ connected sources can actually serve.
+"""
+from __future__ import annotations
+from dataclasses import dataclass, field
+from enum import Enum
+from typing import Any
+
+
+class Capability(str, Enum):
+ """What a connector can serve. Skills require a set of these; a tenant's nav is the union of
+ what its connectors provide. (A pure-accounting source like QuickBooks has LEDGER+INVOICING+
+ CUSTOMERS but not SKU-level SALES velocity; Amazon has SALES but no LEDGER; Odoo has all.)"""
+ SALES = 'sales' # orders / order lines (SKU-level revenue, units)
+ INVOICING = 'invoicing' # customer invoices + credit notes (AR, returns)
+ LEDGER = 'ledger' # GL accounts + journal lines (P&L, balance sheet)
+ PAYABLES = 'payables' # vendor bills / AP
+ INVENTORY = 'inventory' # on-hand stock levels + valuation
+ PRODUCTS = 'products' # product master (SKU, category, cost)
+ CUSTOMERS = 'customers' # customer master (name, geo, assigned agent)
+
+
+class Entity(str, Enum):
+ """Canonical business objects. Each connector declares which it can materialize."""
+ SALES_ORDER = 'sales_order'
+ SALES_ORDER_LINE = 'sales_order_line'
+ INVOICE = 'invoice' # customer invoice / credit note
+ JOURNAL_LINE = 'journal_line' # GL posting
+ GL_ACCOUNT = 'gl_account'
+ VENDOR_BILL = 'vendor_bill'
+ STOCK_LEVEL = 'stock_level'
+ PRODUCT = 'product'
+ CUSTOMER = 'customer'
+
+
+# Canonical field names per entity — the ONLY field identifiers a skill may use. Connectors own the
+# mapping to their native fields. `date` is the entity's primary time axis (used by Query windows).
+FIELDS: dict[Entity, set[str]] = {
+ Entity.SALES_ORDER: {'date', 'amount', 'customer', 'salesperson', 'agent', 'status', 'business_unit', 'channel'},
+ Entity.SALES_ORDER_LINE: {'date', 'amount', 'qty', 'margin', 'product', 'category', 'customer', 'status', 'business_unit'},
+ Entity.INVOICE: {'date', 'amount', 'customer', 'doc_type', 'status', 'salesperson', 'business_unit'},
+ Entity.JOURNAL_LINE: {'date', 'amount', 'account', 'account_type', 'business_unit', 'status'},
+ Entity.GL_ACCOUNT: {'code', 'name', 'type'},
+ Entity.VENDOR_BILL: {'date', 'amount', 'vendor', 'status'},
+ Entity.STOCK_LEVEL: {'product', 'qty', 'value', 'location'},
+ Entity.PRODUCT: {'id', 'code', 'name', 'category', 'cost', 'active'},
+ Entity.CUSTOMER: {'id', 'name', 'city', 'state', 'agent', 'active'},
+}
+
+# Allowed filter/aggregate vocabulary (connectors translate these; they never see source operators).
+OPS = frozenset({'eq', 'ne', 'in', 'not_in', 'gte', 'lte', 'gt', 'lt', 'like'})
+AGGS = frozenset({'sum', 'count', 'avg', 'min', 'max'})
+GRAINS = frozenset({'day', 'week', 'month', 'quarter', 'year'}) # time-bucket for a trend
+
+
+@dataclass(frozen=True)
+class Filter:
+ """A canonical predicate: (canonical_field, op, value). op ∈ OPS."""
+ fieldname: str
+ op: str
+ value: Any
+
+ def __post_init__(self):
+ if self.op not in OPS:
+ raise ValueError(f'unknown op {self.op!r}; allowed {sorted(OPS)}')
+
+
+@dataclass(frozen=True)
+class Query:
+ """A source-agnostic analytical request. `measures` are canonical fields aggregated by `aggregate`,
+ optionally grouped by canonical `group_by` fields, filtered by `filters`, over [date_from, date_to]
+ on the entity's `date` axis. A connector returns a list of plain dicts keyed by the canonical
+ measure/group names (+ 'count'). Skills post-process those dicts — never source rows."""
+ entity: Entity
+ measures: tuple[str, ...] = ()
+ aggregate: str = 'sum'
+ group_by: tuple[str, ...] = ()
+ filters: tuple[Filter, ...] = ()
+ date_from: str | None = None
+ date_to: str | None = None
+ grain: str | None = None # bucket the date axis into a trend; result rows carry 'period' (e.g. '2026-05')
+
+ def __post_init__(self):
+ if self.aggregate not in AGGS:
+ raise ValueError(f'unknown aggregate {self.aggregate!r}')
+ if self.grain is not None and self.grain not in GRAINS:
+ raise ValueError(f'unknown grain {self.grain!r}; allowed {sorted(GRAINS)}')
+ valid = FIELDS.get(self.entity, set())
+ for f in list(self.measures) + list(self.group_by) + [x.fieldname for x in self.filters]:
+ if f not in valid:
+ raise ValueError(f'{f!r} is not a canonical field of {self.entity.value} (have {sorted(valid)})')
diff --git a/platform/harness/chatlog.py b/platform/harness/chatlog.py
new file mode 100644
index 0000000000000000000000000000000000000000..9f09aad200ae632610c331cd0ebea43c89a87b04
--- /dev/null
+++ b/platform/harness/chatlog.py
@@ -0,0 +1,102 @@
+"""harness/chatlog.py — durable Analyst conversations (2026-07-16).
+
+Every Analyst conversation is a logged SESSION that survives reruns, page navigation and Space
+restarts. Persistence rides the platform's only writable store (core/store.py → the private HF
+dataset), the SAME mechanism as users/notes — Odoo stays read-only.
+
+Shape (store key 'analyst_sessions'): { username: [ session, ... ] } (newest first), each
+ session = {id, title, started_at, updated_at, ui:[[role,content,artifacts],...],
+ llm:[{role,content},...]}.
+ui = the redisplay transcript; llm = the trimmed model-context transcript.
+
+Write posture (per the design review): the LIVE turn stays in st.session_state for a snappy chat;
+we persist in a BACKGROUND daemon thread (core/store.update is a full dataset commit — never block
+the UI on it), and bound growth (MAX_SESSIONS per user, MAX_TURNS per session) so the JSON stays
+small. A failed/absent store degrades to in-memory only (chat still works this session).
+"""
+import threading
+import time
+import uuid
+
+import core.store as store
+
+KEY = "analyst_sessions"
+MAX_SESSIONS = 40 # keep the last N conversations per user (bounds the JSON)
+MAX_TURNS = 60 # ui/llm entries kept per conversation
+TITLE_LEN = 60
+
+
+def new_id():
+ return uuid.uuid4().hex[:12]
+
+
+def new_session(sid=None):
+ now = time.strftime("%Y-%m-%d %H:%M:%S")
+ return {"id": sid or new_id(), "title": "", "started_at": now, "updated_at": now,
+ "ui": [], "llm": []}
+
+
+def _safe(obj):
+ """JSON round-trip a value (chart/kpi artifacts) so only serializable content is stored;
+ anything that won't serialize is dropped rather than breaking the whole write."""
+ import json
+ try:
+ return json.loads(json.dumps(obj, default=str))
+ except Exception:
+ return None
+
+
+def load_sessions(username):
+ """The user's conversations, newest first (lenient read — never raises on a store blip)."""
+ if not store.available():
+ return []
+ try:
+ all_s = store.get(KEY) or {}
+ except Exception:
+ return []
+ return list(all_s.get(username, []))
+
+
+def touch(session, question):
+ """Stamp updated_at and derive a title from the first user question."""
+ session["updated_at"] = time.strftime("%Y-%m-%d %H:%M:%S")
+ if not session.get("title") and question:
+ t = " ".join(str(question).split())
+ session["title"] = t[:TITLE_LEN] + ("…" if len(t) > TITLE_LEN else "")
+ # bound in-memory transcript length (keep the most recent turns)
+ if len(session.get("ui", [])) > MAX_TURNS:
+ session["ui"] = session["ui"][-MAX_TURNS:]
+ if len(session.get("llm", [])) > MAX_TURNS:
+ session["llm"] = session["llm"][-MAX_TURNS:]
+ return session
+
+
+def upsert(sessions, session):
+ """Return the sessions list with `session` moved to the front (deduped by id), capped."""
+ out = [s for s in (sessions or []) if s.get("id") != session.get("id")]
+ out.insert(0, session)
+ return out[:MAX_SESSIONS]
+
+
+def _persist(username, session):
+ # sanitize artifacts for storage (charts are plain dicts; drop any non-serializable stragglers)
+ stored = dict(session)
+ stored["ui"] = [[role, content, [a for a in (_safe(x) for x in (arts or [])) if a is not None]]
+ for (role, content, arts) in session.get("ui", [])]
+
+ def _fn(data):
+ data = data or {}
+ data[username] = upsert(data.get(username, []), stored)
+ return data
+ try:
+ store.update(KEY, _fn)
+ except Exception:
+ pass # store blip / no token → in-memory only this run
+
+
+def save_async(username, session):
+ """Persist in a daemon thread so the chat never waits on a dataset commit."""
+ if not store.available():
+ return
+ threading.Thread(target=_persist, args=(username, dict(session)),
+ daemon=True, name="analyst-chatlog").start()
diff --git a/platform/harness/connectors/__init__.py b/platform/harness/connectors/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..0b1197d1f9dcafee9fa927dcf2738b0dca5e9358
--- /dev/null
+++ b/platform/harness/connectors/__init__.py
@@ -0,0 +1 @@
+"""Source connectors — one module per system (odoo, quickbooks, amazon, ...)."""
diff --git a/platform/harness/connectors/odoo.py b/platform/harness/connectors/odoo.py
new file mode 100644
index 0000000000000000000000000000000000000000..e029d8a61687edc07ed806e8e93e63dc0afe014e
--- /dev/null
+++ b/platform/harness/connectors/odoo.py
@@ -0,0 +1,172 @@
+"""Odoo connector — the reference implementation.
+
+ALL Odoo specifics (model names, field names, XML-RPC quirks, the read_group dot-path gotchas) live
+here and nowhere else. It maps the canonical model onto the existing, battle-tested `core.odoo` data
+layer (read-only, write-guarded) so nothing is re-plumbed — the harness just gives it a source-agnostic
+face. Every other connector (QuickBooks, Amazon, …) is a sibling of this file.
+"""
+from __future__ import annotations
+import sys
+from dataclasses import replace
+from functools import lru_cache
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[2])) # platform/
+import core.odoo as O
+from harness.canonical import Capability, Entity, Query, Filter
+
+
+@lru_cache(maxsize=8)
+def _product_category_map(tenant_slug='royal-imports'):
+ """product_id -> main category name (Odoo-side enrichment; reuses the existing resolver).
+ Keyed by tenant so one client's category map never folds another's rows — the resolver
+ reads through get_odoo(), which is binding-aware, so the caller must already be inside
+ the tenant's scope when this misses the cache."""
+ import modules.sales as _sales
+ return _sales._product_cat()
+
+
+def _replace_group(q: Query, new_group_by):
+ return replace(q, group_by=new_group_by, grain=None)
+
+_OPS = {'eq': '=', 'ne': '!=', 'in': 'in', 'not_in': 'not in',
+ 'gte': '>=', 'lte': '<=', 'gt': '>', 'lt': '<', 'like': 'ilike'}
+
+# Canonical entity -> Odoo model + (canonical field -> Odoo field) + its time axis.
+_MAP = {
+ Entity.SALES_ORDER: {
+ 'model': 'sale.order', 'date': 'date_order', 'dt': True,
+ 'f': {'amount': 'amount_untaxed', 'customer': 'partner_id', 'salesperson': 'user_id',
+ 'status': 'state', 'business_unit': 'team_id'}},
+ Entity.SALES_ORDER_LINE: {
+ 'model': 'sale.order.line', 'date': 'order_id.date_order', 'dt': True,
+ 'f': {'amount': 'price_subtotal', 'qty': 'product_uom_qty', 'margin': 'margin',
+ 'product': 'product_id', 'customer': 'order_partner_id',
+ 'status': 'order_id.state', 'business_unit': 'order_id.team_id'}},
+ Entity.INVOICE: {
+ 'model': 'account.move', 'date': 'invoice_date', 'dt': False,
+ 'f': {'amount': 'amount_untaxed_signed', 'customer': 'partner_id', 'doc_type': 'move_type',
+ 'status': 'state', 'salesperson': 'invoice_user_id', 'business_unit': 'team_id'}},
+ Entity.STOCK_LEVEL: {
+ 'model': 'stock.quant', 'date': None, 'dt': False,
+ 'f': {'product': 'product_id', 'qty': 'quantity', 'location': 'location_id'}},
+ Entity.PRODUCT: {
+ 'model': 'product.product', 'date': None, 'dt': False,
+ 'f': {'id': 'id', 'code': 'default_code', 'name': 'name', 'category': 'categ_id',
+ 'cost': 'standard_price', 'active': 'active'}},
+ Entity.CUSTOMER: {
+ 'model': 'res.partner', 'date': None, 'dt': False,
+ 'f': {'id': 'id', 'name': 'name', 'city': 'city', 'state': 'state_id',
+ 'agent': 'agent_ids', 'active': 'active'}},
+}
+
+
+class OdooConnector:
+ key = 'odoo'
+ name = 'Odoo ERP'
+
+ def __init__(self, doc_mode: str = 'order', tenant_slug: str = 'royal-imports',
+ creds: dict | None = None, scope: dict | None = None):
+ """R3 keychain cutover: `creds` = the TENANT's stored {url, db, user, api_key} (None =
+ tenant #0 via env — the only tenant allowed that fallback; core.odoo fails closed for
+ everyone else). `scope` pushes the tenant's config into the binding: team_ids,
+ team_names, exclude_partner_names — core/ cannot import harness/, so config travels
+ down through `tenant_scope` rather than being read up."""
+ self._doc_mode = doc_mode
+ self._slug = str(tenant_slug or 'royal-imports')
+ self._creds = dict(creds) if creds else None
+ self._scope = dict(scope) if scope else {}
+
+ def _bound(self):
+ """Every query runs inside the tenant's binding — connection AND scope constants."""
+ return O.tenant_scope(self._slug, self._creds,
+ team_ids=self._scope.get('team_ids'),
+ team_names=self._scope.get('team_names'),
+ exclude_partner_names=self._scope.get('exclude_partner_names'))
+
+ def capabilities(self) -> set[Capability]:
+ return {Capability.SALES, Capability.INVOICING, Capability.LEDGER, Capability.PAYABLES,
+ Capability.INVENTORY, Capability.PRODUCTS, Capability.CUSTOMERS}
+
+ def entities(self) -> set[Entity]:
+ return set(_MAP)
+
+ def supports(self, cap: Capability) -> bool:
+ return cap in self.capabilities()
+
+ # ------------------------------------------------------------------ query translation
+ def _domain(self, q: Query, meta):
+ dom = []
+ if q.date_from and meta['date']:
+ dom.append((meta['date'], '>=', q.date_from + (' 00:00:00' if meta['dt'] else '')))
+ if q.date_to and meta['date']:
+ dom.append((meta['date'], '<=', q.date_to + (' 23:59:59' if meta['dt'] else '')))
+ for flt in q.filters:
+ dom.append((meta['f'].get(flt.fieldname, flt.fieldname), _OPS[flt.op], flt.value))
+ return dom
+
+ def aggregate(self, q: Query) -> list[dict]:
+ meta = _MAP[q.entity]
+ with self._bound():
+ O.set_doc_mode(self._doc_mode)
+ # 'category' isn't a native line field (dot-path groupby fails) — enrich from the product master.
+ if 'category' in q.group_by:
+ return self._by_category(q, meta)
+ dom = self._domain(q, meta)
+ measures = [f"{meta['f'].get(m, m)}:{q.aggregate}" for m in q.measures]
+ groupby = [meta['f'].get(g, g) for g in q.group_by]
+ if q.grain and meta['date']: # time-bucket -> Odoo's date:grain groupby
+ groupby.append(f"{meta['date']}:{q.grain}")
+ rows = O.read_group(meta['model'], dom, measures, groupby, lazy=False)
+ return [self._canon_row(r, q, meta) for r in rows]
+
+ def _canon_row(self, r, q, meta):
+ rec = {}
+ for m in q.measures:
+ rec[m] = r.get(meta['f'].get(m, m)) or 0.0
+ for g in q.group_by:
+ v = r.get(meta['f'].get(g, g))
+ rec[g] = ({'id': O.m2o_id(v), 'name': O.m2o_name(v)} if isinstance(v, (list, tuple)) else v)
+ if q.grain and meta['date']:
+ rng = (r.get('__range') or {}).get(f"{meta['date']}:{q.grain}") or {}
+ rec['period'] = (rng.get('from') or '')[:7]
+ rec['count'] = r.get('__count') or 0
+ return rec
+
+ def _by_category(self, q, meta):
+ """Group SALES_ORDER_LINE by main product category by grouping on product then folding
+ product->category in-connector (source-specific enrichment lives here, not in the skill).
+ Only ever called from inside aggregate()'s binding, so the map resolves via this
+ tenant's connection on a cache miss."""
+ catmap = _product_category_map(self._slug)
+ sub = _replace_group(q, tuple(g for g in q.group_by if g != 'category') + ('product',))
+ agg = {}
+ for r in self.aggregate(sub):
+ prod = r.get('product') or {}
+ cat = catmap.get(prod.get('id') if isinstance(prod, dict) else prod, '(uncategorized)')
+ e = agg.setdefault(cat, {'category': cat, 'count': 0})
+ for m in q.measures:
+ e[m] = e.get(m, 0.0) + (r.get(m) or 0.0)
+ e['count'] += r.get('count') or 0
+ return sorted(agg.values(), key=lambda x: -(x.get(q.measures[0]) if q.measures else 0))
+
+ def distinct_count(self, q: Query, fieldname: str) -> int:
+ meta = _MAP[q.entity]
+ with self._bound():
+ O.set_doc_mode(self._doc_mode)
+ return O.distinct_count(meta['model'], self._domain(q, meta),
+ meta['f'].get(fieldname, fieldname))
+
+ def records(self, q: Query) -> list[dict]:
+ meta = _MAP[q.entity]
+ with self._bound():
+ O.set_doc_mode(self._doc_mode)
+ fields = [meta['f'].get(m, m) for m in (q.measures or tuple(meta['f']))]
+ rows = O.search_read(meta['model'], self._domain(q, meta), fields)
+ inv = {v: k for k, v in meta['f'].items()}
+ return [{inv.get(k, k): (O.m2o_name(v) if isinstance(v, (list, tuple)) else v)
+ for k, v in r.items()} for r in rows]
+
+ # convenience for tenant setup: resolve names → ids for scope config
+ @staticmethod
+ def excluded_customer_ids() -> list[int]:
+ return list(O.excluded_partner_ids())
diff --git a/platform/harness/connectors/quickbooks.py b/platform/harness/connectors/quickbooks.py
new file mode 100644
index 0000000000000000000000000000000000000000..c6f771fd27321b4e8196395d3c7015dbf0d45617
--- /dev/null
+++ b/platform/harness/connectors/quickbooks.py
@@ -0,0 +1,37 @@
+"""QuickBooks Online connector — STUB (scaffolding for the next real integration).
+
+It exists to prove the harness is source-agnostic: it declares the capabilities QBO actually has
+(accounting + AR + customers, but NOT SKU-level sales velocity or warehouse inventory), so the
+platform will automatically OFFER ledger/AR/customer skills on a QuickBooks-only tenant and HIDE the
+SKU/inventory skills — no per-skill if-statements anywhere. Fill in aggregate() against the QBO
+Reports/Query API (OAuth2) to make it live.
+"""
+from __future__ import annotations
+from harness.canonical import Capability, Entity, Query
+
+
+class QuickBooksConnector:
+ key = 'quickbooks'
+ name = 'QuickBooks Online'
+
+ def __init__(self, realm_id: str | None = None, token: str | None = None):
+ self.realm_id = realm_id
+ self._token = token # OAuth2 access token (never logged)
+
+ def capabilities(self) -> set[Capability]:
+ # QBO gives you the books + receivables + the customer list; it does not model SKU-level
+ # order lines or physical stock the way an ERP/marketplace does.
+ return {Capability.LEDGER, Capability.INVOICING, Capability.PAYABLES, Capability.CUSTOMERS}
+
+ def entities(self) -> set[Entity]:
+ return {Entity.INVOICE, Entity.JOURNAL_LINE, Entity.GL_ACCOUNT, Entity.VENDOR_BILL, Entity.CUSTOMER}
+
+ def supports(self, cap: Capability) -> bool:
+ return cap in self.capabilities()
+
+ def aggregate(self, q: Query) -> list[dict]:
+ raise NotImplementedError(
+ "QuickBooksConnector.aggregate: TODO — translate the canonical Query to the QBO "
+ "Query/Reports API (GET /v3/company/{realm}/query) and map rows back to canonical dicts. "
+ "Entity map: INVOICE->Invoice/CreditMemo, JOURNAL_LINE->JournalEntry lines, "
+ "GL_ACCOUNT->Account, VENDOR_BILL->Bill, CUSTOMER->Customer.")
diff --git a/platform/harness/datastore.py b/platform/harness/datastore.py
new file mode 100644
index 0000000000000000000000000000000000000000..4cb3126cdd0a7bbfb649d473269839cbe79f92ff
--- /dev/null
+++ b/platform/harness/datastore.py
@@ -0,0 +1,750 @@
+"""harness/store.py — the tenant data store (OM-1, 2026-07-11).
+
+Incremental Odoo → DuckDB mirror: the local analytical store that saved views/dashboards (OM-3)
+and the AI Analyst's tools (OM-4) query at warehouse speed, instead of hammering live XML-RPC
+per question.
+Plan: .claude/wiki/research/omni-adoption.md Part IV (OM-1) + [[odoo-open-source]] BUILD-NOW #1.
+
+Design rules:
+ - The store is a RAW mirror (unscoped). Business scope (wholesale teams, GIFTWARE exclusion,
+ confirmed-only) is applied by the SEMANTIC layer at query time (OM-2) — one source of truth.
+ - Sync is CHECKPOINTED + BOUNDED + RESUMABLE (loop-library discipline): backfill paginates by
+ id; live mode advances a write_date cursor; every run is bounded by max_batches and safe to
+ kill/re-run (upserts are idempotent).
+ - validate() compares the store against LIVE Odoo (raw fidelity: counts + monthly sums to the
+ cent) — the store never validates itself. Odoo hard-deletes (unlink) don't move write_date;
+ the count checks are the drift detector for those.
+ - Client data: the .duckdb file lives under data/store/ (git-ignored). READ-ONLY on Odoo.
+"""
+import datetime as dt
+import json
+import os
+import sys
+import time
+from pathlib import Path
+
+import duckdb
+
+import core.odoo as O
+
+_STORE_DIR = Path(__file__).resolve().parents[1] / "data" / "store"
+
+# ⚠ MUTABLE ON PURPOSE, and read LATE by every function below (Python resolves a module global at
+# CALL time), which is how `provision_tenant.py` already points a fresh instance at its own file.
+# EXIT-4a (X7) formalises that: `AIOS_DUCKDB_PATH` lets a container name the file without an edit,
+# `path_for()` owns the per-tenant naming convention, and `use_path()` is the SAFE way to switch —
+# see its docstring for why a bare assignment is not.
+# The DEFAULT is unchanged: /data/store/royal.duckdb.
+DB_PATH = Path(os.environ.get("AIOS_DUCKDB_PATH") or (_STORE_DIR / "royal.duckdb"))
+
+
+def path_for(tenant_key):
+ """The canonical DuckDB file for a tenant slug. `royal-imports` keeps the historical
+ `royal.duckdb` name so tenant #0's existing 175 MB file is not orphaned by a rename.
+
+ File-per-tenant IS the isolation model (C1c): DuckDB has no row-level security, so the only
+ boundary that holds is the operating system's — one file, one tenant.
+ """
+ key = str(tenant_key or "").strip().lower()
+ if key in ("", "royal-imports"):
+ return DB_PATH if key == "" else Path(
+ os.environ.get("AIOS_DUCKDB_PATH") or (_STORE_DIR / "royal.duckdb"))
+ safe = "".join(c if (c.isalnum() or c in "-_") else "_" for c in key)[:60]
+ return _STORE_DIR / f"{safe}.duckdb"
+
+
+def use_path(path):
+ """Repoint the store at `path`, CLOSING the process singleton first.
+
+ ⚠ A bare `datastore.DB_PATH = …` is not enough and is the more dangerous half of this
+ operation. `_instance()` caches ONE open connection for the life of the process, so after a
+ plain reassignment every read keeps being served from the PREVIOUSLY opened file — a silent
+ cross-tenant read, returning real rows that belong to somebody else. Closing the connection
+ and clearing the readiness memo (which is also per-file) is what makes the switch honest.
+
+ ⚠ AND CLOSING THE CONNECTION IS STILL NOT ENOUGH ON ITS OWN, because `ro_con()` caches a
+ cursor in a `threading.local`: this function can only clear the CALLING thread's, and
+ `ro_con`'s liveness probe (`SELECT 1`) SUCCEEDS on a cursor whose underlying connection was
+ closed out from under it in some cases — so another thread would keep answering from the old
+ file with no error to notice. The generation counter below is what closes that: `ro_con`
+ compares the generation its cursor was opened under and reopens when it has moved, which is
+ a check no individual thread can forget to do.
+
+ Returns the new path. Callers: `provision_tenant.py`, and any single-tenant worker process.
+ NOT a per-request operation — one process serves one analytical store at a time, which is why
+ `harness.runtime` hands out the PATH rather than switching the global underneath a request.
+ """
+ global DB_PATH
+ with _INSTANCE_LOCK:
+ con = _INSTANCE.get("con")
+ if con is not None:
+ try:
+ con.close()
+ except Exception:
+ pass
+ _INSTANCE["con"] = None
+ _RO_TLS.__dict__.pop("cur", None)
+ _READY["ok"] = False
+ _GENERATION[0] += 1 # every other thread's cached cursor is now stale
+ DB_PATH = Path(path)
+ return DB_PATH
+
+# Entity specs: Odoo model → store table. m2o fields land as _id + _name.
+# 'archivable' entities are pulled with active in [True, False] (the re-SKU/merge rule).
+ENTITIES = {
+ "sale_order": {
+ "model": "sale.order", "archivable": False,
+ "fields": ["name", "date_order", "partner_id", "team_id", "user_id", "state",
+ "amount_untaxed", "invoice_status", "write_date"],
+ },
+ "sale_order_line": {
+ "model": "sale.order.line", "archivable": False,
+ "fields": ["order_id", "order_partner_id", "product_id", "product_uom_qty",
+ "price_subtotal", "margin", "purchase_price", "write_date"],
+ },
+ "res_partner": {
+ "model": "res.partner", "archivable": True,
+ # `agent` (bool, labelled "Creditor/Agent") is THE discriminator between a real sales
+ # AGENT and an internal SALESPERSON who merely carries commission lines — the commission
+ # table itself cannot tell them apart. `salesman_as_agent` ("convert salesman into agent")
+ # marks agents who came from staff; the owner ruling on whether those count as agents is
+ # OUTSTANDING, so both flags are synced and neither reading is baked in.
+ "fields": ["name", "team_id", "city", "state_id", "country_id", "active",
+ "agent", "salesman_as_agent", "write_date"],
+ "backfill_fields": ["agent", "salesman_as_agent"], # added 2026-07-28
+ # m2m fields land as _id (the FIRST linked id — the Customers-module convention:
+ # a customer's assigned agent is agent_ids[0], ~one per customer, MECE) + as a
+ # JSON list of ALL ids. Declared explicitly: a 2-element m2m read would otherwise be
+ # indistinguishable from an m2o (id, name) pair in _flatten.
+ "m2m": ["agent_ids"],
+ },
+ "product_product": {
+ "model": "product.product", "archivable": True,
+ "fields": ["default_code", "name", "categ_id", "type", "standard_price", "active",
+ "write_date"],
+ },
+ "account_move": {
+ "model": "account.move", "archivable": False,
+ "fields": ["name", "move_type", "state", "invoice_date", "invoice_date_due",
+ "partner_id", "amount_untaxed_signed", "amount_residual_signed",
+ "payment_state", "write_date"],
+ },
+ "account_move_line": {
+ "model": "account.move.line", "archivable": False,
+ # display_type/move_type/parent_state/price_subtotal/product_id added 2026-07-28 so the
+ # invoice-LINE grain is queryable (topic `invoice_lines`).
+ # ⚠ display_type values here are 'product', 'cogs', 'payment_term', 'line_note',
+ # 'line_section'. Commission rows attach to 'cogs' lines as well as 'product' ones
+ # (96,936 of 147,160 in 2025). Filtering to 'product' is a GRAIN guard: measured
+ # 2026-07-29, omitting it does not move revenue (non-product lines carry
+ # price_subtotal = 0) but it inflates commission ROW COUNTS ~80% and would corrupt any
+ # count-of-lines measure.
+ "fields": ["move_id", "account_id", "partner_id", "date", "debit", "credit",
+ "balance", "display_type", "move_type", "parent_state", "price_subtotal",
+ "product_id", "write_date"],
+ "backfill_fields": ["display_type", "move_type", "parent_state", "price_subtotal",
+ "product_id"], # added 2026-07-28
+ # the BU bridge: account.move carries NO business unit (every invoice sits on team 1 —
+ # see [[invoice-bu-attribution]]), so Fisch/Royal on the invoice basis is only reachable
+ # through the originating sale order. sale_line_id (the FIRST linked sale line) is
+ # lossless here: ZERO 2025 invoice lines span more than one team (measured).
+ "m2m": ["sale_line_ids"],
+ },
+ "account_invoice_line_agent": {
+ # The OCA sale-commission module: one row per (invoice line × agent). This is the SECOND
+ # agent source — per-line commission attribution — and it names a different population
+ # than res_partner.agent_ids (the customer-master book). See topic `invoice_lines`.
+ # ⚠ TWO similarly-named FKs, do not confuse them:
+ # object_id -> account_move_line (THE grain; join on this)
+ # invoice_id -> account_move (the parent document)
+ "model": "account.invoice.line.agent", "archivable": False,
+ "fields": ["agent_id", "commission_id", "amount", "invoice_id", "object_id",
+ "invoice_date", "settled", "write_date"],
+ },
+ "account_account": {
+ # NOTE: no `active` field on account.account in this Odoo version (learned 2026-07-11 —
+ # a ('active','in',...) domain 500s); treat as non-archivable.
+ "model": "account.account", "archivable": False,
+ "fields": ["code", "name", "account_type", "write_date"],
+ },
+}
+
+BATCH = 2000
+
+# Fields that are genuinely BOOLEAN. This list is load-bearing in TWO places: _cols types the
+# column, and _flatten must NOT collapse a real False into NULL. Odoo returns False both for
+# "empty" and for "boolean false", so a bool field missing from here silently becomes NULL — and
+# for res_partner.agent that would erase the ONE flag separating an AGENT from a SALESPERSON
+# (see [[invoice-line-agent-commission]]): every row would read "not an agent" indistinguishably
+# from "unknown".
+BOOL_FIELDS = ("active", "agent", "salesman_as_agent", "settled", "commission_free")
+
+
+import threading as _thr
+
+_RO_TLS = _thr.local()
+_READY = {"ok": False}
+_INSTANCE = {"con": None}
+_INSTANCE_LOCK = _thr.Lock()
+#: Bumped by `use_path()` whenever the store FILE changes. Every per-thread cursor is stamped with
+#: the generation it was opened under, so a thread that never called `use_path` still cannot keep
+#: reading the previous tenant's file — see `ro_con`. A plain "is the cursor alive?" probe cannot
+#: answer that question, which is why this counter exists rather than more probing.
+_GENERATION = [0]
+
+
+def mark_ready():
+ """In-process signal that the store is fully synced (every entity live). The sync writer calls
+ this after an all-live pass so a reader never has to (re)discover usability by touching the
+ file. Belt-and-suspenders alongside the shared-instance model below."""
+ _READY["ok"] = True
+
+
+def _instance():
+ """THE one process-wide read-write DuckDB connection. Readers take .cursor() off it and the
+ sync writer uses it too — DuckDB serves concurrent reads + a single writer from ONE instance
+ via MVCC, so a read NEVER contends with a sync pass for the file lock.
+
+ This is the fix for the 'connection error unless I refresh' bug (2026-07-16): an independent
+ read-only `duckdb.connect()` FAILS while the writer holds the lock ('Can't open a connection
+ to same database file with a different configuration than existing connections'); a cursor on
+ the shared instance does not. Openers must ensure the file is fully present first — ensure_seed
+ writes atomically (os.replace) and every read path guards on DB_PATH.exists() — so the instance
+ never binds a partial or absent file. (Trade-off: the app now holds the write lock for its whole
+ life, so a SEPARATE process — e.g. mcp_server.py — cannot open the same store file concurrently;
+ in production only the app runs, and that was already true during any sync pass.)"""
+ con = _INSTANCE["con"]
+ if con is not None:
+ return con
+ with _INSTANCE_LOCK:
+ if _INSTANCE["con"] is None:
+ DB_PATH.parent.mkdir(parents=True, exist_ok=True)
+ _INSTANCE["con"] = duckdb.connect(str(DB_PATH))
+ return _INSTANCE["con"]
+
+
+def ro_cursor():
+ """A read cursor on the shared instance — the contention-free way to read the store."""
+ return _instance().cursor()
+
+
+def ready():
+ """True once EVERY entity has completed its backfill (phase 'live'). Gate all store READS on
+ this: a mid-backfill store would return PARTIAL totals silently — worse than an error. Positive
+ results cache for the process (backfill never regresses). Reads via a shared-instance cursor,
+ so it is never mis-reported as 'not ready' just because a background sync pass is mid-flight."""
+ if _READY["ok"]:
+ return True
+ if not DB_PATH.exists():
+ return False
+ try:
+ cur = ro_cursor()
+ try:
+ phases = {r[0]: r[1] for r in
+ cur.execute("SELECT entity, phase FROM _sync_state").fetchall()}
+ finally:
+ cur.close()
+ except Exception:
+ return False
+ if all(phases.get(k) == "live" for k in ENTITIES):
+ _READY["ok"] = True
+ return True
+ return False
+
+
+def ro_con():
+ """Per-thread cached read CURSOR on the shared instance for page/module store reads (the
+ open cost dominates repeated small queries — the Expenses retrofit measured 7.7s→1.0s). No
+ lock contention with the sync writer; a cursor that has gone bad is reopened once. REFUSES
+ until ready() — callers either fall back to live reads (modules) or relay a readable message
+ (Analyst).
+
+ ⚠ THE GENERATION CHECK IS A CORRECTNESS GUARD, NOT AN OPTIMISATION (EXIT-4a). The liveness
+ probe below asks "does this cursor still work?", which is a different question from "is this
+ cursor still pointing at the file we are supposed to be reading?". After `use_path()` switches
+ tenants, a cursor cached in ANOTHER thread's `threading.local` can still answer `SELECT 1` —
+ and would then serve that thread real, plausible rows from the PREVIOUS tenant's file, with no
+ exception anywhere. `use_path` bumps the generation; a cursor opened under an older one is
+ discarded here, which is the only place every thread is guaranteed to pass through."""
+ cur = getattr(_RO_TLS, "cur", None)
+ if cur is not None and getattr(_RO_TLS, "gen", None) != _GENERATION[0]:
+ try:
+ cur.close()
+ except Exception:
+ pass
+ cur, _RO_TLS.cur = None, None # the store moved underneath this thread
+ if cur is not None:
+ try:
+ cur.execute("SELECT 1") # cheap liveness probe
+ return cur
+ except Exception:
+ _RO_TLS.cur = None # stale → reopen below
+ if not ready():
+ raise RuntimeError("the tenant data store is completing its FIRST sync on this "
+ "deployment — dashboards work meanwhile (live reads); retry "
+ "store queries in a few minutes")
+ cur = ro_cursor()
+ _RO_TLS.cur = cur
+ _RO_TLS.gen = _GENERATION[0] # stamp WHICH file this cursor belongs to
+ return cur
+
+
+SEED_DATASET = os.environ.get("STORE_SEED_DATASET", "royal-imports/cfo-os-data")
+
+
+def ensure_seed():
+ """Fresh/ephemeral deployment (HF Space disks reset on every rebuild): hydrate the store
+ from the PRIVATE dataset's seed snapshot — Analyst-ready in ~a minute instead of a 20-40 min
+ XML-RPC backfill; the auto-sync then closes the gap via write_date cursors. Also restores
+ the pilot views/routines when absent. Fail-quiet: no seed/token → normal backfill."""
+ import shutil
+ if DB_PATH.exists():
+ return False
+ tok = os.environ.get("HF_TOKEN")
+ if not tok:
+ return False
+ try:
+ from huggingface_hub import hf_hub_download
+ DB_PATH.parent.mkdir(parents=True, exist_ok=True)
+ p = hf_hub_download(SEED_DATASET, "store_seed/royal.duckdb",
+ repo_type="dataset", token=tok)
+ # Atomic install: copy to a temp path then os.replace — a reader that guards on
+ # DB_PATH.exists() must never bind a half-written file into the shared instance.
+ tmp = DB_PATH.with_name(DB_PATH.name + ".tmp")
+ shutil.copyfile(p, tmp)
+ os.replace(tmp, DB_PATH)
+ for fn in ("views.json", "routines.json"):
+ tgt = DB_PATH.parent / fn
+ if not tgt.exists():
+ try:
+ q = hf_hub_download(SEED_DATASET, f"store_seed/{fn}",
+ repo_type="dataset", token=tok)
+ shutil.copyfile(q, tgt)
+ except Exception:
+ pass
+ return True
+ except Exception:
+ return False
+
+
+def connect():
+ """A cursor on the shared instance for the SYNC WRITER (and status/validate). Returned as a
+ cursor so callers' con.close() frees the cursor without closing the process-wide instance;
+ one writer cursor is active at a time (the sync thread is sequential), readers use others."""
+ cur = _instance().cursor()
+ cur.execute("""CREATE TABLE IF NOT EXISTS _sync_state (
+ entity VARCHAR PRIMARY KEY, phase VARCHAR, last_id BIGINT,
+ cursor_wd VARCHAR, rows BIGINT, updated_at VARCHAR)""")
+ return cur
+
+
+def _flatten(rec, fields, m2m=()):
+ out = {"id": rec["id"]}
+ for f in m2m:
+ v = rec.get(f) or []
+ base = f.removesuffix("_ids")
+ out[f"{base}_id"] = v[0] if v else None
+ out[f] = json.dumps(list(v)) if v else None
+ for f in fields:
+ v = rec.get(f)
+ if isinstance(v, (list, tuple)) and len(v) == 2 and isinstance(v[0], int):
+ out[f"{f.removesuffix('_id')}_id"] = v[0]
+ out[f"{f.removesuffix('_id')}_name"] = str(v[1])
+ elif isinstance(v, (list, tuple)):
+ out[f] = json.dumps(v)
+ elif v is False and f not in BOOL_FIELDS: # Odoo False = NULL for non-bool fields
+ out[f] = None
+ else:
+ out[f] = v
+ return out
+
+
+def _cols(spec):
+ cols = ["id BIGINT PRIMARY KEY"]
+ for f in spec["fields"]:
+ base = f.removesuffix("_id")
+ if f.endswith("_id"):
+ cols += [f"{base}_id BIGINT", f"{base}_name VARCHAR"]
+ elif f in BOOL_FIELDS:
+ cols.append(f"{f} BOOLEAN")
+ elif f in ("amount_untaxed", "amount_untaxed_signed", "amount_residual_signed",
+ "price_subtotal", "margin", "purchase_price", "product_uom_qty",
+ "standard_price", "debit", "credit", "balance", "amount"):
+ cols.append(f"{f} DOUBLE")
+ else:
+ cols.append(f"{f} VARCHAR")
+ for f in spec.get("m2m") or []:
+ base = f.removesuffix("_ids")
+ cols += [f"{base}_id BIGINT", f"{f} VARCHAR"]
+ return cols
+
+
+def _ensure_table(con, key, spec):
+ con.execute(f"CREATE TABLE IF NOT EXISTS {key} ({', '.join(_cols(spec))})")
+
+
+def _ensure_columns(con, key, spec):
+ """Schema evolution: existing stores/seeds predate columns a newer spec introduces —
+ CREATE TABLE IF NOT EXISTS won't add them. Returns the newly added column names."""
+ have = {r[1] for r in con.execute(f"PRAGMA table_info('{key}')").fetchall()}
+ added = []
+ for c in _cols(spec):
+ name = c.split()[0]
+ if name not in have:
+ con.execute(f"ALTER TABLE {key} ADD COLUMN {c}")
+ added.append(name)
+ return added
+
+
+def _field_cols(f):
+ """The store column(s) one spec field materialises into (m2o fields become _id + _name)."""
+ if f.endswith("_id"):
+ base = f.removesuffix("_id")
+ return [f"{base}_id", f"{base}_name"]
+ return [f]
+
+
+def _backfill_columns(con, key, spec, log=print):
+ """Scalar/m2o schema evolution — the twin of _backfill_m2m, and for the same reason.
+
+ _ensure_columns ALTERs a new column in, but existing rows NEVER re-sync (WE moved the schema;
+ their write_date didn't move), so a newly added field stays NULL forever — silently, and NULL
+ is indistinguishable from a legitimately empty value. That is how a store starts answering
+ 'no rows match' instead of erroring. Re-pull just the affected fields for every row,
+ paginated by id, marked durably so a crash retries rather than declaring completion.
+
+ The fields are DECLARED in the spec (`backfill_fields`), never inferred from "which columns
+ did _ensure_columns just add" — that inference is wrong on the second run, when the ALTER has
+ already happened and the list comes back empty while the data is still missing. Declaring it
+ makes the migration re-entrant and reviewable. Leave the entry in place after it completes;
+ the durable marker, not the absence of the declaration, is what stops it re-running.
+ """
+ fields = [f for f in (spec.get("backfill_fields") or []) if f != "write_date"]
+ if not fields:
+ return
+ marker = f"{key}.cols.{','.join(sorted(fields))}"
+ st = con.execute("SELECT phase, last_id, rows FROM _sync_state WHERE entity=?",
+ [marker]).fetchone()
+ if st and st[0] == "done":
+ return
+ # RESUMABLE, not restart-from-zero: these passes run to ~1M rows, and a migration that loses
+ # an hour of work to one dropped connection gets skipped by the next person under time
+ # pressure. Progress is checkpointed every page; 'done' is written only at the end, so an
+ # interrupted run resumes at the last committed id instead of re-pulling or, worse, declaring
+ # completion it never reached.
+ last, n = (st[1] or 0, st[2] or 0) if st else (0, 0)
+ if last:
+ log(f" {key}: column backfill resuming at id {last:,} ({n:,} rows already done)")
+ cols = [c for f in fields for c in _field_cols(f)]
+ setter = ", ".join(f"{c}=?" for c in cols)
+ while True:
+ recs = O.search_read(spec["model"], _base_domain(spec) + [("id", ">", last)],
+ fields, limit=5000, order="id asc")
+ if not recs:
+ break
+ rows = [_flatten(r, fields) for r in recs]
+ con.executemany(f"UPDATE {key} SET {setter} WHERE id=?",
+ [[r.get(c) for c in cols] + [r["id"]] for r in rows])
+ last, n = recs[-1]["id"], n + len(recs)
+ con.execute("INSERT OR REPLACE INTO _sync_state VALUES (?,?,?,?,?,?)",
+ [marker, "running", last, None, n, time.strftime("%Y-%m-%d %H:%M:%S")])
+ log(f" {key}: column backfill {'+'.join(fields)} -> id {last:,} ({n:,} rows)")
+ con.execute("INSERT OR REPLACE INTO _sync_state VALUES (?,?,?,?,?,?)",
+ [marker, "done", last, None, n, time.strftime("%Y-%m-%d %H:%M:%S")])
+ log(f" {key}: column backfill complete -> {n:,} rows")
+
+
+def _backfill_m2m(con, key, spec, log=print):
+ """One-time targeted backfill after a schema migration: existing rows never re-sync (their
+ write_date didn't move when WE added a column), so pull every record where the m2m field is
+ SET and update in place. Rows with the field empty keep NULL — correct and free. Completion
+ is a durable _sync_state marker ('.m2m.') — NOT 'column just added': a crash
+ between the ALTER and this backfill (seen live: the SSL-failed first run) must retry."""
+ for f in spec.get("m2m") or []:
+ marker = f"{key}.m2m.{f}"
+ if con.execute("SELECT 1 FROM _sync_state WHERE entity=?", [marker]).fetchone():
+ continue
+ base = f.removesuffix("_ids")
+ # PAGINATED by id. A single limit=100000 call silently TRUNCATED here: account_move_line
+ # has 228,067 rows with sale_line_ids set, so 56% of the BU bridge would have gone
+ # missing with no error — a partial backfill that reads as a complete one (the
+ # [[no-unverifiable-aggregates]] no-silent-caps rule).
+ rows, last, page = [], 0, 20000
+ while True:
+ recs = O.search_read(spec["model"],
+ _base_domain(spec) + [(f, "!=", False), ("id", ">", last)],
+ [f], limit=page, order="id asc")
+ if not recs:
+ break
+ rows += [(r[f][0], json.dumps(list(r[f])), r["id"]) for r in recs if r.get(f)]
+ last = recs[-1]["id"]
+ log(f" {key}: m2m {f} scanned to id {last:,} ({len(rows):,} rows)")
+ if rows:
+ con.executemany(f"UPDATE {key} SET {base}_id=?, {f}=? WHERE id=?", rows)
+ con.execute("INSERT OR REPLACE INTO _sync_state VALUES (?,?,?,?,?,?)",
+ [marker, "done", 0, None, len(rows), time.strftime("%Y-%m-%d %H:%M:%S")])
+ log(f" {key}: m2m backfill {f} -> {len(rows):,} rows updated")
+
+
+def _upsert(con, key, spec, recs):
+ if not recs:
+ return
+ rows = [_flatten(r, spec["fields"], spec.get("m2m") or ()) for r in recs]
+ colnames = [c.split()[0] for c in _cols(spec)]
+ ids = [r["id"] for r in rows]
+ con.execute(f"DELETE FROM {key} WHERE id IN ({','.join(map(str, ids))})")
+ con.executemany(
+ f"INSERT INTO {key} ({', '.join(colnames)}) VALUES ({', '.join('?' for _ in colnames)})",
+ [[r.get(c) for c in colnames] for r in rows])
+
+
+def _state(con, key):
+ row = con.execute("SELECT phase, last_id, cursor_wd, rows FROM _sync_state WHERE entity=?",
+ [key]).fetchone()
+ return {"phase": row[0], "last_id": row[1], "cursor_wd": row[2], "rows": row[3]} if row else None
+
+
+def _save_state(con, key, phase, last_id, cursor_wd):
+ n = con.execute(f"SELECT count(*) FROM {key}").fetchone()[0]
+ con.execute("""INSERT OR REPLACE INTO _sync_state VALUES (?,?,?,?,?,?)""",
+ [key, phase, last_id, cursor_wd, n, time.strftime("%Y-%m-%d %H:%M:%S")])
+
+
+def _base_domain(spec):
+ return [("active", "in", [True, False])] if spec["archivable"] else []
+
+
+def sync_entity(key, max_batches=200, batch=BATCH, log=print):
+ """One bounded, resumable sync pass for an entity. Backfill (by id) → live (by write_date).
+ Returns (phase, pulled_rows)."""
+ spec = ENTITIES[key]
+ con = connect()
+ _ensure_table(con, key, spec)
+ _ensure_columns(con, key, spec)
+ _backfill_columns(con, key, spec, log=log)
+ _backfill_m2m(con, key, spec, log=log)
+ st = _state(con, key) or {"phase": "backfill", "last_id": 0, "cursor_wd": None, "rows": 0}
+ fields = spec["fields"] + list(spec.get("m2m") or [])
+ pulled = 0
+ try:
+ if st["phase"] == "backfill":
+ last_id = st["last_id"] or 0
+ for i in range(max_batches):
+ dom = _base_domain(spec) + [("id", ">", last_id)]
+ recs = O.search_read(spec["model"], dom, ["id"] + fields,
+ limit=batch, order="id asc")
+ if not recs:
+ # backfill complete → switch to live mode anchored at max write_date seen
+ wd = con.execute(f"SELECT max(write_date) FROM {key}").fetchone()[0]
+ _save_state(con, key, "live", last_id, wd or "1970-01-01 00:00:00")
+ log(f" {key}: BACKFILL COMPLETE ({st['rows'] + pulled:,} rows) -> live mode")
+ return "live", pulled
+ _upsert(con, key, spec, recs)
+ last_id = recs[-1]["id"]
+ pulled += len(recs)
+ _save_state(con, key, "backfill", last_id, None)
+ if (i + 1) % 10 == 0:
+ log(f" {key}: backfill …{pulled:,} rows (id≤{last_id})")
+ log(f" {key}: backfill PAUSED at {pulled:,} rows this run (bounded; resumes)")
+ return "backfill", pulled
+ # live mode: write_date >= cursor (idempotent overlap; upsert dedupes). MASS-STAMP
+ # FALLBACK (found live 2026-07-17): a batch job can stamp >batch rows with ONE
+ # write_date second (an Odoo recompute stamped ~88k account_move rows '2026-07-15
+ # 16:35:03'; stored values carry microseconds, XML-RPC strings don't) — then the
+ # write_date cursor can NEVER advance and every pass re-pulls the same first page
+ # forever. When a full batch leaves the cursor unchanged we switch to an ID-WALK over
+ # write_date >= cursor (order id asc, id > tie), checkpointed as 'cursor|' in
+ # cursor_wd so a killed walk resumes; on completion the cursor jumps one second past
+ # the stamp (safe: the walk covered every row in that second, and the stamp is in the
+ # past — guarded by a 2-minute recency check).
+ raw = st["cursor_wd"] or "1970-01-01 00:00:00"
+ cursor, _pipe, _tie = raw.partition("|")
+ walking, tie_id = bool(_pipe), int(_tie or 0)
+ walk_max = cursor
+ for _ in range(max_batches):
+ if walking:
+ dom = _base_domain(spec) + [("write_date", ">=", cursor), ("id", ">", tie_id)]
+ recs = O.search_read(spec["model"], dom, ["id"] + fields,
+ limit=batch, order="id asc")
+ if not recs: # walk complete → advance past the stamp
+ try:
+ wm = dt.datetime.strptime(walk_max, "%Y-%m-%d %H:%M:%S")
+ if wm < dt.datetime.utcnow() - dt.timedelta(minutes=2):
+ cursor = (wm + dt.timedelta(seconds=1)).strftime("%Y-%m-%d %H:%M:%S")
+ else:
+ cursor = walk_max
+ except ValueError:
+ cursor = walk_max
+ walking = False
+ log(f" {key}: id-walk complete -> cursor {cursor}")
+ break
+ _upsert(con, key, spec, recs)
+ pulled += len(recs)
+ tie_id = recs[-1]["id"]
+ walk_max = max(walk_max, max(str(r["write_date"]) for r in recs))
+ _save_state(con, key, "live", st["last_id"], f"{cursor}|{tie_id}")
+ continue
+ dom = _base_domain(spec) + [("write_date", ">=", cursor)]
+ recs = O.search_read(spec["model"], dom, ["id"] + fields,
+ limit=batch, order="write_date asc, id asc")
+ if not recs or (len(recs) == 1 and str(recs[0].get("write_date")) == cursor
+ and pulled == 0 and _already(con, key, recs[0])):
+ break
+ new_cursor = str(recs[-1]["write_date"])
+ if new_cursor == cursor and len(recs) == batch:
+ # full batch stuck on one second: enter the id-walk from id 0 (the write_date
+ # ordering shuffles ids within the stamp second, so the batch just pulled is
+ # NOT an id prefix — restart coverage by id; upserts make the overlap free)
+ walking, tie_id, walk_max = True, 0, cursor
+ _save_state(con, key, "live", st["last_id"], f"{cursor}|0")
+ log(f" {key}: mass-stamp second at {cursor} -> switching to id-walk")
+ continue
+ _upsert(con, key, spec, recs)
+ pulled += len(recs)
+ if new_cursor == cursor and len(recs) < batch:
+ cursor = new_cursor
+ break
+ cursor = new_cursor
+ # Checkpoint the cursor EVERY batch: a big delta (88k account_move rows after the
+ # 2026-07-15 recompute) means a killed pass otherwise re-pulls everything —
+ # upserts are idempotent, but the wasted RPC is real (learned 2026-07-17).
+ _save_state(con, key, "live", st["last_id"], cursor)
+ _save_state(con, key, "live", st["last_id"],
+ f"{cursor}|{tie_id}" if walking else cursor)
+ if pulled:
+ log(f" {key}: live sync +{pulled:,} rows (cursor {cursor}"
+ + (f" walking id>{tie_id}" if walking else "") + ")")
+ return "live", pulled
+ finally:
+ con.close()
+
+
+def _already(con, key, rec):
+ return bool(con.execute(f"SELECT 1 FROM {key} WHERE id=?", [rec["id"]]).fetchone())
+
+
+def sync_all(entities=None, max_batches=200, log=print):
+ out = {}
+ for key in (entities or list(ENTITIES)):
+ t0 = time.time()
+ phase, pulled = sync_entity(key, max_batches=max_batches, log=log)
+ out[key] = {"phase": phase, "pulled": pulled, "secs": round(time.time() - t0, 1)}
+ # A full pass that lands every entity in live mode latches process readiness in-process — so
+ # readers never race the writer's lock to (re)discover the store is usable.
+ if entities is None and out and all(v["phase"] == "live" for v in out.values()):
+ mark_ready()
+ return out
+
+
+def reconcile_deletes(entities=None, log=print):
+ """Remove store rows hard-deleted in Odoo. unlink() doesn't move write_date, so the cursor
+ sync can never see a deletion — the count parity DETECTS the drift (by design); this repairs
+ it. Pulls the full live id set per entity in bounded id-ascending pages (id-only reads are
+ cheap) and deletes store ids not present live. Run from sync_runner / maintenance, not the
+ app's frequent passes."""
+ con = connect()
+ try:
+ out = {}
+ for key in (entities or list(ENTITIES)):
+ spec = ENTITIES[key]
+ live_ids, last = set(), 0
+ while True:
+ recs = O.search_read(spec["model"], _base_domain(spec) + [("id", ">", last)],
+ ["id"], limit=50000, order="id asc")
+ if not recs:
+ break
+ live_ids.update(r["id"] for r in recs)
+ last = recs[-1]["id"]
+ store_ids = {r[0] for r in con.execute(f"SELECT id FROM {key}").fetchall()}
+ dead = store_ids - live_ids
+ if dead:
+ con.execute("CREATE TEMP TABLE IF NOT EXISTS _dead(id BIGINT)")
+ con.execute("DELETE FROM _dead")
+ con.executemany("INSERT INTO _dead VALUES (?)", [[i] for i in dead])
+ con.execute(f"DELETE FROM {key} WHERE id IN (SELECT id FROM _dead)")
+ con.execute("DELETE FROM _dead")
+ n = con.execute(f"SELECT count(*) FROM {key}").fetchone()[0]
+ con.execute("UPDATE _sync_state SET rows=? WHERE entity=?", [n, key])
+ out[key] = len(dead)
+ log(f" {key}: reconciled {len(dead):,} hard-deleted rows")
+ return out
+ finally:
+ con.close()
+
+
+def status():
+ con = connect()
+ try:
+ return {r[0]: {"phase": r[1], "cursor": r[3], "rows": r[4], "updated": r[5]}
+ for r in con.execute("SELECT * FROM _sync_state").fetchall()}
+ finally:
+ con.close()
+
+
+# ------------------------------------------------------------------ parity (store vs LIVE Odoo)
+
+def _check(name, ours, live, tol=0.01):
+ gap = abs((ours or 0) - (live or 0))
+ return {"check": name, "ok": gap <= tol, "gap": round(gap, 4), "ours": ours, "live": live}
+
+
+def validate(pre=None, months=("2026-01-01", "2026-07-01")):
+ """Raw-fidelity parity: the store must mirror live Odoo — row counts per synced entity +
+ unscoped monetary sums over a window, to the cent. Only checks entities in LIVE phase."""
+ con = connect()
+ out = []
+ try:
+ live_state = status()
+ d0, d1 = months
+ for key, spec in ENTITIES.items():
+ if live_state.get(key, {}).get("phase") != "live":
+ continue
+ ours = con.execute(f"SELECT count(*) FROM {key}").fetchone()[0]
+ live = O.get_odoo().search_count(spec["model"], _base_domain(spec))
+ out.append(_check(f"store.{key} row count == live search_count", ours, live, tol=0))
+ if live_state.get("sale_order_line", {}).get("phase") == "live":
+ ours = con.execute(
+ "SELECT coalesce(sum(l.price_subtotal),0) FROM sale_order_line l "
+ "JOIN sale_order o ON o.id = l.order_id "
+ "WHERE o.date_order >= ? AND o.date_order < ?", [d0, d1]).fetchone()[0]
+ live = O.sum_field("sale.order.line",
+ [("order_id.date_order", ">=", f"{d0} 00:00:00"),
+ ("order_id.date_order", "<", f"{d1} 00:00:00")],
+ "price_subtotal")
+ out.append(_check(f"store Σ line revenue [{d0}..{d1}) == live (unscoped)", ours, live))
+ if live_state.get("sale_order", {}).get("phase") == "live":
+ ours = con.execute(
+ "SELECT coalesce(sum(amount_untaxed),0) FROM sale_order "
+ "WHERE date_order >= ? AND date_order < ?", [d0, d1]).fetchone()[0]
+ live = O.sum_field("sale.order",
+ [("date_order", ">=", f"{d0} 00:00:00"),
+ ("date_order", "<", f"{d1} 00:00:00")], "amount_untaxed")
+ out.append(_check(f"store Σ order amount_untaxed [{d0}..{d1}) == live (unscoped)",
+ ours, live))
+ finally:
+ con.close()
+ return out
+
+
+if __name__ == "__main__":
+ args = sys.argv[1:]
+ if args and args[0] == "status":
+ for k, v in status().items():
+ print(f" {k:18s} {v['phase']:9s} rows={v['rows']:>9,} cursor={v['cursor']} ({v['updated']})")
+ elif args and args[0] == "reconcile":
+ ents = args[1].split(",") if len(args) > 1 else None
+ for k, n in reconcile_deletes(ents).items():
+ print(f" {k:18s} -{n:,} hard-deleted rows")
+ elif args and args[0] == "validate":
+ ok = True
+ for c in validate():
+ mark = "OK " if c["ok"] else "XX "
+ ok &= c["ok"]
+ print(f" {mark}{c['check'][:80]} gap={c['gap']}")
+ print("PARITY:", "GREEN" if ok else "RED")
+ sys.exit(0 if ok else 1)
+ else:
+ ents = args[0].split(",") if args else None
+ mb = int(args[1]) if len(args) > 1 else 200
+ for k, v in sync_all(ents, max_batches=mb).items():
+ print(f" {k:18s} {v['phase']:9s} +{v['pulled']:,} rows in {v['secs']}s")
diff --git a/platform/harness/evals.py b/platform/harness/evals.py
new file mode 100644
index 0000000000000000000000000000000000000000..d64172f90f9c2c9dc104254e328290b92d778b2f
--- /dev/null
+++ b/platform/harness/evals.py
@@ -0,0 +1,134 @@
+"""harness/evals.py — the Analyst eval gate (OM-4, 2026-07-11).
+
+Runs the golden set (evals/analyst_golden.yml — truths from the parity-proven semantic layer over
+CLOSED windows) against the Analyst and scores DETERMINISTICALLY: expected number found in the
+answer (tolerance-aware, handles $/commas/% forms), required substrings, required tools in the
+trace, required artifacts. No LLM judge in v1 — the validate() culture applied to AI answers.
+
+Gate rule (from the plan): run before any deploy that touches model/ or the Analyst; ship only on
+pass-rate >= the bar (start 80%, tighten as the model/skills improve).
+
+Usage:
+ python -X utf8 -c "import ssl; ssl._create_default_https_context=ssl._create_unverified_context;
+ import harness.evals as E; E.run()" # live (needs OPENROUTER_API_KEY)
+ E.run(chat_fn=scripted) # offline harness test
+"""
+import re
+from pathlib import Path
+
+import yaml
+
+GOLDEN = Path(__file__).resolve().parents[1] / "evals" / "analyst_golden.yml"
+
+
+def _numbers(text):
+ """Every number in the answer, normalized: $1,234.56 -> 1234.56; '59%'/'59.0 %' -> 0.59 too."""
+ out = []
+ for m in re.finditer(r"\$?([\d,]+(?:\.\d+)?)\s*(%?)", text):
+ try:
+ v = float(m.group(1).replace(",", ""))
+ except ValueError:
+ continue
+ out.append(v)
+ if m.group(2): # percent form: also offer the fraction
+ out.append(v / 100.0)
+ return out
+
+
+def _norm_ws(s):
+ """Collapse ALL unicode whitespace to single spaces. Models emit U+202F (narrow no-break
+ space) and friends inside names — 'Poppy\\u202fFlowers' failed a plain substring check on
+ two different models (the 'top_customer flake', diagnosed 2026-07-12)."""
+ return re.sub(r"\s+", " ", s)
+
+
+def _check(item, result):
+ exp = item.get("expect") or {}
+ answer = _norm_ws(result.get("answer") or "")
+ reasons = []
+ if result.get("exhausted"):
+ reasons.append("tool budget exhausted")
+ if "value" in exp:
+ want = float(exp["value"])
+ tol = exp.get("abs", exp.get("rel", 0.001) * abs(want) or 0.01)
+ nums = _numbers(answer)
+ if exp.get("allow_pct_form"):
+ nums += [n for n in list(nums)]
+ if not any(abs(n - want) <= tol for n in nums):
+ reasons.append(f"expected {want:,.2f} (±{tol:,.2f}) not in answer")
+ for s in exp.get("contains", []):
+ if _norm_ws(s).lower() not in answer.lower():
+ reasons.append(f"missing substring {s!r}")
+ # WRONG-ANSWER guard (2026-07-28). `contains` can only prove an answer said the right thing;
+ # some failures are about saying a WRONG thing that a right answer never says — e.g. naming an
+ # internal salesperson as an agent ([[invoice-line-agent-commission]]). Those need a negative
+ # assertion or the eval passes on an answer that is confidently incorrect.
+ for s in exp.get("not_contains", []):
+ if _norm_ws(s).lower() in answer.lower():
+ reasons.append(f"forbidden substring {s!r} present")
+ used = [t["tool"] for t in result.get("tool_trace", [])]
+ for t in exp.get("tools", []):
+ if t not in used:
+ reasons.append(f"tool {t!r} not used (trace: {used})")
+ for t in exp.get("not_tools", []): # over-refusal guard: these must NOT appear
+ if t in used:
+ reasons.append(f"tool {t!r} used but forbidden here (trace: {used})")
+ if exp.get("artifact") == "chart":
+ if not any("chart" in a for a in result.get("artifacts", [])):
+ reasons.append("no chart artifact produced")
+ return (not reasons), reasons
+
+
+def run(chat_fn=None, model=None, only=None, bar=0.8, verbose=True):
+ """Run the golden set. Returns {passed, total, pass_rate, gate_ok, results}."""
+ import harness.analyst as A
+ items = yaml.safe_load(GOLDEN.read_text(encoding="utf-8"))["items"]
+ if only:
+ items = [i for i in items if i["id"] in only]
+ results, passed = [], 0
+ import os as _os
+ import time as _time
+ _os.environ["ANALYST_PATIENT"] = "1" # batch mode: wait out rate windows, don't fail fast
+ infra_fails = 0
+ aborted = False
+ for item in items:
+ _time.sleep(6) # pace the free-tier per-minute windows (Groq/Cerebras)
+ kw = {"chat_fn": chat_fn} if chat_fn else {}
+ if model:
+ kw["model"] = model
+ try:
+ res = A.ask(item["ask"], telemetry_kind="analyst_eval", **kw)
+ ok, reasons = _check(item, res)
+ infra_fails = 0
+ except Exception as e:
+ res, ok, reasons = {"answer": "", "tool_trace": []}, False, [f"RUN ERROR: {e}"]
+ # Provider exhaustion is NOT a model failure: two in a row means the ladder is out
+ # of quota — abort and report INCONCLUSIVE instead of burning the remaining items
+ # into a misleading FAIL (learned 2026-07-16: 14 wasted items, 4/18 "22%").
+ if "all LLM providers failed" in str(e):
+ infra_fails += 1
+ if infra_fails >= 2:
+ aborted = True
+ passed += ok
+ results.append({"id": item["id"], "ok": ok, "reasons": reasons,
+ "usage": res.get("usage"), "iterations": res.get("iterations")})
+ if verbose:
+ mark = "OK " if ok else "XX "
+ print(f" {mark}{item['id']:18s}" + ("" if ok else f" — {'; '.join(reasons)[:90]}"))
+ if aborted:
+ break
+ if aborted:
+ ran = [r for r in results if not str(r["reasons"])[:60].startswith("['RUN ERROR")]
+ if verbose:
+ print(f"\nEVAL ABORTED — LLM providers exhausted after {len(results)} item(s); "
+ f"{passed}/{len(ran) or 1} of the items that actually ran passed. "
+ "Gate is INCONCLUSIVE (not a model failure) — re-run when quota recovers.")
+ return {"passed": passed, "total": len(items), "pass_rate": None, "gate_ok": False,
+ "inconclusive": True, "results": results}
+ rate = passed / len(items) if items else 0.0
+ gate = rate >= bar
+ if verbose:
+ print(f"\nEVAL: {passed}/{len(items)} = {rate:.0%} GATE({bar:.0%}): "
+ f"{'PASS' if gate else 'FAIL'}")
+ return {"passed": passed, "total": len(items), "pass_rate": rate, "gate_ok": gate,
+ "results": results}
diff --git a/platform/harness/filter_eval.py b/platform/harness/filter_eval.py
new file mode 100644
index 0000000000000000000000000000000000000000..b5782b90d6f476a89582674e3afccf2eb091e896
--- /dev/null
+++ b/platform/harness/filter_eval.py
@@ -0,0 +1,485 @@
+"""harness/filter_eval.py — the filter tree evaluated against ROWS, in Python (wave 15, C-EVAL).
+
+THE THIRD ENGINE, and the one with a different job. There are now three readers of the same
+filter tree and it is worth being precise about why:
+
+ * `customer-grid/useVisibleRows.ts` — the CLIENT, over in-memory rows. The reference.
+ * `harness/filter_sql.py` — compiles the tree to SQL for the DuckDB semantic tables.
+ * **this module** — evaluates the tree against wire-shaped row dicts in the
+ API/host process, where there is no SQL and the rows are
+ already in hand.
+
+It exists because a PERMANENT (permission) filter has to be applied server-side, to rows the
+server is about to send, on a surface whose columns are not a DuckDB table. Neither existing
+engine can do that: the client one is TypeScript, and the SQL one needs a table.
+
+⛔ TWO ENTRY POINTS, OPPOSITE DEFAULTS, AND THE DIFFERENCE IS THE WHOLE POINT.
+
+ matches(...) DISPLAY semantics. A faithful mirror of the client, including the places
+ where the client IGNORES a leaf. Refereed against the client by
+ `aios-web/verify_filter_parity.py` — if this disagrees with the browser about
+ one row, a saved view means two different things in two places.
+
+ permits(...) PERMISSION semantics. Same evaluator, `strict=True`: anything the display
+ engine would IGNORE, this DENIES.
+
+Why they cannot be the same function (C-EVAL amendment 1, and the reason this module has a
+docstring this long). The client engine is TRI-STATE — `True` / `False` / `None`, where `None`
+means "this leaf is INACTIVE, parent ignores it entirely". A leaf naming a column that does not
+exist returns `None` (`useVisibleRows.ts:318`), and a group whose children are all inactive is
+itself inactive (:273). For a DISPLAY filter that is exactly right: a half-built condition must
+not zero the grid, and a stale column reference must not either.
+
+For a PERMISSION filter it is a catastrophe. `agent is Tara` is the only thing standing between
+a sales rep and the whole book; rename or delete the `agent` field and that leaf becomes
+`None` — ignored — and the rep silently receives every customer. The wall would be one field
+rename away from open, and nothing would go red. So `permits()` inverts every ignore into a
+denial: an unanswerable permission filter is an OUTAGE, not a licence.
+
+The asymmetry is a PARAMETER (`strict`) rather than a second implementation, deliberately: a
+mirror must copy the original's asymmetries, and the only way to be sure it still does next
+month is for both behaviours to come out of the same walk.
+
+⚠ WHAT THIS MODULE DOES NOT RE-IMPLEMENT. Activeness (`is_rule_active`), the JS-`Number`
+coercion (`to_num`), the op vocabularies, cohort-id parsing and the date-window/anchor resolvers
+all already exist in `filter_sql.py` and `windows.py`, and are already held against the client by
+`verify_filter_engine.py` (525 checks) and `verify_windows.py` (123). Importing them is not
+laziness — a second copy of "what counts as an active rule" is precisely the drift those gates
+exist to catch, and it would be a copy the gates do not cover.
+"""
+from harness.filter_sql import ( # noqa: F401 (COHORT_OPS re-exported for callers)
+ COHORT_FIELD, COHORT_OPS, COHORT_OP_ALIASES, FILTER_OPS, RANK_OPS,
+ is_rule_active, parse_cohort_ids, to_num, _resolve_anchor, _window_bounds,
+)
+
+#: The CLIENT's numeric family, which is WIDER than `filter_sql.NUMERIC_TYPES`. `rating` (an
+#: integer 1..max) and `formula` (computed in the browser and injected at the field's key) compare
+#: as numbers here because this engine sees the same assembled row the client does. They are
+#: absent from the SQL port for a good reason — they are client-only strata that can never reach a
+#: DuckDB table — so the two lists differing is correct, not drift. Mirrors `isNumericType`.
+NUMERIC_TYPES = frozenset({'currency', 'int', 'pct', 'rating', 'formula'})
+
+#: `created_time` is a DATETIME rendered read-only, and it filters as a DATE (truncated to the
+#: day below). Mirrors `isDateType`.
+DATE_TYPES = frozenset({'date', 'created_time'})
+
+#: The date ops that actually compare against an ANCHOR. Everything else falls to the
+#: active-and-always-true default WITHOUT resolving one — ordering matters, see `_match_date`.
+DATE_CMP_OPS = frozenset({'eq', 'neq', 'lt', 'lte', 'gt', 'gte'})
+
+
+class EvalCtx:
+ """Everything the engine needs besides the row and the columns.
+
+ All four members share one property — each is an answer a single ROW cannot compute — and
+ therefore share one failure mode: absent, the condition matches NOTHING rather than
+ everything. That is the widening sin the cohort/measure/rank leaves are each written to
+ avoid, and it is why none of these defaults to a permissive value.
+ """
+
+ __slots__ = ('cohort_sets', 'measure_sets', 'rank_sets', 'today')
+
+ def __init__(self, cohort_sets=None, measure_sets=None, rank_sets=None, today=None):
+ #: {cohort_id: set(pid)} — the cohorts THIS reader may see.
+ self.cohort_sets = cohort_sets or {}
+ #: {rule_id: set(pid)} — resolved measure conditions (CG-8).
+ self.measure_sets = measure_sets or {}
+ #: {id(leaf) or leaf-key: set(pid)} — resolved rank slices (C-OPS).
+ self.rank_sets = rank_sets or {}
+ #: The TENANT's today, ISO. Never the server clock at call time — a date filter that
+ #: means something different per process is not a filter.
+ self.today = today
+
+
+_EMPTY_CTX = EvalCtx()
+
+
+def _is_group(node):
+ return isinstance(node, dict) and isinstance(node.get('children'), list)
+
+
+def _is_cohort(node):
+ return isinstance(node, dict) and node.get('colId') == COHORT_FIELD
+
+
+def _is_measure(node):
+ """Mirrors `isMeasureRule`: a leaf carrying a `window` IS a measure condition."""
+ return isinstance(node, dict) and node.get('window') is not None
+
+
+def _rhs_col(rhs):
+ """Mirrors `rhsColId`: a STATISTIC names no column."""
+ if not isinstance(rhs, dict) or rhs.get('kind') == 'stat':
+ return None
+ return rhs.get('colId')
+
+
+def _as_text(v):
+ """The client's `String(raw ?? "").toLowerCase()`. `None` becomes '' (never 'None')."""
+ return ('' if v is None else str(v)).lower()
+
+
+def _as_day(v):
+ """Day-granularity truncation. A `created_time` cell is a DATETIME and every comparand in
+ this vocabulary is a DATE — lexically the longer string sorts AFTER its own day, so without
+ this `on or before ` would silently exclude today's rows. Identity for a pure date."""
+ return ('' if v is None else str(v))[:10]
+
+
+def _cmp_num(op, a, b):
+ """`default: True` is the documented ACTIVE-and-always-true case — an operator that exists
+ but does not apply to this type (`contains` on a number) narrows nothing and asks nothing.
+ An operator in NO vocabulary never reaches here; `_eval` refuses it first."""
+ if op == 'gt':
+ return a > b
+ if op == 'gte':
+ return a >= b
+ if op == 'lt':
+ return a < b
+ if op == 'lte':
+ return a <= b
+ if op == 'eq':
+ return a == b
+ if op == 'neq':
+ return a != b
+ return True
+
+
+def _cmp_str(op, a, v):
+ if op == 'eq':
+ return a == v
+ if op == 'neq':
+ return a != v
+ if op == 'lt':
+ return a < v
+ if op == 'lte':
+ return a <= v
+ if op == 'gt':
+ return a > v
+ if op == 'gte':
+ return a >= v
+ return True
+
+
+def _cmp_text(op, a, v):
+ if op == 'contains':
+ return v in a
+ if op == 'doesNotContain':
+ return v not in a
+ if op == 'eq':
+ return a == v
+ if op == 'neq':
+ return a != v
+ return True
+
+
+def _is_blank(raw):
+ """Blank = None or ''. A numeric 0 is NOT blank — `isEmpty` must not swallow a real zero,
+ and the wire preserves null for a missing value."""
+ return raw is None or raw == ''
+
+
+def _match_numeric(rule, raw, other, has_rhs):
+ a = to_num(raw)
+ op = rule.get('op')
+ if has_rhs:
+ return _cmp_num(op, a, to_num(other))
+ if op == 'between':
+ v, v2 = rule.get('value'), rule.get('value2')
+ if v == '' or v2 is None or v2 == '':
+ return True # both bounds required
+ lo, hi = to_num(v), to_num(v2)
+ if lo > hi:
+ lo, hi = hi, lo
+ return lo <= a <= hi
+ if rule.get('value') == '':
+ return True # inactive until a value is typed
+ return _cmp_num(op, a, to_num(rule.get('value')))
+
+
+def _match_date(rule, raw, other, has_rhs, today):
+ a = _as_day(raw)
+ op = rule.get('op')
+
+ # "is within [the past month]" — a RANGE test, and the only date op reading `dateWindow`.
+ if op == 'within':
+ if not today:
+ return False
+ bounds = _window_bounds(rule.get('dateWindow'), today)
+ if not bounds:
+ return False # unresolvable range -> matches nothing
+ if a == '':
+ # A blank date is not "within" any range. Without this, '' >= a null lower bound is
+ # vacuously true and every never-ordered customer lands inside every window.
+ return False
+ lo, hi = bounds
+ return (lo is None or a >= lo) and (hi is None or a <= hi)
+
+ if has_rhs:
+ return _cmp_str(op, a, _as_day(other))
+ if op == 'between':
+ v, v2 = rule.get('value'), rule.get('value2')
+ if v == '' or v2 is None or v2 == '':
+ return True
+ lo, hi = (v, v2) if v < v2 else (v2, v)
+ return lo <= a <= hi
+
+ # An op that does not apply to a date (`contains`) is ACTIVE-and-always-true, decided BEFORE
+ # any anchor is resolved — there is no date in that question to resolve. Ordering this after
+ # the anchor would turn `contains` on a date from always-true into matches-nothing, which is
+ # a different answer under `or`.
+ if op not in DATE_CMP_OPS:
+ return True
+ if not rule.get('dateMode') and rule.get('value') == '':
+ return True # inactive until a value is typed
+ mode = rule.get('dateMode') or 'exact'
+ # `today` is required by a RELATIVE anchor and by nothing else, which is what keeps every
+ # pre-anchor saved view working in a payload that carries no today.
+ if mode != 'exact' and not today:
+ return False
+ v = _resolve_anchor(mode, rule.get('value'), today or '1970-01-01')
+ if v is None:
+ # Unresolvable (junk date, missing N) -> matches nothing. The honest answer to a
+ # question with no date in it.
+ return False
+ return _cmp_str(op, a, v)
+
+
+def _match_filter(rule, row, columns, today):
+ """One LEAF against one row, dispatched on the field's declared type.
+
+ `isEmpty`/`isNotEmpty` are handled FIRST and type-independently: they must never fall
+ through to the "blank value -> inactive" guards below, which would turn them into
+ always-true no-ops.
+ """
+ field = columns.get(rule.get('colId')) or {}
+ ftype = field.get('type')
+ raw = row.get(rule.get('colId'))
+ op = rule.get('op')
+
+ if op == 'isEmpty':
+ return _is_blank(raw)
+ if op == 'isNotEmpty':
+ return not _is_blank(raw)
+
+ # A RANK op can never be answered from one row. `_eval` routes rank leaves to their resolved
+ # set and one should never arrive here; this is the SECOND layer, and it exists because of
+ # what the first layer's absence would do — `_cmp_num`'s `default: True` would make `topN`
+ # match EVERY row, a filter that widens under a count that agrees with it.
+ if op in RANK_OPS:
+ return False
+
+ rhs = rule.get('rhs')
+ has_rhs = rhs is not None
+ other = row.get(_rhs_col(rhs) or '') if has_rhs else None
+
+ if ftype in NUMERIC_TYPES:
+ return _match_numeric(rule, raw, other, has_rhs)
+ if ftype in DATE_TYPES:
+ return _match_date(rule, raw, other, has_rhs, today)
+
+ a = _as_text(raw)
+ if has_rhs:
+ return _cmp_text(op, a, _as_text(other))
+ if rule.get('value') == '':
+ return True
+ return _cmp_text(op, a, _as_text(rule.get('value')))
+
+
+def _eval(node, row, columns, ctx, strict):
+ """One node against one row. `True` / `False` / `None`, where `None` = INACTIVE.
+
+ `strict` is the permission mode: every `None` this function would return becomes `False`
+ instead. Read the two behaviours side by side rather than trusting either alone — the
+ difference between them IS the security property (see the module docstring).
+ """
+ ignore = False if strict else None
+
+ if _is_group(node):
+ saw_active = False
+ all_true = True
+ any_true = False
+ for child in node['children']:
+ v = _eval(child, row, columns, ctx, strict)
+ if v is None:
+ continue # inactive -> ignored entirely
+ saw_active = True
+ all_true = all_true and v
+ any_true = any_true or v
+ if not saw_active:
+ # A group with no active children is itself inactive. In strict mode an empty or
+ # wholly-unanswerable permission group DENIES: a wall that evaluates to "nothing to
+ # say" must not mean "let them through".
+ return ignore
+ return any_true if node.get('conj') == 'or' else all_true
+
+ if not isinstance(node, dict):
+ return ignore
+
+ # A COHORT leaf, BEFORE the column lookup: `__cohort__` is not a column, so the lookup below
+ # would call it INACTIVE — and inactive means every row on screen under a count nobody doubts.
+ if _is_cohort(node):
+ if not is_rule_active(node, columns):
+ return ignore
+ ids = parse_cohort_ids(node.get('value'))
+ sets = [ctx.cohort_sets.get(cid) for cid in ids]
+ # ANY named cohort we were given no membership for makes the WHOLE condition
+ # unanswerable, and unanswerable matches nothing — for `is none of` as well. Answering
+ # "everything" to `is none of [a cohort we cannot see]` is the widening sin wearing a
+ # plausible face, and PARTIAL evaluation is worse: `is none of [A, B]` quietly becoming
+ # `is none of [A]` would show every row in B under a count nobody would doubt.
+ if any(s is None for s in sets):
+ return False
+ pid = row.get('pid')
+ op = node.get('op')
+ op = op if op in COHORT_OPS else COHORT_OP_ALIASES.get(op, 'anyOf')
+ if op == 'allOf':
+ return all(pid in s for s in sets)
+ in_any = any(pid in s for s in sets)
+ return (not in_any) if op == 'noneOf' else in_any
+
+ # A MEASURE leaf, also before the column lookup and for the same reason: a measure's colId
+ # ("revenue") is not a column of this table. An ACTIVE rule whose set has not been resolved
+ # is PENDING and matches NOTHING — never everything.
+ if _is_measure(node):
+ if not is_rule_active(node, columns):
+ return ignore
+ s = ctx.measure_sets.get(node.get('id')) if node.get('id') else None
+ if s is None:
+ return False
+ return row.get('pid') in s
+
+ # ── a column leaf ────────────────────────────────────────────────────────────────────────
+ if node.get('colId') not in columns:
+ # THE LEAF THIS WHOLE MODULE'S `strict` FLAG EXISTS FOR. Display: ignore it. Permission:
+ # deny — see the module docstring's field-rename walkthrough.
+ return ignore
+ if node.get('rhs') is not None and _rhs_col(node['rhs']) not in columns:
+ # An rhs naming a column this table does not have is ignored by the SAME rule as an
+ # unknown LEFT column. Treating one side as "ignore" and the other as "match nothing"
+ # would make `a > deleted` behave differently from `deleted > a`.
+ return ignore
+ if not is_rule_active(node, columns):
+ return ignore
+
+ # A RANK leaf is a MEMBERSHIP test, like a cohort or a measure: the set was computed in a
+ # prior pass over the other rows. No set = REFUSE, never "ignore" and never "true" — both of
+ # those SHOW rows.
+ if node.get('op') in RANK_OPS:
+ s = ctx.rank_sets.get(_rank_key(node))
+ return (row.get('pid') in s) if s is not None else False
+
+ # An operator in NO vocabulary at all. The comparators end in `default: True`, right for an
+ # operator that exists but does not apply to this type; NOT right for one that exists
+ # nowhere (`inTertile` out of a stale saved view), which would match every row.
+ if node.get('op') not in FILTER_OPS:
+ return False
+
+ return _match_filter(node, row, columns, ctx.today)
+
+
+def _rank_key(node):
+ """The client keys `rankSets` by leaf IDENTITY (a Map keyed on the node object). Python
+ dicts cannot key on a dict, so the caller that resolves rank sets and this evaluator agree
+ on a derived key. Kept in ONE place so the two cannot drift apart."""
+ return (node.get('id') or '', node.get('colId') or '', node.get('op') or '',
+ str(node.get('value') if node.get('value') is not None else ''))
+
+
+def _columns_map(fields):
+ """`[{key,type,…}]` -> `{key: field}`. Accepts a mapping unchanged, so callers holding
+ either shape need no adapter."""
+ if isinstance(fields, dict):
+ return fields
+ out = {}
+ for f in fields or ():
+ if isinstance(f, dict) and f.get('key'):
+ out[f['key']] = f
+ return out
+
+
+def evaluate(tree, row, fields, ctx=None):
+ """The TRI-STATE the client actually has: `True` / `False` / `None`, where `None` means the
+ tree is INACTIVE — it asks nothing, so it narrows nothing.
+
+ Exposed because collapsing `None` into `True` (which `matches` does, correctly, for its own
+ purpose) destroys a distinction some callers must keep. The `memberPids` union is the one
+ that bit: the client's rule is `members.has(pid) || matchFilterTree(…)` and that union sits
+ INSIDE `if (filters.length)`, so an INACTIVE tree must show every row and ignore the member
+ list — whereas an ACTIVE tree that merely fails must still admit hand-picked members. A
+ caller holding only `matches` cannot tell those two apart and will narrow an inactive view
+ down to its hand-picked rows. (`filter_sql.compile_filter_tree` keeps the same distinction
+ by returning None rather than a predicate; this is the row-engine's equivalent.)
+
+ Activeness is ROW-INDEPENDENT — every `None` here comes from `is_rule_active` or an empty
+ group, none of which reads the row — so a caller may compute it once per tree if it wishes.
+ """
+ columns = _columns_map(fields)
+ nodes, conj = tree_parts(tree)
+ return _eval({'conj': conj, 'children': nodes}, row, columns, ctx or _EMPTY_CTX, False)
+
+
+def matches(tree, row, fields, ctx=None):
+ """DISPLAY semantics — does `row` survive this filter tree? Mirrors the client exactly.
+
+ A wholly INACTIVE tree returns True: no narrowing, every row shows. That is what the browser
+ does with a half-built condition, and this function's whole job is to agree with the browser.
+ Use `evaluate()` instead when you need to tell "inactive" from "matched" (see its docstring).
+ """
+ v = evaluate(tree, row, fields, ctx)
+ return True if v is None else bool(v)
+
+
+def visible_pids(tree, rows, fields, ctx=None, member_pids=None):
+ """The client's whole row pipeline for one tree, member union included — the shape a caller
+ should reach for instead of assembling `matches` in a loop.
+
+ Mirrors `useVisibleRows`: an INACTIVE tree yields every row (and IGNORES `member_pids`,
+ because the union lives inside `if (filters.length)`); an ACTIVE tree yields the rows it
+ matches UNION the hand-picked members.
+ """
+ ctx = ctx or _EMPTY_CTX
+ members = set(member_pids or ())
+ out, active = [], False
+ verdicts = []
+ for r in rows:
+ v = evaluate(tree, r, fields, ctx)
+ if v is not None:
+ active = True
+ verdicts.append((r, v))
+ for r, v in verdicts:
+ if not active:
+ out.append(r.get('pid'))
+ elif v or (members and r.get('pid') in members):
+ out.append(r.get('pid'))
+ return out
+
+
+def permits(tree, row, fields, ctx=None):
+ """PERMISSION semantics — may this reader SEE `row` under this permanent filter?
+
+ Same evaluator, every ignore inverted into a denial. An empty/absent tree means "no
+ restriction declared" and admits (the caller decides whether a module with no entry is
+ reachable at all — that is `perm_scope`'s question, not this one); anything PRESENT but
+ unanswerable DENIES.
+ """
+ nodes, conj = tree_parts(tree)
+ if not nodes:
+ return True # nothing declared -> nothing to enforce here
+ columns = _columns_map(fields)
+ v = _eval({'conj': conj, 'children': nodes}, row, columns, ctx or _EMPTY_CTX, True)
+ return bool(v)
+
+
+def tree_parts(tree):
+ """Read C-PERM amendment 2's `FilterTree` — `{conj?, nodes}` — into `(nodes, conj)`.
+
+ Accepts a BARE LIST too, because that is what `ViewConfig.filters` is and what
+ `clean_filter_tree` returns; an absent conj is `'and'`, mirroring `ViewConfig.filterConj`.
+ One reader, so the absent-conj default lives here instead of at every call site.
+ """
+ if isinstance(tree, dict):
+ nodes = tree.get('nodes')
+ conj = 'or' if tree.get('conj') == 'or' else 'and'
+ return (nodes if isinstance(nodes, list) else []), conj
+ return (tree if isinstance(tree, list) else []), 'and'
diff --git a/platform/harness/filter_sql.py b/platform/harness/filter_sql.py
new file mode 100644
index 0000000000000000000000000000000000000000..6d2a5a39ef265272c7c784de4df0ee1cf9e57bf0
--- /dev/null
+++ b/platform/harness/filter_sql.py
@@ -0,0 +1,673 @@
+"""harness/filter_sql.py — the grid's filter/sort engine, compiled to SQL (CG-1).
+
+THE PORT. `customer-grid/useVisibleRows.ts` evaluates the Airtable-parity filter TREE and the
+multi-level sort in TypeScript, per row, in the browser. That works at customer grain (1,550 rows,
+576 KB) and does NOT work at line grain, so a line-grain table has to filter server-side. This
+module is the second implementation of that contract, emitting parameterized SQL instead of
+booleans. `aios_grid.clean_filter_tree` (the validator) is the third. All three are held in
+lock-step by `aios-web/verify_filter_engine.py`, which runs the SAME cases through the TS engine,
+this compiler (executed on DuckDB), and the validator, and compares row sets.
+
+Design: this file is PURE — no model, no store, no app imports. It takes a filter tree plus a
+`columns` spec and returns SQL + params. `harness/semantic.store_columns` builds the spec from a
+topic; nothing else here knows what a topic is.
+
+ columns = {colId: {"sql": , "type": , "aggregate": bool}}
+
+`sql` is a trusted IDENTIFIER/expression from the semantic model (never user input); every VALUE
+is a bound parameter. That split is the whole injection story.
+
+--------------------------------------------------------------------------------------------
+TRI-STATE, AND WHY IT BECOMES COMPILE-TIME PRUNING
+--------------------------------------------------------------------------------------------
+`evalNode` in TS returns true | false | null, where null means "this node is INACTIVE and its
+parent must IGNORE it". Get that wrong and a half-typed condition returns true, makes its `or`
+group true, and shows every record.
+
+Activeness reads ONLY the rule (op, value, value2, is-the-column-known) — never the row. So in
+SQL it is not a third truth value at all: it is decided while COMPILING. An inactive node emits
+no SQL, a group with no active children emits no SQL, and a root with nothing active emits NO
+PREDICATE AT ALL (`compile_filter_tree` returns None) — which is exactly `matchFilterTree`
+returning true for every row.
+
+--------------------------------------------------------------------------------------------
+THE FOUR PLACES A NAIVE PORT SILENTLY DIVERGES
+--------------------------------------------------------------------------------------------
+JavaScript coerces null to 0 / "" before comparing; SQL propagates NULL and drops the row.
+
+ 1. `toNum(null)` is 0, so a NULL revenue PASSES `>= 0`. SQL: NULL >= 0 -> NULL -> dropped.
+ 2. `String(null)` is "", so a NULL state PASSES `is not FL`. SQL: NULL <> 'fl' -> dropped.
+ 3. `"" <= "2026-01-01"` is true, so a NULL date PASSES `is before`. SQL: dropped.
+ 4. `contains` is a LITERAL substring test. `LIKE '%v%'` treats % and _ as wildcards, so a
+ value containing either matches the wrong rows. Hence `strpos`, not LIKE.
+
+Every column is therefore read through `_value_sql`, which COALESCEs to the same zero-value
+JavaScript would have coerced to. The one thing that must NOT be coalesced away is the
+blank test itself — `isBlank` looks at the RAW value, and numeric 0 is NOT blank.
+
+--------------------------------------------------------------------------------------------
+AND THE FIFTH: `default: return true` IS ACTIVE, NOT INACTIVE
+--------------------------------------------------------------------------------------------
+`matchFilter`'s per-type switch ends in `default: return true`, reachable whenever an operator
+does not apply to the field type — `contains` on a currency/date field, or `gt`/`between` on a
+text field. A persisted tree can hold such a pair. That rule is ACTIVE and evaluates TRUE for
+every row, which is NOT the same as inactive: under `or` it makes the whole group true and shows
+everything. We emit `1=1` for those, and the gate asserts the difference is observable.
+
+--------------------------------------------------------------------------------------------
+INPUT CONTRACT
+--------------------------------------------------------------------------------------------
+Feed this CLEANED trees (`aios_grid.clean_filter_tree`). It is deliberately faithful to the TS
+engine rather than fail-closed on garbage — an unknown OP compiles to `1=1` exactly as TS's
+`default:` branch returns true — because the validator's job is to reject garbage and this
+module's job is to mean the same thing as the client. The gate proves the composition.
+
+Ported ahead of their consumer (CG-2) and gated at the same fidelity as the tree:
+`compile_search` (`matchSearch`) and `member_ids` (the hand-picked-members union in
+`useVisibleRows`).
+"""
+import math
+import re
+from collections import namedtuple
+
+# Mirrors customer-grid/types.ts FilterOp. verify_filter_engine.py asserts this set is
+# byte-identical to aios_grid.FILTER_OPS — three copies of a vocabulary need a drift gate.
+FILTER_OPS = frozenset({
+ 'contains', 'doesNotContain', 'eq', 'neq', 'isEmpty', 'isNotEmpty',
+ 'gt', 'gte', 'lt', 'lte', 'between', 'within',
+ 'topN', 'bottomN', 'inTopPct', 'inBottomPct',
+ 'aboveAvg', 'belowAvg', 'inQuartile', 'inDecile',
+})
+#: Wave 2026-08-02 (C-OPS): the RANK subset — set-ranked over the sibling-filtered domain.
+#: Vocabulary here, execution NOWHERE in this module: a per-row WHERE cannot express Top-N,
+#: and compiling to 1=0 would answer "nothing" to a question that has an answer, under a
+#: row_count that still looks authoritative. `_compile_leaf` therefore REFUSES (ValueError),
+#: the same server-side posture as a relative anchor with no `today`. The TS engine
+#: evaluates these as a set pass in useVisibleRows (gated by web/verify_rank_filters.py).
+RANK_OPS = frozenset({'topN', 'bottomN', 'inTopPct', 'inBottomPct',
+ 'aboveAvg', 'belowAvg', 'inQuartile', 'inDecile'})
+#: The RESERVED pseudo-column of a cohort-membership leaf. Mirrors types.ts COHORT_FIELD.
+COHORT_FIELD = '__cohort__'
+#: Set operators over a SET of cohorts. Mirrors types.ts COHORT_OPS; DISJOINT from FILTER_OPS.
+COHORT_OPS = frozenset({'anyOf', 'allOf', 'noneOf'})
+#: The single-cohort ops the leaf shipped with, kept as permanent aliases. types.ts mirrors this.
+COHORT_OP_ALIASES = {'eq': 'anyOf', 'neq': 'noneOf'}
+#: Mirrors types.ts MAX_COHORT_IDS.
+MAX_COHORT_IDS = 20
+
+
+def parse_cohort_ids(value):
+ """The cohorts a leaf names. Mirrors types.ts `cohortIds()` and aios_grid.parse_cohort_ids."""
+ out = []
+ for raw in ('' if value is None else str(value)).split(','):
+ cid = raw.strip()[:120]
+ if not cid or cid in out:
+ continue
+ out.append(cid)
+ if len(out) >= MAX_COHORT_IDS:
+ break
+ return out
+# types.ts VALUE_FREE_OPS: no value control is rendered, and they must never be judged
+# "inactive because the value is blank" — that would turn them into no-ops.
+VALUE_FREE_OPS = frozenset({'isEmpty', 'isNotEmpty', 'aboveAvg', 'belowAvg'})
+# types.ts isNumericType()
+NUMERIC_TYPES = frozenset({'currency', 'int', 'pct'})
+TEXTUAL_TYPES = frozenset({'text', 'status'})
+
+SQL_TRUE = '1=1'
+
+_NUM_CMP = {'gt': '>', 'gte': '>=', 'lt': '<', 'lte': '<=', 'eq': '=', 'neq': '<>'}
+_DATE_CMP = dict(_NUM_CMP)
+
+#: sql = the predicate (already parenthesised); params = bound values, positional;
+#: uses_aggregate = the predicate references an aggregate column, so it belongs in HAVING
+#: rather than WHERE; columns_used = colIds actually referenced in the emitted SQL (an
+#: always-true `1=1` branch references nothing, and must not force HAVING routing).
+Compiled = namedtuple('Compiled', 'sql params uses_aggregate columns_used')
+
+
+# --------------------------------------------------------------------------- value coercion
+
+# JS `Number(string)` trims exactly this set (WhiteSpace + LineTerminator). Python's float() and
+# str.strip() use a DIFFERENT set -- notably U+0085 NEL, which Python treats as whitespace and JS
+# does not -- so the set is spelled out rather than left to strip().
+_JS_WS = "".join(chr(c) for c in (9, 10, 11, 12, 13, 32, 160, 5760, 8232, 8233,
+ 8239, 8287, 12288, 65279)) + \
+ "".join(chr(c) for c in range(8192, 8203))
+# ASCII-ONLY on purpose: `\d` in a Python str pattern matches every Unicode decimal digit, so
+# `\d` here would parse the fullwidth "250" that JS rejects -- reintroducing the exact bug
+# this function exists to avoid.
+_JS_DEC = re.compile(r"^[+-]?(?:[0-9]+\.?[0-9]*|\.[0-9]+)(?:[eE][+-]?[0-9]+)?$")
+_JS_INF = re.compile(r"^[+-]?Infinity$")
+_JS_RADIX = ((re.compile(r"^0[xX][0-9a-fA-F]+$"), 16),
+ (re.compile(r"^0[oO][0-7]+$"), 8),
+ (re.compile(r"^0[bB][01]+$"), 2))
+
+
+def to_num(v):
+ """Port of `toNum`: JS `Number(v)`, then `Number.isFinite` or 0.
+
+ NOT `float(v)`. Python's float() is MORE permissive than JS's Number() in ways that make SQL
+ narrow where the client shows everything -- the worse direction, because at line grain that
+ is a silent under-fetch sitting beside an honest-looking row_count:
+
+ "1_000" float() -> 1000.0 (PEP-515 underscores) Number() -> NaN -> 0
+ "250" float() -> 250.0 (any Unicode Nd) Number() -> NaN -> 0
+ "\\u0085" + "12" float() -> 12.0 (NEL is Python whitespace) Number() -> NaN -> 0
+
+ and LESS permissive in one family, which errs the other way:
+
+ "0x10" float() -> raises -> 0 Number() -> 16 (also 0b, 0o)
+
+ A tree carrying any of these is reachable: the React builder renders ,
+ but persisted / seeded / imported view JSON goes through `clean_filter_tree`, which passes
+ the value string through untouched by design (it validates structure, not numeric syntax).
+
+ Agreed by construction on the rest: ""/None -> 0, "abc"/"12,000" -> 0, " 250 " -> 250,
+ ".5"/"5."/"+5", "1e400" -> Infinity -> 0, "-0" -> 0, and float64 truncation of
+ "9007199254740993" -> 9007199254740992.
+ """
+ if isinstance(v, bool):
+ return 1.0 if v else 0.0 # JS Number(true) === 1
+ if isinstance(v, (int, float)):
+ n = float(v)
+ return n if math.isfinite(n) else 0.0
+ if v is None:
+ return 0.0 # JS Number(null) === 0
+ s = str(v).strip(_JS_WS)
+ if s == "":
+ return 0.0 # JS Number("") === 0
+ if _JS_INF.match(s):
+ return 0.0 # Infinity is not finite -> 0
+ for pattern, base in _JS_RADIX:
+ if pattern.match(s):
+ return float(int(s[2:], base))
+ if not _JS_DEC.match(s):
+ return 0.0 # JS NaN -> 0
+ n = float(s)
+ return n if math.isfinite(n) else 0.0
+
+
+def _value_sql(spec):
+ """The ONE expression for a column, used by BOTH the filter and the sort.
+
+ Two expressions would let two rows tie in the grid and not tie in SQL (dates truncated for
+ comparison but ordered by the raw timestamp is the obvious way to get that wrong), so the
+ next sort key would break the tie in one engine and not the other.
+
+ numeric: `round_even(x, 0)` reproduces `aios_grid._round`, which is Python's round() =
+ BANKER'S rounding. DuckDB's plain ROUND() rounds half AWAY from zero, so ROUND(1234.5)=1235
+ while the grid shows 1234 — `eq 1234` would then match on screen and miss in SQL. The grid
+ displays rounded values; filters must agree with what is on screen.
+ date: truncate to the 10-char ISO shape the payload carries, so lexical compare is
+ chronological and a timestamp column cannot smuggle ' 00:00:00' into the comparison.
+ text: lowercased, matching `String(raw ?? "").toLowerCase()`.
+ """
+ e = spec['sql']
+ t = spec['type']
+ if t in NUMERIC_TYPES:
+ return f"COALESCE(round_even(TRY_CAST({e} AS DOUBLE), 0), 0)"
+ if t == 'date':
+ return f"COALESCE(SUBSTR(CAST({e} AS VARCHAR), 1, 10), '')"
+ return f"LOWER(COALESCE(CAST({e} AS VARCHAR), ''))"
+
+
+def _blank_sql(spec):
+ """Port of `isBlank`: null/undefined/"" are blank — numeric 0 is NOT.
+
+ Reads the RAW column, never `_value_sql` (which has already coalesced blanks into 0/"",
+ the very distinction this test exists to make).
+ """
+ e = spec['sql']
+ if spec['type'] in NUMERIC_TYPES:
+ # 0 stays non-blank: CAST(0 AS VARCHAR) is '0'. The '' arm covers a text-typed column
+ # holding "", which `_round` passes through unchanged into the payload.
+ return f"(({e}) IS NULL OR CAST({e} AS VARCHAR) = '')"
+ if spec['type'] == 'date':
+ return f"(COALESCE(SUBSTR(CAST({e} AS VARCHAR), 1, 10), '') = '')"
+ return f"(COALESCE(CAST({e} AS VARCHAR), '') = '')"
+
+
+# --------------------------------------------------------------------------- activeness
+
+def is_rule_active(rule, columns):
+ """Port of `isRuleActive` + `evalNode`'s two leaf guards. Row-independent by construction.
+
+ Unknown column -> inactive (evalNode returns null before matchFilter is ever called).
+ Value-free ops are always active. `between` needs BOTH bounds.
+
+ ⚠ The four VALUE-FREE ANCHOR MODES (`is before [today]`) carry no value, and the historical
+ "blank value = inactive" rule would IGNORE them — widening the result under a count nobody
+ would doubt. Same shape as the isEmpty/isNotEmpty no-op bug, arriving by a different door.
+ """
+ if not isinstance(rule, dict):
+ return False
+ col = rule.get('colId')
+ if col == COHORT_FIELD: # a cohort leaf has no column to look up
+ # Driven by the SET it names, so a value of "," is INACTIVE rather than active-and-
+ # unanswerable. Mirrors the cohort branch at the top of types.ts isRuleActive.
+ return bool(parse_cohort_ids(rule.get('value')))
+ if col not in columns:
+ return False
+ op = rule.get('op')
+ if op in VALUE_FREE_OPS:
+ return True
+ if op == 'within':
+ return _window_bounds(rule.get('dateWindow'), None, probe=True)
+ if rule.get('rhs') is not None:
+ rhs = rule['rhs']
+ # An rhs naming a column this table does not have is IGNORED, by the same rule as an
+ # unknown left column two lines above — for EITHER kind. Ignoring one side and hiding
+ # every row for the other would make the comparison asymmetric in a way nobody could
+ # predict. Doing it here rather than in _compile_leaf keeps activeness the single place
+ # that decides, which is what makes the compiled branch below provably unreachable.
+ if not isinstance(rhs, dict) or rhs.get('colId') not in columns:
+ return False
+ return _rhs_complete(rhs)
+ if rule.get('dateMode') in _ANCHOR_VALUE_FREE:
+ return True
+ value = _as_str(rule.get('value'))
+ if op == 'between':
+ v2 = rule.get('value2')
+ return value != '' and v2 is not None and _as_str(v2) != ''
+ return value != ''
+
+
+def _rhs_complete(rhs):
+ """Port of types.ts isRhsComplete. An incomplete rhs makes the rule INACTIVE, exactly as a
+ half-typed value does."""
+ if not isinstance(rhs, dict) or not rhs.get('colId'):
+ return False
+ if rhs.get('kind') == 'measure':
+ return _windows().normalize(rhs.get('window')) is not None
+ return rhs.get('kind') == 'field'
+
+
+def _windows():
+ """`harness.windows` imported lazily, so this module stays importable on its own.
+
+ filter_sql is otherwise PURE (no model/store/app imports) and that property is what lets
+ aios_grid embed the grid anywhere. windows.py is the one exception and it is a deliberate
+ one: the date vocabulary is a two-ENGINE contract, and a third copy of "what the past month
+ means" is precisely the drift verify_windows.py exists to prevent. It imports nothing but
+ datetime, so purity is preserved in substance.
+ """
+ from harness import windows as _w
+ return _w
+
+
+#: Mirrors windows.ANCHOR_VALUE_FREE, resolved lazily on first use (see _windows).
+class _AnchorValueFree:
+ def __contains__(self, mode):
+ return mode in _windows().ANCHOR_VALUE_FREE
+
+
+_ANCHOR_VALUE_FREE = _AnchorValueFree()
+
+
+def _window_bounds(spec, today, probe=False):
+ """Resolve a date-condition RANGE, or refuse.
+
+ `probe=True` answers only "is this a resolvable window?" without needing `today` — which is
+ what activeness has to know while compiling, before any date is in hand.
+
+ ⚠ A missing `today` on the real path RAISES rather than widening. The client's answer to the
+ same gap is to match nothing; the server's must be to refuse, because a server that quietly
+ drops a condition reports an authoritative row_count for a query nobody asked for. Same rule
+ as the sibling/depth caps: truncate on the client, refuse on the server.
+ """
+ w = _windows()
+ if probe:
+ return w.normalize(spec) is not None
+ if today is None:
+ raise ValueError(
+ 'a relative-date condition needs `today` — compile_filter_tree(today=...). '
+ 'Refusing rather than dropping the condition, which would widen the result while '
+ 'the count beside it still looked authoritative.')
+ return w.resolve(spec, today)
+
+
+def _as_str(v):
+ """The builder stores values as raw input strings; be tolerant of a number that survived
+ an older payload. `str(500) != ''` is active and `to_num` reads it back, matching JS where
+ `500 === ""` is false."""
+ return '' if v is None else str(v)
+
+
+# --------------------------------------------------------------------------- leaf
+
+def _compile_leaf(rule, columns, state):
+ """Port of `matchFilter`. Returns (sql, params) or None when the rule is INACTIVE."""
+ if not is_rule_active(rule, columns):
+ return None
+ col_id = rule['colId']
+ op = rule.get('op')
+ value = _as_str(rule.get('value'))
+
+ # --- owner item 5: a COHORT leaf, before any column lookup -------------------------------
+ # `__cohort__` is not a column. Handled first for the same reason evalNode handles it first:
+ # falling through to the column path would make it INACTIVE, and inactive means every row.
+ if col_id == COHORT_FIELD:
+ return _compile_cohort(rule, state)
+
+ # --- C-OPS (wave 2026-08-02): a RANK leaf is structurally unanswerable at row grain ------
+ # Top-N / quantile membership is a property of the SET, not the row; the client engine
+ # answers it with a set pass over the sibling-filtered domain. Refuse loudly rather than
+ # compile something that means a different question (see RANK_OPS).
+ if op in RANK_OPS:
+ raise ValueError(
+ f'rank operator {op!r} cannot compile to row SQL - evaluate it as a set pass '
+ f'(the client engine) or pre-resolve the matching ids before compiling')
+
+ spec = columns[col_id]
+
+ def used(sql, params=()):
+ state['used'].add(col_id)
+ if spec.get('aggregate'):
+ state['aggregate'] = True
+ return (sql, list(params))
+
+ # --- value-free ops, BEFORE any value-based short-circuit (the no-op bug) ---------------
+ if op == 'isEmpty':
+ return used(_blank_sql(spec))
+ if op == 'isNotEmpty':
+ return used(f"NOT {_blank_sql(spec)}")
+
+ v = _value_sql(spec)
+ t = spec['type']
+
+ # --- CG-9: the comparand is another COLUMN, coerced through the LEFT field's type --------
+ # `_value_sql` on a spec whose `sql` is the RIGHT column and whose `type` is the LEFT one —
+ # exactly what TS does (`toNum(other)` for a numeric LHS, `String(other ?? "")` for a date,
+ # `.toLowerCase()` for text). Reading the right column through its OWN type would compare a
+ # rounded number against an unrounded one and disagree on the ties.
+ rhs_v = None
+ if rule.get('rhs') is not None:
+ # No `rspec is None` branch: `is_rule_active` already rejected an rhs naming a column
+ # this table does not have, so it cannot be missing here. A defensive fallback would be
+ # unreachable, and the negative control showed exactly that — deleting it changed
+ # nothing, which is how dead code hides behind a careful-looking line.
+ rspec = columns[rule['rhs']['colId']]
+ rhs_v = _value_sql({'sql': rspec['sql'], 'type': t})
+ state['used'].add(rule['rhs']['colId'])
+ if rspec.get('aggregate'):
+ state['aggregate'] = True
+
+ if t in NUMERIC_TYPES:
+ if rhs_v is not None:
+ return used(f"({v} {_NUM_CMP[op]} {rhs_v})") if op in _NUM_CMP else (SQL_TRUE, [])
+ if op == 'between':
+ a, b = to_num(value), to_num(rule.get('value2'))
+ return used(f"({v} >= ? AND {v} <= ?)", [min(a, b), max(a, b)])
+ if op in _NUM_CMP:
+ return used(f"({v} {_NUM_CMP[op]} ?)", [to_num(value)])
+ return (SQL_TRUE, []) # contains/doesNotContain on a number -> default: true
+
+ if t == 'date':
+ if op == 'within':
+ bounds = _window_bounds(rule.get('dateWindow'), state.get('today'))
+ if bounds is None:
+ return ('1=0', []) # unreachable: activeness probed it. Never widen.
+ lo, hi = bounds
+ # `{v} <> ''` is NOT redundant. `_value_sql` COALESCEs a NULL date to '', and
+ # '' <= any upper bound is true — so an open-ended window would sweep in every
+ # never-ordered customer. TS guards it with `if (a === "") return false`.
+ parts, params = [f"{v} <> ''"], []
+ if lo is not None:
+ parts.append(f"{v} >= ?")
+ params.append(lo)
+ if hi is not None:
+ parts.append(f"{v} <= ?")
+ params.append(hi)
+ return used('(' + ' AND '.join(parts) + ')', params)
+ if rhs_v is not None:
+ return used(f"({v} {_DATE_CMP[op]} {rhs_v})") if op in _DATE_CMP else (SQL_TRUE, [])
+ if op == 'between':
+ v2 = _as_str(rule.get('value2'))
+ lo, hi = (value, v2) if value < v2 else (v2, value)
+ return used(f"({v} >= ? AND {v} <= ?)", [lo, hi])
+ if op in _DATE_CMP:
+ anchor = _resolve_anchor(rule.get('dateMode'), value, state.get('today'))
+ if anchor is None:
+ return ('1=0', []) # unresolvable anchor -> matches nothing (TS: false)
+ return used(f"({v} {_DATE_CMP[op]} ?)", [anchor])
+ return (SQL_TRUE, []) # contains/doesNotContain on a date -> default: true
+
+ # text / status — case-insensitive. strpos, not LIKE: `includes` is a LITERAL substring
+ # test, so a value holding % or _ must not act as a wildcard.
+ #
+ # BOTH SIDES fold in SQL (`LOWER(?)`, never Python's str.lower()). Python and JS agree on
+ # case folding; DuckDB does NOT — LOWER('ISTANBUL' with a dotted capital I) drops the dot
+ # while both languages keep it as i + combining dot. Folding the needle in Python and the
+ # haystack in DuckDB therefore produced two different strings, and a value could fail to
+ # match ITSELF. One folder for both operands is the only version that cannot do that.
+ if rhs_v is not None:
+ # Both operands are already folded by `_value_sql` (text branch), so no LOWER(?) here.
+ if op == 'contains':
+ return used(f"(strpos({v}, {rhs_v}) > 0)")
+ if op == 'doesNotContain':
+ return used(f"(strpos({v}, {rhs_v}) = 0)")
+ if op == 'eq':
+ return used(f"({v} = {rhs_v})")
+ if op == 'neq':
+ return used(f"({v} <> {rhs_v})")
+ return (SQL_TRUE, [])
+ if op == 'contains':
+ return used(f"(strpos({v}, LOWER(?)) > 0)", [value])
+ if op == 'doesNotContain':
+ return used(f"(strpos({v}, LOWER(?)) = 0)", [value])
+ if op == 'eq':
+ return used(f"({v} = LOWER(?))", [value])
+ if op == 'neq':
+ return used(f"({v} <> LOWER(?))", [value])
+ return (SQL_TRUE, []) # gt/gte/lt/lte/between/within on text -> default: true
+
+
+def _resolve_anchor(mode, value, today):
+ """A date condition's anchor -> one ISO date, or None. `today` may be absent ONLY for the
+ `exact` mode, which does not use it.
+
+ The sentinel is deliberate and load-bearing for BACK-COMPAT: every date filter that existed
+ before anchors is `exact`, and every caller that compiles one (store_query, store_rows)
+ passes no `today`. Requiring it unconditionally would turn a working filter into an
+ exception. A RELATIVE anchor still refuses — the server never widens.
+ """
+ mode = mode or 'exact'
+ if today is None:
+ if mode != 'exact':
+ raise ValueError(
+ f"the date anchor {mode!r} is relative and needs `today` — "
+ f"compile_filter_tree(today=...). Refusing rather than dropping the condition, "
+ f"which would widen the result under an authoritative-looking count.")
+ # `exact` ignores `today` entirely (verify_windows resolves it across 11 probe dates and
+ # gets the same answer every time), so any valid date serves as the unused argument.
+ today = '1970-01-01'
+ return _windows().resolve_anchor(mode, value, today)
+
+
+def _compile_cohort(rule, state):
+ """Port of evalNode's cohort branch: membership in a SET of hand-curated sets of row ids.
+
+ Owner 2026-07-27: the leaf names one OR MORE cohorts and asks `anyOf` / `allOf` / `noneOf`.
+ A single id is a one-element set, so the shipped `is part of` compiles down this same path.
+
+ States, mirroring TS exactly:
+ every set present -> the union (anyOf / noneOf) or the intersection (allOf)
+ a set present but EMPTY -> that member contributes 1=0, because nobody is in an empty
+ cohort. So `allOf` collapses to 1=0 and `noneOf` to 1=1 —
+ which is what `set.has(pid)` on an empty Set does in TS.
+ ANY set ABSENT -> 1=0 for ALL THREE ops. The condition is unanswerable, and
+ unanswerable matches nothing: answering "everything" to
+ `is none of [a cohort we cannot see]` is the widening sin
+ wearing a plausible face, and answering it for the members we
+ DO have would silently ask a different question.
+
+ COALESCE(... , FALSE) because a NULL row id makes `id IN (...)` NULL, and `NOT NULL` is NULL
+ — SQL would drop the row where TS keeps it.
+ """
+ sets = state.get('cohort_sets')
+ if sets is None:
+ raise ValueError(
+ 'a cohort condition needs cohort_sets — compile_filter_tree(cohort_sets=...). '
+ 'Refusing rather than dropping it: a dropped condition widens the result while the '
+ 'count beside it still looks authoritative.')
+ id_sql = state.get('id_sql')
+ if not id_sql:
+ raise ValueError('a cohort condition needs id_sql (the row-identity column)')
+ op = COHORT_OP_ALIASES.get(rule.get('op'), rule.get('op'))
+ named = parse_cohort_ids(rule.get('value'))
+ members = [sets.get(cid) for cid in named]
+ if not named or any(m is None for m in members):
+ return ('1=0', [])
+
+ parts, params = [], []
+ for ids in members:
+ ids = [int(x) for x in ids]
+ if not ids:
+ parts.append('1=0')
+ continue
+ parts.append(f"COALESCE({id_sql} IN ({','.join('?' for _ in ids)}), FALSE)")
+ params.extend(ids)
+ if op == 'allOf':
+ return ('(' + ' AND '.join(parts) + ')', params)
+ union = '(' + ' OR '.join(parts) + ')'
+ return ((f"(NOT {union})" if op == 'noneOf' else union), params)
+
+
+# --------------------------------------------------------------------------- tree
+
+def _compile_node(node, columns, state):
+ """Port of `evalNode`. Returns (sql, params), or None when the node is INACTIVE.
+
+ A group combines only its ACTIVE children with its OWN conjunction; a group with no active
+ children is itself inactive and disappears. That is what stops a half-built group from
+ either zeroing the grid (`and`) or disabling it (`or`).
+ """
+ if not isinstance(node, dict):
+ return None
+ if isinstance(node.get('children'), list):
+ parts, params = [], []
+ for child in node['children']:
+ got = _compile_node(child, columns, state)
+ if got is None:
+ continue # inactive -> ignored entirely
+ parts.append(got[0])
+ params.extend(got[1])
+ if not parts:
+ return None
+ joiner = ' OR ' if node.get('conj') == 'or' else ' AND '
+ return ('(' + joiner.join(parts) + ')', params)
+ return _compile_leaf(node, columns, state)
+
+
+def compile_filter_tree(nodes, conj='and', columns=None, member_ids=None, id_sql=None,
+ today=None, cohort_sets=None):
+ """Port of `matchFilterTree` (+ the `memberPids` union in `useVisibleRows`).
+
+ Returns a `Compiled`, or **None when nothing is active** — meaning no predicate at all, not
+ a false one. `matchFilterTree` returns true when the tree is inactive, so emitting anything
+ here would narrow rows the client would have shown.
+
+ `member_ids` reproduces `members.has(r.pid) || matchFilterTree(...)`. Note the union lives
+ INSIDE `if (filters.length)` and is OR'd with a tree that is true for everything when
+ inactive — so an inactive tree must emit NOTHING, never `pid IN (...)`, which would narrow
+ to just the hand-picked members. Same family of bug as the tri-state one, inverted.
+
+ `today` is the TENANT'S today, required by any relative date condition (`is within …`,
+ `is before [one month ago]`) and by nothing else — an `exact` date needs none, which is what
+ keeps every pre-anchor caller working unchanged. `cohort_sets` is `{cohortId: [pid, ...]}`
+ for cohort-membership leaves. Both REFUSE when needed and missing; neither defaults.
+ """
+ state = {'aggregate': False, 'used': set(),
+ 'today': today, 'cohort_sets': cohort_sets, 'id_sql': id_sql}
+ got = _compile_node({'conj': conj, 'children': list(nodes or [])}, columns or {}, state)
+ if got is None:
+ return None
+ sql, params = got
+ if member_ids:
+ if not id_sql:
+ raise ValueError('member_ids requires id_sql (the row-identity column)')
+ ids = [int(x) for x in member_ids]
+ sql = f"({sql} OR {id_sql} IN ({','.join('?' for _ in ids)}))"
+ params = list(params) + ids
+ return Compiled(sql, list(params), state['aggregate'], frozenset(state['used']))
+
+
+def compile_search(q, columns):
+ """Port of `matchSearch`: the narrowing search box.
+
+ True if ANY human-readable (text/status) column contains `q`, case-insensitively. NUMERIC
+ columns are skipped on purpose so a query like "10" does not match revenue or order counts.
+ Dates are skipped too — `matchSearch` tests only text and status.
+
+ The caller ANDs this with the filter predicate, matching the TS pipeline order
+ (filter -> search). It is deliberately OUTSIDE the `member_ids` union: in `useVisibleRows`
+ the union applies to the filter step only, so a hand-picked member is still searchable away.
+ """
+ # `.strip(_JS_WS)`, not `.strip()`: the client trims with JS String.trim(), whose whitespace
+ # set differs from Python's in BOTH directions (Python strips U+0085 NEL and U+001C..1F,
+ # JS does not; JS strips U+FEFF, Python does not). A query of just those characters is
+ # blank to one engine and a real search to the other. Folding is left to SQL — see the
+ # LOWER(?) note in _compile_leaf.
+ q = (q or '').strip(_JS_WS)
+ if not q:
+ return None
+ parts, params, used = [], [], set()
+ aggregate = False
+ for col_id, spec in (columns or {}).items():
+ if spec['type'] not in TEXTUAL_TYPES:
+ continue
+ parts.append(f"(strpos({_value_sql(spec)}, LOWER(?)) > 0)")
+ params.append(q)
+ used.add(col_id)
+ aggregate = aggregate or bool(spec.get('aggregate'))
+ if not parts:
+ # No searchable column: `matchSearch` returns false for every row, so the search
+ # narrows to nothing. That is a real predicate, not an absent one.
+ return Compiled('1=0', [], False, frozenset())
+ return Compiled('(' + ' OR '.join(parts) + ')', params, aggregate, frozenset(used))
+
+
+def compile_order_by(sorts, columns, tiebreak_sql=None):
+ """Port of `makeComparator`. Returns an ORDER BY body, or None when nothing sorts.
+
+ `tiebreak_sql` (the row-identity column) is appended as a final ASC key and is REQUIRED for
+ any windowed fetch. `Array.prototype.sort` is stable, so TS leaves tied rows in their
+ incoming order; SQL guarantees NOTHING for ties, so LIMIT/OFFSET paging over a non-total
+ order can repeat a row on one page and drop it from another. Appending row identity makes
+ the order total. It is a STRENGTHENING of the TS guarantee, not a divergence: the payload a
+ windowed fetch produces is itself in this order, so the client never re-sorts it differently.
+
+ BLANKS SORT LAST IN BOTH DIRECTIONS (Airtable's behavior, and the reason descending
+ "Last order" leads with the most recent rather than with never-ordered customers). Each key
+ contributes TWO terms: an always-ASC blank flag, then the value in the requested direction.
+ Two blanks tie on both terms, so the NEXT key decides — matching the comparator's
+ `if (aBlank && bBlank) continue`.
+
+ An unknown column is skipped: in TS its values are `undefined` on both sides, so both are
+ blank and the key is a no-op tiebreak.
+
+ Direction: `s.dir === "asc" ? c : -c` — only the exact string "asc" ascends, anything else
+ descends. Faithfully reproduced; do not "fix" it to default ASC.
+
+ Residual divergence, deliberate: TS uses `localeCompare`, we use LOWER() + DuckDB's binary
+ collation. They agree on case-insensitive ordering of ASCII and on ISO dates (unaffected by
+ LOWER), and differ on locale tie-breaks between case-variants of the same string ("a" vs
+ "A" sort adjacent under localeCompare, tie under LOWER) and on accent ordering.
+ """
+ terms = []
+ for s in (sorts or []):
+ if not isinstance(s, dict):
+ continue
+ spec = (columns or {}).get(s.get('colId'))
+ if spec is None:
+ continue
+ terms.append(f"CASE WHEN {_blank_sql(spec)} THEN 1 ELSE 0 END ASC")
+ terms.append(f"{_value_sql(spec)} {'ASC' if s.get('dir') == 'asc' else 'DESC'}")
+ # Append the tiebreak even when NO sort key survived (all unknown, or none given). A
+ # windowed fetch needs a total order regardless of what the user sorted by — an unsorted
+ # LIMIT/OFFSET is exactly as unstable as a tied one. Callers wanting pure client parity
+ # pass no tiebreak_sql and still get None.
+ if tiebreak_sql:
+ terms.append(f"{tiebreak_sql} ASC")
+ return ', '.join(terms) or None
diff --git a/platform/harness/measure_filter.py b/platform/harness/measure_filter.py
new file mode 100644
index 0000000000000000000000000000000000000000..bbebdbe3df57ea89751f5a70a298be34bb0fee89
--- /dev/null
+++ b/platform/harness/measure_filter.py
@@ -0,0 +1,788 @@
+"""harness/measure_filter.py — answering `Where [Sales] [in the last 90 days] [>] [5,000]` (CG-8).
+
+GATED 2026-07-26 by `platform/verify_measure_filter.py` — 119 assertions against the real
+store (every resolved id set compared to a per-customer aggregate summed in Python from raw rows)
+plus a synthetic store for the cases live data cannot produce. Negative control: 24 faithful
+mutations, 24 caught. The gate found two things the reasoning below asserted and the code did not
+do, both now fixed and both re-caught by the control:
+
+ - a rule with NO window resolved to ALL TIME. The error message four lines below says it
+ refuses to do exactly that; the line above it did it anyway.
+ - `sum()` over an all-NULL group is NULL, and `NULL > x` and `NULL <= x` are BOTH false, so
+ such a customer fell out of the two halves of the same question. Now COALESCEd to 0.
+
+THE PROBLEM. `revenue_ytd` is a pre-computed column in `customer_data.pool()`. "Sales in the last
+90 days" is a DIFFERENT aggregate over a DIFFERENT window, and no column holds it. So a measure
+condition cannot be answered by looking at the row in hand — it has to be a query.
+
+THE SHAPE. Resolve each measure condition server-side to a **set of customer ids**, and let the
+existing client engine treat that set as a membership test. Per condition, one query:
+
+ SELECT rp_id FROM WHERE GROUP BY rp_id
+ HAVING ?
+
+Three properties that fall out, none incidental:
+
+ * **No second definition of a number.** The aggregate comes from `semantic._measure_sql` — the
+ same expression the Analyst and every metric already use. This cannot disagree with "revenue"
+ elsewhere because it IS that computation.
+ * **The displayed columns are untouched.** `revenue_ytd` still comes from `pool()`. We ADD a
+ predicate; we do not re-source the table. So this needs no `pool()`→store migration, and does
+ not inherit that migration's parity problem.
+ * **Counts stay honest.** The client still holds every row, so the table stays whole-book and
+ `countLabel` keeps counting what it actually has (CG-3 `whole-book` mode).
+
+⚠ WHAT MAY BE OFFERED, AND WHY IT IS AN ALLOWLIST
+`store_parity()` validates exactly five metrics against live Odoo. Every OTHER sum-metric on the
+topic would get an expression with no independent check behind it — self-consistent with the rest
+of the app and still wrong if the expression is wrong. Against "robust for EVERY numerically
+driven object", that gap is load-bearing, so admission is gated on HAVING A CONTRACT and spelled
+as a list. An allowlist fails CLOSED when a metric is added; iterating the topic's metrics would
+fail open, silently offering an unvalidated number in the one place a number looks authoritative.
+
+⚠ AN UNRESOLVABLE CONDITION RAISES. It never returns "everything" or "nothing": both are answers,
+and a wrong answer here is invisible — the grid just shows a different set of customers under a
+count that looks authoritative. `ModelError` is the only safe failure.
+"""
+from harness import semantic as _sem
+from harness import windows as _win
+
+#: metric key -> how it reads in the condition builder. ONLY metrics with an independent
+#: validation contract (semantic.store_parity / a metric `validate:` block) appear here.
+#: `orders` lives on sales_orders and `customers` is a property of a SET, not of a customer —
+#: neither is a per-customer measure, so neither is offered.
+#: Each entry carries its TOPIC, because admission is no longer single-topic. `orders` lives on
+#: sales_orders (order-header grain) while the other three live on sales_lines — and the topic
+#: decides the FROM clause, the scope SQL and which dim identifies a customer. Letting the caller
+#: pass the topic (the old shape) meant a caller could pass a wrong one; deriving it from the
+#: measure means there is nothing to get wrong.
+ADMITTED = {
+ 'revenue': {'label': 'Sales', 'topic': 'sales_lines'},
+ 'margin': {'label': 'Gross Margin $', 'topic': 'sales_lines'},
+ 'units': {'label': 'Units', 'topic': 'sales_lines'},
+ # `orders` is admitted on the SAME rule as the other three and not by exception:
+ # `semantic.store_parity()` checks it store-vs-live per BU, and the metric carries an
+ # `order_count` validate contract. It is the replacement for the retired `Orders 24M`
+ # column — same question, with the period as a parameter instead of frozen at 24 months.
+ 'orders': {'label': 'Orders', 'topic': 'sales_orders'},
+ # ⚠ The first COMPOSITE measure (2026-07-27, owner's follow-up): a RATIO, not an aggregate.
+ # `aov` is `revenue` (line grain, sales_lines) over `orders` (header grain, sales_orders), so
+ # it has no single query and `_measure_sql` REFUSES it — which is the fail-closed shape that
+ # makes a mis-wired ratio raise instead of quietly computing something else. It is resolved
+ # by computing each BASE per customer and combining them through `semantic._post_compute`,
+ # the same function every other surface uses, so AOV here cannot disagree with AOV anywhere.
+ # `topic` names where the metric is DECLARED; the bases each resolve on their own.
+ 'aov': {'label': 'Avg order $', 'topic': 'sales_lines'},
+ # ⚠ `input_scale` SETTLES the question this measure was withheld over. The metric stays a
+ # FRACTION (margin/revenue, 0-1) — it is the semantic model's number and every other surface
+ # reads it — while the USER'S TYPED VALUE is divided by 100 on the way in, so
+ # `Gross Margin % > 20` compares against 0.20. The factor moves exactly once, at the input
+ # boundary, and never touches the metric. Scaling a COMPUTED comparand (a statistic, or the
+ # other side of a measure-vs-measure) would divide by 100 twice, so it is applied to the
+ # literal alone and the gate proves that by construction.
+ 'margin_pct': {'label': 'Gross Margin %', 'topic': 'sales_lines', 'input_scale': 100.0},
+ # ⚠ COMPANY-LEVEL (2026-07-27, owner's ask). Credit notes carry team_id = 1 for everything,
+ # so a business-unit total is not a thing that exists — `_query_parts` refuses one and the
+ # live domain builder refuses one. `measure_fields(team_id)` therefore stops OFFERING these
+ # to a BU-scoped caller rather than letting them build a condition that can only error: a
+ # dead entry in the picker is worse than an absent one, and hiding what cannot be answered
+ # is what `filterable: false` already does for columns.
+ 'returns': {'label': 'Returns $', 'topic': 'credit_notes'},
+ 'returns_pct': {'label': 'Return %', 'topic': 'credit_notes', 'input_scale': 100.0},
+}
+
+#: The metrics `semantic.store_parity()` actually exercises against live Odoo. ADMITTED must be
+#: a SUBSET of this — that is the whole admission rule ("does this measure carry an independent
+#: validation contract"), and stating it as data lets the gate assert it instead of trusting the
+#: comment above. Adding a measure here without adding it to store_parity's loop fails the gate.
+PARITY_CHECKED = frozenset({'revenue', 'margin', 'units', 'orders', 'customers',
+ 'returns', 'invoiced'})
+
+#: numeric comparison ops, mirroring filter_sql._NUM_CMP. `between` is expressed as two
+#: conditions by the caller rather than a third operator shape.
+OPS = {'gt': '>', 'gte': '>=', 'lt': '<', 'lte': '<=', 'eq': '=', 'neq': '<>'}
+
+#: CG-9 — the ops allowed when the right-hand side is ANOTHER MEASURE. `eq`/`neq` are withheld,
+#: and not out of caution: both sides are sums of floats the user never sees, so `=` would match
+#: nobody and `≠` would match everybody, and both would LOOK like they worked. CG-8 could offer
+#: `=` honestly because the other side was a number a person typed. Mirrors types.ts
+#: MEASURE_PAIR_OPS; the gate asserts the two lists are the same.
+PAIR_OPS = ('gte', 'gt', 'lte', 'lt')
+
+#: The statistics a condition may compare against — "who is in the top quartile" (owner,
+#: 2026-07-27). Each is computed over the CALLER'S POOL for the same measure and window.
+#: The labels are the sentence the user reads; the client mirrors them.
+STATS = {
+ 'avg': 'the average',
+ 'median': 'the median',
+ 'p10': 'the bottom 10%',
+ 'p25': 'the bottom quartile',
+ 'p75': 'the top quartile',
+ 'p90': 'the top 10%',
+}
+# ⚠ The owner's OWN words, and short enough to fit: "the 75th percentile (top quartile)" clipped
+# to "the 75th perce" in the value select, and a truncated parenthetical reads as a rendering
+# bug. `> the top quartile` is also how a person says it out loud, so the shorter label is the
+# better one twice over. Seen in a live screenshot of a run whose every assertion was green.
+
+#: ⚠ THE POPULATION IS THE CALLER'S POOL, INCLUDING ZEROS. A customer who bought nothing has a
+#: measure of 0, not of nothing — that is the convention the zero-group already establishes
+#: everywhere else, and "the median customer" means the median of the customers you can see.
+#: Two consequences worth knowing before reading a result:
+#: · it is a PERMISSION boundary as well as a definition — a scoped user's median is theirs,
+#: and a statistic over the whole book would leak the shape of data they cannot open;
+#: · on a measure most customers score 0 on, the 75th percentile IS 0, so "top quartile"
+#: degenerates to "anyone with any activity at all". True, and surprising.
+
+
+def percentile(values, q):
+ """The `q` quantile of `values` by LINEAR INTERPOLATION between closest ranks — the R-7
+ convention, which is what Excel's PERCENTILE.INC computes. `q` may also be a STATS key.
+
+ Pinned to one convention on purpose: nearest-rank and interpolation disagree on any even
+ population (the median of [1,2,3,4] is 2.5 here and 2 or 3 under nearest-rank), and the gate
+ checks it against hand-computed values rather than against `statistics.median` — a reference
+ borrowed from a library only proves we match that library.
+
+ Returns None for an empty population: there is no median of nobody, and 0 would be a number
+ the caller could act on.
+ """
+ if isinstance(q, str):
+ if q == 'avg':
+ xs = list(values)
+ return (sum(xs) / len(xs)) if xs else None
+ if q not in STATS:
+ raise _sem.ModelError(
+ f"{q!r} is not a statistic. Offered: {sorted(STATS)}")
+ q = 0.5 if q == 'median' else int(q[1:]) / 100.0
+ xs = sorted(float(v) for v in values)
+ if not xs:
+ return None
+ if len(xs) == 1:
+ return xs[0]
+ pos = (len(xs) - 1) * float(q)
+ lo = int(pos)
+ hi = min(lo + 1, len(xs) - 1)
+ return xs[lo] + (xs[hi] - xs[lo]) * (pos - lo)
+
+
+#: The same six comparisons as OPS, as Python callables — used wherever the comparison happens in
+#: Python rather than in a HAVING (a composite measure, or a two-measure pair).
+_CMP = {'gt': lambda a, b: a > b, 'gte': lambda a, b: a >= b,
+ 'lt': lambda a, b: a < b, 'lte': lambda a, b: a <= b,
+ 'eq': lambda a, b: a == b, 'neq': lambda a, b: a != b}
+
+
+def is_company_level(key):
+ """True when this measure cannot be scoped to a business unit.
+
+ Checked over every BASE the measure decomposes into, not just the declared topic: `Return %`
+ names credit_notes but also reads customer_invoices, and one un-scopable half is enough to
+ make the whole ratio un-scopable.
+ """
+ bases, _ = _sem._expand_measures([key])
+ tps = _sem.topics()
+ for b in bases:
+ store = (tps.get(_sem.metrics()[b].get('topic')) or {}).get('store') or {}
+ if not store.get('team_col'):
+ return True
+ return False
+
+
+def measure_fields(team_id=None):
+ """The measures the condition builder may offer, in the payload's field shape.
+
+ These are FILTERABLE BUT NOT DISPLAYABLE — a measure is a question about a window, not a
+ column of the table, and rendering it as a column would silently pick a window for the user.
+
+ ⚠ `team_id` NARROWS THE OFFER. A COMPANY-LEVEL measure (returns, and anything else built on
+ documents that carry no trustworthy BU tag) cannot be answered for one business unit —
+ `_query_parts` refuses, and refusing is right. But a picker entry whose every use ends in an
+ error is worse than no entry, so a BU-scoped caller is not offered them at all. Same
+ principle as `filterable: false` on a column: do not offer what cannot be answered.
+ """
+ mts = _sem.metrics()
+ out = []
+ for key, spec in ADMITTED.items():
+ m = mts.get(key)
+ if not m:
+ continue
+ if team_id and is_company_level(key):
+ continue
+ out.append({'key': key, 'label': spec['label'],
+ 'type': _sem._FORMAT_TYPE.get(m.get('format'), 'currency')})
+ return out
+
+
+def topic_for(key):
+ """The topic a measure is answered on. Raises for anything not admitted."""
+ spec = ADMITTED.get(key)
+ if not spec:
+ raise _sem.ModelError(
+ f"{key!r} is not an admitted measure. Offered: {sorted(ADMITTED)} — a measure "
+ f"without an independent validation contract is not filterable (see this module's "
+ f"docstring).")
+ return spec['topic']
+
+
+def _entity_sql(topic):
+ """(from-clause, the id column customers are grouped by, the store binding) for a topic."""
+ t = _sem.topics().get(topic)
+ if not t or 'store' not in t:
+ raise _sem.ModelError(f"topic {topic!r} has no store binding")
+ s = t['store']
+ dims = s.get('dims') or {}
+ # sales_lines calls it `order_partner` (the line's parent order's partner); sales_orders
+ # calls the same thing `partner`. One name per topic, both meaning "the customer this row
+ # belongs to" — which is the only dim this module ever groups by.
+ dim = dims.get('order_partner') or dims.get('partner')
+ if not dim:
+ raise _sem.ModelError(f"topic {topic!r} has no customer dim to group by")
+ return f"{s['table']} {s['alias']} {s.get('join', '')}", dim['col'], s
+
+
+def is_composite(key):
+ """True for a measure with no single aggregate expression — a `ratio` or a `derived`.
+
+ These are answered by computing each BASE per customer and combining in Python; they can
+ never be a HAVING, which is why `_measure_sql` refusing them is a feature.
+ """
+ return _sem.metrics().get(key, {}).get('agg') in ('ratio', 'derived')
+
+
+def _base_topic(key):
+ """The topic a BASE metric aggregates on — read from the METRIC, never from ADMITTED.
+
+ A composite decomposes into bases that need not themselves be offerable (and whose topics may
+ differ from each other: `aov`'s numerator is on sales_lines and its denominator on
+ sales_orders). Resolving the topic from the allowlist would make that undecidable.
+ """
+ m = _sem.metrics().get(key)
+ if not m:
+ raise _sem.ModelError(f"unknown metric {key!r}")
+ topic = m.get('topic')
+ if not topic:
+ raise _sem.ModelError(f"metric {key!r} declares no topic to aggregate on")
+ return topic
+
+
+def _query_parts(key, window, today, team_id):
+ """The FROM / GROUP-BY id / aggregate / WHERE for one (measure, window), shared by the
+ one-sided and the two-sided resolver so there is one definition of the scope."""
+ topic = _base_topic(key)
+ # NO DEFAULT WINDOW. A rule that carries no window is not "all time" — it is a rule whose
+ # window we do not know, and answering it over all time WIDENS the condition while the count
+ # beside it still looks authoritative. `all_time` is a legitimate ANSWER the user can pick;
+ # it is not a legitimate GUESS. (This line shipped as `rule.get('window') or {...}` and the
+ # gate caught it contradicting the error message two lines below.)
+ bounds = _win.resolve(window, today)
+ if bounds is None:
+ raise _sem.ModelError(
+ f"unresolvable window {window!r} — refusing rather than defaulting to all "
+ f"time, which would widen the condition while the count still looked authoritative")
+ date_from, date_to = bounds
+
+ frm, id_col, s = _entity_sql(topic)
+ m = _sem.metrics()[key]
+ # COALESCE, because SQL's sum() over an all-NULL group is NULL, and `NULL > x` and
+ # `NULL <= x` are BOTH false: the customer would vanish from the two halves of the same
+ # question, so `margin <= 0` and `margin > 0` would not cover the book. The zero-group below
+ # cannot rescue them either — they DO have rows in the window, just no values. Python's sum
+ # of the same rows is 0.0, and 0 is what the grid would show, so 0 is the answer.
+ agg = f"COALESCE({_sem._measure_sql(m, s['alias'])}, 0)"
+
+ where, params = [_sem.render_scope(s['scope_sql'].strip())], []
+ if date_from:
+ where.append(f"CAST({s['date_col']} AS TIMESTAMP) >= ?")
+ params.append(f"{date_from} 00:00:00")
+ if date_to:
+ where.append(f"CAST({s['date_col']} AS TIMESTAMP) <= ?")
+ params.append(f"{date_to} 23:59:59")
+ if team_id:
+ if not s.get('team_col'):
+ raise _sem.ModelError(f"topic {topic!r} is company-level — it has no business-unit "
+ f"filter, so a BU-scoped caller cannot be answered safely")
+ where.append(f"{s['team_col']} = ?")
+ params.append(int(team_id))
+ return frm, id_col, agg, ' AND '.join(where), params
+
+
+def _scaled(key, value):
+ """A TYPED value in the units the metric actually holds.
+
+ `Gross Margin % > 20` is typed in percentage points and the metric is a fraction, so the 20
+ becomes 0.20. Applied to a LITERAL only — a statistic and the other side of a
+ measure-vs-measure are already on the metric's scale, and dividing them too would apply the
+ factor twice for a result that still looks plausible.
+ """
+ scale = ADMITTED.get(key, {}).get('input_scale')
+ return (value / scale) if scale else value
+
+
+def resolve_stat(rule, today, team_id=None, allowed_pids=None):
+ """`Where [Sales] [this year] [>] [the 75th percentile]` — the top quartile of the pool.
+
+ One totals query for the measure, the statistic taken over the CALLER'S POOL (see the STATS
+ note on why the population is the pool and what that costs), then a comparison per customer.
+ """
+ stat = (rule.get('rhs') or {}).get('stat')
+ if stat not in STATS:
+ raise _sem.ModelError(f"{stat!r} is not a statistic. Offered: {sorted(STATS)}")
+ key = rule.get('colId')
+ topic_for(key)
+ op = rule.get('op')
+ if op not in PAIR_OPS:
+ raise _sem.ModelError(
+ f"{op!r} cannot compare a measure with a statistic ({sorted(PAIR_OPS)}). Equality "
+ f"against a computed cut-off matches nobody except by coincidence.")
+ pool = _pool_of(allowed_pids)
+ if pool is None:
+ raise _sem.ModelError(
+ "a statistic needs a population to be computed over, and none was supplied — "
+ "refusing rather than taking it over whichever customers happen to have rows, "
+ "which would be a different question with an authoritative-looking answer")
+ con = _sem._store_con()
+ try:
+ totals = _totals(con, key, rule.get('window'), today, team_id)
+ finally:
+ con.close()
+ # ⚠ THE POPULATION IS THE CUSTOMERS WHO HAVE THIS MEASURE AT ALL — owner's decision,
+ # 2026-07-27: *"top quartile of customers who actually has returned something"*.
+ #
+ # It was the whole pool including zeros, which is the convention everywhere else and was
+ # wrong HERE. The pool carries lapsed customers, so ~30% of it sits at zero for any 12-month
+ # window — that dragged the 25th percentile to exactly 0.0, made `< the bottom quartile`
+ # match NOBODY, and would have been worse for Return %, where most customers never return
+ # anything and "the top quartile" would have degenerated to "anyone with a single refund".
+ #
+ # NON-ZERO, not has-rows: a zero Return % means nothing was returned, which is precisely the
+ # customer the owner is excluding. It also reads as one sentence — the question is asked
+ # among customers who have that measure — and it generalises: "the median Sales" means the
+ # median among customers who sold something.
+ #
+ # The ANSWER is restricted to the same population, so `< the bottom quartile` returns a
+ # quarter of the returners rather than every customer who never returned.
+ population = {pid: v for pid, v in totals.items() if pid in pool and v}
+ cut = percentile(list(population.values()), stat)
+ if cut is None: # nobody has this measure -> nobody qualifies
+ return set()
+ return {pid for pid, v in population.items() if _CMP[op](v, cut)}
+
+
+def _pool_of(allowed_pids):
+ """The caller's visible pool as a set of plain ints, or None.
+
+ ⚠ The pool arrives from `pool()`/a cohort and may hold numpy ints or id strings; the store
+ returns BIGINTs. A set difference across two int types silently finds nothing in common,
+ which here would look like "no lapsed customers" rather than an error.
+ """
+ return None if allowed_pids is None else {int(p) for p in allowed_pids if p is not None}
+
+
+def rule_complete(rule):
+ """Is this rule's right-hand side FULLY present — a question that has actually been asked?
+
+ THE GAP THIS CLOSES (2026-07-27, the cold-container race). The component's view state
+ passes through the host while the user — or the client's own initialisation — is mid-edit,
+ and a rule can transiently arrive with its window, statistic or value missing. `to_num(None)`
+ is 0 by the engines' shared contract, so resolution used to ANSWER that half-asked question
+ as ` 0`: the id landed in `measureSets`, the client read the rule as answered and
+ cleared its pending marker, and the grid stood behind a count for a question nobody asked.
+ Refusing instead leaves the id OUT of the payload, which the client renders as PENDING
+ ("Calculating…") — the honest state for a question still being typed. Exactly the class the
+ module docstring already names: an unresolvable condition never becomes an answer.
+
+ INCOMPLETE is distinct from MALFORMED, on purpose. An ABSENT window / stat / value is a
+ normal transient (the caller skips it silently — mid-edit is not a telemetry event); a
+ PRESENT-but-bogus one is a real defect and still RAISES downstream (`unresolvable window`,
+ `not a statistic`, `not admitted`). `value` presence is textual, not numeric: "0" is a
+ typed answer, while parseability stays `to_num`'s business so the two engines keep one
+ contract for garbage input.
+ """
+ if not isinstance(rule, dict) or not rule.get('op'):
+ return False
+ if rule.get('window') is None:
+ return False
+ rhs = rule.get('rhs')
+ if isinstance(rhs, dict) and rhs.get('kind') == 'measure':
+ return bool(rhs.get('colId')) and rhs.get('window') is not None
+ if isinstance(rhs, dict) and rhs.get('kind') == 'stat':
+ return bool(rhs.get('stat'))
+ v = rule.get('value')
+ return v is not None and str(v).strip() != ''
+
+
+def resolve_rule(rule, today, team_id=None, allowed_pids=None):
+ """One measure condition -> the SET OF CUSTOMER IDS satisfying it.
+
+ `rule` = {colId: , window: , op: , value: },
+ or — CG-9 — the same with `rhs: {kind:'measure', colId, window}` instead of a value, which
+ hands off to `resolve_pair`.
+
+ ⚠ Customers with NO rows in the window are absent from the GROUP BY, so a condition like
+ `revenue < 100` would miss them even though 0 < 100 is true. That is the single most
+ dangerous thing about this query shape: the missing rows are exactly the lapsed customers a
+ "who has gone quiet" filter is FOR. So the caller passes `allowed_pids` (the pool) and the
+ zero-group is reconstructed explicitly below rather than left to the SQL.
+ """
+ if not rule_complete(rule):
+ # An absent value would coerce to 0 and resolve as a DIFFERENT question under an
+ # authoritative-looking count — the same failure class as defaulting a missing window
+ # to all time, caught by the same principle: refuse, never guess.
+ raise _sem.ModelError(
+ 'incomplete measure condition — its window, statistic or value is not present; '
+ 'refusing to answer a question that has not been fully asked')
+ rhs = rule.get('rhs')
+ if isinstance(rhs, dict) and rhs.get('kind') == 'measure':
+ return resolve_pair(rule, today, team_id, allowed_pids)
+ if isinstance(rhs, dict) and rhs.get('kind') == 'stat':
+ return resolve_stat(rule, today, team_id, allowed_pids)
+ key = rule.get('colId')
+ topic_for(key) # raises for anything not admitted
+ op = rule.get('op')
+ if op not in OPS:
+ raise _sem.ModelError(f"{op!r} is not a numeric comparison ({sorted(OPS)})")
+
+ from harness import filter_sql as _fs
+ # ⚠ THE SCALE IS APPLIED HERE, TO THE TYPED VALUE, AND NOWHERE ELSE.
+ #
+ # Its position relative to `_zero_satisfies` turns out NOT to matter, and the negative
+ # control is what established that rather than reasoning: dividing by a POSITIVE constant
+ # cannot change how a number compares to zero, so the zero-group is identical either way.
+ # (An earlier version of this comment claimed the opposite. It was wrong.) What DOES matter
+ # is that a COMPUTED comparand never passes through here — see `_scaled`.
+ value = _scaled(key, _fs.to_num(rule.get('value')))
+
+ pool = _pool_of(allowed_pids)
+ if is_composite(key):
+ # A ratio has no HAVING to push the comparison into: compute the value per customer, then
+ # compare in Python — the same shape `resolve_pair` uses, and for the same reason.
+ con = _sem._store_con()
+ try:
+ totals = _totals(con, key, rule.get('window'), today, team_id)
+ finally:
+ con.close()
+ # No pool means we can only speak about customers a base has seen. WITH a pool, everyone
+ # else scores 0 through the ratio's guard — which is what makes the zero-group work for a
+ # ratio exactly as it does for a sum ("AOV <= 250" includes those who bought nothing).
+ universe = pool if pool is not None else set(totals)
+ return {pid for pid in universe if _CMP[op](totals.get(pid, 0.0), value)}
+
+ frm, id_col, agg, where_sql, params = _query_parts(
+ key, rule.get('window'), today, team_id)
+ sql = (f"SELECT {id_col} AS pid, {agg} AS v FROM {frm} WHERE {where_sql} "
+ f"GROUP BY {id_col} HAVING {agg} {OPS[op]} ?")
+
+ con = _sem._store_con()
+ try:
+ matched = {int(r[0]) for r in con.execute(sql, params + [value]).fetchall()
+ if r[0] is not None}
+ # The zero-group: every customer in scope with NO rows in the window aggregates to 0, and
+ # SQL cannot return a group that has no rows. Reconstruct it from the pool rather than
+ # pretending those customers do not exist.
+ if pool is not None:
+ present = {int(r[0]) for r in con.execute(
+ f"SELECT DISTINCT {id_col} FROM {frm} WHERE {where_sql}",
+ params).fetchall() if r[0] is not None}
+ absent = pool - present
+ if absent and _zero_satisfies(op, value):
+ matched |= absent
+ finally:
+ con.close()
+ if pool is not None:
+ matched &= pool
+ return matched
+
+
+def _totals(con, key, window, today, team_id):
+ """`{pid: value}` for one (measure, window), COMPOSITES included.
+
+ For a plain aggregate this is resolve_rule's query minus the HAVING. For a ratio or a derived
+ metric it is one query per BASE — each on that base's own topic — combined per customer by
+ `semantic._post_compute`, the same function `store_query` uses for the un-grouped number. So
+ AOV per customer is the app's AOV, computed once and defined once.
+
+ ⚠ The pid keys come from DIFFERENT dims for a cross-topic ratio (`l.order_partner_id` and
+ `o.partner_id`). The union is taken rather than the numerator's keys, so a customer either
+ side has seen gets a number; the ratio's own `den == 0 -> 0.0` guard covers the rest.
+ """
+ if is_composite(key):
+ bases, _ = _sem._expand_measures([key])
+ parts = {b: _totals(con, b, window, today, team_id) for b in bases}
+ pids = set()
+ for got in parts.values():
+ pids |= set(got)
+ return {pid: _sem._post_compute({b: parts[b].get(pid, 0.0) for b in bases}, key)
+ for pid in pids}
+ frm, id_col, agg, where_sql, params = _query_parts(key, window, today, team_id)
+ sql = (f"SELECT {id_col} AS pid, {agg} AS v FROM {frm} WHERE {where_sql} GROUP BY {id_col}")
+ # `float(r[1])`, not `float(r[1] or 0.0)`: `_query_parts` already wraps the aggregate in
+ # COALESCE(..., 0), so a NULL cannot arrive here — a second guard would be unreachable, and
+ # the negative control proved it (deleting it changed nothing). If one ever DID arrive, a
+ # TypeError is the right outcome: it would mean the SQL-level guard had been removed, which
+ # is the bug worth hearing about rather than papering over.
+ return {int(r[0]): float(r[1])
+ for r in con.execute(sql, params).fetchall() if r[0] is not None}
+
+
+def resolve_pair(rule, today, team_id=None, allowed_pids=None):
+ """CG-9 — `Where [Sales] [this year] [>] [Sales] [year to date, last year]`.
+
+ TWO QUERIES, compared in Python. The obvious alternative — one query with two conditional
+ aggregates and a HAVING comparing them — would have to reach inside `_sem._measure_sql` to
+ inject a per-side window into an expression that is already a `sum(CASE WHEN … )` for
+ filtered measures. Two queries keep ONE definition of each number (the metric's own
+ aggregate, unmodified), let the two sides sit on DIFFERENT TOPICS, and make the zero-group
+ fall out for free: absent from a side's result means 0 on that side.
+
+ ⚠ The zero-group is LOUDER here than it is for a one-sided rule. Every customer with no rows
+ in EITHER window compares 0 against 0, so `<=` and `>=` match all of them — correct, and it
+ will look wrong on a narrow window. That is why `eq`/`neq` are not offered at all
+ (PAIR_OPS): two float sums are never exactly equal except at zero, where they always are.
+ """
+ rhs = rule.get('rhs') or {}
+ lkey, rkey = rule.get('colId'), rhs.get('colId')
+ topic_for(lkey), topic_for(rkey) # raises for anything not admitted
+ op = rule.get('op')
+ if op not in PAIR_OPS:
+ raise _sem.ModelError(
+ f"{op!r} cannot compare two measures ({sorted(PAIR_OPS)}). Equality between two sums "
+ f"of floats matches nobody and inequality matches everybody; neither answers the "
+ f"question, and both look like they work.")
+ cmp = _CMP[op]
+
+ pool = _pool_of(allowed_pids)
+ con = _sem._store_con()
+ try:
+ left = _totals(con, lkey, rule.get('window'), today, team_id)
+ right = _totals(con, rkey, rhs.get('window'), today, team_id)
+ finally:
+ con.close()
+ # With no pool we can only speak about customers at least one side has seen — the zero-vs-
+ # zero group is unknowable without being told who exists. With a pool, it is every member.
+ universe = pool if pool is not None else (set(left) | set(right))
+ return {pid for pid in universe if cmp(left.get(pid, 0.0), right.get(pid, 0.0))}
+
+
+def _zero_satisfies(op, value):
+ """Does a customer with NO activity in the window (measure = 0) satisfy this condition?"""
+ return _CMP[op](0.0, value)
+
+
+def resolve_values(key, window, today, team_id=None, allowed_pids=None):
+ """`{pid: display value}` for one (measure, window) over the caller's pool — the COLUMN
+ version of `resolve_rule` (owner item 7, 2026-07-27: a formula-measure FIELD).
+
+ Same `_totals` the filter conditions and statistics use, so the column and the condition
+ cannot disagree. Three display decisions live here, not in the client:
+
+ * ZERO-FILLED over the pool. A customer with no rows in the window has a measure of 0 —
+ the zero-group convention everywhere else — and 0 is a real value the cell shows. Blank
+ is reserved for "could not compute" (the caller omits the column entirely on failure).
+ * `input_scale` applied OUTWARD. `margin_pct` is a fraction (0-1) internally; the user
+ types percentage points into the filter (input divides by 100), so the CELL shows points
+ too (value × 100) — one boundary, both directions, and `yoy_pct` beside it already reads
+ in points.
+ * Rounded like every other numeric column: whole numbers for money/counts (the pool's own
+ `_round` convention), one decimal for a percent.
+
+ Raises for anything not admitted / an unresolvable window — the caller degrades that column
+ to blank rather than to a number nobody computed.
+ """
+ topic_for(key) # raises for anything not admitted
+ # The window must RESOLVE before any query runs — same refusal as `_query_parts`, checked
+ # here too because a composite's `_totals` path resolves per base and would otherwise raise
+ # deeper with a less useful message.
+ if _win.resolve(window, today) is None:
+ raise _sem.ModelError(
+ f"unresolvable window {window!r} for the {key!r} column — refusing rather than "
+ f"defaulting to all time")
+ pool = _pool_of(allowed_pids)
+ con = _sem._store_con()
+ try:
+ totals = _totals(con, key, window, today, team_id)
+ finally:
+ con.close()
+ scale = ADMITTED.get(key, {}).get('input_scale') or 1.0
+ mtype = _sem._FORMAT_TYPE.get(_sem.metrics().get(key, {}).get('format'), 'currency')
+ nd = 1 if mtype == 'pct' else None # money/counts whole, percents one decimal
+ universe = pool if pool is not None else set(totals)
+ # round(x, None) returns an int — exactly the pool's `_round` convention for money/counts.
+ return {int(p): round(float(totals.get(p, 0.0)) * scale, nd) for p in universe}
+
+
+#: The series channel's calendar buckets. `date_trunc` names in DuckDB; 'week' truncates to
+#: Monday, matching the date-window vocabulary's week convention.
+SERIES_BUCKETS = frozenset({'week', 'month', 'quarter', 'year'})
+
+
+def resolve_series(key, bucket, date_from, date_to, today, team_id=None, allowed_pids=None):
+ """POOLED value of one measure per calendar bucket — the time-series channel (C-TS,
+ wave 2026-08-02). Returns `{'values': {bucket_start_iso: value}, 'agg': kind}`.
+
+ ONE grouped query per measure: the aggregate expression is `semantic._measure_sql`'s own
+ (no second definition of a number), evaluated over the CALLER'S POOL per `date_trunc`
+ bucket. That is the pooled aggregate — a non-additive measure (an average) is computed at
+ pool grain, never averaged over per-customer answers (the additivity law).
+
+ Composites (ratio/derived) are REFUSED: they have no single aggregate expression, and
+ combining their bases per bucket is a correctness project, not a default — the caller
+ degrades that field honestly rather than showing a number nobody computed.
+
+ Scale and rounding mirror `resolve_values` exactly, so a bucket cell and the grid's own
+ measure column can never disagree on units. Buckets with no rows are ABSENT from the
+ answer — zero-filling is the CALLER'S decision because it depends on the agg kind: an
+ empty month of a SUM is a real 0, an empty month of an AVERAGE is unanswerable.
+ """
+ if bucket not in SERIES_BUCKETS:
+ raise _sem.ModelError(
+ f"unknown series bucket {bucket!r} - offered: week, month, quarter, year")
+ topic_for(key) # raises for anything not admitted
+ if is_composite(key):
+ raise _sem.ModelError(
+ f"{key!r} is a ratio/derived measure - the series channel computes "
+ f"single-aggregate measures only")
+ window = {'kind': 'custom', 'from': str(date_from), 'to': str(date_to)}
+ frm, id_col, agg, where, params = _query_parts(key, window, today, team_id)
+ _, _, s = _entity_sql(_base_topic(key))
+ meta = _sem.metrics().get(key, {})
+ agg_kind = str(meta.get('agg') or 'sum')
+ pool = _pool_of(allowed_pids)
+ sql_params = list(params)
+ pool_sql = ''
+ if pool is not None:
+ if not pool:
+ return {'values': {}, 'agg': agg_kind}
+ marks = ','.join('?' for _ in pool)
+ pool_sql = f" AND {id_col} IN ({marks})"
+ sql_params.extend(int(p) for p in sorted(pool))
+ sql = (f"SELECT CAST(date_trunc('{bucket}', CAST({s['date_col']} AS TIMESTAMP)) AS DATE)"
+ f" AS b, {agg} AS v FROM {frm} WHERE {where}{pool_sql} GROUP BY b")
+ con = _sem._store_con()
+ try:
+ rows = con.execute(sql, sql_params).fetchall()
+ finally:
+ con.close()
+ scale = ADMITTED.get(key, {}).get('input_scale') or 1.0
+ mtype = _sem._FORMAT_TYPE.get(meta.get('format'), 'currency')
+ nd = 1 if mtype == 'pct' else None
+ values = {str(b)[:10]: round(float(v) * scale, nd) for b, v in rows if b is not None}
+ return {'values': values, 'agg': agg_kind}
+
+
+def resolve_series_slid(key, window_spec, buckets, today, team_id=None, allowed_pids=None):
+ """AS-OF series (C-TSWIN, wave 14 — [[loopable-wave14-split]] R1): the measure's OWN
+ window re-resolved per bucket with `today := min(bucket end, real today)` — so `ytd`
+ becomes cumulative from Jan 1, `last_90_days` becomes trailing-90, `all_time` cumulative
+ ever. Returns `{'values': {bucket_start_iso: value}, 'agg': kind}`.
+
+ `buckets` is `[(start_iso, end_iso), …]`. One aggregate query per bucket rather than one
+ grouped query — deliberately: every part (scope, aggregate expression, BU wall, scale,
+ rounding) is `_query_parts`' own, so **bucket N is exactly what the grid's measure column
+ would show if the tenant's today were bucket N's end** — the two surfaces cannot disagree
+ by construction, which is the property the pooled/date_trunc shape could not give a
+ sliding window.
+
+ Absence semantics (the caller's fill law, same as `resolve_series`): a bucket whose
+ window holds NO ROWS is ABSENT from the answer (`COALESCE` would have manufactured a 0
+ for an empty AVERAGE, so the query carries a COUNT(*) to tell the two apart); a bucket
+ whose START is after `today` is absent too — an unstarted period's YTD is not 0, it is
+ unanswered. `custom` (fixed-range) windows cannot slide and are REFUSED — the caller
+ drops them as `window_fixed` before ever calling here.
+ """
+ topic_for(key) # raises for anything not admitted
+ if is_composite(key):
+ raise _sem.ModelError(
+ f"{key!r} is a ratio/derived measure - the series channel computes "
+ f"single-aggregate measures only")
+ spec = _win.normalize(window_spec)
+ if spec is None or spec.get('kind') == 'custom':
+ raise _sem.ModelError(
+ f"{key!r}: a fixed-range window cannot slide across buckets (window_fixed)")
+ meta = _sem.metrics().get(key, {})
+ agg_kind = str(meta.get('agg') or 'sum')
+ pool = _pool_of(allowed_pids)
+ if pool is not None and not pool:
+ return {'values': {}, 'agg': agg_kind}
+ scale = ADMITTED.get(key, {}).get('input_scale') or 1.0
+ mtype = _sem._FORMAT_TYPE.get(meta.get('format'), 'currency')
+ nd = 1 if mtype == 'pct' else None
+ today_s = str(today)[:10]
+ values = {}
+ con = _sem._store_con()
+ try:
+ for start, end in buckets:
+ start_s, end_s = str(start)[:10], str(end)[:10]
+ if start_s > today_s:
+ continue # unstarted period -> unanswered, never 0
+ eff = min(end_s, today_s)
+ frm, id_col, agg, where, params = _query_parts(key, spec, eff, team_id)
+ sql_params = list(params)
+ pool_sql = ''
+ if pool is not None:
+ marks = ','.join('?' for _ in pool)
+ pool_sql = f" AND {id_col} IN ({marks})"
+ sql_params.extend(int(p) for p in sorted(pool))
+ sql = f"SELECT {agg} AS v, COUNT(*) AS n FROM {frm} WHERE {where}{pool_sql}"
+ v, nrows = con.execute(sql, sql_params).fetchone()
+ if not nrows:
+ continue # empty window -> the caller's per-agg fill law
+ values[start_s] = round(float(v) * scale, nd)
+ finally:
+ con.close()
+ return {'values': values, 'agg': agg_kind}
+
+
+def resolve_tree(rules, today, team_id=None, allowed_pids=None):
+ """{rule_id: sorted pids} for every measure condition in a tree.
+
+ Keyed by the rule's client-generated `id` so the browser can map an answer back to the
+ condition that asked it — positional matching would silently re-associate every answer the
+ moment a user deleted a condition.
+ """
+ out = {}
+ for r in rules or []:
+ rid = str(r.get('id') or '')
+ if not rid:
+ raise _sem.ModelError('a measure condition needs a stable id to carry its answer back')
+ out[rid] = sorted(resolve_rule(r, today, team_id, allowed_pids))
+ return out
+
+
+def signature(rule):
+ """The identity of the QUESTION a rule asks, ignoring which condition row asked it.
+
+ Two conditions with the same measure, window, operator and value have the same answer, so
+ they cost one query between them — and a saved view re-rendered unchanged costs none, since
+ the caller can memoise on this. `id` is deliberately absent: it names the asker, not the
+ question.
+
+ ⚠ The RHS is part of the question. Without it, `Sales[ytd] > Sales[last year]` and
+ `Sales[ytd] > Sales[ytd_last_year]` would share one memo entry — same measure, same op, same
+ (empty) value — and the second would be served the first one's answer. Silent, and wrong in
+ exactly the comparison this was built for.
+ """
+ w = _win.normalize(rule.get('window'))
+ rhs = rule.get('rhs')
+ rsig = None
+ if isinstance(rhs, dict):
+ rw = _win.normalize(rhs.get('window'))
+ # `stat` rides the same tuple: `> the median` and `> the 75th percentile` are different
+ # questions with the same measure, window, op and (empty) value.
+ rsig = (rhs.get('kind'), rhs.get('colId'), rhs.get('stat'),
+ None if rw is None else tuple(sorted(rw.items())))
+ return (rule.get('colId'), rule.get('op'), str(rule.get('value') or ''),
+ None if w is None else tuple(sorted(w.items())), rsig)
+
+
+def collect(nodes):
+ """Every MEASURE leaf in a filter tree, flattened (groups contribute their children)."""
+ found = []
+ for n in nodes or []:
+ if not isinstance(n, dict):
+ continue
+ if isinstance(n.get('children'), list):
+ found.extend(collect(n['children']))
+ elif n.get('colId') in ADMITTED:
+ found.append(n)
+ return found
diff --git a/platform/harness/pg/schema.sql b/platform/harness/pg/schema.sql
new file mode 100644
index 0000000000000000000000000000000000000000..0c00f0015360db25cdbc55ce4ef91b3fd3181eda
--- /dev/null
+++ b/platform/harness/pg/schema.sql
@@ -0,0 +1,180 @@
+-- harness/pg/schema.sql — the control DB + per-tenant schema (X4 / EXIT-2b, 2026-07-30).
+--
+-- WHY POSTGRES AT ALL (C1c, and it is not a preference). The HF Dataset store is a FILE HOST:
+-- no transactions, no PITR, no row-level anything, and `store.get()` is cache-first — so a write
+-- from another process is invisible to a running app until restart. That was observed LIVE in
+-- wave 11, and it is the whole reason the store leaves the product. Application/control data
+-- (users, sessions, tenants, audit, saved views, overlay fields, cohorts, folders, prefs,
+-- billing mirror) is transactional and needs joins; the ANALYTICAL mirror stays in DuckDB,
+-- one file per tenant, because file-per-tenant IS the isolation model there.
+--
+-- ✅ RUN AGAINST A REAL SERVER 2026-08-04 (W19): applied end-to-end by verify_store_pg's
+-- integration half against the owner's Neon (psycopg executes everything ABOVE the
+-- "-- Optional:" marker; the tail below it is psql-variable syntax). Tenant provisioning,
+-- jsonb/bytea round-trips and 80 concurrent FOR-UPDATE writes all proven. The CUTOVER remains
+-- parked behind C1e's triggers; `STORE_BACKEND` still defaults to hf.
+--
+-- ⚠ CO-LOCATE (C1b). An Ashburn app with a European database adds ~90ms to every query and undoes
+-- the reason the market pivot happened.
+--
+-- psql "$DATABASE_URL" -v ON_ERROR_STOP=1 -f harness/pg/schema.sql
+-- psql "$DATABASE_URL" -v ON_ERROR_STOP=1 -v slug=royal_imports -f harness/pg/schema.sql
+-- (the second form additionally provisions one tenant schema — see the bottom block)
+
+BEGIN;
+
+-- ─────────────────────────────────────────────────────────────────────────────────────────────
+-- CONTROL: what the platform knows about itself. One row per tenant, one per account.
+-- ─────────────────────────────────────────────────────────────────────────────────────────────
+CREATE SCHEMA IF NOT EXISTS control;
+
+CREATE TABLE IF NOT EXISTS control.tenants (
+ -- The SLUG is the identity everywhere: the session cookie's `t` claim, the store namespace,
+ -- the DuckDB filename and the schema name are all derived from it. Constrained to what is
+ -- safe in all four positions, which is stricter than Postgres alone would require.
+ slug text PRIMARY KEY CHECK (slug ~ '^[a-z0-9][a-z0-9-]{0,58}[a-z0-9]$'),
+ name text NOT NULL,
+ -- `harness/tenants.py`'s literal, as data. Its own docstring says this becomes "a tenants
+ -- store (DB / HF dataset)"; this is that store. jsonb rather than columns because the shape
+ -- is per-connector and adding a source must not be a migration.
+ config jsonb NOT NULL DEFAULT '{}'::jsonb,
+ -- Connector CREDENTIALS never live here in plaintext. The Odoo key is the customer's,
+ -- stored encrypted at rest by the secrets layer (C2: SOPS+age per tenant) and shown once.
+ -- This column holds only a REFERENCE to where the secret lives.
+ secret_ref text,
+ active boolean NOT NULL DEFAULT true,
+ created_at timestamptz NOT NULL DEFAULT now(),
+ updated_at timestamptz NOT NULL DEFAULT now()
+);
+
+CREATE TABLE IF NOT EXISTS control.users (
+ -- Mirrors `core/users.py`'s record exactly, so the HF→PG cutover (C-4) is a copy, not a
+ -- redesign: salt + PBKDF2-HMAC-SHA256 hash (200k), never a plaintext password.
+ tenant_slug text NOT NULL REFERENCES control.tenants(slug) ON DELETE CASCADE,
+ username text NOT NULL CHECK (username = lower(username)),
+ salt text NOT NULL,
+ hash text NOT NULL,
+ name text NOT NULL DEFAULT '',
+ role text NOT NULL DEFAULT 'user',
+ -- 'all' or a JSON array of Odoo team ids ([5]=Fisch, [6]=Royal) — the BU isolation input.
+ bus jsonb NOT NULL DEFAULT '"all"'::jsonb,
+ -- 'all' or a JSON array of registry keys — the module grant `may_open` reads.
+ modules jsonb NOT NULL DEFAULT '"all"'::jsonb,
+ agent text, -- own-book scope (res.partner.agent_ids name)
+ email text,
+ active boolean NOT NULL DEFAULT true,
+ -- X3's stateless-session revocation handle. A signed cookie cannot be deleted server-side,
+ -- so it carries the epoch it was minted under and every verification re-reads THIS number;
+ -- a password change or a deactivation bumps it and every outstanding cookie dies at once.
+ epoch integer NOT NULL DEFAULT 0,
+ created_at timestamptz NOT NULL DEFAULT now(),
+ updated_at timestamptz NOT NULL DEFAULT now(),
+ PRIMARY KEY (tenant_slug, username)
+);
+
+-- D2's SESSIONS MIRROR — an AUDIT view, deliberately NOT the source of truth (X3 keeps sessions
+-- stateless so the API process holds no per-tenant state). It answers "who is signed in, from
+-- where, since when", and it is what makes per-DEVICE revocation possible later. Arrives with
+-- C-2; the table is defined now so the cutover does not need a second migration.
+CREATE TABLE IF NOT EXISTS control.sessions (
+ id bigserial PRIMARY KEY,
+ tenant_slug text NOT NULL,
+ username text NOT NULL,
+ epoch integer NOT NULL,
+ issued_at timestamptz NOT NULL DEFAULT now(),
+ last_seen_at timestamptz NOT NULL DEFAULT now(),
+ absolute_expiry timestamptz NOT NULL,
+ -- Truncated/derived client facts only. A full UA string plus an exact IP is more personal
+ -- data than an audit trail needs, and the DPA is easier to keep when the row is smaller.
+ ip_prefix text,
+ user_agent text,
+ revoked_at timestamptz,
+ FOREIGN KEY (tenant_slug, username)
+ REFERENCES control.users(tenant_slug, username) ON DELETE CASCADE
+);
+CREATE INDEX IF NOT EXISTS sessions_live_idx
+ ON control.sessions (tenant_slug, username) WHERE revoked_at IS NULL;
+
+CREATE TABLE IF NOT EXISTS control.audit (
+ id bigserial PRIMARY KEY,
+ at timestamptz NOT NULL DEFAULT now(),
+ tenant_slug text,
+ username text,
+ action text NOT NULL, -- 'login' | 'store.put' | 'user.deactivate' | …
+ target text,
+ detail jsonb NOT NULL DEFAULT '{}'::jsonb
+);
+CREATE INDEX IF NOT EXISTS audit_at_idx ON control.audit (at DESC);
+CREATE INDEX IF NOT EXISTS audit_tenant_idx ON control.audit (tenant_slug, at DESC);
+
+-- ─────────────────────────────────────────────────────────────────────────────────────────────
+-- PER-TENANT: one schema `t_` per tenant, holding what the HF store holds today.
+--
+-- A SCHEMA PER TENANT, not a tenant_id column with RLS. Both are defensible; this one is chosen
+-- because the isolation is then structural — a query that forgets its tenant predicate cannot
+-- silently return another tenant's rows, it names a table that is not in the search_path. RLS
+-- makes the same guarantee only while every policy is correct on every table, forever, and
+-- [[aios-permissioning]] already records that a forgotten predicate is the failure mode we keep
+-- writing gates against. The cost is DDL per tenant, which is one function call below.
+-- ─────────────────────────────────────────────────────────────────────────────────────────────
+CREATE OR REPLACE FUNCTION control.provision_tenant_schema(p_slug text)
+RETURNS text
+LANGUAGE plpgsql
+AS $$
+DECLARE
+ -- ⚠ `-` IS NOT LEGAL UNQUOTED, and the slug carries them (`royal-imports`). Normalising to
+ -- `_` here rather than quoting everywhere keeps every generated identifier plain, and
+ -- `format('%I')` is what makes the interpolation injection-safe regardless.
+ v_schema text := 't_' || replace(lower(p_slug), '-', '_');
+BEGIN
+ IF p_slug IS NULL OR p_slug !~ '^[a-z0-9][a-z0-9-]{0,58}[a-z0-9]$' THEN
+ RAISE EXCEPTION 'refusing to provision an unsafe tenant slug: %', p_slug;
+ END IF;
+
+ EXECUTE format('CREATE SCHEMA IF NOT EXISTS %I', v_schema);
+
+ -- store_kv — the JSON-per-key store `core/store.py` exposes, one row per key. `rev` is what
+ -- the file host never had: an optimistic-concurrency counter, so a read-modify-write can
+ -- detect that somebody else wrote between its read and its write instead of overwriting
+ -- them. That is the concrete thing "no transactions" cost us.
+ EXECUTE format($f$
+ CREATE TABLE IF NOT EXISTS %I.store_kv (
+ key text PRIMARY KEY,
+ value jsonb NOT NULL,
+ updated_at timestamptz NOT NULL DEFAULT now(),
+ rev bigint NOT NULL DEFAULT 1
+ )$f$, v_schema);
+
+ -- store_blobs — `upload_bytes`/`download_bytes`/`delete_path`. Customer documents live here
+ -- rather than base64'd into a JSON value, for the reason `core.store.upload_bytes` gives:
+ -- the workspace blob is READ ON EVERY RENDER, so a few MB of base64 inside it would be paid
+ -- on every keystroke by every user of that table.
+ EXECUTE format($f$
+ CREATE TABLE IF NOT EXISTS %I.store_blobs (
+ path text PRIMARY KEY,
+ bytes bytea NOT NULL,
+ message text,
+ updated_at timestamptz NOT NULL DEFAULT now()
+ )$f$, v_schema);
+
+ EXECUTE format('CREATE INDEX IF NOT EXISTS %I ON %I.store_kv (updated_at DESC)',
+ v_schema || '_kv_updated_idx', v_schema);
+ RETURN v_schema;
+END;
+$$;
+
+-- Tenant #0, always. Its slug is the one the session cookie already carries.
+INSERT INTO control.tenants (slug, name)
+VALUES ('royal-imports', 'Royal Imports')
+ON CONFLICT (slug) DO NOTHING;
+SELECT control.provision_tenant_schema('royal-imports');
+
+-- Optional: `psql -v slug=` provisions one more tenant schema in the same transaction.
+-- `:'slug'` is unset in the plain invocation, so this block is skipped there.
+\if :{?slug}
+INSERT INTO control.tenants (slug, name) VALUES (:'slug', :'slug')
+ON CONFLICT (slug) DO NOTHING;
+SELECT control.provision_tenant_schema(:'slug');
+\endif
+
+COMMIT;
diff --git a/platform/harness/routines.py b/platform/harness/routines.py
new file mode 100644
index 0000000000000000000000000000000000000000..f7b0ac1b635dd2036e91077d02ea53059e9c19ce
--- /dev/null
+++ b/platform/harness/routines.py
@@ -0,0 +1,259 @@
+"""harness/routines.py — OM-5 v0: scheduled reports + KPI alerts over the semantic layer.
+
+Two of the four productization user jobs (Scheduled Reporting, KPI monitoring). Definitions live
+in data/store/routines.json (tenant data, git-ignored); evaluation happens ON READ against the
+tenant store through the same governed queries as everything else — an alert is a metric key +
+a mode, never a hand-rolled query.
+
+v0 boundaries (deliberate):
+- Channel is 'in-app' only. Email/Slack delivery is OUTBOUND and ships only with owner approval
+ (the Odoo mail client is whitelisted for Collections statements ONLY — nothing else sends).
+- No background scheduler: reports record cadence + show due-state in-app; alerts evaluate live
+ whenever the Routines page (or a tool) asks. The enterprise scheduler lands with OM-5 delivery.
+
+Alert modes:
+- 'xmr' Wheeler individuals chart on complete monthly values (promoted from
+ modules/warehouse._xmr, generalized: no 0/100 clamps — metrics aren't percentages).
+ Three detection rules only (more = alarm fatigue, per the warehouse brief).
+- 'threshold' last complete month above/below a fixed value.
+"""
+import json
+import time
+from datetime import date, timedelta
+
+import harness.semantic as SEM
+from harness.tools import VIEWS_PATH
+
+ROUTINES_PATH = VIEWS_PATH.parent / "routines.json"
+
+CADENCES = ("daily", "weekly", "monthly")
+CHANNELS = ("in-app",) # email/slack gate on owner approval (outbound send)
+ALERT_MODES = ("xmr", "threshold")
+XMR_MONTHS = 18 # complete months fed to the individuals chart
+
+
+def load():
+ if ROUTINES_PATH.exists():
+ return json.loads(ROUTINES_PATH.read_text(encoding="utf-8"))
+ return {"reports": {}, "alerts": {}}
+
+
+def _save(d):
+ ROUTINES_PATH.parent.mkdir(parents=True, exist_ok=True)
+ ROUTINES_PATH.write_text(json.dumps(d, indent=1), encoding="utf-8")
+
+
+# ------------------------------------------------------------------ scheduled reports
+
+def schedule_report(view, cadence, channel="in-app"):
+ import harness.views as V
+ if view not in V.views() and view not in V.dashboards():
+ raise SEM.ModelError(f"unknown view/dashboard {view!r} — save_view/compose_dashboard first")
+ if cadence not in CADENCES:
+ raise SEM.ModelError(f"cadence must be one of {CADENCES}")
+ if channel not in CHANNELS:
+ raise SEM.ModelError(f"channel {channel!r} not available yet — v0 delivers in-app "
+ "(email/Slack ship with the delivery gate); use channel='in-app'")
+ d = load()
+ d["reports"][view] = {"cadence": cadence, "channel": channel,
+ "created_at": time.strftime("%Y-%m-%d %H:%M")}
+ _save(d)
+ return {"scheduled": view, "cadence": cadence, "channel": channel,
+ "note": "runs in-app (Workflows > Routines); external delivery ships with OM-5 email approval"}
+
+
+def delete_report(view):
+ d = load()
+ d["reports"].pop(view, None)
+ _save(d)
+
+
+_CADENCE_DAYS = {"daily": 1, "weekly": 7, "monthly": 30}
+
+
+def mark_viewed(view):
+ """Called when the scheduled view/dashboard is actually opened — resets its due-ness."""
+ d = load()
+ r = d.get("reports", {}).get(view)
+ if r is not None:
+ r["last_viewed"] = time.strftime("%Y-%m-%d %H:%M")
+ _save(d)
+
+
+def due_reports():
+ """Scheduled reports whose cadence has elapsed since last viewed (v0 in-app delivery via
+ the Routines page). Never-viewed ages from created_at."""
+ from datetime import datetime
+ out = []
+ for name, r in load().get("reports", {}).items():
+ days = _CADENCE_DAYS.get(r.get("cadence"), 7)
+ anchor = r.get("last_viewed") or r.get("created_at") or ""
+ try:
+ age = (datetime.now() - datetime.strptime(anchor, "%Y-%m-%d %H:%M")).days
+ except Exception:
+ age = days
+ if age >= days:
+ out.append({"name": name, "cadence": r.get("cadence"),
+ "last_viewed": r.get("last_viewed"), "age_days": age})
+ return out
+
+
+# ------------------------------------------------------------------ insight routines (OM-5)
+# A saved PROMPT on a cadence: the Analyst runs it in the background and the narrative (plus its
+# governed artifacts) lands in-app on the Routines page. The narrative is a deliberate
+# point-in-time SNAPSHOT (it narrates a moment); its charts still carry re-runnable queries.
+
+def schedule_insight(name, prompt, cadence):
+ if cadence not in CADENCES:
+ raise SEM.ModelError(f"cadence must be one of {CADENCES}")
+ if not (prompt or "").strip():
+ raise SEM.ModelError("an insight needs a prompt — what should the Analyst look at?")
+ d = load()
+ d.setdefault("insights", {})[name] = {"prompt": prompt.strip(), "cadence": cadence,
+ "created_at": time.strftime("%Y-%m-%d %H:%M")}
+ _save(d)
+ return {"insight": name, "cadence": cadence,
+ "note": "runs in the background when due; the narrative lands on "
+ "Workflows > Routines"}
+
+
+def delete_insight(name):
+ d = load()
+ (d.get("insights") or {}).pop(name, None)
+ _save(d)
+
+
+def due_insights():
+ from datetime import datetime
+ out = []
+ for name, i in (load().get("insights") or {}).items():
+ days = _CADENCE_DAYS.get(i.get("cadence"), 7)
+ anchor = i.get("last_run_at") or ""
+ try:
+ age = (datetime.now() - datetime.strptime(anchor, "%Y-%m-%d %H:%M")).days
+ except Exception:
+ age = days # never run -> due now
+ if age >= days:
+ out.append(name)
+ return out
+
+
+def run_insight(name):
+ """Execute one insight through the Analyst and persist the narrative + artifacts."""
+ d = load()
+ ins = (d.get("insights") or {}).get(name)
+ if not ins:
+ raise SEM.ModelError(f"unknown insight {name!r}")
+ import harness.analyst as A
+ r = A.ask(ins["prompt"])
+ now = time.strftime("%Y-%m-%d %H:%M")
+ ins["last_run_at"] = now
+ ins["last"] = {"at": now, "answer": r["answer"], "artifacts": r.get("artifacts") or [],
+ "tokens": (r.get("usage") or {}).get("prompt_tokens", 0)
+ + (r.get("usage") or {}).get("completion_tokens", 0)}
+ _save(d)
+ return ins["last"]
+
+
+# ------------------------------------------------------------------ KPI alerts
+
+def create_alert(metric, mode="xmr", team_id=None, threshold=None, direction=None):
+ m = SEM.metrics().get(metric)
+ if not m:
+ raise SEM.ModelError(f"unknown metric {metric!r} (use list_topics)")
+ if mode not in ALERT_MODES:
+ raise SEM.ModelError(f"mode must be one of {ALERT_MODES}")
+ if mode == "threshold":
+ if threshold is None or direction not in ("above", "below"):
+ raise SEM.ModelError("threshold mode needs threshold= and "
+ "direction='above'|'below'")
+ d = load()
+ key = metric + (f"_team{team_id}" if team_id else "")
+ d["alerts"][key] = {"metric": metric, "mode": mode, "team_id": team_id,
+ "threshold": threshold, "direction": direction,
+ "created_at": time.strftime("%Y-%m-%d %H:%M")}
+ _save(d)
+ return {"alert": key, **evaluate_alert(d["alerts"][key])}
+
+
+def delete_alert(key):
+ d = load()
+ d["alerts"].pop(key, None)
+ _save(d)
+
+
+def xmr(series):
+ """Wheeler XmR individuals limits + the three detection rules — the model-level primitive
+ (generalized from modules/warehouse._xmr; no percentage clamps). series=[(label, value)]."""
+ vals = [v for _, v in series]
+ if len(vals) < 8:
+ return {"center": None, "unpl": None, "lnpl": None,
+ "points": [{"label": l, "value": v, "signal": ""} for l, v in series]}
+ center = sum(vals) / len(vals)
+ mrs = [abs(vals[i] - vals[i - 1]) for i in range(1, len(vals))]
+ mr_bar = sum(mrs) / len(mrs) if mrs else 0.0
+ unpl = center + 2.66 * mr_bar
+ lnpl = center - 2.66 * mr_bar
+ pts = []
+ for i, (l, v) in enumerate(series):
+ sig = ""
+ if v > unpl or v < lnpl:
+ sig = "outside limits"
+ if not sig and i >= 7 and all((x - center) > 0 for _, x in series[i - 7:i + 1]):
+ sig = "sustained shift (8 above center)"
+ if not sig and i >= 7 and all((x - center) < 0 for _, x in series[i - 7:i + 1]):
+ sig = "sustained shift (8 below center)"
+ if not sig and i >= 3:
+ last4 = [x for _, x in series[i - 3:i + 1]]
+ near = sum(1 for x in last4
+ if abs(x - center) > 0.5 * ((unpl - center) if x >= center
+ else (center - lnpl)))
+ if near >= 3:
+ sig = "moderate shift emerging"
+ pts.append({"label": l, "value": v, "signal": sig})
+ return {"center": center, "unpl": unpl, "lnpl": lnpl, "points": pts}
+
+
+def _month_window(n=XMR_MONTHS):
+ """Last n COMPLETE months (the in-progress month would false-signal every alert)."""
+ first_cur = date.today().replace(day=1)
+ y, mo = first_cur.year, first_cur.month
+ for _ in range(n):
+ mo -= 1
+ if mo == 0:
+ y, mo = y - 1, 12
+ start = date(y, mo, 1)
+ return start.isoformat(), (first_cur - timedelta(days=1)).isoformat()
+
+
+def evaluate_alert(a):
+ """Live evaluation: monthly series of the metric (complete months only) -> mode verdict."""
+ metric = a["metric"]
+ topic = SEM.metrics()[metric]["topic"]
+ date_from, date_to = _month_window()
+ res = SEM.store_query(topic, [metric], grain="month", date_from=date_from, date_to=date_to,
+ team_id=a.get("team_id"))
+ series = [(r["period"][:7], r.get(metric) or 0) for r in res["rows"]]
+ out = {"metric": metric, "mode": a["mode"], "team_id": a.get("team_id"),
+ "window": f"{date_from}..{date_to}", "series": series}
+ if not series:
+ return {**out, "status": "no data", "fired": False}
+ last_label, last_val = series[-1]
+ if a["mode"] == "threshold":
+ thr, direc = a.get("threshold"), a.get("direction")
+ fired = (last_val > thr) if direc == "above" else (last_val < thr)
+ return {**out, "last": {"label": last_label, "value": last_val},
+ "threshold": thr, "direction": direc,
+ "status": (f"FIRED — {last_label} is {direc} {thr:,.0f}" if fired else "OK"),
+ "fired": bool(fired)}
+ lim = xmr(series)
+ sig = lim["points"][-1]["signal"] if lim["points"] else ""
+ return {**out, "last": {"label": last_label, "value": last_val},
+ "center": lim["center"], "unpl": lim["unpl"], "lnpl": lim["lnpl"],
+ "points": lim["points"],
+ "status": (f"SIGNAL — {sig} ({last_label})" if sig else "OK"),
+ "fired": bool(sig)}
+
+
+def evaluate_all():
+ return {k: evaluate_alert(a) for k, a in load().get("alerts", {}).items()}
diff --git a/platform/harness/runtime.py b/platform/harness/runtime.py
new file mode 100644
index 0000000000000000000000000000000000000000..7bd866bd7e1ffa902aec873286f32e1c074f06ef
--- /dev/null
+++ b/platform/harness/runtime.py
@@ -0,0 +1,278 @@
+"""harness/runtime.py — X7: per-REQUEST tenant resolution for the shared stateless API (EXIT-4a).
+
+THE COST ARGUMENT, in one rule: *no per-tenant state may be resident in the app process.* Today
+each tenant carries its own interpreter, its own never-evicted pool, its own 9 prewarmed bundles
+and its own DuckDB — EXIT-0 measured a **~0.6 GB commit floor per tenant**, duplicated exactly
+(tenant B came within 2% of tenant A; nothing is shared). The target is ~30–80 MB. That is only
+reachable if the API resolves the tenant from the REQUEST and holds nothing tenant-shaped between
+requests except a bounded cache it is willing to throw away.
+
+WHAT THIS REPLACES. `ui/cache.py`'s `st.cache_resource` singleton — one process, one tenant,
+caches that are never evicted by design. That is correct for Streamlit and fatal for a shared
+process. The Streamlit side keeps its singleton untouched this wave (two processes, two caches,
+accepted for the strangler period; `ui/cache.py` dies with app.py at EXIT-6).
+
+THREE RULES THIS FILE OBEYS, each of which is a way the old shape leaked:
+ 1. **No module-level per-tenant globals.** Every tenant-shaped value hangs off a TenantRuntime
+ reached through `get_runtime(slug)`; nothing is stashed at import time. A module global is
+ exactly what makes "which tenant is this process serving?" unanswerable.
+ 2. **LRU-BOUNDED.** `_MAX_RUNTIMES` runtimes live at once; the least recently used is evicted.
+ An unbounded registry cache is a memory leak with a tenant-count-shaped growth curve — the
+ thing this whole program exists to remove.
+ 3. **The store handle is tenant-bound**, so a write cannot land in another tenant's namespace
+ even if a caller passes the wrong key downstream (EXIT-4b proof #3).
+
+⚠ THE DUCKDB CAVEAT, STATED NOT HIDDEN. `harness.datastore` holds ONE process-wide connection
+(the fix for the 2026-07-16 "connection error unless I refresh" bug), so one PROCESS can serve
+one analytical store at a time. This module therefore hands out `datastore_path` — the file a
+tenant's analytical reads belong to — and does NOT switch the global underneath a live request.
+Until the singleton is per-tenant (EXIT-5), an API process answering measure/Analyst queries must
+be pinned to one tenant's file, and `assert_datastore_matches()` below is what turns a
+mis-pinned deployment into a loud failure instead of a silent cross-tenant read.
+"""
+from __future__ import annotations
+
+import os
+import threading
+from collections import OrderedDict
+from dataclasses import dataclass, field
+
+import core.store as store
+from harness import datastore as _ds
+from harness import tenants as _tenants
+
+#: How many tenant runtimes stay resident. Small on purpose: a runtime is cheap to rebuild (a
+#: Tenant literal + a couple of handles) and expensive to leak. Raise only with a measurement.
+_MAX_RUNTIMES = int(os.environ.get("AIOS_MAX_RUNTIMES") or 32)
+
+#: slug -> builder. The literal registry `harness/tenants.py` describes; per its own docstring
+#: this becomes "a tenants store (DB / HF dataset)" — X4's control DB is where it goes, and
+#: `register()` below is the seam that makes the swap a one-liner rather than a refactor.
+_BUILDERS = {"royal-imports": _tenants.royal_imports}
+
+# X8's isolation fixture, admitted ONLY on request. A stub tenant that is always present is a
+# slug an attacker can mint a session against in production; gated, it exists exactly where it is
+# needed (the TestClient isolation proofs) and nowhere else. Read at import so the flag cannot be
+# flipped by a request.
+if os.environ.get("AIOS_ENABLE_QA_TENANT") == "1":
+ _BUILDERS["qa-b"] = _tenants.qa_tenant_b
+
+_CACHE: "OrderedDict[str, TenantRuntime]" = OrderedDict()
+_LOCK = threading.RLock()
+
+
+@dataclass
+class TenantRuntime:
+ """Everything a request needs to serve ONE tenant, and nothing about any other.
+
+ `store_namespace` is the prefix every product-data key is written under. Tenant #0 keeps the
+ EMPTY prefix so its existing keys (`users`, `customer_lists`, `customer_docs`, …) are found
+ exactly where they already live — a namespacing change that renamed tenant #0's keys would be
+ a silent data loss dressed as a refactor. Every OTHER tenant is prefixed, which is what makes
+ proof #3 hold.
+ """
+ key: str
+ tenant: object # harness.base.Tenant
+ store_namespace: str = ""
+ pool_cache: dict = field(default_factory=dict)
+ #: EXIT-5 — the API adapter's memos for `core.measure_resolve` (the Streamlit adapter keeps
+ #: its own in st.session_state). Bounded by the module's own clear-past-cap rule; keyed on
+ #: (stamp, scope, pool identity, question) so nothing user-shaped lives in them.
+ measure_memo: dict = field(default_factory=dict)
+ mset_memo: dict = field(default_factory=dict)
+ #: Wave 2026-08-02 (C-TS): the time-series channel's own memo — separate from
+ #: measure_memo so column churn and series churn cannot evict each other's answers.
+ series_memo: dict = field(default_factory=dict)
+ _lock: threading.RLock = field(default_factory=threading.RLock, repr=False)
+
+ @property
+ def name(self):
+ return getattr(self.tenant, "name", self.key)
+
+ @property
+ def datastore_path(self):
+ """The DuckDB file this tenant's analytical reads belong to (file-per-tenant IS the
+ isolation model — DuckDB has no RLS, so the OS boundary is the only one that holds)."""
+ return _ds.path_for(self.key)
+
+ # ---------------------------------------------------------------- the store handle
+ #: Wave 18 (C1-TENANT, R2): a tenant that OWNS its dataset repo carries its bound Store
+ #: instance here (namespace stays EMPTY — a whole repo needs no prefix). None = the shared
+ #: default repo through the MODULE functions, which is what keeps the gates' fake-store
+ #: installation effective (the fake patches module attributes, and royal-imports + the
+ #: prefix tenants resolve through exactly those).
+ store_handle: object = None
+
+ def _store(self):
+ return self.store_handle if self.store_handle is not None else store
+
+ def store_key(self, name):
+ """Namespace a product-data key for this tenant. The ONE place the prefix is applied."""
+ return f"{self.store_namespace}{name}" if self.store_namespace else str(name)
+
+ def get(self, name, fresh=False):
+ return self._store().get(self.store_key(name), fresh=fresh)
+
+ def put(self, name, data):
+ return self._store().put(self.store_key(name), data)
+
+ def update(self, name, fn, flush="sync"):
+ return self._store().update(self.store_key(name), fn, flush=flush)
+
+ def exists(self, name):
+ return self._store().exists(self.store_key(name))
+
+ def available(self):
+ return self._store().available()
+
+ # ---------------------------------------------------------------- the Odoo source (R3)
+ def odoo_source(self):
+ """THIS tenant's Odoo connector, or None — the keychain CUTOVER's resolution seam
+ (2026-08-04; `keychain.odoo_creds` was previously called by nothing but its test).
+
+ Resolution, fail-closed:
+ 1. a keychain `odoo` entry (any tenant) → a connector bound to THOSE creds;
+ 2. tenant #0 with an empty/locked keychain → its compiled env connector (R3's
+ "live with env fallback", which is what keeps Royal working unchanged);
+ 3. anyone else → None. NEVER the environment: env is tenant #0's connection, and
+ handing it to another tenant is the leak this method exists to prevent.
+
+ Rebuilt per call on purpose — `core.odoo` caches the CLIENT per (slug, creds
+ fingerprint), so this stays cheap while a rotated key reconnects on the next call."""
+ import core.keychain as keychain
+ try:
+ creds = keychain.odoo_creds(self)
+ except Exception: # locked or unreadable keychain — fall through, fail closed
+ creds = None
+ if creds:
+ from harness.connectors.odoo import OdooConnector
+ cfg = getattr(self.tenant, "config", {}) or {}
+ bus = cfg.get("business_units") or {}
+ return OdooConnector(tenant_slug=self.key, creds=creds,
+ scope={"team_ids": list(bus.values()) or None,
+ "team_names": {v: k for k, v in bus.items()} or None})
+ if self.key == "royal-imports":
+ return (getattr(self.tenant, "sources", {}) or {}).get("odoo")
+ return None
+
+ def assert_datastore_matches(self):
+ """RAISE if the process-wide DuckDB file is not this tenant's.
+
+ The alternative is the failure mode that matters: an analytical read served from another
+ tenant's file returns real, plausible, wrong rows — no exception, no telemetry, and the
+ number reconciles against the wrong book. A loud failure is strictly better, and this is
+ the assertion EXIT-5 deletes when the connection becomes per-tenant.
+ """
+ want, have = self.datastore_path.resolve(), _ds.DB_PATH.resolve()
+ if want != have:
+ raise RuntimeError(
+ f"tenant {self.key!r} expects the analytical store at {want}, but this process "
+ f"has {have} open. Refusing the read — a cross-tenant answer would reconcile "
+ f"against the wrong book. (Pin the process with AIOS_DUCKDB_PATH, or call "
+ f"harness.datastore.use_path before serving this tenant.)")
+
+
+def register(key, builder):
+ """Add a tenant to the registry (a stub connector is a legitimate builder — see X8's qa-b).
+ Invalidates any cached runtime for the slug so a re-registration cannot be shadowed."""
+ _BUILDERS[str(key)] = builder
+ invalidate(key)
+
+
+def known_tenants():
+ keys = set(_BUILDERS)
+ try:
+ keys |= set(_tenant_records())
+ except Exception:
+ pass
+ return sorted(keys)
+
+
+#: Wave 18 (C1-TENANT) — the CONTROL-PLANE bucket: tenants provisioned at runtime rather than
+#: compiled in. Lives in the DEFAULT store (tenant #0's repo) deliberately: it answers "which
+#: tenants exist", which is a platform fact, not any one tenant's data.
+TENANTS_KEY = "tenants"
+
+
+def _tenant_records():
+ """{slug: record} from the control-plane bucket. {} on any failure — an unreachable bucket
+ must degrade to "only the compiled-in tenants exist", never to an exception at login."""
+ try:
+ recs = store.get(TENANTS_KEY) or {}
+ return {str(k).strip().lower(): v for k, v in recs.items() if isinstance(v, dict)}
+ except Exception:
+ return {}
+
+
+def _builder_from_record(key, rec):
+ """A Tenant for a bucket-provisioned client: no sources yet (connectors arrive via the
+ Keychain flow), config carries the platform fields the request path reads."""
+ def _build():
+ from harness.base import Tenant
+ return Tenant(key=key, name=str(rec.get("name") or key),
+ config={"modules": rec.get("modules", []),
+ "store_repo": rec.get("store_repo") or None})
+ return _build
+
+
+def get_runtime(tenant_key):
+ """The runtime for `tenant_key`, built on first use and LRU-cached.
+
+ Raises KeyError for an unknown slug — the caller turns that into a 401 (fail-closed: an
+ unknown tenant is not a 404, because confirming which slugs exist answers a question the
+ request was not entitled to ask).
+ """
+ key = str(tenant_key or "").strip().lower()
+ if not key:
+ raise KeyError("no tenant")
+ with _LOCK:
+ rt = _CACHE.get(key)
+ if rt is not None:
+ _CACHE.move_to_end(key) # LRU: touch on read
+ return rt
+ builder = _BUILDERS.get(key)
+ # Wave 18 (C1-TENANT): a slug the compiled registry does not know may be a PROVISIONED
+ # tenant — consult the control-plane bucket before failing closed. A suspended record is
+ # the same KeyError as an unknown one: "which tenants exist" is not this caller's question.
+ if builder is None:
+ rec = _tenant_records().get(key)
+ if not rec or rec.get("status", "active") != "active":
+ raise KeyError(key)
+ builder = _builder_from_record(key, rec)
+ # Built OUTSIDE the lock: a builder may do real work (a connector handshake), and holding the
+ # registry lock through it would serialise every other tenant's requests behind it.
+ tenant = builder()
+ with _LOCK:
+ existing = _CACHE.get(key)
+ if existing is not None: # another thread won the race — keep ONE runtime
+ _CACHE.move_to_end(key)
+ return existing
+ # R2: a tenant with its OWN repo gets a bound Store instance and an EMPTY prefix (the
+ # repo boundary is the namespace); everyone else keeps the t// prefix in the
+ # shared repo. Tenant #0 keeps both defaults — empty prefix, shared repo.
+ repo = (getattr(tenant, "config", {}) or {}).get("store_repo")
+ rt = TenantRuntime(
+ key=key, tenant=tenant,
+ store_namespace=("" if (key == "royal-imports" or repo) else f"t/{key}/"),
+ store_handle=(store.for_repo(repo) if repo else None))
+ _CACHE[key] = rt
+ while len(_CACHE) > _MAX_RUNTIMES:
+ _CACHE.popitem(last=False) # evict least recently used
+ return rt
+
+
+def invalidate(tenant_key=None):
+ """Drop one tenant's runtime, or all of them. Explicit, per X7 — a cache with no documented
+ way to clear it becomes a restart."""
+ with _LOCK:
+ if tenant_key is None:
+ _CACHE.clear()
+ else:
+ _CACHE.pop(str(tenant_key or "").strip().lower(), None)
+
+
+def resident():
+ """The tenant slugs currently holding a runtime — LRU order, oldest first. For the EXIT-4
+ measurement and for asserting the bound actually binds."""
+ with _LOCK:
+ return list(_CACHE)
diff --git a/platform/harness/semantic.py b/platform/harness/semantic.py
new file mode 100644
index 0000000000000000000000000000000000000000..54ac19bcf5ed43a3d4f9dc96794eecbe0302b920
--- /dev/null
+++ b/platform/harness/semantic.py
@@ -0,0 +1,936 @@
+"""harness/semantic.py — the semantic seam (OM-0a, 2026-07-11).
+
+The ONE governed registry of topics + metrics (platform/model/*.yml) and the resolver that
+turns a metric key into a number through the SAME proven data layer the validated modules use
+(core/odoo domain builders + aggregate helpers) — so scope parity is by construction, and every
+metric carries its definition, ai_context, and an independent validate contract.
+
+Consumers (the point of the seam): the app's pages, the metric dictionary (OM-0c), the saved-
+dashboard viewer (OM-3; the Explore page was retired 2026-07-23), the AI Analyst's tools (OM-4:
+list_topics / describe_topic / run_semantic_query), and the MCP server (OM-6). Plan:
+.claude/wiki/research/omni-adoption.md (Part IV + the productization addendum).
+
+Design constraints honored (from /odoo-api):
+ - read_group dot-path GROUPBY fails → scalar aggregates here use sum_field/distinct_count;
+ grouped queries (OM-3+) must group by direct m2o fields only.
+ - Scope is never hand-rolled: topics BIND to a named domain builder (sale_line_domain, ...);
+ the YAML `scope:` block is the declarative statement of what that builder bakes in.
+ - READ-ONLY on Odoo, always.
+"""
+import ast
+import functools
+import operator
+from pathlib import Path
+
+import yaml
+
+import core.odoo as O
+
+MODEL_DIR = Path(__file__).resolve().parents[1] / "model"
+
+# Topic scope binds to a NAMED, reviewed domain builder — never a YAML-assembled domain (one
+# source of truth for scope until OM-2 makes topics executable against the store).
+def _order_domain(*a, **kw):
+ # lazy: order scope currently lives in modules/sales.py; OM-2 lifts it into core/the store
+ import modules.sales as S
+ return S.order_domain(*a, **kw)
+
+
+def _customer_move_domain(move_type):
+ """A posted customer document domain, matching `modules/returns.py`'s `_mdom` exactly.
+
+ ⚠ COMPANY-LEVEL, and it REFUSES a team rather than ignoring one. Credit notes all carry
+ team_id = 1, so a BU filter on the document is meaningless — silently dropping the argument
+ would hand a business-unit user the company's number under their own name, which is the
+ widening sin in a different currency.
+ """
+ def build(date_from=None, date_to=None, team_id=None, **kw):
+ if team_id:
+ raise ModelError(
+ f"customer {move_type} documents are COMPANY-LEVEL — credit notes and invoices "
+ f"carry no trustworthy business-unit tag, so a team-scoped total cannot be "
+ f"produced. Refusing rather than returning the company number.")
+ dom = [("move_type", "=", move_type), ("state", "=", "posted")]
+ if date_from:
+ dom.append(("invoice_date", ">=", date_from))
+ if date_to:
+ dom.append(("invoice_date", "<=", date_to))
+ return dom
+ return build
+
+
+_BUILDERS = {
+ "sale_line_domain": O.sale_line_domain,
+ "sale_order_domain": _order_domain,
+ "credit_note_domain": _customer_move_domain("out_refund"),
+ "customer_invoice_domain": _customer_move_domain("out_invoice"),
+}
+
+
+class ModelError(Exception):
+ """A model-file problem (unknown key, bad reference, unparseable expr)."""
+
+
+# ---------------------------------------------------------------- loading
+
+@functools.lru_cache(maxsize=1)
+def _tenant():
+ f = MODEL_DIR / "tenant.yml"
+ return yaml.safe_load(f.read_text(encoding="utf-8")) if f.exists() else {"params": {}}
+
+
+def _sql_value(v):
+ """Render a tenant param into SQL safely (params are versioned config, not user input —
+ but escape anyway): ints as-is, lists comma-joined, strings single-quoted + escaped."""
+ if isinstance(v, bool):
+ raise ModelError("boolean tenant params not supported in scope_sql")
+ if isinstance(v, (int, float)):
+ return str(v)
+ if isinstance(v, (list, tuple)):
+ return ", ".join(_sql_value(x) for x in v)
+ return "'" + str(v).replace("'", "''") + "'"
+
+
+def render_scope(sql):
+ """Substitute {param} placeholders in a store scope/filter SQL fragment from tenant.yml."""
+ params = _tenant().get("params") or {}
+ out = sql
+ for k, v in params.items():
+ out = out.replace("{" + k + "}", _sql_value(v))
+ if "{" in out and "}" in out:
+ import re as _re
+ missing = _re.findall(r"\{([a-z_]+)\}", out)
+ if missing:
+ raise ModelError(f"scope_sql references unknown tenant params: {missing}")
+ return out
+
+
+@functools.lru_cache(maxsize=1)
+def _model():
+ topics, metrics = {}, {}
+ for f in sorted((MODEL_DIR / "topics").glob("*.yml")):
+ d = yaml.safe_load(f.read_text(encoding="utf-8"))
+ if not d or "key" not in d:
+ raise ModelError(f"topic file {f.name} lacks a 'key'")
+ if d.get("domain_builder") and d["domain_builder"] not in _BUILDERS:
+ raise ModelError(f"topic {d['key']}: unknown domain_builder {d.get('domain_builder')!r}")
+ # a topic may be STORE-ONLY (no live-path builder yet, e.g. gl_lines) — metric() raises
+ # a clear error if a live resolution is attempted on it
+ topics[d["key"]] = d
+ for f in sorted((MODEL_DIR / "metrics").glob("*.yml")):
+ d = yaml.safe_load(f.read_text(encoding="utf-8"))
+ topic = d.get("topic")
+ if topic not in topics:
+ raise ModelError(f"metrics file {f.name}: unknown topic {topic!r}")
+ for m in d.get("metrics", []):
+ if "key" not in m:
+ raise ModelError(f"metrics file {f.name}: a metric lacks a 'key'")
+ if m["key"] in metrics:
+ raise ModelError(f"duplicate metric key {m['key']!r}")
+ m.setdefault("topic", topic) # a metric may name its own topic (rare)
+ if m["topic"] not in topics:
+ raise ModelError(f"metric {m['key']!r}: unknown topic {m['topic']!r}")
+ metrics[m["key"]] = m
+ return {"topics": topics, "metrics": metrics}
+
+
+def reload_model():
+ _model.cache_clear()
+ _tenant.cache_clear()
+ return _model()
+
+
+def topics():
+ return dict(_model()["topics"])
+
+
+def metrics():
+ return dict(_model()["metrics"])
+
+
+def describe(key):
+ """Full metadata for a metric (the dictionary page / AI describe_topic feed)."""
+ m = _model()["metrics"].get(key)
+ if not m:
+ raise ModelError(f"unknown metric {key!r}")
+ return {**m, "topic_def": _model()["topics"][m["topic"]]}
+
+
+# ---------------------------------------------------------------- resolving
+
+def _domain(topic_def, date_from, date_to, team_id):
+ b = topic_def.get("domain_builder")
+ if not b:
+ raise ModelError(f"topic {topic_def['key']!r} is store-only — use store_query() "
+ f"(no live-path domain builder bound yet)")
+ return _BUILDERS[b](date_from, date_to, team_id=team_id)
+
+
+_OPS = {ast.Add: operator.add, ast.Sub: operator.sub,
+ ast.Mult: operator.mul, ast.Div: operator.truediv}
+
+
+def _eval_expr(expr, resolve):
+ """Safely evaluate a derived-metric expression: metric keys, numbers, + - * / and parens."""
+ def ev(node):
+ if isinstance(node, ast.Expression):
+ return ev(node.body)
+ if isinstance(node, ast.BinOp) and type(node.op) in _OPS:
+ return _OPS[type(node.op)](ev(node.left), ev(node.right))
+ if isinstance(node, ast.UnaryOp) and isinstance(node.op, ast.USub):
+ return -ev(node.operand)
+ if isinstance(node, ast.Num): # py<3.8 compat name; Constant below
+ return node.n
+ if isinstance(node, ast.Constant) and isinstance(node.value, (int, float)):
+ return node.value
+ if isinstance(node, ast.Name):
+ return resolve(node.id)
+ raise ModelError(f"disallowed token in derived expr: {ast.dump(node)}")
+ try:
+ return ev(ast.parse(expr, mode="eval"))
+ except SyntaxError as e:
+ raise ModelError(f"unparseable derived expr {expr!r}: {e}")
+
+
+def metric(key, date_from=None, date_to=None, team_id=None, _seen=None):
+ """Resolve a registered metric to a number for a window (+optional BU). The only public
+ compute path — every surface that shows this metric goes through here."""
+ _seen = _seen or set()
+ if key in _seen:
+ raise ModelError(f"circular metric reference at {key!r}")
+ _seen = _seen | {key}
+ m = _model()["metrics"].get(key)
+ if not m:
+ raise ModelError(f"unknown metric {key!r}")
+ agg = m.get("agg")
+ if agg == "ratio":
+ num = metric(m["numerator"], date_from, date_to, team_id, _seen)
+ den = metric(m["denominator"], date_from, date_to, team_id, _seen)
+ return (num / den) if den else 0.0
+ if agg == "derived":
+ return _eval_expr(m["expr"], lambda k: metric(k, date_from, date_to, team_id, _seen))
+ t = _model()["topics"][m["topic"]]
+ dom = _domain(t, date_from, date_to, team_id)
+ if agg == "sum":
+ # ⚠ `negate` applies HERE too, not only in `_measure_sql`. It existed for GL income on a
+ # STORE-ONLY topic, so the live path never met it — the first metric that is both negated
+ # and parity-checked (`returns`) would otherwise compare a negative live number against a
+ # positive store one, and the "parity failure" would look like a data problem.
+ got = O.sum_field(t["entity"], dom, m["field"])
+ return -got if m.get("negate") else got
+ if agg == "count_distinct":
+ return O.distinct_count(t["entity"], dom, m["field"])
+ if agg == "count":
+ return O.get_odoo().search_count(t["entity"], dom)
+ raise ModelError(f"metric {key!r}: unknown agg {agg!r}")
+
+
+# ---------------------------------------------------------------- validate contracts
+
+def _v_order_level_revenue(date_from, date_to, team_id):
+ """Independent check: line-level Σ price_subtotal == order-level Σ amount_untaxed."""
+ import modules.sales as S
+ line = metric("revenue", date_from, date_to, team_id)
+ order = O.sum_field("sale.order", S.order_domain(date_from, date_to, team_id), "amount_untaxed")
+ return line, order
+
+
+def _v_order_count(date_from, date_to, team_id):
+ """Exact reconciliation: order-level count == distinct line-parent orders + line-LESS orders.
+ (Confirmed orders with zero lines exist in the data — 2 found at first proof, 2026-07-11;
+ counting them explicitly makes the identity exact instead of hiding them in a tolerance,
+ and surfaces them as a data-health signal.)"""
+ import modules.sales as S
+ order_level = metric("orders", date_from, date_to, team_id)
+ dom = S.order_domain(date_from, date_to, team_id)
+ from_lines = O.distinct_count("sale.order.line",
+ O.sale_line_domain(date_from, date_to, team_id), "order_id")
+ empty = O.get_odoo().search_count("sale.order", dom + [("order_line", "=", False)])
+ return order_level, from_lines + empty
+
+
+def _v_gl_opex(date_from, date_to, team_id):
+ """Store-path opex == the live Odoo aggregate with the Expenses-module domain (posted,
+ expense-type accounts), to the cent. team_id N/A (company-level)."""
+ res = store_query("gl_lines", ["opex"], date_from=date_from, date_to=date_to)
+ ours = res["rows"][0]["opex"] if res["rows"] else 0
+ dom = [("move_id.state", "=", "posted"),
+ ("account_id.account_type", "in", ["expense", "expense_depreciation"])]
+ if date_from:
+ dom.append(("date", ">=", date_from))
+ if date_to:
+ dom.append(("date", "<=", date_to))
+ live = O.sum_field("account.move.line", dom, "balance")
+ return ours, live
+
+
+def _v_ar_outstanding(date_from, date_to, team_id):
+ """Store-path AR outstanding == live Odoo aggregate (posted out_invoice/out_refund residuals).
+ No date window — outstanding is an as-of-now balance."""
+ res = store_query("receivables", ["ar_outstanding"])
+ ours = res["rows"][0]["ar_outstanding"] if res["rows"] else 0
+ live = O.sum_field("account.move",
+ [("state", "=", "posted"), ("move_type", "in", ["out_invoice", "out_refund"])],
+ "amount_residual_signed")
+ return ours, live
+
+
+def _v_returns_sign(date_from, date_to, team_id):
+ """Independent check on the NEGATION: `returns` must equal the ABSOLUTE untaxed total of the
+ same posted credit notes, read straight from Odoo without going through the metric.
+
+ A lost negation makes returns negative; a doubled one makes it negative again. Both read as
+ "no returns" rather than as an error, and neither is visible to any self-consistency check —
+ the store and the live path would agree with each other perfectly while both being wrong.
+ """
+ ours = metric("returns", date_from, date_to, team_id)
+ raw = O.sum_field("account.move",
+ _BUILDERS["credit_note_domain"](date_from, date_to, team_id),
+ "amount_untaxed_signed")
+ return ours, abs(raw)
+
+
+def _v_line_vs_move_grain(date_from, date_to, team_id):
+ """Independent check on the invoice-LINE topic: the store's netted product-line total must
+ equal the same figure read straight from LIVE Odoo.
+
+ Two things this catches that self-consistency cannot. (1) A LOST CREDIT-NOTE NEGATION —
+ `price_subtotal` is stored POSITIVE on a refund line, so a dropped subtraction inflates
+ revenue while every internal check still agrees. (2) A WRONG `display_type` FILTER — the
+ invoice tables carry 'cogs' and 'payment_term' rows alongside 'product' ones, and including
+ them changes the total silently rather than erroring.
+
+ Company-level (team_id None) uses the strongest possible reference: the MOVE-grain
+ `amount_untaxed_signed`, a different table entirely. Per-BU there is no move-grain analogue
+ (account.move carries no business unit — every invoice sits on team 1), so the reference is
+ the live line-level aggregate reached through the sale-order dot path: still an independent
+ engine and query path from the DuckDB store, which is what the contract requires.
+ """
+ ours = (store_query("invoice_lines", ["invoiced_line_sales"],
+ date_from=date_from, date_to=date_to, team_id=team_id)
+ .get("rows") or [{}])[0].get("invoiced_line_sales") or 0.0
+ if team_id is None:
+ raw = O.sum_field("account.move",
+ [("state", "=", "posted"),
+ ("move_type", "in", ["out_invoice", "out_refund"]),
+ ("invoice_date", ">=", date_from), ("invoice_date", "<=", date_to)],
+ "amount_untaxed_signed")
+ return ours, raw
+ dom = [("parent_state", "=", "posted"), ("display_type", "=", "product"),
+ ("date", ">=", date_from), ("date", "<=", date_to),
+ ("sale_line_ids.order_id.team_id", "=", team_id)]
+ gross = O.sum_field("account.move.line", dom + [("move_type", "=", "out_invoice")],
+ "price_subtotal")
+ refunds = O.sum_field("account.move.line", dom + [("move_type", "=", "out_refund")],
+ "price_subtotal")
+ return ours, (gross or 0) - (refunds or 0)
+
+
+_VALIDATORS = {
+ "returns_sign": _v_returns_sign,
+ "line_vs_move_grain": _v_line_vs_move_grain,
+ "order_level_revenue": _v_order_level_revenue,
+ "order_count": _v_order_count,
+ "gl_opex": _v_gl_opex,
+ "ar_outstanding": _v_ar_outstanding,
+}
+
+
+def validate_metric(key, date_from=None, date_to=None, team_id=None, tol=0.01):
+ """Run a metric's declared independent cross-check. Returns the standard check dict
+ (the validate.py convention: check/ok/gap)."""
+ m = _model()["metrics"].get(key)
+ if not m:
+ raise ModelError(f"unknown metric {key!r}")
+ contract = m.get("validate")
+ if not contract:
+ return {"check": f"semantic.{key}: no independent contract declared", "ok": True, "gap": 0.0,
+ "note": "declare one in model/metrics when an independent aggregate exists"}
+ fn = _VALIDATORS.get(contract["method"])
+ if not fn:
+ raise ModelError(f"metric {key!r}: unknown validate method {contract['method']!r}")
+ ours, independent = fn(date_from, date_to, team_id)
+ gap = abs((ours or 0) - (independent or 0))
+ return {"check": f"semantic.{key} == {contract['method']} ({date_from}..{date_to}, team={team_id})",
+ "ok": gap <= tol, "gap": round(gap, 4), "ours": ours, "independent": independent}
+
+
+def validate(pre=None):
+ """Module-convention validate(): run every declared contract over YTD, all-BU + per-BU."""
+ import core.periods as P
+ yf, yt = P.ytd()
+ out = []
+ for key, m in _model()["metrics"].items():
+ if not m.get("validate"):
+ continue
+ out.append(validate_metric(key, yf, yt, None))
+ topic = _model()["topics"][m["topic"]]
+ if (topic.get("store") or {}).get("team_col"): # company-level topics have no BU runs
+ for tid in O.TEAM_IDS:
+ out.append(validate_metric(key, yf, yt, tid))
+ return out
+
+
+# ---------------------------------------------------------------- store path (OM-2)
+# The compiler behind run_semantic_query: registered metrics + whitelisted dims → DuckDB SQL over
+# the tenant store (harness/datastore.py). EVERY identifier comes from the versioned model files
+# (trusted); every VALUE is parameterized — the small model only ever picks keys, so there is no
+# injection surface. Live XML-RPC stays the validate() path (the store never validates itself).
+
+def _store_con():
+ import harness.datastore as DS
+ if not DS.ready(): # a mid-backfill store returns PARTIAL totals silently
+ raise ModelError("the data cache is still warming up after a restart (a one-time first "
+ "sync) — the dashboards work now from live data; ask me again in a "
+ "moment and I'll have it")
+ return DS.ro_cursor() # cursor on the shared instance — no sync-writer contention
+
+
+def _measure_sql(m, alias):
+ """SQL for a base measure. Supports FILTERED measures (`store_filter_sql` — the Omni
+ filtered-measure concept: sum(CASE WHEN … )) and `negate: true` (e.g. GL income, stored
+ credit-negative, reported positive)."""
+ agg, f = m.get("agg"), m.get("field")
+ flt = render_scope(m["store_filter_sql"]) if m.get("store_filter_sql") else None
+ if agg == "sum":
+ core = f"sum(CASE WHEN {flt} THEN {alias}.{f} ELSE 0 END)" if flt else f"sum({alias}.{f})"
+ elif agg == "count_distinct":
+ core = (f"count(DISTINCT CASE WHEN {flt} THEN {alias}.{f} END)" if flt
+ else f"count(DISTINCT {alias}.{f})")
+ elif agg == "count":
+ core = f"count(CASE WHEN {flt} THEN 1 END)" if flt else "count(*)"
+ else:
+ raise ModelError(f"metric {m['key']!r}: agg {agg!r} has no store expression")
+ return f"-({core})" if m.get("negate") else core
+
+
+def _expand_measures(keys):
+ """Expand ratio/derived metrics into the base measures SQL must aggregate, keeping the
+ requested keys for post-compute. Returns (base_keys, requested_keys)."""
+ mts = _model()["metrics"]
+ base, seen = [], set()
+
+ def need(k):
+ if k in seen:
+ return
+ seen.add(k)
+ m = mts.get(k)
+ if not m:
+ raise ModelError(f"unknown metric {k!r}")
+ if m["agg"] == "ratio":
+ need(m["numerator"]); need(m["denominator"])
+ elif m["agg"] == "derived":
+ import ast as _ast
+ for node in _ast.walk(_ast.parse(m["expr"], mode="eval")):
+ if isinstance(node, _ast.Name):
+ need(node.id)
+ else:
+ if k not in base:
+ base.append(k)
+ for k in keys:
+ need(k)
+ return base, list(keys)
+
+
+def _post_compute(row, key):
+ m = _model()["metrics"][key]
+ if m["agg"] == "ratio":
+ num, den = _post_compute(row, m["numerator"]), _post_compute(row, m["denominator"])
+ return (num / den) if den else 0.0
+ if m["agg"] == "derived":
+ return _eval_expr(m["expr"], lambda k: _post_compute(row, k))
+ return row.get(key) or 0.0
+
+
+# A metric's declared `format` -> the grid field type the compiler and the cells both read.
+# One mapping, so a new metric cannot arrive as an untyped column.
+_FORMAT_TYPE = {"usd": "currency", "int": "int", "pct": "pct"}
+
+
+def _clean_tree(tree, cols):
+ """Run a filter tree through the SAME validator the client's view state goes through.
+
+ `filter_sql`'s documented input contract is "feed me CLEANED trees" — it is faithful to the
+ TS engine rather than fail-closed on garbage, because rejecting garbage is the validator's
+ job. The UI path always cleans (view state is sanitised on the way into the store), but
+ store_query/store_rows are callable directly, and an uncleaned tree is where the two
+ diverge: `{"value": null}` is ACTIVE in TS (and throws on a text field) and INACTIVE here.
+
+ Normalising at the entry point makes that unreachable rather than merely unlikely, and
+ brings the depth / width / node-count caps to the server side too. `aios_grid` is a leaf
+ module with zero imports of its own, so this cannot cycle.
+ """
+ from aios_grid import (clean_filter_tree, COHORT_FIELD as _COHORT_FIELD,
+ MAX_FILTER_DEPTH, MAX_FILTER_NODES, MAX_FILTER_SIBLINGS)
+
+ # REFUSE an over-large tree rather than TRUNCATE it. clean_filter_tree caps siblings per
+ # level, total nodes and depth by DROPPING the excess — correct on the client, where the
+ # cap is a DoS guard on a per-row render loop and a dropped condition is the lesser evil.
+ # On the server it is not: dropping AND-conditions WIDENS the result, and store_rows then
+ # reports a row_count and scope-wide totals that look authoritative for a query the caller
+ # never asked for. That is precisely the silent [:N] that [[no-unverifiable-aggregates]]
+ # forbids. A caller that exceeds the caps gets an error, not a quietly different answer.
+ total = 0
+
+ def _walk(nodes, depth):
+ nonlocal total
+ nodes = list(nodes or [])
+ if len(nodes) > MAX_FILTER_SIBLINGS:
+ raise ModelError(f"filter tree has {len(nodes)} conditions at one level; the limit "
+ f"is {MAX_FILTER_SIBLINGS}. Refusing rather than dropping the "
+ f"excess, which would silently widen the result.")
+ for node in nodes:
+ if not isinstance(node, dict):
+ continue
+ total += 1
+ if isinstance(node.get('children'), list):
+ if depth >= MAX_FILTER_DEPTH:
+ raise ModelError(f"filter tree nests deeper than {MAX_FILTER_DEPTH} levels; "
+ f"refusing rather than dropping the deepest group.")
+ _walk(node['children'], depth + 1)
+
+ _walk(tree, 1)
+ if total > MAX_FILTER_NODES:
+ raise ModelError(f"filter tree has {total} nodes; the limit is {MAX_FILTER_NODES}. "
+ f"Refusing rather than truncating, which would silently widen it.")
+
+ # CG-8. A MEASURE condition ("Sales in the last 90 days > 5,000") is answered by
+ # harness/measure_filter.py, which resolves it to a SET OF CUSTOMER IDS. It has no meaning
+ # on this path, and both ways it could arrive here are silent:
+ # - on a topic without that column, `clean_filter_tree` DROPS it as unknown — widening the
+ # query while store_rows reports an authoritative row_count for something nobody asked
+ # for (the same class as the sibling/depth caps above);
+ # - on sales_lines at row grain, `revenue` IS a real column, so it would compile as a
+ # per-LINE predicate with the window silently discarded — a different question answered
+ # confidently, which is worse than dropping it.
+ # The discriminator is the `window`, not the column name: no column condition has one.
+ windowed = []
+ cohorts = []
+
+ def _find(nodes):
+ for node in nodes or []:
+ if not isinstance(node, dict):
+ continue
+ if isinstance(node.get('children'), list):
+ _find(node['children'])
+ elif node.get('window') is not None:
+ windowed.append(str(node.get('colId')))
+ elif node.get('colId') == _COHORT_FIELD:
+ cohorts.append(str(node.get('value')))
+
+ _find(tree)
+ # Owner item 5, and the same refusal for the same reason. A cohort leaf names a
+ # hand-curated set of CUSTOMERS held per user in the tenant store — this path knows nothing
+ # about it, and `clean_filter_tree` below would drop it as an unknown key, widening the
+ # query while store_rows still reported an authoritative row_count. If a caller ever needs
+ # it here, the fix is to pass the membership in, not to let it fall through.
+ if cohorts:
+ raise ModelError(
+ f"filter tree carries cohort-membership condition(s) {sorted(set(cohorts))} — "
+ f"cohort membership is host state, not a column of this topic. Refusing rather than "
+ f"dropping it, which would silently widen the result under an authoritative count.")
+ if windowed:
+ raise ModelError(
+ f"filter tree carries measure condition(s) over a date window {sorted(set(windowed))}"
+ f" — those are resolved to a set of ids by harness.measure_filter, not compiled into "
+ f"this query. Refusing rather than dropping or mis-compiling them, either of which "
+ f"would silently answer a different question under an authoritative count.")
+ return clean_filter_tree(tree, set(cols))
+
+
+def _measure_row_sql(m, alias):
+ """A sum-metric's per-ROW value: the same expression `_measure_sql` aggregates, without the
+ aggregate wrapper. At line grain `revenue` IS `l.price_subtotal` for that line — deriving it
+ from the metric rather than hand-writing the column is what keeps ONE definition of the
+ number (the drift the semantic layer exists to prevent). Only `sum` has a row value; a
+ count/count_distinct metric is a property of a SET, not of a row."""
+ if m.get("agg") != "sum":
+ return None
+ f = m.get("field")
+ flt = render_scope(m["store_filter_sql"]) if m.get("store_filter_sql") else None
+ core = f"CASE WHEN {flt} THEN {alias}.{f} ELSE 0 END" if flt else f"{alias}.{f}"
+ return f"-({core})" if m.get("negate") else core
+
+
+def store_columns(topic, include_measures=True, grain="aggregate"):
+ """The `{colId: {sql, type, aggregate}}` spec `harness.filter_sql` compiles against (CG-1).
+
+ `grain="row"` is the LINE-grain projection (CG-2): sum-metrics resolve to their own raw
+ field with `aggregate=False`, so a line table filters and sorts on real row values in WHERE
+ rather than needing HAVING. count-style metrics are dropped — they have no row value.
+
+ This is the seam between the grid's field contract and the semantic model: the grid speaks
+ field KEYS, the compiler needs SQL expressions and a field TYPE, and only the model may say
+ what a key resolves to. Nothing about a topic leaks into filter_sql itself.
+
+ -> the dim's NAME column (what the grid displays and what a user means when
+ they type "contains floral"), filtered PRE-aggregation in WHERE. Correct
+ even in a grouped query: every row of a group shares its group's name.
+ _id -> the raw id, for exact machine-keyed filtering.
+ date -> the topic's date column, so a grid can filter/sort it like any other field.
+ -> the aggregate expression, marked `aggregate` so the caller routes it to
+ HAVING rather than WHERE (see store_query — that path is not built yet).
+ """
+ t = _model()["topics"].get(topic)
+ if not t or "store" not in t:
+ raise ModelError(f"topic {topic!r} has no store binding")
+ s = t["store"]
+ cols = {}
+ for key, d in (s.get("dims") or {}).items():
+ cols[key] = {"sql": d.get("name_col") or d["col"], "type": "text", "aggregate": False}
+ # Only expose a separate id column when the dim actually HAS one. `city` is its own
+ # name (col == name_col), so a `city_id` would be a text column typed int — filtering
+ # it numerically would quietly compare 0 against 0 for every row.
+ if d.get("name_col") and d["name_col"] != d["col"]:
+ cols[f"{key}_id"] = {"sql": d["col"], "type": "int", "aggregate": False}
+ if s.get("date_col"):
+ cols["date"] = {"sql": s["date_col"], "type": "date", "aggregate": False}
+ if include_measures:
+ for k, m in _model()["metrics"].items():
+ if m.get("topic") != topic or m.get("agg") in ("ratio", "derived"):
+ continue # ratio/derived are post-computed, not SQL
+ # The field TYPE comes from the metric's declared format, never a guess: `units` is
+ # format:int, and typing it currency would render 791,960 units as dollars.
+ ftype = _FORMAT_TYPE.get(m.get("format"), "currency")
+ if grain == "row":
+ row_sql = _measure_row_sql(m, s["alias"])
+ if row_sql:
+ cols[k] = {"sql": row_sql, "type": ftype, "aggregate": False}
+ else:
+ cols[k] = {"sql": _measure_sql(m, s["alias"]),
+ "type": ftype, "aggregate": True}
+ return cols
+
+
+def store_query(topic, measures, group_by=None, grain=None, date_from=None, date_to=None,
+ team_id=None, filters=None, sort=None, limit=1000, exclude_services=False,
+ filter_tree=None, filter_conj="and", today=None):
+ """The semantic query over the tenant store — the engine behind the Analyst's
+ run_semantic_query tool and the saved-view re-runner. All keys whitelisted against the model."""
+ t = _model()["topics"].get(topic)
+ if not t or "store" not in t:
+ raise ModelError(f"topic {topic!r} has no store binding")
+ s = t["store"]
+ alias = s["alias"]
+ dims = s.get("dims") or {}
+ limit = max(1, min(int(limit or 1000), 5000))
+
+ base_keys, requested = _expand_measures(list(measures or []))
+ if not base_keys:
+ raise ModelError("at least one measure required")
+ # Cross-topic base metrics (e.g. aov = revenue ÷ orders, where orders lives on sales_orders):
+ # in a SCALAR query they resolve via a nested scalar query on their HOME topic (correct grain —
+ # never count(*) on the wrong table); in a GROUPED query they are refused (split the request).
+ foreign = [k for k in base_keys if _model()["metrics"][k]["topic"] != topic]
+ if foreign and (group_by or grain):
+ raise ModelError(f"metrics {foreign} belong to another topic — cross-topic measures are "
+ f"scalar-only; run them against their own topic when grouping")
+ base_keys = [k for k in base_keys if k not in foreign]
+ foreign_vals = {}
+ for k in foreign:
+ sub = store_query(_model()["metrics"][k]["topic"], [k], date_from=date_from,
+ date_to=date_to, team_id=team_id)
+ foreign_vals[k] = sub["rows"][0][k] if sub["rows"] else 0
+ if not base_keys: # purely foreign scalar request
+ return {"topic": topic, "rows": [foreign_vals], "row_count": 1, "sql": "(nested)",
+ "measures": requested, "group_by": [], "grain": None}
+
+ select, group_cols, params = [], [], []
+ gb = [g for g in (group_by or []) if g]
+ for g in gb:
+ if g not in dims:
+ raise ModelError(f"group_by {g!r} not a dim of {topic!r} (allowed: {list(dims)})")
+ d = dims[g]
+ select.append(f"{d['col']} AS {g}_id" if d.get("name_col") else f"{d['col']} AS {g}")
+ group_cols.append(d["col"])
+ if d.get("name_col"):
+ select.append(f"max({d['name_col']}) AS {g}")
+ if grain:
+ if grain not in ("month", "week", "day"):
+ raise ModelError("grain must be month|week|day")
+ select.insert(0, f"date_trunc('{grain}', CAST({s['date_col']} AS TIMESTAMP)) AS period")
+ group_cols.insert(0, f"date_trunc('{grain}', CAST({s['date_col']} AS TIMESTAMP))")
+ for k in base_keys:
+ select.append(f"{_measure_sql(_model()['metrics'][k], alias)} AS {k}")
+
+ where = [render_scope(s["scope_sql"].strip())]
+ # TYPE-CORRECT date bounds (the 2025-07-01 lesson): columns hold ISO strings in TWO shapes —
+ # datetimes ('YYYY-MM-DD HH:MM:SS', sale date_order) and bare dates ('YYYY-MM-DD', GL date).
+ # Lexical string comparison EXCLUDES the window's first day for bare dates ('2025-07-01' <
+ # '2025-07-01 00:00:00'), which silently dropped a whole day of GL ($49,467). Cast both sides.
+ if date_from:
+ where.append(f"CAST({s['date_col']} AS TIMESTAMP) >= ?")
+ params.append(f"{date_from} 00:00:00")
+ if date_to:
+ where.append(f"CAST({s['date_col']} AS TIMESTAMP) <= ?")
+ params.append(f"{date_to} 23:59:59")
+ if team_id:
+ if not s.get("team_col"):
+ raise ModelError(f"topic {topic!r} is company-level — it has no business-unit filter")
+ where.append(f"{s['team_col']} = ?"); params.append(int(team_id))
+ if exclude_services and s.get("service_filter"):
+ where.append(render_scope(s["service_filter"]))
+ for dim_key, vals in (filters or {}).items():
+ if dim_key not in dims:
+ raise ModelError(f"filter dim {dim_key!r} not allowed (use: {list(dims)})")
+ # id dims filter by int; TEXT dims (e.g. city) filter by the value itself — either way
+ # every VALUE stays parameterized (the whitelist covers identifiers only)
+ def _coerce(v):
+ try:
+ return int(v)
+ except (TypeError, ValueError):
+ return str(v)
+ ids = [_coerce(v) for v in (vals if isinstance(vals, (list, tuple)) else [vals])]
+ where.append(f"{dims[dim_key]['col']} IN ({','.join('?' for _ in ids)})")
+ params.extend(ids)
+
+ # The grid's filter TREE (CG-1). `filters` above stays the Analyst's flat dim=IN shape;
+ # this is the nested, 11-operator contract the table UI emits. Compiled by
+ # harness/filter_sql, which is held in lock-step with the TS engine and the validator by
+ # aios-web/verify_filter_engine.py. Appended AFTER the dim filters so params stay in
+ # positional order with `where`.
+ if filter_tree:
+ from harness import filter_sql as _fs
+ cols = store_columns(topic)
+ pred = _fs.compile_filter_tree(_clean_tree(filter_tree, cols), filter_conj, cols,
+ today=today)
+ if pred is not None:
+ if pred.uses_aggregate:
+ bad = sorted(c for c in pred.columns_used if cols[c].get("aggregate"))
+ raise ModelError(
+ f"filter_tree references measure(s) {bad} — a measure filter has to land in "
+ f"HAVING, and that path is deliberately NOT built: CG-1 ships the WHERE path "
+ f"because its consumer (CG-2, the line-grain sales table) does not aggregate. "
+ f"Filter on dims, or aggregate first and filter the result.")
+ where.append(pred.sql)
+ params.extend(pred.params)
+
+ sql = (f"SELECT {', '.join(select)} FROM {s['table']} {alias} {s.get('join','')} "
+ f"WHERE {' AND '.join(where)}")
+ if group_cols:
+ sql += f" GROUP BY {', '.join(group_cols)}"
+ if sort:
+ key = sort.lstrip("-")
+ if key not in base_keys + gb + (["period"] if grain else []):
+ raise ModelError(f"sort {sort!r} must reference a selected measure/dim")
+ sql += f" ORDER BY {key} {'DESC' if sort.startswith('-') else 'ASC'}"
+ elif grain:
+ sql += " ORDER BY period"
+ sql += f" LIMIT {limit}"
+
+ con = _store_con()
+ try:
+ cur = con.execute(sql, params)
+ cols = [d[0] for d in cur.description]
+ rows = [dict(zip(cols, r)) for r in cur.fetchall()]
+ finally:
+ con.close()
+ for row in rows: # ratio/derived post-compute per group
+ row.update(foreign_vals) # scalar cross-topic components
+ for k in requested:
+ if _model()["metrics"][k]["agg"] in ("ratio", "derived"):
+ row[k] = _post_compute(row, k)
+ if "period" in row and row["period"] is not None:
+ row["period"] = str(row["period"])[:10]
+ return {"topic": topic, "rows": rows, "row_count": len(rows), "sql": sql,
+ "measures": requested, "group_by": gb, "grain": grain}
+
+
+def store_rows(topic, date_from=None, date_to=None, team_id=None, filter_tree=None,
+ filter_conj="and", search=None, sorts=None, limit=200, offset=0,
+ aggregates=None, exclude_services=False, id_sql=None, member_ids=None,
+ today=None):
+ """ROW-grain fetch — the line-grain counterpart to store_query's aggregate path (CG-2).
+
+ store_query answers "what is the number"; this answers "which rows". At line grain the
+ payload is the binding constraint (254,837 sale_order_lines against 1,550 customers — the
+ whole book would be ~96 MB at the customer table's measured 377 B/row), so rows come back
+ WINDOWED.
+
+ A window is only honest if the counts and totals are not windowed with it
+ ([[no-unverifiable-aggregates]]). So this returns THREE independent numbers, each from its
+ own query over the FULL scope, never from `len(rows)`:
+
+ row_count rows matching the filter across the whole scope -> the N of "N of M"
+ total_count rows in the scope with no filter at all -> the M
+ aggregates the topic's OWN metric definitions, summed over the whole FILTERED scope
+
+ That is the difference between a windowed fetch and a silent `[:N]` cap: the user is told
+ how many rows exist and shown totals for all of them, while receiving only the page they
+ can see.
+
+ Filters/sorts/search compile through harness.filter_sql, so a line table means EXACTLY what
+ the client engine means at customer grain — that equivalence is what verify_filter_engine.py
+ exists to hold.
+
+ Dates are returned already truncated to the 10-char ISO shape the filter compares against,
+ so what is displayed and what is filtered are the same string. Numerics come back RAW; the
+ payload layer rounds them (aios_grid._round), and the compiler mirrors that rounding.
+ """
+ t = _model()["topics"].get(topic)
+ if not t or "store" not in t:
+ raise ModelError(f"topic {topic!r} has no store binding")
+ from harness import filter_sql as _fs
+ s = t["store"]
+ alias = s["alias"]
+ cols = store_columns(topic, grain="row")
+ id_sql = id_sql or f"{alias}.id"
+ limit = max(1, min(int(limit or 200), 5000))
+ offset = max(0, int(offset or 0))
+
+ # --- the scope every one of the three queries shares -------------------------------
+ scope, scope_params = [render_scope(s["scope_sql"].strip())], []
+ if date_from:
+ scope.append(f"CAST({s['date_col']} AS TIMESTAMP) >= ?")
+ scope_params.append(f"{date_from} 00:00:00")
+ if date_to:
+ scope.append(f"CAST({s['date_col']} AS TIMESTAMP) <= ?")
+ scope_params.append(f"{date_to} 23:59:59")
+ if team_id:
+ if not s.get("team_col"):
+ raise ModelError(f"topic {topic!r} is company-level — it has no business-unit filter")
+ scope.append(f"{s['team_col']} = ?")
+ scope_params.append(int(team_id))
+ if exclude_services and s.get("service_filter"):
+ scope.append(render_scope(s["service_filter"]))
+
+ # --- the user's narrowing, on top of the scope --------------------------------------
+ narrow, narrow_params = [], []
+ pred = _fs.compile_filter_tree(_clean_tree(filter_tree or [], cols), filter_conj, cols,
+ today=today,
+ member_ids=member_ids or None, id_sql=id_sql)
+ if pred is not None:
+ if pred.uses_aggregate: # cannot happen at grain="row"; guard anyway
+ raise ModelError(f"row-grain filter referenced an aggregate: {sorted(pred.columns_used)}")
+ narrow.append(pred.sql)
+ narrow_params.extend(pred.params)
+ spred = _fs.compile_search(search, cols)
+ if spred is not None:
+ narrow.append(spred.sql)
+ narrow_params.extend(spred.params)
+
+ frm = f"{s['table']} {alias} {s.get('join', '')}"
+ scope_where = " AND ".join(scope)
+ all_where = " AND ".join(scope + narrow)
+ con = _store_con()
+ try:
+ # 1. the WINDOW of rows
+ select = [f"{id_sql} AS _rid"] + [
+ (f"SUBSTR(CAST({c['sql']} AS VARCHAR), 1, 10) AS {k}" if c["type"] == "date"
+ else f"{c['sql']} AS {k}")
+ for k, c in cols.items()]
+ order = _fs.compile_order_by(sorts, cols, tiebreak_sql=id_sql) or f"{id_sql} ASC"
+ sql = (f"SELECT {', '.join(select)} FROM {frm} WHERE {all_where} "
+ f"ORDER BY {order} LIMIT {limit} OFFSET {offset}")
+ cur = con.execute(sql, scope_params + narrow_params)
+ names = [d[0] for d in cur.description]
+ rows = [dict(zip(names, r)) for r in cur.fetchall()]
+
+ # 2. the two counts — over the WHOLE scope, never len(rows)
+ count_sql = f"SELECT count(*) FROM {frm} WHERE {all_where}"
+ row_count = con.execute(count_sql, scope_params + narrow_params).fetchone()[0]
+ total_count = con.execute(f"SELECT count(*) FROM {frm} WHERE {scope_where}",
+ scope_params).fetchone()[0]
+
+ # 3. the aggregates — the topic's OWN metric definitions over the whole FILTERED scope
+ mts = _model()["metrics"]
+ keys = [k for k in (aggregates if aggregates is not None
+ else [k for k, m in mts.items()
+ if m.get("topic") == topic and m.get("agg") == "sum"])]
+ aggs = {}
+ if keys:
+ for k in keys:
+ if k not in mts or mts[k].get("topic") != topic:
+ raise ModelError(f"aggregate {k!r} is not a metric of topic {topic!r}")
+ agg_sql = ("SELECT " + ", ".join(f"{_measure_sql(mts[k], alias)} AS {k}" for k in keys)
+ + f" FROM {frm} WHERE {all_where}")
+ cur = con.execute(agg_sql, scope_params + narrow_params)
+ aggs = dict(zip([d[0] for d in cur.description], cur.fetchone()))
+ finally:
+ con.close()
+
+ return {
+ "topic": topic,
+ "rows": rows,
+ "columns": {k: {"type": c["type"]} for k, c in cols.items()},
+ "window": {"offset": offset, "limit": limit, "returned": len(rows)},
+ "row_count": row_count, # N — matches the filter, across the WHOLE scope
+ "total_count": total_count, # M — the unfiltered scope
+ "aggregates": aggs, # over the whole FILTERED scope, not the window
+ "sql": sql,
+ "count_sql": count_sql,
+ }
+
+
+def store_field_values(topic, dim, search=None, limit=25):
+ """Resolve real filterable values for a dim (the Analyst's get_field_values tool — fixes
+ 'NYC Florist' vs the actual record name BEFORE querying)."""
+ t = _model()["topics"].get(topic)
+ if not t or "store" not in t:
+ raise ModelError(f"topic {topic!r} has no store binding")
+ d = (t["store"].get("dims") or {}).get(dim)
+ if not d:
+ raise ModelError(f"unknown dim {dim!r} for topic {topic!r}")
+ if not d.get("name_col"):
+ raise ModelError(f"dim {dim!r} has no name column (filter by id)")
+ s = t["store"]
+ sql = (f"SELECT DISTINCT {d['col']} AS id, {d['name_col']} AS name "
+ f"FROM {s['table']} {s['alias']} {s.get('join','')} "
+ f"WHERE {render_scope(s['scope_sql'].strip())}")
+ params = []
+ if search:
+ sql += f" AND {d['name_col']} ILIKE ?"
+ params.append(f"%{search}%")
+ sql += f" ORDER BY name LIMIT {max(1, min(int(limit), 100))}"
+ con = _store_con()
+ try:
+ return [{"id": r[0], "name": r[1]} for r in con.execute(sql, params).fetchall()]
+ finally:
+ con.close()
+
+
+def store_parity(date_from=None, date_to=None):
+ """THE OM-2 gate: the store path must equal the live path to the cent, per metric per scope."""
+ import core.periods as P
+ if not date_from:
+ date_from, date_to = P.ytd()
+ out = []
+ for key in ("revenue", "margin", "units", "orders", "customers", "returns", "invoiced"):
+ m = _model()["metrics"][key]
+ # ⚠ A COMPANY-LEVEL topic is checked at company scope ONLY. `store_query` RAISES when a
+ # team is asked of a topic with no team_col, and the live builder refuses too — so
+ # looping the BUs here would fail the gate for a topic that is correct. Parity for a
+ # company-level number means company-level parity; pretending otherwise would either
+ # crash or, worse, compare two numbers that silently ignored the team.
+ _store = (_model()["topics"].get(m["topic"]) or {}).get("store") or {}
+ scopes = (None, *O.TEAM_IDS) if _store.get("team_col") else (None,)
+ for tid in scopes:
+ live = metric(key, date_from, date_to, tid)
+ res = store_query(m["topic"], [key], date_from=date_from, date_to=date_to, team_id=tid)
+ ours = res["rows"][0][key] if res["rows"] else 0
+ gap = abs((ours or 0) - (live or 0))
+ out.append({"check": f"store.{key} == live.{key} (team={tid})",
+ "ok": gap <= 0.01, "gap": round(gap, 4), "store": ours, "live": live})
+ # The agent dim (2026-07-17): store agent-filtered revenue must equal live revenue over the
+ # agent's FIRST-agent book — a fully independent path (live partner read + line-domain sum)
+ # against the store's res_partner.agent_id attribution. Largest book = the sharpest check.
+ recs = O.search_read("res.partner", [("active", "in", [True, False]),
+ ("agent_ids", "!=", False)], ["agent_ids"], limit=100000)
+ books = {}
+ for r in recs:
+ a = (r.get("agent_ids") or [None])[0]
+ if a:
+ books.setdefault(a, []).append(r["id"])
+ if books:
+ top = max(books, key=lambda k: len(books[k]))
+ live = O.sum_field("sale.order.line",
+ O.sale_line_domain(date_from, date_to, partner_ids=books[top]),
+ "price_subtotal")
+ res = store_query("sales_lines", ["revenue"], date_from=date_from, date_to=date_to,
+ filters={"agent": [top]})
+ ours = res["rows"][0]["revenue"] if res["rows"] else 0
+ gap = abs((ours or 0) - (live or 0))
+ out.append({"check": f"store.revenue[agent={top}] == live book sum (first-agent, "
+ f"{len(books[top])} customers)",
+ "ok": gap <= 0.01, "gap": round(gap, 4), "store": ours, "live": live})
+ return out
diff --git a/platform/harness/skills/__init__.py b/platform/harness/skills/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..8d59efbb28eee0df4170bf77cb4e8f15c74be80f
--- /dev/null
+++ b/platform/harness/skills/__init__.py
@@ -0,0 +1 @@
+"""Portable skills — written once against the canonical model, run on any compatible connector."""
diff --git a/platform/harness/skills/sales.py b/platform/harness/skills/sales.py
new file mode 100644
index 0000000000000000000000000000000000000000..862aed26536ac76278d720c3c597a8856c09eb42
--- /dev/null
+++ b/platform/harness/skills/sales.py
@@ -0,0 +1,168 @@
+"""Sales skill — PORTABLE. The de-Odoo'd replacement for modules/sales.py: every metric is expressed
+against the canonical model and runs on any connector with the SALES capability (INVOICING for
+returns). No model names, no `amount_untaxed`, no Odoo — the connector translates.
+
+`validate(tenant)` parity-checks each metric against the current Odoo module, so a port only replaces
+the original once it ties out to the cent (same discipline as the modules' own validate()).
+
+Date windows come from core.periods (calendar math is source-agnostic).
+"""
+from __future__ import annotations
+import sys
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[2])) # platform/
+import core.periods as P
+from harness.canonical import Capability, Entity, Query, Filter
+from harness.base import Tenant
+
+REQUIRES = (Capability.SALES,)
+
+
+# ------------------------------------------------------------------ tenant scope -> canonical filters
+def _scope(tenant: Tenant, business_unit: str | None):
+ """The client's scope CONFIG (was hard-coded Odoo constants) as canonical filters — valid on both
+ SALES_ORDER and SALES_ORDER_LINE (status/business_unit/customer exist on both)."""
+ cfg = tenant.config
+ fs = []
+ if cfg.get('confirmed_statuses'):
+ fs.append(Filter('status', 'in', list(cfg['confirmed_statuses'])))
+ bus = cfg.get('business_units') or {}
+ if business_unit and business_unit in bus:
+ fs.append(Filter('business_unit', 'in', [bus[business_unit]]))
+ elif bus:
+ fs.append(Filter('business_unit', 'in', list(bus.values())))
+ if cfg.get('excluded_customer_ids'):
+ fs.append(Filter('customer', 'not_in', list(cfg['excluded_customer_ids'])))
+ return tuple(fs)
+
+
+def _sum(conn, entity, measure, df, dt, filters):
+ return sum(r[measure] for r in conn.aggregate(
+ Query(entity, (measure,), 'sum', date_from=df, date_to=dt, filters=filters)))
+
+
+def _count(conn, entity, df, dt, filters):
+ return sum(r['count'] for r in conn.aggregate(
+ Query(entity, (), 'count', date_from=df, date_to=dt, filters=filters)))
+
+
+# ------------------------------------------------------------------ metrics (portable)
+def revenue(tenant, date_from, date_to, business_unit=None):
+ return _sum(tenant.source(Capability.SALES), Entity.SALES_ORDER, 'amount',
+ date_from, date_to, _scope(tenant, business_unit))
+
+
+def headline(tenant, business_unit=None, t=None):
+ conn = tenant.source(Capability.SALES)
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ sc = _scope(tenant, business_unit)
+ rev = _sum(conn, Entity.SALES_ORDER, 'amount', yf, yt, sc)
+ rev_ly = _sum(conn, Entity.SALES_ORDER, 'amount', lf, lt, sc)
+ orders = _count(conn, Entity.SALES_ORDER, yf, yt, sc)
+ custs = conn.distinct_count(Query(Entity.SALES_ORDER, date_from=yf, date_to=yt, filters=sc), 'customer')
+ return {'ytd_revenue': rev, 'ytd_revenue_ly': rev_ly, 'yoy_pct': P.yoy_pct(rev, rev_ly),
+ 'ytd_orders': orders, 'ytd_customers': custs, 'aov': (rev / orders) if orders else 0.0}
+
+
+def monthly_trend(tenant, n=13, business_unit=None, t=None):
+ conn = tenant.source(Capability.SALES)
+ t = t or P.today()
+ first = P.month_starts(n, t)[0][1]
+ span_from = f"{int(first[:4]) - 1:04d}{first[4:]}" # a year before the first shown month
+ q = Query(Entity.SALES_ORDER, ('amount',), 'sum', grain='month',
+ date_from=span_from, date_to=t.isoformat(), filters=_scope(tenant, business_unit))
+ m = {r['period']: r['amount'] for r in conn.aggregate(q)}
+ rows = []
+ for ym, _s, _e in P.month_starts(n, t):
+ y, mo = int(ym[:4]) - 1, int(ym[5:7])
+ this, last = m.get(ym, 0.0), m.get(f'{y:04d}-{mo:02d}', 0.0)
+ rows.append({'month': ym, 'revenue': this, 'revenue_ly': last, 'yoy_pct': P.yoy_pct(this, last)})
+ return rows
+
+
+def top_customers(tenant, limit=25, business_unit=None, t=None):
+ conn = tenant.source(Capability.SALES)
+ yf, yt = P.ytd(t or P.today())
+ q = Query(Entity.SALES_ORDER, ('amount',), 'sum', group_by=('customer',),
+ date_from=yf, date_to=yt, filters=_scope(tenant, business_unit))
+ rows = [{'pid': r['customer']['id'], 'customer': r['customer']['name'],
+ 'revenue': r['amount'], 'orders': r['count']}
+ for r in conn.aggregate(q) if r.get('customer')]
+ return sorted(rows, key=lambda x: -x['revenue'])[:limit]
+
+
+def top_skus(tenant, limit=25, business_unit=None, t=None):
+ conn = tenant.source(Capability.SALES)
+ yf, yt = P.ytd(t or P.today())
+ q = Query(Entity.SALES_ORDER_LINE, ('amount', 'qty', 'margin'), 'sum', group_by=('product',),
+ date_from=yf, date_to=yt, filters=_scope(tenant, business_unit))
+ rows = []
+ for r in conn.aggregate(q):
+ if not r.get('product'):
+ continue
+ lines = r['count'] or 0
+ rows.append({'product': r['product']['name'], 'pid': r['product']['id'], 'revenue': r['amount'],
+ 'qty': r['qty'], 'margin': r['margin'],
+ 'profit_per_order': (r['margin'] / lines) if lines else 0.0})
+ return sorted(rows, key=lambda x: -x['revenue'])[:limit]
+
+
+def by_category(tenant, limit=20, business_unit=None, t=None):
+ conn = tenant.source(Capability.SALES)
+ yf, yt = P.ytd(t or P.today())
+ q = Query(Entity.SALES_ORDER_LINE, ('amount',), 'sum', group_by=('category',),
+ date_from=yf, date_to=yt, filters=_scope(tenant, business_unit))
+ rows = [{'category': r['category'], 'revenue': r['amount']} for r in conn.aggregate(q)]
+ return sorted(rows, key=lambda x: -x['revenue'])[:limit]
+
+
+def returns_monthly(tenant, n=13, t=None):
+ """Returns (credit notes) per month — needs INVOICING, consolidated (no BU split)."""
+ conn = tenant.source(Capability.INVOICING)
+ t = t or P.today()
+ first = P.month_starts(n, t)[0][1]
+ span_from = f"{int(first[:4]) - 1:04d}{first[4:]}"
+ ex = tenant.config.get('excluded_customer_ids') or []
+ filters = [Filter('doc_type', 'eq', 'out_refund'), Filter('status', 'eq', 'posted')]
+ if ex:
+ filters.append(Filter('customer', 'not_in', list(ex)))
+ q = Query(Entity.INVOICE, ('amount',), 'sum', grain='month',
+ date_from=span_from, date_to=t.isoformat(), filters=tuple(filters))
+ m = {r['period']: -r['amount'] for r in conn.aggregate(q)} # out_refund amount is negative -> flip
+ rows = []
+ for ym, _s, _e in P.month_starts(n, t):
+ y, mo = int(ym[:4]) - 1, int(ym[5:7])
+ this, last = m.get(ym, 0.0), m.get(f'{y:04d}-{mo:02d}', 0.0)
+ rows.append({'month': ym, 'revenue': this, 'revenue_ly': last, 'yoy_pct': P.yoy_pct(this, last)})
+ return rows
+
+
+# ------------------------------------------------------------------ parity validation (port gate)
+def validate(tenant, t=None):
+ """Reconcile the ported skill to the current Odoo module — a port ships only when it ties out."""
+ import modules.sales as M
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ checks = []
+
+ def chk(name, a, b, tol=1.0):
+ checks.append({'check': name, 'a': round(a, 2), 'b': round(b, 2),
+ 'gap': round(a - b, 2), 'ok': abs(a - b) <= tol})
+
+ h, mh = headline(tenant), M.headline()
+ chk('headline YTD revenue == module', h['ytd_revenue'], mh['ytd_revenue'])
+ chk('headline YTD orders == module', h['ytd_orders'], mh['ytd_orders'])
+ chk('headline YTD customers == module', h['ytd_customers'], mh['ytd_customers'])
+ chk('Σ top_customers == module', sum(r['revenue'] for r in top_customers(tenant, 10**9)),
+ sum(r['revenue'] for r in M.top_customers(limit=10**9)))
+ chk('Σ by_category == module', sum(r['revenue'] for r in by_category(tenant, 10**9)),
+ sum(r['revenue'] for r in M.by_category(limit=10**9)))
+ chk('Σ top_skus revenue == module', sum(r['revenue'] for r in top_skus(tenant, 10**9)),
+ sum(r['revenue'] for r in M.top_skus(limit=10**9)))
+ chk('monthly_trend Σ this-yr == module', sum(r['revenue'] for r in monthly_trend(tenant)),
+ sum(r['revenue'] for r in M.monthly_trend()))
+ chk('returns_monthly Σ this-yr == module', sum(r['revenue'] for r in returns_monthly(tenant)),
+ sum(r['revenue'] for r in M.returns_monthly()))
+ return checks
diff --git a/platform/harness/tables.py b/platform/harness/tables.py
new file mode 100644
index 0000000000000000000000000000000000000000..1a59557ad10411007456c3e22231b45427c640e9
--- /dev/null
+++ b/platform/harness/tables.py
@@ -0,0 +1,129 @@
+"""harness/tables.py — a topic-backed TABLE for the grid (CG-2).
+
+The grid's first table (customers) is built from `modules.customer_data.pool()`: one row per
+customer, the whole book shipped as component args, filtered client-side. That works at 1,550
+rows and does not work at line grain — `sales_lines` is 201,558 rows / ~89 MB.
+
+This module builds the SECOND table: rows come from `semantic.store_rows`, so the fetch is
+WINDOWED and the filtering is SQL. Its whole job is to hand the grid a payload in the same
+host-neutral shape the React component already speaks, plus the one thing a windowed table must
+carry that a whole-book table never needed:
+
+ counts = {matched, total, shown, windowed}
+
+`matched` and `total` come from their own queries over the FULL scope; `shown` is the size of
+this window. The component renders "showing SHOWN of MATCHED (filtered from TOTAL)" from those
+numbers and NEVER from `rows.length` — which is the difference between an honest window and a
+silent `[:N]` wearing a total ([[no-unverifiable-aggregates]]).
+
+The field CONTRACT is derived from the topic, not hand-written: labels and types come from the
+model's dims and metrics, so a new metric cannot arrive as an untyped, unlabelled column and the
+grid can never disagree with the semantic layer about what a column means.
+"""
+from harness import semantic as _sem
+
+#: Topic-backed tables the grid can open. `key` is the storage key its saved views live under —
+#: separate from the customer table's, so the two tables' views can never collide.
+TOPIC_TABLES = {
+ "sales_lines": {
+ "label": "Sales lines",
+ "storage_key": "sales_lines_table_workspace",
+ # the columns worth defaulting to visible, in order; everything else stays available
+ "default_visible": ["date", "order_partner", "product", "category", "state", "agent",
+ "team", "revenue", "units", "margin"],
+ # a line-grain table is unusable sorted by nothing in particular
+ "default_sorts": [{"colId": "date", "dir": "desc"}],
+ },
+}
+
+#: how many rows one window carries. Small enough that the payload stays a few hundred KB at
+#: ~440 B/row, large enough to scroll. The honest counts make the window visible rather than
+#: silent, so this is a performance knob and not a correctness one.
+PAGE_ROWS = 200
+
+
+def _labels(topic):
+ """colId -> human label, taken from the MODEL (dim labels, metric labels)."""
+ t = _sem.topics()[topic]
+ out = {}
+ for key, d in ((t.get("store") or {}).get("dims") or {}).items():
+ out[key] = d.get("label") or key.replace("_", " ").title()
+ out[f"{key}_id"] = f"{out[key]} id"
+ out["date"] = "Date"
+ for k, m in _sem.metrics().items():
+ if m.get("topic") == topic:
+ out[k] = m.get("label") or k
+ return out
+
+
+def table_fields(topic):
+ """The grid field contract for a topic, derived from the semantic model.
+
+ Every column is `source='odoo'` — read-only. A line is a fact from the ERP; unlike the
+ customer table there is no overlay stratum here (notes/tags hang off a CUSTOMER, not off an
+ individual order line), so the two-strata split simply does not arise.
+ """
+ cfg = TOPIC_TABLES[topic]
+ cols = _sem.store_columns(topic, grain="row")
+ labels = _labels(topic)
+ order = [k for k in cfg["default_visible"] if k in cols]
+ order += [k for k in cols if k not in order]
+ return [{
+ "key": k,
+ "label": labels.get(k, k.replace("_", " ").title()),
+ "type": cols[k]["type"],
+ "source": "odoo",
+ "default": k in cfg["default_visible"],
+ } for k in order]
+
+
+def table_payload(topic, config=None, offset=0, limit=None, team_id=None,
+ date_from=None, date_to=None):
+ """Fetch ONE window of a topic-backed table plus its scope-wide counts and totals.
+
+ `config` is a grid ViewConfig (filters / filterConj / sorts / search) — the same shape the
+ customer table persists, so a saved view means the same thing on either table.
+
+ Returns the component payload: {fields, rows, counts, aggregates, storageKey}.
+ """
+ if topic not in TOPIC_TABLES:
+ raise _sem.ModelError(f"no topic-backed table registered for {topic!r}")
+ cfg = TOPIC_TABLES[topic]
+ config = config or {}
+ limit = PAGE_ROWS if limit is None else limit
+
+ got = _sem.store_rows(
+ topic,
+ filter_tree=config.get("filters") or [],
+ filter_conj=config.get("filterConj") or "and",
+ search=config.get("search") or None,
+ sorts=config.get("sorts") or cfg["default_sorts"],
+ member_ids=config.get("memberPids") or None,
+ limit=limit, offset=offset,
+ team_id=team_id, date_from=date_from, date_to=date_to,
+ )
+
+ rows = []
+ for i, r in enumerate(got["rows"]):
+ # `pid` is the grid's row identity contract (selection, detail, overlay all key on it).
+ # At line grain that identity is the order LINE id, which store_rows returns as _rid.
+ row = {k: v for k, v in r.items() if k != "_rid"}
+ row["pid"] = r["_rid"]
+ rows.append(row)
+
+ return {
+ "fields": table_fields(topic),
+ "rows": rows,
+ # THE honest window. `matched`/`total` are scope-wide queries; `shown` is this window.
+ # A caller must never recompute `matched` from len(rows).
+ "counts": {
+ "shown": len(rows),
+ "matched": got["row_count"],
+ "total": got["total_count"],
+ "windowed": True,
+ },
+ "aggregates": got["aggregates"], # over the whole FILTERED scope, not the window
+ "storageKey": cfg["storage_key"],
+ "label": cfg["label"],
+ "window": got["window"],
+ }
diff --git a/platform/harness/telemetry.py b/platform/harness/telemetry.py
new file mode 100644
index 0000000000000000000000000000000000000000..3925dc9828d5f3ab795d5867bb8593ba0d24bf14
--- /dev/null
+++ b/platform/harness/telemetry.py
@@ -0,0 +1,117 @@
+"""harness/telemetry.py — usage telemetry v0 (OM-3; principle 7: the improvement loop is
+structural). Append-only JSONL of what people actually do — pages opened, explore queries run,
+Analyst questions asked — the observe-half of just-in-time modeling: what's used gets promoted
+into the governed model; what's ignored gets pruned.
+
+Fail-silent by design: telemetry must never break a page or a query. Local file v0
+(data/store/usage.jsonl, tenant data, git-ignored); mined in-session for now, store-backed later.
+"""
+import json
+import sys
+import time
+import traceback
+from pathlib import Path
+
+PATH = Path(__file__).resolve().parents[1] / "data" / "store" / "usage.jsonl"
+ERR_PATH = PATH.parent / "errors.jsonl"
+
+
+def log(kind, user=None, tenant=None, **fields):
+ """Append one usage event. Never raises.
+
+ ⭢ WAVE 19 (R4): `user` and `tenant` are FIRST-CLASS PARAMETERS, not just two more `**fields`.
+ They already worked as free-form fields — the point of naming them is that attribution stops
+ being a convention each call site remembers or forgets. The Analyst's token line is the first
+ caller to pass them (`harness/analyst.py`), which is what makes "who spent these tokens, for
+ which customer?" answerable AT ALL: before this wave the log recorded a token count attached
+ to nobody.
+
+ Both are OPTIONAL and omitted from the line when absent, so a system-initiated run (the eval
+ ladder, `harness/routines.py` — neither runs on behalf of a person) writes exactly the record
+ it wrote before. A missing key is honest; `"user": null` would invite a reader to count it.
+
+ ⚠ HONEST LIMIT — this file is CONTAINER-LOCAL JSONL (`data/store/usage.jsonl`, git-ignored,
+ lost on a Space restart). Attribution starts accruing now; it is not yet a durable, queryable
+ usage ledger, which is why the per-user token PANEL stays deferred (DEBT D-8) rather than
+ being built against a log that a redeploy erases.
+ """
+ try:
+ PATH.parent.mkdir(parents=True, exist_ok=True)
+ rec = {"ts": time.strftime("%Y-%m-%d %H:%M:%S"), "kind": kind}
+ if user:
+ rec["user"] = str(user)
+ if tenant:
+ rec["tenant"] = str(tenant)
+ rec.update(fields)
+ with PATH.open("a", encoding="utf-8") as f:
+ f.write(json.dumps(rec, default=str) + "\n")
+ except Exception:
+ pass
+
+
+def error(where, exc=None, **fields):
+ """THE central error sink (owner rule 2026-07-23: ALL errors are logged). One JSONL line per
+ caught error (data/store/errors.jsonl — per-deployment, git-ignored) + a mirror line on
+ stderr so it also lands in the Space container logs. Call it from EVERY except block that
+ swallows or downgrades an exception — a failure with nowhere to land is how the app breaks
+ silently (the 2026-07-23 drawer fire). Never raises."""
+ try:
+ rec = {"ts": time.strftime("%Y-%m-%d %H:%M:%S"), "where": str(where)[:120], **fields}
+ if exc is not None:
+ rec["type"] = type(exc).__name__
+ rec["msg"] = str(exc)[:400]
+ try:
+ tb = "".join(traceback.format_exception(type(exc), exc, exc.__traceback__,
+ limit=8))
+ if tb.strip():
+ rec["trace"] = tb[-1800:]
+ except Exception:
+ pass
+ ERR_PATH.parent.mkdir(parents=True, exist_ok=True)
+ with ERR_PATH.open("a", encoding="utf-8") as f:
+ f.write(json.dumps(rec, default=str) + "\n")
+ print(f"[app-error] {rec['ts']} {rec['where']}: "
+ f"{rec.get('type', '')} {rec.get('msg', '')}", file=sys.stderr, flush=True)
+ except Exception:
+ pass
+
+
+def read_errors(limit=500):
+ """Tail of the error log (newest last) — the Data Health admin section reads this."""
+ if not ERR_PATH.exists():
+ return []
+ out = []
+ try:
+ with ERR_PATH.open(encoding="utf-8") as f:
+ for line in f:
+ try:
+ out.append(json.loads(line))
+ except json.JSONDecodeError:
+ continue
+ except Exception:
+ return out
+ return out[-limit:]
+
+
+def read(limit=5000):
+ if not PATH.exists():
+ return []
+ out = []
+ with PATH.open(encoding="utf-8") as f:
+ for line in f:
+ try:
+ out.append(json.loads(line))
+ except json.JSONDecodeError:
+ continue
+ return out[-limit:]
+
+
+def summary():
+ """Counts by kind + the most-touched pages/topics — the promote-or-prune shortlist."""
+ from collections import Counter
+ ev = read()
+ kinds = Counter(e.get("kind") for e in ev)
+ pages = Counter(e.get("page") for e in ev if e.get("kind") == "page")
+ topics = Counter(e.get("topic") for e in ev if e.get("topic"))
+ return {"events": len(ev), "by_kind": dict(kinds),
+ "top_pages": pages.most_common(10), "top_topics": topics.most_common(10)}
diff --git a/platform/harness/tenants.py b/platform/harness/tenants.py
new file mode 100644
index 0000000000000000000000000000000000000000..8ca76e27e1587d662b659fb2a2be8c520c3c3469
--- /dev/null
+++ b/platform/harness/tenants.py
@@ -0,0 +1,96 @@
+"""Tenant definitions — one entry per client of the platform.
+
+Royal Imports is the first tenant. Everything that was HARD-CODED in core/odoo.py (teams 5/6, the
+GIFTWARE house account, the sale/done statuses) moves here as per-client CONFIG. A second client is
+just another Tenant with its own connectors + config — the skills and UI don't change.
+
+In production this comes from a tenants store (DB / HF dataset), not a literal; kept literal here so
+the pivot is legible and runnable today.
+"""
+from __future__ import annotations
+from harness.base import Tenant
+from harness.canonical import Capability
+from harness.connectors.odoo import OdooConnector
+
+
+def royal_imports(doc_mode: str = 'order') -> Tenant:
+ odoo = OdooConnector(doc_mode=doc_mode)
+ return Tenant(
+ key='royal-imports', name='Royal Imports',
+ sources={odoo.key: odoo},
+ config={
+ 'business_units': {'Fisch': 5, 'Royal': 6}, # canonical BU -> Odoo team_id
+ 'confirmed_statuses': ['sale', 'done'],
+ 'excluded_customer_ids': OdooConnector.excluded_customer_ids(), # GIFTWARE house account
+ 'channels': {'Amazon': 'GIFTWARE DEALS'}, # marketplace split (see Amazon channel memory)
+ 'branding': {'navy': '#1F4E78', 'gold': '#C8A24B', 'name': 'Royal Imports'},
+ })
+
+
+class _EmptyConnector:
+ """A source that answers every canonical query with NOTHING — the X8 isolation fixture.
+
+ Deliberately NOT a mock library object and NOT a subclass shortcut around `aggregate`: the
+ isolation proof has to run against the SAME code path a real tenant uses, so this answers the
+ real interface and returns real (empty) results. A test double that skipped the interface
+ would prove the double is isolated, not that the runtime is.
+
+ An EMPTY pool is the strongest possible fixture for the assertion that matters: tenant B's
+ `/customers` must return ZERO rows. Any row at all in that response came from somewhere it
+ should not have, and there is no ambiguity about whose it is.
+ """
+ key = 'empty'
+ name = 'Empty (QA)'
+
+ def capabilities(self) -> set:
+ return set()
+
+ def aggregate(self, q) -> list[dict]:
+ return []
+
+ def records(self, q) -> list[dict]:
+ return []
+
+ def distinct_count(self, q, fieldname: str) -> int:
+ return 0
+
+ def supports(self, cap: Capability) -> bool:
+ return False
+
+ def entities(self) -> set:
+ return set()
+
+
+def qa_tenant_b() -> Tenant:
+ """Tenant 'qa-b' — the SECOND tenant the isolation proof needs, with no Odoo behind it.
+
+ D-2's assertion is "tenant B cannot reach tenant A", and that cannot be tested with one
+ tenant configured. This is the minimum second tenant: its own slug (so its own store
+ namespace and its own DuckDB path), no credentials, and a connector that returns nothing.
+
+ ⚠ NOT registered by default. `harness.runtime` only admits it when `AIOS_ENABLE_QA_TENANT=1`,
+ so a production deployment has exactly one tenant and an attacker cannot mint a session
+ against a fixture. (X8 says "the registry gains qa-b"; gating it is an additive safety
+ amendment, recorded in the S1 mailbox 2026-07-30 — the isolation MECHANISM under test, the
+ store namespace and the cookie's tenant claim, is identical either way.)
+ """
+ empty = _EmptyConnector()
+ return Tenant(
+ key='qa-b', name='QA Tenant B',
+ sources={empty.key: empty},
+ config={
+ 'business_units': {},
+ 'confirmed_statuses': [],
+ 'excluded_customer_ids': [],
+ 'channels': {},
+ 'branding': {'name': 'QA Tenant B'},
+ })
+
+
+# Example of a *different-shape* client (accounting-only), to show the harness adapts. Uncomment and
+# wire real QBO creds to light up ledger/AR/customer skills — and NOT the SKU/inventory ones.
+# def demo_qbo_client() -> Tenant:
+# from harness.connectors.quickbooks import QuickBooksConnector
+# qb = QuickBooksConnector(realm_id='...', token='...')
+# return Tenant(key='demo-qbo', name='Demo (QuickBooks)', sources={qb.key: qb},
+# config={'business_units': {}, 'confirmed_statuses': [], 'excluded_customer_ids': []})
diff --git a/platform/harness/tools.py b/platform/harness/tools.py
new file mode 100644
index 0000000000000000000000000000000000000000..18b308caaef52094d7275a949e31abadf7235d6e
--- /dev/null
+++ b/platform/harness/tools.py
@@ -0,0 +1,510 @@
+"""harness/tools.py — the compounding TOOL REGISTRY (OM-4 spine, 2026-07-11).
+
+The formal tool surface the (small) model calls — the productization directive's "tools we keep
+compounding". Every tool wraps the SEMANTIC layer (harness/semantic.py): the model navigates by
+registry keys and recipe plans (model/skills/*.skill.yml — recipes and these tools version
+TOGETHER), never by SQL. Adding a connector/topic extends what the SAME tools reach — that is the
+compounding. Exported in OpenAI function-calling format (`openai_tools()`) — OpenRouter-compatible,
+so any cheap model with tool-calling drives the platform.
+
+Correctness posture (Part VI of the plan): whitelisted keys only; values parameterized downstream;
+every query result carries a result_id + drill note; artifact tools (save/compose/schedule/alert)
+are explicit and confirm-gated by recipe. Errors return a uniform envelope the model can read.
+"""
+import json
+import time
+import uuid
+from pathlib import Path
+
+import harness.semantic as SEM
+
+VIEWS_PATH = Path(__file__).resolve().parents[1] / "data" / "store" / "views.json"
+
+_RESULTS = {} # result_id -> query result (session-scoped working memory for chart tools)
+_RESULTS_CAP = 40
+
+# The exhaustive chart vocabulary (2026-07-16): every Zelazny comparison form has a kind, so the
+# Analyst never lacks a shape. The model picks by the CHART PICKER guide (analyst.py) + the
+# charting skill recipes; the platform owns every pixel (app._render_analyst_artifact).
+CHART_KINDS = (
+ "line", "bar", "area", "scatter", "kpi", "map", # the original six
+ "pie", "donut", # part-to-whole (≤6 slices)
+ "stacked_bar", "grouped_bar", "ranked_bar", "stacked_pct", # composition / rank forms
+ "combo", "yoy_bars", # level+rate; this-vs-last-year
+ "waterfall", "pareto", "histogram", "heatmap", "treemap", # bridge / concentration / distribution
+ "funnel", "bullet", "bubble", "sparkline", # stages / target / 3-measure / mini
+)
+
+# Per-kind param contract (beyond x): what else the spec must carry to be renderable.
+_KIND_NEEDS = {
+ "combo": ("y", "y2"), "bullet": ("y", "y2"), "bubble": ("y", "size"),
+ "heatmap": ("y", "value"), "histogram": (), # histogram bins x itself
+ "stacked_bar": ("y", "series"), "grouped_bar": ("y", "series"),
+ "stacked_pct": ("y", "series"),
+}
+_QUERY_KEYS = ("topic", "measures", "group_by", "grain", "date_from", "date_to",
+ "team_id", "filters", "sort", "limit", "exclude_services")
+
+
+def _remember(res):
+ rid = uuid.uuid4().hex[:10]
+ _RESULTS[rid] = res
+ while len(_RESULTS) > _RESULTS_CAP:
+ _RESULTS.pop(next(iter(_RESULTS)))
+ return rid
+
+
+def _ok(data):
+ return {"ok": True, "data": data}
+
+
+def _err(msg):
+ return {"ok": False, "error": str(msg)[:400]}
+
+
+# ------------------------------------------------------------------ schema tools
+
+def list_topics():
+ """The 'what data exists' tool."""
+ out = []
+ for k, t in SEM.topics().items():
+ out.append({"topic": k, "label": t.get("label"), "entity": t.get("entity"),
+ "grain": t.get("grain"),
+ "dims": list((t.get("store") or {}).get("dims") or {}),
+ "metrics": [m for m, d in SEM.metrics().items() if d["topic"] == k]})
+ return out
+
+
+def describe_topic(topic):
+ """The schema-learning tool: scope, grain, dims, metrics w/ definitions, and ai_context."""
+ t = SEM.topics().get(topic)
+ if not t:
+ raise SEM.ModelError(f"unknown topic {topic!r} (use list_topics)")
+ mets = {k: {"label": m.get("label"), "description": m.get("description"),
+ "format": m.get("format"), "ai_context": m.get("ai_context")}
+ for k, m in SEM.metrics().items() if m["topic"] == topic}
+ return {"topic": topic, "label": t.get("label"), "scope": t.get("scope"),
+ "grain": t.get("grain"), "ai_context": t.get("ai_context"),
+ "dims": {k: v.get("label") for k, v in ((t.get("store") or {}).get("dims") or {}).items()},
+ "metrics": mets}
+
+
+# ------------------------------------------------------------------ query tools
+
+def run_semantic_query(topic, measures, group_by=None, grain=None, date_from=None, date_to=None,
+ team_id=None, filters=None, sort=None, limit=1000, exclude_services=False):
+ # limit defaults HIGH (1000): transforms/charts operate on the FULL result while the model
+ # only ever sees rows[:100] — a small default silently truncated per-customer analytics
+ # (the BELLA FLORIST wrong-decliner incident, 2026-07-17).
+ res = SEM.store_query(topic, measures, group_by=group_by, grain=grain, date_from=date_from,
+ date_to=date_to, team_id=team_id, filters=filters, sort=sort,
+ limit=limit, exclude_services=exclude_services)
+ # Echo the full query onto the result: chart specs built from it carry the query, so a SAVED
+ # view is a re-runnable QUERY (the OM-3 viewer re-executes it live), never a stale snapshot.
+ res["query"] = {"topic": topic, "measures": list(measures or []), "group_by": group_by,
+ "grain": grain, "date_from": date_from, "date_to": date_to, "team_id": team_id,
+ "filters": filters, "sort": sort, "limit": limit,
+ "exclude_services": exclude_services}
+ rid = _remember(res)
+ # The EFFECTIVE window, stated by the platform — the model must repeat this, never guess
+ # (a query without dates covers all recorded history; there is no hidden default window).
+ if date_from and date_to:
+ window = f"{date_from} to {date_to}"
+ elif date_from or date_to:
+ window = f"{'from ' + date_from if date_from else 'through ' + date_to}"
+ else:
+ window = "ALL recorded history (no date filter was applied)"
+ out = {"result_id": rid, "rows": res["rows"][:100], "row_count": res["row_count"],
+ "measures": res["measures"], "group_by": res["group_by"], "grain": res["grain"],
+ "window": window,
+ "note": "every number here is drillable; cite result_id when charting"}
+ if res["row_count"] >= (limit or 1000): # surface every truncation (plan hard line)
+ out["warning"] = (f"TRUNCATED: the result hit limit={limit} — the full set is larger. "
+ "Re-run with a higher limit (max 5000) BEFORE ranking, comparing or "
+ "aggregating, or your answer will be computed on a partial set.")
+ return out
+
+
+def get_field_values(topic, dim, search=None):
+ return SEM.store_field_values(topic, dim, search=search)
+
+
+# ------------------------------------------------------------------ transform tool (governed)
+
+def transform_result(result_id, transforms):
+ """Apply governed ANALYTICS TRANSFORMS to a query result -> a NEW result_id to chart/table.
+ The chain is recorded on the derived result, so saved views replay query -> transforms live."""
+ res = _RESULTS.get(result_id)
+ if not res:
+ raise SEM.ModelError(f"unknown result_id {result_id!r} — run run_semantic_query first")
+ import harness.transforms as TR
+ rows, applied = TR.apply(res, transforms, run_query=_run_query)
+ new = {**res, "rows": rows, "row_count": len(rows),
+ "transforms": (res.get("transforms") or []) + applied}
+ rid = _remember(new)
+ return {"result_id": rid, "rows": rows[:100], "row_count": len(rows),
+ "columns": sorted(rows[0]) if rows else [],
+ "note": "derived result — chart THIS result_id to show the transform"}
+
+
+def _run_query(q):
+ return SEM.store_query(**{k: q.get(k) for k in _QUERY_KEYS if q.get(k) is not None})
+
+
+# ------------------------------------------------------------------ viz tools (emit OUR specs)
+
+def make_chart(result_id, kind, x, y=None, title=None, series=None, y2=None, size=None,
+ value=None, facet=None):
+ """Returns a validated CHART SPEC the platform renders with its own primitives (design system
+ enforced — the model never emits HTML/vega). Extra encodings per kind: combo/bullet need y2
+ (line/target), bubble needs size, heatmap needs value (the colour measure); facet (a dim
+ column) turns line|bar|area|scatter into small multiples."""
+ res = _RESULTS.get(result_id)
+ if not res:
+ raise SEM.ModelError(f"unknown result_id {result_id!r} — run run_semantic_query first")
+ if kind not in CHART_KINDS:
+ raise SEM.ModelError(f"kind must be one of {CHART_KINDS}")
+ cols = set(res["rows"][0]) if res["rows"] else set()
+ if y is None and kind != "histogram":
+ raise SEM.ModelError(f"kind={kind!r} needs y (only histogram bins x by itself)")
+ for ref, nm in ((x, "x"), (y, "y"), (series, "series"), (y2, "y2"), (size, "size"),
+ (value, "value"), (facet, "facet")):
+ if ref and ref not in cols:
+ raise SEM.ModelError(f"{nm}={ref!r} not in result columns {sorted(cols)}")
+ given = {"y": y, "y2": y2, "size": size, "value": value, "series": series}
+ missing = [p for p in _KIND_NEEDS.get(kind, ()) if not given.get(p)]
+ if missing:
+ raise SEM.ModelError(f"kind={kind!r} also needs {missing} "
+ f"(pick from result columns {sorted(cols)})")
+ if facet and kind not in ("line", "bar", "area", "scatter"):
+ raise SEM.ModelError("facet (small multiples) works with line|bar|area|scatter only")
+ if kind == "yoy_bars" and f"{y}_ly" not in cols:
+ raise SEM.ModelError(f"yoy_bars needs a {y}_ly column — run transform_result "
+ "[{'op':'yoy'}] on the result first")
+ spec = {"kind": kind, "x": x, "y": y, "series": series,
+ "title": title or f"{y or x} by {x}", "result_id": result_id,
+ "query": res.get("query"), "rows": res["rows"]}
+ for k, v in (("y2", y2), ("size", size), ("value", value), ("facet", facet),
+ ("transforms", res.get("transforms"))):
+ if v:
+ spec[k] = v
+ out = {"chart": spec}
+ if kind in ("pie", "donut") and len(res["rows"]) > 6:
+ out["note"] = (f"{len(res['rows'])} slices — the platform will show the top 5 plus an "
+ "'Other' bucket; for a cleaner story run transform_result top_n first")
+ return out
+
+
+def make_table(result_id, columns=None, title=None):
+ """First-class TABLE artifact: the exact rows, house-formatted (sortable, totals row, the
+ drill IS the table). columns (optional) picks and orders a subset."""
+ res = _RESULTS.get(result_id)
+ if not res:
+ raise SEM.ModelError(f"unknown result_id {result_id!r} — run run_semantic_query first")
+ rows = res["rows"]
+ if columns:
+ cols = set(rows[0]) if rows else set()
+ bad = [c for c in columns if c not in cols]
+ if bad:
+ raise SEM.ModelError(f"columns {bad} not in result columns {sorted(cols)}")
+ rows = [{c: r.get(c) for c in columns} for r in rows]
+ return {"table": {"kind": "table", "title": title, "columns": columns,
+ "result_id": result_id, "query": res.get("query"),
+ "transforms": res.get("transforms"), "rows": rows}}
+
+
+def make_kpi_card(result_id, metric, compare_result_id=None):
+ res = _RESULTS.get(result_id)
+ if not res or not res["rows"]:
+ raise SEM.ModelError("result_id missing/empty — run a scalar run_semantic_query first")
+ val = res["rows"][0].get(metric)
+ if val is None:
+ raise SEM.ModelError(f"{metric!r} not in result")
+ card = {"kpi": {"metric": metric, "value": val, "result_id": result_id,
+ "query": res.get("query")}}
+ if compare_result_id and _RESULTS.get(compare_result_id, {}).get("rows"):
+ prev = _RESULTS[compare_result_id]["rows"][0].get(metric)
+ if prev:
+ card["kpi"]["delta_pct"] = (val - prev) / abs(prev)
+ card["kpi"]["compare_result_id"] = compare_result_id
+ card["kpi"]["compare_query"] = _RESULTS[compare_result_id].get("query")
+ return card
+
+
+# ------------------------------------------------------------------ artifact tools (v0: local)
+
+def _load_views():
+ if VIEWS_PATH.exists():
+ return json.loads(VIEWS_PATH.read_text(encoding="utf-8"))
+ return {"views": {}, "dashboards": {}}
+
+
+def _save_views(d):
+ VIEWS_PATH.parent.mkdir(parents=True, exist_ok=True)
+ VIEWS_PATH.write_text(json.dumps(d, indent=1), encoding="utf-8")
+
+
+def save_view(name, chart):
+ """Persist a chart/KPI spec (from make_chart / make_kpi_card) as a named view. Specs persist
+ WITH their semantic query and WITHOUT rows — the OM-3 viewer re-executes the query live, so a
+ saved view is always current, never a snapshot."""
+ d = _load_views()
+ spec = chart.get("chart") or chart.get("kpi") or chart.get("table") or chart
+ spec = {k: v for k, v in spec.items() if k != "rows"}
+ if "kpi" in chart and not spec.get("kind"):
+ spec["kind"] = "kpi"
+ if "table" in chart and not spec.get("kind"):
+ spec["kind"] = "table"
+ if not spec.get("query"):
+ raise SEM.ModelError("spec carries no query — pass the exact object returned by "
+ "make_chart / make_kpi_card (from a fresh run_semantic_query)")
+ d["views"][name] = {"chart": spec, "saved_at": time.strftime("%Y-%m-%d %H:%M")}
+ _save_views(d)
+ return {"saved": name, "views": list(d["views"])}
+
+
+def compose_dashboard(name, views):
+ """'Spawn a dashboard': compose saved views into a named dashboard spec (rendered at OM-3)."""
+ d = _load_views()
+ missing = [v for v in views if v not in d["views"]]
+ if missing:
+ raise SEM.ModelError(f"unknown views {missing} — save_view them first")
+ d["dashboards"][name] = {"views": views, "created_at": time.strftime("%Y-%m-%d %H:%M")}
+ _save_views(d)
+ return {"dashboard": name, "views": views}
+
+
+# ------------------------------------------------------------------ the GAP LOOP (rung 4)
+
+GAP_KINDS = ("dimension", "metric", "transform", "chart_kind", "data_source", "other")
+GAPS_KEY = "analyst_gaps"
+GAPS_CAP = 500
+
+
+def report_gap(kind, missing, question, workaround=None):
+ """Log a CAPABILITY GAP: the model determined (after checking the schema) that no registered
+ dim/metric/transform/kind can answer. The entry lands in telemetry AND the durable store —
+ the admin Gaps view aggregates them into the platform build backlog. This is how every
+ honest 'I can't' becomes the next dim, transform, or recipe."""
+ if kind not in GAP_KINDS:
+ raise SEM.ModelError(f"kind must be one of {GAP_KINDS}")
+ entry = {"ts": time.strftime("%Y-%m-%d %H:%M:%S"), "kind": kind,
+ "missing": str(missing)[:120], "question": str(question)[:300],
+ "workaround": (str(workaround)[:200] if workaround else None)}
+ import harness.telemetry as TEL
+ TEL.log("analyst_gap", **{("gap_kind" if k == "kind" else k): v for k, v in entry.items()})
+ try: # durable copy — async, the chatlog write posture
+ import threading
+
+ import core.store as store
+ if store.available():
+ def _fn(data):
+ data = list(data or [])
+ data.append(entry)
+ return data[-GAPS_CAP:]
+ threading.Thread(target=lambda: store.update(GAPS_KEY, _fn),
+ daemon=True, name="analyst-gap").start()
+ except Exception:
+ pass
+ return {"logged": True,
+ "note": "gap recorded for the platform backlog — now tell the user in ONE sentence "
+ "what is missing and offer the nearest ask that IS answerable"}
+
+
+# ------------------------------------------------------------------ workspace tools (OM-3/P11)
+
+def list_workspace():
+ """Everything in the tenant workspace (uniform modular objects) + available templates."""
+ import harness.workspace as W
+ return {"objects": W.items(), "templates": W.templates()}
+
+
+def instantiate_template(filename, new_name=None):
+ """Stamp a tenant-agnostic template into this workspace as NEW objects (never overwrites)."""
+ import harness.workspace as W
+ return W.instantiate_template(filename, new_name)
+
+
+def update_view(name, changes):
+ """Patch an existing view (spec and/or query) — validated by re-execution before saving."""
+ import harness.views as V
+ return V.update_view(name, changes)
+
+
+def update_workbook(name, views=None, new_name=None):
+ """Recompose and/or rename a workbook (dashboard); renames follow into schedules."""
+ import harness.views as V
+ return V.update_dashboard(name, views_list=views, new_name=new_name)
+
+
+def delete_object(kind, name):
+ """Delete any workspace object. DESTRUCTIVE — the recipe requires explicit confirmation."""
+ import harness.workspace as W
+ W.delete(kind, name)
+ return {"deleted": f"{kind} · {name}"}
+
+
+# ------------------------------------------------------------------ registry + dispatch
+
+def _p(props, required):
+ return {"type": "object", "properties": props, "required": required}
+
+
+TOOLS = {
+ "list_topics": {"fn": lambda **kw: list_topics(),
+ "description": "List the datasets (topics) available: their metrics, dims, and grain. Start here.",
+ "parameters": _p({}, [])},
+ "describe_topic": {"fn": lambda **kw: describe_topic(kw["topic"]),
+ "description": "Full schema of one topic: scope rules, metric definitions, dims, and the business context you must respect.",
+ "parameters": _p({"topic": {"type": "string"}}, ["topic"])},
+ "get_field_values": {"fn": lambda **kw: get_field_values(kw["topic"], kw["dim"], kw.get("search")),
+ "description": "Resolve real filter values (ids+names) for a dim. ALWAYS use before filtering by a typed name.",
+ "parameters": _p({"topic": {"type": "string"}, "dim": {"type": "string"},
+ "search": {"type": "string"}}, ["topic", "dim"])},
+ "run_semantic_query": {"fn": lambda **kw: run_semantic_query(**kw),
+ "description": "Run a governed query: registered measures over a topic, optional group_by dims / time grain / filters. The ONLY way to read data.",
+ "parameters": _p({"topic": {"type": "string"},
+ "measures": {"type": "array", "items": {"type": "string"}},
+ "group_by": {"type": "array", "items": {"type": "string"}},
+ "grain": {"type": "string", "enum": ["month", "week", "day"]},
+ "date_from": {"type": "string"}, "date_to": {"type": "string"},
+ "team_id": {"type": "integer"},
+ "filters": {"type": "object"},
+ "sort": {"type": "string"}, "limit": {"type": "integer"},
+ "exclude_services": {"type": "boolean"}},
+ ["topic", "measures"])},
+ "transform_result": {"fn": lambda **kw: transform_result(kw["result_id"], kw["transforms"]),
+ "description": "Apply governed analytics transforms to a result -> a NEW result_id (a "
+ "CHAINABLE list of {op, ...}). The Tableau-class analytics library — pick "
+ "op names (full catalog + recipes in the analytics skill). Families: "
+ "ordering/rank (sort, head, bottom_n, rank, rank_pct, ntile, top_n, "
+ "add_total) · part-to-whole (share_of_total, cum_share) · running/moving "
+ "(running_total/avg/max/min, running_count, moving_average/sum/median, "
+ "rolling_std) · period-over-period (diff, pct_change, lag, lead, "
+ "diff_from_first, index_to_100, percent_of_max, compare) · distribution/"
+ "stats (bin, describe, zscore, outliers, winsorize, clip, normalize, "
+ "correlate, weighted_average, safe_ratio, product) · business (abc_classify, "
+ "concentration, contribution_to_change, rfm, funnel_rates) · modeling "
+ "(trend_line, regression, cagr, growth_rate) · reference lines as columns "
+ "(reference_line, reference_band, target_line, xmr_limits) · reshape (pivot, "
+ "unpivot, filter_rows, dedupe, resample) · re-query windows (yoy, ytd, "
+ "rolling, forecast). ADDITIVITY LAW: accumulating ops "
+ "(running_total/share_of_total/cum_share/moving_sum/abc_classify/"
+ "concentration) work on ADDITIVE measures (revenue/units/margin/orders); "
+ "for a cumulative/trailing DISTINCT count (customers) or ratio use ytd/"
+ "rolling (they re-query) — never running_total. NEVER compute any of these "
+ "yourself; transform, then chart/table the new result_id.",
+ "parameters": _p({"result_id": {"type": "string"},
+ "transforms": {"type": "array", "items": {"type": "object"}}},
+ ["result_id", "transforms"])},
+ "make_chart": {"fn": lambda **kw: make_chart(**kw),
+ "description": "Turn a query result into a platform chart. kinds: line|bar|area|scatter|"
+ "map|pie|donut|stacked_bar|grouped_bar|ranked_bar|stacked_pct|combo|"
+ "yoy_bars|waterfall|pareto|histogram|heatmap|treemap|funnel|bullet|bubble|"
+ "sparkline. x/y/series must be result columns. Extra encodings: combo "
+ "(bars y + line y2, dual axis), bullet (value y vs target y2), bubble "
+ "(scatter + size), heatmap (dims x,y + colour value), histogram (bins x, "
+ "no y), facet (a dim column -> small multiples of line|bar|area|scatter). "
+ "yoy_bars needs the yoy transform first. kind='map' plots customers "
+ "geographically: x = the customer dim, dot size = y.",
+ "parameters": _p({"result_id": {"type": "string"}, "kind": {"type": "string", "enum": list(CHART_KINDS)},
+ "x": {"type": "string"}, "y": {"type": "string"},
+ "title": {"type": "string"}, "series": {"type": "string"},
+ "y2": {"type": "string"}, "size": {"type": "string"},
+ "value": {"type": "string"}, "facet": {"type": "string"}},
+ ["result_id", "kind", "x"])},
+ "make_table": {"fn": lambda **kw: make_table(kw["result_id"], kw.get("columns"),
+ kw.get("title")),
+ "description": "Turn a query result into a first-class TABLE artifact (house-formatted, "
+ "totals row, drillable). Use when the user wants exact figures, many "
+ "columns, or a list — not a shape. columns (optional) picks and orders.",
+ "parameters": _p({"result_id": {"type": "string"},
+ "columns": {"type": "array", "items": {"type": "string"}},
+ "title": {"type": "string"}}, ["result_id"])},
+ "make_kpi_card": {"fn": lambda **kw: make_kpi_card(**kw),
+ "description": "Turn a scalar query result into a KPI card; optional compare_result_id adds a YoY delta.",
+ "parameters": _p({"result_id": {"type": "string"}, "metric": {"type": "string"},
+ "compare_result_id": {"type": "string"}}, ["result_id", "metric"])},
+ "report_gap": {"fn": lambda **kw: report_gap(kw["kind"], kw["missing"], kw["question"],
+ kw.get("workaround")),
+ "description": "LAST RESORT — log a capability gap. Call ONLY after list_topics/"
+ "describe_topic confirm that NO registered dimension, metric, transform "
+ "or chart kind can answer the user's question (e.g. stock on hand, "
+ "which has no topic). NOT a gap: YoY/decline/growth compares "
+ "(transform_result yoy), rankings/top-N, shares, running totals, "
+ "distributions — those are ANSWERABLE via transform_result. Then tell "
+ "the user plainly what is missing and offer the nearest answerable ask. "
+ "NEVER call this for something the tools support, and NEVER guess "
+ "instead of calling it.",
+ "parameters": _p({"kind": {"type": "string", "enum": list(GAP_KINDS)},
+ "missing": {"type": "string",
+ "description": "what does not exist, short (e.g. 'inventory/stock-on-hand topic')"},
+ "question": {"type": "string",
+ "description": "the user's question, verbatim"},
+ "workaround": {"type": "string",
+ "description": "the nearest answerable alternative you offered"}},
+ ["kind", "missing", "question"])},
+ "save_view": {"fn": lambda **kw: save_view(kw["name"], kw["chart"]),
+ "description": "Save a chart as a named view (confirm with the user first).",
+ "parameters": _p({"name": {"type": "string"}, "chart": {"type": "object"}}, ["name", "chart"])},
+ "compose_dashboard": {"fn": lambda **kw: compose_dashboard(kw["name"], kw["views"]),
+ "description": "Compose saved views into a named dashboard (confirm with the user first).",
+ "parameters": _p({"name": {"type": "string"},
+ "views": {"type": "array", "items": {"type": "string"}}}, ["name", "views"])},
+ "list_workspace": {"fn": lambda **kw: list_workspace(),
+ "description": "List the tenant workspace: every saved view/dashboard/alert/report "
+ "(modular objects) plus available templates. Use when the user asks what "
+ "exists, wants to reuse/manage artifacts, or before composing.",
+ "parameters": _p({}, [])},
+ "instantiate_template": {"fn": lambda **kw: instantiate_template(kw["filename"],
+ kw.get("new_name")),
+ "description": "Stamp a tenant-agnostic template (from list_workspace) into the "
+ "workspace as NEW objects — never overwrites. Confirm with the user first.",
+ "parameters": _p({"filename": {"type": "string"}, "new_name": {"type": "string"}},
+ ["filename"])},
+ "update_view": {"fn": lambda **kw: update_view(kw["name"], kw.get("changes")),
+ "description": "UPDATE an existing saved view: patch spec keys (title/kind/x/y/series) "
+ "and/or 'query' subkeys (measures, group_by, grain, date_from, date_to, "
+ "team_id, filters, sort, limit; null REMOVES a key). The patched query is "
+ "re-executed before saving — invalid updates are rejected. Confirm first.",
+ "parameters": _p({"name": {"type": "string"}, "changes": {"type": "object"}},
+ ["name", "changes"])},
+ "update_workbook": {"fn": lambda **kw: update_workbook(kw["name"], kw.get("views"),
+ kw.get("new_name")),
+ "description": "UPDATE a workbook (dashboard): recompose its views (list = new display "
+ "order; add/remove by including/omitting) and/or rename it. Confirm first.",
+ "parameters": _p({"name": {"type": "string"},
+ "views": {"type": "array", "items": {"type": "string"}},
+ "new_name": {"type": "string"}}, ["name"])},
+ "delete_object": {"fn": lambda **kw: delete_object(kw["kind"], kw["name"]),
+ "description": "DELETE a workspace object (view|dashboard|alert|report). DESTRUCTIVE — "
+ "requires the user's explicit confirmation in this conversation first.",
+ "parameters": _p({"kind": {"type": "string",
+ "enum": ["view", "dashboard", "alert", "report"]},
+ "name": {"type": "string"}}, ["kind", "name"])},
+}
+
+
+def openai_tools():
+ """The registry in OpenAI function-calling format (OpenRouter-compatible)."""
+ return [{"type": "function",
+ "function": {"name": k, "description": v["description"], "parameters": v["parameters"]}}
+ for k, v in TOOLS.items()]
+
+
+def dispatch(name, arguments):
+ """Uniform tool execution for the Analyst loop: JSON-safe result or a readable error the
+ model can act on. Never raises."""
+ t = TOOLS.get(name)
+ if not t:
+ return _err(f"unknown tool {name!r} (tools: {list(TOOLS)})")
+ try:
+ args = json.loads(arguments) if isinstance(arguments, str) else dict(arguments or {})
+ missing = [r for r in t["parameters"].get("required", []) if r not in args]
+ if missing:
+ return _err(f"missing required arguments: {missing}")
+ return _ok(t["fn"](**args))
+ except SEM.ModelError as e:
+ return _err(e)
+ except Exception as e:
+ return _err(f"{type(e).__name__}: {e}")
diff --git a/platform/harness/transforms.py b/platform/harness/transforms.py
new file mode 100644
index 0000000000000000000000000000000000000000..a3a133b8e3c75a2590596a38fa87acac79855bb1
--- /dev/null
+++ b/platform/harness/transforms.py
@@ -0,0 +1,1287 @@
+"""harness/transforms.py — governed ANALYTICS TRANSFORMS over query results (OM-4).
+
+The model never touches SQL or raw math: it requests named transforms on a result_id
+(tools.transform_result) and the platform computes them here, deterministically, over the exact
+rows the governed query returned. The chain is RECORDED on the derived result ("transforms"), so
+a saved view replays query -> transforms at render time (harness/views.run_view) and stays live.
+
+This is the AIOS Analyst's TABLE-CALCULATION + ANALYTICS library — the open-source Tableau-class
+capability set (Tableau table calcs + Analytics pane, Power BI DAX quick measures, pandas/polars
+window ops, scipy/statsmodels stats) mapped onto ONE governed dispatcher. Grounding brief:
+.claude/wiki/research/analytics-tools.md. Design laws (2026-07-18):
+
+ 1. ONE tool, many ops. Every capability is a pure function rows->rows (or rows->summary) in the
+ OPS registry, dispatched through tools.transform_result — so the small model's prompt carries
+ ONE tool + a skill file, never 50 signatures. Ops CHAIN.
+ 2. ADDITIVITY IS LAW (no-unverifiable-aggregates). Additivity comes from the metric's `agg` in
+ the semantic model, NOT the column name: sum/count are additive; count_distinct and ratio are
+ NOT. Accumulating ops (running_total, cum_share, share_of_total, moving_sum) REFUSE a known
+ non-additive measure with a readable error; collapse ops (top_n's Other, add_total, pivot)
+ land it as None, never a fabricated sum. A cumulative/rolling DISTINCT count must re-run the
+ governed query per widening window (the ytd/rolling ops) — never sum displayed values.
+ 3. RE-AGGREGATION belongs in the QUERY, not here. Transforms are row-wise / window / reshape.
+ To regroup or re-aggregate, run a new run_semantic_query with a different group_by — that keeps
+ the parity proof. pivot is a pure RESHAPE (collision -> error, never a hidden sum).
+ 4. NO black-box models. Trend/forecast are transparent least-squares / seasonal-naive, fully
+ hand-computable and unit-tested; we do not pull in Prophet/Merlion/k-means (our own AVOID
+ briefs). Every op has a hand-computed unit test (_demo_analytics.py) — that suite is the ship
+ gate, not the provider-flaky eval gate.
+ 5. Reference/trend/forecast LINES are delivered as ADDED COLUMNS and drawn with the existing
+ combo/line chart kinds — the renderer stays untouched.
+"""
+import ast
+import datetime as dt
+import math
+
+import harness.semantic as SEM
+
+
+# ================================================================== additivity (law #2)
+
+# Column-name suffixes that are inherently non-additive regardless of the base metric (ratios,
+# indices, standardized/derived series that must never be re-summed).
+_NON_ADDITIVE_SUFFIXES = (
+ "_pct", "_ratio", "_share", "_share_pct", "_yoy_pct", "_cum_pct", "_pct_change",
+ "_pct_of_max", "_rank_pct", "_zscore", "_norm", "_idx", "_index100", "_wavg",
+ "_running_avg", "_ref", "_band_lo", "_band_hi", "_trend", "_ytd",
+)
+_NON_ADDITIVE_NAMES = {"aov", "margin_pct"}
+_INHERIT_SUFFIXES = ("_ly", "_delta") # _ly / _delta inherit 's additivity
+
+
+def _metric_agg(key):
+ try:
+ m = SEM.metrics().get(key)
+ except Exception:
+ m = None
+ return m.get("agg") if m else None
+
+
+def _base_metric(col):
+ base = col
+ for suf in _INHERIT_SUFFIXES:
+ if base.endswith(suf):
+ return base[: -len(suf)]
+ return base
+
+
+def known_non_additive(col):
+ """True when we KNOW a column must not be summed across rows/groups: a non-additive suffix,
+ a registered ratio/count_distinct metric, or a ratio/count_distinct-derived _ly/_delta. Unknown
+ numeric columns default to additive (we only block what we can prove wrong)."""
+ if col.endswith(_NON_ADDITIVE_SUFFIXES) or col.endswith("_z") or col in _NON_ADDITIVE_NAMES:
+ return True
+ return _metric_agg(_base_metric(col)) in ("count_distinct", "ratio")
+
+
+def _is_additive(col):
+ return not known_non_additive(col)
+
+
+# ================================================================== small helpers
+
+def _numeric(v):
+ return isinstance(v, (int, float)) and not isinstance(v, bool)
+
+
+def _num_cols(rows):
+ return [k for k in (rows[0] if rows else {}) if any(_numeric(r.get(k)) for r in rows)]
+
+
+def _text_cols(rows):
+ nums = set(_num_cols(rows))
+ return [k for k in (rows[0] if rows else {}) if k not in nums]
+
+
+def _need_col(rows, col, what):
+ if not rows:
+ raise SEM.ModelError("cannot transform an empty result")
+ if col not in rows[0]:
+ raise SEM.ModelError(f"{what}={col!r} not in result columns {sorted(rows[0])}")
+
+
+def _need_additive(rows, of, op):
+ _need_col(rows, of, "of")
+ if known_non_additive(of):
+ raise SEM.ModelError(
+ f"{op} sums {of!r} across rows, but {of!r} is a distinct-count or ratio measure and is "
+ f"NOT additive — summing it would over-count. For a cumulative/rolling distinct count "
+ f"use the 'ytd' or 'rolling' op (they re-run the query per window); otherwise pick an "
+ f"additive measure (revenue, units, margin, orders, cogs).")
+
+
+def _vals(rows, col):
+ return [r.get(col) for r in rows if _numeric(r.get(col))]
+
+
+def _mean(v):
+ return (sum(v) / len(v)) if v else None
+
+
+def _median(v):
+ s = sorted(v)
+ n = len(s)
+ if not n:
+ return None
+ return s[n // 2] if n % 2 else (s[n // 2 - 1] + s[n // 2]) / 2.0
+
+
+def _std(v):
+ """Sample standard deviation (ddof=1); None for n<2."""
+ n = len(v)
+ if n < 2:
+ return None
+ m = sum(v) / n
+ return math.sqrt(sum((x - m) ** 2 for x in v) / (n - 1))
+
+
+def _percentile(v, p):
+ """Linear-interpolation percentile, p in [0,100] (the numpy 'linear' method)."""
+ s = sorted(v)
+ n = len(s)
+ if not n:
+ return None
+ if n == 1:
+ return float(s[0])
+ k = (n - 1) * (p / 100.0)
+ lo = math.floor(k)
+ hi = math.ceil(k)
+ if lo == hi:
+ return float(s[int(k)])
+ return s[lo] + (s[hi] - s[lo]) * (k - lo)
+
+
+# ================================================================== ordering / rank
+
+def sort_rows(rows, by, direction="desc"):
+ """Sort rows by a column, Nones last either way; works for numeric and text columns."""
+ _need_col(rows, by, "by")
+ present = [r for r in rows if r.get(by) is not None]
+ absent = [r for r in rows if r.get(by) is None]
+ return sorted(present, key=lambda r: r[by], reverse=(direction != "asc")) + absent
+
+
+def head(rows, n=20):
+ """Keep the FIRST n rows in the current order — pairs with sort for 'most negative first'
+ asks, where top_n (largest-by-value) is the wrong shape."""
+ return rows[: max(1, min(int(n or 20), 500))]
+
+
+def bottom_n(rows, by, n=10):
+ """The N SMALLEST rows by `by` (sort ascending + take N) — Tableau's 'Bottom N'."""
+ _need_col(rows, by, "by")
+ return sort_rows(rows, by, "asc")[: max(1, min(int(n or 10), 500))]
+
+
+def rank_rows(rows, by, direction="desc", out="rank"):
+ """Sort by `by` and add a 1-based rank column (ties keep row order — 'first' method)."""
+ ordered = sort_rows(rows, by, direction)
+ return [{**r, out: i + 1} for i, r in enumerate(ordered)]
+
+
+def rank_pct(rows, by, direction="desc", out="rank_pct"):
+ """Percentile rank (0-100): position among the rows after sorting by `by`. Top row = 100
+ (desc) — 'this row beats X% of the rest'."""
+ ordered = sort_rows(rows, by, direction)
+ n = len([r for r in ordered if r.get(by) is not None])
+ res = []
+ for i, r in enumerate(ordered):
+ pr = (100.0 * (n - 1 - i) / (n - 1)) if (n > 1 and r.get(by) is not None) else (
+ 100.0 if r.get(by) is not None else None)
+ res.append({**r, out: pr})
+ return res
+
+
+def ntile(rows, by, tiles=4, direction="asc", out="ntile"):
+ """Assign each row to one of `tiles` equal-count buckets by `by` (quartile=4, decile=10).
+ direction='asc' -> tile 1 is the smallest values (Tableau/pandas qcut convention)."""
+ _need_col(rows, by, "by")
+ tiles = max(2, min(int(tiles or 4), 100))
+ ordered = sort_rows(rows, by, direction)
+ present = [r for r in ordered if r.get(by) is not None]
+ n = len(present)
+ res = []
+ for i, r in enumerate(ordered):
+ if r.get(by) is None:
+ res.append({**r, out: None})
+ else:
+ res.append({**r, out: min(tiles, int(i * tiles / n) + 1)})
+ return res
+
+
+# ================================================================== top-N / composition
+
+def top_n(rows, by, n=10, other=True, other_label="Other"):
+ """Keep the N largest rows by `by`; the rest collapse into ONE labelled bucket (additive
+ columns summed, non-additive columns None — never a fake average). other=False just truncates,
+ and the caller must surface the cut (the tool notes it)."""
+ _need_col(rows, by, "by")
+ n = max(1, min(int(n or 10), 500))
+ ordered = sort_rows(rows, by, "desc")
+ head_rows, tail = ordered[:n], ordered[n:]
+ if not tail or not other:
+ return head_rows
+ bucket = _collapse(rows, tail, f"{other_label} ({len(tail)})")
+ return head_rows + [bucket]
+
+
+def add_total(rows, label="Total"):
+ """Append a grand-total row: additive columns summed, non-additive columns None (honest),
+ the first text column = `label`. Same discipline as make_table's totals row, but in-data so a
+ chart can show it."""
+ if not rows:
+ raise SEM.ModelError("cannot total an empty result")
+ return rows + [_collapse(rows, rows, label)]
+
+
+def _collapse(all_rows, subset, label):
+ bucket = {}
+ for k in all_rows[0]:
+ vals = [t.get(k) for t in subset if _numeric(t.get(k))]
+ if vals and _is_additive(k):
+ bucket[k] = sum(vals)
+ elif vals:
+ bucket[k] = None
+ else:
+ bucket[k] = ""
+ texts = _text_cols(all_rows)
+ if texts:
+ bucket[texts[0]] = label
+ return bucket
+
+
+# ================================================================== part-to-whole / cumulative
+
+def share_of_total(rows, of, out=None):
+ """Add `_share_pct` (0-100): each row's share of the column total across THESE rows."""
+ _need_additive(rows, of, "share_of_total")
+ out = out or f"{of}_share_pct"
+ total = sum(r.get(of) or 0 for r in rows)
+ return [{**r, out: (100.0 * (r.get(of) or 0) / total) if total else None} for r in rows]
+
+
+def cum_share(rows, of, out=None):
+ """Pareto prep: sort desc by `of`, add cumulative share % (0-100). The 'top X carry Y%' read."""
+ _need_additive(rows, of, "cum_share")
+ out = out or f"{of}_cum_pct"
+ ordered = sort_rows(rows, of, "desc")
+ total = sum(r.get(of) or 0 for r in ordered)
+ run, res = 0.0, []
+ for r in ordered:
+ run += r.get(of) or 0
+ res.append({**r, out: (100.0 * run / total) if total else None})
+ return res
+
+
+# ================================================================== running / moving (window)
+
+def running_total(rows, of, out=None):
+ """Add `_running`: cumulative sum in the rows' current order (sort first if needed)."""
+ _need_additive(rows, of, "running_total")
+ out = out or f"{of}_running"
+ run, res = 0.0, []
+ for r in rows:
+ run += r.get(of) or 0
+ res.append({**r, out: run})
+ return res
+
+
+def running_avg(rows, of, out=None):
+ """Add `_running_avg`: expanding (cumulative) mean in row order — a smoothing, valid on
+ any numeric column (it never claims a total)."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_running_avg"
+ tot, cnt, res = 0.0, 0, []
+ for r in rows:
+ v = r.get(of)
+ if _numeric(v):
+ tot += v
+ cnt += 1
+ res.append({**r, out: (tot / cnt) if cnt else None})
+ return res
+
+
+def running_extreme(rows, of, kind="max", out=None):
+ """Add `_running_max` / `_running_min`: the cumulative max/min so far, in row order."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_running_{kind}"
+ best, res = None, []
+ for r in rows:
+ v = r.get(of)
+ if _numeric(v):
+ best = v if best is None else (max(best, v) if kind == "max" else min(best, v))
+ res.append({**r, out: best})
+ return res
+
+
+def moving_average(rows, of, window=3, out=None):
+ """Add `_ma`: trailing moving average in row order; the first window-1 rows get
+ None (a partial-window average reads as a level change and lies). A smoothing — any numeric."""
+ _need_col(rows, of, "of")
+ window = max(2, min(int(window or 3), 24))
+ out = out or f"{of}_ma{window}"
+ vals = [r.get(of) or 0 for r in rows]
+ res = []
+ for i, r in enumerate(rows):
+ ma = sum(vals[i - window + 1:i + 1]) / window if i >= window - 1 else None
+ res.append({**r, out: ma})
+ return res
+
+
+def moving_sum(rows, of, window=3, out=None):
+ """Add `_msum`: trailing moving SUM (additive measures only) — the first window-1
+ rows get None."""
+ _need_additive(rows, of, "moving_sum")
+ window = max(2, min(int(window or 3), 24))
+ out = out or f"{of}_msum{window}"
+ vals = [r.get(of) or 0 for r in rows]
+ res = []
+ for i, r in enumerate(rows):
+ ms = sum(vals[i - window + 1:i + 1]) if i >= window - 1 else None
+ res.append({**r, out: ms})
+ return res
+
+
+def moving_median(rows, of, window=3, out=None):
+ """Add `_mmed`: trailing moving MEDIAN (robust smoothing; outlier-resistant)."""
+ _need_col(rows, of, "of")
+ window = max(2, min(int(window or 3), 24))
+ out = out or f"{of}_mmed{window}"
+ res = []
+ for i, r in enumerate(rows):
+ if i >= window - 1:
+ win = [rows[j].get(of) for j in range(i - window + 1, i + 1) if _numeric(rows[j].get(of))]
+ res.append({**r, out: _median(win) if win else None})
+ else:
+ res.append({**r, out: None})
+ return res
+
+
+def rolling_std(rows, of, window=3, out=None):
+ """Add `_rstd`: trailing-window SAMPLE standard deviation — demand/sales
+ VOLATILITY over time (feeds control-limit / safety-stock work). First window-1 rows None."""
+ _need_col(rows, of, "of")
+ window = max(2, min(int(window or 3), 24))
+ out = out or f"{of}_rstd{window}"
+ res = []
+ for i, r in enumerate(rows):
+ if i >= window - 1:
+ win = [rows[j].get(of) for j in range(i - window + 1, i + 1) if _numeric(rows[j].get(of))]
+ res.append({**r, out: _std(win)})
+ else:
+ res.append({**r, out: None})
+ return res
+
+
+def running_count(rows, out="running_count"):
+ """Add `running_count`: cumulative 1-based ROW count in the current order (cumulative # of
+ orders/SKUs/whatever the rows are). Counts rows — always safe (never a distinct-measure sum)."""
+ return [{**r, out: i + 1} for i, r in enumerate(rows)]
+
+
+# ================================================================== period-over-period (row-wise)
+
+def diff(rows, of, out=None):
+ """Add `_diff`: value minus the previous row's value (first row None). Row-wise — safe on
+ any numeric column (period-over-period change, incl. of a ratio)."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_diff"
+ res, prev = [], None
+ for r in rows:
+ v = r.get(of)
+ res.append({**r, out: (v - prev) if _numeric(v) and _numeric(prev) else None})
+ prev = v
+ return res
+
+
+def pct_change(rows, of, out=None):
+ """Add `_pct_change` (0-100 signed): percent change from the previous row. prev=0 -> None."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_pct_change"
+ res, prev = [], None
+ for r in rows:
+ v = r.get(of)
+ pc = (100.0 * (v - prev) / abs(prev)) if _numeric(v) and _numeric(prev) and prev else None
+ res.append({**r, out: pc})
+ prev = v
+ return res
+
+
+def lag(rows, of, k=1, out=None):
+ """Add `_lag`: the value from k rows earlier (Tableau LOOKUP / pandas shift)."""
+ _need_col(rows, of, "of")
+ k = max(1, min(int(k or 1), 100))
+ out = out or f"{of}_lag{k}"
+ vals = [r.get(of) for r in rows]
+ return [{**r, out: (vals[i - k] if i - k >= 0 else None)} for i, r in enumerate(rows)]
+
+
+def lead(rows, of, k=1, out=None):
+ """Add `_lead`: the value from k rows later."""
+ _need_col(rows, of, "of")
+ k = max(1, min(int(k or 1), 100))
+ out = out or f"{of}_lead{k}"
+ vals = [r.get(of) for r in rows]
+ n = len(rows)
+ return [{**r, out: (vals[i + k] if i + k < n else None)} for i, r in enumerate(rows)]
+
+
+def diff_from_first(rows, of, out=None):
+ """Add `_vs_first`: value minus the FIRST row's value (Tableau 'difference from first')."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_vs_first"
+ base = next((r.get(of) for r in rows if _numeric(r.get(of))), None)
+ return [{**r, out: (r.get(of) - base) if _numeric(r.get(of)) and _numeric(base) else None}
+ for r in rows]
+
+
+def index_to_100(rows, of, out=None):
+ """Add `_idx`: rebase the series to 100 at the first value (index-to-100 — compare shapes
+ of series at different levels). first=0 -> None."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_idx"
+ base = next((r.get(of) for r in rows if _numeric(r.get(of))), None)
+ return [{**r, out: (100.0 * r.get(of) / base) if _numeric(r.get(of)) and base else None}
+ for r in rows]
+
+
+def percent_of_max(rows, of, out=None):
+ """Add `_pct_of_max` (0-100): each row as a % of the largest value ('how far below best')."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_pct_of_max"
+ vals = _vals(rows, of)
+ mx = max(vals) if vals else None
+ return [{**r, out: (100.0 * r.get(of) / mx) if _numeric(r.get(of)) and mx else None}
+ for r in rows]
+
+
+def compare(rows, a, b, how="diff", out=None):
+ """Column-wise comparison of two EXISTING columns per row (e.g. revenue vs revenue_ly already
+ in the result): how='diff' (a-b), 'pct' (100*(a-b)/|b|), or 'ratio' (a/b). Distinct from `diff`
+ (which is cross-row on ONE column). Safe on any columns; b=0 -> None for pct/ratio."""
+ _need_col(rows, a, "a")
+ _need_col(rows, b, "b")
+ if how not in ("diff", "pct", "ratio"):
+ raise SEM.ModelError("how must be diff|pct|ratio")
+ out = out or f"{a}_vs_{b}_{how}"
+
+ def _cmp(x, y):
+ if not (_numeric(x) and _numeric(y)):
+ return None
+ if how == "diff":
+ return x - y
+ if not y:
+ return None
+ return (100.0 * (x - y) / abs(y)) if how == "pct" else (x / y)
+ return [{**r, out: _cmp(r.get(a), r.get(b))} for r in rows]
+
+
+# ================================================================== distribution / stats
+
+def bin_values(rows, of, bins=10):
+ """Equal-width histogram buckets over `of` across these rows -> one row per bucket:
+ {bucket, bucket_lo, bucket_hi, count, _sum}. Empty buckets kept (an honest gap)."""
+ _need_col(rows, of, "of")
+ bins = max(2, min(int(bins or 10), 50))
+ vals = _vals(rows, of)
+ if not vals:
+ raise SEM.ModelError(f"no numeric values in {of!r} to bin")
+ lo, hi = min(vals), max(vals)
+ if lo == hi:
+ return [{"bucket": f"{lo:,.4g}", "bucket_lo": lo, "bucket_hi": hi,
+ "count": len(vals), f"{of}_sum": sum(vals)}]
+ width = (hi - lo) / bins
+ out = []
+ for i in range(bins):
+ b_lo, b_hi = lo + i * width, lo + (i + 1) * width
+ hit = [v for v in vals if (b_lo <= v < b_hi) or (i == bins - 1 and v == hi)]
+ out.append({"bucket": f"{b_lo:,.4g} to {b_hi:,.4g}", "bucket_lo": b_lo, "bucket_hi": b_hi,
+ "count": len(hit), f"{of}_sum": sum(hit)})
+ return out
+
+
+def describe(rows, of):
+ """Summary statistics of `of` -> ONE row: count, mean, median, std, min, p25, p75, max
+ (+ sum when the measure is additive). The pandas .describe() of a column."""
+ _need_col(rows, of, "of")
+ v = _vals(rows, of)
+ if not v:
+ raise SEM.ModelError(f"no numeric values in {of!r} to describe")
+ row = {"stat_of": of, "count": len(v), "mean": _mean(v), "median": _median(v),
+ "std": _std(v), "min": min(v), "p25": _percentile(v, 25),
+ "p75": _percentile(v, 75), "max": max(v)}
+ if _is_additive(of):
+ row["sum"] = sum(v)
+ return [row]
+
+
+def zscore(rows, of, out=None):
+ """Add `_zscore`: standardized value (v-mean)/std (sample std). Constant column -> None."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_zscore"
+ v = _vals(rows, of)
+ m, s = _mean(v), _std(v)
+ return [{**r, out: ((r.get(of) - m) / s if _numeric(r.get(of)) and s else None)} for r in rows]
+
+
+def outliers(rows, of, method="zscore", k=None, out=None):
+ """Add `_outlier` (bool): flag statistical outliers. method='zscore' (|z|>k, default 3) or
+ 'iqr' (outside [Q1-k*IQR, Q3+k*IQR], default k=1.5 — Tukey's fences)."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_outlier"
+ v = _vals(rows, of)
+ if method == "iqr":
+ k = 1.5 if k is None else float(k)
+ q1, q3 = _percentile(v, 25), _percentile(v, 75)
+ iqr = (q3 - q1) if (q1 is not None and q3 is not None) else None
+ lo = (q1 - k * iqr) if iqr is not None else None
+ hi = (q3 + k * iqr) if iqr is not None else None
+ return [{**r, out: (bool(r.get(of) < lo or r.get(of) > hi)
+ if _numeric(r.get(of)) and lo is not None else None)} for r in rows]
+ k = 3.0 if k is None else float(k)
+ m, s = _mean(v), _std(v)
+ return [{**r, out: (abs((r.get(of) - m) / s) > k if _numeric(r.get(of)) and s else None)}
+ for r in rows]
+
+
+def winsorize(rows, of, p=5, out=None):
+ """Add `_winsor`: `of` clipped to its [p, 100-p] percentiles (tame outliers before a mean
+ or chart without dropping rows)."""
+ _need_col(rows, of, "of")
+ p = max(0.0, min(float(p or 5), 49.0))
+ out = out or f"{of}_winsor"
+ v = _vals(rows, of)
+ lo, hi = _percentile(v, p), _percentile(v, 100 - p)
+ return [{**r, out: (min(max(r.get(of), lo), hi) if _numeric(r.get(of)) else None)} for r in rows]
+
+
+def clip(rows, of, lo=None, hi=None, out=None):
+ """Add `_clip`: `of` clamped to [lo, hi] (either bound optional)."""
+ _need_col(rows, of, "of")
+ if lo is None and hi is None:
+ raise SEM.ModelError("clip needs lo and/or hi")
+ out = out or f"{of}_clip"
+
+ def _c(x):
+ if not _numeric(x):
+ return None
+ if lo is not None:
+ x = max(x, lo)
+ if hi is not None:
+ x = min(x, hi)
+ return x
+ return [{**r, out: _c(r.get(of))} for r in rows]
+
+
+def normalize(rows, of, out=None):
+ """Add `_norm` (0-1): min-max scale of `of`. Constant column -> 0.0 for all."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_norm"
+ v = _vals(rows, of)
+ lo, hi = (min(v), max(v)) if v else (None, None)
+ span = (hi - lo) if (lo is not None) else None
+ return [{**r, out: ((r.get(of) - lo) / span if span else 0.0) if _numeric(r.get(of)) else None}
+ for r in rows]
+
+
+def correlate(rows, x, y):
+ """Pearson correlation between two columns -> ONE row {x, y, pearson_r, n}. r in [-1,1];
+ 'do these two measures move together?'. Zero-variance column -> r None."""
+ _need_col(rows, x, "x")
+ _need_col(rows, y, "y")
+ pairs = [(r[x], r[y]) for r in rows if _numeric(r.get(x)) and _numeric(r.get(y))]
+ n = len(pairs)
+ if n < 2:
+ return [{"x": x, "y": y, "pearson_r": None, "n": n}]
+ xs, ys = [p[0] for p in pairs], [p[1] for p in pairs]
+ mx, my = _mean(xs), _mean(ys)
+ cov = sum((a - mx) * (b - my) for a, b in pairs)
+ sx = math.sqrt(sum((a - mx) ** 2 for a in xs))
+ sy = math.sqrt(sum((b - my) ** 2 for b in ys))
+ r = (cov / (sx * sy)) if (sx and sy) else None
+ return [{"x": x, "y": y, "pearson_r": r, "n": n}]
+
+
+def weighted_average(rows, of, weight):
+ """Weighted mean of `of` by `weight` -> ONE row {_wavg, weight_col, n}. The correct way to
+ average a per-unit figure (e.g. price weighted by units) — never a mean of means."""
+ _need_col(rows, of, "of")
+ _need_col(rows, weight, "weight")
+ num = sum((r[of] * r[weight]) for r in rows if _numeric(r.get(of)) and _numeric(r.get(weight)))
+ den = sum(r[weight] for r in rows if _numeric(r.get(of)) and _numeric(r.get(weight)))
+ return [{f"{of}_wavg": (num / den) if den else None, "weight_col": weight,
+ "n": sum(1 for r in rows if _numeric(r.get(of)) and _numeric(r.get(weight)))}]
+
+
+def safe_ratio(rows, numerator, denominator, out="ratio"):
+ """Add a row-wise ratio `numerator/denominator` (denominator 0 -> None). Build an ad-hoc rate
+ the semantic layer doesn't predefine, correctly guarded."""
+ _need_col(rows, numerator, "numerator")
+ _need_col(rows, denominator, "denominator")
+ return [{**r, out: ((r[numerator] / r[denominator])
+ if _numeric(r.get(numerator)) and r.get(denominator) else None)}
+ for r in rows]
+
+
+def product(rows, a, b, out="product"):
+ """Add a row-wise product `a*b` (e.g. price * quantity)."""
+ _need_col(rows, a, "a")
+ _need_col(rows, b, "b")
+ return [{**r, out: (r[a] * r[b] if _numeric(r.get(a)) and _numeric(r.get(b)) else None)}
+ for r in rows]
+
+
+# ================================================================== business templates
+
+def abc_classify(rows, of, a=80, b=95):
+ """Pareto ABC classification: sort desc by `of`, add `_cum_pct` and `abc_class` (A = the
+ vital few up to a% of the total, B up to b%, C the long tail). The classic 80/20 inventory /
+ customer / SKU segmentation."""
+ _need_additive(rows, of, "abc_classify")
+ a, b = float(a), float(b)
+ ordered = sort_rows(rows, of, "desc")
+ total = sum(r.get(of) or 0 for r in ordered)
+ run, res = 0.0, []
+ for r in ordered:
+ run += r.get(of) or 0
+ cum = (100.0 * run / total) if total else None
+ cls = None if cum is None else ("A" if cum <= a else ("B" if cum <= b else "C"))
+ res.append({**r, f"{of}_cum_pct": cum, "abc_class": cls})
+ return res
+
+
+def concentration(rows, of):
+ """Concentration statistics of `of` across these rows -> ONE row: HHI (Herfindahl-Hirschman
+ Index, 0-10000), Gini (0-1), and top-1/5/10 share %. 'How concentrated is the book?'."""
+ _need_additive(rows, of, "concentration")
+ vals = [r.get(of) or 0 for r in rows if _numeric(r.get(of))]
+ vals = [v for v in vals if v > 0]
+ n = len(vals)
+ total = sum(vals)
+ if not total:
+ return [{"of": of, "n": n, "hhi": None, "gini": None,
+ "top1_share_pct": None, "top5_share_pct": None, "top10_share_pct": None}]
+ shares = [v / total for v in vals]
+ hhi = sum(s * s for s in shares) * 10000.0
+ asc = sorted(vals)
+ gini = (2.0 * sum((i + 1) * x for i, x in enumerate(asc))) / (n * total) - (n + 1.0) / n
+ desc = sorted(vals, reverse=True)
+
+ def topk(k):
+ return 100.0 * sum(desc[:k]) / total
+ return [{"of": of, "n": n, "hhi": hhi, "gini": gini, "top1_share_pct": topk(1),
+ "top5_share_pct": topk(5), "top10_share_pct": topk(10)}]
+
+
+def contribution_to_change(rows, of):
+ """Given a `_delta` column (run yoy first), add `_delta_share_pct`: each row's share of
+ the TOTAL change (who drove the movement — the bridge / contribution decomposition)."""
+ delta = f"{of}_delta"
+ _need_col(rows, delta, "of (expected _delta from yoy)")
+ total = sum(r.get(delta) or 0 for r in rows)
+ return [{**r, f"{of}_delta_share_pct": (100.0 * (r.get(delta) or 0) / total) if total else None}
+ for r in rows]
+
+
+def rfm(rows, recency, frequency, monetary, tiles=5):
+ """RFM scoring: quintile-score each customer on Recency (LOWER days = better), Frequency and
+ Monetary (higher = better), 1..tiles. Adds r_score/f_score/m_score, rfm_cell ('545'),
+ rfm_score (sum) and rfm_segment (Champions / Loyal / Potential / At Risk / Lost / Others)."""
+ for c, nm in ((recency, "recency"), (frequency, "frequency"), (monetary, "monetary")):
+ _need_col(rows, c, nm)
+ tiles = max(2, min(int(tiles or 5), 10))
+
+ def _score(col, reverse):
+ # reverse=True -> smaller value scores higher (recency). Bucket by sorted position.
+ ordered = sort_rows(rows, col, "asc")
+ present = [r for r in ordered if r.get(col) is not None]
+ n = len(present)
+ sc = {}
+ for i, r in enumerate(ordered):
+ if r.get(col) is None:
+ sc[id(r)] = None
+ else:
+ t = min(tiles, int(i * tiles / n) + 1)
+ sc[id(r)] = (tiles + 1 - t) if reverse else t
+ return sc
+ rs, fs, ms = _score(recency, True), _score(frequency, False), _score(monetary, False)
+ out = []
+ for r in rows:
+ rr, ff, mm = rs[id(r)], fs[id(r)], ms[id(r)]
+ seg = _rfm_segment(rr, ff, mm, tiles)
+ out.append({**r, "r_score": rr, "f_score": ff, "m_score": mm,
+ "rfm_cell": (f"{rr}{ff}{mm}" if None not in (rr, ff, mm) else None),
+ "rfm_score": (rr + ff + mm if None not in (rr, ff, mm) else None),
+ "rfm_segment": seg})
+ return out
+
+
+def _rfm_segment(r, f, m, tiles):
+ if None in (r, f, m):
+ return None
+ hi = tiles - 1
+ lo = 2
+ if r >= hi and f >= hi:
+ return "Champions"
+ if f >= hi:
+ return "Loyal"
+ if r >= hi:
+ return "Recent / Promising"
+ if r <= lo and f >= 3:
+ return "At Risk"
+ if r <= lo and f <= lo:
+ return "Lost"
+ return "Others"
+
+
+def funnel_rates(rows, of):
+ """Stage conversion: over ordered stage rows carrying a count `of`, add `_step_pct` (vs the
+ previous stage) and `_overall_pct` (vs the first stage). The funnel drop-off read."""
+ _need_col(rows, of, "of")
+ first = next((r.get(of) for r in rows if _numeric(r.get(of))), None)
+ res, prev = [], None
+ for r in rows:
+ v = r.get(of)
+ step = (100.0 * v / prev) if _numeric(v) and _numeric(prev) and prev else None
+ overall = (100.0 * v / first) if _numeric(v) and first else None
+ res.append({**r, f"{of}_step_pct": step, f"{of}_overall_pct": overall})
+ prev = v
+ return res
+
+
+# ================================================================== modeling (transparent)
+
+def _ols(xs, ys):
+ """Ordinary least squares y = slope*x + intercept over paired numerics -> (slope, intercept,
+ r2). None,None,None if degenerate."""
+ pts = [(x, y) for x, y in zip(xs, ys) if _numeric(x) and _numeric(y)]
+ n = len(pts)
+ if n < 2:
+ return None, None, None
+ mx = sum(p[0] for p in pts) / n
+ my = sum(p[1] for p in pts) / n
+ sxx = sum((p[0] - mx) ** 2 for p in pts)
+ sxy = sum((p[0] - mx) * (p[1] - my) for p in pts)
+ if not sxx:
+ return None, None, None
+ slope = sxy / sxx
+ intercept = my - slope * mx
+ syy = sum((p[1] - my) ** 2 for p in pts)
+ ss_res = sum((y - (slope * x + intercept)) ** 2 for x, y in pts)
+ r2 = (1 - ss_res / syy) if syy else None
+ return slope, intercept, r2
+
+
+def trend_line(rows, of, out=None):
+ """Add `_trend`: the linear least-squares fitted value (a straight trend over the rows'
+ order) — draw it over `of` with a combo/line chart. The Analytics-pane trend line."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_trend"
+ xs = list(range(len(rows)))
+ ys = [r.get(of) for r in rows]
+ slope, intercept, _ = _ols(xs, ys)
+ if slope is None:
+ return [{**r, out: None} for r in rows]
+ return [{**r, out: slope * i + intercept} for i, r in enumerate(rows)]
+
+
+def regression(rows, x, y):
+ """Linear regression of `y` on `x` -> ONE row {slope, intercept, r2, n}. 'Is there a
+ relationship, how strong?' (r2 near 1 = tight fit)."""
+ _need_col(rows, x, "x")
+ _need_col(rows, y, "y")
+ slope, intercept, r2 = _ols([r.get(x) for r in rows], [r.get(y) for r in rows])
+ n = sum(1 for r in rows if _numeric(r.get(x)) and _numeric(r.get(y)))
+ return [{"x": x, "y": y, "slope": slope, "intercept": intercept, "r2": r2, "n": n}]
+
+
+def cagr(rows, of):
+ """Compound annual (per-period) growth rate first->last -> ONE row {cagr_pct, periods}.
+ ((last/first)^(1/periods) - 1) * 100. Needs first > 0."""
+ _need_col(rows, of, "of")
+ vals = [r.get(of) for r in rows if _numeric(r.get(of))]
+ if len(vals) < 2:
+ return [{"of": of, "cagr_pct": None, "periods": max(0, len(vals) - 1)}]
+ first, last = vals[0], vals[-1]
+ p = len(vals) - 1
+ c = ((last / first) ** (1.0 / p) - 1) * 100.0 if first > 0 and last > 0 else None
+ return [{"of": of, "cagr_pct": c, "periods": p}]
+
+
+def growth_rate(rows, of):
+ """Total growth first->last -> ONE row {growth_pct, first, last}. (last-first)/|first| * 100."""
+ _need_col(rows, of, "of")
+ vals = [r.get(of) for r in rows if _numeric(r.get(of))]
+ if len(vals) < 2:
+ return [{"of": of, "growth_pct": None, "first": (vals[0] if vals else None),
+ "last": (vals[-1] if vals else None)}]
+ first, last = vals[0], vals[-1]
+ g = (100.0 * (last - first) / abs(first)) if first else None
+ return [{"of": of, "growth_pct": g, "first": first, "last": last}]
+
+
+# ================================================================== reference annotations (columns)
+
+def reference_line(rows, of, stat="mean", out=None):
+ """Add a constant column = a summary stat of `of` (mean|median|min|max), so a combo/line chart
+ can draw the reference line. The Analytics-pane average/median/constant line."""
+ _need_col(rows, of, "of")
+ out = out or f"{of}_ref"
+ v = _vals(rows, of)
+ val = {"mean": _mean(v), "median": _median(v), "min": (min(v) if v else None),
+ "max": (max(v) if v else None)}.get(stat)
+ if stat not in ("mean", "median", "min", "max"):
+ raise SEM.ModelError("stat must be mean|median|min|max")
+ return [{**r, out: val} for r in rows]
+
+
+def reference_band(rows, of, method="stddev", k=1):
+ """Add `_band_lo`/`_band_hi` constant columns for a shaded reference band. method
+ 'stddev' -> mean ± k·std; method 'percentile' -> the k-th and (100-k)-th percentiles."""
+ _need_col(rows, of, "of")
+ v = _vals(rows, of)
+ if method == "percentile":
+ lo, hi = _percentile(v, float(k)), _percentile(v, 100 - float(k))
+ elif method == "stddev":
+ m, s = _mean(v), _std(v)
+ lo = (m - float(k) * s) if (m is not None and s is not None) else None
+ hi = (m + float(k) * s) if (m is not None and s is not None) else None
+ else:
+ raise SEM.ModelError("method must be stddev|percentile")
+ return [{**r, f"{of}_band_lo": lo, f"{of}_band_hi": hi} for r in rows]
+
+
+def target_line(rows, value, out="target"):
+ """Add a constant `target` column = value — for a bullet chart (actual vs target) or a goal
+ line on a combo chart."""
+ if not _numeric(value):
+ raise SEM.ModelError("target_line needs a numeric value")
+ return [{**r, out: value} for r in rows]
+
+
+def xmr_limits(rows, of):
+ """Wheeler XmR (process-behaviour) control limits on `of` in row order, as constant columns:
+ `_center` (mean), `_ucl`/`_lcl` (center ± 2.66·mR-bar, mR-bar = mean moving range),
+ and `_signal` (bool: this point is outside the limits). The HONEST, business-native
+ alternative to mean±k·std for spotting real signals in a noisy monthly series — the same XmR
+ the warehouse/expenses modules use. Draw center/ucl/lcl as reference lines over `of`."""
+ _need_col(rows, of, "of")
+ vals = [r.get(of) for r in rows]
+ nums = [v for v in vals if _numeric(v)]
+ center = _mean(nums)
+ mr = [abs(vals[i] - vals[i - 1]) for i in range(1, len(vals))
+ if _numeric(vals[i]) and _numeric(vals[i - 1])]
+ mrbar = _mean(mr)
+ ucl = (center + 2.66 * mrbar) if (center is not None and mrbar is not None) else None
+ lcl = (center - 2.66 * mrbar) if (center is not None and mrbar is not None) else None
+ out = []
+ for r in rows:
+ v = r.get(of)
+ sig = (bool(v > ucl or v < lcl) if _numeric(v) and ucl is not None else None)
+ out.append({**r, f"{of}_center": center, f"{of}_ucl": ucl, f"{of}_lcl": lcl,
+ f"{of}_signal": sig})
+ return out
+
+
+# ================================================================== reshape (pure, no hidden agg)
+
+def pivot(rows, index, column, value):
+ """Long -> wide: one row per `index`, one column per distinct `column` value, cell = `value`.
+ A PURE reshape — if two source rows share an (index, column) pair it RAISES (never a hidden
+ sum; regroup in the query instead). Missing cells are None."""
+ for c, nm in ((index, "index"), (column, "column"), (value, "value")):
+ _need_col(rows, c, nm)
+ cols, order, out_map = set(), [], {}
+ for r in rows:
+ idx, col = r.get(index), r.get(column)
+ cols.add(col)
+ if idx not in out_map:
+ out_map[idx] = {index: idx}
+ order.append(idx)
+ cell = str(col)
+ if cell in out_map[idx]:
+ raise SEM.ModelError(
+ f"pivot collision: {index}={idx!r} has two rows for {column}={col!r} — pivot cannot "
+ f"aggregate (that would hide a sum); regroup the query so (index, column) is unique")
+ out_map[idx][cell] = r.get(value)
+ col_names = [str(c) for c in sorted(cols, key=lambda z: (z is None, z))]
+ return [{index: out_map[idx][index], **{cn: out_map[idx].get(cn) for cn in col_names}}
+ for idx in order]
+
+
+def unpivot(rows, keep, columns, var_name="metric", value_name="value"):
+ """Wide -> long (melt): for each row, emit one output row per `columns` entry carrying the
+ `keep` columns plus (`var_name`, `value_name`). The inverse of pivot."""
+ keep = keep if isinstance(keep, (list, tuple)) else [keep]
+ columns = columns if isinstance(columns, (list, tuple)) else [columns]
+ for c in list(keep) + list(columns):
+ _need_col(rows, c, "column")
+ out = []
+ for r in rows:
+ base = {k: r.get(k) for k in keep}
+ for c in columns:
+ out.append({**base, var_name: c, value_name: r.get(c)})
+ return out
+
+
+def filter_rows(rows, col, cmp, value):
+ """Keep rows where `col` `cmp` `value`. cmp in >, >=, <, <=, ==, !=, contains. The 'having'
+ clause over a result (e.g. keep customers with revenue_yoy_pct < 0). (Named `cmp`, not `op`,
+ to avoid colliding with the transform dispatch key.)"""
+ _need_col(rows, col, "col")
+ ops = {">": lambda a, b: a > b, ">=": lambda a, b: a >= b, "<": lambda a, b: a < b,
+ "<=": lambda a, b: a <= b, "==": lambda a, b: a == b, "!=": lambda a, b: a != b,
+ "contains": lambda a, b: str(b).lower() in str(a).lower()}
+ if cmp not in ops:
+ raise SEM.ModelError(f"cmp must be one of {sorted(ops)}")
+ fn = ops[cmp]
+ out = []
+ for r in rows:
+ v = r.get(col)
+ try:
+ if cmp in (">", ">=", "<", "<=") and not _numeric(v):
+ continue
+ if fn(v, value):
+ out.append(r)
+ except TypeError:
+ continue
+ return out
+
+
+def dedupe(rows, by=None):
+ """Keep the FIRST row per distinct key. by = a column or list of columns (default: the whole
+ row). Distinct rows, order-preserving."""
+ if by is None:
+ keys = list(rows[0]) if rows else []
+ else:
+ keys = by if isinstance(by, (list, tuple)) else [by]
+ for k in keys:
+ _need_col(rows, k, "by")
+ seen, out = set(), []
+ for r in rows:
+ key = tuple(r.get(k) for k in keys)
+ if key not in seen:
+ seen.add(key)
+ out.append(r)
+ return out
+
+
+def resample(rows, grain):
+ """Reindex a time series to a COMPLETE period spine (grain=month|week|day) from the first to
+ the last period, inserting a row for every MISSING period with None measures (never
+ interpolated). Run this BEFORE running_total / moving_* / diff on a sparse or filtered date
+ spine — otherwise those window ops silently skip the gaps and lie. The single most-flagged
+ correctness guard in the tool surveys (asfreq/reindex)."""
+ if grain not in ("month", "week", "day"):
+ raise SEM.ModelError("resample grain must be month|week|day")
+ _need_col(rows, "period", "period")
+ present = {str(r.get("period"))[:10]: r for r in rows if r.get("period") is not None}
+ if not present:
+ return rows
+ other_cols = [c for c in rows[0] if c != "period"]
+ keys = sorted(present)
+ p = keys[0]
+ last = keys[-1]
+ out, guard = [], 0
+ while True:
+ norm = _period_start(p, grain) if grain == "month" else str(p)[:10]
+ if norm in present:
+ out.append(present[norm])
+ else:
+ out.append({"period": norm, **{c: None for c in other_cols}})
+ if norm >= last:
+ break
+ p = _step_period(p, grain, 1)
+ guard += 1
+ if guard > 5000: # bounded (loop-library discipline)
+ break
+ return out
+
+
+# ================================================================== re-query family (widening window)
+
+def _period_start(period, grain):
+ if grain == "month":
+ return f"{str(period)[:7]}-01"
+ return str(period)[:10]
+
+
+def _period_end(period, grain):
+ p = str(period)
+ if grain == "month":
+ y, m = int(p[:4]), int(p[5:7])
+ ny, nm = (y + 1, 1) if m == 12 else (y, m + 1)
+ return (dt.date(ny, nm, 1) - dt.timedelta(days=1)).isoformat()
+ if grain == "week":
+ return (dt.date.fromisoformat(p[:10]) + dt.timedelta(days=6)).isoformat()
+ return p[:10]
+
+
+def _step_period(period, grain, n):
+ p = str(period)
+ if grain == "month":
+ idx = int(p[:4]) * 12 + (int(p[5:7]) - 1) + n
+ return f"{idx // 12:04d}-{idx % 12 + 1:02d}-01"
+ if grain == "week":
+ return (dt.date.fromisoformat(p[:10]) + dt.timedelta(weeks=n)).isoformat()
+ return (dt.date.fromisoformat(p[:10]) + dt.timedelta(days=n)).isoformat()
+
+
+def _require_series(res, op):
+ grain = res.get("grain")
+ if not grain:
+ raise SEM.ModelError(f"{op} needs a time grain (run the query with grain=month|week|day)")
+ if res.get("group_by"):
+ raise SEM.ModelError(f"{op} works on a SINGLE time series — drop group_by (per-group "
+ "widening windows need one query per group)")
+ return grain
+
+
+def _scalar(result, col):
+ rows = result.get("rows") or []
+ return rows[0].get(col) if rows else None
+
+
+def ytd(res, run_query, of):
+ """CORRECT cumulative year-to-date for ANY measure (incl. distinct counts / ratios): re-runs
+ the governed query over [Jan 1 .. each period end] and reads `of`. Never sums displayed values
+ (which would over-count a distinct customer count). Adds `_ytd`."""
+ rows = res.get("rows") or []
+ grain = _require_series(res, "ytd")
+ _need_col(rows, "period", "period")
+ _need_col(rows, of, "of")
+ q = dict(res.get("query") or {})
+ ordered = sorted(rows, key=lambda r: str(r.get("period") or ""))
+ out = []
+ for r in ordered:
+ p = r["period"]
+ wq = {**q, "grain": None, "group_by": None,
+ "date_from": f"{str(p)[:4]}-01-01", "date_to": _period_end(p, grain)}
+ out.append({**r, f"{of}_ytd": _scalar(run_query(wq), of)})
+ return out
+
+
+def rolling(res, run_query, of, window=3):
+ """CORRECT trailing-window value for ANY measure (incl. distinct counts): re-runs the governed
+ query over the trailing `window` periods and reads `of` (trailing-N distinct customers, T12M
+ revenue, ...). Adds `_roll`."""
+ rows = res.get("rows") or []
+ grain = _require_series(res, "rolling")
+ window = max(2, min(int(window or 3), 36))
+ _need_col(rows, "period", "period")
+ _need_col(rows, of, "of")
+ q = dict(res.get("query") or {})
+ ordered = sorted(rows, key=lambda r: str(r.get("period") or ""))
+ out = []
+ for r in ordered:
+ p = r["period"]
+ start = _period_start(_step_period(p, grain, -(window - 1)), grain)
+ wq = {**q, "grain": None, "group_by": None,
+ "date_from": start, "date_to": _period_end(p, grain)}
+ out.append({**r, f"{of}_roll{window}": _scalar(run_query(wq), of)})
+ return out
+
+
+def forecast(res, run_query, of, periods=3, method="linear", season=12):
+ """Append `periods` future rows with a `_forecast` value. method='linear' extends the
+ least-squares trend; 'seasonal_naive' repeats the value from `season` periods ago. Transparent
+ and deterministic (no ML lib). Needs a time grain (to label future periods)."""
+ rows = res.get("rows") or []
+ grain = _require_series(res, "forecast")
+ periods = max(1, min(int(periods or 3), 24))
+ _need_col(rows, "period", "period")
+ _need_col(rows, of, "of")
+ ordered = sorted(rows, key=lambda r: str(r.get("period") or ""))
+ hist = [r.get(of) for r in ordered]
+ out = [{**r, f"{of}_forecast": None} for r in ordered]
+ if out: # bridge: last actual seeds the line
+ out[-1][f"{of}_forecast"] = ordered[-1].get(of)
+ last_p = ordered[-1]["period"] if ordered else None
+ if method == "seasonal_naive":
+ season = max(1, int(season or 12))
+ for i in range(1, periods + 1):
+ src = len(hist) - season + (i - 1)
+ val = hist[src] if 0 <= src < len(hist) else None
+ out.append({"period": _step_period(last_p, grain, i), f"{of}_forecast": val})
+ else:
+ slope, intercept, _ = _ols(list(range(len(hist))), hist)
+ for i in range(1, periods + 1):
+ val = (slope * (len(hist) - 1 + i) + intercept) if slope is not None else None
+ out.append({"period": _step_period(last_p, grain, i), f"{of}_forecast": val})
+ return out
+
+
+# ================================================================== yoy (re-query)
+
+def _shift_year(iso, delta):
+ y, rest = iso[:4], iso[4:]
+ shifted = f"{int(y) + delta}{rest}"
+ if shifted.endswith("-02-29"): # leap-day clamp
+ shifted = shifted[:-2] + "28"
+ return shifted
+
+
+def yoy_compare(res, run_query):
+ """Same-period-last-year compare: re-run the source GOVERNED query shifted -1 year and join
+ on (period shifted +1y, *group dims). Adds `_ly`, `_delta` ($ change) and `_yoy_pct`
+ (0-100) per measure — sort by `_delta` asc for 'who dropped the most'. Unmatched periods
+ keep None — a partial-vs-full compare is never faked."""
+ q = dict(res.get("query") or {})
+ if not (q.get("date_from") and q.get("date_to")):
+ raise SEM.ModelError("yoy needs an explicit date_from/date_to on the source query")
+ ly_q = {**q, "date_from": _shift_year(q["date_from"], -1),
+ "date_to": _shift_year(q["date_to"], -1)}
+ ly_rows = run_query(ly_q)["rows"]
+ gb = list(res.get("group_by") or [])
+ period_col = "period" if res.get("grain") else None
+ keys = ([period_col] if period_col else []) + gb
+ measures = [m for m in (res.get("measures") or []) if res["rows"] and m in res["rows"][0]]
+
+ def _key(row, shift_period):
+ parts = []
+ for k in keys:
+ v = str(row.get(k) or "")
+ if k == period_col and shift_period and len(v) >= 4:
+ v = _shift_year(v, +1)
+ parts.append(v)
+ return tuple(parts)
+
+ ly_map = {}
+ for r in ly_rows:
+ ly_map[_key(r, True)] = r
+ out = []
+ for r in res["rows"]:
+ prev = ly_map.get(_key(r, False), {})
+ row = dict(r)
+ for m in measures:
+ pv = prev.get(m)
+ row[f"{m}_ly"] = pv
+ cur = r.get(m)
+ row[f"{m}_delta"] = (cur - pv) if _numeric(pv) and _numeric(cur) else None
+ row[f"{m}_yoy_pct"] = (100.0 * (cur - pv) / abs(pv)
+ if _numeric(pv) and pv and _numeric(cur) else None)
+ out.append(row)
+ return out, ly_q
+
+
+def _yoy(res, run_query):
+ out, _ = yoy_compare(res, run_query)
+ return out
+
+
+# ================================================================== registry + replay
+
+def _op(fn, params=(), required=(), needs_query=False):
+ return {"fn": fn, "params": set(params), "required": set(required), "needs_query": needs_query}
+
+
+OPS = {
+ # ordering / rank / top-N
+ "sort": _op(sort_rows, {"by", "direction"}, {"by"}),
+ "head": _op(head, {"n"}),
+ "bottom_n": _op(bottom_n, {"by", "n"}, {"by"}),
+ "rank": _op(rank_rows, {"by", "direction", "out"}, {"by"}),
+ "rank_pct": _op(rank_pct, {"by", "direction", "out"}, {"by"}),
+ "ntile": _op(ntile, {"by", "tiles", "direction", "out"}, {"by"}),
+ "top_n": _op(top_n, {"by", "n", "other", "other_label"}, {"by"}),
+ "add_total": _op(add_total, {"label"}),
+ # part-to-whole / cumulative
+ "share_of_total": _op(share_of_total, {"of", "out"}, {"of"}),
+ "cum_share": _op(cum_share, {"of", "out"}, {"of"}),
+ # running / moving windows
+ "running_total": _op(running_total, {"of", "out"}, {"of"}),
+ "running_avg": _op(running_avg, {"of", "out"}, {"of"}),
+ "running_max": _op(lambda rows, of, out=None: running_extreme(rows, of, "max", out),
+ {"of", "out"}, {"of"}),
+ "running_min": _op(lambda rows, of, out=None: running_extreme(rows, of, "min", out),
+ {"of", "out"}, {"of"}),
+ "moving_average": _op(moving_average, {"of", "window", "out"}, {"of"}),
+ "moving_sum": _op(moving_sum, {"of", "window", "out"}, {"of"}),
+ "moving_median": _op(moving_median, {"of", "window", "out"}, {"of"}),
+ "rolling_std": _op(rolling_std, {"of", "window", "out"}, {"of"}),
+ "running_count": _op(running_count, {"out"}),
+ # period-over-period (row-wise)
+ "diff": _op(diff, {"of", "out"}, {"of"}),
+ "pct_change": _op(pct_change, {"of", "out"}, {"of"}),
+ "lag": _op(lag, {"of", "k", "out"}, {"of"}),
+ "lead": _op(lead, {"of", "k", "out"}, {"of"}),
+ "diff_from_first": _op(diff_from_first, {"of", "out"}, {"of"}),
+ "index_to_100": _op(index_to_100, {"of", "out"}, {"of"}),
+ "percent_of_max": _op(percent_of_max, {"of", "out"}, {"of"}),
+ "compare": _op(compare, {"a", "b", "how", "out"}, {"a", "b"}),
+ # distribution / stats
+ "bin": _op(bin_values, {"of", "bins"}, {"of"}),
+ "describe": _op(describe, {"of"}, {"of"}),
+ "zscore": _op(zscore, {"of", "out"}, {"of"}),
+ "outliers": _op(outliers, {"of", "method", "k", "out"}, {"of"}),
+ "winsorize": _op(winsorize, {"of", "p", "out"}, {"of"}),
+ "clip": _op(clip, {"of", "lo", "hi", "out"}, {"of"}),
+ "normalize": _op(normalize, {"of", "out"}, {"of"}),
+ "correlate": _op(correlate, {"x", "y"}, {"x", "y"}),
+ "weighted_average": _op(weighted_average, {"of", "weight"}, {"of", "weight"}),
+ "safe_ratio": _op(safe_ratio, {"numerator", "denominator", "out"}, {"numerator", "denominator"}),
+ "product": _op(product, {"a", "b", "out"}, {"a", "b"}),
+ # business templates
+ "abc_classify": _op(abc_classify, {"of", "a", "b"}, {"of"}),
+ "concentration": _op(concentration, {"of"}, {"of"}),
+ "contribution_to_change": _op(contribution_to_change, {"of"}, {"of"}),
+ "rfm": _op(rfm, {"recency", "frequency", "monetary", "tiles"},
+ {"recency", "frequency", "monetary"}),
+ "funnel_rates": _op(funnel_rates, {"of"}, {"of"}),
+ # modeling (transparent)
+ "trend_line": _op(trend_line, {"of", "out"}, {"of"}),
+ "regression": _op(regression, {"x", "y"}, {"x", "y"}),
+ "cagr": _op(cagr, {"of"}, {"of"}),
+ "growth_rate": _op(growth_rate, {"of"}, {"of"}),
+ # reference annotations (added columns)
+ "reference_line": _op(reference_line, {"of", "stat", "out"}, {"of"}),
+ "reference_band": _op(reference_band, {"of", "method", "k"}, {"of"}),
+ "target_line": _op(target_line, {"value", "out"}, {"value"}),
+ "xmr_limits": _op(xmr_limits, {"of"}, {"of"}),
+ # reshape (pure)
+ "pivot": _op(pivot, {"index", "column", "value"}, {"index", "column", "value"}),
+ "unpivot": _op(unpivot, {"keep", "columns", "var_name", "value_name"}, {"keep", "columns"}),
+ "filter_rows": _op(filter_rows, {"col", "cmp", "value"}, {"col", "cmp", "value"}),
+ "dedupe": _op(dedupe, {"by"}),
+ "resample": _op(resample, {"grain"}, {"grain"}),
+ # re-query family (widening / trailing windows, correct for non-additive)
+ "yoy": _op(_yoy, needs_query=True),
+ "ytd": _op(ytd, {"of"}, {"of"}, needs_query=True),
+ "rolling": _op(rolling, {"of", "window"}, {"of"}, needs_query=True),
+ "forecast": _op(forecast, {"of", "periods", "method", "season"}, {"of"}, needs_query=True),
+}
+
+
+def apply(res, ops, run_query=None):
+ """Apply an op CHAIN to a result dict; returns (rows, applied_ops). Ops are validated against
+ the registry (whitelisted names + params only). `run_query(query_dict) -> result` powers the
+ re-query family (yoy/ytd/rolling/forecast); both the live tool and the saved-view replay inject
+ their own."""
+ if not isinstance(ops, list) or not ops:
+ raise SEM.ModelError("transforms must be a non-empty list of {op, ...} objects")
+ rows = list(res.get("rows") or [])
+ applied = []
+ for spec in ops:
+ if not isinstance(spec, dict) or "op" not in spec:
+ raise SEM.ModelError(f"each transform needs an 'op' key: {spec!r}")
+ name = spec["op"]
+ entry = OPS.get(name)
+ if not entry:
+ raise SEM.ModelError(f"unknown transform {name!r} (transforms: {sorted(OPS)})")
+ params = {k: v for k, v in spec.items() if k != "op"}
+ bad = set(params) - entry["params"]
+ if bad:
+ raise SEM.ModelError(f"{name}: unknown params {sorted(bad)} "
+ f"(allowed: {sorted(entry['params'])})")
+ missing = entry["required"] - set(params)
+ if missing:
+ raise SEM.ModelError(f"{name}: missing required params {sorted(missing)}")
+ if entry["needs_query"]:
+ if run_query is None:
+ raise SEM.ModelError(f"{name} is unavailable here (no query runner)")
+ # every re-query op takes (res_with_current_rows, run_query, **params)
+ rows = entry["fn"]({**res, "rows": rows}, run_query, **params)
+ else:
+ rows = entry["fn"](rows, **params)
+ applied.append({"op": name, **params})
+ return rows, applied
diff --git a/platform/harness/views.py b/platform/harness/views.py
new file mode 100644
index 0000000000000000000000000000000000000000..e3a983cea85acf83606dd62eb314df082191bb0a
--- /dev/null
+++ b/platform/harness/views.py
@@ -0,0 +1,198 @@
+"""harness/views.py — saved views + spawned dashboards: the store and the RE-RUNNER (OM-3 viewer).
+
+The Analyst's save_view/compose_dashboard tools persist chart SPECS + their semantic QUERY (never
+rows) into data/store/views.json. This module is the read side: load the specs, re-execute each
+view's governed query against the tenant store at render time, and hand the page a fresh artifact
+dict in exactly the shape `_render_analyst_artifact` already renders. The viewer therefore shows
+LIVE (store-fresh) numbers, not the numbers from whenever the view was saved — same discipline as
+every dashboard (a saved view is a query, not a snapshot).
+
+Legacy note: views saved before 2026-07-11 carry no 'query' (only a session-scoped result_id) and
+cannot be re-run — run_view raises a readable error the page surfaces per view.
+"""
+import json
+import time
+
+import harness.semantic as SEM
+from harness.tools import VIEWS_PATH
+
+_QUERY_KEYS = ("topic", "measures", "group_by", "grain", "date_from", "date_to",
+ "team_id", "filters", "sort", "limit", "exclude_services")
+
+
+def load():
+ if VIEWS_PATH.exists():
+ return json.loads(VIEWS_PATH.read_text(encoding="utf-8"))
+ return {"views": {}, "dashboards": {}}
+
+
+def _save(d):
+ VIEWS_PATH.parent.mkdir(parents=True, exist_ok=True)
+ VIEWS_PATH.write_text(json.dumps(d, indent=1), encoding="utf-8")
+
+
+def views():
+ return load().get("views", {})
+
+
+def dashboards():
+ return load().get("dashboards", {})
+
+
+def delete_view(name):
+ d = load()
+ d.get("views", {}).pop(name, None)
+ for dash in d.get("dashboards", {}).values():
+ dash["views"] = [v for v in dash.get("views", []) if v != name]
+ _save(d)
+
+
+def delete_dashboard(name):
+ d = load()
+ d.get("dashboards", {}).pop(name, None)
+ _save(d)
+
+
+# ------------------------------------------------------------------ UPDATE (owner directive
+# 2026-07-12: the Analyst can CREATE **and UPDATE** each workbook in the workspace)
+
+_QUERY_PATCH_KEYS = ("measures", "group_by", "grain", "date_from", "date_to", "team_id",
+ "filters", "sort", "limit", "exclude_services", "topic")
+_SPEC_PATCH_KEYS = ("title", "kind", "x", "y", "series", "metric",
+ "y2", "size", "value", "facet", "columns", "transforms")
+
+
+def update_view(name, changes):
+ """Patch a saved view's chart spec and/or query, VALIDATED BY RE-EXECUTION before saving —
+ an update that cannot run does not land. `changes` may contain spec keys (title/kind/x/y/
+ series/metric) and/or a `query` dict of query-key patches (a None value REMOVES the key)."""
+ d = load()
+ v = d.get("views", {}).get(name)
+ if not v:
+ raise SEM.ModelError(f"unknown view {name!r} (use list_workspace)")
+ spec = dict(v.get("chart") or {})
+ q = dict(spec.get("query") or {})
+ if not q:
+ raise SEM.ModelError(f"view {name!r} carries no query — rebuild it instead")
+ changes = dict(changes or {})
+ qpatch = changes.pop("query", None) or {}
+ bad = [k for k in changes if k not in _SPEC_PATCH_KEYS]
+ bad += [k for k in qpatch if k not in _QUERY_PATCH_KEYS]
+ if bad:
+ raise SEM.ModelError(f"unknown patch keys {bad} (spec: {list(_SPEC_PATCH_KEYS)}; "
+ f"query: {list(_QUERY_PATCH_KEYS)})")
+ for k, val in qpatch.items():
+ if val is None:
+ q.pop(k, None)
+ else:
+ q[k] = val
+ res = _run_query(q) # validation: it must RUN
+ new_spec = {**spec, **changes, "query": q}
+ rows = res["rows"]
+ if new_spec.get("transforms"): # the transform chain must replay too
+ import harness.transforms as TR
+ rows, _ = TR.apply({**res, "query": q}, new_spec["transforms"], run_query=_run_query)
+ cols = set(rows[0]) if rows else set()
+ for ref in ("x", "y", "series", "y2", "size", "value", "facet"):
+ if new_spec.get(ref) and cols and new_spec[ref] not in cols:
+ raise SEM.ModelError(f"{ref}={new_spec[ref]!r} not in the patched result columns "
+ f"{sorted(cols)} — patch {ref} too")
+ d["views"][name] = {"chart": new_spec,
+ "saved_at": time.strftime("%Y-%m-%d %H:%M")}
+ _save(d)
+ return {"updated": name, "row_count": res["row_count"],
+ "query": q, "note": "patched query re-ran successfully before saving"}
+
+
+def update_dashboard(name, views_list=None, new_name=None):
+ """Update a workbook (dashboard): recompose its views (order = display order) and/or rename
+ it. Renames follow through to scheduled reports that reference it."""
+ d = load()
+ dash = d.get("dashboards", {}).get(name)
+ if dash is None:
+ raise SEM.ModelError(f"unknown dashboard {name!r} (use list_workspace)")
+ if views_list is not None:
+ missing = [v for v in views_list if v not in d.get("views", {})]
+ if missing:
+ raise SEM.ModelError(f"unknown views {missing} — save_view them first")
+ dash["views"] = list(views_list)
+ dash["updated_at"] = time.strftime("%Y-%m-%d %H:%M")
+ if new_name and new_name != name:
+ if new_name in d.get("dashboards", {}) or new_name in d.get("views", {}):
+ raise SEM.ModelError(f"{new_name!r} already exists — pick another name")
+ d["dashboards"][new_name] = d["dashboards"].pop(name)
+ try: # follow the rename into schedules
+ import harness.routines as R
+ rt = R.load()
+ if name in rt.get("reports", {}):
+ rt["reports"][new_name] = rt["reports"].pop(name)
+ R._save(rt)
+ except Exception:
+ pass
+ name = new_name
+ _save(d)
+ return {"dashboard": name, "views": d["dashboards"][name]["views"]}
+
+
+def _run_query(q):
+ return SEM.store_query(**{k: q.get(k) for k in _QUERY_KEYS if q.get(k) is not None})
+
+
+def run_view(name):
+ """Re-execute one saved view's governed query — then REPLAY its recorded transform chain —
+ and return a fresh artifact dict ({'chart': {..., 'rows': [...]}}, {'table': {...}} or
+ {'kpi': {...}}) for the house renderer."""
+ v = views().get(name)
+ if not v:
+ raise SEM.ModelError(f"unknown view {name!r}")
+ spec = v.get("chart") or {}
+ q = spec.get("query")
+ if not q:
+ raise SEM.ModelError(f"view {name!r} was saved without its query (pre-2026-07-11) — "
+ "ask the Analyst to rebuild and re-save it")
+ res = _run_query(q)
+ if spec.get("kind") == "kpi" or (spec.get("metric") and spec.get("kind") != "table"):
+ metric = spec.get("metric") or spec.get("y") # KPI-shaped view
+ val = (res["rows"][0].get(metric) if res["rows"] else None)
+ kpi = {"metric": metric, "value": val or 0}
+ cq = spec.get("compare_query")
+ if cq:
+ prev_rows = _run_query(cq)["rows"]
+ prev = prev_rows[0].get(metric) if prev_rows else None
+ if prev:
+ kpi["delta_pct"] = ((val or 0) - prev) / abs(prev)
+ return {"kpi": kpi}
+ rows = res["rows"]
+ if spec.get("transforms"): # a saved view replays its transforms
+ import harness.transforms as TR
+ rows, _ = TR.apply({**res, "query": q}, spec["transforms"], run_query=_run_query)
+ if spec.get("kind") == "table":
+ return {"table": {**{k: spec.get(k) for k in ("kind", "title", "columns")},
+ "rows": rows}}
+ return {"chart": {**{k: spec.get(k) for k in ("kind", "x", "y", "series", "title",
+ "y2", "size", "value", "facet")},
+ "rows": rows}}
+
+
+def run_dashboard(name):
+ """All of a dashboard's views, freshly re-queried. Returns [(view_name, artifact|None, err)]."""
+ dash = dashboards().get(name)
+ if dash is None:
+ raise SEM.ModelError(f"unknown dashboard {name!r}")
+ out = []
+ for vn in dash.get("views", []):
+ try:
+ out.append((vn, run_view(vn), None))
+ except Exception as e:
+ out.append((vn, None, str(e)[:200]))
+ return out
+
+
+def store_freshness():
+ """Newest sync checkpoint across entities — the staleness footer ('data as of …')."""
+ try:
+ import harness.datastore as DS
+ ts = [s.get("updated") for s in DS.status().values() if s.get("updated")]
+ return max(ts) if ts else None
+ except Exception:
+ return None
diff --git a/platform/harness/windows.py b/platform/harness/windows.py
new file mode 100644
index 0000000000000000000000000000000000000000..97bcadca2d8ec6e25e7d24418440719344346602
--- /dev/null
+++ b/platform/harness/windows.py
@@ -0,0 +1,390 @@
+"""harness/windows.py — the DATE WINDOW vocabulary (CG-7, owner item 2, 2026-07-26).
+
+A filter condition on a measure reads:
+
+ Where [Sales] [in the last 90 days] [>] [5,000]
+
+The middle bracket is this module. It turns a window SPEC — a small JSON object a saved view can
+persist — into a concrete `(date_from, date_to)` pair of ISO dates.
+
+WHY IT IS ITS OWN MODULE, AND WHY IT TAKES `today` AS AN ARGUMENT
+-----------------------------------------------------------------------------------------------
+Two engines must agree on what "this quarter" means: this one (which compiles the SQL) and
+`customer-grid/windows.ts` (which renders the label the user reads and the bounds the client
+engine would use). If they disagree by one day, the grid shows a number the label denies, and
+nothing errors. `aios-web/verify_windows.py` holds them in lock-step over a fixed set of probe
+dates, exactly as verify_filter_engine.py does for the filter tree.
+
+`today` is a PARAMETER, never `date.today()` read inside. Three reasons, all learned:
+ - a gate cannot compare two engines on "now" — the two runs are milliseconds apart and land on
+ different sides of midnight roughly once every few thousand runs, which is the worst kind of
+ flake because it looks like a real divergence
+ - a window resolved during a request must not shift between the count query and the row query
+ - the tenant's day boundary is the tenant's, not the server's
+
+DESIGN NOTES THAT ARE EASY TO GET WRONG
+-----------------------------------------------------------------------------------------------
+ - Bounds are INCLUSIVE at both ends and are DATES, not timestamps. `store_query` casts both
+ sides to TIMESTAMP and appends 23:59:59 to the upper bound, so a bare date is correct there;
+ the client compares the 10-char ISO prefix, so a bare date is correct there too.
+ - "Last N days" INCLUDES today. Airtable's "the past week" means the last 7 days up to and
+ including now, not the 7 days before yesterday. Off-by-one here silently drops today's
+ orders from every "recent" filter — invisible until someone asks why a sale they just
+ entered is missing.
+ - Week starts MONDAY (ISO 8601). Stated rather than defaulted: Python's weekday() is
+ Monday=0 and JavaScript's getDay() is Sunday=0, so the two engines disagree unless one of
+ them is explicitly corrected. That correction is the single most likely divergence in this
+ file, and the gate probes a Sunday and a Monday for exactly that reason.
+ - A `custom` window with only one bound is legal and means open-ended on the other side.
+ - An UNRESOLVABLE window returns None rather than a default. A window that quietly becomes
+ "all time" would widen a filter while still reporting an authoritative count.
+"""
+import datetime as _dt
+
+#: Every window kind the UI may offer. Mirrors WINDOW_KINDS in customer-grid/windows.ts;
+#: verify_windows.py asserts the two lists are identical, because a kind the client can emit and
+#: the server cannot resolve is a filter that silently stops narrowing.
+WINDOW_KINDS = (
+ "all_time",
+ "today",
+ "yesterday",
+ "this_week",
+ "last_week",
+ "this_month",
+ "last_month",
+ "this_quarter",
+ "last_quarter",
+ "this_year",
+ "last_year",
+ "ytd",
+ "ytd_last_year",
+ "ltm",
+ "past_week",
+ "past_month",
+ "past_year",
+ "last_n_days",
+ "next_n_days",
+ "custom",
+)
+
+#: Kinds that carry an integer `n`.
+N_KINDS = frozenset({"last_n_days", "next_n_days"})
+
+#: How each kind reads in a sentence. The UI renders these; they are here so the label and the
+#: arithmetic cannot drift apart in the one place a user would never think to check.
+WINDOW_LABELS = {
+ "all_time": "all time",
+ "today": "today",
+ "yesterday": "yesterday",
+ "this_week": "this week",
+ "last_week": "last week",
+ "this_month": "this month",
+ "last_month": "last month",
+ "this_quarter": "this quarter",
+ "last_quarter": "last quarter",
+ "this_year": "this year",
+ "last_year": "last year",
+ "ytd": "year to date",
+ # "last year to date" (LYTD), not "year to date, last year": the longer phrasing CLIPPED to
+ # "year to date, last ye" in the 146px window select — and this vocabulary is CLOSED, so
+ # the rule for it is that it stays readable rather than that it fits. Seen in a live
+ # screenshot of the owner's own comparison; every assertion in that run was green.
+ "ytd_last_year": "last year to date",
+ "ltm": "the last 12 months",
+ "past_week": "the past week",
+ "past_month": "the past month",
+ "past_year": "the past year",
+ "last_n_days": "the last {n} days",
+ "next_n_days": "the next {n} days",
+ "custom": "a custom range",
+}
+
+MAX_N = 3650 # ten years; a bound, not a business rule
+
+# --- the DATE-VALUE anchors (owner item 3, 2026-07-26) ----------------------------------------
+# The second half of a date CONDITION, as distinct from a measure's window:
+#
+# Where [Last order] [is before] [one month ago]
+# ^ op ^ THIS
+#
+# A window answers "over what period do I sum"; an anchor answers "which single date am I
+# comparing against". Both live in this module for one reason: they are the same two-engine
+# contract, resolved from the same `today`, and a gate that holds one in lock-step and not the
+# other would leave half the sentence free to drift.
+
+#: Anchor modes, in the order the picker offers them. `exact` is the historical behaviour — a
+#: rule with NO mode is an `exact` rule whose value is an ISO date, which is what every view
+#: saved before this change carries.
+ANCHOR_MODES = (
+ "today",
+ "yesterday",
+ "one_week_ago",
+ "one_month_ago",
+ "n_days_ago",
+ "exact",
+)
+
+#: Modes that carry NO value. ⚠ This set is load-bearing far outside this module: a rule whose
+#: value is blank normally reads as INACTIVE, and an inactive rule is IGNORED — which WIDENS the
+#: result under a count nobody would doubt. Every activeness check (`isRuleActive` in TS,
+#: `filter_sql.is_rule_active`, and the validator's value handling) has to know these four are
+#: active with an empty value.
+ANCHOR_VALUE_FREE = frozenset({"today", "yesterday", "one_week_ago", "one_month_ago"})
+
+ANCHOR_LABELS = {
+ "today": "today",
+ "yesterday": "yesterday",
+ "one_week_ago": "one week ago",
+ "one_month_ago": "one month ago",
+ "n_days_ago": "{n} days ago",
+ "exact": "an exact date",
+}
+
+
+def _iso(d):
+ return d.isoformat()
+
+
+def _month_start(d):
+ return d.replace(day=1)
+
+
+def _month_end(d):
+ return _next_month(d.replace(day=1)) - _dt.timedelta(days=1)
+
+
+def _next_month(d):
+ return (d.replace(day=28) + _dt.timedelta(days=4)).replace(day=1)
+
+
+def _quarter_start(d):
+ return _dt.date(d.year, 3 * ((d.month - 1) // 3) + 1, 1)
+
+
+def _days_in_month(y, m):
+ return (_dt.date(y + (m == 12), 1 if m == 12 else m + 1, 1) - _dt.timedelta(days=1)).day
+
+
+def _shift_months(d, n):
+ """`d` moved `n` months, CLAMPING the day to the target month's length.
+
+ Jan 31 back one month is Dec 31, but Mar 31 back one month is Feb 28 (or 29) — there is no
+ Feb 31 to land on. Both engines must clamp identically or "the past month" differs by up to
+ three days for a third of the calendar; the gate probes a 31st and a leap day for exactly it.
+ """
+ total = (d.year * 12 + (d.month - 1)) + n
+ y, m = divmod(total, 12)
+ m += 1
+ return _dt.date(y, m, min(d.day, _days_in_month(y, m)))
+
+
+def _parse_date(v):
+ """Accept 'YYYY-MM-DD' (and tolerate a longer ISO timestamp by taking its date part)."""
+ if isinstance(v, _dt.date):
+ return v
+ s = str(v or "").strip()[:10]
+ if not s:
+ return None
+ try:
+ return _dt.date.fromisoformat(s)
+ except ValueError:
+ return None
+
+
+def normalize(spec):
+ """Coerce an untrusted window spec to `{kind, n?, from?, to?}` or None.
+
+ Fail-closed on the KIND (an unknown kind is not a window), tolerant on the rest — the same
+ split `clean_filter_tree` uses, so one malformed window cannot cost a user their saved view.
+ """
+ if not isinstance(spec, dict):
+ return None
+ kind = spec.get("kind")
+ if kind not in WINDOW_KINDS:
+ return None
+ out = {"kind": kind}
+ if kind in N_KINDS:
+ try:
+ n = int(spec.get("n"))
+ except (TypeError, ValueError):
+ return None
+ if n < 1 or n > MAX_N:
+ return None
+ out["n"] = n
+ if kind == "custom":
+ f, t = _parse_date(spec.get("from")), _parse_date(spec.get("to"))
+ if f is None and t is None:
+ return None # a custom range with no bounds is not a window
+ if f is not None and t is not None and f > t:
+ f, t = t, f # the builder cannot enforce order; the engine can
+ if f is not None:
+ out["from"] = _iso(f)
+ if t is not None:
+ out["to"] = _iso(t)
+ return out
+
+
+def resolve(spec, today):
+ """Window spec + the tenant's today -> `(date_from, date_to)`, both inclusive ISO dates.
+
+ Either side may be None, meaning open-ended. Returns None when the spec is not a window at
+ all — callers MUST treat that as "this condition cannot be evaluated" and refuse, never as
+ "no window", which would silently widen the result to all time.
+ """
+ spec = normalize(spec)
+ if spec is None:
+ return None
+ kind = spec["kind"]
+ d = _parse_date(today)
+ if d is None:
+ raise ValueError("resolve() needs an explicit `today` — see this module's docstring")
+
+ if kind == "all_time":
+ return (None, None)
+ if kind == "today":
+ return (_iso(d), _iso(d))
+ if kind == "yesterday":
+ y = d - _dt.timedelta(days=1)
+ return (_iso(y), _iso(y))
+
+ # ISO 8601: the week starts MONDAY. Python's weekday() is already Monday=0; the TS mirror
+ # has to correct getDay(), which is Sunday=0. The gate probes both a Sunday and a Monday.
+ if kind == "this_week":
+ start = d - _dt.timedelta(days=d.weekday())
+ return (_iso(start), _iso(start + _dt.timedelta(days=6)))
+ if kind == "last_week":
+ start = d - _dt.timedelta(days=d.weekday() + 7)
+ return (_iso(start), _iso(start + _dt.timedelta(days=6)))
+
+ if kind == "this_month":
+ return (_iso(_month_start(d)), _iso(_month_end(d)))
+ if kind == "last_month":
+ prev = _month_start(d) - _dt.timedelta(days=1)
+ return (_iso(_month_start(prev)), _iso(prev))
+
+ if kind == "this_quarter":
+ qs = _quarter_start(d)
+ qe = _month_end(_dt.date(qs.year, qs.month + 2, 1))
+ return (_iso(qs), _iso(qe))
+ if kind == "last_quarter":
+ prev_end = _quarter_start(d) - _dt.timedelta(days=1)
+ qs = _quarter_start(prev_end)
+ return (_iso(qs), _iso(prev_end))
+
+ if kind == "this_year":
+ return (_iso(_dt.date(d.year, 1, 1)), _iso(_dt.date(d.year, 12, 31)))
+ if kind == "last_year":
+ return (_iso(_dt.date(d.year - 1, 1, 1)), _iso(_dt.date(d.year - 1, 12, 31)))
+ if kind == "ytd":
+ # year-to-date ENDS TODAY, unlike this_year which runs to Dec 31. The distinction is the
+ # whole reason both exist: comparing "this year" against last year double-counts the
+ # months that have not happened yet.
+ return (_iso(_dt.date(d.year, 1, 1)), _iso(d))
+ if kind == "ytd_last_year":
+ # SAME PERIOD last year — Jan 1 LY through today's month/day LY. This is the honest
+ # partner of `ytd`, and it is not a nicety: it mirrors `core.periods.ytd_last_year`
+ # EXACTLY (including the Feb 29 -> Feb 28 clamp), which is what `pool()` computes the
+ # `revenue_ly` column from. `Sales[ytd] < Sales[ytd_last_year]` therefore reproduces the
+ # retired `at_risk > 0` condition rather than approximating it. Comparing `ytd` against
+ # `last_year` instead would pit seven months against twelve.
+ return (_iso(_dt.date(d.year - 1, 1, 1)), _iso(_shift_months(d, -12)))
+ if kind == "ltm":
+ # the last twelve months INCLUDING today: 365 days back, both ends inclusive
+ return (_iso(d - _dt.timedelta(days=364)), _iso(d))
+
+ # "The past week/month/year" are ROLLING and end TODAY — Airtable's wording, and NOT the
+ # calendar kinds above: `last_week` is the previous Monday-Sunday, `past_week` is the seven
+ # days ending today. Both are offered because a user means different things by them, and
+ # picking one to serve both would silently answer the other question.
+ # past_week = the same rule as last_n_days(7) — one period back, PLUS ONE DAY, so today
+ # is included and the span is exactly 7 days rather than 8.
+ # past_year agrees with `ltm` except across a leap day, where the calendar shift keeps the
+ # same month/day and the 364-day subtraction cannot.
+ if kind == "past_week":
+ return (_iso(d - _dt.timedelta(days=6)), _iso(d))
+ if kind == "past_month":
+ return (_iso(_shift_months(d, -1) + _dt.timedelta(days=1)), _iso(d))
+ if kind == "past_year":
+ return (_iso(_shift_months(d, -12) + _dt.timedelta(days=1)), _iso(d))
+
+ if kind == "last_n_days":
+ # INCLUSIVE of today — "the last 7 days" is today and the 6 before it, not the 7 before
+ # yesterday. Getting this wrong drops today's orders from every recent-activity filter.
+ return (_iso(d - _dt.timedelta(days=spec["n"] - 1)), _iso(d))
+ if kind == "next_n_days":
+ return (_iso(d), _iso(d + _dt.timedelta(days=spec["n"] - 1)))
+
+ if kind == "custom":
+ return (spec.get("from"), spec.get("to"))
+ raise AssertionError(f"unhandled window kind {kind!r}") # unreachable; WINDOW_KINDS is closed
+
+
+def label(spec):
+ """How a window reads in the condition sentence ('in the last 90 days')."""
+ spec = normalize(spec)
+ if spec is None:
+ return "an invalid range"
+ return WINDOW_LABELS[spec["kind"]].format(n=spec.get("n"))
+
+
+def resolve_anchor(mode, value, today):
+ """A date condition's right-hand side -> ONE inclusive ISO date, or None.
+
+ `mode` is an entry of ANCHOR_MODES; None/'' means `exact`, which is what every view saved
+ before anchors existed carries (op + an ISO date in `value`). `value` supplies the number for
+ `n_days_ago` and the date for `exact`, and is ignored by the four value-free modes.
+
+ Returns None when the anchor cannot be resolved — an unknown mode, a non-numeric N, a value
+ that is not a date. The caller must then treat the CONDITION as unanswerable and match
+ nothing. It must NOT fall through to "no condition": that widens the result while the count
+ beside it still looks authoritative, which is the whole reason this returns None rather than
+ a best guess (same contract as `resolve()` above).
+
+ `n_days_ago` accepts n = 0 where a WINDOW requires n >= 1. A zero-day window is empty and
+ could only be a mistake; "0 days ago" is today, which is a date a person can mean.
+ """
+ m = mode or "exact"
+ if m not in ANCHOR_MODES:
+ return None
+ d = _parse_date(today)
+ if d is None:
+ raise ValueError("resolve_anchor() needs an explicit `today` — see this module's "
+ "docstring on why the clock is never read here")
+ if m == "today":
+ return _iso(d)
+ if m == "yesterday":
+ return _iso(d - _dt.timedelta(days=1))
+ if m == "one_week_ago":
+ # A week ago is a DATE (today minus 7), not the past-week RANGE. The two read almost
+ # identically in English and mean different things in a comparison.
+ return _iso(d - _dt.timedelta(days=7))
+ if m == "one_month_ago":
+ return _iso(_shift_months(d, -1))
+ if m == "n_days_ago":
+ s = str("" if value is None else value).strip()
+ # `[0-9]` not `\d`: a Python \d matches every Unicode decimal digit, so a fullwidth
+ # '30' would resolve here and be rejected by the TS mirror's Number() — the exact
+ # two-engine divergence filter_sql.to_num was rewritten to avoid.
+ if not s or not all("0" <= ch <= "9" for ch in s):
+ return None
+ n = int(s)
+ # No `n < 0` guard: the digit test above already excludes a sign, so it would be
+ # unreachable. The negative control proved that — removing it changed nothing, which is
+ # how dead code hides in a defensive-looking line. The CAP is the live guard.
+ if n > MAX_N:
+ return None
+ return _iso(d - _dt.timedelta(days=n))
+ parsed = _parse_date(value) # exact
+ return None if parsed is None else _iso(parsed)
+
+
+def anchor_label(mode, value):
+ """How an anchor reads in the condition sentence ('one month ago', '30 days ago')."""
+ m = mode or "exact"
+ if m not in ANCHOR_MODES:
+ return "an invalid date"
+ if m == "n_days_ago":
+ return ANCHOR_LABELS[m].format(n=str("" if value is None else value).strip() or "N")
+ if m == "exact":
+ return str("" if value is None else value).strip() or ANCHOR_LABELS[m]
+ return ANCHOR_LABELS[m]
diff --git a/platform/harness/workspace.py b/platform/harness/workspace.py
new file mode 100644
index 0000000000000000000000000000000000000000..aba71cccd19acdf5f5c7691911f7730f4a6c9a99
--- /dev/null
+++ b/platform/harness/workspace.py
@@ -0,0 +1,226 @@
+"""harness/workspace.py — the unified WORKSPACE object model (owner directive 2026-07-12:
+"every single time we create a module or analytics from the AIOS, it should be modular — a
+workspace").
+
+Every artifact AIOS creates — a view, a dashboard, an alert, a scheduled report — is a MODULAR,
+self-contained workspace object: it carries everything needed to re-run itself (the governed
+query / metric reference), renders through the house primitives, composes into bigger objects
+(views → dashboards → schedules), and exports as a TENANT-AGNOSTIC template (queries reference
+topic/metric KEYS; scope lives in the model, so a template stamps onto any tenant whose model
+has those keys — the same principle that made model/ itself the template library).
+
+This module is the facade: one uniform envelope + one listing/manage/export surface over the
+underlying stores (views.json, routines.json). It does not replace them — it makes them one
+workspace.
+"""
+import json
+import time
+from pathlib import Path
+
+import harness.views as V
+import harness.routines as R
+import harness.semantic as SEM
+
+TEMPLATES_DIR = Path(__file__).resolve().parents[1] / "model" / "templates"
+
+# query keys that are tenant/context-specific and must NOT travel in a template
+_STRIP = ("team_id", "filters", "date_from", "date_to")
+
+
+def items():
+ """Every workspace object, uniform envelope: {kind, name, detail, created_at}."""
+ out = []
+ vs, ds = V.views(), V.dashboards()
+ dash_members = {vn for d in ds.values() for vn in d.get("views", [])}
+ for name, v in vs.items():
+ spec = v.get("chart") or {}
+ q = spec.get("query") or {}
+ out.append({"kind": "view", "name": name,
+ "detail": f"{q.get('topic', '?')} · {', '.join(q.get('measures') or [])}"
+ + (" · in a dashboard" if name in dash_members else ""),
+ "created_at": v.get("saved_at", "")})
+ for name, d in ds.items():
+ out.append({"kind": "dashboard", "name": name,
+ "detail": f"{len(d.get('views', []))} view(s): "
+ + ", ".join(d.get("views", [])[:4]),
+ "created_at": d.get("created_at", "")})
+ rt = R.load()
+ for key, a in rt.get("alerts", {}).items():
+ out.append({"kind": "alert", "name": key,
+ "detail": f"{a.get('metric')} · {a.get('mode')}"
+ + (f" · team {a['team_id']}" if a.get("team_id") else ""),
+ "created_at": a.get("created_at", "")})
+ for key, r in rt.get("reports", {}).items():
+ out.append({"kind": "report", "name": key,
+ "detail": f"{r.get('cadence')} · {r.get('channel')}",
+ "created_at": r.get("created_at", "")})
+ for key, i in (rt.get("insights") or {}).items():
+ out.append({"kind": "insight", "name": key,
+ "detail": f"{i.get('cadence')} · \"{(i.get('prompt') or '')[:60]}\"",
+ "created_at": i.get("created_at", "")})
+ return sorted(out, key=lambda x: x.get("created_at") or "", reverse=True)
+
+
+def delete(kind, name):
+ if kind == "view":
+ V.delete_view(name)
+ elif kind == "dashboard":
+ V.delete_dashboard(name)
+ elif kind == "alert":
+ R.delete_alert(name)
+ elif kind == "report":
+ R.delete_report(name)
+ elif kind == "insight":
+ R.delete_insight(name)
+ else:
+ raise SEM.ModelError(f"unknown workspace kind {kind!r}")
+
+
+# ------------------------------------------------------------------ templates (tenant-agnostic)
+
+def _templatize_view(name):
+ v = V.views().get(name)
+ if not v:
+ raise SEM.ModelError(f"unknown view {name!r}")
+ spec = dict(v.get("chart") or {})
+ q = dict(spec.get("query") or {})
+ if not q:
+ raise SEM.ModelError(f"view {name!r} carries no query — cannot templatize")
+ stripped = {k: q.pop(k) for k in _STRIP if k in q}
+ stripped = {k: v for k, v in stripped.items() if v} # record only real tenant baggage
+ q["window"] = "ytd" # instantiation default; tenant picks at stamp time
+ spec["query"] = q
+ return {"name": name, "spec": spec,
+ "stripped": sorted(stripped)} # honest record of what was tenant-specific
+
+
+def export_template(kind, name):
+ """Export a view or dashboard as a tenant-agnostic template JSON in model/templates/.
+ Dashboards embed their views' templates — one self-contained modular unit."""
+ if kind == "view":
+ tpl = {"template": "view", "exported_at": time.strftime("%Y-%m-%d %H:%M"),
+ **_templatize_view(name)}
+ elif kind == "dashboard":
+ d = V.dashboards().get(name)
+ if d is None:
+ raise SEM.ModelError(f"unknown dashboard {name!r}")
+ tpl = {"template": "dashboard", "name": name,
+ "exported_at": time.strftime("%Y-%m-%d %H:%M"),
+ "views": [_templatize_view(vn) for vn in d.get("views", [])]}
+ else:
+ raise SEM.ModelError("only views and dashboards templatize (alerts/reports are one-liners "
+ "— recreate from the metric key)")
+ TEMPLATES_DIR.mkdir(parents=True, exist_ok=True)
+ safe = "".join(c if c.isalnum() or c in "-_ " else "_" for c in name).strip().replace(" ", "-")
+ path = TEMPLATES_DIR / f"{kind}-{safe}.json"
+ path.write_text(json.dumps(tpl, indent=1), encoding="utf-8")
+ return str(path)
+
+
+PROPOSALS_DIR = Path(__file__).resolve().parents[1] / "model" / "proposals"
+
+
+def promote(kind, name, note=""):
+ """Nominate a workspace object for PROMOTION into the governed model (principle 3: model
+ just-in-time, promote what's proven). v0: writes a reviewable proposal file under
+ model/proposals/ — the next Claude session is the Modeler: it reviews the proposal, lands
+ the actual model diff (a metric, a skill recipe, or a curated template), and deletes the
+ proposal. Git is the branch mode; nothing merges without that review."""
+ if kind == "view":
+ v = V.views().get(name)
+ if not v:
+ raise SEM.ModelError(f"unknown view {name!r}")
+ spec = v.get("chart") or {}
+ payload = {"kind": "view", "name": name, "spec": spec}
+ q = spec.get("query") or {}
+ hint = (f"candidate: a named metric or skill recipe on topic {q.get('topic')!r} "
+ f"(measures {q.get('measures')}, group_by {q.get('group_by')})")
+ elif kind == "dashboard":
+ d = V.dashboards().get(name)
+ if d is None:
+ raise SEM.ModelError(f"unknown dashboard {name!r}")
+ payload = {"kind": "dashboard", "name": name, "views": d.get("views", []),
+ "view_specs": {vn: (V.views().get(vn) or {}).get("chart")
+ for vn in d.get("views", [])}}
+ hint = "candidate: a curated template in model/templates/ or a skill recipe"
+ else:
+ raise SEM.ModelError("only views and dashboards can be nominated")
+ try:
+ import harness.telemetry as TEL
+ usage = TEL.summary()
+ except Exception:
+ usage = {}
+ PROPOSALS_DIR.mkdir(parents=True, exist_ok=True)
+ safe = "".join(c if c.isalnum() or c in "-_ " else "_" for c in name).strip().replace(" ", "-")
+ path = PROPOSALS_DIR / f"{time.strftime('%Y%m%d-%H%M')}-{kind}-{safe}.json"
+ path.write_text(json.dumps({
+ "proposed_at": time.strftime("%Y-%m-%d %H:%M"),
+ "note": note, "suggested": hint, "usage_at_nomination": usage, **payload,
+ "reviewer_instructions": (
+ "MODELER REVIEW (next Claude session): decide metric / skill-recipe / template / "
+ "reject; land the model diff in model/*.yml with a validate contract where "
+ "applicable; re-run the eval gate; DELETE this proposal file; log the decision."),
+ }, indent=1), encoding="utf-8")
+ return str(path)
+
+
+def proposals():
+ if not PROPOSALS_DIR.exists():
+ return []
+ return sorted(p.name for p in PROPOSALS_DIR.glob("*.json"))
+
+
+def templates():
+ if not TEMPLATES_DIR.exists():
+ return []
+ return sorted(p.name for p in TEMPLATES_DIR.glob("*.json"))
+
+
+def _ytd():
+ from datetime import date
+ t = date.today()
+ return t.replace(month=1, day=1).isoformat(), t.isoformat()
+
+
+def instantiate_template(filename, new_name=None):
+ """Stamp a template into THIS tenant's workspace: window resolves to YTD now; tenant scope
+ comes from the model (topics/tenant.yml), so no per-tenant edits are needed."""
+ path = TEMPLATES_DIR / filename
+ if not path.exists():
+ raise SEM.ModelError(f"unknown template {filename!r}")
+ tpl = json.loads(path.read_text(encoding="utf-8"))
+ df, dt_ = _ytd()
+
+ def _stamp_view(vtpl, vname):
+ spec = dict(vtpl["spec"])
+ q = dict(spec.get("query") or {})
+ q.pop("window", None)
+ q["date_from"], q["date_to"] = df, dt_
+ spec["query"] = q
+ spec["title"] = vname
+ import harness.tools as T
+ T.save_view(vname, {"chart": spec})
+ return vname
+
+ def _fresh(name):
+ """Never clobber an existing object — suffix until free."""
+ vs, ds = V.views(), V.dashboards()
+ cand, i = name, 2
+ while cand in vs or cand in ds:
+ cand = f"{name} ({i})"
+ i += 1
+ return cand
+
+ if tpl.get("template") == "view":
+ vname = _fresh(new_name or tpl["name"])
+ return {"created": "view", "name": _stamp_view(tpl, vname)}
+ if tpl.get("template") == "dashboard":
+ dname = _fresh(new_name or tpl["name"])
+ # namespace member views under the new dashboard so instantiation NEVER overwrites
+ # existing views (modularity means copies, not aliasing)
+ vnames = [_stamp_view(vt, _fresh(f"{dname} · {vt['name']}"))
+ for vt in tpl.get("views", [])]
+ import harness.tools as T
+ T.compose_dashboard(dname, vnames)
+ return {"created": "dashboard", "name": dname, "views": vnames}
+ raise SEM.ModelError(f"bad template file {filename!r}")
diff --git a/platform/model/metrics/gl.yml b/platform/model/metrics/gl.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b82a3b8d1d9ba18a660d9fce536e3dc952f6c4dc
--- /dev/null
+++ b/platform/model/metrics/gl.yml
@@ -0,0 +1,36 @@
+# Metrics: gl — raw-GL basis metrics (topic gl_lines), matching modules/expenses.py definitions
+# EXACTLY (the parity anchor): opex = Σ balance of posted lines to expense-type accounts
+# ('expense','expense_depreciation'), COGS ('expense_direct_cost') EXCLUDED; gl_revenue = income
+# accounts negated. Filtered measures use store_filter_sql (aliases: l=line, m=move, a=account).
+topic: gl_lines
+metrics:
+ - key: opex
+ label: Operating expense
+ agg: sum
+ field: balance
+ store_filter_sql: "a.account_type IN ('expense', 'expense_depreciation')"
+ format: usd
+ description: "Posted operating expense from the GL (all expense-type accounts; COGS excluded) — the Expenses dashboard's basis."
+ ai_context: "Company-level; includes payroll JEs/depreciation/fees that never hit vendor bills. Watch close-lag: the newest month is often still being booked."
+ validate:
+ method: gl_opex
+ note: "Store-path opex must equal the live Odoo aggregate (posted, expense-type accounts) to the cent."
+
+ - key: gl_cogs
+ label: COGS (GL)
+ agg: sum
+ field: balance
+ store_filter_sql: "a.account_type = 'expense_direct_cost'"
+ format: usd
+ description: "Cost of goods sold on the GL basis (expense_direct_cost accounts)."
+ ai_context: "Distinct from the sales-margin COGS (revenue - margin on order lines) — different basis, reconcile deliberately, never mix silently."
+
+ - key: gl_revenue
+ label: Revenue (GL)
+ agg: sum
+ field: balance
+ negate: true
+ store_filter_sql: "a.account_type IN ('income', 'income_other')"
+ format: usd
+ description: "GL-basis revenue: income-type account balances, negated to read positively."
+ ai_context: "ALL-channel and accrual-basis — will not equal wholesale order revenue (sales_lines); that difference is structural (Amazon channel + timing), not an error."
diff --git a/platform/model/metrics/invoice_lines.yml b/platform/model/metrics/invoice_lines.yml
new file mode 100644
index 0000000000000000000000000000000000000000..0af67a191e51649fd6122de3940b1ef0aa3e8f69
--- /dev/null
+++ b/platform/model/metrics/invoice_lines.yml
@@ -0,0 +1,105 @@
+# Metrics: invoice_lines — the invoice-LINE lens, with per-line agent allocation (2026-07-28).
+#
+# These make the owner's agent questions resolvable by the Analyst / metric dictionary / grid
+# instead of an ad-hoc script. Slice any of them by the `allocation`, `agent`, `agent_role` or
+# `team` dims on the topic.
+topic: invoice_lines
+metrics:
+ - key: invoiced_line_sales_gross
+ label: Invoiced line sales (gross)
+ agg: sum
+ field: price_subtotal
+ store_filter_sql: "l.move_type = 'out_invoice'"
+ format: usd
+ description: "Untaxed invoice-line subtotals, invoices only (before credit notes)."
+ ai_context: >-
+ A component of `invoiced_line_sales`, not an answer on its own — it ignores credit notes.
+
+ - key: invoiced_line_refunds
+ label: Invoiced line refunds
+ agg: sum
+ field: price_subtotal
+ store_filter_sql: "l.move_type = 'out_refund'"
+ format: usd
+ description: "Untaxed credit-note line subtotals, reported POSITIVE."
+ ai_context: >-
+ Credit-note `price_subtotal` is stored POSITIVE (unlike the document-level
+ amount_untaxed_signed on topic credit_notes), so this metric carries no negation and
+ `invoiced_line_sales` subtracts it.
+
+ - key: invoiced_line_sales
+ label: Invoiced line sales (net)
+ agg: derived
+ expr: "invoiced_line_sales_gross - invoiced_line_refunds"
+ format: usd
+ description: >-
+ THE invoice-line revenue measure: untaxed product-line subtotals of posted customer
+ invoices, net of credit notes.
+ ai_context: >-
+ Use this — not the gross component — whenever asked for invoice-line sales. Net of credit
+ notes. This is NOT `revenue` (order-line based, topic sales_lines); the two differ by
+ unbilled orders and billing timing, and on Fisch 2025 they run ~2% apart, which is normal
+ and must not be "reconciled" away.
+ validate:
+ method: line_vs_move_grain
+ note: >-
+ Independent check: the sum of these product-line subtotals must equal the sum of
+ amount_untaxed_signed over the SAME posted customer moves read straight from Odoo.
+ Verified 2026-07-28 all-scope 2025: 8,955,776.63 - 149,961.44 = 8,805,815.19 exactly.
+ Catches a lost credit-note negation and a wrong display_type filter, neither of which
+ self-consistency can see.
+
+ - key: agent_allocated_sales
+ label: Sales allocated to an agent
+ agg: sum
+ field: price_subtotal
+ store_filter_sql: "l.move_type = 'out_invoice' AND ca.is_true_agent"
+ format: usd
+ description: >-
+ Invoice-line sales whose line carries a REAL agent (res.partner.agent = True) — excludes
+ the internal salespeople who also carry commission lines.
+ ai_context: >-
+ Gross of credit notes by design (refund lines rarely carry commission rows); for the netted
+ view slice `invoiced_line_sales` by the `allocation` dim instead, which is MECE.
+ ⚠ This is "sales ALLOCATED to an agent", NOT "sales BY customers who have an agent" — 403
+ of Fisch's 518 agent customers are mixed, so the two differ by ~$192k on 2025.
+
+ - key: unallocated_line_sales
+ label: Sales not allocated to an agent
+ agg: sum
+ field: price_subtotal
+ store_filter_sql: "l.move_type = 'out_invoice' AND ca.is_true_agent IS NOT TRUE"
+ format: usd
+ description: >-
+ Invoice-line sales with no REAL agent on the line — the strict reading, which counts
+ salesperson-only lines as unallocated.
+ ai_context: >-
+ Two defensible readings and this is the WIDER one (salesperson-covered business counts as
+ unallocated). The narrower "no commission row at all" figure is this metric sliced to
+ allocation = 'none'. On Fisch 2025 the two are $1,447,579.59 vs $1,086,381.35 — a material
+ gap, so state which reading you gave.
+
+ - key: agent_line_customers
+ label: Customers with an agent on the line
+ agg: count_distinct
+ field: partner_id
+ store_filter_sql: "ca.is_true_agent"
+ format: int
+ description: "Distinct customers with a real agent on at least one invoice line."
+ ai_context: >-
+ Fisch 2025 = 518. Counting customers, not revenue: a customer counts here if ANY line
+ carries an agent, so pairing this with `agent_allocated_sales` mixes two grains — pair it
+ with the customers' TOTAL sales if the question is "what do agent-assigned customers
+ generate" ($3,187,571 territory), and say which you did.
+
+ - key: commission_amount
+ label: Commission accrued
+ agg: sum
+ field: amount
+ format: usd
+ topic: commission_lines
+ description: "Commission accrued on invoice lines (the OCA sale-commission `amount`)."
+ ai_context: >-
+ Resolved on topic `commission_lines` (one row per line × agent) NOT on invoice_lines,
+ because a line with two agents carries two commission amounts and the deduplicated join on
+ invoice_lines would drop one. Never sum commission through invoice_lines.
diff --git a/platform/model/metrics/receivables.yml b/platform/model/metrics/receivables.yml
new file mode 100644
index 0000000000000000000000000000000000000000..f982b8f2e7d1934d6ebe4f43e30e53b50aaae23a
--- /dev/null
+++ b/platform/model/metrics/receivables.yml
@@ -0,0 +1,30 @@
+# Metrics: receivables (topic receivables) — AR exposure, matching the Collections conventions
+# (amount_residual_signed nets credit notes; overdue = past invoice_date_due as of today).
+topic: receivables
+metrics:
+ - key: ar_outstanding
+ label: AR outstanding
+ agg: sum
+ field: amount_residual_signed
+ format: usd
+ description: "Total unpaid customer balance: signed residual over posted invoices and credit notes (credit notes net against invoices)."
+ ai_context: "Ask WITHOUT a date window for the current balance (a window filters by invoice date, not by 'as of')."
+ validate:
+ method: ar_outstanding
+ note: "Store-path outstanding must equal the live Odoo aggregate over the same domain, to the cent."
+
+ - key: ar_overdue
+ label: AR overdue
+ agg: sum
+ field: amount_residual_signed
+ store_filter_sql: "CAST(m.invoice_date_due AS DATE) < CURRENT_DATE AND m.payment_state != 'paid'"
+ format: usd
+ description: "Unpaid balance on documents past their due date as of today."
+ ai_context: "Overdue is judged against today's date at query time; pairs with the Collections worklist for who-to-call."
+
+ - key: open_invoices
+ label: Open invoices
+ agg: count
+ store_filter_sql: "m.payment_state IN ('not_paid', 'partial') AND m.move_type = 'out_invoice'"
+ format: int
+ description: "Count of posted customer invoices not yet fully paid."
diff --git a/platform/model/metrics/returns.yml b/platform/model/metrics/returns.yml
new file mode 100644
index 0000000000000000000000000000000000000000..d348189304e42ebedeaa9d342c44340345b5e3a9
--- /dev/null
+++ b/platform/model/metrics/returns.yml
@@ -0,0 +1,55 @@
+# Metrics: returns — the credit-note lens, defined once (2026-07-27, owner's ask).
+#
+# `modules/returns.py` has read these numbers from Odoo since it shipped; this file makes them
+# MODEL metrics so the Analyst, the metric dictionary and the customer-grid condition builder all
+# resolve the same definition instead of three.
+topic: credit_notes
+metrics:
+ - key: returns
+ label: Returns $
+ agg: sum
+ field: amount_untaxed_signed
+ negate: true
+ format: usd
+ description: >-
+ Untaxed value of posted customer credit notes (refunds), reported POSITIVE.
+ ai_context: >-
+ ⚠ NEGATE IS LOAD-BEARING. `amount_untaxed_signed` is negative on a credit note, so the raw
+ sum is negative and this metric flips it. A returns figure that arrives negative means the
+ negation was lost somewhere — and it will read as "no returns" rather than as an error.
+ Company-level: credit notes are not business-unit tagged (they all carry team_id 1), so
+ never attribute a returns number to Fisch or Royal. Attribute by CUSTOMER instead.
+ validate:
+ method: returns_sign
+ note: >-
+ Independent check: the metric must equal the ABSOLUTE untaxed total of the same posted
+ credit notes read straight from Odoo, and must be positive. Catches a lost or doubled
+ negation, which self-consistency cannot see.
+
+ - key: invoiced
+ label: Invoiced $
+ topic: customer_invoices
+ agg: sum
+ field: amount_untaxed_signed
+ format: usd
+ description: >-
+ Untaxed value of posted customer invoices — the denominator the business rates returns
+ against.
+ ai_context: >-
+ NOT `revenue`. `revenue` is order-LINE subtotals of confirmed sales orders; this is posted
+ billing documents, and the two differ by unbilled orders and by billing timing. Use
+ `revenue` for "sales" and this only as the return-rate denominator.
+
+ - key: returns_pct
+ label: Return %
+ agg: ratio
+ numerator: returns
+ denominator: invoiced
+ format: pct
+ description: "Returns as a share of invoiced sales — the rate modules/returns.py reports."
+ ai_context: >-
+ A FRACTION (0-1), like every other pct metric here — 0.0159 is 1.59%. The condition builder
+ divides a typed percentage by 100 before comparing (`input_scale`), so a user types 5 and
+ means 5%. Guarded against zero invoiced (returns 0). Cross-topic: the numerator is on
+ credit_notes and the denominator on customer_invoices, so it is resolved per customer by
+ computing both and combining, never by one query.
diff --git a/platform/model/metrics/sales.yml b/platform/model/metrics/sales.yml
new file mode 100644
index 0000000000000000000000000000000000000000..01eb6f34a1461c6d1e0124fab1807d63c2886092
--- /dev/null
+++ b/platform/model/metrics/sales.yml
@@ -0,0 +1,84 @@
+# Metrics: sales — the core wholesale metrics, defined ONCE (OM-0). Every surface (pages, the
+# metric dictionary, the Analyst, MCP) resolves these by key through harness/semantic.py.
+# Fields per metric:
+# key/label/description — identity + the human definition (visibility = trust)
+# agg + field — sum | count_distinct over the topic's entity
+# agg: ratio — numerator/denominator are metric KEYS (resolved recursively)
+# agg: derived + expr — arithmetic over metric keys (safe parser; +,-,*,/ and parens only)
+# format — usd | int | pct (rendering hint for surfaces)
+# ai_context — what a small model must know to use the metric correctly
+# validate — the INDEPENDENT Odoo cross-check contract (named method implemented in
+# harness/semantic.py _VALIDATORS; a metric that can't tie out says so)
+topic: sales_lines
+metrics:
+ - key: revenue
+ label: Revenue
+ agg: sum
+ field: price_subtotal
+ format: usd
+ description: "Untaxed revenue of confirmed wholesale order lines (the owner's 'sales' number)."
+ ai_context: "Always untaxed; excludes Amazon (GIFTWARE DEALS) and unconfirmed orders. Filter one BU via team_id (Fisch=5, Royal=6)."
+ validate:
+ method: order_level_revenue
+ note: "Σ line price_subtotal must equal Σ parent-order amount_untaxed under the same scope, to the cent (line vs order basis — the built-in cross-check)."
+
+ - key: units
+ label: Units sold
+ agg: sum
+ field: product_uom_qty
+ format: int
+ description: "Total quantity across confirmed wholesale order lines."
+ ai_context: "Mixed UoMs are summed as ordered quantity; for weight/case analysis convert per product UoM first."
+
+ - key: margin
+ label: Gross margin $
+ agg: sum
+ field: margin
+ format: usd
+ description: "Line revenue minus line cost (Odoo Margin module), summed."
+ ai_context: "margin is read_group-aggregatable (Margin module installed). COGS = revenue - margin. purchase_price is per-UNIT cost — never sum it as a total."
+
+ - key: cogs
+ label: COGS
+ agg: derived
+ expr: "revenue - margin"
+ format: usd
+ description: "Cost of goods sold, derived: revenue minus gross margin."
+ ai_context: "Derived, not pulled — Odoo carries cost on lines as margin; COGS is the difference."
+
+ - key: margin_pct
+ label: Gross margin %
+ agg: ratio
+ numerator: margin
+ denominator: revenue
+ format: pct
+ description: "Gross margin as a share of revenue."
+ ai_context: "Guarded against zero revenue (returns 0). Compare across BUs/categories at the same scope only."
+
+ - key: orders
+ label: Orders
+ topic: sales_orders
+ agg: count
+ format: int
+ description: "Confirmed wholesale orders in the window (order-header count — what the scorecards show)."
+ ai_context: "Order-level count; slightly higher than distinct-orders-from-lines because a few confirmed orders carry zero lines (a data-health artifact the reconciliation contract counts exactly)."
+ validate:
+ method: order_count
+ note: "Order-level count must equal distinct line-parent orders + line-less orders, exactly (surfaces empty orders instead of hiding them in a tolerance)."
+
+ - key: customers
+ label: Active customers
+ agg: count_distinct
+ field: order_partner_id
+ format: int
+ description: "Distinct customers with at least one confirmed wholesale order line in the window."
+ ai_context: "Customer = the order's partner. Agent attribution uses res.partner.agent_ids, NOT the order user_id."
+
+ - key: aov
+ label: Average order value
+ agg: ratio
+ numerator: revenue
+ denominator: orders
+ format: usd
+ description: "Revenue per distinct order."
+ ai_context: "Ratio of two registered metrics at identical scope; never average per-order averages."
diff --git a/platform/model/skills/analytics.skill.yml b/platform/model/skills/analytics.skill.yml
new file mode 100644
index 0000000000000000000000000000000000000000..c481cffad883374ea062182e9cd1a1eba91903ce
--- /dev/null
+++ b/platform/model/skills/analytics.skill.yml
@@ -0,0 +1,171 @@
+# In-product SKILL: the ANALYTICS TRANSFORM LIBRARY (v1, 2026-07-18) — the Tableau-class
+# table-calc + analytics capability set, mapped onto the ONE governed transform_result tool.
+# Grounding: .claude/wiki/research/analytics-tools.md. Every op here EXISTS in harness/transforms.py
+# (OPS) and is unit-proven in _demo_analytics.py — recipes and code version together.
+#
+# HOW IT WORKS: run_semantic_query -> transform_result([{op, ...}, ...]) -> make_chart|make_table.
+# Ops CHAIN (each takes the previous derived result). The model picks op names + params; the
+# platform computes deterministically over the exact governed rows and every derived result still
+# drills to its numbers. NEVER do arithmetic in your head — there is an op for it.
+key: analytics
+label: Analytics transforms (table calcs, stats, business templates)
+
+# ========================================================================= THE ADDITIVITY LAW
+# The ONE rule that must never be broken: revenue, units, margin, cogs, orders are ADDITIVE — you
+# may sum/accumulate them. customers (a DISTINCT count) and margin_pct / aov (RATIOS) are NOT
+# additive — summing them over months or groups OVER-COUNTS and is forbidden. The accumulating ops
+# (running_total, share_of_total, cum_share, moving_sum, abc_classify, concentration) REFUSE a
+# non-additive measure with an error. For a CUMULATIVE or TRAILING distinct count / ratio, use the
+# re-query ops ytd / rolling (they re-run the governed query per window — correct by construction),
+# never running_total/moving_sum.
+
+# ========================================================================= THE OP CATALOG (families)
+ops:
+ ordering_rank: >
+ sort{by,direction} · head{n} · bottom_n{by,n} · rank{by,direction} · rank_pct{by,direction}
+ (percentile rank 0-100) · ntile{by,tiles,direction} (quartile=4/decile=10 buckets) ·
+ top_n{by,n,other} (N largest + honest Other) · add_total{label} (grand-total row).
+ part_to_whole: "share_of_total{of} (adds _share_pct) · cum_share{of} (pareto prep, sorted). ADDITIVE-only."
+ running_moving: >
+ running_total{of} (ADDITIVE-only) · running_avg{of} · running_max{of} · running_min{of} ·
+ running_count{} (cumulative # of rows) · moving_average{of,window} · moving_sum{of,window}
+ (ADDITIVE-only) · moving_median{of,window} · rolling_std{of,window} (trailing volatility).
+ running_avg/max/min and the moving averages/medians/std are smoothings — valid on any measure.
+ period_over_period: >
+ diff{of} (vs previous row, one column) · pct_change{of} · lag{of,k} · lead{of,k} ·
+ diff_from_first{of} · index_to_100{of} (rebase a series to 100) · percent_of_max{of} ·
+ compare{a,b,how:diff|pct|ratio} (between TWO existing columns, e.g. revenue vs revenue_ly).
+ All row-wise — safe on any measure (a period-over-period change of a ratio is fine).
+ distribution_stats: >
+ bin{of,bins} (histogram buckets) · describe{of} (count/mean/median/std/min/p25/p75/max[/sum]) ·
+ zscore{of} · outliers{of,method:zscore|iqr,k} · winsorize{of,p} · clip{of,lo,hi} ·
+ normalize{of} (0-1) · correlate{x,y} (Pearson r) · weighted_average{of,weight} ·
+ safe_ratio{numerator,denominator} (row-wise, guarded) · product{a,b}.
+ business_templates: >
+ abc_classify{of,a=80,b=95} (Pareto A/B/C tiers, ADDITIVE-only) · concentration{of}
+ (HHI+Gini+top1/5/10 share, ADDITIVE-only) · contribution_to_change{of} (needs _delta from
+ yoy — who drove the change) · rfm{recency,frequency,monetary,tiles=5} · funnel_rates{of}
+ (stage step% + overall%).
+ modeling: >
+ trend_line{of} (adds _trend fitted line to draw over the series) · regression{x,y}
+ (slope/intercept/r2) · cagr{of} (compound per-period growth) · growth_rate{of} (total first->last).
+ Transparent least-squares only — no black-box models.
+ reference_annotations: >
+ reference_line{of,stat:mean|median|min|max} (adds _ref constant) · reference_band{of,
+ method:stddev|percentile,k} (adds _band_lo/_hi) · target_line{value} · xmr_limits{of}
+ (Wheeler control chart: adds _center/_ucl/_lcl + _signal bool — the business-native
+ way to flag a REAL signal vs noise in a monthly series). Draw the constant columns as extra
+ series on a combo/line chart (the Analytics-pane average/reference/target/control line).
+ reshape: >
+ pivot{index,column,value} (long->wide crosstab; RAISES on collision — regroup the query, never
+ a hidden sum) · unpivot{keep,columns} (wide->long melt) · filter_rows{col,cmp,value}
+ (cmp: >,>=,<,<=,==,!=,contains — a 'having' clause) · dedupe{by} · resample{grain} (fill a
+ GAPPY date spine with None rows — run BEFORE window ops on sparse/filtered time series).
+ requery_windows: >
+ yoy{} (adds _ly/_delta/_yoy_pct; needs date_from/date_to) · ytd{of} (CORRECT cumulative
+ year-to-date, incl. distinct counts) · rolling{of,window} (CORRECT trailing-N-period value,
+ incl. distinct counts — T12M revenue, trailing-3-mo customers) · forecast{of,periods,method:
+ linear|seasonal_naive} (appends future rows with _forecast). These re-run the governed
+ query per window — the ONLY correct path for cumulative/trailing NON-additive measures.
+
+# ========================================================================= RECIPES (compose ops)
+recipes:
+ - ask: "80/20 — which [customers|SKUs] carry the book? / ABC classification / concentration"
+ plan: >
+ run_semantic_query(group_by=[dim], measures=[revenue], sort=-revenue, limit=1000) ->
+ transform_result([{op: abc_classify, of: revenue}]) -> make_table (A/B/C tiers + cum %).
+ For a single concentration read: transform_result([{op: concentration, of: revenue}]) ->
+ make_kpi/table (HHI, Gini, top-5 share). For the picture: make_chart(kind=pareto).
+ guard: "abc_classify / concentration are ADDITIVE-only (revenue/units/margin) — never on customers."
+
+ - ask: "cumulative distinct customers YTD / running unique customers this year"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[customers], grain=month, date_from, date_to)
+ -> transform_result([{op: ytd, of: customers}]) -> make_chart(kind=line, x=period,
+ y=customers_ytd)
+ guard: >
+ NEVER running_total on customers (distinct counts don't sum). ytd re-runs the query
+ Jan1->each month end — the correct cumulative distinct count. Same law: rolling for trailing.
+
+ - ask: "trailing-12-month / LTM [revenue|customers] (smooth out seasonality)"
+ plan: >
+ run_semantic_query(measures=[revenue], grain=month, date_from, date_to) ->
+ transform_result([{op: rolling, of: revenue, window: 12}]) -> make_chart(kind=line,
+ x=period, y=revenue_roll12)
+ guard: "rolling re-queries the trailing window — correct for customers (distinct) too, unlike moving_sum."
+
+ - ask: "forecast / project the next [3] months of [revenue]"
+ plan: >
+ run_semantic_query(measures=[revenue], grain=month, date_from, date_to) ->
+ transform_result([{op: forecast, of: revenue, periods: 3}]) -> make_chart(kind=line,
+ x=period, y=revenue, y2=revenue_forecast) or combo
+ guard: >
+ transparent linear/seasonal-naive projection, NOT a statistical model — say "a simple trend
+ projection, not a forecast model". Use method=seasonal_naive when the series is seasonal and
+ you have >= one full cycle of history.
+
+ - ask: "add an average line / target line / ±1 std band to a chart"
+ plan: >
+ transform_result([{op: reference_line, of: revenue, stat: mean}]) then make_chart(kind=combo,
+ y=revenue, y2=revenue_ref). Target: [{op: target_line, value: 500000}] -> make_chart(
+ kind=bullet, y=revenue, y2=target). Band: [{op: reference_band, of: revenue, method: stddev,
+ k: 1}] -> table/chart with revenue_band_lo/_hi.
+ guard: "the reference is drawn as an extra series/column — never annotate by editing the answer text."
+
+ - ask: "who DECLINED the most YoY / biggest movers, and who drove the total change"
+ plan: >
+ run_semantic_query(group_by=[order_partner], measures=[revenue], team_id?, date_from, date_to,
+ limit=1000) -> transform_result([{op: yoy}, {op: contribution_to_change, of: revenue},
+ {op: sort, by: revenue_delta, direction: asc}, {op: head, n: 20}]) ->
+ make_table(columns=[order_partner, revenue, revenue_ly, revenue_delta, revenue_delta_share_pct])
+ guard: "yoy needs date_from/date_to; contribution_to_change needs the _delta yoy adds first."
+
+ - ask: "distribution / outliers of [order value|customer size]"
+ plan: >
+ run_semantic_query(group_by=[entity], measures=[revenue], limit=1000) ->
+ transform_result([{op: describe, of: revenue}]) -> make_table (or {op: outliers, of: revenue,
+ method: iqr} then filter_rows revenue_outlier == true, or {op: bin} -> histogram)
+ guard: "describe/outliers operate on per-entity values — group by the entity first, not a trend."
+
+ - ask: "crosstab / pivot [revenue] by [month] x [business unit]"
+ plan: >
+ run_semantic_query(measures=[revenue], grain=month, group_by=[team]) ->
+ transform_result([{op: pivot, index: period, column: team, value: revenue}]) -> make_table
+ guard: >
+ pivot is a pure reshape — if it RAISES a collision, the query grain is too coarse (two rows
+ per cell); regroup the query. It never hides a sum.
+
+ - ask: "is [X] correlated with [Y]? / relationship between two measures"
+ plan: >
+ run_semantic_query(group_by=[entity], measures=[X, Y], limit=1000) ->
+ transform_result([{op: correlate, x: X, y: Y}]) -> report r; for the picture make_chart(
+ kind=scatter, x=X, y=Y). regression{x,y} adds slope/intercept/r2.
+ guard: "correlation is not causation — say so; name the outliers rather than hiding them."
+
+ - ask: "is [this month's revenue] a REAL signal or just noise? / control chart / XmR"
+ plan: >
+ run_semantic_query(measures=[revenue], grain=month, date_from, date_to) ->
+ transform_result([{op: xmr_limits, of: revenue}]) -> make_chart(kind=combo, x=period,
+ y=revenue, y2=revenue_ucl) and report the _signal points as the real signals
+ guard: >
+ XmR (mean ± 2.66·mean-moving-range) is how this business separates signal from noise
+ (warehouse/expenses use it). A point is only a SIGNAL if _signal is true — don't call a
+ within-limits wiggle a trend.
+
+ - ask: "[any trend/cumulative question on a filtered or sparse monthly series]"
+ plan: >
+ run_semantic_query(measures=[...], grain=month, ...) -> transform_result([{op: resample,
+ grain: month}, {op: running_total, of: revenue}]) # resample FIRST
+ guard: >
+ if a month has no rows (filtered scope, a quiet SKU), the window ops (running_total,
+ moving_average, diff, ytd) would silently skip the gap and misalign. resample inserts the
+ missing months as None first so the series is honest.
+
+context: >
+ This library is the analytics half of the tool registry (charting.skill.yml is the viz half).
+ The additivity law is absolute: additive = revenue/units/margin/cogs/orders; NOT additive =
+ customers (distinct) and margin_pct/aov (ratios). When an accumulating op errors on additivity,
+ switch to the re-query op (ytd/rolling) — do not work around it. rfm needs recency (days since
+ last order), which is not yet a semantic metric — frequency=orders and monetary=revenue exist,
+ so if asked for RFM today, deliver F+M scoring and report recency as the missing input (a gap).
+ Every derived result keeps its result_id and drills to rows; saved views replay the whole chain.
diff --git a/platform/model/skills/charting.skill.yml b/platform/model/skills/charting.skill.yml
new file mode 100644
index 0000000000000000000000000000000000000000..b8b467e25f66d5f8cb4c42777cdb455887e46965
--- /dev/null
+++ b/platform/model/skills/charting.skill.yml
@@ -0,0 +1,108 @@
+# In-product SKILL: charting + analytics recipes (v1, 2026-07-16) — the visualization half of the
+# tool registry. Teaches the small model WHICH form answers WHICH comparison (Zelazny: the form
+# follows the comparison) and HOW to reach it: run_semantic_query -> transform_result (optional,
+# governed) -> make_chart | make_table. The model NEVER computes derived numbers itself and NEVER
+# emits HTML/vega — it picks a kind; the platform owns the pixels and every chart drills to its
+# exact rows (result_id).
+#
+# This file versions TOGETHER with harness/tools.py (CHART_KINDS + transform ops) — a kind or op
+# named here must exist there, and vice versa.
+key: charting
+label: Charts, tables, and analytics transforms
+
+kinds: [line, bar, area, scatter, map, pie, donut, stacked_bar, grouped_bar, ranked_bar,
+ stacked_pct, combo, yoy_bars, waterfall, pareto, histogram, heatmap, treemap, funnel,
+ bullet, bubble, sparkline]
+transforms: "the full 60-op analytics library (table calcs, stats, business templates, re-query
+ windows) lives in analytics.skill.yml — this file covers the viz forms they feed"
+
+recipes:
+ - ask: "top [N] [customers|products|states] as a chart"
+ plan: >
+ run_semantic_query(group_by=[dim], sort=-measure, limit=high) ->
+ transform_result([{op: top_n, by: measure, n: N, other: false}]) ->
+ make_chart(kind=ranked_bar, x=dim, y=measure)
+ guard: >
+ for a RANKING use other:false (a giant 'Other' bar crushes the scale — the platform
+ captions what was cut); use other:true when the chart claims a share of the whole
+ (donut, stacked). Never truncate without the transform.
+
+ - ask: "how concentrated is [revenue|margin]? / do a few customers carry the book?"
+ plan: >
+ run_semantic_query(group_by=[dim], sort=-measure, limit=high) ->
+ make_chart(kind=pareto, x=dim, y=measure) # platform draws bars + cumulative-% line
+ guard: "pareto reads concentration; for a plain ranking use ranked_bar instead"
+
+ - ask: "share/mix of [revenue] by [category|BU] — part-to-whole"
+ plan: >
+ run_semantic_query(group_by=[dim]) -> if >6 groups: transform_result top_n ->
+ make_chart(kind=donut|pie, x=dim, y=measure). Mix OVER TIME: group_by dim + grain ->
+ make_chart(kind=stacked_bar, x=period, y=measure, series=dim); if the question is about
+ SHARES not levels -> stacked_pct. Hierarchical share -> treemap.
+ guard: "pie/donut only <=6 slices; percentages must come from the rows, never estimated"
+
+ - ask: "this year vs last year [by month] — YoY comparison"
+ plan: >
+ run_semantic_query(grain=month, date_from/date_to = this year) ->
+ transform_result([{op: yoy}]) -> make_chart(kind=yoy_bars, x=period, y=revenue)
+ guard: >
+ yoy re-runs the SAME governed query shifted -1 year; needs explicit date_from/date_to.
+ The platform prints the YoY % on the chart — never hand-compute deltas.
+
+ - ask: "what drove the change / bridge [revenue] from X to Y"
+ plan: >
+ get a result whose rows are SIGNED contributions (e.g. yoy transform then compute per-group
+ delta is NOT available — query each component) -> make_chart(kind=waterfall, x=label,
+ y=amount). The platform appends the Total bar.
+ guard: "steps must sum to the change being explained; if they don't, say what's missing"
+
+ - ask: "distribution — how are [order values|customer sizes] spread?"
+ plan: >
+ run_semantic_query(group_by=[entity dim], limit=high) ->
+ make_chart(kind=histogram, x=measure) | or transform_result([{op: bin, of: measure,
+ bins: 12}]) -> make_chart(kind=bar, x=bucket, y=count) when you want the buckets as rows
+ guard: "histogram bins per-entity values — group by the entity first, never bin a trend"
+
+ - ask: "is [X] related to [Y]? (two measures per entity)"
+ plan: >
+ run_semantic_query(group_by=[entity], measures=[X, Y]) -> make_chart(kind=scatter, x=X,
+ y=Y); a third measure sizes the dots -> kind=bubble, size=Z
+ guard: "state that correlation is visual, not causal; outliers get named in the answer"
+
+ - ask: "level AND rate together (GM$ + GM%, revenue + orders)"
+ plan: >
+ run_semantic_query(grain=month, measures=[level, rate]) ->
+ make_chart(kind=combo, x=period, y=level, y2=rate)
+ guard: "y = the dollar level (bars, left); y2 = the rate/count (line, right)"
+
+ - ask: "smoothed trend / running total / share columns"
+ plan: >
+ transform_result ops: moving_average{of, window} (adds _maN) · running_total{of} ·
+ share_of_total{of} · rank{by} — then chart the derived result (e.g. line of the _ma3
+ column, or make_table with the share column)
+ guard: "the first window-1 moving-average points are None by design — say so if asked"
+
+ - ask: "pipeline/stage conversion; actual vs target"
+ plan: >
+ funnel: rows in stage order -> make_chart(kind=funnel, x=stage, y=value).
+ target: make_chart(kind=bullet, x=label, y=actual, y2=target)
+ guard: "funnels need a real stage sequence; never reorder stages by size"
+
+ - ask: "same mini-chart per [BU|category] — compare shapes side by side"
+ plan: >
+ run_semantic_query(grain=month, group_by=[dim]) ->
+ make_chart(kind=line, x=period, y=measure, facet=dim)
+ guard: "facet shares scales across panels so shapes compare honestly"
+
+ - ask: "show me the numbers / a list / exact figures"
+ plan: >
+ run_semantic_query(...) -> make_table(result_id, columns=[...], title=?)
+ guard: >
+ make_table renders house-formatted with a totals row — prefer it over pasting rows into
+ the answer text whenever there are more than ~5 rows or 3 columns
+
+context: >
+ Every chart/table keeps its result_id and semantic query — the platform renders a
+ "Data behind" drill for each one, and saved views re-run query + transforms live. If a form
+ needs a column the result lacks, transform first (the error message names valid columns).
+ When two forms could work, pick the simpler; never decorate.
diff --git a/platform/model/skills/sales.skill.yml b/platform/model/skills/sales.skill.yml
new file mode 100644
index 0000000000000000000000000000000000000000..a5020ff69510e49a9c7014a7c64c59393c05564b
--- /dev/null
+++ b/platform/model/skills/sales.skill.yml
@@ -0,0 +1,184 @@
+# In-product SKILL: sales analysis recipes (v0, 2026-07-11) — the first "strong skills for
+# small-model AI" (the productization directive; omni-adoption addendum §3).
+#
+# WHAT THIS IS: short task recipes a SMALL model loads before acting. Each recipe maps a user ask
+# to an explicit TOOL-CALL PLAN over the semantic layer — the model navigates by recipe + changes
+# parameters, it never invents joins, scope, or SQL. This file is ALSO the binding spec for the
+# OM-4 tool registry: the tools named here (run_semantic_query, make_chart, make_kpi_card,
+# get_field_values, compose_dashboard) are the signatures OM-4
+# implements — recipes and tools ship and version TOGETHER (drift between them = a build error).
+#
+# Recipe fields: ask (the intent pattern, [brackets] = user-changeable parameters) · plan (the
+# tool calls, in order) · params (what the model may vary + allowed values) · guard (what it must
+# never do here). Every numeric answer inherits the platform rule: it must carry its drill link.
+key: sales
+label: Sales analysis
+topic: sales_lines # default topic; recipes may name another (sales_orders)
+metrics: [revenue, units, margin, cogs, margin_pct, orders, customers, aov]
+
+recipes:
+ - ask: "revenue trend [monthly|weekly] [this year|LTM|a date range] [for Fisch|Royal|both]"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue], grain=month|week,
+ date_from=?, date_to=?, team_id=5|6|null) -> make_chart(kind=line, x=grain, y=revenue)
+ params: {grain: [month, week], team_id: [5, 6, null], window: "any date range"}
+ guard: "one BU per series; if the user asks 'both', emit two series (team_id=5 and 6), never a mixed line"
+
+ - ask: "top [N] customers [by revenue|margin] [window] [BU]"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue, margin], group_by=order_partner,
+ date_from=?, date_to=?, team_id=?, sort=-revenue, limit=N) -> make_chart(kind=bar)
+ params: {N: "5-50 (default 15)", sort: [revenue, margin]}
+ guard: "group_by uses DIRECT m2o fields only (order_partner, product) — dot-path groupings fail on this platform"
+
+ - ask: "top [N] products/SKUs [window] [BU]"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue, units, margin], group_by=product,
+ date_from=?, date_to=?, team_id=?, sort=-revenue, limit=N, exclude_services=true)
+ -> make_chart(kind=bar)
+ guard: "always exclude_services=true for SKU rankings (Delivery Charges pollutes top movers)"
+
+ - ask: "what gross margin [%] did we run [window]? (NO business-unit words in the ask)"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue, margin, margin_pct],
+ date_from=?, date_to=?) # NO group_by — a plain margin question wants the CONSOLIDATED figure
+ guard: "only split by BU when the user says 'by business unit' / 'per BU' / 'Fisch vs Royal'"
+
+ - ask: "gross margin [%] BY BUSINESS UNIT / per BU / Fisch vs Royal [window]"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue, margin, margin_pct],
+ group_by=team, date_from=?, date_to=?) -> make_chart(kind=bar, y=margin_pct)
+ guard: "margin_pct is a ratio — computed at scope, never averaged from sub-rows"
+
+ - ask: "how are sales doing [window]? / sales KPIs"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue, margin_pct, orders, aov],
+ date_from=?, date_to=?, team_id=?) -> make_kpi_card(each metric, with same-window-last-year
+ deltas via a second query shifted -1 year)
+ guard: "deltas compare IDENTICAL windows year-over-year; never partial-vs-full periods"
+
+ - ask: "revenue by state / by product category / where do we sell the most"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue], group_by=[state|category],
+ sort=-revenue) -> make_chart(kind=bar, x=state|category, y=revenue)
+ guard: >
+ 'state' = the customer's billing state; 'category' = the product's category, where the
+ root bucket literally named "All" is UNCATEGORIZED product — say so when it ranks
+
+ - ask: "top customers BASED IN / located in [New York|a state|a city]"
+ plan: >
+ get_field_values(topic=sales_lines, dim=state|city, search=) -> run_semantic_query(
+ measures=[revenue], group_by=[order_partner], filters={state|city: [ids]}, sort=-revenue,
+ limit=N, date_from=?, date_to=?) -> make_table or ranked_bar
+ guard: >
+ location = the state/city dims, NEVER a customer-name search ('WEST NEW YORK FLORIST' is
+ not necessarily in New York). "New York" is ambiguous — check BOTH: if the state and the
+ city both match, ask which one (or default to the state and say so). City master data is
+ MESSY (case/trailing-space variants: 'BROOKLYN'/'Brooklyn'/'Brooklyn ') — include EVERY
+ matching variant from get_field_values in the filter. Always pass an explicit window and
+ state it.
+
+ - ask: "[salesperson/agent]'s customers / sales / top customers for [Naomi|an agent] [window]"
+ plan: >
+ get_field_values(topic=sales_lines, dim=agent, search=) -> run_semantic_query(
+ topic=sales_lines, measures=[revenue], group_by=[order_partner], filters={agent: [id]},
+ date_from=?, date_to=?, sort=-revenue, limit=N) -> make_table or ranked_bar
+ guard: >
+ agent = the CUSTOMER's assigned sales agent (book attribution: every order of that
+ customer counts toward their agent) — resolve the agent's real name via get_field_values
+ on the agent dim FIRST, never from customer names. For the agent's TOTAL (not per
+ customer) drop the group_by. State the window.
+
+ - ask: "revenue [or orders] BY AGENT / how did the agents do / rank the agents [window]"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue, margin], group_by=[agent],
+ date_from=?, date_to=?, sort=-revenue) -> make_chart(kind=ranked_bar) or make_table
+ guard: >
+ the NULL agent group is customers with NO agent assigned — present it as "(no agent)"
+ and keep it in totals (it is usually large: house accounts). Order counts by agent run
+ on topic=sales_orders with the same agent dim.
+
+ - ask: "which customers are DECLINING / negative YoY / dropped the most [BU] [window]"
+ plan: >
+ run_semantic_query(measures=[revenue], group_by=[order_partner], team_id=?, date_from=?,
+ date_to=?, limit=1000) -> transform_result([{op: yoy}, {op: sort, by: revenue_delta,
+ direction: asc}, {op: head, n: 20}]) -> make_table(columns=[order_partner, revenue,
+ revenue_ly, revenue_delta, revenue_yoy_pct])
+ guard: >
+ YoY per customer comes ONLY from the yoy transform (adds revenue_ly, revenue_delta,
+ revenue_yoy_pct per row) — never join two queries by hand. sort revenue_delta asc + head
+ = biggest $ decline first. yoy needs explicit date_from/date_to on the source query.
+
+ - ask: "export to Excel / send me a spreadsheet / CSV"
+ plan: >
+ run_semantic_query(...) -> make_table(result_id, title=?) — then tell the user: the table
+ below has a 'Download CSV (opens in Excel)' button under it
+ guard: >
+ you cannot SEND files or email; the platform renders a download button under every chart's
+ data expander and every table. Never claim to have sent anything.
+
+ - ask: "map my customers / where are my [top] customers [by revenue]"
+ plan: >
+ run_semantic_query(topic=sales_lines, measures=[revenue], group_by=[order_partner],
+ sort=-revenue, limit=20..100) -> make_chart(kind=map, x=order_partner, y=revenue)
+ guard: >
+ the platform places each customer at its geocoded address, dot size = the measure; rows
+ without a geocoded address are skipped and counted on screen — no need to fetch
+ coordinates yourself
+
+ - ask: "compare this year to last year [monthly] [BU]"
+ plan: >
+ run_semantic_query(... grain=month, window=this year) + run_semantic_query(... window=last
+ year shifted) -> make_chart(kind=line, two series: this year, last year)
+
+ - ask: "which customer/product values are valid? (before filtering by name)"
+ plan: >
+ get_field_values(topic=sales_lines, field=order_partner|product, search=?) — resolve the
+ user's spelling to the real record BEFORE querying ('NYC Florist' vs the actual name)
+ guard: "never filter on a free-typed name; always resolve via get_field_values first"
+
+ - ask: "save this as a dashboard / add to my dashboard"
+ plan: >
+ save_view(each query above, name=?) -> compose_dashboard(views=[...], name=?)
+ guard: >
+ pass save_view the EXACT object make_chart/make_kpi_card returned (it carries the query —
+ saved views RE-RUN live; a spec without its query is rejected). After compose_dashboard,
+ tell the user the dashboard is now in the sidebar Workflows menu as 'Saved · '
+ and stays current (every open re-runs the queries).
+
+ - ask: "change/edit that view or workbook — different window, add a breakdown, rename, reorder"
+ plan: >
+ list_workspace() to find the exact name -> update_view(name, changes={title?/kind?/x?/y?/
+ series?, query: {date_from?/date_to?/group_by?/grain?/filters?/limit?/...}}) for a view |
+ update_workbook(name, views=[new order], new_name=?) for a workbook (dashboard)
+ guard: >
+ UPDATE tools modify existing objects — state exactly what will change and confirm first;
+ update_view re-runs the patched query before saving, so report its row_count back. To
+ REMOVE a query key (e.g. drop a group_by), pass it as null.
+
+ - ask: "delete that view/dashboard/alert/report"
+ plan: "list_workspace() to resolve the exact kind+name -> delete_object(kind, name)"
+ guard: >
+ DESTRUCTIVE — never call delete_object unless the user explicitly confirmed THE NAMED
+ object in this conversation; deleting a view also removes it from workbooks that use it
+
+ - ask: "what dashboards/views/alerts do I have? / reuse that template"
+ plan: >
+ list_workspace() -> answer from the objects list; to reuse a template:
+ instantiate_template(filename, new_name=?) — it stamps NEW objects, never overwrites
+ guard: >
+ instantiate_template is an ARTIFACT tool — confirm with the user first; afterwards point
+ them to the new dashboard in the sidebar Workflows menu ('Saved · ')
+
+ - ask: "send me this every [Monday|month-start] / watch this KPI / alert me about X"
+ plan: >
+ (retired 2026-07-23 with the Routines module) say scheduled reports and KPI alerts are not
+ offered right now; offer the live alternative — save the view/dashboard so it re-runs
+ fresh on every open, and answer the underlying question NOW with run_semantic_query
+ guard: "never claim a schedule or alert was created; the schedule_report/create_alert/schedule_insight tools no longer exist"
+
+context: >
+ All recipes inherit the sales_lines topic scope (confirmed wholesale orders, untaxed amounts,
+ Amazon/GIFTWARE excluded, BUs strictly isolated — see the topic's ai_context). Order COUNTS come
+ from the sales_orders topic (order grain). Every number answered must link its drill-down rows;
+ if a query returns something that cannot be drilled, say so instead of presenting it.
diff --git a/platform/model/tenant.yml b/platform/model/tenant.yml
new file mode 100644
index 0000000000000000000000000000000000000000..98987a59a38a2431b595062c4a4670d965de2bac
--- /dev/null
+++ b/platform/model/tenant.yml
@@ -0,0 +1,13 @@
+# Tenant configuration — the ONE place a customer's specifics live (OM-2 parameterization,
+# 2026-07-11). Topics reference these as {param} placeholders in store scope_sql; everything else
+# in model/ is TENANT-AGNOSTIC (= the template library, task #13). Onboarding a new customer =
+# write THIS file (+ .env credentials) — the topics/metrics/skills stamp in unchanged.
+key: royal_imports
+label: Royal Imports / Fisch Floral Supply
+params:
+ # Business units: the sales teams that constitute the wholesale business (BU strict isolation).
+ wholesale_team_ids: [5, 6]
+ team_names: {5: Fisch, 6: Royal}
+ # Channel exclusions: partners excluded from WHOLESALE scope (Amazon rides through this partner;
+ # all-channel topics — GL, receivables — deliberately do NOT apply it).
+ excluded_partner_name_like: "GIFTWARE DEALS%"
diff --git a/platform/model/topics/commission_lines.yml b/platform/model/topics/commission_lines.yml
new file mode 100644
index 0000000000000000000000000000000000000000..9ae8ba80dad2050578d3a16609ea7d869ec1c2e5
--- /dev/null
+++ b/platform/model/topics/commission_lines.yml
@@ -0,0 +1,66 @@
+# Topic: commission_lines — the raw commission rows, one per (invoice line × agent).
+#
+# Separate from `invoice_lines` on purpose. `invoice_lines` joins the commission table
+# DEDUPLICATED (at most one agent per line) so that revenue never double-counts. That is right
+# for revenue and WRONG for commission: a line with two agents accrues two commission amounts,
+# and the deduplicated join would drop one. So commission money is summed here, at its own grain.
+#
+# Use `invoice_lines` for revenue-by-agent; use this ONLY for commission accrued / settlement.
+key: commission_lines
+label: Commission lines (agent × invoice line)
+entity: account.invoice.line.agent
+
+# STORE-ONLY: no live-path domain builder.
+
+scope:
+ documents: >-
+ every commission row, including those attached to non-product lines. ⚠ 96,936 of the 147,160
+ rows with a 2025 invoice_date hang off COGS lines rather than product lines, so a row count
+ here is NOT a count of agent-attributed sales lines.
+ basis: "commission amount in company currency (`amount`)"
+ date_field: "invoice_date"
+
+grain: "one row per (invoice line × agent); a line with two agents produces two rows"
+
+store:
+ table: account_invoice_line_agent
+ alias: a
+ # object_id -> account_move_line (the LINE), invoice_id -> account_move (the DOCUMENT).
+ # Two similarly named FKs; joining the wrong one silently changes the grain.
+ join: >-
+ LEFT JOIN res_partner ap ON ap.id = a.agent_id
+ LEFT JOIN account_move_line l ON l.id = a.object_id
+ LEFT JOIN sale_order_line sol ON sol.id = l.sale_line_id
+ LEFT JOIN sale_order so ON so.id = sol.order_id
+ date_col: "a.invoice_date"
+ team_col: "so.team_id"
+ scope_sql: "1 = 1"
+ dims:
+ commission_name: {col: "a.agent_id", name_col: "a.agent_name", label: "Commission name"}
+ plan: {col: "a.commission_id", name_col: "a.commission_name", label: "Commission plan"}
+ settled: {col: "a.settled", name_col: "CASE WHEN a.settled THEN 'Settled' ELSE 'Unsettled' END", label: "Settled"}
+ agent_role:
+ col: "CASE WHEN COALESCE(ap.agent, FALSE) THEN 'agent' ELSE 'salesperson' END"
+ name_col: "CASE WHEN COALESCE(ap.agent, FALSE) THEN 'Agent' ELSE 'Salesperson (not an agent)' END"
+ label: "Role"
+ line_type:
+ col: "l.display_type"
+ name_col: "l.display_type"
+ label: "Invoice line type"
+ team:
+ col: "so.team_id"
+ name_col: "CASE so.team_id WHEN 5 THEN 'Fisch' WHEN 6 THEN 'Royal' WHEN 7 THEN 'Giftware Deals (Amazon)' WHEN 1 THEN 'Sales (generic)' ELSE 'No sale order' END"
+ label: "Business unit"
+
+ai_context: >
+ Raw commission rows from the OCA sale-commission module — one row per invoice line per agent.
+ Use ONLY for commission money ("what commission did X accrue", settlement status, plan mix).
+ For revenue by agent use topic `invoice_lines`, which joins this table deduplicated so revenue
+ is not double-counted.
+ ⚠ ROW COUNTS HERE ARE NOT SALES-LINE COUNTS: commission rows attach to COGS lines as well as
+ product lines (96,936 of 147,160 rows dated 2025 are COGS). Filter `line_type` = 'product'
+ before comparing anything here to a sales figure.
+ ⚠ A NAME HERE IS NOT NECESSARILY AN AGENT — "Anna" and "Shantal Erlich" are internal
+ salespeople (res.partner.agent = False) who carry commission rows. Use the `agent_role` dim to
+ separate them; never call them agents.
+ Commission PLANS observed: 6.5% (Martin Pasternak), 8%, 5%, 2%, 1%, and a named "Jacob" plan.
diff --git a/platform/model/topics/credit_notes.yml b/platform/model/topics/credit_notes.yml
new file mode 100644
index 0000000000000000000000000000000000000000..68d2f82301cbeb8a048cd8d8db78e553050b1c3f
--- /dev/null
+++ b/platform/model/topics/credit_notes.yml
@@ -0,0 +1,48 @@
+# Topic: credit_notes — posted customer CREDIT NOTES (returns), at document grain.
+#
+# Why its own topic rather than a filtered measure on a shared one: a FILTERED measure
+# (`store_filter_sql`) exists only on the store path, and `semantic.metric()` resolves a sum by
+# handing the metric's `field` to `O.sum_field(entity, domain, field)` with no room for a
+# per-measure filter. A metric that can be computed on one path and not the other cannot be
+# parity-checked — and parity is the admission bar for filtering on it. Two topics with two
+# DOMAINS give both paths the same scope by construction.
+key: credit_notes
+label: Customer credit notes (returns)
+entity: account.move
+domain_builder: credit_note_domain
+
+scope:
+ documents: "posted customer credit notes only (move_type = out_refund, state = posted)"
+ channels: >-
+ COMPANY-LEVEL. Credit notes carry team_id = 1 for everything, so a business-unit filter on
+ the document is meaningless — modules/returns.py says the same and attributes by the
+ CUSTOMER instead. A BU-scoped caller is refused rather than given a company number wearing
+ their name.
+ excluded: >-
+ Nothing. modules/returns.py — the number the business already reads — does not exclude the
+ GIFTWARE DEALS partner the wholesale sales topics do. Matching it keeps one definition of
+ "returns"; the customer-grid pool is wholesale anyway, so the intersection makes the
+ difference unobservable there.
+ basis: "untaxed document amounts (amount_untaxed_signed, NEGATED — see the metric)"
+ date_field: "invoice_date"
+
+grain: "one row per posted credit note; time-filterable by invoice_date"
+
+store:
+ table: account_move
+ alias: m
+ join: "LEFT JOIN res_partner rp ON rp.id = m.partner_id"
+ date_col: "m.invoice_date"
+ scope_sql: "m.state = 'posted' AND m.move_type = 'out_refund'"
+ dims:
+ partner: {col: "m.partner_id", name_col: "m.partner_name", label: "Customer"}
+
+ai_context: >
+ Posted customer credit notes — refunds/returns. ⚠ `amount_untaxed_signed` is NEGATIVE on a
+ credit note (verified on the tenant store 2026-07-27: all 3,006 posted refunds are negative,
+ summing to -358,141.70), so the `returns` metric declares `negate: true` and reports a POSITIVE
+ amount. A returns figure that comes out negative means the negation was lost, and it will read
+ as "we have no returns" rather than as an error. This topic is COMPANY-LEVEL: credit notes are
+ not business-unit tagged, so never present a returns number as belonging to Fisch or Royal.
+ Odoo has no return-REASON field, so concentration (which customers, which SKUs) is the only
+ diagnostic available.
diff --git a/platform/model/topics/customer_invoices.yml b/platform/model/topics/customer_invoices.yml
new file mode 100644
index 0000000000000000000000000000000000000000..10878e21e73528f5bf88a07de133fcf227a286fe
--- /dev/null
+++ b/platform/model/topics/customer_invoices.yml
@@ -0,0 +1,38 @@
+# Topic: customer_invoices — posted customer INVOICES, at document grain.
+#
+# It exists to be the DENOMINATOR of the return rate. `modules/returns.py` rates refunds against
+# INVOICED totals, not against order-line revenue, and that is the number the business already
+# reads — so Return % uses the same denominator rather than inventing a second one that would be
+# close enough to look right and different enough to argue about.
+#
+# ⚠ This is NOT `revenue`. `revenue` is order-LINE subtotals of confirmed sales orders (topic
+# sales_lines); this is posted invoice documents. They differ by unbilled orders, by billing
+# timing, and by anything invoiced outside the wholesale sales scope.
+key: customer_invoices
+label: Customer invoices
+entity: account.move
+domain_builder: customer_invoice_domain
+
+scope:
+ documents: "posted customer invoices only (move_type = out_invoice, state = posted)"
+ channels: "COMPANY-LEVEL — see credit_notes; the same reasoning applies to the denominator."
+ excluded: "Nothing, matching credit_notes and modules/returns.py."
+ basis: "untaxed document amounts (amount_untaxed_signed, already positive for an invoice)"
+ date_field: "invoice_date"
+
+grain: "one row per posted customer invoice; time-filterable by invoice_date"
+
+store:
+ table: account_move
+ alias: m
+ join: "LEFT JOIN res_partner rp ON rp.id = m.partner_id"
+ date_col: "m.invoice_date"
+ scope_sql: "m.state = 'posted' AND m.move_type = 'out_invoice'"
+ dims:
+ partner: {col: "m.partner_id", name_col: "m.partner_name", label: "Customer"}
+
+ai_context: >
+ Posted customer invoices, the denominator of the return rate. `amount_untaxed_signed` is
+ already POSITIVE here (unlike a credit note), so this metric carries no negation. Do not use
+ this as "sales" — that is `revenue` on sales_lines, which is order-line based; this is billing.
+ Company-level: invoices in this topic are not business-unit filterable.
diff --git a/platform/model/topics/gl_lines.yml b/platform/model/topics/gl_lines.yml
new file mode 100644
index 0000000000000000000000000000000000000000..5362dd9d10e54d45dca2aabd541986c4f74b4707
--- /dev/null
+++ b/platform/model/topics/gl_lines.yml
@@ -0,0 +1,34 @@
+# Topic: gl_lines — the RAW general-ledger dataset (posted journal lines). Company-level (no BU
+# filter — GL isn't team-scoped). BASIS RULE (the glaccount-vs-account lesson, now model law):
+# this is the RAW-GL basis; NEVER mix it with the management-basis P&L in one analysis.
+key: gl_lines
+label: General ledger (raw, posted)
+entity: account.move.line
+# store-only topic: no live-path domain builder yet (lands with the Expenses retrofit);
+# store_query() is authoritative; the parity check below compares against a DIRECT live aggregate
+scope:
+ posted_only: "journal entries with state = posted only"
+ basis: "RAW GL — debit-positive balance; expenses positive, income negative (negated in metrics)"
+ level: "company-level (HQ) — no business-unit split"
+ date_field: "accounting date (account.move.line.date)"
+grain: "one row per posted journal line; time-filterable by accounting date"
+
+store:
+ table: account_move_line
+ alias: l
+ join: "JOIN account_move m ON m.id = l.move_id JOIN account_account a ON a.id = l.account_id"
+ date_col: "l.date"
+ scope_sql: "m.state = 'posted'"
+ dims:
+ account: {col: "l.account_id", name_col: "l.account_name", label: "GL account"}
+ account_type: {col: "a.account_type", name_col: null, label: "Account type"}
+ partner: {col: "l.partner_id", name_col: "l.partner_name", label: "Partner"}
+
+ai_context: >
+ The raw posted general ledger. Use for operating-expense analysis (opex), GL-basis revenue, and
+ ledger drill-downs — the same basis as the Expenses dashboard. Expense-type accounts
+ ('expense', 'expense_depreciation') carry opex; 'expense_direct_cost' is COGS and is EXCLUDED
+ from opex by definition. Income accounts store credit-negative balances; the gl_revenue metric
+ negates them to read positively. This topic is company-level: business-unit filters do not
+ apply here (use sales_lines for BU questions). The newest month is often still being booked —
+ a sharply lower final month usually means an OPEN period, not a cost win (close-lag).
diff --git a/platform/model/topics/invoice_lines.yml b/platform/model/topics/invoice_lines.yml
new file mode 100644
index 0000000000000000000000000000000000000000..7959f2927fe55f22c0a9dadf4236b78b097988bf
--- /dev/null
+++ b/platform/model/topics/invoice_lines.yml
@@ -0,0 +1,141 @@
+# Topic: invoice_lines — posted customer-invoice lines at LINE grain, carrying the per-line
+# COMMISSION agent (the OCA sale-commission module).
+#
+# WHY THIS EXISTS (owner ask, 2026-07-28): "which FISCH customers are assigned to an Agent based
+# on the invoice line, what do they generate, and what sales are NOT allocated to an agent."
+# Neither `sales_lines` (order grain, customer-master agent) nor `customer_invoices` (document
+# grain, no agent at all) can answer that — the agent lives on the invoice LINE, and the
+# unallocated bucket is precisely the lines that have no commission row.
+#
+# ⚠ THIS IS A SECOND AGENT SOURCE AND IT DISAGREES WITH `sales_lines.agent`. That one is the
+# CUSTOMER-MASTER book (res.partner.agent_ids); this one is per-line commission attribution.
+# They name different people. Always state which source a number came from.
+key: invoice_lines
+label: Customer invoice lines (with commission agent)
+entity: account.move.line
+
+# STORE-ONLY: no live-path domain builder. The live equivalent is a dot-path domain on
+# account.move.line; it is deliberately not bound here because the agent join has no live analogue
+# that stays honest about the unallocated bucket.
+
+scope:
+ documents: "posted customer invoices AND credit notes (move_type out_invoice/out_refund, parent_state posted)"
+ lines: >-
+ PRODUCT lines only (display_type = 'product'). Commission rows attach to 'cogs' lines too —
+ 96,936 of the 147,160 rows with a 2025 invoice_date. ⚠ MEASURED 2026-07-29, and NOT what it
+ first appears: dropping this filter does NOT move revenue or the customer count, because
+ non-product lines ('cogs', 'payment_term', 'line_note') all carry price_subtotal = 0 and
+ those customers already have product lines. The ~80% inflation is real for commission ROW
+ COUNTS (147,160 vs 50,191 product-line rows) and would corrupt any count-of-LINES measure —
+ it is a GRAIN guard, not a money guard. Keep it; just don't claim it protects the totals.
+ channels: >-
+ business unit comes from the ORIGINATING SALE ORDER (Fisch=5, Royal=6), because
+ account.move carries no BU (every invoice sits on team 1 "Sales"). Lines with no sale order
+ (direct invoices) have a NULL business unit and are KEPT, not dropped.
+ excluded: >-
+ Nothing is excluded by partner. GIFTWARE DEALS (Amazon) sits on its own team (7), so a
+ Fisch or Royal filter already excludes it — no partner-name exclusion needed here.
+ basis: "untaxed line subtotals (price_subtotal); credit-note lines are NEGATED by the metric"
+ date_field: "line date (= invoice date)"
+
+grain: >-
+ one row per posted customer-invoice product line. The commission table is one row per
+ (line × agent), so it is joined DEDUPLICATED to at most one row per line — otherwise the 74
+ two-agent lines would double-count revenue.
+
+store:
+ table: account_move_line
+ alias: l
+ # LEFT JOIN from the LINE side is load-bearing: the whole point is the lines with NO commission
+ # row. An inner join would silently delete the unallocated bucket — the second half of the
+ # question — and still look correct.
+ #
+ # ca = at most ONE commission row per line, preferring a TRUE agent over a salesperson, then
+ # the lowest agent id for determinism.
+ join: >-
+ LEFT JOIN res_partner rp ON rp.id = l.partner_id
+ LEFT JOIN sale_order_line sol ON sol.id = l.sale_line_id
+ LEFT JOIN sale_order so ON so.id = sol.order_id
+ LEFT JOIN (
+ SELECT object_id, agent_id, agent_name, is_true_agent, is_converted_salesman
+ FROM (
+ SELECT a.object_id, a.agent_id, a.agent_name,
+ COALESCE(ap.agent, FALSE) AS is_true_agent,
+ COALESCE(ap.salesman_as_agent, FALSE) AS is_converted_salesman,
+ ROW_NUMBER() OVER (PARTITION BY a.object_id
+ ORDER BY COALESCE(ap.agent, FALSE) DESC, a.agent_id) AS rn
+ FROM account_invoice_line_agent a
+ LEFT JOIN res_partner ap ON ap.id = a.agent_id
+ ) ranked WHERE rn = 1
+ ) ca ON ca.object_id = l.id
+ date_col: "l.date"
+ team_col: "so.team_id"
+ scope_sql: >-
+ l.parent_state = 'posted' AND l.move_type IN ('out_invoice','out_refund')
+ AND l.display_type = 'product'
+ dims:
+ partner: {col: "l.partner_id", name_col: "l.partner_name", label: "Customer"}
+ product: {col: "l.product_id", name_col: "l.product_name", label: "Product"}
+ team:
+ col: "so.team_id"
+ name_col: "CASE so.team_id WHEN 5 THEN 'Fisch' WHEN 6 THEN 'Royal' WHEN 7 THEN 'Giftware Deals (Amazon)' WHEN 1 THEN 'Sales (generic)' ELSE 'No sale order' END"
+ label: "Business unit"
+ # THE agent dim — real agents ONLY. A salesperson-only line lands here as NULL, which is
+ # correct: it is not allocated to an agent.
+ agent:
+ col: "CASE WHEN ca.is_true_agent THEN ca.agent_id END"
+ name_col: "CASE WHEN ca.is_true_agent THEN ca.agent_name END"
+ label: "Agent (invoice line)"
+ # Whoever is on the commission line, agent or not — for commission/payout questions.
+ commission_name:
+ col: "ca.agent_id"
+ name_col: "ca.agent_name"
+ label: "Commission name (agent OR salesperson)"
+ agent_role:
+ col: "CASE WHEN ca.agent_id IS NULL THEN 'none' WHEN ca.is_true_agent THEN 'agent' ELSE 'salesperson' END"
+ name_col: "CASE WHEN ca.agent_id IS NULL THEN 'Nobody' WHEN ca.is_true_agent THEN 'Agent' ELSE 'Salesperson (not an agent)' END"
+ label: "Role on the line"
+ # The partition the owner asked for. These three values are MECE and sum to the total.
+ allocation:
+ col: "CASE WHEN ca.is_true_agent THEN 'agent' WHEN ca.agent_id IS NOT NULL THEN 'salesperson' ELSE 'none' END"
+ name_col: "CASE WHEN ca.is_true_agent THEN 'Allocated to an agent' WHEN ca.agent_id IS NOT NULL THEN 'Salesperson only' ELSE 'Not allocated' END"
+ label: "Agent allocation"
+ # The OUTSTANDING OWNER RULING (2026-07-28): 4 of the 11 agents carry salesman_as_agent =
+ # True ("convert salesman into agent"). Exposed as a dim so BOTH readings are queryable and
+ # neither is baked into the definition of `agent`.
+ agent_origin:
+ col: "CASE WHEN ca.is_true_agent AND ca.is_converted_salesman THEN 'converted' WHEN ca.is_true_agent THEN 'external' END"
+ name_col: "CASE WHEN ca.is_true_agent AND ca.is_converted_salesman THEN 'Agent (converted salesman)' WHEN ca.is_true_agent THEN 'Agent (external)' END"
+ label: "Agent origin"
+
+ai_context: >
+ Posted customer-invoice PRODUCT lines with the per-line commission agent. Use this topic for:
+ "which customers are assigned to an agent based on the invoice line", "what sales are NOT
+ allocated to an agent", commission questions, and any agent question phrased about invoices or
+ billing. Use `sales_lines` instead for "sales" in the ordinary sense (confirmed order lines) and
+ for book/relationship ownership.
+ ⚠ TWO AGENT SOURCES, DIFFERENT PEOPLE — say which you used. Here = per-line commission
+ (account.invoice.line.agent). There (`sales_lines.agent`) = the customer-master book
+ (res.partner.agent_ids). JACOB BRISK, Samuel Shif, Yuda Stern and Billy Petruccelli appear ONLY
+ on invoice lines; Moishe Rubenstein, Avi Ash and Sang Ching ONLY on the customer master.
+ ⚠ A NAME ON A COMMISSION LINE IS NOT NECESSARILY AN AGENT. "Anna" and "Shantal Erlich" are
+ internal SALESPEOPLE (res.partner.agent = False, each with an Odoo login, salesperson of record
+ on 1,253 / 184 confirmed orders) who carry commission lines anyway. The `agent` dim already
+ excludes them — they show up under `commission_name` with agent_role 'salesperson'. NEVER
+ report them as agents; if a question says "agent", they are not one.
+ THE ALLOCATION PARTITION: the `allocation` dim is MECE and sums to the total — 'Allocated to an
+ agent' / 'Salesperson only' / 'Not allocated'. When asked "what is not allocated to an agent",
+ give the strict figure (salesperson + none) AND say what the narrower no-commission-at-all
+ figure is, because the two readings differ materially and the questioner may mean either.
+ BUSINESS UNIT comes from the originating sale order, so a line with no sale order has a NULL
+ business unit — present that as "no sale order (direct invoice)" and keep it in company totals.
+ Fisch is team 5. CREDIT NOTES are included and the revenue metric negates them; a positive
+ refund total means the negation was lost.
+ MEASURED BASELINE for FISCH 2025 (use to sanity-check any answer): total $4,443,244.34 over
+ 68,540 lines and 979 customers, splitting exactly into $2,995,664.75 allocated to agents,
+ $361,198.24 salesperson-only, and $1,086,381.35 not allocated. 518 customers have a real agent
+ on at least one line. Martin Pasternak alone is $2,155,660.64.
+ A CUSTOMER IS NOT ALL-OR-NOTHING: 403 of those 518 customers are MIXED (some lines carry an
+ agent, some do not), so "sales BY agent-assigned customers" ($3,187,771.31) is a different
+ number from "sales ALLOCATED to an agent" ($2,995,664.75). Answer whichever was asked and say
+ which one it is; they do not subtract to each other.
diff --git a/platform/model/topics/receivables.yml b/platform/model/topics/receivables.yml
new file mode 100644
index 0000000000000000000000000000000000000000..d8078184c2bdc9e57d5296e10ac2744baffc26f9
--- /dev/null
+++ b/platform/model/topics/receivables.yml
@@ -0,0 +1,31 @@
+# Topic: receivables — customer invoices/credit notes and what remains unpaid. Company-level
+# (AR is consolidated — the Collections page convention). Store-only topic (live path = the AR
+# module's own domains; the validator compares against a direct live aggregate).
+key: receivables
+label: Receivables (customer invoices)
+entity: account.move
+
+scope:
+ posted_only: "posted customer documents only (out_invoice + out_refund)"
+ basis: "amount_residual_signed nets credit notes (+ for invoices, − for refunds)"
+ level: "company-level (HQ) — receivables are consolidated, no BU split"
+ date_field: "invoice date; overdue judged by invoice_date_due vs today"
+grain: "one row per posted customer invoice/credit note"
+
+store:
+ table: account_move
+ alias: m
+ join: ""
+ date_col: "m.invoice_date"
+ scope_sql: "m.state = 'posted' AND m.move_type IN ('out_invoice', 'out_refund')"
+ dims:
+ partner: {col: "m.partner_id", name_col: "m.partner_name", label: "Customer"}
+ payment_state: {col: "m.payment_state", name_col: null, label: "Payment state"}
+
+ai_context: >
+ Customer receivables at document grain. "Outstanding" = the signed residual (credit notes net
+ against invoices). "Overdue" = residual on documents past their due date as of today. AR is
+ company-level: do not BU-filter. For who-to-call prioritization the platform's Collections
+ worklist is the richer surface; this topic answers totals, aging-style questions, and
+ per-customer exposure. Omit date filters when asking "what is outstanding NOW" — a date window
+ restricts by INVOICE date, which is usually not what an outstanding-balance question means.
diff --git a/platform/model/topics/sales_lines.yml b/platform/model/topics/sales_lines.yml
new file mode 100644
index 0000000000000000000000000000000000000000..e0b67f7b7d04b4408e62fc5fd8fde8793bafbf5b
--- /dev/null
+++ b/platform/model/topics/sales_lines.yml
@@ -0,0 +1,106 @@
+# Topic: sales_lines — the wholesale order-line dataset (OM-0, the first topic of the semantic
+# layer; see .claude/wiki/research/omni-adoption.md). A topic = the curated, scoped dataset that
+# metrics, saved views and the AI Analyst all resolve against — ONE definition of what the
+# data MEANS, consumed by every surface.
+key: sales_lines
+label: Sales lines (wholesale)
+entity: sale.order.line
+
+# Scope binding — the ONE proven scope implementation lives in core/odoo.sale_line_domain (the
+# same code every validated module uses; parity by construction). The scope: block below is the
+# DECLARATIVE statement of what that builder bakes in — for humans, the metric dictionary, and the
+# AI's context. When OM-2 retargets topics at the DuckDB store, these semantics become executable
+# data; until then the builder is authoritative and this block must be kept true to it.
+domain_builder: sale_line_domain
+scope:
+ confirmed_only: "order state in (sale, done) — quotes and cancellations excluded"
+ channels: "wholesale teams only: Fisch=5, Royal=6; team_id parameter narrows to one business unit"
+ excluded: "partner GIFTWARE DEALS (= the Amazon channel) is excluded from wholesale scope"
+ basis: "line-level; monetary amounts are UNTAXED (price_subtotal)"
+ date_field: "order date (date_order on the parent sale.order)"
+
+grain: "one row per confirmed order line; time-filterable by order date; BU-filterable by team_id"
+
+# Executable store binding (OM-2): how this topic compiles against the DuckDB tenant store
+# (harness/datastore.py tables). scope_sql MUST stay semantically identical to what the
+# domain_builder bakes in — the OM-2 parity gate (store path == live path to the cent) enforces it.
+store:
+ table: sale_order_line
+ alias: l
+ join: >-
+ JOIN sale_order o ON o.id = l.order_id
+ LEFT JOIN product_product pp ON pp.id = l.product_id
+ LEFT JOIN res_partner rp ON rp.id = l.order_partner_id
+ LEFT JOIN res_partner ag ON ag.id = rp.agent_id
+ date_col: "o.date_order"
+ team_col: "o.team_id"
+ scope_sql: >-
+ o.state IN ('sale','done') AND o.team_id IN ({wholesale_team_ids})
+ AND l.order_partner_id NOT IN
+ (SELECT id FROM res_partner WHERE name LIKE {excluded_partner_name_like})
+ service_filter: "l.product_id NOT IN (SELECT id FROM product_product WHERE type = 'service')"
+ dims:
+ order_partner: {col: "l.order_partner_id", name_col: "l.order_partner_name", label: "Customer"}
+ product: {col: "l.product_id", name_col: "l.product_name", label: "Product"}
+ # team names via CASE (crm_team is not synced; ids are baked tenant scope like the team filter)
+ team: {col: "o.team_id",
+ name_col: "CASE o.team_id WHEN 5 THEN 'Fisch' WHEN 6 THEN 'Royal' ELSE CAST(o.team_id AS VARCHAR) END",
+ label: "Business unit"}
+ # 2026-07-12: slicing dims via the synced masters (m2o fields land as _id + _name columns)
+ category: {col: "pp.categ_id", name_col: "pp.categ_name", label: "Product category"}
+ state: {col: "rp.state_id", name_col: "rp.state_name", label: "Customer state"}
+ city: {col: "rp.city", name_col: "rp.city", label: "Customer city"}
+ # 2026-07-17: the salesperson/agent dimension (the #1 logged Analyst gap). Agent = the
+ # CUSTOMER's assigned sales agent (res.partner.agent_ids[0] — the Customers-module
+ # convention, MECE), synced as res_partner.agent_id; names via self-join alias ag.
+ #
+ # ⚠ 2026-07-28: this is the CUSTOMER-MASTER (book) source, and it is ONE OF THREE. A second,
+ # per-INVOICE-LINE source exists (`account.invoice.line.agent`, the OCA sale-commission
+ # module) and names a DIFFERENT population — see topic `invoice_lines`. This dim is VERIFIED
+ # CLEAN: all 10 partners linked through agent_ids carry res.partner.agent = True, and 0 of
+ # 2,056 customers have a non-agent as agent_ids[0]. Do NOT "fix" it by reading the commission
+ # table, which mixes agents and salespeople.
+ agent: {col: "rp.agent_id", name_col: "ag.name", label: "Agent"}
+
+ai_context: >
+ The wholesale sales dataset of Royal Imports / Fisch Floral Supply, at order-LINE grain.
+ "Revenue" here always means untaxed line subtotals of CONFIRMED orders (state sale/done) for the
+ two wholesale business units (Fisch=5, Royal=6) with the GIFTWARE DEALS partner (the Amazon
+ channel) excluded — this is the number the owner calls "sales". The Margin module is installed:
+ each line carries `margin` (revenue minus cost) and `purchase_price` (per-UNIT cost, not a
+ total); COGS = revenue − margin. Business units are strictly isolated: a query scoped to one
+ team must never include the other. For inventory/SKU-lifecycle analysis use an ALL-channel
+ topic instead (Amazon included) — using this wholesale topic there false-flags Amazon
+ bestsellers as dead. Services (e.g. Delivery Charges) pollute SKU-level views; exclude
+ product type 'service' when ranking products. Geographic questions ("revenue by state",
+ "where do we sell") use the `state` dim — the customer's billing state; "based in "
+ uses the `city` dim. NEVER answer a location question by searching customer NAMES for the
+ place ("WEST NEW YORK FLORIST" is not necessarily in New York) — resolve values with
+ get_field_values on state/city. SALESPERSON/AGENT questions (e.g. "Naomi's customers",
+ "revenue by agent") use the `agent` dim: the agent is the CUSTOMER's assigned sales agent
+ (book attribution — every order of that customer counts toward their agent), not a per-order
+ salesperson. Resolve agent names with get_field_values on agent before filtering; customers
+ with no assigned agent appear as a NULL agent group — present it as "no agent assigned" and
+ keep it in totals. Never approximate an agent from customer names.
+ ⚠ THERE ARE TWO AGENT SOURCES IN THIS ODOO AND THEY DISAGREE — always say which one you used.
+ (a) THIS dim = the customer-master book (res.partner.agent_ids). (b) Topic `invoice_lines` =
+ the per-INVOICE-LINE commission agent (account.invoice.line.agent, the OCA sale-commission
+ module). They name DIFFERENT PEOPLE: JACOB BRISK, Samuel Shif, Yuda Stern and Billy Petruccelli
+ appear ONLY on invoice lines; Moishe Rubenstein, Avi Ash and Sang Ching appear ONLY on the
+ customer master. Martin Pasternak dominates invoice-line revenue while Naomi Linnell Rivera
+ holds the largest customer-master book — so "revenue by agent" gets a materially different
+ ranking depending on the source. Use THIS dim for "whose book is this customer in / who owns
+ the relationship"; use `invoice_lines` for "what was actually credited to an agent on the
+ billing", for commission questions, and for "what sales are NOT allocated to an agent"
+ (this topic cannot answer that — book attribution has no unallocated concept beyond a NULL agent).
+ ⚠ A NAME ON A COMMISSION LINE IS NOT NECESSARILY AN AGENT. The flag is res.partner.agent
+ (bool). "Anna" and "Shantal Erlich" are internal SALESPEOPLE (agent = False, each with an Odoo
+ user login, and the salesperson of record on 1,253 / 184 confirmed orders) who nonetheless
+ carry commission lines. They are correctly ABSENT from this dim. If the owner asks about
+ "agents", never report them as agents — report them separately as salespeople. Category
+ questions use the `category` dim (the product's category). DATA CAVEAT: many products sit in the root
+ category literally named "All" (master-data hygiene) — when ranking categories, mention that
+ "All" is the uncategorized bucket, not a real category. The `state` dim can be NULL (customer
+ has no address on file — present it as "no state on file", keep it in totals) and duplicate
+ state records exist (two ids can share one name, e.g. New Jersey twice) — list them as the
+ data shows and note the duplication rather than silently merging.
diff --git a/platform/model/topics/sales_orders.yml b/platform/model/topics/sales_orders.yml
new file mode 100644
index 0000000000000000000000000000000000000000..743e386ea621c566a5e36ee1a8ad6724cc873374
--- /dev/null
+++ b/platform/model/topics/sales_orders.yml
@@ -0,0 +1,43 @@
+# Topic: sales_orders — the wholesale ORDER-level dataset (header grain). Sibling of sales_lines:
+# same business scope, order grain — for counts and order-level amounts (amount_untaxed). The two
+# grains reconcile by contract (line Σ == order Σ; order count == line-parents + line-less orders).
+key: sales_orders
+label: Sales orders (wholesale)
+entity: sale.order
+domain_builder: sale_order_domain
+scope:
+ confirmed_only: "state in (sale, done) — quotes and cancellations excluded"
+ channels: "wholesale teams only: Fisch=5, Royal=6; team_id parameter narrows to one business unit"
+ excluded: "house/GIFTWARE accounts excluded (same exclusions as sales_lines)"
+ basis: "order-header level; order revenue = amount_untaxed"
+ date_field: "date_order"
+grain: "one row per confirmed order; time-filterable by date_order; BU-filterable by team_id"
+
+store:
+ table: sale_order
+ alias: o
+ join: >-
+ LEFT JOIN res_partner rp ON rp.id = o.partner_id
+ LEFT JOIN res_partner ag ON ag.id = rp.agent_id
+ date_col: "o.date_order"
+ team_col: "o.team_id"
+ scope_sql: >-
+ o.state IN ('sale','done') AND o.team_id IN ({wholesale_team_ids})
+ AND o.partner_id NOT IN
+ (SELECT id FROM res_partner WHERE name LIKE {excluded_partner_name_like})
+ dims:
+ partner: {col: "o.partner_id", name_col: "o.partner_name", label: "Customer"}
+ # team names via CASE (crm_team is not synced; ids are baked tenant scope like the team filter)
+ team: {col: "o.team_id",
+ name_col: "CASE o.team_id WHEN 5 THEN 'Fisch' WHEN 6 THEN 'Royal' ELSE CAST(o.team_id AS VARCHAR) END",
+ label: "Business unit"}
+ # agent = the customer's assigned sales agent (res_partner.agent_id, first of agent_ids —
+ # same attribution as sales_lines; added 2026-07-17 with the m2m sync)
+ agent: {col: "rp.agent_id", name_col: "ag.name", label: "Agent"}
+ai_context: >
+ Order-HEADER grain of the same wholesale scope as sales_lines. Use for order counts and
+ order-level averages. Note: a small number of confirmed orders carry zero lines (data-health
+ artifact) — order-level counts therefore run slightly higher than distinct-order counts derived
+ from lines; the reconciliation contract accounts for them exactly. The `agent` dim carries the
+ same customer-book attribution as sales_lines (the customer's assigned agent) — use it for
+ "how many orders did write"; NULL agent = customer with no agent assigned.
diff --git a/platform/modules/agent.py b/platform/modules/agent.py
new file mode 100644
index 0000000000000000000000000000000000000000..9b9a019c369b108514d24439e3b19bc1c79ba352
--- /dev/null
+++ b/platform/modules/agent.py
@@ -0,0 +1,277 @@
+"""Agent module — per-agent (res.partner.agent_ids) analytics.
+
+An *agent* owns a **book** of customers (the same attribute the Customers module slices by). This
+module reports that book the way Sales/Customers/SKU report the whole company: a period scorecard
+with custom date windows (Today / WTD / Last week / MTD / QTD / YTD / any custom range), a sales
+trend, returns, top SKUs (with profit/order) and the FULL customer list — INCLUDING inactive
+accounts (no recent orders) so a rep sees who they've stopped selling to.
+
+Scope: reuses the Sales `order_domain` (Fisch+Royal, excluded accounts removed, state sale/done)
+so numbers tie to every other module. Returns are consolidated (credit notes aren't BU-tagged);
+everything else is BU-filterable via team_id.
+"""
+import sys
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+import modules.sales as sales_mod
+import modules.customers as cust_mod
+
+
+def options(t=None, team_id=None):
+ """Agent names with book activity — for the page/drawer picker."""
+ return cust_mod.agent_options(t, team_id)
+
+
+def _book(name):
+ """frozenset of every partner id assigned to the agent (incl. inactive). None only for 'All'."""
+ return cust_mod.agent_partner_ids(name)
+
+
+def _rev(date_from, date_to, team_id, book):
+ return O.sum_field('sale.order', sales_mod.order_domain(date_from, date_to, team_id, partner_ids=book),
+ 'amount_untaxed')
+
+
+def _orders(date_from, date_to, team_id, book):
+ return O.get_odoo().search_count('sale.order', sales_mod.order_domain(date_from, date_to, team_id, partner_ids=book))
+
+
+def _custs(date_from, date_to, team_id, book):
+ return O.distinct_count('sale.order', sales_mod.order_domain(date_from, date_to, team_id, partner_ids=book),
+ 'partner_id')
+
+
+# ------------------------------------------------------------ period scorecard (custom dating)
+# Today / WTD / Last week / MTD / QTD / YTD — each carries its window so the UI can decompose it
+# and so "what did this agent sell this/last week" is a click, not a date-math exercise.
+_PERIODS = [('Today', 'today'), ('Week to date', 'wtd'), ('Last week', 'lwk'),
+ ('Month to date', 'mtd'), ('Quarter to date', 'qtd'), ('Year to date', 'ytd')]
+
+
+def _window(key, t):
+ if key == 'today':
+ return P._d(t), P._d(t)
+ if key == 'lwk': # the full prior Mon–Sun week
+ f, _tt = P.wtd(t)
+ start = dt.date.fromisoformat(f) - dt.timedelta(days=7)
+ return start.isoformat(), (dt.date.fromisoformat(f) - dt.timedelta(days=1)).isoformat()
+ return {'wtd': P.wtd, 'mtd': P.mtd, 'qtd': P.qtd, 'ytd': P.ytd}[key](t)
+
+
+def scorecard(name, t=None, team_id=None):
+ """Book revenue (+ YoY same-period), orders for Today / WTD / Last week / MTD / QTD / YTD."""
+ t = t or P.today()
+ book = _book(name)
+ out = []
+ for label, key in _PERIODS:
+ f, tt = _window(key, t)
+ wk = key in ('today', 'wtd', 'lwk') # weekday-align the short windows' LY compare
+ cf, ct = P.shift_year(f, tt, weeks=wk)
+ rev, rev_ly = _rev(f, tt, team_id, book), _rev(cf, ct, team_id, book)
+ out.append({'key': key, 'label': label, 'date_from': f, 'date_to': tt, 'cmp_from': cf, 'cmp_to': ct,
+ 'revenue': rev, 'revenue_ly': rev_ly, 'yoy_pct': P.yoy_pct(rev, rev_ly),
+ 'orders': _orders(f, tt, team_id, book)})
+ return out
+
+
+def headline(name, date_from, date_to, team_id=None):
+ """Book KPIs for an ARBITRARY window (custom dating): revenue + YoY (same window LY), orders,
+ active customers, AOV and returns $ / return rate."""
+ book = _book(name)
+ cf, ct = P.shift_year(date_from, date_to, weeks=False)
+ rev, rev_ly = _rev(date_from, date_to, team_id, book), _rev(cf, ct, team_id, book)
+ orders = _orders(date_from, date_to, team_id, book)
+ ret = sales_mod._returns_amt(date_from, date_to, book)
+ return {'date_from': date_from, 'date_to': date_to, 'cmp_from': cf, 'cmp_to': ct,
+ 'revenue': rev, 'revenue_ly': rev_ly,
+ 'yoy_pct': P.yoy_pct(rev, rev_ly), 'orders': orders,
+ 'customers': _custs(date_from, date_to, team_id, book), 'aov': (rev / orders) if orders else 0.0,
+ 'returns': ret, 'return_rate_pct': (ret / rev * 100.0) if rev else 0.0}
+
+
+# ------------------------------------------------------------ sales trend
+def _book_monthly_rev(book, date_from, date_to, team_id=None):
+ g = O.read_group('sale.order', sales_mod.order_domain(date_from, date_to, team_id, partner_ids=book),
+ ['amount_untaxed:sum'], ['date_order:month'], lazy=False)
+ out = {}
+ for r in g:
+ ym = ((r.get('__range') or {}).get('date_order:month') or {}).get('from', '')[:7]
+ if ym:
+ out[ym] = r.get('amount_untaxed') or 0.0
+ return out
+
+
+def monthly(name, n=13, t=None, team_id=None):
+ """Book sales per month vs the same month last year (one month-grouped query over 2 years)."""
+ t = t or P.today()
+ book = _book(name)
+ mrev = _book_monthly_rev(book, dt.date(t.year - 2, t.month, 1).isoformat(), t.isoformat(), team_id)
+ rows = []
+ for ym, _s, _e in P.month_starts(n, t):
+ y, m = int(ym[:4]) - 1, int(ym[5:7])
+ this, last = mrev.get(ym, 0.0), mrev.get(f'{y:04d}-{m:02d}', 0.0)
+ rows.append({'month': ym, 'revenue': this, 'revenue_ly': last, 'yoy_pct': P.yoy_pct(this, last)})
+ return rows
+
+
+# ------------------------------------------------------------ full customer book (incl. inactive)
+def customers(name, t=None, team_id=None):
+ """EVERY customer in the agent's book, including inactive accounts (no YTD/LY orders) — those
+ show $0 with status 'Inactive'/'Dormant'. Each row is clickable to the customer drawer and
+ carries recency so a rep can see who's gone quiet. Sorted by YTD revenue desc (inactive last)."""
+ t = t or P.today()
+ book = _book(name)
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = cust_mod._cust_rev(yf, yt, team_id, book)
+ last = cust_mod._cust_rev(lf, lt, team_id, book)
+ lastord = cust_mod._last_order_dates(None, None, team_id, book) # all-time last order = recency
+ ids = list(book) if book is not None else list(set(this) | set(last))
+ attrs = cust_mod._partner_attrs(set(ids))
+ namemap = {r['id']: r.get('name') for r in O.search_read('res.partner', [('id', 'in', ids)], ['name'])}
+ rows = []
+ for p in ids:
+ tr = this.get(p, {}).get('rev', 0.0)
+ lr = last.get(p, {}).get('rev', 0.0)
+ a = attrs.get(p, {})
+ lo = lastord.get(p, '')
+ recency = (t - dt.date.fromisoformat(lo)).days if lo else None
+ status = 'Active' if tr > 0 else ('Dormant' if (lr > 0 or lo) else 'Inactive')
+ rows.append({'pid': p, 'customer': namemap.get(p) or (this.get(p) or last.get(p) or {}).get('name', '?'),
+ 'rev_ytd': tr, 'rev_ly': lr, 'change': tr - lr, 'yoy_pct': P.yoy_pct(tr, lr),
+ 'orders': this.get(p, {}).get('orders', 0), 'last_order': lo, 'recency_days': recency,
+ 'status': status, 'city': a.get('city', '(none)'), 'state': a.get('state', '(none)'),
+ 'agent': a.get('agent', name)})
+ rows.sort(key=lambda r: (r['rev_ytd'] <= 0, -r['rev_ytd'], -(r['rev_ly'])))
+ return rows
+
+
+# ------------------------------------------------------------ top SKUs (with profit/order)
+def top_skus(name, t=None, team_id=None, top=30):
+ """The book's top SKUs YTD (line-level), each with revenue, units, margin and profit/order."""
+ t = t or P.today()
+ book = _book(name)
+ if book is not None and not book:
+ return []
+ yf, yt = P.ytd(t)
+ lex = [('order_partner_id', 'in', list(book))] if book is not None else None
+ return sales_mod.decompose(yf, yt, team_id, line_extra=lex, top=top)['skus']
+
+
+# ------------------------------------------------------------ returns (book-scoped, consolidated)
+def returns_trend(name, n=13, t=None):
+ return sales_mod.returns_monthly(n, t, partner_ids=_book(name))
+
+
+def returns_headline(name, t=None):
+ return sales_mod.returns_headline(t, partner_ids=_book(name))
+
+
+# ------------------------------------------------------------ all-agents rollup (the page table)
+def _returns_by_agent(t=None):
+ """{agent_name: returns$ YTD} — credit notes mapped to each customer's agent."""
+ by_p = sales_mod.returns_by_partner(t)
+ attrs = cust_mod._partner_attrs(list(by_p))
+ agg = {}
+ for pid, amt in by_p.items():
+ a = (attrs.get(pid) or {}).get('agent') or '(none)'
+ agg[a] = agg.get(a, 0.0) + amt
+ return agg
+
+
+def rollup(t=None, team_id=None):
+ """Every agent ranked by YTD book revenue (+ YoY, customers, orders) with returns $ and return
+ rate. Reuses the Customers MECE agent rollup, so Σ(agents) == total YTD revenue."""
+ rows = cust_mod.by_dimension('agent', t, team_id=team_id)
+ ret = _returns_by_agent(t)
+ for r in rows:
+ r['agent'] = r['group']
+ r['returns'] = ret.get(r['group'], 0.0)
+ r['return_rate_pct'] = (r['returns'] / r['revenue'] * 100.0) if r.get('revenue') else 0.0
+ return rows
+
+
+# ------------------------------------------------------------ VALIDATION
+def validate(t=None, team_id=None):
+ """Reconcile the agent rollup to Odoo. (1) Σ(agent book revenue) == total YTD revenue — the
+ rollup is MECE over customers. (2) A sampled agent's scorecard YTD == its headline YTD."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ checks = []
+ rows = rollup(t, team_id=team_id)
+ agent_sum = sum(r['revenue'] for r in rows)
+ total = O.sum_field('sale.order', sales_mod.order_domain(yf, yt, team_id), 'amount_untaxed')
+ checks.append({'check': 'YTD revenue: Σ(agent book) == total', 'a': round(agent_sum, 2),
+ 'b': round(total, 2), 'gap': round(agent_sum - total, 2),
+ 'ok': abs(agent_sum - total) <= max(1.0, 0.001 * (total or 1))})
+ # sampled agent: scorecard YTD == headline YTD for the same window
+ sample = next((r['agent'] for r in rows if r['agent'] not in ('(none)',)), None)
+ if sample:
+ sc_ytd = next((s['revenue'] for s in scorecard(sample, t, team_id) if s['key'] == 'ytd'), 0.0)
+ hl = headline(sample, yf, yt, team_id)['revenue']
+ checks.append({'check': f'Agent "{sample}": scorecard YTD == headline YTD', 'a': round(sc_ytd, 2),
+ 'b': round(hl, 2), 'gap': round(sc_ytd - hl, 2), 'ok': abs(sc_ytd - hl) <= 1.0})
+ return checks
+
+
+# ------------------------------------------------------------ INVOICE-LINE ATTRIBUTION (2026-07-28)
+# A SECOND agent source. Everything above this line attributes by BOOK — the customer's assigned
+# agent (res.partner.agent_ids) — over confirmed SALES ORDERS. This section attributes per INVOICE
+# LINE, from the OCA sale-commission module, via the semantic layer (topics invoice_lines /
+# commission_lines). The two disagree on purpose and answer different questions:
+#
+# book -> "whose customer is this / who owns the relationship" (order basis)
+# invoice -> "what was actually credited to an agent on the billing" + the ONLY source that can
+# say what is NOT allocated to an agent (invoice basis)
+#
+# ⚠ A NAME ON A COMMISSION LINE IS NOT NECESSARILY AN AGENT — `res.partner.agent` is the flag.
+# "Anna" and "Shantal Erlich" are internal SALESPEOPLE who carry commission lines; the `agent`
+# dim excludes them and `include_salespeople` folds them back in as a clearly-labelled variant.
+# See [[invoice-line-agent-commission]].
+
+_ALLOC_LABEL = {'agent': 'Allocated to an agent', 'salesperson': 'Salesperson only',
+ 'none': 'Not allocated'}
+
+
+def invoice_line_rollup(t=None, team_id=None, include_salespeople=False):
+ """Per-name invoice-line revenue + the MECE allocation split, for a YTD window.
+
+ Returns {'by_agent': [...], 'allocation': [...], 'total': float, 'allocated': float,
+ 'unallocated': float, 'basis': str} — or {'error': msg} when the tenant store is not
+ ready (this path is store-only; there is no live fallback that stays honest about the
+ unallocated bucket).
+ """
+ import harness.semantic as S
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ dim = 'commission_name' if include_salespeople else 'agent'
+ try:
+ by = S.store_query('invoice_lines', ['invoiced_line_sales'], group_by=[dim],
+ date_from=yf, date_to=yt, team_id=team_id, limit=200).get('rows') or []
+ alloc = S.store_query('invoice_lines', ['invoiced_line_sales'], group_by=['allocation'],
+ date_from=yf, date_to=yt, team_id=team_id, limit=10).get('rows') or []
+ tot = (S.store_query('invoice_lines', ['invoiced_line_sales'], date_from=yf, date_to=yt,
+ team_id=team_id).get('rows') or [{}])[0].get('invoiced_line_sales') or 0.0
+ except Exception as e: # store not ready / model error — say so, don't fake
+ return {'error': str(e)}
+ # store_query row shape: the DIM KEY carries the display NAME and `_id` the raw value
+ # (allocation -> 'Salesperson only', allocation_id -> 'salesperson'). Reading `_name`
+ # returns None for every row and silently renders the whole table as "no agent".
+ rows = [{'agent': (r.get(dim) or '(no agent on the line)'),
+ 'revenue': r.get('invoiced_line_sales') or 0.0} for r in by]
+ rows.sort(key=lambda r: -r['revenue'])
+ amap = {r.get('allocation_id') or 'none': (r.get('invoiced_line_sales') or 0.0) for r in alloc}
+ allocated = amap.get('agent', 0.0)
+ return {
+ 'by_agent': rows,
+ 'allocation': [{'bucket': _ALLOC_LABEL[k], 'revenue': amap.get(k, 0.0)}
+ for k in ('agent', 'salesperson', 'none') if k in amap or True],
+ 'total': tot, 'allocated': allocated, 'unallocated': tot - allocated,
+ 'strict_none': amap.get('none', 0.0), 'salesperson_only': amap.get('salesperson', 0.0),
+ 'window': (yf, yt),
+ 'basis': ('invoice line · commission names incl. salespeople' if include_salespeople
+ else 'invoice line · real agents only'),
+ }
diff --git a/platform/modules/ar.py b/platform/modules/ar.py
new file mode 100644
index 0000000000000000000000000000000000000000..5494f3da49a591ff96fd3bfd8f30d2cb58462560
--- /dev/null
+++ b/platform/modules/ar.py
@@ -0,0 +1,547 @@
+"""Collections / AR module — receivables, aging, DSO, exposures, follow-up status,
+and the reconciliation gap (open-invoice total vs Odoo's partner receivable).
+
+AR is company-level (account.move), not team-scoped. Excluded accounts removed. Aging is built
+from open customer invoices/credit notes (signed residual nets credit notes), so buckets
+sum to the open-doc AR total. DSO uses LTM gross invoiced sales.
+"""
+import sys
+import math
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+import core.store as store
+
+BUCKETS = ['Current', '1-30', '31-60', '61-90', '90+']
+
+#: Store key for the NIGHTLY days-to-pay snapshot (owner, 2026-07-27).
+#:
+#: `days_to_pay()` costs ~300s — it walks three years of reconciled receivable lines and their
+#: full-reconcile groups to find each invoice's SETTLEMENT date. That is fine for a page somebody
+#: opens on purpose, and unacceptable inside `customer_data.pool()`, which every Customer-table
+#: render and every Space container start depends on. So the expensive half runs on a schedule
+#: and the table reads the ANSWER.
+#:
+#: Shape: {'computed': 'YYYY-MM-DD HH:MM', 'years': 3, 'days': {'': avg_days|None}}.
+#: JSON object keys are strings, which is why the reader coerces back to int.
+DTP_KEY = 'ar_days_to_pay'
+#: Refresh when the snapshot is older than this. 20h rather than 24 so a daily cadence never
+#: skips a day by drifting a few minutes later each time.
+DTP_MAX_AGE_HOURS = 20
+
+
+def days_to_pay_snapshot():
+ """`{pid: avg_days}` from the last snapshot — CHEAP, and it never raises.
+
+ Returns `{}` when the snapshot is absent, unreadable or malformed. A blank column is the
+ correct degradation: the alternative is a Customer table that will not render because a
+ derived statistic is missing, and `days_to_pay` is a statistic, not a fact the page is about.
+ """
+ try:
+ snap = store.get(DTP_KEY) or {}
+ days = snap.get('days') or {}
+ out = {}
+ for k, v in days.items():
+ try:
+ out[int(k)] = None if v is None else float(v)
+ except (TypeError, ValueError):
+ continue
+ return out
+ except Exception:
+ return {}
+
+
+def days_to_pay_computed_at():
+ """When the snapshot was taken ('' if there is none) — so the column can say how old it is."""
+ try:
+ return str((store.get(DTP_KEY) or {}).get('computed') or '')
+ except Exception:
+ return ''
+
+
+def refresh_days_to_pay_snapshot(max_age_hours=DTP_MAX_AGE_HOURS, t=None, force=False):
+ """Recompute + persist the snapshot IF it is stale. Returns what it did, and never raises.
+
+ Called from the app's existing background store-sync thread, so the ~300s cost is paid off
+ the render path by whichever container happens to be awake. Deliberately NOT called from
+ `pool()`: a lazy compute would just move the five minutes onto whoever opened the page first.
+
+ ⚠ Writes through `store.put` on a key nothing else owns. It is a DERIVED artifact — losing it
+ costs one recompute and nothing else, which is why it is safe to overwrite wholesale rather
+ than read-modify-write.
+ """
+ if not store.available():
+ return {'skipped': 'no store'}
+ try:
+ if not force:
+ at = days_to_pay_computed_at()
+ if at:
+ age = dt.datetime.now() - dt.datetime.strptime(at, '%Y-%m-%d %H:%M')
+ if age < dt.timedelta(hours=max_age_hours):
+ return {'skipped': 'fresh', 'age_h': round(age.total_seconds() / 3600, 1)}
+ except Exception:
+ pass # an unparseable stamp means "recompute", never "crash"
+ try:
+ res = days_to_pay(t)
+ days = {str(r['pid']): r.get('avg_days') for r in (res.get('_all_rows') or [])}
+ store.put(DTP_KEY, {'computed': dt.datetime.now().strftime('%Y-%m-%d %H:%M'),
+ 'years': 3, 'days': days})
+ return {'refreshed': len(days)}
+ except Exception as e:
+ return {'error': str(e)[:200]}
+
+
+#: The OVERDUE buckets, in order — `BUCKETS` minus 'Current'. Wave 17 R2 gives each of these a
+#: column on the Customer grid, so the vocabulary must have exactly one home: a second list
+#: spelled '31_60' somewhere else is how two surfaces start disagreeing about what "60 days"
+#: means. Derived from BUCKETS rather than retyped.
+OVERDUE_BUCKETS = [b for b in BUCKETS if b != 'Current']
+
+
+def _bucket(days):
+ if days <= 0:
+ return 'Current'
+ if days <= 30:
+ return '1-30'
+ if days <= 60:
+ return '31-60'
+ if days <= 90:
+ return '61-90'
+ return '90+'
+
+
+def _open_docs(t=None):
+ o = O.get_odoo()
+ dom = [('move_type', 'in', ['out_invoice', 'out_refund']), ('state', '=', 'posted'),
+ ('payment_state', 'in', ['not_paid', 'partial'])]
+ ex = O.excluded_partner_ids()
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ docs = o.search_read('account.move', dom,
+ ['name', 'partner_id', 'move_type', 'invoice_date', 'invoice_date_due',
+ 'amount_total', 'amount_residual_signed'])
+ today = t or P.today()
+ for d in docs:
+ due = d.get('invoice_date_due')
+ try:
+ d['days_overdue'] = max((today - dt.date.fromisoformat(due)).days, 0) if due else 0
+ except Exception:
+ d['days_overdue'] = 0
+ d['bucket'] = _bucket(d['days_overdue'])
+ d['open'] = d.get('amount_residual_signed') or 0.0
+ return docs
+
+
+def _ltm_invoiced(t=None):
+ """LTM gross invoiced sales (out_invoice − out_refund, amount_total) for DSO."""
+ o = O.get_odoo()
+ lf, lt = P.ltm(t)
+ base = [('state', '=', 'posted'), ('invoice_date', '>=', lf), ('invoice_date', '<=', lt)]
+ ex = O.excluded_partner_ids()
+ if ex:
+ base.append(('partner_id', 'not in', list(ex)))
+ inv = O.sum_field('account.move', base + [('move_type', '=', 'out_invoice')], 'amount_total')
+ ref = O.sum_field('account.move', base + [('move_type', '=', 'out_refund')], 'amount_total')
+ return inv - ref
+
+
+def summary(t=None):
+ docs = _open_docs(t)
+ total_ar = sum(d['open'] for d in docs)
+ overdue = sum(d['open'] for d in docs if d['days_overdue'] > 0)
+ ltm_sales = _ltm_invoiced(t)
+ dso = (total_ar / (ltm_sales / 365.0)) if ltm_sales else None
+ # reconciliation gap vs Odoo partner receivable (company-level)
+ ex = set(O.excluded_partner_ids())
+ partner_recv = sum(p['credit'] for p in O.search_read('res.partner',
+ [('credit', '>', 0)] + ([('id', 'not in', list(ex))] if ex else []), ['credit']))
+ n_customers = len({O.m2o_id(d['partner_id']) for d in docs})
+ return {
+ 'total_ar_open': total_ar,
+ 'overdue': overdue,
+ 'pct_overdue': (overdue / total_ar * 100) if total_ar else 0,
+ 'dso_days': dso,
+ 'ltm_invoiced': ltm_sales,
+ 'open_customers': n_customers,
+ 'partner_receivable': partner_recv,
+ 'reconciliation_gap': partner_recv - total_ar,
+ }
+
+
+def aging(t=None):
+ docs = _open_docs(t)
+ out = {b: 0.0 for b in BUCKETS}
+ for d in docs:
+ out[d['bucket']] += d['open']
+ total = sum(out.values()) or 1.0
+ return [{'bucket': b, 'amount': out[b], 'pct': out[b] / total * 100} for b in BUCKETS]
+
+
+def top_exposures(t=None, limit=30):
+ docs = _open_docs(t)
+ by = {}
+ for d in docs:
+ pid = O.m2o_id(d['partner_id'])
+ nm = O.m2o_name(d['partner_id'])
+ e = by.setdefault(pid, {'customer': nm, 'open': 0.0, 'overdue': 0.0, 'oldest': 0, 'docs': 0})
+ e['open'] += d['open']
+ e['docs'] += 1
+ if d['days_overdue'] > 0:
+ e['overdue'] += d['open']
+ e['oldest'] = max(e['oldest'], d['days_overdue'])
+ rows = sorted(by.values(), key=lambda x: -x['overdue'])
+ return rows[:limit]
+
+
+def followup_status_mix(t=None):
+ """Mix of res.partner.followup_status among customers carrying receivable.
+ followup_status is a non-stored computed field, so we count client-side."""
+ ex = set(O.excluded_partner_ids())
+ dom = [('credit', '>', 1)] + ([('id', 'not in', list(ex))] if ex else [])
+ parts = O.search_read('res.partner', dom, ['followup_status'])
+ counts = {}
+ for p in parts:
+ s = (p.get('followup_status') or '—').replace('_', ' ')
+ counts[s] = counts.get(s, 0) + 1
+ return [{'status': k, 'customers': v} for k, v in
+ sorted(counts.items(), key=lambda kv: -kv[1])]
+
+
+def reconciliation_flags(t=None, limit=30, threshold=50.0):
+ """Customers whose Odoo receivable (credit) diverges from their open-doc total —
+ indicates unapplied payments/credits. Surfaced during the collections work."""
+ docs = _open_docs(t)
+ open_by = {}
+ for d in docs:
+ pid = O.m2o_id(d['partner_id'])
+ open_by[pid] = open_by.get(pid, 0.0) + d['open']
+ ex = set(O.excluded_partner_ids())
+ parts = O.search_read('res.partner',
+ [('credit', '>', 0)] + ([('id', 'not in', list(ex))] if ex else []),
+ ['name', 'credit'])
+ rows = []
+ for p in parts:
+ gap = (p['credit'] or 0) - open_by.get(p['id'], 0.0)
+ if abs(gap) > threshold:
+ rows.append({'customer': p['name'], 'odoo_receivable': p['credit'],
+ 'open_docs': open_by.get(p['id'], 0.0), 'gap': gap})
+ rows.sort(key=lambda x: -abs(x['gap']))
+ return rows[:limit]
+
+
+def credit_exposure(t=None, grace_days=5, limit=40):
+ """Forward credit exposure per customer (OCA account_financial_risk semantics, re-implemented):
+ draft invoices + open-not-overdue + overdue-past-grace residuals + confirmed-uninvoiced order
+ value, vs the partner credit limit (when set). The number to check BEFORE accepting the next
+ PO from a shaky dealer. Company-level, GIFTWARE excluded."""
+ docs = _open_docs(t)
+ ex = O.excluded_partner_ids()
+ exdom = [('partner_id', 'not in', list(ex))] if ex else []
+
+ per = {}
+
+ def _e(pid, name):
+ return per.setdefault(pid, {'pid': pid, 'customer': name, 'draft': 0.0, 'open': 0.0,
+ 'overdue': 0.0, 'uninvoiced': 0.0, 'credit_limit': 0.0,
+ # Wave 17 R2 — the AGING SPLIT of `overdue`, per partner.
+ # Same loop, same documents, no extra Odoo call: this is the
+ # decomposition the Customer grid needs to REPLACE the
+ # Collections page ("who has money in 90+" is the whole job).
+ **{f'aged_{b}': 0.0 for b in OVERDUE_BUCKETS}})
+
+ for d in docs:
+ e = _e(O.m2o_id(d['partner_id']), O.m2o_name(d['partner_id']))
+ if d['days_overdue'] > grace_days:
+ e['overdue'] += d['open']
+ # ⚠ BUCKETED ONLY PAST THE GRACE PERIOD, deliberately — so the four buckets SUM
+ # EXACTLY to `overdue` and the grid's columns reconcile to its own total. Using
+ # `_bucket` on every doc instead would file days 1..grace under '1-30' while
+ # `overdue` excluded them, and the decomposition would be quietly short.
+ e[f'aged_{_bucket(d["days_overdue"])}'] += d['open']
+ else:
+ e['open'] += d['open']
+
+ for r in O.search_read('account.move',
+ [('move_type', 'in', ['out_invoice', 'out_refund']),
+ ('state', '=', 'draft')] + exdom,
+ ['partner_id', 'amount_total_signed']):
+ if r.get('partner_id'):
+ _e(O.m2o_id(r['partner_id']), O.m2o_name(r['partner_id']))['draft'] += \
+ r.get('amount_total_signed') or 0.0
+
+ uexdom = [('order_partner_id', 'not in', list(ex))] if ex else []
+ for g in O.read_group('sale.order.line',
+ [('order_id.state', 'in', ['sale', 'done']),
+ ('untaxed_amount_to_invoice', '!=', 0)] + uexdom,
+ ['untaxed_amount_to_invoice'], ['order_partner_id']):
+ p = g.get('order_partner_id')
+ if p:
+ _e(O.m2o_id(p), O.m2o_name(p))['uninvoiced'] += \
+ g.get('untaxed_amount_to_invoice') or 0.0
+
+ try: # credit_limit only exists/means something when the feature is enabled — degrade quietly
+ for r in O.search_read('res.partner', [('id', 'in', list(per.keys()))], ['credit_limit']):
+ if per.get(r['id']) is not None:
+ per[r['id']]['credit_limit'] = r.get('credit_limit') or 0.0
+ except Exception:
+ pass
+
+ rows_all = []
+ for e in per.values():
+ e['exposure'] = e['draft'] + e['open'] + e['overdue'] + e['uninvoiced']
+ e['headroom'] = (e['credit_limit'] - e['exposure']) if e['credit_limit'] else None
+ e['flag'] = bool(e['credit_limit']) and e['exposure'] > e['credit_limit']
+ rows_all.append(e)
+ rows_all.sort(key=lambda x: -x['exposure'])
+ # Display rows drop ~zero exposures; _all_rows keeps EVERY customer (incl. net-credit
+ # balances) — validation sums must run over the unfiltered set or the filter biases them.
+ rows = [r for r in rows_all if abs(r['exposure']) > 1]
+ return {'rows': rows[:limit], 'n_flagged': sum(1 for r in rows if r['flag']),
+ 'total_exposure': sum(r['exposure'] for r in rows),
+ 'grace_days': grace_days, '_all_rows': rows_all}
+
+
+def days_to_pay(t=None, years=3, limit=30):
+ """Per-customer average days from invoice to SETTLEMENT (OCA partner_time_to_pay semantics):
+ settlement date = the date the receivable line became fully reconciled (max counterpart line
+ date in its full-reconcile group), NOT the payment document date. Windows: lifetime (bounded
+ to `years`), last calendar year, this year — by invoice date. Joined with current open AR so
+ the table reads 'who owes us AND how do they behave'."""
+ o = O.get_odoo()
+ today = t or P.today()
+ since = (today - dt.timedelta(days=365 * years)).isoformat()
+ ex = O.excluded_partner_ids()
+ dom = [('move_id.move_type', '=', 'out_invoice'), ('move_id.state', '=', 'posted'),
+ ('account_id.account_type', '=', 'asset_receivable'),
+ ('full_reconcile_id', '!=', False), ('date', '>=', since)]
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ inv_lines = O.search_read('account.move.line', dom,
+ ['partner_id', 'date', 'full_reconcile_id', 'move_id'])
+
+ # Payment-term days per term id: prefer the term lines' `days`; fall back to parsing the name.
+ term_days = {}
+ try:
+ terms = O.search_read('account.payment.term', [], ['name'])
+ tl = O.search_read('account.payment.term.line', [], ['payment_id', 'days'])
+ by_term = {}
+ for l in tl:
+ k = O.m2o_id(l.get('payment_id'))
+ if k is not None:
+ by_term[k] = max(by_term.get(k, 0), l.get('days') or 0)
+ import re as _re
+ for tm in terms:
+ d = by_term.get(tm['id'])
+ if d is None:
+ m = _re.search(r'(\d+)', tm['name'] or '')
+ d = int(m.group(1)) if m and 'day' in (tm['name'] or '').lower() else 0
+ term_days[tm['id']] = {'name': tm['name'], 'days': d}
+ except Exception:
+ term_days = {}
+
+ # Per-invoice terms + totals (12m window for the free-credit estimate).
+ y365_iso = (today - dt.timedelta(days=365)).isoformat()
+ move_ids = list({O.m2o_id(l['move_id']) for l in inv_lines if l.get('move_id')})
+ move_info = {}
+ for i in range(0, len(move_ids), 5000):
+ for mv in O.search_read('account.move', [('id', 'in', move_ids[i:i + 5000])],
+ ['invoice_payment_term_id', 'amount_total', 'invoice_date',
+ 'partner_id']):
+ move_info[mv['id']] = mv
+
+ fr_ids = list({O.m2o_id(l['full_reconcile_id']) for l in inv_lines
+ if l.get('full_reconcile_id')})
+ settle = {}
+ for i in range(0, len(fr_ids), 5000):
+ chunk = fr_ids[i:i + 5000]
+ try: # grouped max-date per reconcile (one call per chunk)
+ for g in O.read_group('account.move.line',
+ [('full_reconcile_id', 'in', chunk)],
+ ['date:max'], ['full_reconcile_id']):
+ k = O.m2o_id(g.get('full_reconcile_id'))
+ d = g.get('date') or g.get('date:max') or ''
+ d = str(d)[:10]
+ if k and d:
+ settle[k] = max(settle.get(k, ''), d)
+ except Exception: # fallback: raw lines
+ for l in o.search_read('account.move.line',
+ [('full_reconcile_id', 'in', chunk)],
+ ['full_reconcile_id', 'date']):
+ k = O.m2o_id(l['full_reconcile_id'])
+ d = str(l.get('date') or '')[:10]
+ if k and d:
+ settle[k] = max(settle.get(k, ''), d)
+
+ y0 = dt.date(today.year, 1, 1).isoformat()
+ ly0 = dt.date(today.year - 1, 1, 1).isoformat()
+ per = {}
+ violations = 0
+ for l in inv_lines:
+ k = O.m2o_id(l.get('full_reconcile_id'))
+ inv_d = str(l.get('date') or '')[:10]
+ pay_d = settle.get(k, '')
+ if not inv_d or not pay_d:
+ continue
+ days = (dt.date.fromisoformat(pay_d) - dt.date.fromisoformat(inv_d)).days
+ if days < 0:
+ violations += 1
+ continue
+ pid = O.m2o_id(l['partner_id'])
+ e = per.setdefault(pid, {'pid': pid, 'customer': O.m2o_name(l['partner_id']),
+ 'all': [], 'ly': [], 'ytd': []})
+ e['all'].append(days)
+ if inv_d >= y0:
+ e['ytd'].append(days)
+ elif inv_d >= ly0:
+ e['ly'].append(days)
+
+ open_by = {}
+ for d in _open_docs(t):
+ pid = O.m2o_id(d['partner_id'])
+ oe = open_by.setdefault(pid, {'open': 0.0, 'overdue': 0.0})
+ oe['open'] += d['open']
+ if d['days_overdue'] > 0:
+ oe['overdue'] += d['open']
+
+ def _avg(v):
+ return (sum(v) / len(v)) if v else None
+
+ # Terms + 12m invoiced per partner (dominant term by invoiced $) → compliance/free-credit.
+ pt_terms, pt_inv12 = {}, {}
+ for mid, mv in move_info.items():
+ pid = O.m2o_id(mv.get('partner_id'))
+ tid = O.m2o_id(mv.get('invoice_payment_term_id'))
+ amt = mv.get('amount_total') or 0.0
+ d = pt_terms.setdefault(pid, {})
+ d[tid] = d.get(tid, 0.0) + amt
+ if str(mv.get('invoice_date') or '')[:10] >= y365_iso:
+ pt_inv12[pid] = pt_inv12.get(pid, 0.0) + amt
+
+ rows = []
+ total_free_credit = 0.0
+ for pid, e in per.items():
+ ob = open_by.get(pid, {'open': 0.0, 'overdue': 0.0})
+ a_ly, a_ytd = _avg(e['ly']), _avg(e['ytd'])
+ a_all = _avg(e['all'])
+ dom_tid = max(pt_terms.get(pid, {None: 0}).items(), key=lambda kv: kv[1])[0]
+ tinfo = term_days.get(dom_tid, {'name': '(none)', 'days': 0})
+ eff = a_ytd if a_ytd is not None else a_all
+ excess = max(0.0, (eff or 0) - tinfo['days']) if eff is not None else None
+ inv12 = pt_inv12.get(pid, 0.0)
+ free_credit = (excess / 365.0 * inv12) if excess else 0.0
+ total_free_credit += free_credit or 0.0
+ rows.append({'pid': pid, 'customer': e['customer'], 'open': ob['open'], 'overdue': ob['overdue'],
+ 'paid_invoices': len(e['all']), 'avg_days': a_all,
+ 'avg_days_ly': a_ly, 'avg_days_ytd': a_ytd,
+ 'improvement_days': (a_ly - a_ytd) if (a_ly is not None and a_ytd is not None) else None,
+ 'terms': tinfo['name'], 'term_days': tinfo['days'],
+ 'excess_days': excess, 'free_credit': free_credit,
+ 'invoiced_12m': inv12})
+ rows.sort(key=lambda x: -x['open'])
+ return {'rows': rows[:limit], 'n_customers': len(per), 'violations': violations,
+ 'since': since, 'total_free_credit': total_free_credit,
+ '_rowsum_inv12': sum(pt_inv12.values()), '_all_rows': rows}
+
+
+def credit_limit_proposals(exposure, behavior):
+ """PROPOSED credit limits for customers trading on open terms with NO limit set (only 22 of
+ 3,595 partners have one — the field is effectively unmaintained). Trade-credit heuristic:
+ limit ≈ (12m invoiced / 365) × (term days + 30 review buffer), tiered by observed payment
+ behavior (pays within terms +5d → ×1.25 · chronic 15d+ overrun → ×0.75), rounded UP to $500,
+ floor $1,000. READ-ONLY: an export worklist for the owner to enter in Odoo — once limits are
+ in, the exposure table's breach flag and Odoo's own credit hold both come alive."""
+ beh = {r['pid']: r for r in behavior.get('_all_rows', []) if r.get('pid')}
+ out = []
+ for e in exposure.get('_all_rows', []):
+ if e.get('credit_limit') or e.get('exposure', 0) <= 0:
+ continue
+ b = beh.get(e['pid'])
+ if not b or (b.get('invoiced_12m') or 0) <= 0:
+ continue
+ base = b['invoiced_12m'] / 365.0 * ((b.get('term_days') or 0) + 30)
+ exd = b.get('excess_days')
+ tier = ('on-time' if (exd is not None and exd <= 5)
+ else ('slow' if (exd or 0) > 15 else 'normal'))
+ mult = {'on-time': 1.25, 'normal': 1.0, 'slow': 0.75}[tier]
+ prop = max(1000.0, math.ceil(base * mult / 500.0) * 500.0)
+ out.append({'pid': e['pid'], 'customer': e['customer'],
+ 'invoiced_12m': b['invoiced_12m'], 'term_days': b.get('term_days') or 0,
+ 'excess_days': exd, 'tier': tier, 'exposure': e['exposure'],
+ 'proposed_limit': prop,
+ 'over_proposed': e['exposure'] > prop})
+ out.sort(key=lambda r: -r['exposure'])
+ return {'rows': out, 'n': len(out),
+ 'n_over': sum(1 for r in out if r['over_proposed']),
+ 'over_value': sum(r['exposure'] - r['proposed_limit']
+ for r in out if r['over_proposed']),
+ 'with_limit': [e for e in exposure.get('_all_rows', []) if e.get('credit_limit')]}
+
+
+def validate(t=None, exposure=None, behavior=None):
+ """exposure/behavior: pass precomputed credit_exposure()/days_to_pay() results to avoid
+ recomputing the heavy pulls when the caller (the page bundle) already has them; validate.py
+ calls with no args and computes everything itself."""
+ docs = _open_docs(t)
+ checks = []
+ total = sum(d['open'] for d in docs)
+ bucket_sum = sum(a['amount'] for a in aging(t))
+ checks.append({
+ 'check': 'AR aging: Σ(buckets) == total open AR',
+ 'a': round(bucket_sum, 2), 'b': round(total, 2),
+ 'gap': round(bucket_sum - total, 2),
+ 'ok': abs(bucket_sum - total) <= 1.0})
+
+ # WAVE 17 R2 — the aging SPLIT must decompose the overdue total exactly. These four numbers
+ # became COLUMNS on the Customer grid this wave (the Collections view is built on them), so
+ # a bucket that drifted from `overdue` would be a wrong number on a worklist somebody works
+ # from. Σ(buckets) == Σ(overdue) is exact by construction (same loop, same documents) and is
+ # asserted rather than assumed, because "by construction" is what every drift was before it
+ # happened.
+ ce_buckets = exposure or credit_exposure(t)
+ bkt = sum(r.get(f'aged_{b}', 0.0) for r in ce_buckets['_all_rows']
+ for b in OVERDUE_BUCKETS)
+ od = sum(r['overdue'] for r in ce_buckets['_all_rows'])
+ checks.append({
+ 'check': 'AR aging split: Σ(1-30, 31-60, 61-90, 90+) == Σ(overdue)',
+ 'a': round(bkt, 2), 'b': round(od, 2),
+ 'gap': round(bkt - od, 2),
+ 'ok': abs(bkt - od) <= 0.01})
+
+ exp_sum = sum(e['open'] for e in top_exposures(t, limit=10**9))
+ checks.append({
+ 'check': 'AR: Σ(per-customer open) == total open AR',
+ 'a': round(exp_sum, 2), 'b': round(total, 2),
+ 'gap': round(exp_sum - total, 2),
+ 'ok': abs(exp_sum - total) <= 1.0})
+
+ # Credit exposure: per-customer (open + overdue) row-build vs an independent read_group sum
+ # of amount_residual_signed over the same unpaid-invoice domain. The two sides are separate
+ # RPC snapshots on a LIVE ledger — a payment applied between them shifts the total — so the
+ # sides are pulled adjacently and the check carries an explicit live-drift tolerance. A
+ # structural bug (double-count, dropped partner, wrong bucket) shows as a %-level gap, far
+ # beyond it.
+ ex = O.excluded_partner_ids()
+ dom = [('move_type', 'in', ['out_invoice', 'out_refund']), ('state', '=', 'posted'),
+ ('payment_state', 'in', ['not_paid', 'partial'])]
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ resid = O.sum_field('account.move', dom, 'amount_residual_signed')
+ ce = exposure or credit_exposure(t)
+ ce_open = sum(r['open'] + r['overdue'] for r in ce['_all_rows'])
+ tol = max(500.0, abs(resid) * 0.001)
+ checks.append({
+ 'check': 'Exposure: Σ(open+overdue per customer) == read_group Σ residual (live-drift tol)',
+ 'a': round(ce_open, 2), 'b': round(resid, 2),
+ 'gap': round(ce_open - resid, 2),
+ 'ok': abs(ce_open - resid) <= tol})
+
+ # Days-to-pay: settlement can never precede the invoice line date, and coverage exists.
+ dtp = behavior or days_to_pay(t)
+ checks.append({
+ 'check': 'Days-to-pay: settlement>=invoice violations == 0 (and customers covered > 0)',
+ 'a': dtp['violations'], 'b': 0,
+ 'gap': dtp['violations'],
+ 'ok': dtp['violations'] == 0 and dtp['n_customers'] > 0})
+ return checks
diff --git a/platform/modules/assortment.py b/platform/modules/assortment.py
new file mode 100644
index 0000000000000000000000000000000000000000..1e860daeae838253b21ffeff66bd51ac50bc43bc
--- /dev/null
+++ b/platform/modules/assortment.py
@@ -0,0 +1,156 @@
+"""Assortment module — facet-level performance from the curated product taxonomy the team
+already maintains IN Odoo (x_main/x_sub/x_color/x_material/x_occasion/x_collection +
+x_studio_season), which no other module used until 2026-07-05.
+
+Governing question (dashboard standard): WHICH PARTS OF THE ASSORTMENT EARN THEIR KEEP — AND IS
+THE SEASONAL BUY READY? Revenue/margin/YoY per facet value (BU-scoped via the standard wholesale
+line domain), plus season readiness: units the coming 6 months sold LAST year per season tag vs
+units on hand today. validate() reconciles facet partitions to independent totals.
+"""
+import sys
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+
+FACETS = [('x_main', 'Main category'), ('x_sub', 'Sub-category'), ('x_color', 'Color'),
+ ('x_material', 'Material'), ('x_occasion', 'Occasion'),
+ ('x_collection', 'Collection'), ('x_studio_season', 'Season')]
+UNTAGGED = '(untagged)'
+
+
+def _products():
+ """pid -> {code, facets..., on_hand, cost}. One pull, all facet fields."""
+ fields = ['default_code', 'qty_available', 'standard_price'] + [f for f, _ in FACETS]
+ out = {}
+ for p in O.search_read('product.product',
+ [('default_code', '!=', False), ('active', 'in', [True, False])],
+ fields):
+ out[p['id']] = p
+ return out
+
+
+def _rev_by_product(df, dt_, team_id=None):
+ """product_id -> {rev, qty, margin} over the window, standard wholesale scope."""
+ out = {}
+ for g in O.read_group('sale.order.line', O.sale_line_domain(df, dt_, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'],
+ ['product_id'], lazy=False):
+ if g.get('product_id'):
+ out[O.m2o_id(g['product_id'])] = {
+ 'rev': g.get('price_subtotal') or 0.0,
+ 'qty': g.get('product_uom_qty') or 0.0,
+ 'margin': g.get('margin') or 0.0}
+ return out
+
+
+def build(team_id=None, t=None):
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ prods = _products()
+ now = _rev_by_product(yf, yt, team_id)
+ ly = _rev_by_product(lf, lt, team_id)
+
+ # ---- facet rollups (every dimension partitions the same YTD revenue) -------------------
+ dims = {}
+ for fkey, flabel in FACETS:
+ agg = {}
+ for pid, r in now.items():
+ p = prods.get(pid)
+ val = ((p or {}).get(fkey) or UNTAGGED) if p else UNTAGGED
+ val = str(val).strip() or UNTAGGED
+ e = agg.setdefault(val, {'value': val, 'rev': 0.0, 'rev_ly': 0.0, 'margin': 0.0,
+ 'qty': 0.0, 'skus': set()})
+ e['rev'] += r['rev']
+ e['margin'] += r['margin']
+ e['qty'] += r['qty']
+ e['skus'].add(pid)
+ for pid, r in ly.items():
+ p = prods.get(pid)
+ val = ((p or {}).get(fkey) or UNTAGGED) if p else UNTAGGED
+ val = str(val).strip() or UNTAGGED
+ agg.setdefault(val, {'value': val, 'rev': 0.0, 'rev_ly': 0.0, 'margin': 0.0,
+ 'qty': 0.0, 'skus': set()})['rev_ly'] += r['rev']
+ rows = []
+ for e in agg.values():
+ e['n_skus'] = len(e['skus'])
+ del e['skus']
+ e['gm_pct'] = (e['margin'] / e['rev'] * 100) if e['rev'] else None
+ e['yoy_pct'] = ((e['rev'] - e['rev_ly']) / e['rev_ly'] * 100) if e['rev_ly'] else None
+ e['yoy_abs'] = e['rev'] - e['rev_ly']
+ rows.append(e)
+ rows.sort(key=lambda x: -x['rev'])
+ dims[fkey] = {'label': flabel, 'rows': rows}
+
+ # ---- coverage: how much of revenue is on FACETED (x_main-tagged) SKUs ------------------
+ total_rev = sum(r['rev'] for r in now.values())
+ faceted_rev = sum(r['rev'] for pid, r in now.items()
+ if prods.get(pid, {}).get('x_main'))
+ n_faceted = sum(1 for p in prods.values() if p.get('x_main'))
+
+ # ---- season readiness: units sold in [today, +180d] LAST YEAR per season vs on hand ----
+ nf, ntt = (t - dt.timedelta(days=365)).isoformat(), (t + dt.timedelta(days=180) - dt.timedelta(days=365)).isoformat()
+ ahead_ly = _rev_by_product(nf, ntt, team_id)
+ seasons = {}
+ for pid, r in ahead_ly.items():
+ p = prods.get(pid)
+ s = str((p or {}).get('x_studio_season') or '').strip()
+ if not s:
+ continue
+ e = seasons.setdefault(s, {'season': s, 'demand_units_ly': 0.0, 'demand_rev_ly': 0.0,
+ 'on_hand_units': 0.0, 'on_hand_value': 0.0, 'skus': set()})
+ e['demand_units_ly'] += r['qty']
+ e['demand_rev_ly'] += r['rev']
+ e['skus'].add(pid)
+ for pid, p in prods.items():
+ s = str(p.get('x_studio_season') or '').strip()
+ if s and s in seasons:
+ seasons[s]['on_hand_units'] += p.get('qty_available') or 0.0
+ seasons[s]['on_hand_value'] += (p.get('qty_available') or 0.0) * (p.get('standard_price') or 0.0)
+ season_rows = []
+ for e in seasons.values():
+ e['n_skus'] = len(e['skus'])
+ e['codes'] = sorted((prods.get(pid, {}).get('default_code') or '').strip()
+ for pid in e['skus'] if prods.get(pid, {}).get('default_code'))
+ del e['skus']
+ e['cover_pct'] = (e['on_hand_units'] / e['demand_units_ly'] * 100) if e['demand_units_ly'] else None
+ season_rows.append(e)
+ season_rows.sort(key=lambda x: -x['demand_rev_ly'])
+
+ # suspect facet hygiene: values carried by <3 SKUs across ALL products (typos like 'vgsd')
+ suspects = []
+ for fkey, flabel in FACETS:
+ vals = {}
+ for p in prods.values():
+ v = str(p.get(fkey) or '').strip()
+ if v:
+ vals[v] = vals.get(v, 0) + 1
+ suspects += [{'facet': flabel, 'value': v, 'skus': n} for v, n in vals.items() if n < 3]
+
+ return {'dims': dims, 'season': season_rows, 'suspects': sorted(suspects, key=lambda x: x['skus']),
+ 'total_rev': total_rev, 'faceted_rev': faceted_rev,
+ 'faceted_share': (faceted_rev / total_rev * 100) if total_rev else None,
+ 'n_faceted': n_faceted, 'n_products': len(prods),
+ 'ytd': (yf, yt), 'ly': (lf, lt)}
+
+
+def validate(t=None, team_id=None, pre=None):
+ t = t or P.today()
+ b = pre or build(team_id, t)
+ yf, yt = b['ytd']
+ total = O.sum_field('sale.order.line', O.sale_line_domain(yf, yt, team_id), 'price_subtotal')
+ checks = []
+ for fkey, flabel in FACETS[:2]: # every dimension partitions the SAME revenue; check two
+ s = sum(r['rev'] for r in b['dims'][fkey]['rows'])
+ checks.append({'check': f'Assortment: Σ({flabel} facet rev) == total line revenue (YTD)',
+ 'a': round(s, 2), 'b': round(total, 2), 'gap': round(s - total, 2),
+ 'ok': abs(s - total) <= max(1.0, abs(total) * 0.001)})
+ fs = b['faceted_rev'] + sum(r['rev'] for r in b['dims']['x_main']['rows']
+ if r['value'] == UNTAGGED)
+ checks.append({'check': 'Assortment: faceted rev + untagged bucket == total (partition)',
+ 'a': round(fs, 2), 'b': round(sum(r['rev'] for r in b['dims']['x_main']['rows']), 2),
+ 'gap': round(fs - sum(r['rev'] for r in b['dims']['x_main']['rows']), 2),
+ 'ok': abs(fs - sum(r['rev'] for r in b['dims']['x_main']['rows'])) <= 1.0})
+ return checks
diff --git a/platform/modules/backorders.py b/platform/modules/backorders.py
new file mode 100644
index 0000000000000000000000000000000000000000..cf16f4939657d1bc903dbdde7b1921e9b77e087f
--- /dev/null
+++ b/platform/modules/backorders.py
@@ -0,0 +1,191 @@
+"""Backorders — what we owe customers, aged (the mirror image of AR aging).
+
+Every confirmed-but-undelivered sale line, aged against the order's promise date
+(commitment_date, else the earliest open outgoing picking's scheduled date), valued at the
+line's discounted unit price, joined to supply (on-hand + earliest inbound PO ETA) so each
+row carries ONE verb action: Ship (stock is on hand) / Expedite the PO (inbound exists) /
+Call the customer (no supply in sight). Line-level fill canon: ≥95% industry bar.
+
+Scope: wholesale teams (5/6), GIFTWARE/Amazon excluded — a backorder board is about promises
+to dealers. BU-filterable.
+"""
+import datetime as dt
+
+import core.odoo as O
+import core.periods as P
+import modules.procurement as proc
+
+BUCKETS = ['not due', '0-7', '8-21', '22-45', '45+', 'no promise']
+_OPEN_PICK_DOMAIN = [('state', 'in', ['confirmed', 'assigned', 'waiting']),
+ ('picking_type_id.code', '=', 'outgoing')]
+
+
+def _chunk(ids, n=2000):
+ ids = list(ids)
+ for i in range(0, len(ids), n):
+ yield ids[i:i + n]
+
+
+def _open_pickings():
+ """Open outgoing pickings → {origin(SO name): earliest scheduled date}."""
+ picks = O.search_read('stock.picking', list(_OPEN_PICK_DOMAIN),
+ ['origin', 'scheduled_date'])
+ sched = {}
+ for p in picks:
+ o = (p.get('origin') or '').strip()
+ if not o:
+ continue
+ d = str(p.get('scheduled_date') or '')[:10]
+ if d and (o not in sched or d < sched[o]):
+ sched[o] = d
+ return picks, sched
+
+
+def board(team_id=None, t=None):
+ """The full open-line board + bucket rollup. Returns dict(rows, buckets, orders, coverage)."""
+ t = t or P.today()
+ today = t
+ picks, sched = _open_pickings()
+
+ # the sale orders behind those pickings, in wholesale scope
+ orders = []
+ names = list(sched)
+ ex = O.excluded_partner_ids()
+ for ch in _chunk(names, 500):
+ dom = [('name', 'in', ch), ('state', 'in', ['sale', 'done'])]
+ dom.append(('team_id', '=', team_id) if team_id is not None
+ else ('team_id', 'in', O.TEAM_IDS))
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ orders += O.search_read('sale.order', dom,
+ ['name', 'partner_id', 'team_id', 'date_order',
+ 'commitment_date'])
+ by_oid = {o['id']: o for o in orders}
+
+ # their lines, open qty computed locally (a domain cannot compare two fields)
+ lines = []
+ for ch in _chunk(list(by_oid), 500):
+ lines += O.search_read('sale.order.line',
+ [('order_id', 'in', ch), ('display_type', '=', False),
+ ('product_id', '!=', False)],
+ ['order_id', 'order_partner_id', 'product_id',
+ 'product_uom_qty', 'qty_delivered', 'price_unit',
+ 'price_subtotal', 'name'])
+ open_lines = []
+ for r in lines:
+ openq = (r.get('product_uom_qty') or 0.0) - (r.get('qty_delivered') or 0.0)
+ if openq <= 1e-3:
+ continue
+ qty = r.get('product_uom_qty') or 0.0
+ unit = (r.get('price_subtotal') or 0.0) / qty if qty else (r.get('price_unit') or 0.0)
+ r['open_qty'] = openq
+ r['open_value'] = openq * unit
+ open_lines.append(r)
+
+ # supply joins: on-hand + earliest inbound ETA per product
+ pids = list({O.m2o_id(r['product_id']) for r in open_lines})
+ onhand, codes = {}, {}
+ for ch in _chunk(pids):
+ for p in O.search_read('product.product',
+ [('id', 'in', ch), ('active', 'in', [True, False])],
+ ['qty_available', 'default_code']):
+ onhand[p['id']] = p.get('qty_available') or 0.0
+ codes[p['id']] = (p.get('default_code') or '').strip()
+ _all_pol, pol = proc._open_po_lines()
+ inbound = {}
+ for l in pol:
+ pid = O.m2o_id(l.get('product_id'))
+ if not pid:
+ continue
+ cur = inbound.setdefault(pid, {'qty': 0.0, 'eta': None})
+ cur['qty'] += l.get('open_qty') or 0.0
+ eta = l.get('expected') or ''
+ if eta and (cur['eta'] is None or eta < cur['eta']):
+ cur['eta'] = eta
+
+ rows = []
+ n_promised = 0
+ for r in open_lines:
+ oid = O.m2o_id(r['order_id'])
+ o = by_oid.get(oid) or {}
+ promise = str(o.get('commitment_date') or '')[:10] or sched.get(o.get('name', ''), '')
+ if str(o.get('commitment_date') or '')[:10]:
+ n_promised += 1
+ if promise:
+ days = (today - dt.date.fromisoformat(promise)).days
+ bucket = ('not due' if days < 0 else '0-7' if days <= 7
+ else '8-21' if days <= 21 else '22-45' if days <= 45 else '45+')
+ else:
+ days, bucket = None, 'no promise'
+ pid_prod = O.m2o_id(r['product_id'])
+ oh = onhand.get(pid_prod, 0.0)
+ inb = inbound.get(pid_prod)
+ if oh >= r['open_qty']:
+ action = 'Ship — stock on hand'
+ elif inb and inb.get('eta'):
+ action = f"Expedite PO — ETA {inb['eta']}"
+ else:
+ action = 'Call customer — no supply inbound'
+ rows.append({
+ 'pid': O.m2o_id(r['order_partner_id']),
+ 'customer': O.m2o_name(r['order_partner_id']),
+ 'order': o.get('name', ''),
+ 'bu': O.TEAM_NAMES.get(O.m2o_id(o.get('team_id')), '?'),
+ 'sku': codes.get(pid_prod, ''), 'product': O.m2o_name(r['product_id']),
+ 'open_qty': r['open_qty'], 'open_value': r['open_value'],
+ 'promise': promise or '—', 'days_past': days if days is not None else '',
+ 'bucket': bucket, 'on_hand': oh,
+ 'inbound_eta': (inb or {}).get('eta') or '',
+ 'action': action,
+ })
+ rows.sort(key=lambda x: -x['open_value'])
+ bucket_rollup = []
+ for bu in sorted({r['bu'] for r in rows}):
+ for b in BUCKETS:
+ v = sum(r['open_value'] for r in rows if r['bu'] == bu and r['bucket'] == b)
+ if v:
+ bucket_rollup.append({'bu': bu, 'bucket': b, 'value': v})
+ return {
+ 'rows': rows,
+ 'buckets': bucket_rollup,
+ 'n_orders': len({r['order'] for r in rows}),
+ 'open_value': sum(r['open_value'] for r in rows),
+ 'past_value': sum(r['open_value'] for r in rows
+ if r['bucket'] in ('0-7', '8-21', '22-45', '45+')),
+ 'promise_coverage': (n_promised / len(open_lines) * 100.0) if open_lines else 0.0,
+ 'n_pickings': len(picks),
+ }
+
+
+def validate(t=None, team_id=None):
+ """(1) the picking pull is complete (search_count ties the row pull — truncation guard);
+ (2) the local open-qty arithmetic ties Odoo's own aggregates: for the pulled order set,
+ Σ(product_uom_qty) − Σ(qty_delivered) via server-side read_group == Σ of our per-row
+ open_qty (same universe, independent arithmetic path)."""
+ b = board(team_id, t)
+ n_count = O.get_odoo().search_count('stock.picking', list(_OPEN_PICK_DOMAIN))
+ checks = [{'check': 'open outgoing pickings — pull complete',
+ 'a': b['n_pickings'], 'b': n_count,
+ 'gap': b['n_pickings'] - n_count, 'ok': b['n_pickings'] == n_count}]
+ oids = sorted({r['order'] for r in b['rows']})
+ if oids:
+ dom = [('order_id.name', 'in', oids[:500]), ('display_type', '=', False),
+ ('product_id', '!=', False)]
+ try:
+ g = O.read_group('sale.order.line', dom,
+ ['product_uom_qty:sum', 'qty_delivered:sum'], [], lazy=False)
+ srv_open = ((g[0].get('product_uom_qty') or 0.0)
+ - (g[0].get('qty_delivered') or 0.0)) if g else 0.0
+ # NET open recomputed row-level (includes over-shipped negatives, which the board
+ # excludes) so both sides measure the same universe
+ rl = O.search_read('sale.order.line', dom, ['product_uom_qty', 'qty_delivered'])
+ ours = sum((l.get('product_uom_qty') or 0.0) - (l.get('qty_delivered') or 0.0)
+ for l in rl)
+ checks.append({'check': 'open qty — server aggregate vs row arithmetic',
+ 'a': round(ours, 2), 'b': round(srv_open, 2),
+ 'gap': round(ours - srv_open, 2),
+ 'ok': abs(ours - srv_open) < 1.0})
+ except Exception as e:
+ checks.append({'check': 'open qty aggregate (read_group)', 'a': '—',
+ 'b': str(e)[:60], 'gap': '', 'ok': False})
+ return checks
diff --git a/platform/modules/bookings.py b/platform/modules/bookings.py
new file mode 100644
index 0000000000000000000000000000000000000000..1cc3a839c6a9e264df56e3e768ed06694aaa350a
--- /dev/null
+++ b/platform/modules/bookings.py
@@ -0,0 +1,137 @@
+"""Order Book — pre-season booking coverage (the forward view sitting unused in sale.order).
+
+Giftware pre-books: confirmed orders carry FUTURE delivery windows (commitment_date), so the
+order book for the season is known months ahead. The curve compares THIS year's cumulative
+booked $ for season delivery against last year's same-week curve — 20% under with 12 weeks to
+go = cut the container program NOW; over = expand POs / push laggard agents.
+
+Season window: deliveries Aug 1 – Dec 31 (the Q4 giftware peak; env-overridable later if the
+business adds a spring season). x-axis = weeks before Oct 1 (nominal peak).
+"""
+import datetime as dt
+
+import core.odoo as O
+import core.periods as P
+
+SEASON_FROM = (8, 1) # deliveries from Aug 1
+SEASON_TO = (12, 31) # through Dec 31
+PEAK = (10, 1) # nominal peak for the weeks-before axis
+
+
+def _season_orders(year, team_id=None, cutoff=None):
+ """Confirmed orders with commitment_date inside `year`'s season window, booked up to
+ `cutoff` (order date). Returns [(order_date, amount)]."""
+ ex = O.excluded_partner_ids()
+ dom = [('state', 'in', ['sale', 'done']),
+ ('commitment_date', '>=', f'{year}-{SEASON_FROM[0]:02d}-{SEASON_FROM[1]:02d} 00:00:00'),
+ ('commitment_date', '<=', f'{year}-{SEASON_TO[0]:02d}-{SEASON_TO[1]:02d} 23:59:59')]
+ dom.append(('team_id', '=', team_id) if team_id is not None
+ else ('team_id', 'in', O.TEAM_IDS))
+ if cutoff:
+ dom.append(('date_order', '<=', f'{cutoff} 23:59:59'))
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ rows = O.search_read('sale.order', dom, ['date_order', 'amount_untaxed'])
+ return [(str(r.get('date_order') or '')[:10], r.get('amount_untaxed') or 0.0)
+ for r in rows if r.get('date_order')]
+
+
+def curve(team_id=None, t=None, years_back=2):
+ """Cumulative booked-$ curves, one per season year, aligned on weeks-before-peak.
+ The current year's curve stops at today; prior years run to their season end."""
+ t = t or P.today()
+ ty = t.year
+ out_rows, totals = [], {}
+ for yr in range(ty - years_back, ty + 1):
+ peak = dt.date(yr, *PEAK)
+ cutoff = t.isoformat() if yr == ty else None
+ orders = _season_orders(yr, team_id, cutoff)
+ orders.sort()
+ cum = 0.0
+ weekly = {}
+ for d, amt in orders:
+ cum += amt
+ wk = (peak - dt.date.fromisoformat(d)).days // 7
+ weekly[wk] = cum # last write per week = cumulative at week end
+ for wk, v in sorted(weekly.items(), reverse=True):
+ out_rows.append({'year': str(yr), 'weeks_before_peak': -wk, 'booked': v})
+ totals[str(yr)] = cum
+ # same-week-LY comparison for the headline
+ wk_now = (dt.date(ty, *PEAK) - t).days // 7
+ ly_same = 0.0
+ for r in out_rows:
+ if r['year'] == str(ty - 1) and r['weeks_before_peak'] <= -wk_now:
+ ly_same = max(ly_same, r['booked'])
+ return {'rows': out_rows, 'totals': totals,
+ 'ty': str(ty), 'ly': str(ty - 1),
+ 'booked_ty': totals.get(str(ty), 0.0), 'ly_same_week': ly_same,
+ 'weeks_to_peak': wk_now}
+
+
+def by_category(team_id=None, t=None):
+ """Booked $ per product category, this season TY vs LY-as-of-the-same-date.
+ (read_group cannot group by a dot-path — group by product, map to category locally.)"""
+ t = t or P.today()
+ ty = t.year
+ per_prod = {}
+ for yr, cut in ((ty, t.isoformat()),
+ (ty - 1, t.replace(year=ty - 1).isoformat())):
+ ex = O.excluded_partner_ids()
+ dom = [('order_id.state', 'in', ['sale', 'done']),
+ ('order_id.commitment_date', '>=',
+ f'{yr}-{SEASON_FROM[0]:02d}-{SEASON_FROM[1]:02d} 00:00:00'),
+ ('order_id.commitment_date', '<=',
+ f'{yr}-{SEASON_TO[0]:02d}-{SEASON_TO[1]:02d} 23:59:59'),
+ ('order_id.date_order', '<=', f'{cut} 23:59:59'),
+ ('product_id', '!=', False)]
+ dom.append(('order_id.team_id', '=', team_id) if team_id is not None
+ else ('order_id.team_id', 'in', O.TEAM_IDS))
+ if ex:
+ dom.append(('order_partner_id', 'not in', list(ex)))
+ for g in O.read_group('sale.order.line', dom, ['price_subtotal:sum'],
+ ['product_id'], lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ if not pid:
+ continue
+ e = per_prod.setdefault(pid, {'ty': 0.0, 'ly': 0.0})
+ e['ty' if yr == ty else 'ly'] += g.get('price_subtotal') or 0.0
+ cats = {}
+ pids = list(per_prod)
+ for i in range(0, len(pids), 2000):
+ for p in O.search_read('product.product',
+ [('id', 'in', pids[i:i + 2000]),
+ ('active', 'in', [True, False])], ['categ_id']):
+ cats[p['id']] = O.m2o_name(p.get('categ_id')) or '(none)'
+ out = {}
+ for pid, v in per_prod.items():
+ cat = cats.get(pid, '(none)')
+ e = out.setdefault(cat, {'category': cat, 'ty': 0.0, 'ly': 0.0})
+ e['ty'] += v['ty']
+ e['ly'] += v['ly']
+ rows = list(out.values())
+ for r in rows:
+ r['delta_pct'] = ((r['ty'] / r['ly'] - 1) * 100.0) if r['ly'] else None
+ rows.sort(key=lambda x: -x['ty'])
+ return rows
+
+
+def validate(t=None, team_id=None):
+ """The client-side cumulative end point ties one server-side aggregate over the exact
+ same domain (sum_field) — the independent arithmetic path."""
+ t = t or P.today()
+ b = curve(team_id, t)
+ ty = int(b['ty'])
+ ex = O.excluded_partner_ids()
+ dom = [('state', 'in', ['sale', 'done']),
+ ('commitment_date', '>=', f'{ty}-{SEASON_FROM[0]:02d}-{SEASON_FROM[1]:02d} 00:00:00'),
+ ('commitment_date', '<=', f'{ty}-{SEASON_TO[0]:02d}-{SEASON_TO[1]:02d} 23:59:59'),
+ ('date_order', '<=', f'{t.isoformat()} 23:59:59')]
+ dom.append(('team_id', '=', team_id) if team_id is not None
+ else ('team_id', 'in', O.TEAM_IDS))
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ srv = O.sum_field('sale.order', dom, 'amount_untaxed')
+ return [{'check': f'{ty} season booked $ — client cumulative vs server sum',
+ 'a': round(b['booked_ty'], 2), 'b': round(srv, 2),
+ 'gap': round(b['booked_ty'] - srv, 2),
+ 'ok': abs(b['booked_ty'] - srv) < 1.0}]
diff --git a/platform/modules/cohort.py b/platform/modules/cohort.py
new file mode 100644
index 0000000000000000000000000000000000000000..ac3208b1a2cbb1d66d47f88ff07fb945f2b44148
--- /dev/null
+++ b/platform/modules/cohort.py
@@ -0,0 +1,346 @@
+"""Cohort — a FIXED set of customers the user curates by hand (owner item 6, 2026-07-26).
+
+The difference from the Data module, and the only one: **a Cohort's membership is not a query.**
+
+ Data one row per customer across the whole scoped book. Which rows you see is whatever the
+ view's FILTER matches, so the set moves when the data moves.
+ Cohort a list of customer ids somebody chose. You can still filter, sort, group and add
+ columns exactly as on Data — but those only narrow what is DISPLAYED. The set itself
+ changes only when a person adds or removes a row.
+
+That distinction is the whole point: a formula list silently re-populates ("who is overdue
+today"), a cohort does not ("the 40 accounts we agreed to call in Q3"). If a cohort could drift,
+it would not be worth having — you could just save a view.
+
+Rows come from `modules.customer_data.pool()` — the SAME validated metric surface the Data module
+renders, so a customer's numbers cannot differ between the two pages. This module owns only
+MEMBERSHIP.
+
+Persistence: HF store key `customer_cohorts`, shaped {username: {cohort_id: {...}}}. Per-user
+like the saved views it sits beside, and written through `store.update` (strict
+read-modify-write — never get+put around a mutation; that is the restart-wipe bug).
+
+⭐ WAVE 19 / OWNER RULING R9 — A COHORT BELONGS TO ITS DATABASE. "It should stay in Product
+database … for ANY database new/old": until relational features land, database functionalities
+are purely independent. So this module is now SCOPE-PARAMETERIZED rather than restricted — one
+bucket per topic (`_cohorts`), reached through `scoped(scope)`.
+
+ ⛔ THE ID SPACES ARE WHY, not tidiness. A cohort stores the TOPIC's row ids: customer pids are
+ Odoo partner ids, product pids are CRC32 hashes of the SKU code, a user table's are its own
+ row numbers. One shared bucket and a hash collision silently puts a product in somebody's
+ customer list — the same argument `routes_products` makes about the overlay bucket, and the
+ reason wave 16 answered it with `with_cohorts=False` (a refusal) instead of a bucket.
+
+ ⛔ THE CUSTOMER TOPIC KEEPS THE LEGACY KEY — zero migration. `customer` and `cohort` are ONE
+ topic (the Cohort surface is the customer table over hand-curated sets), so both resolve to
+ `customer_cohorts` and every shipped list is found exactly where it already lives.
+
+ ⛔ `scoped('customer')` RETURNS THIS MODULE, deliberately, so the module-level functions stay
+ the customer implementation rather than becoming a second copy of it. Callers that patch
+ `modules.cohort.visible` (the gates do) keep working through the facade, and every existing
+ positional call site is byte-unaffected.
+
+TENANCY, STATED NOT HIDDEN (booked as DEBT, wave 19): this module writes through the MODULE-LEVEL
+`core.store`, i.e. tenant #0's dataset repo — the same place `customer_docs` and the customer /
+product table workspaces already live. It is safe rather than correct: the outer key is the
+USERNAME, and `core/users.py`'s registry is ONE global bucket, so a username belongs to exactly
+one tenant and no cross-tenant READ is reachable. What is wrong is RESIDENCY (tenant B's lists
+sit in tenant #0's repo). Fixing it means threading the runtime handle through `EventCtx`, which
+needs `routes_grid._ctx` — another session's file this wave.
+
+No validate(): there is no Odoo aggregate to reconcile a hand-picked list against. Its counts
+derive from the rows it renders (rule 8b), and the metrics themselves are already validated by
+the customers module they come from.
+"""
+import datetime as _dt
+import sys as _sys
+
+import core.store as store
+
+KEY = 'customer_cohorts'
+
+#: The scope names that mean THE CUSTOMER BOOK. `cohort` is the customer table over curated sets
+#: — the same rows, the same pids, the same lists — so it must resolve to the same bucket, and ''
+#: is what an unset `scope_key` looks like. Anything else is another database.
+LEGACY_SCOPES = frozenset({'', 'customer', 'cohort'})
+
+#: A cohort is a list of ids, not a query — but ids are cheap and a runaway list would bloat the
+#: per-user store blob, which is read on every page render. Generous enough to never bind in
+#: practice (the whole book is ~1,550) and small enough to bound the payload.
+MAX_MEMBERS = 5000
+MAX_COHORTS = 100
+
+
+def key_for(scope):
+ """The store bucket ONE topic's cohorts live in (R9).
+
+ Customer (and its `cohort` surface) keep `customer_cohorts` — the legacy key, so no shipped
+ list moves. Every other database gets `_cohorts`, which for a user table is
+ `ut__cohorts`: the same naming the table's own workspace bucket already uses
+ (`_table_workspace`), so one database's durable state reads as one family.
+ """
+ s = str(scope or 'customer').strip().lower()
+ return KEY if s in LEGACY_SCOPES else f'{s}_cohorts'
+
+
+def noun_for(scope):
+ """What ONE row of this topic is called — the "Added 12 customers to …" toast's noun.
+
+ A hardcoded "customer" was the visible half of the leak this ruling closes: adding twelve
+ SKUs to a product list said "Added 12 customers", which is the surface telling the user the
+ wrong thing about where their list went. Unknown topics say "record" rather than guessing a
+ label from a slug — a user table is called whatever its creator named it, and inventing a
+ singular from `ut_supplier_quotes` would be worse than the honest generic.
+ """
+ s = str(scope or 'customer').strip().lower()
+ if s in LEGACY_SCOPES:
+ return 'customer'
+ if s == 'product':
+ return 'product'
+ return 'record'
+
+
+def _now():
+ return _dt.datetime.now().strftime('%Y-%m-%d %H:%M')
+
+
+def _all_for(key, username):
+ """{cohort_id: {name, members, note, created, updated}} for one user, from ONE bucket.
+
+ Returns {} when the store is unavailable rather than raising: a cohort list that cannot load
+ should degrade to "no cohorts", never to a broken page.
+ """
+ try:
+ return dict((store.get(key) or {}).get(username, {}) or {})
+ except Exception:
+ return {}
+
+
+def all_for(username):
+ """{cohort_id: {...}} for one user on the CUSTOMER book — see `_all_for`."""
+ return _all_for(KEY, username)
+
+
+def _clean_members(raw, allowed_pids=None):
+ """Ints only, de-duplicated, ORDER PRESERVED, and intersected with what this user may see.
+
+ ⚠ The `allowed_pids` intersection is a PERMISSION boundary, not tidying. A cohort is stored
+ per user but the ids in it are customer ids: if an agent's scope narrows (or a cohort is ever
+ shared), replaying stored ids unchecked would render rows outside their book. Filtering on
+ READ means a scope change takes effect immediately, without rewriting anyone's stored data.
+ """
+ out, seen = [], set()
+ for v in list(raw or [])[:MAX_MEMBERS * 2]:
+ try:
+ pid = int(v)
+ except (TypeError, ValueError):
+ continue
+ if pid in seen:
+ continue
+ if allowed_pids is not None and pid not in allowed_pids:
+ continue
+ seen.add(pid)
+ out.append(pid)
+ return out[:MAX_MEMBERS]
+
+
+def _visible(key, username, allowed_pids=None):
+ """Every cohort in ONE bucket, with membership already scoped to what this user may open."""
+ return {cid: {**c, 'members': _clean_members(c.get('members'), allowed_pids)}
+ for cid, c in _all_for(key, username).items()}
+
+
+def visible(username, allowed_pids=None):
+ """Every CUSTOMER cohort, membership scoped to what this user may open."""
+ return _visible(KEY, username, allowed_pids)
+
+
+def new_id(name):
+ """A stable id from the name plus a suffix, so two cohorts called "Q3 calls" can coexist.
+
+ ⚠ Topic-FREE on purpose. The id is a handle stored inside the topic's own bucket, and a saved
+ view's `cohortLock` names it — so encoding the topic in the string would only add a second
+ place for the two to disagree. Two databases may each hold a `cohort_q3_calls_101112`; they
+ are different objects in different buckets and neither read can reach the other.
+ """
+ slug = ''.join(ch if ch.isalnum() else '_' for ch in str(name).lower()).strip('_')[:40]
+ return f"cohort_{slug or 'list'}_{_dt.datetime.now().strftime('%H%M%S')}"
+
+
+def _create(key, username, name, members=(), note=''):
+ """Create a cohort in ONE bucket and return its id. Raises ValueError on a blank name or when
+ the per-user cap is reached — refusing loudly beats silently dropping somebody's list.
+
+ The cap is PER BUCKET, i.e. per database, which is the honest reading of R9: a hundred
+ product lists must not be spent by a hundred customer lists somebody else's page created.
+ """
+ name = str(name or '').strip()[:120]
+ if not name:
+ raise ValueError('a cohort needs a name')
+ existing = _all_for(key, username)
+ if len(existing) >= MAX_COHORTS:
+ raise ValueError(f'you already have {MAX_COHORTS} cohorts — delete one first')
+ cid = new_id(name)
+ record = {'name': name, 'members': _clean_members(members), 'note': str(note or '')[:2000],
+ 'created': _now(), 'updated': _now()}
+
+ def _up(data):
+ data.setdefault(username, {})[cid] = record
+ return data
+ store.update(key, _up)
+ return cid
+
+
+def create(username, name, members=(), note=''):
+ """Create a CUSTOMER cohort and return its id — see `_create`."""
+ return _create(KEY, username, name, members=members, note=note)
+
+
+def _mutate(key, username, cohort_id, change):
+ def _up(data):
+ book = data.setdefault(username, {})
+ c = book.get(cohort_id)
+ if c is None:
+ return data # deleted concurrently — nothing to do, not an error
+ change(c)
+ c['updated'] = _now()
+ return data
+ store.update(key, _up)
+
+
+def _add_members(key, username, cohort_id, pids):
+ """Union new ids into a cohort, PRESERVING the existing order and appending the new ones.
+
+ Additive on purpose: "add to list" from a view can be clicked twice, and the second click
+ must be a no-op rather than a reorder or a duplicate.
+ """
+ def _change(c):
+ c['members'] = _clean_members(list(c.get('members') or []) + list(pids or []))
+ _mutate(key, username, cohort_id, _change)
+
+
+def add_members(username, cohort_id, pids):
+ """Union new ids into a CUSTOMER cohort — see `_add_members`."""
+ _add_members(KEY, username, cohort_id, pids)
+
+
+def _remove_members(key, username, cohort_id, pids):
+ drop = {int(p) for p in (pids or []) if str(p).lstrip('-').isdigit()}
+
+ def _change(c):
+ c['members'] = [p for p in _clean_members(c.get('members')) if p not in drop]
+ _mutate(key, username, cohort_id, _change)
+
+
+def remove_members(username, cohort_id, pids):
+ _remove_members(KEY, username, cohort_id, pids)
+
+
+def _rename(key, username, cohort_id, name):
+ name = str(name or '').strip()[:120]
+ if not name:
+ raise ValueError('a cohort needs a name')
+ _mutate(key, username, cohort_id, lambda c: c.__setitem__('name', name))
+
+
+def rename(username, cohort_id, name):
+ _rename(KEY, username, cohort_id, name)
+
+
+def _set_note(key, username, cohort_id, note):
+ _mutate(key, username, cohort_id, lambda c: c.__setitem__('note', str(note or '')[:2000]))
+
+
+def set_note(username, cohort_id, note):
+ _set_note(KEY, username, cohort_id, note)
+
+
+def _delete(key, username, cohort_id):
+ def _up(data):
+ (data.get(username) or {}).pop(cohort_id, None)
+ return data
+ store.update(key, _up)
+
+
+def delete(username, cohort_id):
+ _delete(KEY, username, cohort_id)
+
+
+def rows_for(cohort, pool_rows):
+ """The cohort's rows, in MEMBERSHIP order, from an already-built pool.
+
+ Membership order, not pool order: the user built this list, and the order they built it in is
+ information. Ids with no matching pool row are dropped silently — a customer can fall out of
+ the 24-month pool without the cohort being wrong, and showing a blank row would be worse than
+ showing fewer. `missing_count` lets the page say so honestly rather than hiding it.
+ """
+ by_pid = {r['pid']: r for r in pool_rows}
+ members = _clean_members(cohort.get('members'))
+ rows = [by_pid[p] for p in members if p in by_pid]
+ return rows, len(members) - len(rows)
+
+
+# ─────────────────────────────────────────────── R9: ONE topic's cohorts, as an object
+class CohortStore:
+ """The cohort verbs for ONE non-customer database, closed over its bucket key.
+
+ Same method names and same argument order as the module functions above, so a caller written
+ against `modules.cohort` reads identically whichever it holds — which is the point: the write
+ handler resolves the store once (`scoped(ctx.scope_key)`) and every branch below it stays the
+ code it already was.
+ """
+
+ __slots__ = ('scope', 'key', 'noun')
+
+ def __init__(self, scope):
+ self.scope = str(scope or 'customer').strip().lower()
+ self.key = key_for(self.scope)
+ self.noun = noun_for(self.scope)
+
+ def __repr__(self):
+ return f'CohortStore({self.scope!r} -> {self.key!r})'
+
+ def all_for(self, username):
+ return _all_for(self.key, username)
+
+ def visible(self, username, allowed_pids=None):
+ return _visible(self.key, username, allowed_pids)
+
+ def create(self, username, name, members=(), note=''):
+ return _create(self.key, username, name, members=members, note=note)
+
+ def add_members(self, username, cohort_id, pids):
+ _add_members(self.key, username, cohort_id, pids)
+
+ def remove_members(self, username, cohort_id, pids):
+ _remove_members(self.key, username, cohort_id, pids)
+
+ def rename(self, username, cohort_id, name):
+ _rename(self.key, username, cohort_id, name)
+
+ def set_note(self, username, cohort_id, note):
+ _set_note(self.key, username, cohort_id, note)
+
+ def delete(self, username, cohort_id):
+ _delete(self.key, username, cohort_id)
+
+
+def scoped(scope=None):
+ """The cohort store for ONE topic — THE resolution point (R9).
+
+ ⛔ Returns THIS MODULE for the customer topic, not a `CohortStore(KEY)`. Two reasons, and both
+ are about not creating a second implementation of the shipped behaviour:
+ 1. the module-level functions ARE the customer store, so the legacy path keeps executing
+ exactly the code the gates measure — no wrapper to drift from;
+ 2. tests patch `modules.cohort.visible` (verify_grid_events' folder legs do), and a facade
+ that returned a bound object would silently ignore the patch, leaving a gate green over
+ code it is no longer exercising.
+ """
+ if str(scope or 'customer').strip().lower() in LEGACY_SCOPES:
+ return _sys.modules[__name__]
+ return CohortStore(scope)
+
+
+#: What ONE row of the customer topic is called — the module facade's answer to `CohortStore.noun`,
+#: so `scoped(x).noun` reads the same whichever object `x` resolved to.
+noun = 'customer'
diff --git a/platform/modules/collections_exec.py b/platform/modules/collections_exec.py
new file mode 100644
index 0000000000000000000000000000000000000000..6f962e487e51947e23e0901ccfbc162984629d8a
--- /dev/null
+++ b/platform/modules/collections_exec.py
@@ -0,0 +1,376 @@
+"""Collections executive module — the LIVE Biweekly Executive Collection Report.
+
+Replicates the Excel "Royal Imports - Collection Report - Biweekly Executive" (Summary tab time-series
++ Overdue (FFS)/(RI) lists) but computed live from Odoo (read-only).
+
+AR as-of any date D = the receivable-account LEDGER balance: Σ balance of posted receivable move lines
+dated <= D (customer payments post a credit to the receivable account on the payment date, so the
+running account balance IS the AR). Validated to ~1% of the hardcoded report; today's value ties to
+Σ amount_residual exactly. BU split is by the CUSTOMER (res.partner.team_id 5=Fisch/FFS, 6=Royal/RI),
+NOT the invoice team (most invoices carry a generic team). Current aging uses exact per-invoice
+amount_residual; historical aging is a FIFO approximation conserved toward the netting total (the
+report's exact buckets come from Odoo's specific reconciliation, which the API cannot reconstruct —
+account.partial.reconcile.max_date errors server-side). READ-ONLY.
+"""
+import sys
+import datetime as dt
+from collections import defaultdict
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+
+FFS, RI = 5, 6
+BU_OF = {FFS: 'FFS', RI: 'RI'}
+AGE = ['At Date', '01-30', '31-60', '61-90', '91-120', '>120']
+# Overdue-list aging (the report folds not-due + 0-30 days into "At Date"; overdue starts at 31 days).
+AGE_LIST = ['At Date', '31-60', '61-90', '91-120', '>120']
+
+# Cash doesn't settle same-day, so the report's "as of" / ending period lags real-time by this many
+# days: the last few days of receipts haven't cleared in the bank yet and would understate collections
+# and overstate receivables. The ending period is therefore today - SETTLE_OFFSET_DAYS (real-time).
+SETTLE_OFFSET_DAYS = 7
+
+# Targets from the report (col U). (goal_value, 'lower'|'higher' is-better)
+GOALS = {
+ 'recv_FFS': (427708.0, 'lower'), 'recv_RI': (150789.0, 'lower'),
+ 'dso': (30.0, 'lower'), 'dso_FFS': (30.0, 'lower'), 'dso_RI': (30.0, 'lower'),
+ 'odpct_FFS': (10.0, 'lower'), 'odpct_RI': (10.0, 'lower'), 'odpct_total': (10.0, 'lower'),
+}
+
+
+def _d(s):
+ try:
+ return dt.date.fromisoformat(str(s)[:10])
+ except Exception:
+ return None
+
+
+def _as_of(t=None):
+ """The report's as-of / ending-period date: real-time minus the settlement lag (default), or an
+ explicit override if a caller passes one. Using plain 'today' would understate the most recent
+ receipts (cash takes ~SETTLE_OFFSET_DAYS to clear), so the ending period is offset back by it."""
+ return t or (P.today() - dt.timedelta(days=SETTLE_OFFSET_DAYS))
+
+
+def _bucket(days):
+ if days <= 0:
+ return 'At Date'
+ if days <= 30:
+ return '01-30'
+ if days <= 60:
+ return '31-60'
+ if days <= 90:
+ return '61-90'
+ if days <= 120:
+ return '91-120'
+ return '>120'
+
+
+def _lbucket(days):
+ """Overdue-list bucket — not-due or within 30 days is 'At Date'; overdue starts at 31."""
+ if days <= 30:
+ return 'At Date'
+ if days <= 60:
+ return '31-60'
+ if days <= 90:
+ return '61-90'
+ if days <= 120:
+ return '91-120'
+ return '>120'
+
+
+def periods(t=None, n=14, step=14):
+ """n biweekly periods ending at t (latest last). Each {label, end(date), beg(date), year, month}."""
+ t = _as_of(t)
+ out = []
+ for i in range(n):
+ end = t - dt.timedelta(days=step * i)
+ out.append({'label': end.strftime('%m/%d'), 'end': end, 'beg': end - dt.timedelta(days=step - 1),
+ 'year': end.year, 'month': end.month})
+ return list(reversed(out))
+
+
+def pull(t=None):
+ """The heavy one-time read: receivable ledger (invoice lines + reduction lines) + partner master.
+ Records are normalized to plain dicts with parsed date strings + the customer's BU."""
+ rec = [('account_id.account_type', '=', 'asset_receivable'), ('parent_state', '=', 'posted')]
+ inv = O.search_read('account.move.line',
+ rec + [('move_id.move_type', 'in', ['out_invoice', 'out_refund'])],
+ ['date', 'date_maturity', 'balance', 'amount_residual', 'partner_id'], limit=300000)
+ red = O.search_read('account.move.line',
+ rec + [('move_id.move_type', 'not in', ['out_invoice', 'out_refund'])],
+ ['date', 'balance', 'partner_id'], limit=300000)
+ ex = set(O.excluded_partner_ids())
+ pids = sorted({O.m2o_id(r['partner_id']) for r in inv + red
+ if r.get('partner_id') and O.m2o_id(r['partner_id']) not in ex})
+ parts = {p['id']: p for p in O.search_read('res.partner', [('id', 'in', pids)],
+ ['name', 'team_id', 'user_id', 'property_payment_term_id'])}
+
+ def bu(pid):
+ return BU_OF.get(O.m2o_id(parts.get(pid, {}).get('team_id')))
+ I, R = [], []
+ for r in inv:
+ pid = O.m2o_id(r['partner_id'])
+ if pid in ex or pid not in parts:
+ continue
+ I.append({'pid': pid, 'bu': bu(pid), 'date': str(r.get('date') or '')[:10],
+ 'due': str(r.get('date_maturity') or r.get('date') or '')[:10],
+ 'bal': r.get('balance') or 0.0, 'resid': r.get('amount_residual') or 0.0})
+ for r in red:
+ pid = O.m2o_id(r['partner_id'])
+ if pid in ex or pid not in parts:
+ continue
+ R.append({'pid': pid, 'bu': bu(pid), 'date': str(r.get('date') or '')[:10],
+ 'bal': r.get('balance') or 0.0})
+ return {'inv': I, 'red': R, 'parts': parts,
+ 'pulled_at': dt.datetime.now().strftime('%Y-%m-%d %H:%M')}
+
+
+# ---------------------------------------------------------------- as-of-date primitives
+def _recv_by_partner(data, D):
+ """AR netting as-of D, per partner = Σ(invoice + reduction balances dated <= D)."""
+ bal = defaultdict(float)
+ for r in data['inv']:
+ if r['date'] <= D:
+ bal[r['pid']] += r['bal']
+ for r in data['red']:
+ if r['date'] <= D:
+ bal[r['pid']] += r['bal']
+ return bal
+
+
+def _agg_bu(by_partner, data):
+ out = {'FFS': 0.0, 'RI': 0.0, 'total': 0.0}
+ for pid, v in by_partner.items():
+ bu = BU_OF.get(O.m2o_id(data['parts'].get(pid, {}).get('team_id')))
+ if bu:
+ out[bu] += v
+ out['total'] += v
+ return out
+
+
+def _aging(data, D, recv=None, exact=False):
+ """Aging buckets ($) by BU as-of D, + overdue total by BU. exact=True uses live per-invoice
+ amount_residual (current period); else FIFO (payments applied oldest-due-first). When `recv`
+ (netting by BU) is given, the buckets are conserved to it — the difference (unapplied payments /
+ credits sitting in the receivable account, not tied to an invoice) lands in 'At Date'."""
+ Dd = _d(D)
+ inv_by = defaultdict(list)
+ red_by = defaultdict(float)
+ for r in data['inv']:
+ if r['date'] <= D:
+ inv_by[r['pid']].append(r)
+ if not exact:
+ for r in data['red']:
+ if r['date'] <= D:
+ red_by[r['pid']] += r['bal']
+ out = {'FFS': {b: 0.0 for b in AGE}, 'RI': {b: 0.0 for b in AGE}}
+ overdue = {'FFS': 0.0, 'RI': 0.0}
+ for pid, invs in inv_by.items():
+ bu = invs[0]['bu']
+ if bu not in out:
+ continue
+ if exact:
+ for r in invs:
+ amt = r['resid']
+ if abs(amt) < 1e-6:
+ continue
+ days = (Dd - (_d(r['due']) or Dd)).days
+ out[bu][_bucket(days)] += amt
+ if days > 30 and amt > 0:
+ overdue[bu] += amt
+ else:
+ pay = -red_by.get(pid, 0.0)
+ pos = []
+ for r in invs:
+ if r['bal'] >= 0:
+ pos.append([r['due'], r['bal']])
+ else:
+ pay += -r['bal'] # credit notes act like reductions
+ pos.sort(key=lambda x: x[0]) # oldest due first
+ for it in pos:
+ if pay <= 0:
+ break
+ take = min(pay, it[1])
+ it[1] -= take
+ pay -= take
+ for due, amt in pos:
+ if amt < 1e-6:
+ continue
+ days = (Dd - (_d(due) or Dd)).days
+ out[bu][_bucket(days)] += amt
+ if days > 30 and amt > 0:
+ overdue[bu] += amt
+ if recv is not None:
+ for bu in ('FFS', 'RI'):
+ out[bu]['At Date'] += recv.get(bu, 0.0) - sum(out[bu].values())
+ return out, overdue
+
+
+def _ltm_invoiced(data, D):
+ """Net invoiced (out_invoice − out_refund) in the trailing 365 days ending D, by BU — for DSO."""
+ lo = (_d(D) - dt.timedelta(days=365)).isoformat()
+ out = {'FFS': 0.0, 'RI': 0.0, 'total': 0.0}
+ for r in data['inv']:
+ if lo < r['date'] <= D:
+ if r['bu']:
+ out[r['bu']] += r['bal']
+ out['total'] += r['bal']
+ return out
+
+
+def _flows(data, beg, end):
+ """New sales (net invoiced) + new collection (payments) in [beg, end], by BU."""
+ b, e = beg.isoformat(), end.isoformat()
+ sales = {'FFS': 0.0, 'RI': 0.0, 'total': 0.0}
+ coll = {'FFS': 0.0, 'RI': 0.0, 'total': 0.0}
+ for r in data['inv']:
+ if b <= r['date'] <= e and r['bu']:
+ sales[r['bu']] += r['bal']
+ sales['total'] += r['bal']
+ for r in data['red']:
+ if b <= r['date'] <= e and r['bu']:
+ coll[r['bu']] += -r['bal']
+ coll['total'] += -r['bal']
+ return sales, coll
+
+
+def _last_payment(data):
+ lp = {}
+ for r in data['red']:
+ if r['bal'] < 0 and r['date']:
+ if r['pid'] not in lp or r['date'] > lp[r['pid']]:
+ lp[r['pid']] = r['date']
+ return lp
+
+
+def _idle(data, D, lp, recv_pp):
+ Dd = _d(D)
+ out = {'FFS': {'IDLE3': 0, 'IDLE6': 0, 'IDLE12': 0, 'total': 0},
+ 'RI': {'IDLE3': 0, 'IDLE6': 0, 'IDLE12': 0, 'total': 0}}
+ for pid, bal in recv_pp.items():
+ if bal <= 1:
+ continue
+ bu = BU_OF.get(O.m2o_id(data['parts'].get(pid, {}).get('team_id')))
+ if bu not in out:
+ continue
+ last = lp.get(pid)
+ months = ((Dd - _d(last)).days / 30.0) if last else 999
+ tier = 'IDLE12' if months > 12 else 'IDLE6' if months > 6 else 'IDLE3' if months > 3 else None
+ if tier:
+ out[bu][tier] += 1
+ out[bu]['total'] += 1
+ return out
+
+
+def _is_cod(term_name):
+ return any(k in (term_name or '').lower() for k in ('immediate', 'cod', 'cash'))
+
+
+def _credit_terms(data, recv_pp):
+ out = {'FFS': {'COD': 0, 'TOP': 0, 'total': 0}, 'RI': {'COD': 0, 'TOP': 0, 'total': 0}}
+ for pid, bal in recv_pp.items():
+ if bal <= 1:
+ continue
+ p = data['parts'].get(pid, {})
+ bu = BU_OF.get(O.m2o_id(p.get('team_id')))
+ if bu not in out:
+ continue
+ out[bu]['COD' if _is_cod(O.m2o_name(p.get('property_payment_term_id'))) else 'TOP'] += 1
+ out[bu]['total'] += 1
+ return out
+
+
+# ---------------------------------------------------------------- assembly
+def summary(data, t=None):
+ """The biweekly time-series — a list of per-period metric dicts (latest last)."""
+ t = _as_of(t)
+ lp = _last_payment(data)
+ pers = periods(t)
+ rows = []
+ for i, pr in enumerate(pers):
+ D = pr['end'].isoformat()
+ recv_pp = _recv_by_partner(data, D)
+ recv = _agg_bu(recv_pp, data)
+ aging, overdue = _aging(data, D, recv, exact=(i == len(pers) - 1))
+ ltm = _ltm_invoiced(data, D)
+ sales, coll = _flows(data, pr['beg'], pr['end'])
+ dso = {bu: (recv[bu] / (ltm[bu] / 365.0)) if ltm.get(bu) else None for bu in ('FFS', 'RI', 'total')}
+ rows.append({'period': pr, 'recv': recv, 'overdue': overdue, 'aging': aging, 'ltm': ltm,
+ 'dso': dso, 'sales': sales, 'coll': coll,
+ 'idle': _idle(data, D, lp, recv_pp), 'terms': _credit_terms(data, recv_pp)})
+ for i, r in enumerate(rows): # change in receivable vs prior period end
+ prev = rows[i - 1]['recv'] if i else None
+ r['change'] = {bu: (r['recv'][bu] - prev[bu]) if prev else None for bu in ('FFS', 'RI', 'total')}
+ return rows
+
+
+def overdue_list(data, team, t=None):
+ """Current (as-of t) ranked overdue customers for a BU (5=FFS / 6=RI), exact per-invoice."""
+ t = _as_of(t)
+ Dd = t
+ bu = BU_OF.get(team)
+ lp = _last_payment(data)
+ by = {}
+ for r in data['inv']:
+ if r['bu'] != bu:
+ continue
+ amt = r['resid']
+ if abs(amt) < 1e-6:
+ continue
+ e = by.setdefault(r['pid'], dict({'pid': r['pid'], 'total': 0.0, 'overdue': 0.0}, **{b: 0.0 for b in AGE_LIST}))
+ e['total'] += amt
+ days = (Dd - (_d(r['due']) or Dd)).days
+ e[_lbucket(days)] += amt
+ if days > 30 and amt > 0:
+ e['overdue'] += amt
+ tot_od = sum(e['overdue'] for e in by.values() if e['overdue'] > 0) or 1.0
+ rows = []
+ for pid, e in by.items():
+ if e['overdue'] <= 0:
+ continue
+ p = data['parts'].get(pid, {})
+ last = lp.get(pid)
+ months = ((Dd - _d(last)).days / 30.0) if last else 999
+ idle = 'IDLE12' if months > 12 else 'IDLE6' if months > 6 else 'IDLE3' if months > 3 else 'Active'
+ term = O.m2o_name(p.get('property_payment_term_id'))
+ rows.append(dict({'customer': p.get('name') or '(unknown)', 'odoo_id': pid,
+ 'sales_rep': O.m2o_name(p.get('user_id')) or '',
+ 'top': 'COD' if _is_cod(term) else (term or 'TOP'),
+ 'overdue': e['overdue'], 'overdue_pct': e['overdue'] / tot_od * 100,
+ 'idle': idle, 'total_recv': e['total']}, **{b: e[b] for b in AGE_LIST}))
+ rows.sort(key=lambda x: -x['overdue'])
+ for i, r in enumerate(rows, 1):
+ r['no'] = i
+ return rows
+
+
+def goal_status(key, value):
+ """('goal', 'Achieved'|'Unmet') for a metric vs the report's hardcoded target, or (None, None)."""
+ g = GOALS.get(key)
+ if not g or value is None:
+ return None, None
+ target, better = g
+ ok = (value <= target) if better == 'lower' else (value >= target)
+ return target, ('Achieved' if ok else 'Unmet')
+
+
+def validate(data, t=None):
+ """Aging buckets (conserved) tie to BU receivable; the Overdue list total ties to the summary's
+ current overdue (the two independent code paths agree)."""
+ t = _as_of(t)
+ D = t.isoformat()
+ recv = _agg_bu(_recv_by_partner(data, D), data)
+ aging, overdue = _aging(data, D, recv, exact=True)
+ ag_total = sum(aging['FFS'].values()) + sum(aging['RI'].values())
+ checks = [{'check': 'Aging buckets (FFS+RI) == receivable (FFS+RI)',
+ 'a': round(ag_total, 2), 'b': round(recv['FFS'] + recv['RI'], 2),
+ 'gap': round(ag_total - (recv['FFS'] + recv['RI']), 2),
+ 'ok': abs(ag_total - (recv['FFS'] + recv['RI'])) <= 1.0}]
+ od_list = sum(r['overdue'] for r in overdue_list(data, FFS, t)) + sum(r['overdue'] for r in overdue_list(data, RI, t))
+ od_sum = overdue['FFS'] + overdue['RI']
+ checks.append({'check': 'Overdue list total == summary current overdue',
+ 'a': round(od_list, 2), 'b': round(od_sum, 2), 'gap': round(od_list - od_sum, 2),
+ 'ok': abs(od_list - od_sum) <= 1.0})
+ return checks
diff --git a/platform/modules/collections_send.py b/platform/modules/collections_send.py
new file mode 100644
index 0000000000000000000000000000000000000000..90f9c3eb963038450485bceedb713cb05c8b573e
--- /dev/null
+++ b/platform/modules/collections_send.py
@@ -0,0 +1,263 @@
+"""Collections statements — the send layer behind the Collections page's Statements section.
+
+Folded in from the standalone collections_app (2026-07-05). THE one sanctioned exception to the
+app's read-only-on-Odoo rule, unchanged from the standalone tool: WRITE is whitelisted to exactly
+one operation —
+
+ create on mail.mail (queueing an outbound statement email)
+
+A mail.mail record with state='outgoing' is picked up by Odoo's "Mail: Email Queue Manager" cron
+(every ~15 min) and delivered through the company's Office 365 relay. Because we set model/res_id,
+each sent statement also appears in the customer's chatter in Odoo — the audit log lives where AR
+already works. This module has its OWN narrow XML-RPC client; the app-wide odoo_client stays
+hard-blocking on all writes. The UI gates the section to admin users; SAFE_MODE is enforced HERE
+in the data layer so the UI cannot bypass it.
+
+Env (Space secrets / .env): ODOO_URL, ODOO_DB, ODOO_USER, ODOO_API_KEY
+Optional: SAFE_MODE (default ON), SAFE_RECIPIENTS, SENDER_NAME, SENDER_EMAIL, REPLY_TO,
+COMPANY_NAME, ROYAL_MAIL_SERVER_ID, ROYAL_AUTHOR_ID
+"""
+import os
+import datetime as dt
+import xmlrpc.client
+from pathlib import Path
+
+try: # self-contained: load credentials from the app root .env if present (HF uses Secrets)
+ from dotenv import load_dotenv
+ load_dotenv(Path(__file__).resolve().parents[1] / '.env')
+except Exception:
+ pass
+
+WRITE_WHITELIST = {('mail.mail', 'create')}
+
+EXCLUDE_NAMES = {'GIFTWARE DEALS'} # the Amazon channel — not part of Fisch or Royal collections
+DOMAIN = [('followup_reminder_type', '=', 'automatic'), ('credit', '>', 1)]
+
+COMPANY = os.environ.get('COMPANY_NAME', 'Royal Imports')
+
+# --- Sender identity (statements go out AS Royal Imports) ---
+# Odoo routes outbound mail to the matching ir.mail_server by from_filter, and the Office 365
+# relay only accepts sends as its authenticated address. The "Office 365 - Royal" server (id 2)
+# authenticates as contact@royalimports.com with from_filter='contact@royalimports.com' — so the
+# From MUST be that address for delivery to succeed. Friendly display name; replies routed to AR.
+SENDER_NAME = os.environ.get('SENDER_NAME', 'Royal Imports Accounts Receivable')
+SENDER_EMAIL = os.environ.get('SENDER_EMAIL', 'contact@royalimports.com')
+REPLY_TO = os.environ.get('REPLY_TO', 'accounting@royalimports.com')
+ROYAL_MAIL_SERVER_ID = int(os.environ.get('ROYAL_MAIL_SERVER_ID', '2'))
+ROYAL_AUTHOR_ID = int(os.environ.get('ROYAL_AUTHOR_ID', '8978')) # "Royal Imports" partner
+
+SENDER_DISPLAY = f'"{SENDER_NAME}" <{SENDER_EMAIL}>'
+
+
+class WriteBlocked(RuntimeError):
+ pass
+
+
+class SafeModeBlocked(RuntimeError):
+ pass
+
+
+# --- Testing guardrail -------------------------------------------------------
+# While SAFE_MODE is on, NO email can be queued to any address outside the allow-list — enforced
+# here in the data layer so the UI cannot bypass it. Default: ON. To go live for real customers,
+# set the Space secret SAFE_MODE=0.
+SAFE_MODE = os.environ.get('SAFE_MODE', '1').strip().lower() not in ('0', 'false', 'no', '')
+SAFE_RECIPIENTS = {a.strip().lower() for a in
+ os.environ.get('SAFE_RECIPIENTS', 'farhan@teamroyalimports.com').split(',')
+ if a.strip()}
+
+
+def safe_recipient_ok(addr):
+ return (not SAFE_MODE) or (str(addr or '').strip().lower() in SAFE_RECIPIENTS)
+
+
+class Odoo:
+ """Narrow client: read anything, write ONLY the whitelisted mail.mail create."""
+
+ def __init__(self):
+ self.url = os.environ.get('ODOO_URL', '').rstrip('/')
+ self.db = os.environ.get('ODOO_DB', '')
+ self.user = os.environ.get('ODOO_USER', '')
+ self.key = os.environ.get('ODOO_API_KEY', '')
+ missing = [k for k, v in [('ODOO_URL', self.url), ('ODOO_DB', self.db),
+ ('ODOO_USER', self.user), ('ODOO_API_KEY', self.key)] if not v]
+ if missing:
+ raise RuntimeError(f"Missing secrets: {', '.join(missing)}")
+ common = xmlrpc.client.ServerProxy(f'{self.url}/xmlrpc/2/common')
+ self.uid = common.authenticate(self.db, self.user, self.key, {})
+ if not self.uid:
+ raise RuntimeError('Odoo authentication failed')
+ self.models = xmlrpc.client.ServerProxy(f'{self.url}/xmlrpc/2/object')
+
+ def _exec(self, model, method, args, kwargs=None):
+ mutating = method in ('write', 'create', 'unlink', 'copy') or \
+ any(method.startswith(p) for p in ('action_', 'button_', 'do_', 'send_',
+ 'set_', 'update_', 'process_'))
+ if mutating and (model, method) not in WRITE_WHITELIST:
+ raise WriteBlocked(f'{method} on {model} is not allowed from this app')
+ return self.models.execute_kw(self.db, self.uid, self.key,
+ model, method, args, kwargs or {})
+
+ def search_read(self, model, domain=None, fields=None, limit=None, order=None):
+ kw = {'fields': fields or []}
+ if limit is not None:
+ kw['limit'] = limit
+ if order:
+ kw['order'] = order
+ return self._exec(model, 'search_read', [domain or []], kw)
+
+ def queue_mail(self, payload):
+ """The single allowed write: queue an outbound email."""
+ return self._exec('mail.mail', 'create', [payload])
+
+
+# --------------------------------------------------------------- data builders
+def load_collection_list(odoo):
+ """The saved follow-up filter (Reminders=Automatic, Receivable>$1), GIFTWARE excluded,
+ with priority tiers."""
+ partners = odoo.search_read('res.partner', DOMAIN,
+ ['name', 'credit', 'total_overdue', 'followup_status',
+ 'followup_next_action_date', 'followup_responsible_id',
+ 'email', 'phone', 'mobile'])
+ partners = [p for p in partners if (p['name'] or '').strip().upper() not in EXCLUDE_NAMES]
+ pids = [p['id'] for p in partners]
+
+ docs = odoo.search_read('account.move',
+ [('move_type', 'in', ['out_invoice', 'out_refund']), ('state', '=', 'posted'),
+ ('payment_state', 'in', ['not_paid', 'partial']), ('partner_id', 'in', pids)],
+ ['name', 'partner_id', 'move_type', 'invoice_date', 'invoice_date_due',
+ 'amount_total', 'amount_residual_signed'])
+
+ today = dt.date.today()
+ by_partner = {}
+ for d in docs:
+ pid = d['partner_id'][0]
+ due = d.get('invoice_date_due')
+ try:
+ days = (today - dt.date.fromisoformat(due)).days if due else 0
+ except Exception:
+ days = 0
+ d['days_overdue'] = max(days, 0)
+ d['open_signed'] = d['amount_residual_signed']
+ by_partner.setdefault(pid, []).append(d)
+
+ rows = []
+ for p in partners:
+ pid = p['id']
+ odoo_overdue = float(p.get('total_overdue') or 0)
+ docs_p = sorted(by_partner.get(pid, []), key=lambda x: x.get('invoice_date_due') or '')
+ inv_overdue = sum(d['open_signed'] for d in docs_p if d['days_overdue'] > 0)
+ oldest = max((d['days_overdue'] for d in docs_p), default=0)
+ gap = inv_overdue - odoo_overdue
+ reconcile = abs(gap) > 50
+
+ if odoo_overdue >= 5000 or (odoo_overdue > 0 and oldest > 90):
+ tier = 'A-Urgent'
+ elif odoo_overdue >= 1000 or (odoo_overdue > 0 and oldest > 30):
+ tier = 'B-Active'
+ elif odoo_overdue > 0:
+ tier = 'C-Light'
+ else:
+ tier = 'Monitor'
+
+ rows.append({
+ 'partner_id': pid,
+ 'Customer': p['name'],
+ 'Tier': tier,
+ 'Overdue': odoo_overdue,
+ 'Receivable': float(p.get('credit') or 0),
+ 'Oldest (days)': oldest,
+ 'Open Docs': len(docs_p),
+ 'Email': p.get('email') or '',
+ 'Phone': p.get('phone') or p.get('mobile') or '',
+ 'Status': (p.get('followup_status') or '').replace('_', ' '),
+ 'Reconcile?': 'YES' if reconcile else '',
+ '_docs': docs_p,
+ })
+ tier_rank = {'A-Urgent': 0, 'B-Active': 1, 'C-Light': 2, 'Monitor': 3}
+ rows.sort(key=lambda r: (tier_rank[r['Tier']], -r['Overdue']))
+ return rows
+
+
+# --------------------------------------------------------------- statement email
+DEFAULT_SUBJECT = 'Statement of Account — {company} — {month}'
+DEFAULT_INTRO = (
+ 'Dear {customer},
'
+ 'Please find below your current statement of account with {company}. '
+ 'According to our records, the following invoices remain open:'
+)
+DEFAULT_FOOTER = (
+ 'If you have already sent payment, please disregard this notice — and thank you. '
+ 'For any questions about an invoice, simply reply to this email.
'
+ 'Thank you for your business, {company} — Accounts Receivable'
+)
+
+
+def render_statement_html(row, intro_tpl=DEFAULT_INTRO, footer_tpl=DEFAULT_FOOTER):
+ month = dt.date.today().strftime('%B %Y')
+ intro = intro_tpl.format(customer=row['Customer'], company=COMPANY, month=month)
+ footer = footer_tpl.format(customer=row['Customer'], company=COMPANY, month=month)
+
+ lines = []
+ total_open = 0.0
+ for d in row['_docs']:
+ kind = 'Credit Note' if d['move_type'] == 'out_refund' else 'Invoice'
+ amt = d['open_signed']
+ total_open += amt
+ overdue_txt = f"{d['days_overdue']}d overdue" if d['days_overdue'] > 0 else 'current'
+ color = '#C0392B' if d['days_overdue'] > 0 else '#1F4E78'
+ lines.append(
+ f"
{d['name']} ({kind})
"
+ f"
{d.get('invoice_date') or ''}
"
+ f"
{d.get('invoice_date_due') or ''}
"
+ f"
{overdue_txt}
"
+ f"
${amt:,.2f}
")
+
+ table = (
+ "
"
+ "
"
+ "
Document
"
+ "
Date
"
+ "
Due
"
+ "
Status
"
+ "
Open Balance
"
+ + ''.join(lines) +
+ f"
Total open
"
+ f"
${total_open:,.2f}
"
+ f"
Of which overdue
"
+ f"
${row['Overdue']:,.2f}
"
+ "
")
+
+ return (f"
"
+ f"{intro}{table}{footer}
")
+
+
+def queue_statement(odoo, row, subject_tpl=DEFAULT_SUBJECT,
+ intro_tpl=DEFAULT_INTRO, footer_tpl=DEFAULT_FOOTER,
+ override_to=None):
+ """Queue one statement email in Odoo. Returns mail.mail id.
+ override_to: send to a different address (used by the test-send button)."""
+ to = override_to or row['Email']
+ if not to:
+ raise ValueError(f"{row['Customer']} has no email address")
+ # Hard guardrail — refuse any recipient outside the allow-list while SAFE_MODE is on.
+ if not safe_recipient_ok(to):
+ raise SafeModeBlocked(
+ f"Guardrail ON: refusing to email {to}. Only {', '.join(sorted(SAFE_RECIPIENTS))} "
+ f"is allowed right now. (Set SAFE_MODE=0 to send to real customers.)")
+ month = dt.date.today().strftime('%B %Y')
+ subject = subject_tpl.format(customer=row['Customer'], company=COMPANY, month=month)
+ payload = {
+ 'subject': subject,
+ 'body_html': render_statement_html(row, intro_tpl, footer_tpl),
+ 'email_to': to,
+ 'email_from': SENDER_DISPLAY, # From: Royal Imports
+ 'reply_to': REPLY_TO, # replies -> AR
+ 'mail_server_id': ROYAL_MAIL_SERVER_ID, # force Royal O365 relay
+ 'author_id': ROYAL_AUTHOR_ID, # clean attribution in chatter
+ 'state': 'outgoing',
+ 'auto_delete': False,
+ 'model': 'res.partner',
+ 'res_id': row['partner_id'],
+ }
+ return odoo.queue_mail(payload)
diff --git a/platform/modules/complexity.py b/platform/modules/complexity.py
new file mode 100644
index 0000000000000000000000000000000000000000..92dd89ae87ad67e79cf9c88505fb8f1c07dbd908
--- /dev/null
+++ b/platform/modules/complexity.py
@@ -0,0 +1,270 @@
+"""SKU Complexity — the BCG tail-rationalization view (cost-waste brief rec 2).
+
+The canon point: revenue-proportional allocation OVERSTATES tail-SKU profitability — a $4 SKU
+that generates 200 order lines, 40 picks and 3 returns costs the same to HANDLE as a $400 one.
+This module re-costs every SKU by its ACTIVITY over the LTM, all-channel (the Amazon
+channel-scope rule: a wholesale-only view would false-flag Amazon sellers).
+
+Two-tier verdict — the kill test must not rest on an estimate:
+ KILL CANDIDATE gm − carrying < 0 (loses money on HARD costs alone: GM minus 25%/yr
+ of its current inventory book value)
+ REVIEW hard-positive but gm − carrying − activity_cost < 0
+ (underwater once the POOLED activity rate applies —
+ an estimate, labeled as such)
+ KEEP covers both.
+Pooled activity rate = LTM opex (expense-type bill lines, from modules/spend.spend_cube) ÷ total
+activity units (SO lines + PO lines + picks + invoice lines + return lines) — self-consistent
+with the GL, an AVERAGE (includes fixed rent/insurance), therefore an upper bound; the math is
+shown in the page's verify expander. Guardrails the owner should apply before killing: basket
+role (does it pull baskets?) and the count-trust set — both live in other modules; the export
+carries the columns to join.
+"""
+import core.odoo as O
+import core.periods as P
+import modules.spend as spend_mod
+import modules.customers as cust_mod
+
+CARRY_RATE = 0.25 # $/yr carrying per $ of inventory book value (APQC 20-30% norm)
+
+
+def _chunk(ids, n=2000):
+ ids = list(ids)
+ for i in range(0, len(ids), n):
+ yield ids[i:i + n]
+
+
+def _count_by_product(model, domain):
+ out = {}
+ for g in O.read_group(model, domain, ['id'], ['product_id'], lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ if pid:
+ out[pid] = g.get('__count') or 0
+ return out
+
+
+def build(t=None):
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ ex = O.excluded_partner_ids()
+
+ # sales: lines, qty, revenue, margin — ALL channels (no team filter), house accounts
+ # excluded, PHYSICAL products only (service/delivery pseudo-products are not SKUs and
+ # must not appear on a kill-list)
+ phys = ('product_id.type', '=', 'product')
+ sol_dom = [('state', 'in', ['sale', 'done']), ('product_id', '!=', False), phys,
+ ('order_id.date_order', '>=', f'{lf} 00:00:00'),
+ ('order_id.date_order', '<=', f'{lt} 23:59:59')]
+ if ex:
+ sol_dom.append(('order_partner_id', 'not in', list(ex)))
+ sales = {}
+ for g in O.read_group('sale.order.line', sol_dom,
+ ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'],
+ ['product_id'], lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ if pid:
+ sales[pid] = {'so_lines': g.get('__count') or 0,
+ 'rev': g.get('price_subtotal') or 0.0,
+ 'qty': g.get('product_uom_qty') or 0.0,
+ 'gm': g.get('margin') or 0.0}
+
+ po_lines = _count_by_product('purchase.order.line',
+ [('state', 'in', ['purchase', 'done']),
+ ('product_id', '!=', False), phys,
+ ('order_id.date_order', '>=', f'{lf} 00:00:00'),
+ ('order_id.date_order', '<=', f'{lt} 23:59:59')])
+ picks = _count_by_product('stock.move',
+ [('state', '=', 'done'), ('product_id', '!=', False), phys,
+ ('date', '>=', f'{lf} 00:00:00'),
+ ('date', '<=', f'{lt} 23:59:59'),
+ ('picking_id.picking_type_id.code', '=', 'outgoing')])
+ inv_lines = _count_by_product('account.move.line',
+ [('move_id.move_type', '=', 'out_invoice'),
+ ('parent_state', '=', 'posted'),
+ ('product_id', '!=', False), phys,
+ ('move_id.invoice_date', '>=', lf),
+ ('move_id.invoice_date', '<=', lt)])
+ ret_lines = _count_by_product('account.move.line',
+ [('move_id.move_type', '=', 'out_refund'),
+ ('parent_state', '=', 'posted'),
+ ('product_id', '!=', False), phys,
+ ('move_id.invoice_date', '>=', lf),
+ ('move_id.invoice_date', '<=', lt)])
+
+ # current inventory book value per product (valuation layers sum = current book)
+ book = {}
+ for g in O.read_group('stock.valuation.layer', [], ['value:sum'], ['product_id'],
+ lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ if pid:
+ book[pid] = g.get('value') or 0.0
+
+ # the pooled activity rate — opex (expense-type) ÷ total activity units, GL-consistent
+ cube = spend_mod.spend_cube(t)
+ opex_pool = cube['spend_total']
+ pids = set(sales) | set(po_lines) | set(picks) | set(inv_lines) | set(ret_lines) | \
+ {p for p, v in book.items() if abs(v) > 1}
+ total_units = sum(sales.get(p, {}).get('so_lines', 0) + po_lines.get(p, 0)
+ + picks.get(p, 0) + inv_lines.get(p, 0) + ret_lines.get(p, 0)
+ for p in pids)
+ rate = (opex_pool / total_units) if total_units else 0.0
+
+ meta = {}
+ for ch in _chunk(list(pids)):
+ for p in O.search_read('product.product',
+ [('id', 'in', ch), ('active', 'in', [True, False])],
+ ['default_code', 'name', 'categ_id']):
+ meta[p['id']] = p
+
+ rows = []
+ for pid in pids:
+ s = sales.get(pid, {'so_lines': 0, 'rev': 0.0, 'qty': 0.0, 'gm': 0.0})
+ units = (s['so_lines'] + po_lines.get(pid, 0) + picks.get(pid, 0)
+ + inv_lines.get(pid, 0) + ret_lines.get(pid, 0))
+ bv = max(book.get(pid, 0.0), 0.0)
+ carrying = bv * CARRY_RATE
+ activity = units * rate
+ adj_hard = s['gm'] - carrying
+ adj_full = adj_hard - activity
+ if adj_hard < 0 and (bv > 0 or s['rev'] > 0):
+ verdict = 'KILL CANDIDATE'
+ elif adj_full < 0:
+ verdict = 'REVIEW'
+ else:
+ verdict = 'KEEP'
+ m = meta.get(pid, {})
+ rows.append({'pid': pid, 'code': (m.get('default_code') or '').strip() or f'#{pid}',
+ 'product': m.get('name') or '', 'category': O.m2o_name(m.get('categ_id')),
+ 'rev': s['rev'], 'gm': s['gm'], 'so_lines': s['so_lines'],
+ 'po_lines': po_lines.get(pid, 0), 'picks': picks.get(pid, 0),
+ 'ret_lines': ret_lines.get(pid, 0), 'units_activity': units,
+ 'book_value': bv, 'carrying': carrying, 'activity_cost': activity,
+ 'adj_hard': adj_hard, 'adj_full': adj_full, 'verdict': verdict})
+ rows.sort(key=lambda x: x['adj_full'])
+
+ # whale curve: cumulative FULL-adjusted profit by descending adj_full rank
+ ranked = sorted(rows, key=lambda x: -x['adj_full'])
+ cum, whale = 0.0, []
+ for i, r in enumerate(ranked, 1):
+ cum += r['adj_full']
+ if i % max(1, len(ranked) // 200) == 0 or i == len(ranked):
+ whale.append({'rank': i, 'cum_profit': cum})
+ peak = max((w['cum_profit'] for w in whale), default=0.0)
+
+ n_kill = sum(1 for r in rows if r['verdict'] == 'KILL CANDIDATE')
+ n_rev = sum(1 for r in rows if r['verdict'] == 'REVIEW')
+ return {
+ 'rows': rows, 'whale': whale, 'peak_profit': peak,
+ 'final_profit': cum, 'n_skus': len(rows),
+ 'n_kill': n_kill, 'n_review': n_rev,
+ 'kill_book_value': sum(r['book_value'] for r in rows
+ if r['verdict'] == 'KILL CANDIDATE'),
+ 'kill_carrying': sum(r['carrying'] for r in rows if r['verdict'] == 'KILL CANDIDATE'),
+ 'rate': rate, 'opex_pool': opex_pool, 'total_units': total_units,
+ 'window': (lf, lt),
+ }
+
+
+def impact(pre, t=None, verdict='KILL CANDIDATE'):
+ """Who feels it if we kill: LTM revenue on the verdict SKUs by CUSTOMER (with their
+ share-of-book, so a dependency reads differently from a nuisance) and rolled up by AGENT.
+ Σ(customer stake) == Σ(agent stake) == Σ(verdict SKUs' revenue) — the ties are asserted
+ in validate(). Same scope as build(): all channels, physical products, house excluded."""
+ t = t or P.today()
+ lf, lt = pre['window']
+ ex = O.excluded_partner_ids()
+ kill_pids = [r['pid'] for r in pre['rows'] if r['verdict'] == verdict]
+
+ base = [('state', 'in', ['sale', 'done']), ('product_id', '!=', False),
+ ('product_id.type', '=', 'product'),
+ ('order_id.date_order', '>=', f'{lf} 00:00:00'),
+ ('order_id.date_order', '<=', f'{lt} 23:59:59')]
+ if ex:
+ base.append(('order_partner_id', 'not in', list(ex)))
+
+ # revenue on the verdict SKUs per (customer × SKU) — chunked (grouped reads over large
+ # id-domains echo the domain per group → server MemoryError)
+ per_cust = {}
+ for ch in _chunk(kill_pids, 400):
+ for g in O.read_group('sale.order.line', base + [('product_id', 'in', ch)],
+ ['price_subtotal:sum'], ['order_partner_id', 'product_id'],
+ lazy=False):
+ pid = O.m2o_id(g.get('order_partner_id'))
+ if not pid:
+ continue
+ e = per_cust.setdefault(pid, {'pid': pid,
+ 'customer': O.m2o_name(g.get('order_partner_id')),
+ 'rev_stake': 0.0, 'skus': set()})
+ e['rev_stake'] += g.get('price_subtotal') or 0.0
+ e['skus'].add(O.m2o_id(g.get('product_id')))
+
+ # each affected customer's TOTAL book (same scope) for the share-of-book column
+ book = {}
+ for g in O.read_group('sale.order.line', base, ['price_subtotal:sum'],
+ ['order_partner_id'], lazy=False):
+ pid = O.m2o_id(g.get('order_partner_id'))
+ if pid:
+ book[pid] = g.get('price_subtotal') or 0.0
+
+ attrs = cust_mod._partner_attrs(list(per_cust))
+ by_customer = []
+ for e in per_cust.values():
+ total = book.get(e['pid'], 0.0)
+ by_customer.append({'pid': e['pid'], 'customer': e['customer'],
+ 'agent': (attrs.get(e['pid']) or {}).get('agent') or '(none)',
+ 'rev_stake': e['rev_stake'], 'n_skus': len(e['skus']),
+ 'book_rev': total,
+ 'share_pct': (e['rev_stake'] / total * 100) if total else None})
+ by_customer.sort(key=lambda x: -x['rev_stake'])
+
+ by_agent = {}
+ for r in by_customer:
+ a = by_agent.setdefault(r['agent'], {'agent': r['agent'], 'customers': 0,
+ 'rev_stake': 0.0, 'book_rev': 0.0})
+ a['customers'] += 1
+ a['rev_stake'] += r['rev_stake']
+ a['book_rev'] += r['book_rev']
+ agents = [{**a, 'share_pct': (a['rev_stake'] / a['book_rev'] * 100)
+ if a['book_rev'] else None} for a in by_agent.values()]
+ agents.sort(key=lambda x: -x['rev_stake'])
+ return {'by_customer': by_customer, 'by_agent': agents,
+ 'stake_total': sum(r['rev_stake'] for r in by_customer),
+ 'n_customers': len(by_customer), 'verdict': verdict}
+
+
+def validate(t=None, team_id=None, pre=None):
+ """Revenue and margin tie the server aggregates over the same domain; book value ties the
+ server SVL sum (the GL-05000 figure)."""
+ t = t or P.today()
+ b = pre or build(t)
+ lf, lt = b['window']
+ ex = O.excluded_partner_ids()
+ dom = [('state', 'in', ['sale', 'done']), ('product_id', '!=', False),
+ ('product_id.type', '=', 'product'),
+ ('order_id.date_order', '>=', f'{lf} 00:00:00'),
+ ('order_id.date_order', '<=', f'{lt} 23:59:59')]
+ if ex:
+ dom.append(('order_partner_id', 'not in', list(ex)))
+ checks = []
+ srv_rev = O.sum_field('sale.order.line', dom, 'price_subtotal')
+ a_rev = sum(r['rev'] for r in b['rows'])
+ checks.append({'check': 'complexity: Σ SKU revenue == server Σ (all-channel LTM)',
+ 'a': round(a_rev, 2), 'b': round(srv_rev, 2),
+ 'gap': round(a_rev - srv_rev, 2),
+ 'ok': abs(a_rev - srv_rev) <= max(1.0, srv_rev * 0.001)})
+ srv_bv = O.sum_field('stock.valuation.layer', [], 'value')
+ a_bv = sum(r['book_value'] for r in b['rows'])
+ checks.append({'check': 'complexity: Σ SKU book value == server Σ valuation layers '
+ '(negatives clamped per SKU — gap = clamp effect)',
+ 'a': round(a_bv, 2), 'b': round(srv_bv, 2),
+ 'gap': round(a_bv - srv_bv, 2),
+ 'ok': a_bv >= srv_bv - 1.0})
+ imp = b.get('impact')
+ if imp:
+ kill_rev = sum(r['rev'] for r in b['rows'] if r['verdict'] == imp['verdict'])
+ for key in ('by_customer', 'by_agent'):
+ s = sum(r['rev_stake'] for r in imp[key])
+ checks.append({'check': f'kill-impact {key} == Σ(kill SKUs revenue)',
+ 'a': round(s, 2), 'b': round(kill_rev, 2),
+ 'gap': round(s - kill_rev, 2),
+ 'ok': abs(s - kill_rev) <= max(1.0, kill_rev * 0.001)})
+ return checks
\ No newline at end of file
diff --git a/platform/modules/customer_data.py b/platform/modules/customer_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..0466500f885f2e3fc32fdaa65594c77c4e86e02b
--- /dev/null
+++ b/platform/modules/customer_data.py
@@ -0,0 +1,587 @@
+"""Customer List — build, filter and save customer lists (replaces My Day, owner IA 2026-07-23).
+
+The page is a customer-list WORKBENCH in two parts:
+ 1. BUILDER — the whole scoped book, one row per customer with a consistent metric surface
+ (YTD / LY revenue, at-risk $, cadence, overdue days, estimated missed $ …): filter, sort,
+ SELECT customers and add them to a list.
+ 2. LISTS — saved lists whose membership is a visible, editable FORMULA (a rule set over the
+ metric columns) plus hand-picked members. 'Call list' and 'Win-back' ship as TEMPLATES —
+ the exact formulas the old My Day queues used — and the user can change or reset them.
+
+Composes already-validated customers-module functions; no separate validate() — the page's
+counts derive FROM the lists it renders (rule 8b). Persistence: HF store key 'customer_lists'
+({username: {list_name: {rules, sort, members, note}}}); templates are virtual until edited.
+
+The user↔agent link (users.py 'agent' field) scopes the pool to that agent's book; users with
+no link (owner/CFO/admin) see the whole book.
+"""
+import core.odoo as O
+import core.periods as P
+import core.store as store
+import core.table_store as table_store
+import modules.ar as ar
+import modules.customers as cust
+import modules.map as map_mod
+import modules.sales as S
+
+LIMIT = 500 # honest builder display cap — always shown with the full count, never silent
+KEY = 'customer_lists'
+TABLE_KEY = 'customer_table_workspace'
+
+# ------------------------------------------------------------------ the metric pool
+# Field metadata for the rule builder: key -> (label, kind). 'num' fields take >=/<=/>/=,
+# 'text' fields take contains/=. Every field is a column of pool() rows.
+FIELDS = {
+ 'customer': ('Customer', 'text'),
+ 'status': ('Status', 'text'),
+ 'agent': ('Agent', 'text'),
+ 'city': ('City', 'text'),
+ 'state': ('State', 'text'),
+ 'revenue_ytd': ('YTD $', 'num'),
+ 'revenue_ly': ('LY (same period) $', 'num'),
+ 'yoy_pct': ('YoY %', 'num'),
+ 'at_risk': ('At risk $', 'num'),
+ 'ltm_rev': ('LTM $', 'num'),
+ 'orders_24m': ('Orders (24M)', 'num'),
+ 'aov': ('Avg order $', 'num'),
+ 'days_since': ('Days since last order', 'num'),
+ 'typical_gap_days': ('Typical gap (days)', 'num'),
+ 'overdue_days': ('Overdue vs cadence (days)', 'num'),
+ 'est_missed': ('Est. missed $', 'num'),
+}
+NUM_OPS = ('>=', '<=', '>', '<', '=')
+TEXT_OPS = ('contains', '=')
+
+
+def agent_pids(agent_name):
+ """Partner ids of an agent's book (None = unscoped/whole book)."""
+ return cust.agent_partner_ids(agent_name) if agent_name else None
+
+
+#: Wave 17 R2 — `ar` bucket label -> the grid's column key. ONE mapping, read by the attribute
+#: builder, the empty-row default and validate(), so a bucket cannot exist under two spellings.
+AR_BUCKET_FIELDS = {'1-30': 'ar_aged_1_30', '31-60': 'ar_aged_31_60',
+ '61-90': 'ar_aged_61_90', '90+': 'ar_aged_90_plus'}
+
+
+def _ar_attrs(t=None):
+ """{pid: {ar_open, ar_overdue, ar_exposure}} — the AR / credit-exposure family.
+
+ Composed from `modules/ar.credit_exposure()`, NOT re-derived: it is already reconciled to
+ Odoo by `ar.validate()`, so the Customer table and the Collections page cannot disagree about
+ what a customer owes. Read from the UNFILTERED `_all_rows` — `rows` is a display-truncated
+ top-40, and a column built off that would silently blank everybody else.
+
+ ⚠ `credit_limit` is deliberately NOT a column: 20 of 1,548 customers have one. EXPOSURE is
+ the number that answers "how much are we out on this customer", and it needs no limit.
+
+ ⚠ `days_to_pay` is NOT COMPUTED here — it is READ from a nightly snapshot. MEASURED
+ 2026-07-27: `ar.credit_exposure()` costs 9s; `ar.days_to_pay()` costs **301s**, because
+ settlement date means walking three years of reconciled receivable lines and their
+ full-reconcile groups. Computing it in `pool()` would add five minutes to every Customer-table
+ build and every Space container start; computing it LAZILY would just move those five minutes
+ onto whoever opened the page first. So the expensive half runs on the app's existing
+ background store-sync thread (`ar.refresh_days_to_pay_snapshot`) and this reads the answer
+ out of the store for nothing. A missing snapshot yields a blank column, never a slow page.
+ """
+ out = {}
+ try:
+ exp = ar.credit_exposure(t)
+ for r in exp.get('_all_rows') or []:
+ out[r['pid']] = {
+ 'ar_open': r.get('open', 0.0) or 0.0,
+ 'ar_overdue': r.get('overdue', 0.0) or 0.0,
+ 'ar_exposure': r.get('exposure', 0.0) or 0.0,
+ # Wave 17 R2 — the aging split, so a saved VIEW can be the collections
+ # worklist. Keys mirror `ar.OVERDUE_BUCKETS` through AR_BUCKET_FIELDS; the four
+ # sum EXACTLY to `ar_overdue` (gated in validate()).
+ **{k: r.get(f'aged_{b}', 0.0) or 0.0
+ for b, k in AR_BUCKET_FIELDS.items()},
+ }
+ except Exception:
+ pass
+ for pid, avg in ar.days_to_pay_snapshot().items():
+ # A customer with an AR row but no settled invoice in the window keeps `None` — blank,
+ # not 0. "Pays in 0 days" is a claim, and a false one.
+ out.setdefault(pid, {})['days_to_pay'] = avg
+ return out
+
+
+def _mix_attrs(pids=None, t=None):
+ """{pid: {top_category, sku_count, top_sku, top_category_pct}} — the product-mix family.
+
+ ONE read_group over sale.order.line by (partner, product) across the LTM window, then the
+ product->category map, then aggregation in Python. Line grain is the only grain that can
+ answer "what does this customer buy", and it is deliberately ALL-CHANNEL scope-wise for the
+ same reason inventory analysis is (see [[ri-channel-scope-amazon]]): a customer's product mix
+ is a fact about the customer, not about a sales team.
+
+ `top_category_pct` is that category's share of the customer's LTM line revenue — the number
+ that says whether "top" means dominant or merely first.
+
+ ⚠ There is NO `team_id` parameter, and its absence is the point rather than an omission: for
+ a BU-scoped viewer the revenue columns beside this one ARE team-scoped while these are not,
+ so "top category" can name products bought through a channel that viewer's revenue figures
+ exclude. That is the same trade the inventory modules make, and it is the right one — a
+ customer's product mix is a fact about the customer.
+ """
+ t = t or P.today()
+ mf, mt = P.ltm(t)
+ # ⚠ `pids` NARROWS THE RESULT, NEVER THE DOMAIN — and that is not a style choice. Putting
+ # the caller's ~1,500 partner ids into an `in` clause on a LINE-grain read_group makes Odoo
+ # answer **502 Bad Gateway**; the same query unfiltered returns in 22s. Measured 2026-07-27,
+ # after the filtered form took the live Customer page past 20 MINUTES without rendering.
+ # The grouped result is per-partner anyway, so dropping the extras in Python costs nothing.
+ dom = [('order_id.state', 'in', ['sale', 'done']),
+ ('order_id.date_order', '>=', str(mf)), ('order_id.date_order', '<=', str(mt))]
+ keep = set(pids) if pids else None
+ rows = O.read_group('sale.order.line', dom, ['price_subtotal:sum'],
+ ['order_partner_id', 'product_id'], lazy=False)
+ prod_ids = {O.m2o_id(r.get('product_id')) for r in rows if r.get('product_id')}
+ prod_ids.discard(None)
+ cats = {}
+ plist = list(prod_ids)
+ for i in range(0, len(plist), 5000):
+ for p in O.search_read('product.product', [('id', 'in', plist[i:i + 5000])], ['categ_id']):
+ # `categ_id`'s display name is the full PATH ("All / Foams & Finishes / Styrofoam").
+ # The column takes the LEAF, because a column and a group label have to be readable —
+ # and the path's own root ("All") carries no information. ⚠ Two categories that share
+ # a leaf name would merge in a group-by; measured against this catalogue that does not
+ # happen, and readability is worth more than defending against a rename.
+ full = O.m2o_name(p.get('categ_id')) or ''
+ cats[p['id']] = (full.split(' / ')[-1].strip() or '(none)') if full else '(none)'
+
+ per = {}
+ for r in rows:
+ pid = O.m2o_id(r.get('order_partner_id'))
+ prod = O.m2o_id(r.get('product_id'))
+ if pid is None or prod is None or (keep is not None and pid not in keep):
+ continue
+ val = r.get('price_subtotal', 0.0) or 0.0
+ e = per.setdefault(pid, {'skus': set(), 'by_cat': {}, 'by_sku': {}, 'total': 0.0})
+ e['skus'].add(prod)
+ e['by_cat'][cats.get(prod, '(none)')] = e['by_cat'].get(cats.get(prod, '(none)'), 0.0) + val
+ e['by_sku'][prod] = e['by_sku'].get(prod, 0.0) + val
+ e['total'] += val
+
+ top_prod_ids = {max(e['by_sku'], key=e['by_sku'].get) for e in per.values() if e['by_sku']}
+ names = {}
+ tlist = list(top_prod_ids)
+ for i in range(0, len(tlist), 5000):
+ for p in O.search_read('product.product', [('id', 'in', tlist[i:i + 5000])], ['name']):
+ names[p['id']] = p.get('name') or ''
+
+ out = {}
+ for pid, e in per.items():
+ cat = max(e['by_cat'], key=e['by_cat'].get) if e['by_cat'] else '(none)'
+ sku = max(e['by_sku'], key=e['by_sku'].get) if e['by_sku'] else None
+ out[pid] = {
+ 'top_category': cat,
+ 'top_category_pct': (e['by_cat'][cat] / e['total']) if e['total'] else None,
+ 'sku_count': len(e['skus']),
+ 'top_sku': names.get(sku, '(none)') if sku is not None else '(none)',
+ }
+ return out
+
+
+def _salesperson_attrs(pids=None, t=None):
+ """{pid: salesperson} — the DOMINANT order-taker over LTM, by order count.
+
+ ⚠ Salesperson is NOT the Agent, and they are not interchangeable (owner, 2026-07-27):
+ the SALESPERSON is whoever entered and took the order, the AGENT is the person the customer
+ is assigned to and who earns the commission — including when the customer orders through the
+ office and somebody else keys it in. So this reads `sale.order.user_id` (the ORDER's taker,
+ fully populated: 20 people over $6.2M LTM) and NOT `res.partner.user_id`, which is a
+ different, near-empty field.
+
+ A customer can have several over a year, so the column takes the one who took the MOST of
+ their orders — a single value the table can group and filter cleanly. Ties break toward the
+ larger revenue.
+ """
+ t = t or P.today()
+ mf, mt = P.ltm(t)
+ # Same rule as `_mix_attrs`: the pid list narrows the RESULT, not the domain. Order grain is
+ # far smaller than line grain so this one never actually 502'd, but a caller's id list has no
+ # business being pushed into a query whose grouping already answers per partner.
+ keep = set(pids) if pids else None
+ dom = S.order_domain(str(mf), str(mt), None)
+ rows = O.read_group('sale.order', dom, ['amount_untaxed:sum'],
+ ['partner_id', 'user_id'], lazy=False)
+ per = {}
+ for r in rows:
+ pid = O.m2o_id(r.get('partner_id'))
+ if pid is None or (keep is not None and pid not in keep):
+ continue
+ who = O.m2o_name(r.get('user_id')) or '(none)'
+ n, rev = r.get('__count', 0) or 0, r.get('amount_untaxed', 0.0) or 0.0
+ cur = per.get(pid)
+ if cur is None or (n, rev) > (cur[1], cur[2]):
+ per[pid] = (who, n, rev)
+ return {pid: v[0] for pid, v in per.items()}
+
+
+def pool(agent_name=None, team_id=None):
+ """One row per customer across the scoped book: the union of YTD buyers, same-period-LY
+ buyers and anyone with an order in the 24-month cadence window — so lapsed/win-back
+ accounts are in the pool, not just YTD actives. Reuses the customers module's validated
+ building blocks (_cust_rev / _cadence_bulk / _partner_attrs) so every metric matches the
+ Customers page definitions; est_missed is the Call-list formula (min(cycles missed, 3) × AOV)."""
+ return _pool_build(agent_name, team_id, limit=None)['rows']
+
+
+def pool_first(agent_name=None, team_id=None, limit=100):
+ """Wave-7 W1 (C1 as amended): the cold-load FAST SLICE — the pool's first `limit` rows in
+ its own default order + the true total, built from the CHEAP families only (revenue ×3,
+ cadence, status, est_missed, partner attributes ≈ 12s measured). The AR / product-mix /
+ salesperson / coords columns stay BLANK until the full build swaps in: `_mix_attrs` alone
+ is a whole-book 20s read_group whose domain must never be pid-narrowed (502 — see its
+ docstring), so "all columns on 100 rows" measured 44.6s vs 45.1s full — no win. A partial
+ payload is a UI PHASE, never a reporting basis — validate() reconciles the full pool only."""
+ return _pool_build(agent_name, team_id, limit=limit, fast=True)
+
+
+def _dba_attrs(pids, t):
+ """{pid: 'Fisch' | 'Royal' | 'Both'} — which brand(s) a customer's confirmed orders carry
+ over the pool's own 24-month universe (C-DBA, wave 2026-08-02).
+
+ GIFTWARE DEALS (the Amazon channel) is deliberately NOT a DBA — a customer buying only
+ through it stays blank here, exactly as ARCHITECTURE.md §4's wholesale scope treats that
+ team. Blank also covers the ledger-retained customers whose activity predates the window:
+ blank means "no brand attributable in 24 months", never a guess. One read_group, grouped
+ (partner, team); degrades to {} like the other attr families — a blank column beats a
+ page that cannot render.
+ """
+ try:
+ import datetime as _dt
+ d_from = (_dt.date.fromisoformat(str(t)) - _dt.timedelta(days=731)).isoformat()
+ pairs = O.read_group(
+ 'sale.order',
+ [('state', 'in', ('sale', 'done')), ('date_order', '>=', d_from),
+ ('partner_id', 'in', list(pids)), ('team_id', 'in', (5, 6))],
+ ['partner_id'], ['partner_id', 'team_id'], lazy=False)
+ teams = {}
+ for r in pairs:
+ pid = O.m2o_id(r.get('partner_id'))
+ tid = O.m2o_id(r.get('team_id'))
+ if pid and tid in (5, 6):
+ teams.setdefault(pid, set()).add(tid)
+ label = {5: 'Fisch', 6: 'Royal'}
+ return {pid: ('Both' if len(ts) == 2 else label[next(iter(ts))])
+ for pid, ts in teams.items()}
+ except Exception:
+ return {}
+
+
+def _pool_build(agent_name, team_id, limit, fast=False):
+ t = P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ mf, mt = P.ltm(t)
+ pids = agent_pids(agent_name)
+ this = cust._cust_rev(yf, yt, team_id, pids)
+ last = cust._cust_rev(lf, lt, team_id, pids)
+ ltm = cust._cust_rev(mf, mt, team_id, pids)
+ cad = cust._cadence_bulk(t, team_id, agent_pids=pids)
+ all_pids = set(this) | set(last) | set(cad)
+ total = len(all_pids)
+ if limit is not None and total > limit:
+ # the SAME ordering the assembled pool ships (see the sort below) — the slice must be
+ # the first page of the very list the full build renders, or the swap-in reshuffles.
+ ranked = sorted(all_pids,
+ key=lambda p: -((this.get(p) or {}).get('rev', 0.0)
+ + (last.get(p) or {}).get('rev', 0.0)))
+ all_pids = set(ranked[:limit])
+ attrs = cust._partner_attrs(list(all_pids))
+ if fast:
+ # C1 fast phase: the slow families stay empty — their columns render blank behind the
+ # toolbar's partial indicator until the full build swaps in.
+ ar_a, mix_a, sp_a, geo_a, dba_a = {}, {}, {}, {}, {}
+ else:
+ # The three families the owner asked for (2026-07-27). Each degrades to {} rather than
+ # raising: a customer table that cannot render because AR is momentarily unreachable is
+ # a worse failure than one with a blank column.
+ ar_a = _ar_attrs(t)
+ mix_a = _mix_attrs(all_pids, t)
+ sp_a = _salesperson_attrs(all_pids, t)
+ # W11 (wave-7): coordinates for the Map VIEW — Odoo coords else the geocode cache,
+ # read-only reuse (coords_for never geocodes); missing → null lat/lon, and the
+ # client's map view discloses the count.
+ geo_a = map_mod.coords_for(list(all_pids))
+ # C-DBA (2026-08-02): the brand attribute rides the full build only, like the rest.
+ dba_a = _dba_attrs(all_pids, t)
+ # customers whose only activity sits in the older half of the 24-month cadence window
+ # appear in no revenue map — fetch their names directly (else the lapsed cohort, exactly
+ # the win-back targets this union exists for, would render as '?')
+ unnamed = [pid for pid in all_pids
+ if not ((this.get(pid) or {}).get('name') or (last.get(pid) or {}).get('name')
+ or (ltm.get(pid) or {}).get('name'))]
+ extra_names = ({r['id']: r['name'] for r in
+ O.search_read('res.partner', [('id', 'in', unnamed)], ['name'])}
+ if unnamed else {})
+ rows = []
+ for pid in all_pids:
+ tv = this.get(pid) or {}
+ lv = last.get(pid) or {}
+ c = cad.get(pid) or {}
+ rev, ly = tv.get('rev', 0.0), lv.get('rev', 0.0)
+ gap = c.get('typical_gap_days')
+ overdue = c.get('overdue_days')
+ aov = c.get('aov', 0.0)
+ est = (min(overdue / gap, 3.0) * aov) if (gap and overdue and overdue > 0) else 0.0
+ status = ('New' if rev > 0 and ly <= 0 else
+ 'Lost' if ly > 0 and rev <= 0 else
+ 'Declining' if 0 < rev < ly else
+ 'Growing' if rev > 0 else 'Dormant')
+ a = attrs.get(pid) or {}
+ rows.append({
+ 'pid': pid,
+ 'customer': tv.get('name') or lv.get('name')
+ or (ltm.get(pid) or {}).get('name') or extra_names.get(pid) or '?',
+ 'status': status,
+ 'agent': a.get('agent', '(none)'), 'city': a.get('city', '(none)'),
+ # C-DBA: blank (not '(none)') — a select's blank is its own honest empty state.
+ 'dba': dba_a.get(pid, ''),
+ 'state': a.get('state', '(none)'),
+ # Owner 2026-07-27, the partner-attribute family. `.get(..., default)` is not
+ # defensive habit here: search_read returned 1,548 of 1,550 pool pids — two partners
+ # in the sales history are archived or deleted — so a customer with NO attrs row is
+ # a real case, and it must render as '(none)' rather than KeyError the whole page.
+ 'country': a.get('country', '(none)'), 'zip': a.get('zip', '(none)'),
+ 'payment_terms': a.get('payment_terms', '(none)'),
+ 'customer_since': a.get('customer_since', ''),
+ # Row-level datum for the `created_time` field type (wave-5 item 11) — rides every
+ # row like pid, no column of its own until a user creates one.
+ '_created': a.get('created_at', ''),
+ 'tags': a.get('tags', '(none)'), 'pricelist': a.get('pricelist', '(none)'),
+ # AR / credit exposure — composed from the already-reconciled ar.py blocks, so the
+ # Customer table and the Collections page cannot disagree.
+ 'ar_open': (ar_a.get(pid) or {}).get('ar_open', 0.0),
+ 'ar_overdue': (ar_a.get(pid) or {}).get('ar_overdue', 0.0),
+ 'ar_exposure': (ar_a.get(pid) or {}).get('ar_exposure', 0.0),
+ 'days_to_pay': (ar_a.get(pid) or {}).get('days_to_pay'),
+ **{k: (ar_a.get(pid) or {}).get(k, 0.0) for k in AR_BUCKET_FIELDS.values()},
+ # Product mix, LTM, line grain, ALL-channel.
+ 'top_category': (mix_a.get(pid) or {}).get('top_category', '(none)'),
+ 'top_category_pct': (mix_a.get(pid) or {}).get('top_category_pct'),
+ 'sku_count': (mix_a.get(pid) or {}).get('sku_count', 0),
+ 'top_sku': (mix_a.get(pid) or {}).get('top_sku', '(none)'),
+ # The ORDER-TAKER, not the agent. Different people, different questions.
+ 'salesperson': sp_a.get(pid, '(none)'),
+ # W11: nullable — the Map view pins what it can and counts what it cannot.
+ 'lat': (geo_a.get(pid) or {}).get('lat'),
+ 'lon': (geo_a.get(pid) or {}).get('lon'),
+ 'revenue_ytd': rev, 'revenue_ly': ly,
+ 'yoy_pct': P.yoy_pct(rev, ly),
+ 'at_risk': max(ly - rev, 0.0),
+ 'ltm_rev': (ltm.get(pid) or {}).get('rev', 0.0),
+ 'orders_24m': c.get('n_orders', 0), 'aov': aov,
+ 'last_order': c.get('last_order', ''),
+ 'days_since': c.get('days_since'),
+ 'typical_gap_days': gap, 'overdue_days': overdue,
+ 'est_missed': est,
+ })
+ for r in rows:
+ r['odoo_status'] = 'Active'
+ # I13 (owner item 13, contract C6): RETAIN customers that disappear from Odoo.
+ # Only the FULL build reconciles the ledger — the fast slice is 100 rows by construction,
+ # so letting it write would mark ~1,450 living customers archived on every cold load.
+ if not fast:
+ rows, total = _reconcile_ledger(rows, total, agent_name, team_id)
+ rows.sort(key=lambda r: -(r['revenue_ytd'] + r['revenue_ly']))
+ return {'rows': rows, 'total': total}
+
+
+LEDGER_KEY = 'customer_ledger'
+
+
+def _reconcile_ledger(rows, total, agent_name, team_id):
+ """Remember every customer we have ever seen, and keep serving the ones Odoo stopped
+ returning (owner item 13: "if it is deleted, that it goes to an archived tag immediately —
+ so stored in our platform even if deleted in Odoo").
+
+ Why a ledger at all: this pool is built from SALES HISTORY, not from a partner list, so a
+ partner deleted in Odoo usually keeps appearing (their order lines remain) — until the day
+ the lines go too, when the row would silently vanish along with every note, tag and cohort
+ membership attached to it. Nothing else in the app would notice. The ledger is the only
+ record that the customer ever existed, which is why it starts recording now rather than
+ when the surfacing is finished: history you did not write down is not recoverable later.
+
+ ⚠ SCOPE-SAFE. The ledger is written ONLY from an UNSCOPED build (no agent, no BU). A scoped
+ build legitimately sees a fraction of the book, and reconciling from it would mark every
+ customer outside that scope 'Archived' for everyone — the failure would look exactly like
+ the data loss this is meant to prevent. Scoped builds READ the ledger and resurrect nothing
+ they cannot prove they should see.
+ """
+ try:
+ ledger = dict(store.get(LEDGER_KEY) or {})
+ except Exception:
+ return rows, total # a ledger we cannot read must not break the table
+ today = str(P.today())
+ live = {r['pid'] for r in rows}
+ unscoped = agent_name is None and team_id is None
+
+ if unscoped:
+ for r in rows:
+ e = ledger.get(str(r['pid'])) or {}
+ e.update({'name': r['customer'], 'last_seen': today})
+ e.setdefault('first_seen', today)
+ ledger[str(r['pid'])] = e
+
+ # Rows the ledger knows and this build did not return. On an unscoped build that means
+ # "gone from Odoo"; on a scoped one it usually just means "not in this agent's book", so
+ # only the unscoped build may surface them.
+ revived = []
+ if unscoped:
+ for key, e in ledger.items():
+ try:
+ pid = int(key)
+ except (TypeError, ValueError):
+ continue
+ if pid in live:
+ continue
+ revived.append({
+ 'pid': pid, 'customer': e.get('name') or '?', 'status': 'Dormant',
+ 'odoo_status': 'Archived',
+ # Everything else is genuinely UNKNOWN now — the record is gone. Blank is the
+ # honest rendering; carrying the last-known numbers forward would state figures
+ # as current that nothing can reconcile ([[no-unverifiable-aggregates]]).
+ 'agent': '(none)', 'city': '(none)', 'state': '(none)', 'country': '(none)',
+ 'zip': '(none)', 'payment_terms': '(none)', 'customer_since': '',
+ '_created': '', 'tags': '(none)', 'pricelist': '(none)',
+ 'ar_open': 0.0, 'ar_overdue': 0.0, 'ar_exposure': 0.0, 'days_to_pay': None,
+ **{k: 0.0 for k in AR_BUCKET_FIELDS.values()},
+ 'top_category': '(none)', 'top_category_pct': None, 'sku_count': 0,
+ 'top_sku': '(none)', 'salesperson': '(none)', 'lat': None, 'lon': None,
+ 'revenue_ytd': 0.0, 'revenue_ly': 0.0, 'yoy_pct': None, 'at_risk': 0.0,
+ 'ltm_rev': 0.0, 'orders_24m': 0, 'aov': 0.0, 'last_order': '',
+ 'days_since': None, 'typical_gap_days': None, 'overdue_days': None,
+ 'est_missed': 0.0,
+ })
+ if store.available():
+ try:
+ store.update(LEDGER_KEY, lambda cur: {**cur, **ledger}, flush='async')
+ except Exception:
+ pass # recording is best-effort; the table is not
+ return rows + revived, total + len(revived)
+
+
+# ------------------------------------------------------------------ the rule engine
+# A list's formula = [{'field','op','value'}, ...] over FIELDS + a 'sort' key ('-x' = desc).
+# The two templates ARE the old My Day queue formulas, expressed as visible rules.
+#
+# 'note' is a SEED, not the source of truth (owner 2026-07-25). It is what a list reads
+# BEFORE anyone edits it; the moment a user saves a description the stored one wins, and
+# an empty stored description stays empty — the template must never resurrect. That
+# precedence lives in aios_grid.views_from_defs (a saved view replaces its template-derived
+# one wholesale) and is pinned by _qa_grid_view_note.py. Edit the prose here only to change
+# what a NEW user starts with.
+TEMPLATES = {
+ 'Call list': {
+ 'rules': [{'field': 'orders_24m', 'op': '>=', 'value': 3},
+ {'field': 'overdue_days', 'op': '>', 'value': 0},
+ {'field': 'days_since', 'op': '<=', 'value': 365}],
+ 'sort': '-est_missed',
+ 'note': 'Customers overdue against their OWN reorder cadence (3+ orders, a real gap '
+ 'pattern, ordered within 365d), ranked by estimated missed revenue.'},
+ 'Win-back': {
+ 'rules': [{'field': 'revenue_ly', 'op': '>=', 'value': 2000},
+ {'field': 'at_risk', 'op': '>', 'value': 0}],
+ 'sort': '-at_risk',
+ 'note': 'Bought materially last year (over $2,000), down or gone this year, ranked by '
+ 'dollars at risk.'},
+}
+
+
+def _match(row, rule):
+ """One rule against one row. None/missing numeric values fail every numeric comparison
+ (a customer with no cadence is never 'overdue'); text ops are case-insensitive."""
+ field, op, val = rule.get('field'), rule.get('op'), rule.get('value')
+ if field not in FIELDS:
+ return True # unknown field → rule is inert, not a crash
+ v = row.get(field)
+ if FIELDS[field][1] == 'text':
+ s, q = str(v or '').lower(), str(val or '').lower()
+ return q in s if op == 'contains' else s == q
+ try:
+ v, val = float(v), float(val)
+ except (TypeError, ValueError):
+ return False
+ return {'>=': v >= val, '<=': v <= val, '>': v > val, '<': v < val,
+ '=': v == val}.get(op, False)
+
+
+def apply_rules(rows, rules, sort=None):
+ """Filter the pool through a formula (AND of all rules) and apply the list's sort."""
+ out = [r for r in rows if all(_match(r, ru) for ru in (rules or []))]
+ if sort:
+ key = sort.lstrip('-')
+ out.sort(key=lambda r: (r.get(key) is None,
+ -(r.get(key) or 0) if sort.startswith('-') else (r.get(key) or 0))
+ if FIELDS.get(key, ('', 'num'))[1] == 'num'
+ else str(r.get(key) or '').lower(), reverse=False)
+ return out
+
+
+# ------------------------------------------------------------------ persistence (HF store)
+def saved_lists(username):
+ """{list_name: {'rules','sort','members','note'}} for one user ({} when none / store down)."""
+ try:
+ return (store.get(KEY) or {}).get(username, {}) or {}
+ except Exception:
+ return {}
+
+
+def save_list(username, name, definition):
+ def _up(d):
+ d.setdefault(username, {})[name] = definition
+ return d
+ store.update(KEY, _up)
+
+
+def delete_list(username, name):
+ def _up(d):
+ (d.get(username) or {}).pop(name, None)
+ return d
+ store.update(KEY, _up)
+
+
+# ------------------------------------------------------------------ Airtable-style table workspace
+# This is intentionally separate from `customer_lists`: a LIST owns membership/formula
+# semantics, while a VIEW owns presentation/query state (filters, multi-sort, grouping,
+# visible fields, widths, color, row height). List views can reference the same formula
+# without conflating the two persistence contracts.
+#
+# The store logic MOVED to core/table_store.py 2026-07-27 (the table-page factory): these
+# names are the Customer table's instance of the generic per-object workspace store, kept as
+# module functions so every existing caller (app.py's host loop, QA gates) is untouched.
+# A NEW table object gets its own `core.table_store.make('_table_workspace')`.
+_TSTORE = table_store.make(TABLE_KEY)
+
+#: Wave 16 C-TOPIC — the ops OBJECT, for callers that select a table by TOPIC (grid_events'
+#: `EventCtx.table`). The module-level re-exports below stay for every existing caller.
+TABLE_OPS = _TSTORE
+
+table_workspace = _TSTORE.workspace
+shared_table_views = _TSTORE.shared_views # wave-9 I17: views shared WITH this viewer
+shared_table_view = _TSTORE.shared_view # ...and one raw, for authorisation only
+save_table_view = _TSTORE.save_view
+delete_table_view = _TSTORE.delete_view
+save_table_field = _TSTORE.save_field
+delete_table_field = _TSTORE.delete_field
+duplicate_table_field = _TSTORE.duplicate_field
+patch_table_overlay = _TSTORE.patch_overlay
+save_table_folders = _TSTORE.save_folders
+save_table_active_view = _TSTORE.save_active_view # owner item 3: last-opened view, per user
+save_table_record_layout = _TSTORE.save_record_layout # 2026-08-02 C-LAYOUT: record-detail order
+
+
+# ------------------------------------------------------------------ digest compatibility
+def queues(agent_name=None, team_id=None, limit=200):
+ """The two canonical morning lists (call list + win-back) for the daily digest email —
+ unchanged formulas via the customers module (the digest always uses the CANONICAL templates,
+ not a user's edited copy, so every rep's email means the same thing)."""
+ pids = agent_pids(agent_name)
+ return {
+ 'calls': cust.contact_recommendations(team_id=team_id, limit=limit, agent_pids=pids),
+ 'risk': cust.at_risk(team_id=team_id, limit=limit, agent_pids=pids),
+ }
diff --git a/platform/modules/customers.py b/platform/modules/customers.py
new file mode 100644
index 0000000000000000000000000000000000000000..73a58b1b5165c7bd3479f806dd1a545caeef8c5a
--- /dev/null
+++ b/platform/modules/customers.py
@@ -0,0 +1,1430 @@
+"""Customers module — the "why" behind the brand divergence (Fisch −5.5% vs Royal +40%).
+
+Centerpiece is the **customer revenue bridge**: it decomposes the YoY revenue change into
+New (+), Expansion (+), Contraction (−) and Lost (−). That decomposition both answers the
+business question and self-validates — the four components must reconcile last-period total
+to this-period total exactly (built into validate()).
+
+Plus a MECE value-tier segmentation (LTM), an at-risk / win-back list ranked by dollars at
+stake, and new/lost customer lists. All order-level (sale.order), RI+FFS scope, excluded
+accounts removed — reusing the Sales module's order_domain so scope is identical everywhere.
+"""
+import sys
+import datetime as dt
+import statistics
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+import modules.sales as sales_mod
+
+
+# ---- per-customer grouped reads: STORE-backed (OM-2 retrofit 2026-07-12) with LIVE fallback --
+# _cust_rev/_last_order_dates are the choke points behind the Customers bundle, the Map's slow
+# wave-1 and the Customer List queues. SQL mirrors sales.order_domain incl. the agent filter
+# (partner_ids; an EMPTY set matches no orders, same as the live domain). validate() stays live.
+USE_STORE = True
+
+
+def _cust_group_store(date_from, date_to, team_id, agent_pids, select):
+ import harness.datastore as DS
+ params, w = [], ["state IN ('sale','done')"]
+ teams = sales_mod.TEAMS(team_id)
+ w.append("team_id IN (" + ",".join("?" * len(teams)) + ")")
+ params += list(teams)
+ if date_from:
+ w.append("CAST(date_order AS TIMESTAMP) >= CAST(? AS TIMESTAMP)")
+ params.append(f"{date_from} 00:00:00")
+ if date_to:
+ w.append("CAST(date_order AS TIMESTAMP) <= CAST(? AS TIMESTAMP)")
+ params.append(f"{date_to} 23:59:59")
+ ex = O.excluded_partner_ids()
+ if ex:
+ w.append("partner_id NOT IN (" + ",".join("?" * len(ex)) + ")")
+ params += list(ex)
+ if agent_pids is not None:
+ if not agent_pids:
+ return [] # empty set matches no orders
+ w.append("partner_id IN (" + ",".join("?" * len(agent_pids)) + ")")
+ params += list(agent_pids)
+ if O.doc_mode() == 'invoice':
+ w.append("invoice_status = 'invoiced'")
+ return DS.ro_con().execute(
+ f"SELECT o.partner_id, coalesce(p.name, '#' || o.partner_id), {select} "
+ "FROM sale_order o LEFT JOIN res_partner p ON p.id = o.partner_id "
+ "WHERE " + " AND ".join(w) + " GROUP BY 1, 2", params).fetchall()
+
+
+def _cust_rev(date_from, date_to, team_id=None, agent_pids=None):
+ """{partner_id: {'name', 'rev', 'orders'}} over a window (RI+FFS, excluded accounts removed).
+ agent_pids (frozenset|None) restricts to one Agent's customers — the module-wide Agent filter."""
+ if USE_STORE:
+ try:
+ rows = _cust_group_store(date_from, date_to, team_id, agent_pids,
+ 'sum(amount_untaxed), count(*)')
+ return {r[0]: {'name': r[1], 'rev': r[2] or 0.0, 'orders': r[3]}
+ for r in rows if r[0]}
+ except Exception:
+ pass
+ g = O.read_group('sale.order', sales_mod.order_domain(date_from, date_to, team_id, partner_ids=agent_pids),
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False)
+ out = {}
+ for r in g:
+ pid = O.m2o_id(r.get('partner_id'))
+ if not pid:
+ continue
+ out[pid] = {'name': O.m2o_name(r.get('partner_id')),
+ 'rev': r.get('amount_untaxed') or 0.0,
+ 'orders': r.get('__count') or 0}
+ return out
+
+
+# ----------------------------------------------------------- agent filter (module-wide)
+# Agent = res.partner.agent_ids (the assigned sales agent on a customer; the same attribute the
+# rollups slice by). The Customer module can be filtered to one agent's whole book: we resolve the
+# agent name → the set of partner ids assigned to them, then pass it as agent_pids everywhere.
+def agent_options(t=None, team_id=None):
+ """Agent names that have customers with YTD activity in scope — for the module filter dropdown.
+ Reuses the agent rollup (cheap, cached at the app layer). '(none)' = unassigned customers."""
+ return [r['group'] for r in by_dimension('agent', t, team_id=team_id)]
+
+
+def agent_partner_ids(agent_name):
+ """frozenset of partner ids assigned to `agent_name` via res.partner.agent_ids. None when no
+ agent is selected ('All agents'); an EMPTY frozenset (matches nobody) when the agent has no
+ customers. '(none)' resolves to customers with no agent assigned.
+
+ INCLUDES INACTIVE/archived partners (active in [True,False]) — the agent's book is the whole
+ book (dormant + archived accounts too), which is what the Agents page promises AND what an
+ AGENT-LOGIN user must see as their complete, isolated book. Active-only used to drop archived
+ customers entirely (e.g. an agent whose whole small book is archived resolved to an EMPTY book —
+ the fails-closed trap). Resolves the agent name to EVERY matching partner id (not just the
+ first) so a same-name collision can't silently mis-scope the book (owner 2026-07-21)."""
+ if not agent_name or agent_name in ('All agents', 'All'):
+ return None
+ _all = [('active', 'in', [True, False])]
+ if agent_name == '(none)':
+ rows = O.search_read('res.partner', [('customer_rank', '>', 0),
+ ('agent_ids', '=', False)] + _all, ['id'], limit=100000)
+ return frozenset(r['id'] for r in rows)
+ ag = O.search_read('res.partner', [('name', '=', agent_name)] + _all, ['id'], limit=10)
+ if not ag:
+ return frozenset()
+ rows = O.search_read('res.partner', [('agent_ids', 'in', [a['id'] for a in ag])] + _all,
+ ['id'], limit=100000)
+ return frozenset(r['id'] for r in rows)
+
+
+# ----------------------------------------------------------- revenue bridge
+def revenue_bridge(t=None, team_id=None, agent_pids=None):
+ """Decompose YTD-vs-same-period-LY revenue change into New/Expansion/Contraction/Lost."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ tset, lset = set(this), set(last)
+
+ new_ids = tset - lset
+ lost_ids = lset - tset
+ both = tset & lset
+
+ new_rev = sum(this[p]['rev'] for p in new_ids)
+ lost_rev = sum(last[p]['rev'] for p in lost_ids)
+ expansion = sum(this[p]['rev'] - last[p]['rev'] for p in both if this[p]['rev'] > last[p]['rev'])
+ contraction = sum(this[p]['rev'] - last[p]['rev'] for p in both if this[p]['rev'] < last[p]['rev'])
+
+ this_total = sum(v['rev'] for v in this.values())
+ last_total = sum(v['rev'] for v in last.values())
+ return {
+ 'last_total': last_total,
+ 'this_total': this_total,
+ 'change': this_total - last_total,
+ 'new': {'rev': new_rev, 'n': len(new_ids)},
+ 'expansion': {'rev': expansion, 'n': sum(1 for p in both if this[p]['rev'] > last[p]['rev'])},
+ 'contraction': {'rev': contraction, 'n': sum(1 for p in both if this[p]['rev'] < last[p]['rev'])},
+ 'lost': {'rev': -lost_rev, 'n': len(lost_ids)},
+ 'retained_n': len(both),
+ 'active_this': len(tset),
+ 'active_last': len(lset),
+ }
+
+
+def bridge_by_brand(t=None, agent_pids=None):
+ rows = []
+ for tid in O.TEAM_IDS:
+ b = revenue_bridge(t, team_id=tid, agent_pids=agent_pids)
+ rows.append({'brand': O.TEAM_NAMES[tid], **{
+ 'last': b['last_total'], 'this': b['this_total'], 'change': b['change'],
+ 'new': b['new']['rev'], 'expansion': b['expansion']['rev'],
+ 'contraction': b['contraction']['rev'], 'lost': b['lost']['rev'],
+ 'new_n': b['new']['n'], 'lost_n': b['lost']['n']}})
+ return rows
+
+
+def bridge_component_customers(component, t=None, team_id=None, agent_pids=None):
+ """The customers contributing to one revenue-bridge component (New / Expansion / Contraction /
+ Lost), each with LY, YTD, the bridge delta and share of that component — for the click-through
+ drawer off the Revenue-bridge chart."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ tset, lset = set(this), set(last)
+ comp = (component or '').strip().lower()
+ rows = []
+ if comp == 'new':
+ rows = [{'pid': p, 'customer': this[p]['name'], 'rev_ly': 0.0, 'rev_ytd': this[p]['rev'],
+ 'change': this[p]['rev']} for p in (tset - lset)]
+ elif comp == 'lost':
+ rows = [{'pid': p, 'customer': last[p]['name'], 'rev_ly': last[p]['rev'], 'rev_ytd': 0.0,
+ 'change': -last[p]['rev']} for p in (lset - tset)]
+ elif comp in ('expansion', 'contraction'):
+ up = comp == 'expansion'
+ for p in (tset & lset):
+ d = this[p]['rev'] - last[p]['rev']
+ if (d > 0) == up and d != 0:
+ rows.append({'pid': p, 'customer': this[p]['name'], 'rev_ly': last[p]['rev'],
+ 'rev_ytd': this[p]['rev'], 'change': d})
+ denom = sum(abs(r['change']) for r in rows) or 1.0
+ for r in rows:
+ r['at_risk'] = max(0.0, r['rev_ly'] - r['rev_ytd'])
+ r['pct_of_component'] = abs(r['change']) / denom * 100.0
+ rows.sort(key=lambda r: -abs(r['change']))
+ _attach_attrs(rows)
+ return {'component': component, 'rows': rows, 'n': len(rows),
+ 'total': sum(r['change'] for r in rows)}
+
+
+def period_customers(ym, t=None, team_id=None, agent_pids=None):
+ """Customers who purchased in calendar month `ym` (YYYY-MM) this year — that month's revenue,
+ the same month last year, order count, and each customer's YTD-vs-LY at-risk for context.
+ Powers the click-through drawer off the Monthly (this-year vs last-year) bar chart."""
+ t = t or P.today()
+ y, m = int(ym[:4]), int(ym[5:7])
+
+ def _bounds(yr):
+ s = dt.date(yr, m, 1)
+ e = dt.date(yr + (m // 12), (m % 12) + 1, 1) - dt.timedelta(days=1)
+ return s.isoformat(), e.isoformat()
+ ts, te = _bounds(y)
+ ls, le = _bounds(y - 1)
+ this = _cust_rev(ts, te, team_id, agent_pids)
+ last = _cust_rev(ls, le, team_id, agent_pids)
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ ytd = _cust_rev(yf, yt, team_id, agent_pids)
+ lytd = _cust_rev(lf, lt, team_id, agent_pids)
+ rows = [{'pid': p, 'customer': v['name'], 'rev_this': v['rev'], 'orders': v['orders'],
+ 'rev_ly': last.get(p, {}).get('rev', 0.0),
+ 'at_risk': max(0.0, lytd.get(p, {}).get('rev', 0.0) - ytd.get(p, {}).get('rev', 0.0))}
+ for p, v in this.items()]
+ rows.sort(key=lambda r: -r['rev_this'])
+ _attach_attrs(rows)
+ return {'month': ym, 'rows': rows, 'n': len(rows),
+ 'rev_this': sum(r['rev_this'] for r in rows),
+ 'rev_ly': sum(r['rev_ly'] for r in rows)}
+
+
+def monthly_kpis(t=None, team_id=None, n_months=24):
+ """Monthly time-series for the acquisition/engagement trends at the top of the page: order
+ count, AOV, distinct purchasing customers, and newly-acquired customers (first-ever order that
+ month)."""
+ t = t or P.today()
+ months = P.month_starts(n_months, t)
+ win_start = months[0][1]
+ dom = sales_mod.order_domain(win_start, t.isoformat(), team_id)
+
+ def _ym(r):
+ rng = (r.get('__range') or {}).get('date_order:month') or {}
+ return (rng.get('from') or '')[:7]
+ mrev, morders = {}, {}
+ for r in O.read_group('sale.order', dom, ['amount_untaxed:sum'], ['date_order:month'], lazy=False):
+ ym = _ym(r)
+ if ym:
+ mrev[ym] = r.get('amount_untaxed') or 0.0
+ morders[ym] = r.get('__count') or 0
+ mbuyers = {}
+ for r in O.read_group('sale.order', dom, ['__count'], ['date_order:month', 'partner_id'], lazy=False):
+ ym = _ym(r)
+ if ym:
+ mbuyers[ym] = mbuyers.get(ym, 0) + 1
+ # new customers: first-ever order month per partner (all history), bucketed into our window
+ mnew = {}
+ for r in O.read_group('sale.order', sales_mod.order_domain('2000-01-01', t.isoformat(), team_id),
+ ['date_order:min'], ['partner_id'], lazy=False):
+ ym = str(r.get('date_order') or '')[:7]
+ if ym:
+ mnew[ym] = mnew.get(ym, 0) + 1
+ out = []
+ for ym, _s, _e in months:
+ orders = morders.get(ym, 0)
+ out.append({'month': ym, 'orders': orders, 'revenue': mrev.get(ym, 0.0),
+ 'aov': (mrev.get(ym, 0.0) / orders) if orders else 0.0,
+ 'buyers': mbuyers.get(ym, 0), 'new_customers': mnew.get(ym, 0)})
+ return out
+
+
+def customer_trends(t=None, team_id=None, agent_pids=None):
+ """12 months aligned THIS-year vs same-month-LAST-year, with both the monthly value and the
+ running CUMULATIVE (this vs last) for orders, AOV, purchasing customers (distinct) and new
+ customers. Powers the Trends chart's Monthly-bars / Cumulative-line toggle."""
+ t = t or P.today()
+ months = P.month_starts(24, t) # 24 ascending: prior 12 then recent 12
+ win_start = months[0][1]
+ dom = sales_mod.order_domain(win_start, t.isoformat(), team_id, partner_ids=agent_pids)
+
+ def _ym(r):
+ rng = (r.get('__range') or {}).get('date_order:month') or {}
+ return (rng.get('from') or '')[:7]
+ mrev, morders, mbuyers = {}, {}, {}
+ for r in O.read_group('sale.order', dom, ['amount_untaxed:sum'], ['date_order:month'], lazy=False):
+ ym = _ym(r)
+ if ym:
+ mrev[ym] = r.get('amount_untaxed') or 0.0
+ morders[ym] = r.get('__count') or 0
+ for r in O.read_group('sale.order', dom, ['__count'], ['date_order:month', 'partner_id'], lazy=False):
+ ym = _ym(r)
+ pid = O.m2o_id(r.get('partner_id'))
+ if ym and pid:
+ mbuyers.setdefault(ym, set()).add(pid)
+ mnew = {}
+ for r in O.read_group('sale.order', sales_mod.order_domain('2000-01-01', t.isoformat(), team_id, partner_ids=agent_pids),
+ ['date_order:min'], ['partner_id'], lazy=False):
+ ym = str(r.get('date_order') or '')[:7]
+ if ym:
+ mnew[ym] = mnew.get(ym, 0) + 1
+
+ recent = [m[0] for m in months[12:24]] # the 12 most recent months (ascending)
+ prior = [m[0] for m in months[0:12]] # the same 12 months a year earlier
+ out = []
+ cr_t = co_t = cn_t = 0.0
+ cr_l = co_l = cn_l = 0.0
+ cb_t, cb_l = set(), set()
+ for i in range(12):
+ ty, ly = recent[i], prior[i]
+ ot, rt, nt = morders.get(ty, 0), mrev.get(ty, 0.0), mnew.get(ty, 0)
+ ol, rl, nl = morders.get(ly, 0), mrev.get(ly, 0.0), mnew.get(ly, 0)
+ bt, bl = mbuyers.get(ty, set()), mbuyers.get(ly, set())
+ co_t += ot; cr_t += rt; cn_t += nt; cb_t |= bt
+ co_l += ol; cr_l += rl; cn_l += nl; cb_l |= bl
+ out.append({
+ 'month': ty, 'month_ly': ly,
+ 'orders': ot, 'orders_ly': ol,
+ 'aov': (rt / ot if ot else 0.0), 'aov_ly': (rl / ol if ol else 0.0),
+ 'buyers': len(bt), 'buyers_ly': len(bl),
+ 'new_customers': nt, 'new_customers_ly': nl,
+ 'orders_cum': co_t, 'orders_cum_ly': co_l,
+ 'aov_cum': (cr_t / co_t if co_t else 0.0), 'aov_cum_ly': (cr_l / co_l if co_l else 0.0),
+ 'buyers_cum': len(cb_t), 'buyers_cum_ly': len(cb_l),
+ 'new_customers_cum': cn_t, 'new_customers_cum_ly': cn_l,
+ })
+ return out
+
+
+# ----------------------------------------------------------- segmentation (MECE)
+TIERS = [('Whale (≥$25k)', 25000), ('Large ($10–25k)', 10000),
+ ('Mid ($2–10k)', 2000), ('Small (<$2k)', 0)]
+
+
+def _tier(rev):
+ for name, lo in TIERS:
+ if rev >= lo:
+ return name
+ return TIERS[-1][0]
+
+
+def segments(t=None, team_id=None, agent_pids=None):
+ """MECE value-tier segmentation over LTM revenue (each active customer in one tier)."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ cust = _cust_rev(lf, lt, team_id, agent_pids)
+ agg = {name: {'segment': name, 'customers': 0, 'revenue': 0.0} for name, _ in TIERS}
+ for v in cust.values():
+ a = agg[_tier(v['rev'])]
+ a['customers'] += 1
+ a['revenue'] += v['rev']
+ total_rev = sum(a['revenue'] for a in agg.values()) or 1.0
+ total_n = sum(a['customers'] for a in agg.values()) or 1
+ rows = []
+ for name, _ in TIERS:
+ a = agg[name]
+ a['rev_share'] = a['revenue'] / total_rev * 100
+ a['cust_share'] = a['customers'] / total_n * 100
+ a['avg_rev'] = a['revenue'] / a['customers'] if a['customers'] else 0.0
+ rows.append(a)
+ return rows
+
+
+def tier_customers(tier, t=None, team_id=None, agent_pids=None):
+ """The customers in ONE LTM value tier — each with LTM revenue, order count, units bought and
+ average order value — for the Value-tiers drill. Tier membership matches segments() exactly
+ (same LTM window + _tier)."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ cust = _cust_rev(lf, lt, team_id, agent_pids)
+ pids = [pid for pid, v in cust.items() if _tier(v['rev']) == tier]
+ if not pids:
+ return []
+ units = {}
+ for r in O.read_group('sale.order.line', O.sale_line_domain(lf, lt, team_id, partner_ids=pids),
+ ['product_uom_qty:sum'], ['order_partner_id'], lazy=False):
+ pid = O.m2o_id(r.get('order_partner_id'))
+ if pid:
+ units[pid] = r.get('product_uom_qty') or 0.0
+ pdata = {p['id']: p for p in O.search_read('res.partner', [('id', 'in', pids)], ['city', 'state_id'])}
+ rows = []
+ for pid in pids:
+ v = cust[pid]
+ o = v.get('orders', 0)
+ p = pdata.get(pid, {})
+ rows.append({'pid': pid, 'customer': v['name'], 'city': p.get('city') or '(none)',
+ 'state': O.m2o_name(p.get('state_id')) or '(none)', 'agent': '(none)',
+ 'rev_ltm': v['rev'], 'orders': o, 'units': units.get(pid, 0.0),
+ 'aov': (v['rev'] / o) if o else 0.0})
+ rows.sort(key=lambda x: -x['rev_ltm'])
+ return rows
+
+
+# ----------------------------------------------------------- at-risk / win-back
+def at_risk(t=None, team_id=None, limit=30, min_prior=2000.0, agent_pids=None):
+ """Customers who bought materially last year but are down or gone this year, ranked by
+ dollars at risk (last − this). The win-back target list."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ rows = []
+ for pid, lv in last.items():
+ if lv['rev'] < min_prior:
+ continue
+ tv = this.get(pid, {'rev': 0.0})
+ down = lv['rev'] - tv['rev']
+ if down <= 0:
+ continue
+ rows.append({'pid': pid, 'customer': lv['name'], 'rev_ly': lv['rev'], 'rev_ytd': tv['rev'],
+ 'orders': tv.get('orders', 0), 'at_risk': down,
+ 'status': 'Lost' if pid not in this else 'Declining'})
+ rows.sort(key=lambda x: -x['at_risk'])
+ return rows[:limit]
+
+
+def _first_order_dates(team_id=None, t=None, agent_pids=None):
+ """{pid: first-ever confirmed order date (ISO)} — one all-history read_group(min)."""
+ t = t or P.today()
+ g = O.read_group('sale.order', sales_mod.order_domain('2000-01-01', t.isoformat(), team_id, partner_ids=agent_pids),
+ ['date_order:min'], ['partner_id'], lazy=False)
+ out = {}
+ for r in g:
+ pid = O.m2o_id(r.get('partner_id'))
+ if pid and r.get('date_order'):
+ out[pid] = str(r['date_order'])[:10]
+ return out
+
+
+def new_customers(t=None, team_id=None, limit=30, agent_pids=None):
+ """Customers acquired or reactivated this year (active this YTD, not in same-period LY), each
+ tagged New (first-ever order this year) vs Reactivated (ordered in a prior year, had lapsed)."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ cand = [pid for pid in this if pid not in last]
+ firsts = _first_order_dates(team_id, t, agent_pids) if cand else {}
+ rows = []
+ for pid in cand:
+ v = this[pid]
+ first = firsts.get(pid, '')
+ status = 'New' if first[:4] == str(t.year) else 'Reactivated'
+ rows.append({'pid': pid, 'customer': v['name'], 'rev_ytd': v['rev'], 'orders': v['orders'],
+ 'first_order': first, 'status': status})
+ rows.sort(key=lambda x: -x['rev_ytd'])
+ return rows[:limit]
+
+
+def lists_bundle(t=None, team_id=None, agent_pids=None):
+ """At-risk, New/reactivated and Follow-up lists, all enriched with a CONSISTENT insight column
+ set — YTD $, YoY %, orders, last order, days overdue vs the customer's own cadence, agent —
+ plus each list's own metric (at-risk $ / status / est. missed $)."""
+ t = t or P.today()
+ cad = _cadence_bulk(t, team_id, agent_pids=agent_pids)
+ ar = at_risk(t, team_id, agent_pids=agent_pids)
+ nw = new_customers(t, team_id, agent_pids=agent_pids)
+ fu = contact_recommendations(t, team_id, agent_pids=agent_pids)
+ pids = {r['pid'] for r in ar} | {r['pid'] for r in nw} | {r['pid'] for r in fu}
+ attrs = _partner_attrs(list(pids))
+
+ def enrich(rows):
+ for r in rows:
+ c = cad.get(r['pid'], {})
+ r['last_order'] = r.get('last_order') or c.get('last_order', '')
+ r['overdue_days'] = c.get('overdue_days')
+ r['agent'] = (attrs.get(r['pid']) or {}).get('agent', '(none)')
+ if 'rev_ytd' not in r and 'ltm_rev' in r:
+ r['rev_ytd'] = r['ltm_rev']
+ if 'yoy_pct' not in r:
+ r['yoy_pct'] = P.yoy_pct(r.get('rev_ytd', 0.0), r.get('rev_ly', 0.0))
+ return rows
+ return {'at_risk': enrich(ar), 'new': enrich(nw), 'followups': enrich(fu)}
+
+
+def _cadence_bulk(t=None, team_id=None, months=24, agent_pids=None):
+ """{pid: {n_orders, last_order, typical_gap_days, days_since, overdue_days, aov}} from ONE
+ read_group over the window (count + min/max date + revenue per partner). Bulk approximation of
+ per-customer cadence — the basis for the follow-up list and the lists' cadence columns."""
+ t = t or P.today()
+ months = max(1, months)
+ start = dt.date(t.year - (months // 12) - (1 if t.month <= (months % 12) else 0),
+ ((t.month - 1 - (months % 12)) % 12) + 1, 1)
+ g = O.read_group('sale.order', sales_mod.order_domain(start.isoformat(), t.isoformat(), team_id, partner_ids=agent_pids),
+ ['amount_untaxed:sum', 'mind:min(date_order)', 'maxd:max(date_order)'],
+ ['partner_id'], lazy=False)
+ out = {}
+ for r in g:
+ pid = O.m2o_id(r.get('partner_id'))
+ if not pid:
+ continue
+ n = r.get('__count') or 0
+ rev = r.get('amount_untaxed') or 0.0
+ try:
+ dmin = dt.date.fromisoformat(str(r.get('mind'))[:10])
+ dmax = dt.date.fromisoformat(str(r.get('maxd'))[:10])
+ except (TypeError, ValueError):
+ continue
+ span = (dmax - dmin).days
+ gap = (span / (n - 1)) if n >= 2 and span > 0 else None
+ days_since = (t - dmax).days
+ overdue = (days_since - gap) if gap else None
+ out[pid] = {'n_orders': n, 'last_order': dmax.isoformat(), 'typical_gap_days': gap,
+ 'days_since': days_since, 'overdue_days': overdue, 'aov': (rev / n) if n else 0.0}
+ return out
+
+
+def contact_recommendations(t=None, team_id=None, limit=40, months=24, agent_pids=None):
+ """Prioritised follow-up list: customers overdue against their OWN purchase cadence, ranked by
+ estimated missed revenue (how far past due × their average order value). Reps' call list."""
+ t = t or P.today()
+ cad = _cadence_bulk(t, team_id, months, agent_pids=agent_pids)
+ attrs = _partner_attrs(list(cad))
+ names = {}
+ # names from the LTM revenue map (cheap, already scoped)
+ lf, lt = P.ltm(t)
+ rev_map = _cust_rev(lf, lt, team_id, agent_pids)
+ rows = []
+ for pid, c in cad.items():
+ gap = c['typical_gap_days']
+ if c['n_orders'] < 3 or not gap or gap <= 0:
+ continue # need a real, repeated cadence
+ overdue = c['overdue_days']
+ if overdue is None or overdue <= 0:
+ continue # only those past due
+ if c['days_since'] > 365:
+ continue # long-dead → not a cadence follow-up
+ ltm_rev = rev_map.get(pid, {}).get('rev', 0.0)
+ cycles_missed = overdue / gap # how many reorder cycles past due
+ # cap at 3 cycles so a long-churned account (belongs in win-back) doesn't dominate the
+ # "call them now" list; this rewards valuable regulars who are RECENTLY due.
+ est_missed = min(cycles_missed, 3.0) * c['aov']
+ rows.append({
+ 'pid': pid, 'customer': rev_map.get(pid, {}).get('name', '?'),
+ 'last_order': c['last_order'], 'typical_gap_days': gap, 'overdue_days': overdue,
+ 'ltm_rev': ltm_rev, 'orders': c['n_orders'], 'est_missed': est_missed,
+ 'agent': (attrs.get(pid) or {}).get('agent', '(none)'),
+ })
+ rows.sort(key=lambda x: -x['est_missed'])
+ return rows[:limit]
+
+
+# ====================================================================== EXPLORER
+# Granular (per-customer drill-down) + sum-level (filter/group by city, state, etc).
+# All revenue is order-level (sale.order, amount_untaxed) in the same RI+FFS scope as the
+# rest of Sales, so every rollup sums back to the headline number (proven in validate()).
+
+# Group-by dimensions for the sum-level rollups (key → display label).
+DIMENSIONS = {
+ 'city': 'City', 'state': 'State / Region', 'country': 'Country',
+ 'agent': 'Agent', 'segment': 'Value tier',
+}
+
+
+def _partner_attrs(pids):
+ """{pid: {city, state, country, agent, zip, payment_terms, customer_since, tags, pricelist}}
+ — the customer attributes the sum-level rollups slice by and the Customer table displays.
+
+ Agent is res.partner.agent_ids (the assigned sales agent; ~one per customer), NOT Odoo's
+ user_id 'salesperson' — MEASURED 2026-07-27 at 26 of 1,548 (2%), which is why agent_ids has
+ always been the field here. Odoo's `credit_limit` is not read for the same reason: 20 of
+ 1,548 (1%). Credit EXPOSURE comes from AR (modules/collections.py), not from that field.
+
+ Every value collapses to '(none)' when blank (MECE), so a group-by has no null bucket and a
+ filter has something to match. ⚠ `zip` is TEXT, never numeric: postal codes carry leading
+ zeros, and 01730 read as a number is 1730 — a different town.
+ """
+ pids = list(pids)
+ if not pids:
+ return {}
+ rows = O.search_read('res.partner', [('id', 'in', pids)],
+ ['city', 'state_id', 'country_id', 'agent_ids', 'zip',
+ 'property_payment_term_id', 'create_date', 'category_id',
+ 'property_product_pricelist'])
+ aids = {a for r in rows for a in (r.get('agent_ids') or [])}
+ anames = ({p['id']: p['name'] for p in O.search_read('res.partner', [('id', 'in', list(aids))], ['name'])}
+ if aids else {})
+ # Tags are m2m: ids on the partner, names in res.partner.category. One extra read for the
+ # whole set rather than one per customer.
+ tids = {t for r in rows for t in (r.get('category_id') or [])}
+ tnames = ({c['id']: c['name'] for c in
+ O.search_read('res.partner.category', [('id', 'in', list(tids))], ['name'])}
+ if tids else {})
+ out = {}
+ for r in rows:
+ ag = r.get('agent_ids') or []
+ city = (r.get('city') or '').strip()
+ tags = [tnames.get(t) for t in (r.get('category_id') or []) if tnames.get(t)]
+ # create_date is a DATETIME ('2024-01-15 10:23:45'); the column is a DATE, and the grid
+ # compares dates ISO-LEXICALLY, so a trailing time would sort and filter as text noise.
+ since = (r.get('create_date') or '')
+ out[r['id']] = {
+ 'city': city.title() if city else '(none)',
+ 'state': O.m2o_name(r.get('state_id')) or '(none)',
+ 'country': O.m2o_name(r.get('country_id')) or '(none)',
+ 'agent': (anames.get(ag[0]) or '(none)') if ag else '(none)',
+ 'zip': (r.get('zip') or '').strip() or '(none)',
+ 'payment_terms': O.m2o_name(r.get('property_payment_term_id')) or '(none)',
+ 'customer_since': str(since)[:10] if since else '',
+ # The FULL datetime, for the grid's `created_time` field type (wave-5 item 11) —
+ # customer_since above stays the DATE the date-typed column sorts/filters on.
+ 'created_at': str(since) if since else '',
+ 'tags': ', '.join(tags) if tags else '(none)',
+ 'pricelist': O.m2o_name(r.get('property_product_pricelist')) or '(none)',
+ }
+ return out
+
+
+def _attach_attrs(rows, key='pid'):
+ """Enrich a list of customer rows (each carrying a partner id under `key`) in place with the
+ standardized city / state / agent fields — so every customer list (page or drawer) can show the
+ same filters/columns. Returns the same list."""
+ pids = [r[key] for r in rows if r.get(key) is not None]
+ if not pids:
+ return rows
+ attrs = _partner_attrs(pids)
+ for r in rows:
+ a = attrs.get(r.get(key), {})
+ r.setdefault('city', a.get('city', '(none)'))
+ r.setdefault('state', a.get('state', '(none)'))
+ r.setdefault('agent', a.get('agent', '(none)'))
+ return rows
+
+
+def _last_order_dates(date_from, date_to, team_id=None, agent_pids=None):
+ """{pid: last order date (ISO)} within the window — for the directory's recency column."""
+ if USE_STORE:
+ try:
+ rows = _cust_group_store(date_from, date_to, team_id, agent_pids,
+ 'max(date_order)')
+ return {r[0]: str(r[2])[:10] for r in rows if r[0] and r[2]}
+ except Exception:
+ pass
+ g = O.read_group('sale.order', sales_mod.order_domain(date_from, date_to, team_id, partner_ids=agent_pids),
+ ['date_order:max'], ['partner_id'], lazy=False)
+ out = {}
+ for r in g:
+ pid = O.m2o_id(r.get('partner_id'))
+ if pid and r.get('date_order'):
+ out[pid] = str(r['date_order'])[:10]
+ return out
+
+
+def directory(t=None, team_id=None, limit=None, agent_pids=None):
+ """Per-customer table (YTD): revenue, YoY, orders, AOV, last order, city/state/salesperson.
+ Basis for the drill-down picker and (indirectly) the rollups. Sorted by revenue desc."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ attrs = _partner_attrs(set(this) | set(last))
+ lastord = _last_order_dates(yf, yt, team_id, agent_pids)
+ rows = []
+ for pid, v in this.items():
+ a = attrs.get(pid, {})
+ rev, orders = v['rev'], v['orders']
+ ly = last.get(pid, {}).get('rev', 0.0)
+ rows.append({
+ 'pid': pid, 'customer': v['name'],
+ 'revenue': rev, 'revenue_ly': ly, 'yoy_pct': P.yoy_pct(rev, ly),
+ 'orders': orders, 'aov': (rev / orders) if orders else 0.0,
+ 'last_order': lastord.get(pid, ''),
+ 'city': a.get('city', '(none)'), 'state': a.get('state', '(none)'),
+ 'agent': a.get('agent', '(none)'),
+ })
+ rows.sort(key=lambda x: -x['revenue'])
+ return rows[:limit] if limit else rows
+
+
+def by_dimension(dim, t=None, team_id=None, agent_pids=None):
+ """Sum-level rollup: YTD revenue (vs LY) grouped by a customer attribute. dim is a key of
+ DIMENSIONS. MECE — each active customer lands in exactly one group, so Σ(groups) == total
+ YTD revenue (verified in validate()). When consolidated (team_id=None) each group also
+ carries its Fisch + Royal revenue, mirroring the HQ rollup down to each brand. Sorted desc."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ attrs = _partner_attrs(set(this) | set(last))
+ split = team_id is None
+ f_rev = _cust_rev(yf, yt, 5, agent_pids) if split else {}
+ r_rev = _cust_rev(yf, yt, 6, agent_pids) if split else {}
+
+ def keyfor(pid, rev):
+ if dim == 'segment':
+ return _tier(rev)
+ return (attrs.get(pid) or {}).get(dim) or '(none)'
+
+ agg = {}
+
+ def bucket(k):
+ return agg.setdefault(k, {'group': k, 'revenue': 0.0, 'revenue_ly': 0.0,
+ 'fisch': 0.0, 'royal': 0.0, 'customers': 0, 'orders': 0})
+ for pid, v in this.items():
+ d = bucket(keyfor(pid, v['rev']))
+ d['revenue'] += v['rev']; d['customers'] += 1; d['orders'] += v['orders']
+ if split:
+ d['fisch'] += f_rev.get(pid, {}).get('rev', 0.0)
+ d['royal'] += r_rev.get(pid, {}).get('rev', 0.0)
+ for pid, v in last.items():
+ bucket(keyfor(pid, v['rev']))['revenue_ly'] += v['rev']
+ rows = list(agg.values())
+ for d in rows:
+ d['yoy_pct'] = P.yoy_pct(d['revenue'], d['revenue_ly'])
+ d['avg_per_customer'] = d['revenue'] / d['customers'] if d['customers'] else 0.0
+ rows.sort(key=lambda x: -x['revenue'])
+ return rows
+
+
+def _order_dom(pid, date_from, date_to, team_id=None):
+ return sales_mod.order_domain(date_from, date_to, team_id) + [('partner_id', '=', pid)]
+
+
+def _line_dom(pid, date_from, date_to, team_id=None):
+ return O.sale_line_domain(date_from, date_to, team_id, extra=[('order_partner_id', '=', pid)])
+
+
+def _monthly_rev(pid, date_from, date_to, team_id=None):
+ """{'YYYY-MM': revenue} over a window via ONE month-grouped read_group (was 26 point queries)."""
+ g = O.read_group('sale.order', _order_dom(pid, date_from, date_to, team_id),
+ ['amount_untaxed:sum'], ['date_order:month'], lazy=False)
+ out = {}
+ for r in g:
+ rng = (r.get('__range') or {}).get('date_order:month') or {}
+ ym = (rng.get('from') or '')[:7]
+ if ym:
+ out[ym] = r.get('amount_untaxed') or 0.0
+ return out
+
+
+def customer_detail(pid, t=None, team_id=None, n_months=13, top=12):
+ """Granular drill-down for one customer: profile, RFM-style KPIs, monthly YoY trend, top SKUs +
+ categories bought (LTM, with margin), and recent orders. The ~14 independent Odoo reads run
+ CONCURRENTLY (O.parallel_map) so a cold drawer loads in ~1-2s instead of ~6s."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ mf, mt = P.ltm(t)
+ range_start = dt.date(t.year - 2, t.month, 1).isoformat()
+ # Fisch/Royal mix only when consolidated (team_id=None). When a single BU is selected we never
+ # compute or expose the other BU — strict isolation for per-BU permissioning.
+ split = team_id is None
+ r = O.parallel_map({
+ 'prof': lambda: O.search_read('res.partner', [('id', '=', pid)], ['name', 'email', 'phone']),
+ 'attrs': lambda: _partner_attrs([pid]),
+ 'ytd_rev': lambda: O.sum_field('sale.order', _order_dom(pid, yf, yt, team_id), 'amount_untaxed'),
+ 'ytd_rev_ly': lambda: O.sum_field('sale.order', _order_dom(pid, lf, lt, team_id), 'amount_untaxed'),
+ 'ytd_fisch': (lambda: O.sum_field('sale.order', _order_dom(pid, yf, yt, 5), 'amount_untaxed')) if split else (lambda: None),
+ 'ytd_royal': (lambda: O.sum_field('sale.order', _order_dom(pid, yf, yt, 6), 'amount_untaxed')) if split else (lambda: None),
+ 'ltm_rev': lambda: O.sum_field('sale.order', _order_dom(pid, mf, mt, team_id), 'amount_untaxed'),
+ 'orders_ltm': lambda: O.get_odoo().search_count('sale.order', _order_dom(pid, mf, mt, team_id)),
+ 'orders_ytd': lambda: O.get_odoo().search_count('sale.order', _order_dom(pid, yf, yt, team_id)),
+ 'lastrow': lambda: O.search_read('sale.order', _order_dom(pid, None, None, team_id), ['date_order'], order='date_order desc', limit=1),
+ 'firstrow': lambda: O.search_read('sale.order', _order_dom(pid, None, None, team_id), ['date_order'], order='date_order asc', limit=1),
+ 'mrev': lambda: _monthly_rev(pid, range_start, t.isoformat(), team_id),
+ 'lg': lambda: O.read_group('sale.order.line', _line_dom(pid, mf, mt, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'], ['product_id'], lazy=False),
+ 'recent': lambda: O.search_read('sale.order', _order_dom(pid, None, None, team_id),
+ ['name', 'date_order', 'amount_untaxed', 'state'], order='date_order desc', limit=10),
+ })
+ prof = (r['prof'] or [{}])[0]
+ a = r['attrs'].get(pid, {})
+ ytd_rev, ytd_rev_ly, ltm_rev = r['ytd_rev'], r['ytd_rev_ly'], r['ltm_rev']
+ ytd_fisch, ytd_royal = r['ytd_fisch'], r['ytd_royal']
+ orders_ltm, orders_ytd = r['orders_ltm'], r['orders_ytd']
+ last_order = str(r['lastrow'][0]['date_order'])[:10] if r['lastrow'] else None
+ first_order = str(r['firstrow'][0]['date_order'])[:10] if r['firstrow'] else None
+ recency = (t - dt.date.fromisoformat(last_order)).days if last_order else None
+
+ mrev = r['mrev']
+ monthly = []
+ for ym, start, end in P.month_starts(n_months, t):
+ y, m = int(ym[:4]) - 1, int(ym[5:7])
+ monthly.append({'month': ym, 'revenue': mrev.get(ym, 0.0),
+ 'revenue_ly': mrev.get(f'{y:04d}-{m:02d}', 0.0)})
+
+ lg = r['lg']
+ skus = [{'product': O.m2o_name(x.get('product_id')), 'revenue': x.get('price_subtotal') or 0.0,
+ 'qty': x.get('product_uom_qty') or 0.0, 'margin': x.get('margin') or 0.0}
+ for x in lg if x.get('product_id')]
+ skus.sort(key=lambda x: -x['revenue'])
+ line_rev = sum(s['revenue'] for s in skus)
+ margin = sum(s['margin'] for s in skus)
+
+ cat = sales_mod._product_cat()
+ catagg = {}
+ for x in lg:
+ prodid = O.m2o_id(x.get('product_id'))
+ if not prodid:
+ continue
+ c = cat.get(prodid, '(uncategorized)')
+ catagg[c] = catagg.get(c, 0.0) + (x.get('price_subtotal') or 0.0)
+ cats = sorted([{'category': k, 'revenue': v} for k, v in catagg.items()],
+ key=lambda x: -x['revenue'])[:10]
+
+ recent_rows = [{'order': x.get('name'), 'date': str(x.get('date_order'))[:10],
+ 'amount': x.get('amount_untaxed') or 0.0,
+ 'status': 'Confirmed' if x.get('state') in ('sale', 'done') else x.get('state')}
+ for x in r['recent']]
+
+ return {
+ 'pid': pid, 'name': prof.get('name') or '(unknown)',
+ 'city': a.get('city', '(none)'), 'state': a.get('state', '(none)'),
+ 'country': a.get('country', '(none)'), 'agent': a.get('agent', '(none)'),
+ 'email': prof.get('email') or '', 'phone': prof.get('phone') or '',
+ 'ytd_rev': ytd_rev, 'ytd_rev_ly': ytd_rev_ly, 'yoy_pct': P.yoy_pct(ytd_rev, ytd_rev_ly),
+ 'ytd_fisch': ytd_fisch, 'ytd_royal': ytd_royal,
+ 'ltm_rev': ltm_rev, 'orders_ytd': orders_ytd, 'orders_ltm': orders_ltm,
+ 'aov_ltm': (ltm_rev / orders_ltm) if orders_ltm else 0.0,
+ 'first_order': first_order, 'last_order': last_order, 'recency_days': recency,
+ 'ltm_margin': margin, 'ltm_gm_pct': (margin / line_rev * 100) if line_rev else 0.0,
+ 'monthly': monthly, 'top_skus': skus[:top], 'top_categories': cats,
+ 'recent_orders': recent_rows,
+ }
+
+
+def customer_drawer_bundle(pid, t=None, team_id=None):
+ """Everything the customer drawer's first paint needs, in as few round-trips as possible:
+ customer_detail (itself parallel) then the other three pulls CONCURRENTLY. One cached unit, so
+ switching drawer sections never re-hits Odoo. customer_affinity (the look-alike co-buyer scan —
+ 3 dependent heavy reads, 4-8s) and customer_stockout stay LAZY, loaded only by their own
+ sections, so a cold drawer opens in ~2-3s regardless of how big the customer is."""
+ detail = customer_detail(pid, t=t, team_id=team_id)
+ decomp, winback, cadence = O.parallel([
+ lambda: customer_yoy_decomp(pid, t, team_id),
+ lambda: customer_winback(pid, t, team_id),
+ lambda: customer_cadence(pid, t, team_id),
+ ])
+ return {'detail': detail, 'decomp': decomp, 'winback': winback, 'cadence': cadence}
+
+
+def customer_stockout(pid, t=None, team_id=None, top=25):
+ """Stockout exposure for one customer: of the SKUs they buy, which are currently OUT / LOW on
+ hand, and how much of their YoY $ decline sits on SKUs that are now out of stock (a likely
+ stockout-driven loss) vs other causes. On-hand is a CURRENT snapshot (no historical stock), so
+ 'decline on a now-out SKU' is a strong proxy, not proof, of a stockout cause."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+
+ def skumap(df, dtt):
+ # storable goods only — services (delivery charges etc.) can't "stock out"
+ dom = O.sale_line_domain(df, dtt, team_id, extra=[('order_partner_id', '=', pid),
+ ('product_id.type', '!=', 'service')])
+ g = O.read_group('sale.order.line', dom,
+ ['price_subtotal:sum', 'product_uom_qty:sum'], ['product_id'], lazy=False)
+ return {O.m2o_id(r['product_id']): {'name': O.m2o_name(r.get('product_id')),
+ 'rev': r.get('price_subtotal') or 0.0, 'qty': r.get('product_uom_qty') or 0.0}
+ for r in g if r.get('product_id')}
+ this, last = skumap(yf, yt), skumap(lf, lt)
+ pids = list(set(this) | set(last))
+ empty = {'rows': [], 'n_out': 0, 'n_low': 0, 'rev_at_risk': 0.0, 'risk_pct': 0.0,
+ 'drop_stockout': 0.0, 'drop_other': 0.0, 'total_drop': 0.0}
+ if not pids:
+ return empty
+ q = O.read_group('stock.quant', [('location_id.usage', '=', 'internal'), ('product_id', 'in', pids)],
+ ['quantity:sum'], ['product_id'], lazy=False)
+ onhand = {O.m2o_id(r['product_id']): (r.get('quantity') or 0.0) for r in q if r.get('product_id')}
+ codemap = {}
+ for pr in O.search_read('product.product', [('id', 'in', pids)], ['default_code']):
+ codemap[pr['id']] = str(pr['default_code']).strip() if pr.get('default_code') else None
+ rows, drop_stockout, drop_other = [], 0.0, 0.0
+ for p in pids:
+ tr = this.get(p, {}).get('rev', 0.0)
+ lr = last.get(p, {}).get('rev', 0.0)
+ oh = onhand.get(p, 0.0)
+ ly_qty = last.get(p, {}).get('qty', 0.0)
+ out = oh <= 0
+ low = (not out) and oh < max(1.0, ly_qty * 0.25) # under ~a quarter of their annual usage
+ change = tr - lr
+ rows.append({'sku': (this.get(p) or last.get(p) or {}).get('name', '?'), 'code': codemap.get(p),
+ 'on_hand': oh, 'ly_rev': lr, 'ytd_rev': tr, 'change': change,
+ 'status': 'OUT' if out else ('LOW' if low else 'OK')})
+ if change < 0:
+ if out:
+ drop_stockout += -change
+ else:
+ drop_other += -change
+ rows.sort(key=lambda r: ({'OUT': 0, 'LOW': 1, 'OK': 2}[r['status']], -r['ly_rev']))
+ this_total = sum(v['rev'] for v in this.values()) or 1.0
+ rev_at_risk = sum(r['ytd_rev'] for r in rows if r['status'] in ('OUT', 'LOW'))
+ return {'rows': rows[:top], 'n_out': sum(1 for r in rows if r['status'] == 'OUT'),
+ 'n_low': sum(1 for r in rows if r['status'] == 'LOW'),
+ 'rev_at_risk': rev_at_risk, 'risk_pct': rev_at_risk / this_total * 100,
+ 'drop_stockout': drop_stockout, 'drop_other': drop_other,
+ 'total_drop': drop_stockout + drop_other}
+
+
+# ====================================================================== ADVANCED FILTERS
+# "Find customers who bought X" — resolve a SKU query / category to the set of partner ids that
+# purchased it, so the directory can be filtered by purchase behaviour (not just attributes).
+
+def _buyer_window(t):
+ """24-month look-back for 'who bought this' — catches recent AND lapsed buyers (win-back)."""
+ t = t or P.today()
+ return (t - dt.timedelta(days=730)).isoformat(), t.isoformat()
+
+
+def sku_buyers(query, t=None, team_id=None):
+ """Set of partner ids who bought any SKU whose code/name matches `query` (last 24 months).
+ Returns None when the query is blank (= no filter)."""
+ q = (query or '').strip()
+ # A 1-char ilike matches half the catalogue — treat it as "still typing" (no filter yet).
+ if len(q) < 2:
+ return None
+ df, dtt = _buyer_window(t)
+ prods = O.search_read('product.product', ['|', ('default_code', 'ilike', q), ('name', 'ilike', q)],
+ ['id'], limit=3000)
+ pids = [p['id'] for p in prods]
+ if not pids:
+ return set()
+ g = O.read_group('sale.order.line',
+ O.sale_line_domain(df, dtt, team_id, extra=[('product_id', 'in', pids)]),
+ ['order_partner_id'], ['order_partner_id'], lazy=False)
+ return {O.m2o_id(r.get('order_partner_id')) for r in g if r.get('order_partner_id')}
+
+
+def category_buyers(category, t=None, team_id=None):
+ """Set of partner ids who bought from a main category (last 24 months). None = no filter."""
+ if not category or category == '(any)':
+ return None
+ df, dtt = _buyer_window(t)
+ catmap = sales_mod._product_cat()
+ prod_ids = [pid for pid, c in catmap.items() if c == category]
+ if not prod_ids:
+ return set()
+ g = O.read_group('sale.order.line',
+ O.sale_line_domain(df, dtt, team_id, extra=[('product_id', 'in', prod_ids)]),
+ ['order_partner_id'], ['order_partner_id'], lazy=False)
+ return {O.m2o_id(r.get('order_partner_id')) for r in g if r.get('order_partner_id')}
+
+
+def main_categories():
+ """Sorted list of main category names (for the 'bought in category' selector)."""
+ return sorted(set(sales_mod._product_cat().values()))
+
+
+# ====================================================================== WIN-BACK / SKU MOVES
+def customer_winback(pid, t=None, team_id=None, top=10):
+ """SKU-level YoY moves for one customer (this YTD vs same period last year):
+ losers — SKUs down YoY, each with its share of the customer's TOTAL gross loss (pct_of_loss)
+ gainers — SKUs up YoY (bought more)
+ lapsed — losers gone to zero this year (the re-pitch hooks)
+ lapsed_categories — category-level gaps
+ total_loss / this_total / last_total / net_change
+ 'change' is signed (this − last); negative = decline so the UI tints it red."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+
+ def sku_map(df, dtt):
+ g = O.read_group('sale.order.line', _line_dom(pid, df, dtt, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum'], ['product_id'], lazy=False)
+ return {O.m2o_id(r['product_id']): {'name': O.m2o_name(r.get('product_id')),
+ 'rev': r.get('price_subtotal') or 0.0, 'qty': r.get('product_uom_qty') or 0.0}
+ for r in g if r.get('product_id')}
+
+ this, last = sku_map(yf, yt), sku_map(lf, lt)
+ # product_id -> SKU code, so each row can deep-link to its SKU drawer (code is how the SKU
+ # views key products; merged-by-code duplicates resolve to the same drawer)
+ pids = list(set(this) | set(last))
+ codemap = {}
+ if pids:
+ for pr in O.search_read('product.product', [('id', 'in', pids)], ['default_code']):
+ codemap[pr['id']] = str(pr['default_code']).strip() if pr.get('default_code') else None
+ rows = []
+ for p in (set(this) | set(last)):
+ tv, lv = (this.get(p) or {}), (last.get(p) or {})
+ tr, lr = tv.get('rev', 0.0), lv.get('rev', 0.0)
+ tq, lq = tv.get('qty', 0.0), lv.get('qty', 0.0)
+ name = (this.get(p) or last.get(p) or {}).get('name') or '(?)'
+ p_ly = (lr / lq) if lq else None # realised $/unit last year
+ p_ytd = (tr / tq) if tq else None # realised $/unit this year
+ rows.append({'sku': name, 'code': codemap.get(p), 'ly_rev': lr, 'ytd_rev': tr,
+ 'change': tr - lr, 'qty_ly': lq, 'qty_ytd': tq, 'qty_change': tq - lq,
+ 'price_ly': p_ly, 'price_ytd': p_ytd,
+ 'price_chg_pct': (((p_ytd - p_ly) / p_ly * 100) if (p_ly and p_ytd) else None),
+ # split the $ change into volume vs price effects (sum to change)
+ 'vol_effect': ((tq - lq) * p_ly) if p_ly is not None else (tr - lr),
+ 'price_effect': ((p_ytd - p_ly) * tq) if (p_ly is not None and p_ytd is not None) else 0.0})
+ total_loss = sum(-r['change'] for r in rows if r['change'] < 0)
+ for r in rows:
+ r['pct_of_loss'] = (-r['change'] / total_loss * 100) if (r['change'] < 0 and total_loss) else 0.0
+ losers = sorted([r for r in rows if r['change'] < 0], key=lambda x: x['change'])
+ gainers = sorted([r for r in rows if r['change'] > 0], key=lambda x: -x['change'])
+ lapsed = [r for r in losers if r['ytd_rev'] == 0]
+
+ cat = sales_mod._product_cat()
+
+ def cat_rev(m):
+ agg = {}
+ for p, v in m.items():
+ agg[cat.get(p, '(uncategorized)')] = agg.get(cat.get(p, '(uncategorized)'), 0.0) + v['rev']
+ return agg
+ tcat, lcat = cat_rev(this), cat_rev(last)
+ lapsed_categories = sorted([{'category': c, 'ly_rev': lcat[c], 'ytd_rev': tcat.get(c, 0.0),
+ 'change': tcat.get(c, 0.0) - lcat[c]}
+ for c in lcat if lcat[c] > tcat.get(c, 0.0)],
+ key=lambda x: x['change'])
+ this_total = sum(v['rev'] for v in this.values())
+ last_total = sum(v['rev'] for v in last.values())
+ # 'all_skus' feeds the in-drawer SKU list; cap it so a mega-account doesn't ship thousands
+ # of rows to the browser (the list is searchable/filtered, top-by-revenue is what matters).
+ all_skus = sorted(rows, key=lambda x: -max(x['ytd_rev'], x['ly_rev']))[:500]
+ return {
+ 'losers': losers[:top], 'gainers': gainers[:top], 'lapsed': lapsed[:top],
+ 'lapsed_categories': lapsed_categories[:6], 'all_skus': all_skus, 'n_skus': len(rows),
+ 'n_lapsed': len(lapsed), 'n_losers': len(losers), 'n_gainers': len(gainers),
+ 'total_loss': total_loss, 'lost_dollars': total_loss,
+ 'this_total': this_total, 'last_total': last_total, 'net_change': this_total - last_total,
+ }
+
+
+def customer_yoy_decomp(pid, t=None, team_id=None):
+ """Decompose the customer's YoY sales change into a volume (order count) effect and a price
+ (basket size / AOV) effect. Identity: ΔSales = ΔOrders·AOV_last + Orders_this·ΔAOV."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this_sales = O.sum_field('sale.order', _order_dom(pid, yf, yt, team_id), 'amount_untaxed')
+ last_sales = O.sum_field('sale.order', _order_dom(pid, lf, lt, team_id), 'amount_untaxed')
+ this_orders = O.get_odoo().search_count('sale.order', _order_dom(pid, yf, yt, team_id))
+ last_orders = O.get_odoo().search_count('sale.order', _order_dom(pid, lf, lt, team_id))
+ this_aov = (this_sales / this_orders) if this_orders else 0.0
+ last_aov = (last_sales / last_orders) if last_orders else 0.0
+ volume_effect = (this_orders - last_orders) * last_aov
+ price_effect = this_orders * (this_aov - last_aov)
+ return {
+ 'this_sales': this_sales, 'last_sales': last_sales, 'd_sales': this_sales - last_sales,
+ 'sales_yoy_pct': P.yoy_pct(this_sales, last_sales),
+ 'this_orders': this_orders, 'last_orders': last_orders, 'd_orders': this_orders - last_orders,
+ 'this_aov': this_aov, 'last_aov': last_aov, 'd_aov': this_aov - last_aov,
+ 'aov_yoy_pct': P.yoy_pct(this_aov, last_aov),
+ 'volume_effect': volume_effect, 'price_effect': price_effect,
+ }
+
+
+def customer_affinity(pid, t=None, team_id=None, top=12, max_cobuyers=60):
+ """'Customers who buy similar products also buy …'. Finds the customers who bought this
+ customer's SKUs (co-buyers), then ranks the OTHER SKUs those co-buyers buy (that this customer
+ doesn't) by spend among them — a cross-sell list. LTM window + capped co-buyers to stay fast."""
+ df, dtt = P.ltm(t)
+ g = O.read_group('sale.order.line', _line_dom(pid, df, dtt, team_id),
+ ['price_subtotal:sum'], ['product_id'], lazy=False)
+ mine = {O.m2o_id(r['product_id']) for r in g if r.get('product_id')}
+ if not mine:
+ return {'recs': [], 'n_cobuyers': 0, 'mine': 0}
+ cg = O.read_group('sale.order.line',
+ O.sale_line_domain(df, dtt, team_id, extra=[('product_id', 'in', list(mine))]),
+ ['price_subtotal:sum'], ['order_partner_id'], lazy=False)
+ cobuyers = sorted([(O.m2o_id(r['order_partner_id']), r.get('price_subtotal') or 0.0)
+ for r in cg if r.get('order_partner_id') and O.m2o_id(r['order_partner_id']) != pid],
+ key=lambda x: -x[1])[:max_cobuyers]
+ cob_ids = [c[0] for c in cobuyers]
+ if not cob_ids:
+ return {'recs': [], 'n_cobuyers': 0, 'mine': len(mine)}
+ # Single groupby over the co-buyers' lines (one aggregated row per product) — fast.
+ pg = O.read_group('sale.order.line',
+ O.sale_line_domain(df, dtt, team_id, extra=[('order_partner_id', 'in', cob_ids)]),
+ ['price_subtotal:sum'], ['product_id'], lazy=False)
+ recs = sorted([{'sku': O.m2o_name(r['product_id']), 'pid': O.m2o_id(r['product_id']),
+ 'rev': r.get('price_subtotal') or 0.0, 'orders': r.get('__count') or 0}
+ for r in pg if r.get('product_id') and O.m2o_id(r['product_id']) not in mine],
+ key=lambda x: -x['rev'])[:top]
+ if recs:
+ codemap = {}
+ for pr in O.search_read('product.product', [('id', 'in', [r['pid'] for r in recs])], ['default_code']):
+ codemap[pr['id']] = str(pr['default_code']).strip() if pr.get('default_code') else None
+ for r in recs:
+ r['code'] = codemap.get(r['pid'])
+ return {'recs': recs, 'n_cobuyers': len(cob_ids), 'mine': len(mine)}
+
+
+# ====================================================================== CADENCE / CHURN / BENCHMARK
+def _order_dates(pid, team_id=None):
+ """Recent confirmed order dates (date objects), ascending. Capped at the 3000 most recent so a
+ very high-volume buyer can't hang the drawer — cadence/frequency only need recent orders."""
+ rows = O.search_read('sale.order', _order_dom(pid, None, None, team_id),
+ ['date_order'], order='date_order desc', limit=3000)
+ return sorted(dt.date.fromisoformat(str(r['date_order'])[:10]) for r in rows if r.get('date_order'))
+
+
+def customer_cadence(pid, t=None, team_id=None):
+ """Reorder rhythm from the gaps between orders: typical gap (median of recent), predicted next
+ order, days overdue vs that rhythm, and whether the rhythm is slowing (last-4 vs prior-4 gap)."""
+ t = t or P.today()
+ dates = _order_dates(pid, team_id)
+ n = len(dates)
+ out = {'n_orders': n, 'median_gap_days': None, 'last_order': dates[-1].isoformat() if dates else None,
+ 'predicted_next': None, 'overdue_days': None, 'drift_pct': None,
+ 'recent_gap': None, 'prior_gap': None, 'dates': [d.isoformat() for d in dates]}
+ if n < 2:
+ return out
+ gaps = [(dates[i] - dates[i - 1]).days for i in range(1, n)]
+ median_gap = statistics.median(gaps[-8:])
+ last = dates[-1]
+ predicted = last + dt.timedelta(days=round(median_gap))
+ recent_gap = statistics.mean(gaps[-4:]) if len(gaps) >= 4 else statistics.mean(gaps)
+ prior_gap = statistics.mean(gaps[-8:-4]) if len(gaps) >= 8 else None
+ out.update({'median_gap_days': median_gap, 'predicted_next': predicted.isoformat(),
+ 'overdue_days': (t - predicted).days, 'recent_gap': recent_gap, 'prior_gap': prior_gap,
+ 'drift_pct': ((recent_gap - prior_gap) / prior_gap * 100) if prior_gap else None})
+ return out
+
+
+def customer_churn_score(pid, t=None, team_id=None, cad=None, sales_yoy=None):
+ """0–100 churn-risk score (higher = more at risk): overdue-vs-cadence (50%) + frequency decay
+ last-90 vs prior-90 (30%) + YoY sales trend (20%). Bucketed Healthy/Watch/At-risk/Critical."""
+ t = t or P.today()
+ cad = cad or customer_cadence(pid, t, team_id)
+ mg = cad.get('median_gap_days')
+ if mg and cad.get('overdue_days') is not None:
+ s_overdue = min(1.0, max(0.0, cad['overdue_days'] / mg) / 2.0) # 2 cycles late = max
+ else:
+ s_overdue = 0.5
+ dates = [dt.date.fromisoformat(d) for d in cad.get('dates', [])]
+ last90 = sum(1 for d in dates if (t - d).days <= 90)
+ prior90 = sum(1 for d in dates if 90 < (t - d).days <= 180)
+ if prior90 == 0:
+ # recent activity but no 90–180d baseline (reactivated / new) → cautious mid risk, not zero
+ s_freq = 0.6 if last90 == 0 else 0.3
+ else:
+ s_freq = min(1.0, max(0.0, (prior90 - last90) / prior90))
+ if sales_yoy is None:
+ sales_yoy = customer_yoy_decomp(pid, t, team_id)['sales_yoy_pct']
+ s_yoy = 0.5 if sales_yoy is None else min(1.0, max(0.0, -sales_yoy / 50.0)) # -50% YoY = max
+ score = 100 * (0.5 * s_overdue + 0.3 * s_freq + 0.2 * s_yoy)
+ bucket = ('Critical' if score >= 70 else 'At-risk' if score >= 45
+ else 'Watch' if score >= 25 else 'Healthy')
+ driver = max([('overdue rhythm', s_overdue), ('fewer recent orders', s_freq),
+ ('falling spend', s_yoy)], key=lambda x: x[1])[0]
+ return {'score': round(score), 'bucket': bucket, 'driver': driver}
+
+
+def _pctile(values, x):
+ """Percentile rank (0–100) of x within values — mean/midpoint method (ties count as half), so
+ the median of a peer set lands at the 50th percentile."""
+ if not values:
+ return None
+ below = sum(1 for v in values if v < x)
+ equal = sum(1 for v in values if v == x)
+ return (below + 0.5 * equal) / len(values) * 100
+
+
+def rank_contribution(directory_rows, pid):
+ """Rank by YTD revenue + % of BU YTD — pure, from the already-cached directory list."""
+ total = sum(r['revenue'] for r in directory_rows) or 1.0
+ ranked = sorted(directory_rows, key=lambda r: -r['revenue'])
+ rank = next((i + 1 for i, r in enumerate(ranked) if r['pid'] == pid), None)
+ me = next((r for r in directory_rows if r['pid'] == pid), None)
+ return {'rank': rank, 'n': len(directory_rows),
+ 'pct_of_bu': (me['revenue'] / total * 100) if me else None}
+
+
+def peer_benchmark(directory_rows, pid):
+ """Percentile rank vs same value-tier peers on revenue, AOV, frequency, YoY — pure."""
+ me = next((r for r in directory_rows if r['pid'] == pid), None)
+ if not me:
+ return None
+ tier = _tier(me['revenue'])
+ peers = [r for r in directory_rows if _tier(r['revenue']) == tier]
+ yoy_vals = [r['yoy_pct'] for r in peers if r['yoy_pct'] is not None]
+ return {'cohort_n': len(peers), 'tier': tier,
+ 'rev_pctile': _pctile([r['revenue'] for r in peers], me['revenue']),
+ 'aov_pctile': _pctile([r['aov'] for r in peers], me['aov']),
+ 'freq_pctile': _pctile([r['orders'] for r in peers], me['orders']),
+ 'yoy_pctile': (_pctile(yoy_vals, me['yoy_pct']) if me['yoy_pct'] is not None else None)}
+
+
+def customer_whitespace(mine_categories, company_categories, top=6):
+ """Pure: breadth (# categories bought / company total) + the biggest company categories this
+ customer buys $0 of, ranked by company revenue. `company_categories` = sales.by_category rows."""
+ skip = {'(uncategorized)', 'All'}
+ mine = {c for c in mine_categories if c not in skip}
+ cats = [c for c in company_categories if c['category'] not in skip and c['revenue'] > 0]
+ total = len(cats)
+ ws = sorted([c for c in cats if c['category'] not in mine], key=lambda x: -x['revenue'])[:top]
+ return {'breadth_x': len(mine), 'breadth_y': total, 'whitespace': ws}
+
+
+# ====================================================================== PAGE-LEVEL: NRR / MIGRATION
+def nrr(t=None, team_id=None, agent_pids=None):
+ """Net Revenue Retention from the revenue bridge (existing book only; new logos excluded)."""
+ b = revenue_bridge(t, team_id, agent_pids=agent_pids)
+ last = b['last_total'] or 1.0
+ ending = b['last_total'] + b['expansion']['rev'] + b['contraction']['rev'] + b['lost']['rev']
+ return {'nrr_pct': ending / last * 100, 'starting': b['last_total'],
+ 'expansion': b['expansion']['rev'], 'contraction': b['contraction']['rev'],
+ 'churned': b['lost']['rev'], 'ending_existing': ending, 'new': b['new']['rev']}
+
+
+def tier_migration(t=None, team_id=None, agent_pids=None):
+ """Value-tier flows LTM vs prior-LTM: upgraded / held / downgraded / new / lapsed + net $."""
+ lf, lt = P.ltm(t)
+ pf, pt = P.prior_ltm(t)
+ this = _cust_rev(lf, lt, team_id, agent_pids)
+ last = _cust_rev(pf, pt, team_id, agent_pids)
+ order = {name: i for i, (name, _) in enumerate(TIERS)} # 0 = Whale (top) … 3 = Small
+ flows = {k: {'flow': k, 'n': 0, 'net': 0.0} for k in
+ ['Upgraded', 'Held', 'Downgraded', 'New / reactivated', 'Lapsed']}
+ for pid in set(this) | set(last):
+ tr = this.get(pid, {}).get('rev', 0.0)
+ lr = last.get(pid, {}).get('rev', 0.0)
+ if pid in this and pid in last:
+ k = ('Upgraded' if order[_tier(tr)] < order[_tier(lr)]
+ else 'Downgraded' if order[_tier(tr)] > order[_tier(lr)] else 'Held')
+ elif pid in this:
+ k = 'New / reactivated'
+ else:
+ k = 'Lapsed'
+ flows[k]['n'] += 1
+ flows[k]['net'] += (tr - lr)
+ return {'flows': list(flows.values())}
+
+
+# ====================================================================== GROUP DRAWER (rollup → drawer)
+def group_detail(dim, value, t=None, team_id=None, n_months=13, top=15, agent_pids=None):
+ """For one rollup group (e.g. dim='city', value='Brooklyn'): KPIs, monthly trend, the customers
+ in the group (clickable), and the top SKUs sold there. dim is a DIMENSIONS key."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ attrs = _partner_attrs(set(this) | set(last))
+
+ def keyfor(pid):
+ if dim == 'segment':
+ return _tier(this.get(pid, {}).get('rev', last.get(pid, {}).get('rev', 0.0)))
+ return (attrs.get(pid) or {}).get(dim) or '(none)'
+ pids = [pid for pid in (set(this) | set(last)) if keyfor(pid) == value]
+ if not pids:
+ return None
+
+ # KPI totals and the customer list cover EVERY member of the group (cheap, in-memory).
+ rev_ytd = sum(this.get(p, {}).get('rev', 0.0) for p in pids)
+ rev_ly = sum(last.get(p, {}).get('rev', 0.0) for p in pids)
+ custs = sorted([{'pid': p, 'customer': (this.get(p) or last.get(p) or {}).get('name', '?'),
+ 'revenue': this.get(p, {}).get('rev', 0.0), 'orders': this.get(p, {}).get('orders', 0),
+ 'yoy_pct': P.yoy_pct(this.get(p, {}).get('rev', 0.0), last.get(p, {}).get('rev', 0.0)),
+ 'city': (attrs.get(p) or {}).get('city', '(none)'),
+ 'state': (attrs.get(p) or {}).get('state', '(none)'),
+ 'agent': (attrs.get(p) or {}).get('agent', '(none)')}
+ for p in pids], key=lambda x: -x['revenue'])
+
+ # The trend + top-SKU read_groups put every pid in an IN(...) clause, so a huge group
+ # (a big city, the '(none)' bucket) would build a slow, oversized query. Cap those two
+ # queries to the group's top buyers by revenue; KPIs/customer list above stay complete.
+ QCAP = 300
+ capped = len(pids) > QCAP
+ qpids = sorted(
+ pids, key=lambda p: -max(this.get(p, {}).get('rev', 0.0), last.get(p, {}).get('rev', 0.0))
+ )[:QCAP] if capped else pids
+
+ range_start = dt.date(t.year - 2, t.month, 1).isoformat()
+ g = O.read_group('sale.order',
+ sales_mod.order_domain(range_start, t.isoformat(), team_id) + [('partner_id', 'in', qpids)],
+ ['amount_untaxed:sum'], ['date_order:month'], lazy=False)
+ mrev = {}
+ for r in g:
+ rng = (r.get('__range') or {}).get('date_order:month') or {}
+ ym = (rng.get('from') or '')[:7]
+ if ym:
+ mrev[ym] = r.get('amount_untaxed') or 0.0
+ monthly = []
+ for ym, _s, _e in P.month_starts(n_months, t):
+ y, m = int(ym[:4]) - 1, int(ym[5:7])
+ monthly.append({'month': ym, 'revenue': mrev.get(ym, 0.0),
+ 'revenue_ly': mrev.get(f'{y:04d}-{m:02d}', 0.0)})
+
+ mf, mt = P.ltm(t)
+ lg = O.read_group('sale.order.line',
+ O.sale_line_domain(mf, mt, team_id, extra=[('order_partner_id', 'in', qpids)]),
+ ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'], ['product_id'], lazy=False)
+ skus = sorted([sales_mod._sku_profit(
+ {'product': O.m2o_name(r.get('product_id')), 'pid': O.m2o_id(r.get('product_id')),
+ 'rev': r.get('price_subtotal') or 0.0, 'revenue': r.get('price_subtotal') or 0.0,
+ 'qty': r.get('product_uom_qty') or 0.0,
+ 'margin': r.get('margin') or 0.0, 'lines': r.get('__count') or 0})
+ for r in lg if r.get('product_id')],
+ key=lambda x: -x['rev'])[:top]
+ if skus: # attach SKU code for deep-linking each to its SKU drawer
+ scode = {}
+ for pr in O.search_read('product.product', [('id', 'in', [s['pid'] for s in skus])], ['default_code']):
+ scode[pr['id']] = str(pr['default_code']).strip() if pr.get('default_code') else None
+ for s in skus:
+ s['code'] = scode.get(s['pid'])
+ return {'dim': dim, 'value': value, 'rev_ytd': rev_ytd, 'rev_ly': rev_ly,
+ 'yoy_pct': P.yoy_pct(rev_ytd, rev_ly), 'n_customers': len([p for p in pids if p in this]),
+ 'n_total': len(pids), 'monthly': monthly, 'top_skus': skus, 'customers': custs,
+ 'capped': capped, 'qcap': QCAP}
+
+
+# ----------------------------------------------------------- KPI-card customer sets
+_KPI_SETS = {
+ 'active': 'Active customers (YTD)', 'new': 'New / reactivated (YTD)',
+ 'lost': 'Lost customers (YTD)', 'retained': 'Retained customers (YTD)',
+ 'existing': 'Existing book (NRR base)',
+}
+
+
+def customer_set(kind, t=None, team_id=None, agent_pids=None):
+ """Standardized customer list behind a headline KPI card (Active / New / Lost / Retained /
+ Existing-book), each row carrying the same shape (pid, customer, rev_ytd, rev_ly, change,
+ yoy_pct, orders, city, state, agent) so the drawer renders them with one standardized view."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _cust_rev(yf, yt, team_id, agent_pids)
+ last = _cust_rev(lf, lt, team_id, agent_pids)
+ tset, lset = set(this), set(last)
+ ids = {'active': tset, 'new': tset - lset, 'lost': lset - tset,
+ 'retained': tset & lset, 'existing': lset}.get(kind, tset)
+ attrs = _partner_attrs(list(ids))
+ rows = []
+ for p in ids:
+ tr = this.get(p, {}).get('rev', 0.0)
+ lr = last.get(p, {}).get('rev', 0.0)
+ a = attrs.get(p, {})
+ rows.append({'pid': p, 'customer': (this.get(p) or last.get(p) or {}).get('name', '?'),
+ 'rev_ytd': tr, 'rev_ly': lr, 'change': tr - lr, 'yoy_pct': P.yoy_pct(tr, lr),
+ 'orders': this.get(p, {}).get('orders', 0),
+ 'city': a.get('city', '(none)'), 'state': a.get('state', '(none)'),
+ 'agent': a.get('agent', '(none)')})
+ rows.sort(key=lambda r: -(r['rev_ly'] if kind == 'lost' else r['rev_ytd']))
+ return {'kind': kind, 'label': _KPI_SETS.get(kind, kind), 'rows': rows, 'n': len(rows),
+ 'rev_ytd': sum(r['rev_ytd'] for r in rows), 'rev_ly': sum(r['rev_ly'] for r in rows)}
+
+
+# ----------------------------------------------------------- VALIDATION
+def validate(t=None, team_id=None):
+ """Reconcile every headline number to an independent Odoo aggregate.
+
+ When team_id is set (a single BU is selected) the checks run SCOPED to that BU so the
+ validation panel never exposes other-BU figures — BU isolation holds even here. The two
+ cross-BU brand-mirror checks (#2, #4b) only make sense consolidated, so they run only
+ when team_id is None.
+ """
+ t = t or P.today()
+ checks = []
+
+ # 1. Bridge identity: last + new + expansion + contraction + lost == this
+ b = revenue_bridge(t, team_id=team_id)
+ recon = (b['last_total'] + b['new']['rev'] + b['expansion']['rev']
+ + b['contraction']['rev'] + b['lost']['rev'])
+ checks.append({'check': 'Revenue bridge reconciles last→this (New+Exp+Contr+Lost)',
+ 'a': round(recon, 2), 'b': round(b['this_total'], 2),
+ 'gap': round(recon - b['this_total'], 2),
+ 'ok': abs(recon - b['this_total']) <= 1.0})
+
+ # 2. Σ(brand this_total) == company this_total (consolidated only — cross-BU)
+ if team_id is None:
+ brand_this = sum(r['this'] for r in bridge_by_brand(t))
+ checks.append({'check': 'Σ(brand YTD) == company YTD',
+ 'a': round(brand_this, 2), 'b': round(b['this_total'], 2),
+ 'gap': round(brand_this - b['this_total'], 2),
+ 'ok': abs(brand_this - b['this_total']) <= 1.0})
+
+ # 3. Σ(segment LTM rev) == total LTM rev
+ lf, lt = P.ltm(t)
+ seg_sum = sum(s['revenue'] for s in segments(t, team_id=team_id))
+ ltm_total = sum(v['rev'] for v in _cust_rev(lf, lt, team_id=team_id).values())
+ checks.append({'check': 'Σ(segment LTM rev) == total LTM rev',
+ 'a': round(seg_sum, 2), 'b': round(ltm_total, 2),
+ 'gap': round(seg_sum - ltm_total, 2),
+ 'ok': abs(seg_sum - ltm_total) <= 1.0})
+
+ # 4. Sum-level rollup is MECE: Σ(by_dimension('agent')) == total YTD revenue
+ yf, yt = P.ytd(t)
+ ytd_total = sum(v['rev'] for v in _cust_rev(yf, yt, team_id=team_id).values())
+ roll = by_dimension('agent', t, team_id=team_id)
+ dim_sum = sum(r['revenue'] for r in roll)
+ checks.append({'check': 'Σ(agent rollup) == total YTD revenue',
+ 'a': round(dim_sum, 2), 'b': round(ytd_total, 2),
+ 'gap': round(dim_sum - ytd_total, 2),
+ 'ok': abs(dim_sum - ytd_total) <= 1.0})
+
+ # 4b. Brand mirror reconciles: Σ(Fisch)+Σ(Royal) == total YTD (consolidated only)
+ if team_id is None:
+ brand_sum = sum(r['fisch'] + r['royal'] for r in roll)
+ checks.append({'check': 'Rollup brand mirror: Σ(Fisch)+Σ(Royal) == total YTD',
+ 'a': round(brand_sum, 2), 'b': round(ytd_total, 2),
+ 'gap': round(brand_sum - ytd_total, 2),
+ 'ok': abs(brand_sum - ytd_total) <= 1.0})
+
+ # 5. Drill-down scope holds: top customer's LTM order-level rev == line-level rev
+ top = directory(t, team_id=team_id, limit=1)
+ if top:
+ pid = top[0]['pid']
+ mf, mt = P.ltm(t)
+ ord_rev = O.sum_field('sale.order', _order_dom(pid, mf, mt), 'amount_untaxed')
+ line_rev = O.sum_field('sale.order.line', _line_dom(pid, mf, mt), 'price_subtotal')
+ checks.append({'check': 'Drill-down: top customer LTM order==line revenue',
+ 'a': round(ord_rev, 2), 'b': round(line_rev, 2),
+ 'gap': round(ord_rev - line_rev, 2),
+ 'ok': abs(ord_rev - line_rev) <= max(1.0, 0.005 * ord_rev)})
+
+ # 6. YoY decomposition identity: volume effect + price effect == Δsales (drawer math)
+ if top:
+ dc = customer_yoy_decomp(top[0]['pid'], t, team_id=team_id)
+ recon = dc['volume_effect'] + dc['price_effect']
+ checks.append({'check': 'Drawer: volume + price effect == Δsales (top customer)',
+ 'a': round(recon, 2), 'b': round(dc['d_sales'], 2),
+ 'gap': round(recon - dc['d_sales'], 2),
+ 'ok': abs(recon - dc['d_sales']) <= max(1.0, 0.005 * abs(dc['d_sales']) + 1)})
+
+ # 7. NRR ties to the bridge: ending-existing == last + expansion + contraction + churned
+ nr = nrr(t, team_id=team_id)
+ nrr_recon = nr['starting'] + nr['expansion'] + nr['contraction'] + nr['churned']
+ checks.append({'check': 'NRR: ending-existing == start + exp + contr + churn',
+ 'a': round(nrr_recon, 2), 'b': round(nr['ending_existing'], 2),
+ 'gap': round(nrr_recon - nr['ending_existing'], 2),
+ 'ok': abs(nrr_recon - nr['ending_existing']) <= 1.0})
+
+ # 8. Churn score bounded [0,100] with a valid bucket (drawer pill)
+ if top:
+ cs = customer_churn_score(top[0]['pid'], t, team_id=team_id)
+ ok = 0 <= cs['score'] <= 100 and cs['bucket'] in ('Healthy', 'Watch', 'At-risk', 'Critical')
+ checks.append({'check': f"Churn score in [0,100] with valid bucket ({cs['bucket']})",
+ 'a': cs['score'], 'b': cs['score'], 'gap': 0, 'ok': ok})
+
+ # 9. Tier migration is MECE: Σ(flow customers) == distinct customers active in either window
+ tm = tier_migration(t)
+ lf, lt = P.ltm(t)
+ pf, pt = P.prior_ltm(t)
+ active = len(set(_cust_rev(lf, lt)) | set(_cust_rev(pf, pt)))
+ flow_n = sum(f['n'] for f in tm['flows'])
+ checks.append({'check': 'Tier migration: Σ(flow customers) == active (LTM ∪ prior-LTM)',
+ 'a': flow_n, 'b': active, 'gap': flow_n - active, 'ok': flow_n == active})
+ return checks
diff --git a/platform/modules/dictionary.py b/platform/modules/dictionary.py
new file mode 100644
index 0000000000000000000000000000000000000000..3dbf203f7a179c611c932210430b9e01601e02b0
--- /dev/null
+++ b/platform/modules/dictionary.py
@@ -0,0 +1,51 @@
+"""Metric Dictionary — the semantic layer's module adapter (OM-0c, 2026-07-11).
+
+The truth lives in harness/semantic.py + model/*.yml (topics + metrics, one governed definition
+per metric). This thin adapter exists so the app conventions hold: registry row (validate=True,
+nav=False — the page is a sidebar sentinel like Feedback) → validate.py auto-runs the semantic
+layer's independent reconciliation contracts alongside every module's checks.
+
+modules→harness is sanctioned HERE (the dictionary IS the platform layer's surface); the reverse
+lazy import inside semantic.py (order-scope builder) is tracked for the OM-2 lift into core/store.
+"""
+import harness.semantic as S
+
+
+def topics():
+ return S.topics()
+
+
+def metrics():
+ return S.metrics()
+
+
+def describe(key):
+ return S.describe(key)
+
+
+def metric(key, date_from=None, date_to=None, team_id=None):
+ return S.metric(key, date_from, date_to, team_id)
+
+
+def formula(m):
+ """Human-readable formula for a metric definition (the dictionary's Formula column)."""
+ agg = m.get("agg")
+ if agg == "ratio":
+ return f"{m['numerator']} ÷ {m['denominator']}"
+ if agg == "derived":
+ return m.get("expr", "")
+ if agg == "count":
+ return "count(rows)"
+ if agg == "count_distinct":
+ return f"distinct {m['field']}"
+ return f"Σ {m.get('field', '?')}"
+
+
+def run_reconciliation():
+ """Run every declared independent contract live against Odoo (YTD, all-BU + per-BU)."""
+ return S.validate()
+
+
+def validate(pre=None):
+ """validate.py convention: the dictionary's checks ARE the semantic layer's contracts."""
+ return S.validate()
diff --git a/platform/modules/digest.py b/platform/modules/digest.py
new file mode 100644
index 0000000000000000000000000000000000000000..80550bf0ae305963a63b412724dbdd18f92b88da
--- /dev/null
+++ b/platform/modules/digest.py
@@ -0,0 +1,227 @@
+"""Daily agent digest — "Your book this morning": one email per user, their queue only.
+
+Delivery reuses the ONE sanctioned Odoo write path (modules/collections_send.py: mail.mail
+create through the Office 365 relay) including its SAFE_MODE allow-list — while the guardrail
+is ON no digest can leave the allow-list. Content rules (adoption canon, engagement-adoption
+brief): ≤10 lines, only non-empty sections, every line deep-links back to the exact row
+(?src=digest), and the email is SKIPPED entirely when there is nothing to act on — silence
+keeps opens high. Internal mail: no model/res_id (these must NOT land in customer chatter).
+
+Scheduling: app.py starts one daemon ticker (in the cache_resource singleton) that calls
+run_due() every few minutes; run_due sends at most once per (weekday, user) after
+DIGEST_UTC_HOUR (default 11:00 UTC = 7am ET in summer), idempotent across Space restarts via
+the store key 'digest_log' (empty-skips are logged too, so a quiet day isn't rebuilt all day).
+
+BU isolation carries into email: a single-BU user's digest is scoped to that BU's team_id.
+"""
+import os
+import html as _html
+import datetime as dt
+
+import core.store as store
+import core.users as users
+import core.links as links
+import modules.collections_send as cs
+import modules.customer_data as md # call-list / win-back queues (ex-myday, ex-customer_list)
+import modules.tasks as tasks
+import modules.customers as cust
+
+KEY = 'digest_log'
+UTC_HOUR = int(os.environ.get('DIGEST_UTC_HOUR', '11'))
+WEEKDAYS_ONLY = os.environ.get('DIGEST_WEEKDAYS_ONLY', '1').strip().lower() \
+ not in ('0', 'false', 'no', '')
+ENABLED = os.environ.get('DIGEST_ENABLED', '1').strip().lower() not in ('0', 'false', 'no', '')
+
+_NAVY, _GOLD, _MUTED = '#5B8FD9', '#D9A93A', '#6B7280'
+
+
+def _team_for(user):
+ """Single-BU users get a digest scoped to that BU — isolation carries into email."""
+ bus = (user or {}).get('bus', 'all')
+ if isinstance(bus, (list, tuple)) and len(bus) == 1:
+ return bus[0]
+ return None
+
+
+def _m(x):
+ try:
+ return f"${float(x):,.0f}"
+ except (TypeError, ValueError):
+ return '—'
+
+
+def _line(text, href, meta=''):
+ t = _html.escape(str(text))
+ m = f" {_html.escape(str(meta))}" if meta else ''
+ return (f"
")
+
+
+def build(user, t=None):
+ """(subject, html, n_actionable) for one user. n_actionable == 0 → skip the send."""
+ t = t or dt.date.today()
+ uname = user.get('username', '')
+ agent = user.get('agent')
+ team_id = _team_for(user)
+ pids = md.agent_pids(agent)
+
+ today = t.isoformat()
+ my = [x for x in tasks.for_owner(uname)] if store.available() else []
+ due = [x for x in my if (x.get('due') or '9999-12-31') <= today]
+ q = md.queues(agent, team_id, limit=25)
+ calls, risk = q['calls'][:5], q['risk'][:3]
+
+ # yesterday's orders for the book (one read_group; skip silently on a transport error —
+ # the digest must never fail because one section couldn't be pulled)
+ yday = (t - dt.timedelta(days=1)).isoformat()
+ y_rev = y_orders = 0
+ try:
+ rev_map = cust._cust_rev(yday, yday, team_id, pids)
+ y_rev = sum(v.get('rev', 0.0) for v in rev_map.values())
+ y_orders = sum(v.get('orders', 0) for v in rev_map.values())
+ except Exception:
+ pass
+
+ n = len(due) + len(calls) + len(risk)
+ if n == 0 and y_orders == 0:
+ return None, None, 0
+
+ rows = []
+ if due:
+ rows.append(_sec(f'Tasks due ({len(due)})'))
+ for x in due[:5]:
+ ent = x.get('entity') or {}
+ href = links.deeplink('customer_data', src='digest')
+ if ent.get('kind') and ent.get('id') is not None:
+ href = links.deeplink('customer_data', ent['kind'], ent['id'], src='digest')
+ meta = f"due {x.get('due') or '—'}"
+ rows.append(_line(x.get('title', 'Task'), href, meta))
+ if calls:
+ rows.append(_sec('Call today — overdue vs their own cadence'))
+ for r in calls:
+ href = links.deeplink('customer_data', 'customer', r['pid'], src='digest')
+ meta = (f"{int(r.get('overdue_days') or 0)}d past cycle · "
+ f"est. missed {_m(r.get('est_missed'))}")
+ rows.append(_line(r.get('customer', '?'), href, meta))
+ if risk:
+ rows.append(_sec('Win-back — down vs last year'))
+ for r in risk:
+ href = links.deeplink('customer_data', 'customer', r['pid'], src='digest')
+ meta = f"{_m(r.get('at_risk'))} at risk · {r.get('status', '')}"
+ rows.append(_line(r.get('customer', '?'), href, meta))
+ if y_orders:
+ rows.append(_sec('Yesterday'))
+ # Wave 16: the Sales page is retired (registry row archived) — yesterday's orders now
+ # link to the Customer grid, the surface that carries the book. A link to an archived
+ # page would fall through to the landing and read as a broken link.
+ rows.append(_line(f"{y_orders} orders · {_m(y_rev)}",
+ links.deeplink('customer_data', src='digest')))
+
+ scope = f"{agent}'s book" if agent else 'the whole book'
+ list_url = links.deeplink('customer_data', src='digest')
+ html_body = f"""
+
+ Internal daily digest from Loopable.
+ Sent only on days with something to act on.
+
+
"""
+ subject = f"Your book this morning — {n} to act on · {t.strftime('%b %d')}"
+ return subject, html_body, n
+
+
+def send_one(user, odoo=None, override_to=None):
+ """Build + queue one digest. Returns a short result string (never raises past itself)."""
+ to = override_to or user.get('email')
+ if not to:
+ return 'no-email'
+ subject, body, n = build(user)
+ if n == 0:
+ return 'empty-skip'
+ if not cs.safe_recipient_ok(to):
+ return 'safe-mode-blocked'
+ odoo = odoo or cs.Odoo()
+ mid = odoo.queue_mail({
+ 'subject': subject, 'body_html': body,
+ 'email_to': to, 'email_from': cs.SENDER_DISPLAY, 'reply_to': cs.REPLY_TO,
+ 'mail_server_id': cs.ROYAL_MAIL_SERVER_ID, 'author_id': cs.ROYAL_AUTHOR_ID,
+ 'state': 'outgoing', 'auto_delete': False,
+ # This Odoo runs the custom rt_multi_dba module whose mail-create hook browses
+ # env[mail.model].browse(mail.res_id) — a mail WITHOUT model/res_id crashes with
+ # KeyError: False (verified 2026-07-05). Anchor internal mail on the house partner
+ # (Royal Imports, cs.ROYAL_AUTHOR_ID) so nothing lands in a CUSTOMER's chatter.
+ 'model': 'res.partner', 'res_id': cs.ROYAL_AUTHOR_ID,
+ })
+ return f'queued:{mid}'
+
+
+def run_due(force_user=None, override_to=None):
+ """The ticker entry point. Normal path: after UTC_HOUR on weekdays, send each active
+ emailed user their digest at most once per day (dedup via digest_log, including
+ empty-skips). force_user bypasses the schedule/dedup (the 'Send my digest now' button)
+ but NEVER the SAFE_MODE guardrail; forced sends are not logged (the 7am run still runs)."""
+ if not store.available():
+ return {}
+ now = dt.datetime.utcnow()
+ today = now.date().isoformat()
+ if force_user is None:
+ if not ENABLED:
+ return {}
+ if WEEKDAYS_ONLY and now.weekday() >= 5:
+ return {}
+ if now.hour < UTC_HOUR:
+ return {}
+ try:
+ reg = users.registry()
+ except Exception:
+ return {}
+ already = (store.get(KEY) or {}).get(today, {}) if force_user is None else {}
+ results = {}
+ odoo = None
+ for un, u in sorted(reg.items()):
+ if force_user is not None and un != force_user:
+ continue
+ if not u.get('active', True) or not u.get('email'):
+ continue
+ if force_user is None and un in already:
+ continue
+ pub = users._public(un, u)
+ try:
+ if odoo is None:
+ odoo = cs.Odoo()
+ results[un] = send_one(pub, odoo, override_to=override_to)
+ except cs.SafeModeBlocked:
+ results[un] = 'safe-mode-blocked'
+ except Exception as e:
+ results[un] = f'error:{str(e)[:80]}'
+ if force_user is None and results:
+ stamp = now.strftime('%H:%M')
+
+ def _rec(d):
+ day = d.setdefault(today, {})
+ for un, r in results.items():
+ day[un] = {'at': stamp, 'result': r}
+ return d
+ try:
+ store.update(KEY, _rec)
+ except Exception:
+ pass
+ return results
+
+
+def today_log():
+ return (store.get(KEY) or {}).get(dt.date.today().isoformat(), {})
diff --git a/platform/modules/expenses.py b/platform/modules/expenses.py
new file mode 100644
index 0000000000000000000000000000000000000000..e75a634577d69cba60d614d95d629ce8814d6aa1
--- /dev/null
+++ b/platform/modules/expenses.py
@@ -0,0 +1,402 @@
+"""modules/expenses.py — Expenses: the operating-expense analytics dashboard (the CFO
+cost-control surface).
+
+The company's operating cost BASE, read straight from the general ledger: every posted line to an
+expense-type account (account_type in {'expense','expense_depreciation'}) over time. COGS
+('expense_direct_cost') is the product side and is EXCLUDED — this is opex, not cost of sales.
+Because it reads the GL directly (not just vendor bills) it also captures payroll journal entries,
+depreciation and bank/merchant fees that never pass through account.move in_invoice.
+
+This is the MONITOR / DIAGNOSE complement to the Spend & Payables WORKFLOW (which recovers
+vendor-bill waste). It answers one executive question: *what is our operating cost base, how is it
+trending against revenue, what grew, and where did a category spike?* It NAMES the categories to
+look at; it never performs an action.
+
+ 1. TREND + LEVERAGE — monthly opex and opex-as-%-of-revenue (the operating-leverage picture:
+ are costs growing faster than the top line?). Revenue denominator = income-type GL accounts
+ (all channels), so the ratio is internally consistent and independently reconcilable.
+ 2. YoY BRIDGE — prior-LTM opex → per-category movers → current-LTM opex (what grew / fell).
+ 3. COST SPIKES — a Wheeler XmR (individuals) control chart per category flags the months a
+ category ran above its own upper control limit: a diagnostic watch list, worst first.
+ 4. FIXED VS VARIABLE — categories split by month-to-month coefficient of variation + coverage:
+ fixed/recurring (rent, wages, subscriptions) vs variable (where in-year cuts actually land).
+ 5. DIRECTORY — every expense account with LTM $, share, YoY, % of revenue and type,
+ each drilling to the raw ledger lines behind it (no unverifiable aggregates).
+
+Company-level: opex is shared overhead, not cleanly BU-splittable → an HQ module that ignores the
+brand selector. READ-ONLY.
+"""
+import os
+
+import core.odoo as O
+import core.periods as P
+
+EXP_TYPES = ('expense', 'expense_depreciation') # opex — COGS 'expense_direct_cost' excluded
+INC_TYPES = ('income',) # operating revenue (the leverage denominator)
+
+XMR_CONST = 2.66 # individuals-chart control-limit constant (Wheeler): UCL = mean + 2.66·mR̄
+MIN_MONTHS = 6 # minimum completed months of history before an XmR flag is trustworthy
+MATERIAL_LTM = 5000.0 # ignore sub-$5k/yr accounts for spike/leverage noise (still in the directory)
+FIXED_CV = 0.35 # monthly coefficient-of-variation below this + broad coverage = fixed/recurring
+FIXED_COVERAGE = 9 # months (of the completed window) with activity to count as recurring
+BRIDGE_TOP = 5 # named category movers in the YoY bridge (rest roll into "Other";
+ # kept small so the waterfall's x-axis labels stay legible)
+
+
+def _odoo_base():
+ return os.environ.get('ODOO_URL', '').rstrip('/')
+
+
+def _short_lbl(s, n=16):
+ s = str(s or '')
+ return s if len(s) <= n else s[:n - 1] + '…'
+
+
+# ---- data primitives: STORE-backed (OM-2 retrofit 2026-07-12) with LIVE fallback -------------
+# build() reads the tenant DuckDB store (kept minutes-fresh by the app's auto-sync) — the page's
+# ~30 monthly read_groups become millisecond SQL. validate() STAYS on live Odoo, so the existing
+# to-the-cent contract doubles as the retrofit's standing parity proof. Any store problem
+# (missing file, cold table) falls back to the live reads — the page never breaks on a cold store.
+USE_STORE = True
+
+
+def _store_con():
+ import harness.datastore as DS
+ return DS.ro_con() # per-thread cached read-only (shared retrofit primitive)
+
+
+def _accounts_live():
+ rows = O.search_read('account.account',
+ [('account_type', 'in', list(EXP_TYPES) + list(INC_TYPES))],
+ ['code', 'name', 'account_type'])
+ exp = {r['id']: {'code': r.get('code') or '', 'name': r.get('name') or ''}
+ for r in rows if r.get('account_type') in EXP_TYPES}
+ inc_ids = [r['id'] for r in rows if r.get('account_type') in INC_TYPES]
+ return exp, inc_ids
+
+
+def _accounts_store():
+ types = list(EXP_TYPES) + list(INC_TYPES)
+ rows = _store_con().execute(
+ 'SELECT id, code, name, account_type FROM account_account '
+ 'WHERE account_type IN (' + ','.join('?' * len(types)) + ')', types).fetchall()
+ exp = {r[0]: {'code': r[1] or '', 'name': r[2] or ''} for r in rows if r[3] in EXP_TYPES}
+ inc_ids = [r[0] for r in rows if r[3] in INC_TYPES]
+ return exp, inc_ids
+
+
+def _accounts():
+ """{id: {code, name}} for expense-type accounts, and the list of income-account ids."""
+ if USE_STORE:
+ try:
+ return _accounts_store()
+ except Exception:
+ pass
+ return _accounts_live()
+
+
+def _acct_balances_live(acc_ids, date_from, date_to):
+ g = O.read_group('account.move.line',
+ [('account_id', 'in', list(acc_ids)), ('parent_state', '=', 'posted'),
+ ('date', '>=', date_from), ('date', '<=', date_to)],
+ ['balance:sum'], ['account_id'], lazy=False)
+ return {O.m2o_id(r['account_id']): (r.get('balance') or 0.0)
+ for r in g if r.get('account_id')}
+
+
+def _acct_balances_store(acc_ids, date_from, date_to):
+ ids = list(acc_ids)
+ rows = _store_con().execute(
+ 'SELECT l.account_id, sum(l.balance) FROM account_move_line l '
+ 'JOIN account_move m ON m.id = l.move_id '
+ "WHERE m.state = 'posted' AND l.account_id IN (" + ','.join('?' * len(ids)) + ') '
+ 'AND CAST(l.date AS TIMESTAMP) >= ? AND CAST(l.date AS TIMESTAMP) <= ? '
+ 'GROUP BY 1', ids + [str(date_from), str(date_to)]).fetchall()
+ return {r[0]: (r[1] or 0.0) for r in rows}
+
+
+def _acct_balances(acc_ids, date_from, date_to):
+ """{account_id: Σ balance} over posted lines in the window (debit-positive: expense accounts
+ read positive, income accounts read negative)."""
+ if not acc_ids:
+ return {}
+ if USE_STORE:
+ try:
+ return _acct_balances_store(acc_ids, date_from, date_to)
+ except Exception:
+ pass
+ return _acct_balances_live(acc_ids, date_from, date_to)
+
+
+def _income_total(inc_ids, date_from, date_to):
+ """Operating revenue over the window (income accounts carry credit balances → negate)."""
+ if not inc_ids:
+ return 0.0
+ bal = _acct_balances(inc_ids, date_from, date_to)
+ return -sum(bal.values())
+
+
+def _xmr(series):
+ """Wheeler individuals-chart limits over a numeric series. Returns (mean, ucl, lcl, mrbar) or
+ None when there isn't enough history."""
+ xs = list(series)
+ if len(xs) < MIN_MONTHS:
+ return None
+ mean = sum(xs) / len(xs)
+ mrs = [abs(xs[i] - xs[i - 1]) for i in range(1, len(xs))]
+ mrbar = (sum(mrs) / len(mrs)) if mrs else 0.0
+ return mean, mean + XMR_CONST * mrbar, mean - XMR_CONST * mrbar, mrbar
+
+
+def _cv_coverage(series):
+ """(coefficient of variation, months-with-activity) over a completed monthly series."""
+ xs = list(series)
+ n = len(xs)
+ cov = sum(1 for x in xs if abs(x) > 0.005)
+ if n < 2:
+ return None, cov
+ mean = sum(xs) / n
+ if mean <= 0:
+ return None, cov
+ sd = (sum((x - mean) ** 2 for x in xs) / n) ** 0.5
+ return sd / mean, cov
+
+
+def build(t=None):
+ """The full Expenses bundle: scorecard inputs, monthly trend + leverage, YoY bridge steps,
+ the category directory, the XmR spike watch list and the fixed/variable split."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ pf, pt = P.prior_ltm(t)
+ exp, inc_ids = _accounts()
+ exp_ids = list(exp.keys())
+
+ # per-account LTM & prior-LTM opex, + LTM/prior revenue — four independent aggregates, parallel
+ ltm_by, prior_by, rev_ltm, rev_prior, inc_ltm_by = O.parallel([
+ lambda: _acct_balances(exp_ids, lf, lt),
+ lambda: _acct_balances(exp_ids, pf, pt),
+ lambda: _income_total(inc_ids, lf, lt),
+ lambda: _income_total(inc_ids, pf, pt),
+ lambda: _acct_balances(inc_ids, lf, lt),
+ ])
+ opex_ltm = sum(ltm_by.values())
+ opex_prior = sum(prior_by.values())
+
+ # monthly matrix (24 calendar months, ascending; last row = current partial month)
+ months = P.month_starts(24, t)
+ mres = O.parallel([
+ (lambda mf=mf, mt=mt: (_acct_balances(exp_ids, mf, mt), _income_total(inc_ids, mf, mt)))
+ for (_lbl, mf, mt) in months])
+ cur_ym = f'{t.year}-{t.month:02d}'
+ monthly, month_acct = [], {aid: [] for aid in exp_ids}
+ for (lbl, _mf, _mt), (opx, rev) in zip(months, mres):
+ total = sum(opx.values())
+ monthly.append({'month': lbl, 'opex': total, 'revenue': rev,
+ 'ratio': (total / rev * 100) if rev else None,
+ 'partial': lbl == cur_ym, 'closing': False})
+ for aid in exp_ids:
+ month_acct[aid].append(opx.get(aid, 0.0))
+ # 3-month moving average on the opex column series (for a quiet trend line)
+ op_series = [m['opex'] for m in monthly]
+ for i, m in enumerate(monthly):
+ w = op_series[max(0, i - 2):i + 1]
+ m['ma3'] = sum(w) / len(w)
+
+ complete_idx = [i for i, (lbl, _mf, _mt) in enumerate(months) if lbl != cur_ym]
+ # Month-end close lags: the newest completed calendar month is often still being booked
+ # (vendor bills / payroll JEs / marketplace fee settlements not yet posted), which shows up as
+ # a near-empty month. Detect the trailing contiguous under-booked months (< CLOSE_FRAC of the
+ # completed-month median) and anchor month-level analysis on the last FULLY-BOOKED month, so a
+ # −90% "drop" that is really an open period never reads as a cost win. LTM/YoY stay rolling
+ # (they tie to the GL) and are captioned as-booked.
+ CLOSE_FRAC = 0.5
+ comp_all = [monthly[i]['opex'] for i in complete_idx]
+ _srt = sorted(comp_all)
+ med = _srt[len(_srt) // 2] if _srt else 0.0
+ closing_idx = set()
+ for i in reversed(complete_idx):
+ if med > 0 and monthly[i]['opex'] < CLOSE_FRAC * med:
+ closing_idx.add(i)
+ else:
+ break
+ for i in closing_idx:
+ monthly[i]['closing'] = True
+ closed_idx = [i for i in complete_idx if i not in closing_idx]
+ last_c = closed_idx[-1] if closed_idx else (complete_idx[-1] if complete_idx else None)
+ last_month = months[last_c][0] if last_c is not None else cur_ym
+
+ # ---- category directory + fixed/variable classification ----
+ rows, flags = [], []
+ for aid in exp_ids:
+ ltm_v = ltm_by.get(aid, 0.0)
+ pr_v = prior_by.get(aid, 0.0)
+ if abs(ltm_v) < 0.005 and abs(pr_v) < 0.005:
+ continue # never active in either window
+ comp = [month_acct[aid][i] for i in closed_idx]
+ cv, cov = _cv_coverage(comp)
+ ftype = ('Fixed/recurring'
+ if (cov >= FIXED_COVERAGE and cv is not None and cv < FIXED_CV)
+ else 'Variable')
+ rows.append({'aid': aid, 'code': exp[aid]['code'], 'account': exp[aid]['name'],
+ 'ltm': ltm_v, 'prior': pr_v, 'yoy_d': ltm_v - pr_v,
+ 'yoy_pct': P.yoy_pct(ltm_v, pr_v),
+ 'pct_opex': (ltm_v / opex_ltm * 100) if opex_ltm else 0.0,
+ 'pct_rev': (ltm_v / rev_ltm * 100) if rev_ltm else 0.0,
+ 'type': ftype})
+ # ---- XmR spike flag (latest completed month above the account's own UCL) ----
+ stat = _xmr(comp)
+ if stat and last_c is not None:
+ mean, ucl, _lcl, mrbar = stat
+ latest = month_acct[aid][last_c]
+ if latest > ucl and mrbar > 0 and ltm_v >= MATERIAL_LTM:
+ flags.append({'aid': aid, 'code': exp[aid]['code'], 'account': exp[aid]['name'],
+ 'month': last_month, 'value': latest, 'mean': mean, 'ucl': ucl,
+ 'exceed': latest - ucl})
+ rows.sort(key=lambda r: -r['ltm'])
+ flags.sort(key=lambda x: -x['exceed'])
+
+ fixed_ltm = sum(r['ltm'] for r in rows if r['type'] == 'Fixed/recurring')
+ var_ltm = sum(r['ltm'] for r in rows if r['type'] == 'Variable')
+
+ # ---- income (revenue) breakdown — the denominator's verify list ----
+ inc_names = {}
+ for r in O.search_read('account.account', [('id', 'in', inc_ids)], ['name']):
+ inc_names[r['id']] = r.get('name') or ''
+ inc_rows = [{'account': inc_names.get(aid, ''), 'ltm': -bal}
+ for aid, bal in inc_ltm_by.items()]
+ inc_rows.sort(key=lambda r: -r['ltm'])
+
+ # ---- YoY bridge: prior LTM → top movers → other → current LTM ----
+ movers = sorted([r for r in rows if r.get('yoy_d')], key=lambda r: -abs(r['yoy_d']))
+ top = movers[:BRIDGE_TOP]
+ steps = [{'label': 'Prior LTM', 'amount': round(opex_prior, 0), 'kind': 'total'}]
+ used, seen = 0.0, set()
+ for r in top:
+ d = r['yoy_d']
+ used += d
+ lbl = _short_lbl(r['account']) # the waterfall x-axis is categorical —
+ if lbl in seen: # two similarly-named accounts must not collide
+ lbl = f"{_short_lbl(r['account'], 11)} {r['code']}"
+ seen.add(lbl)
+ steps.append({'label': lbl, 'amount': round(d, 0),
+ 'kind': 'down' if d > 0 else 'up'}) # cost up = red(bad); down = green(good)
+ other = (opex_ltm - opex_prior) - used
+ if abs(other) > 1:
+ steps.append({'label': 'Other', 'amount': round(other, 0),
+ 'kind': 'down' if other > 0 else 'up'})
+ steps.append({'label': 'Current LTM', 'amount': round(opex_ltm, 0), 'kind': 'total'})
+
+ # ---- scorecard scalars ----
+ opex_g = P.yoy_pct(opex_ltm, opex_prior)
+ rev_g = P.yoy_pct(rev_ltm, rev_prior)
+ opex_ratio = (opex_ltm / rev_ltm * 100) if rev_ltm else None
+ prior_ratio = (opex_prior / rev_prior * 100) if rev_prior else None
+ ratio_delta = (opex_ratio - prior_ratio) if (opex_ratio is not None and prior_ratio is not None) else None
+
+ comp_totals = [monthly[i]['opex'] for i in closed_idx]
+ latest_full = comp_totals[-1] if comp_totals else 0.0
+ trail = comp_totals[-13:-1] # the 12 closed months before the latest
+ trail_avg = (sum(trail) / len(trail)) if trail else 0.0
+ latest_vs_avg = P.yoy_pct(latest_full, trail_avg)
+
+ top5_share = (sum(r['ltm'] for r in rows[:5]) / opex_ltm * 100) if opex_ltm else 0.0
+ top_cat = rows[0] if rows else None
+ grower = max(rows, key=lambda r: (r.get('yoy_d') or -1e18)) if rows else None
+ n_up_fast = sum(1 for r in rows
+ if r.get('yoy_pct') is not None and rev_g is not None
+ and r['yoy_pct'] > rev_g and r['yoy_d'] > 0 and r['ltm'] > MATERIAL_LTM)
+
+ return {
+ 'window': (lf, lt), 'last_month': last_month,
+ 'n_closing': len(closing_idx),
+ 'closing_months': [months[i][0] for i in sorted(closing_idx)],
+ 'opex_ltm': opex_ltm, 'opex_prior': opex_prior, 'opex_g': opex_g,
+ 'rev_ltm': rev_ltm, 'rev_prior': rev_prior, 'rev_g': rev_g,
+ 'opex_ratio': opex_ratio, 'prior_ratio': prior_ratio, 'ratio_delta': ratio_delta,
+ 'latest_full': latest_full, 'trail_avg': trail_avg, 'latest_vs_avg': latest_vs_avg,
+ 'top5_share': top5_share, 'top_cat': top_cat, 'grower': grower, 'n_up_fast': n_up_fast,
+ 'n_accounts': len(rows),
+ 'monthly': monthly, 'steps': steps, 'rows': rows, 'flags': flags, 'inc_rows': inc_rows,
+ 'fixed_ltm': fixed_ltm, 'var_ltm': var_ltm,
+ }
+
+
+def account_detail(aid, t=None):
+ """Raw-GL drill for one expense account: 15-month balance trend with its own control band,
+ LTM vs prior-LTM totals, the recent posted ledger lines behind it, and an Odoo deep-link.
+ Ties to the directory's numbers (same GL basis) — not the management-basis 'account' drawer."""
+ t = t or P.today()
+ acc = O.search_read('account.account', [('id', '=', aid)], ['code', 'name', 'account_type'])
+ if not acc:
+ return None
+ acc = acc[0]
+ months = P.month_starts(15, t)
+ cur_ym = f'{t.year}-{t.month:02d}'
+
+ def _m(mf, mt):
+ return O.sum_field('account.move.line',
+ [('account_id', '=', aid), ('parent_state', '=', 'posted'),
+ ('date', '>=', mf), ('date', '<=', mt)], 'balance')
+ lf, lt = P.ltm(t)
+ pf, pt = P.prior_ltm(t)
+ vals = O.parallel(
+ [(lambda mf=mf, mt=mt: _m(mf, mt)) for (_lbl, mf, mt) in months]
+ + [lambda: _m(lf, lt), lambda: _m(pf, pt)])
+ mvals, ltm_v, prior_v = vals[:-2], vals[-2], vals[-1]
+
+ stat = _xmr([v for (lbl, _mf, _mt), v in zip(months, mvals) if lbl != cur_ym])
+ mean = ucl = None
+ if stat:
+ mean, ucl = stat[0], stat[1]
+ trend = [{'month': lbl, 'amount': v, 'partial': lbl == cur_ym,
+ 'over': bool(ucl is not None and v > ucl and lbl != cur_ym)}
+ for (lbl, _mf, _mt), v in zip(months, mvals)]
+
+ base = _odoo_base()
+ jl = O.search_read('account.move.line',
+ [('account_id', '=', aid), ('parent_state', '=', 'posted')],
+ ['date', 'move_id', 'partner_id', 'name', 'balance'],
+ order='date desc', limit=40)
+ lines = [{'date': l.get('date') or '', 'entry': O.m2o_name(l.get('move_id')),
+ 'partner': O.m2o_name(l.get('partner_id')) or '', 'label': l.get('name') or '',
+ 'amount': round(l.get('balance') or 0.0, 2),
+ 'link': (f"{base}/web#id={O.m2o_id(l['move_id'])}&model=account.move&view_type=form"
+ if base and l.get('move_id') else None)}
+ for l in jl]
+ return {'aid': aid, 'code': acc.get('code') or '', 'name': acc.get('name') or '',
+ 'ltm': ltm_v, 'prior': prior_v, 'yoy_pct': P.yoy_pct(ltm_v, prior_v),
+ 'avg_month': (ltm_v / 12.0), 'mean': mean, 'ucl': ucl,
+ 'trend': trend, 'lines': lines,
+ 'odoo_link': (f"{base}/web#id={aid}&model=account.account&view_type=form" if base else None)}
+
+
+def validate(t=None, team_id=None, pre=None):
+ """(1) client opex LTM ties an independent server Σ balance over the same expense accounts;
+ (2) client revenue LTM ties the independent server income Σ; (3) the directory rows re-add to
+ the opex headline (nothing dropped). Company-level — team_id ignored (opex is consolidated)."""
+ t = t or P.today()
+ b = pre or build(t)
+ lf, lt = b['window']
+ exp, inc_ids = _accounts()
+ exp_ids = list(exp.keys())
+
+ srv_opex = O.sum_field('account.move.line',
+ [('account_id', 'in', exp_ids), ('parent_state', '=', 'posted'),
+ ('date', '>=', lf), ('date', '<=', lt)], 'balance')
+ srv_rev = _income_total(inc_ids, lf, lt)
+ dir_sum = sum(r['ltm'] for r in b['rows'])
+
+ checks = [
+ {'check': 'operating expense LTM — client Σ == server Σ balance',
+ 'a': round(b['opex_ltm'], 2), 'b': round(srv_opex, 2),
+ 'gap': round(b['opex_ltm'] - srv_opex, 2),
+ 'ok': abs(b['opex_ltm'] - srv_opex) <= max(1.0, abs(srv_opex) * 0.001)},
+ {'check': 'operating revenue LTM — client Σ == server income Σ',
+ 'a': round(b['rev_ltm'], 2), 'b': round(srv_rev, 2),
+ 'gap': round(b['rev_ltm'] - srv_rev, 2),
+ 'ok': abs(b['rev_ltm'] - srv_rev) <= max(1.0, abs(srv_rev) * 0.001)},
+ {'check': 'category directory Σ == opex headline (nothing dropped)',
+ 'a': round(dir_sum, 2), 'b': round(b['opex_ltm'], 2),
+ 'gap': round(dir_sum - b['opex_ltm'], 2), 'ok': abs(dir_sum - b['opex_ltm']) < 1.0},
+ ]
+ return checks
diff --git a/platform/modules/feedback.py b/platform/modules/feedback.py
new file mode 100644
index 0000000000000000000000000000000000000000..9b0814710e20dc50555d42b71e391bf7fbb74327
--- /dev/null
+++ b/platform/modules/feedback.py
@@ -0,0 +1,68 @@
+"""Feedback module — feature requests / feedback / bug reports from every user.
+
+Sits OUTSIDE the Dashboards/Workflows nav groups (its own sidebar entry). Submissions accumulate
+in the platform's writable HF Dataset store (core/store.py, key 'feedback') so they survive
+restarts and are shared across users/instances. The record shape is deliberately structured so an
+AI staging pass can later triage items into the build workflow (type/module/importance/status +
+free-text details). No Odoo involvement at all — this module never touches ERP data.
+
+Statuses: New (just submitted) -> Staged (AI/owner queued it for a build cycle) -> Planned ->
+Done | Declined. Triage is admin-only; submitting is open to every signed-in user.
+"""
+import time
+import datetime as dt
+
+import core.store as store
+
+KEY = 'feedback'
+TYPES = ['Feature request', 'Feedback', 'Bug']
+IMPORTANCE = ['Must have', 'Nice to have', 'Idea']
+STATUSES = ['New', 'Staged', 'Planned', 'Done', 'Declined']
+
+
+def available():
+ return store.available()
+
+
+def items(fresh=True):
+ """All submissions, newest first. Lenient read (display only)."""
+ data = store.get(KEY, fresh=fresh) or {}
+ out = list(data.get('items', []))
+ out.sort(key=lambda r: r.get('ts', ''), reverse=True)
+ return out
+
+
+def add(user, name, ftype, module, title, details, importance):
+ """Append one submission (strict read-modify-write — a transient read error aborts,
+ never clobbers). Returns the new id."""
+ rec = {
+ 'id': f'fb-{int(time.time() * 1000)}-{user}',
+ 'ts': dt.datetime.now().strftime('%Y-%m-%d %H:%M'),
+ 'user': user, 'name': name,
+ 'type': ftype, 'module': module,
+ 'title': (title or '').strip(),
+ 'details': (details or '').strip(),
+ 'importance': importance,
+ 'status': 'New', 'note': '',
+ }
+ store.update(KEY, lambda d: {**d, 'items': d.get('items', []) + [rec]})
+ return rec['id']
+
+
+def set_fields(fid, **fields):
+ """Update triage fields (status / note) on one submission by id."""
+ def _fn(d):
+ for it in d.get('items', []):
+ if it.get('id') == fid:
+ it.update(fields)
+ return d
+ store.update(KEY, _fn)
+
+
+def counts(rows=None):
+ """Status -> count, for the header KPIs."""
+ rows = items() if rows is None else rows
+ out = {s: 0 for s in STATUSES}
+ for r in rows:
+ out[r.get('status', 'New')] = out.get(r.get('status', 'New'), 0) + 1
+ return out
diff --git a/platform/modules/financial.py b/platform/modules/financial.py
new file mode 100644
index 0000000000000000000000000000000000000000..016f1401c833d9a05c938ead52582bf12396ff7a
--- /dev/null
+++ b/platform/modules/financial.py
@@ -0,0 +1,344 @@
+"""Financial module — gross margin (the bridge between Sales revenue and Inventory cost),
+margin by brand / category / SKU, margin trend & YoY, margin-dilutive SKUs, and the
+cash-conversion-cycle capstone (DSO + DIO − DPO) that ties the AR + Inventory + Financial
+working-capital picture together.
+
+Margin source: Odoo's Margin module is installed, so sale.order.line carries `margin`
+(= price_subtotal − purchase_price×qty) and `purchase_price` (snapshot cost at sale).
+Both are read_group-aggregatable (verified). COGS is derived as revenue − margin.
+
+Data-quality caveats surfaced and reported, not hidden:
+ - ~4% of sales-line revenue runs through zero-cost lines → their margin reads as 100%
+ and slightly overstates GM. Quantified in `uncosted_share()` and the validation panel.
+ - product.list_price is uniformly 1.0 in this Odoo (pricing lives in pricelists), so
+ "discount vs list" is not computable here — price realization is expressed as realized
+ GM% instead. (A pricelist-join version is on the backlog.)
+"""
+import sys
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+import modules.inventory as inv_mod
+import modules.ar as ar_mod
+
+
+# ---------- core margin window ----------
+def _window(date_from, date_to, team_id=None):
+ """Revenue, margin, derived COGS and GM% for a sale-line window (RI+FFS scope)."""
+ dom = O.sale_line_domain(date_from=str(date_from), date_to=str(date_to), team_id=team_id)
+ rev = O.sum_field('sale.order.line', dom, 'price_subtotal')
+ margin = O.sum_field('sale.order.line', dom, 'margin')
+ cogs = rev - margin
+ return {
+ 'revenue': rev,
+ 'margin': margin,
+ 'cogs': cogs,
+ 'gm_pct': (margin / rev * 100) if rev else 0.0,
+ }
+
+
+def headline(t=None, team_id=None):
+ """YTD gross margin vs same-period last year (consistent with the Sales headline)."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _window(yf, yt, team_id)
+ last = _window(lf, lt, team_id)
+ lf2, lt2 = P.ltm(t)
+ ltm = _window(lf2, lt2, team_id)
+ return {
+ 'window': f'{yf} → {yt}',
+ 'revenue': this['revenue'],
+ 'revenue_ly': last['revenue'],
+ 'revenue_yoy_pct': P.yoy_pct(this['revenue'], last['revenue']),
+ 'cogs': this['cogs'],
+ 'cogs_ly': last['cogs'],
+ 'cogs_yoy_pct': P.yoy_pct(this['cogs'], last['cogs']),
+ 'gm_dollars': this['margin'],
+ 'gm_pct': this['gm_pct'],
+ 'gm_pct_ly': last['gm_pct'],
+ 'gm_pp_delta': this['gm_pct'] - last['gm_pct'],
+ 'gm_dollars_ly': last['margin'],
+ 'gm_dollars_yoy_pct': P.yoy_pct(this['margin'], last['margin']),
+ 'ltm_revenue': ltm['revenue'],
+ 'ltm_gm_dollars': ltm['margin'],
+ 'ltm_gm_pct': ltm['gm_pct'],
+ }
+
+
+def by_brand(t=None):
+ """Fisch vs Royal: revenue, GM$, GM% (YTD) + same-period-LY for variance columns."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ rows = []
+ for tid in O.TEAM_IDS:
+ w = _window(yf, yt, team_id=tid)
+ ly = _window(lf, lt, team_id=tid)
+ rows.append({'brand': O.TEAM_NAMES[tid], 'revenue': w['revenue'],
+ 'gm_dollars': w['margin'], 'gm_pct': w['gm_pct'],
+ 'gm_dollars_ly': ly['margin'], 'gm_change': w['margin'] - ly['margin'],
+ 'gm_pct_ly': ly['gm_pct'], 'gm_pp_delta': w['gm_pct'] - ly['gm_pct']})
+ return sorted(rows, key=lambda r: -r['gm_dollars'])
+
+
+def _product_cat_map():
+ """product_id → main category name (reusing inventory's category resolver)."""
+ o = O.get_odoo()
+ catmap = inv_mod._cat_main_map()
+ prods = o.search_read('product.product', [('default_code', '!=', False)],
+ ['id', 'categ_id'])
+ return {p['id']: (catmap.get(O.m2o_id(p.get('categ_id'))) or '(uncategorized)')
+ for p in prods}
+
+
+def _per_product(date_from, date_to, team_id=None):
+ """read_group sale lines by product → rev, margin, qty (YTD window)."""
+ o = O.get_odoo()
+ dom = O.sale_line_domain(date_from=str(date_from), date_to=str(date_to), team_id=team_id)
+ g = o.read_group('sale.order.line', domain=dom,
+ fields=['price_subtotal:sum', 'margin:sum', 'product_uom_qty:sum'],
+ groupby=['product_id'], lazy=False)
+ out = []
+ for r in g:
+ pid = O.m2o_id(r.get('product_id'))
+ if not pid:
+ continue
+ out.append({'product_id': pid, 'name': O.m2o_name(r.get('product_id')),
+ 'revenue': r.get('price_subtotal') or 0.0,
+ 'margin': r.get('margin') or 0.0,
+ 'qty': r.get('product_uom_qty') or 0.0})
+ return out
+
+
+def by_category(t=None, limit=20, team_id=None):
+ """Where the gross-profit dollars come from, by main category (YTD) — with same-period-LY
+ so the page can show each category's GM$ change and pp drift (the mix/variance read)."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ catmap = _product_cat_map()
+ agg = {}
+ for r in _per_product(yf, yt, team_id):
+ cat = catmap.get(r['product_id'], '(uncategorized)')
+ a = agg.setdefault(cat, {'category': cat, 'revenue': 0.0, 'gm_dollars': 0.0,
+ 'revenue_ly': 0.0, 'gm_dollars_ly': 0.0})
+ a['revenue'] += r['revenue']
+ a['gm_dollars'] += r['margin']
+ for r in _per_product(lf, lt, team_id):
+ cat = catmap.get(r['product_id'], '(uncategorized)')
+ a = agg.setdefault(cat, {'category': cat, 'revenue': 0.0, 'gm_dollars': 0.0,
+ 'revenue_ly': 0.0, 'gm_dollars_ly': 0.0})
+ a['revenue_ly'] += r['revenue']
+ a['gm_dollars_ly'] += r['margin']
+ for a in agg.values():
+ a['gm_pct'] = (a['gm_dollars'] / a['revenue'] * 100) if a['revenue'] else 0.0
+ a['gm_pct_ly'] = (a['gm_dollars_ly'] / a['revenue_ly'] * 100) if a['revenue_ly'] else None
+ a['gm_change'] = a['gm_dollars'] - a['gm_dollars_ly']
+ a['gm_pp_delta'] = (a['gm_pct'] - a['gm_pct_ly']) if a['gm_pct_ly'] is not None else None
+ return sorted(agg.values(), key=lambda x: -x['gm_dollars'])[:limit]
+
+
+def _shift_years(d, years):
+ """Same calendar date shifted by whole years (Feb-29 → Feb-28)."""
+ d = dt.date.fromisoformat(str(d))
+ try:
+ return d.replace(year=d.year + years).isoformat()
+ except ValueError:
+ return d.replace(year=d.year + years, day=28).isoformat()
+
+
+# Bridge cutoff presets: label + window fn. The compare window is ALWAYS the same dates shifted
+# back one year (for LTM that IS the prior 12 months), so seasonality never distorts the bridge.
+BRIDGE_BASES = {
+ 'ytd': ('YTD', P.ytd),
+ 'qtd': ('QTD', P.qtd),
+ 'mtd': ('MTD', P.mtd),
+ 'ltm': ('LTM', P.ltm),
+}
+
+
+def margin_bridge(t=None, team_id=None, basis='ytd'):
+ """The gross-margin bridge — decomposes ΔGM$ (the `basis` window vs the same window one year
+ earlier) into per-SKU effects that sum EXACTLY (validated to the cent):
+ volume = (Q1−Q0)·(P0−C0) price = (P1−P0)·Q1 cost = −(C1−C0)·Q1 (SKUs in both periods)
+ new = GM1 of SKUs with no prior-window sales lost = −GM0 of SKUs gone this window
+ basis ∈ BRIDGE_BASES: 'ytd' (default), 'qtd', 'mtd', 'ltm' — the owner-selectable cutoff.
+ P/C are realized $-per-unit from the window aggregates (Odoo margin basis). Zero-qty lines
+ (services, adjustments) can't carry a unit price — their ΔGM lands in `other` so the bridge
+ still ties. The classic FP&A "why did margin move" chart (IBCS/PVM canon)."""
+ t = t or P.today()
+ _lbl, _win = BRIDGE_BASES.get(basis, BRIDGE_BASES['ytd'])
+ yf, yt = _win(t)
+ lf, lt = _shift_years(yf, -1), _shift_years(yt, -1)
+ this = {r['product_id']: r for r in _per_product(yf, yt, team_id)}
+ last = {r['product_id']: r for r in _per_product(lf, lt, team_id)}
+ vol = prc = cst = new = lost = other = 0.0
+ fx = [] # per-SKU effect rows — the drill-down behind each bridge bar
+ for pid, r1 in this.items():
+ r0 = last.get(pid)
+ if r0 is None:
+ new += r1['margin']
+ fx.append({'name': r1['name'], 'bucket': 'New SKUs', 'volume': 0.0, 'price': 0.0,
+ 'cost': 0.0, 'change': r1['margin']})
+ continue
+ q0, q1 = r0['qty'], r1['qty']
+ if q0 > 0 and q1 > 0:
+ p0, c0 = r0['revenue'] / q0, (r0['revenue'] - r0['margin']) / q0
+ p1, c1 = r1['revenue'] / q1, (r1['revenue'] - r1['margin']) / q1
+ v, pr, ct = (q1 - q0) * (p0 - c0), (p1 - p0) * q1, -(c1 - c0) * q1
+ vol += v
+ prc += pr
+ cst += ct
+ fx.append({'name': r1['name'], 'bucket': 'Continuing', 'volume': v, 'price': pr,
+ 'cost': ct, 'change': r1['margin'] - r0['margin']})
+ else: # unit price undefined on either side → exact residual bucket
+ other += r1['margin'] - r0['margin']
+ fx.append({'name': r1['name'], 'bucket': 'Other', 'volume': 0.0, 'price': 0.0,
+ 'cost': 0.0, 'change': r1['margin'] - r0['margin']})
+ for pid, r0 in last.items():
+ if pid not in this:
+ lost += -r0['margin']
+ fx.append({'name': r0['name'], 'bucket': 'Lost SKUs', 'volume': 0.0, 'price': 0.0,
+ 'cost': 0.0, 'change': -r0['margin']})
+ gm0 = sum(r['margin'] for r in last.values())
+ gm1 = sum(r['margin'] for r in this.values())
+ fx.sort(key=lambda r: -abs(r['change']))
+ return {'gm_ly': gm0, 'gm_ytd': gm1, 'volume': vol, 'price': prc, 'cost': cst,
+ 'new': new, 'lost': lost, 'other': other,
+ 'delta': gm1 - gm0,
+ 'sku_effects': fx[:600],
+ 'basis': basis, 'basis_label': _lbl,
+ 'cmp_label': 'prior LTM' if basis == 'ltm' else 'LY',
+ 'date_from': str(yf), 'date_to': str(yt), 'cmp_from': str(lf), 'cmp_to': str(lt),
+ 'window': f'{yf} → {yt}', 'cmp_window': f'{lf} → {lt}',
+ 'ties': abs((vol + prc + cst + new + lost + other) - (gm1 - gm0)) <= 1.0}
+
+
+def margin_trend(n=13, t=None, team_id=None):
+ """Monthly revenue, GM$ and GM% over the last n months (trend + seasonality)."""
+ t = t or P.today()
+ out = []
+ for label, mf, mt in P.month_starts(n, t):
+ w = _window(mf, mt, team_id)
+ out.append({'month': label, 'revenue': w['revenue'],
+ 'gm_dollars': w['margin'], 'gm_pct': w['gm_pct']})
+ return out
+
+
+def low_margin_skus(t=None, limit=25, min_rev=2000.0, team_id=None):
+ """Margin-dilutive SKUs: meaningful YTD revenue but low realized GM%. Zero-cost
+ (uncosted) lines are flagged separately — their 100% GM is a data gap, not real."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ rows = []
+ for r in _per_product(yf, yt, team_id):
+ if r['revenue'] < min_rev:
+ continue
+ gm_pct = (r['margin'] / r['revenue'] * 100) if r['revenue'] else 0.0
+ rows.append({'name': r['name'], 'revenue': r['revenue'],
+ 'gm_dollars': r['margin'], 'gm_pct': gm_pct,
+ 'uncosted': abs(r['margin'] - r['revenue']) < 0.01})
+ real = [r for r in rows if not r['uncosted']]
+ return sorted(real, key=lambda x: x['gm_pct'])[:limit]
+
+
+def uncosted_share(t=None, team_id=None):
+ """Share of YTD revenue running through zero-cost lines (margin overstated)."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ dom = O.sale_line_domain(date_from=str(yf), date_to=str(yt), team_id=team_id)
+ rev_all = O.sum_field('sale.order.line', dom, 'price_subtotal')
+ rev_zero = O.sum_field('sale.order.line', dom + [('purchase_price', '=', 0)], 'price_subtotal')
+ return {'rev_all': rev_all, 'rev_uncosted': rev_zero,
+ 'pct': (rev_zero / rev_all * 100) if rev_all else 0.0}
+
+
+def cash_conversion_cycle(t=None):
+ """CCC = DIO + DSO − DPO (days). Directional, company-wide.
+
+ Throughput basis = LTM purchases (vendor bills net of refunds), the most consistent
+ company-wide proxy for COGS available without a P&L-account reconciliation. DSO comes
+ from the AR module (revenue-based, solid). The dominant driver — inventory days — is
+ robust to the exact basis, which is the point.
+ """
+ t = t or P.today()
+ o = O.get_odoo()
+ lf, lt = P.ltm(t)
+ base = [('state', '=', 'posted'), ('invoice_date', '>=', str(lf)), ('invoice_date', '<=', str(lt))]
+ purch = (O.sum_field('account.move', base + [('move_type', '=', 'in_invoice')], 'amount_total')
+ - O.sum_field('account.move', base + [('move_type', '=', 'in_refund')], 'amount_total'))
+ daily = (purch / 365.0) if purch else None
+
+ ap_rows = o.search_read('account.move',
+ [('move_type', 'in', ['in_invoice', 'in_refund']),
+ ('state', '=', 'posted'),
+ ('payment_state', 'in', ['not_paid', 'partial'])],
+ ['amount_residual_signed'])
+ ap_open = abs(sum(r.get('amount_residual_signed') or 0.0 for r in ap_rows))
+
+ inv_value = inv_mod.summary(t)['total_inv_value']
+ dso = ar_mod.summary(t)['dso_days']
+ dio = (inv_value / daily) if daily else None
+ dpo = (ap_open / daily) if daily else None
+ ccc = (dio + dso - dpo) if (dio is not None and dso is not None and dpo is not None) else None
+ return {
+ 'ltm_purchases': purch,
+ 'inventory_value': inv_value,
+ 'ap_open': ap_open,
+ 'dio_days': dio,
+ 'dso_days': dso,
+ 'dpo_days': dpo,
+ 'ccc_days': ccc,
+ 'basis': 'LTM purchases (vendor bills net of refunds) as COGS/throughput proxy',
+ }
+
+
+def validate(t=None, team_id=None):
+ """Reconcile margin metrics to independent Odoo aggregates. When team_id is set (a single BU
+ selected) every check runs SCOPED to that BU, so the validation panel never reconciles
+ against — or exposes — the other BU's numbers. The cross-BU brand-mirror check (#1) only
+ makes sense consolidated, so it runs only when team_id is None."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ o = O.get_odoo()
+ checks = []
+
+ total = _window(yf, yt, team_id)
+ # 1. Σ(brand margin) == total margin (consolidated only — cross-BU)
+ if team_id is None:
+ brand_sum = sum(b['gm_dollars'] for b in by_brand(t))
+ checks.append({'check': 'Margin: Σ(brand) == total (YTD)',
+ 'a': round(brand_sum, 2), 'b': round(total['margin'], 2),
+ 'gap': round(brand_sum - total['margin'], 2),
+ 'ok': abs(brand_sum - total['margin']) <= 1.0})
+
+ # 2. Σ(per-product margin) == total margin (grouping integrity)
+ prod_sum = sum(r['margin'] for r in _per_product(yf, yt, team_id))
+ checks.append({'check': 'Margin: Σ(per-product) == total (YTD)',
+ 'a': round(prod_sum, 2), 'b': round(total['margin'], 2),
+ 'gap': round(prod_sum - total['margin'], 2),
+ 'ok': abs(prod_sum - total['margin']) <= 1.0})
+
+ # 2b. The margin bridge decomposition sums exactly to ΔGM (volume+price+cost+new+lost+other)
+ br = margin_bridge(t, team_id=team_id)
+ _parts = br['volume'] + br['price'] + br['cost'] + br['new'] + br['lost'] + br['other']
+ checks.append({'check': 'Margin bridge: Σ(effects) == ΔGM YTD vs LY',
+ 'a': round(_parts, 2), 'b': round(br['delta'], 2),
+ 'gap': round(_parts - br['delta'], 2),
+ 'ok': abs(_parts - br['delta']) <= 1.0})
+
+ # 3. Odoo line-level margin identity: margin == price_subtotal − purchase_price×qty
+ dom = O.sale_line_domain(date_from=str(yf), date_to=str(yt), team_id=team_id)
+ smp = o.search_read('sale.order.line', dom,
+ ['price_subtotal', 'purchase_price', 'product_uom_qty', 'margin'], limit=1)
+ if smp:
+ r = smp[0]
+ recomputed = (r.get('price_subtotal') or 0) - (r.get('purchase_price') or 0) * (r.get('product_uom_qty') or 0)
+ checks.append({'check': 'Margin identity: price_subtotal − cost×qty (sample line)',
+ 'a': round(r.get('margin') or 0, 2), 'b': round(recomputed, 2),
+ 'gap': round((r.get('margin') or 0) - recomputed, 2),
+ 'ok': abs((r.get('margin') or 0) - recomputed) <= 0.05})
+ return checks
diff --git a/platform/modules/health.py b/platform/modules/health.py
new file mode 100644
index 0000000000000000000000000000000000000000..ae447edb486de983034dfee6732fc0f95ac940d7
--- /dev/null
+++ b/platform/modules/health.py
@@ -0,0 +1,559 @@
+"""Data Health module — read-only month-end close & reconciliation checks against Odoo.
+
+Built for the bookkeeper / accountant workflow: pick a period, clear unposted items,
+reconcile AR and AP, review accruals & cut-off (unbilled revenue, goods-received-not-invoiced),
+and catch errors (below-cost sales, duplicate bills, negative stock, costing gaps).
+
+Each check returns the same shape — category / title / severity / scope / count / dollar
+impact / a recommended fix / sample rows — so the page can group and render them uniformly.
+Checks take a (date_from, date_to) window:
+ - scope 'period' → transactions dated inside the window (what happened this month)
+ - scope 'asof' → open balances / aging as of date_to (month-end position)
+ - scope 'current' → live snapshot, period-independent (e.g. on-hand stock)
+READ-ONLY — nothing is ever written.
+"""
+import sys
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+import modules.ar as ar_mod
+
+CATEGORIES = ['Posting & completeness', 'Accruals & cut-off', 'Receivables (AR)',
+ 'Payables (AP)', 'Inventory & COGS', 'Data hygiene']
+
+
+def _check(key, category, title, severity, scope, count, impact, impact_kind, fix,
+ sample=None, cols=None):
+ return {'key': key, 'category': category, 'title': title, 'severity': severity,
+ 'scope': scope, 'count': count, 'impact': impact, 'impact_kind': impact_kind,
+ 'fix': fix, 'sample': sample or [], 'cols': cols or {}}
+
+
+def _days(a, b):
+ try:
+ return (dt.date.fromisoformat(str(a)[:10]) - dt.date.fromisoformat(str(b)[:10])).days
+ except Exception:
+ return 0
+
+
+def _ex():
+ ex = O.excluded_partner_ids()
+ return list(ex) if ex else []
+
+
+def _sum(model, dom, field):
+ """sum_field guarded against empty result sets — Odoo's read_group returns None for a
+ sum over zero rows, which XML-RPC can't marshal. Return 0.0 instead of erroring."""
+ o = O.get_odoo()
+ return O.sum_field(model, dom, field) if o.search_count(model, dom) else 0.0
+
+
+# ---- Posting & completeness -------------------------------------------------
+def _draft_moves(df, dt_):
+ o = O.get_odoo()
+ dom = [('state', '=', 'draft'), ('move_type', 'in',
+ ['out_invoice', 'in_invoice', 'out_refund', 'in_refund', 'entry']),
+ ('date', '>=', df), ('date', '<=', dt_)]
+ n = o.search_count('account.move', dom)
+ rows = o.search_read('account.move', dom,
+ ['name', 'move_type', 'partner_id', 'date', 'amount_total'],
+ limit=25, order='date desc')
+ TYPE = {'out_invoice': 'cust invoice', 'in_invoice': 'vendor bill',
+ 'out_refund': 'cust credit', 'in_refund': 'vendor credit', 'entry': 'journal'}
+ sample = [{'entry': r.get('name') or '(draft)', 'type': TYPE.get(r['move_type'], r['move_type']),
+ 'partner': O.m2o_name(r.get('partner_id')), 'date': str(r.get('date'))[:10],
+ 'amount': r.get('amount_total') or 0} for r in rows]
+ return _check('draft', CATEGORIES[0], 'Draft / unposted entries in period',
+ 'high' if n else 'low', 'period', n, None, None,
+ 'Post or delete these before closing — draft invoices/bills/journals are not in the books yet.',
+ sample, {'amount': 'money'})
+
+
+# ---- Accruals & cut-off -----------------------------------------------------
+def _dni_lines(df, dt_):
+ """Delivered-not-invoiced at LINE level (OCA account_cutoff_picking semantics, re-implemented):
+ per sale line, (qty_delivered − qty_invoiced) > 0 valued at the line's effective unit price.
+ Unlike order-level invoice_status (which counts whole orders and, under order-basis invoicing,
+ goods not yet shipped), this measures exactly the shipped-but-unbilled quantity. Domains can't
+ compare two fields, so candidates (qty_delivered > 0) are pulled and reconciled client-side."""
+ o = O.get_odoo()
+ dom = [('order_id.state', 'in', ['sale', 'done']), ('order_id.team_id', 'in', O.TEAM_IDS),
+ ('qty_delivered', '>', 0),
+ ('order_id.date_order', '>=', f'{df} 00:00:00'),
+ ('order_id.date_order', '<=', f'{dt_} 23:59:59')]
+ if _ex():
+ dom.append(('order_partner_id', 'not in', _ex()))
+ lines = o.search_read('sale.order.line', dom,
+ ['order_id', 'order_partner_id', 'qty_delivered', 'qty_invoiced',
+ 'product_uom_qty', 'price_unit', 'price_subtotal'])
+ out = []
+ for r in lines:
+ gap = (r.get('qty_delivered') or 0) - (r.get('qty_invoiced') or 0)
+ if gap <= 1e-3:
+ continue
+ qty = r.get('product_uom_qty') or 0
+ unit = (r['price_subtotal'] / qty) if qty else (r.get('price_unit') or 0)
+ r['_dni_qty'] = gap
+ r['_dni_val'] = gap * unit
+ out.append(r)
+ return lines, out
+
+
+def _unbilled_revenue(df, dt_):
+ lines, dni = _dni_lines(df, dt_)
+ total = sum(r['_dni_val'] for r in dni)
+ by_order = {}
+ for r in dni:
+ onm = O.m2o_name(r['order_id'])
+ e = by_order.setdefault(onm, {'order': onm, 'customer': O.m2o_name(r['order_partner_id']),
+ 'unbilled': 0.0})
+ e['unbilled'] += r['_dni_val']
+ sample = sorted(by_order.values(), key=lambda x: -x['unbilled'])[:25]
+ return _check('unbilled', CATEGORIES[1], 'Delivered but not invoiced (revenue to go bill)',
+ 'high' if total > 25000 else 'medium', 'period', len(by_order), total, 'dollar',
+ 'Shipped quantity exceeds invoiced quantity on these orders — bill the gap now '
+ '(or accrue it at cut-off). Line-level: partial invoices are netted correctly.',
+ sample, {'unbilled': 'money'})
+
+
+def _grni(df, dt_):
+ """Goods received not invoiced — accrue the unbilled vendor cost at close."""
+ o = O.get_odoo()
+ lines = o.search_read('purchase.order.line',
+ [('order_id.invoice_status', '=', 'to invoice'), ('qty_received', '>', 0)],
+ ['qty_received', 'qty_invoiced', 'price_unit', 'product_id', 'order_id'])
+ by = {}
+ total = 0.0
+ for r in lines:
+ d = (r.get('qty_received') or 0) - (r.get('qty_invoiced') or 0)
+ if d <= 0:
+ continue
+ val = d * (r.get('price_unit') or 0)
+ total += val
+ po = O.m2o_name(r.get('order_id'))
+ e = by.setdefault(po, {'po': po, 'accrual': 0.0})
+ e['accrual'] += val
+ rows = sorted(by.values(), key=lambda x: -x['accrual'])[:25]
+ return _check('grni', CATEGORIES[1], 'Goods received, not yet invoiced (GRNI accrual)',
+ 'high' if total > 25000 else 'medium', 'current', len(by), total, 'dollar',
+ 'Accrue this vendor cost at period close (Dr inventory/COGS, Cr GRNI) until the bills arrive.',
+ rows, {'accrual': 'money'})
+
+
+# ---- Receivables (AR) -------------------------------------------------------
+def _ancient_ar(df, dt_):
+ o = O.get_odoo()
+ cutoff = (dt.date.fromisoformat(dt_) - dt.timedelta(days=365)).isoformat()
+ dom = [('move_type', '=', 'out_invoice'), ('state', '=', 'posted'),
+ ('payment_state', 'in', ['not_paid', 'partial']), ('invoice_date_due', '<', cutoff)]
+ if _ex():
+ dom.append(('partner_id', 'not in', _ex()))
+ n = o.search_count('account.move', dom)
+ amt = _sum('account.move', dom, 'amount_residual_signed')
+ rows = o.search_read('account.move', dom,
+ ['name', 'partner_id', 'invoice_date_due', 'amount_residual_signed'],
+ limit=25, order='invoice_date_due asc')
+ sample = [{'invoice': r['name'], 'customer': O.m2o_name(r['partner_id']),
+ 'days_overdue': _days(dt_, r['invoice_date_due']),
+ 'open': r.get('amount_residual_signed') or 0} for r in rows]
+ return _check('ancient_ar', CATEGORIES[2], 'Invoices 365+ days overdue (write-off candidates)',
+ 'high' if amt > 25000 else 'medium', 'asof', n, amt, 'dollar',
+ 'Decide: escalate, settle, or write off. Provision the doubtful portion at close.',
+ sample, {'open': 'money', 'days_overdue': ('int', 'days overdue')})
+
+
+def _ar_recon(df, dt_):
+ rows = ar_mod.reconciliation_flags(limit=25)
+ allr = ar_mod.reconciliation_flags(limit=10 ** 9)
+ amt = sum(abs(r['gap']) for r in allr)
+ return _check('ar_recon', CATEGORIES[2], 'AR sub-ledger vs partner balance mismatches',
+ 'medium', 'current', len(allr), amt, 'dollar',
+ 'Reconcile unapplied payments/credits so the AR sub-ledger ties to the partner balance.',
+ rows, {'odoo_receivable': 'money', 'open_docs': 'money', 'gap': 'money'})
+
+
+def _stale_ar(df, dt_):
+ o = O.get_odoo()
+ cutoff = (dt.date.fromisoformat(dt_) - dt.timedelta(days=180)).isoformat()
+ g = o.read_group('sale.order',
+ [('state', 'in', ['sale', 'done']), ('team_id', 'in', O.TEAM_IDS),
+ ('date_order', '>=', f'{cutoff} 00:00:00'), ('date_order', '<=', f'{dt_} 23:59:59')],
+ ['partner_id'], ['partner_id'], lazy=False)
+ active = {O.m2o_id(r['partner_id']) for r in g if r.get('partner_id')}
+ parts = o.search_read('res.partner', [('credit', '>', 500)] +
+ ([('id', 'not in', _ex())] if _ex() else []), ['name', 'credit'])
+ stale = [p for p in parts if p['id'] not in active]
+ amt = sum(p['credit'] for p in stale)
+ sample = sorted([{'customer': p['name'], 'owes': p['credit']} for p in stale],
+ key=lambda x: -x['owes'])[:25]
+ return _check('stale_ar', CATEGORIES[2], 'Customers owing money but quiet 180+ days',
+ 'high' if amt > 25000 else 'medium', 'asof', len(stale), amt, 'dollar',
+ 'Push collection and a win-back; provision if uncollectible.', sample, {'owes': 'money'})
+
+
+# ---- Payables (AP) ----------------------------------------------------------
+def _ap_overdue(df, dt_):
+ o = O.get_odoo()
+ dom = [('move_type', '=', 'in_invoice'), ('state', '=', 'posted'),
+ ('payment_state', 'in', ['not_paid', 'partial']), ('invoice_date_due', '<', dt_)]
+ n = o.search_count('account.move', dom)
+ amt = abs(_sum('account.move', dom, 'amount_residual_signed'))
+ rows = o.search_read('account.move', dom,
+ ['name', 'partner_id', 'invoice_date_due', 'amount_residual_signed', 'ref'],
+ limit=25, order='invoice_date_due asc')
+ sample = [{'bill': r.get('ref') or r['name'], 'vendor': O.m2o_name(r['partner_id']),
+ 'days_overdue': _days(dt_, r['invoice_date_due']),
+ 'open': abs(r.get('amount_residual_signed') or 0)} for r in rows]
+ return _check('ap_overdue', CATEGORIES[3], 'Vendor bills overdue (as of period end)',
+ 'medium', 'asof', n, amt, 'dollar',
+ 'Schedule/clear overdue payables; confirm none are duplicates before paying.',
+ sample, {'open': 'money', 'days_overdue': ('int', 'days overdue')})
+
+
+def _duplicate_bills(df, dt_):
+ o = O.get_odoo()
+ dom = [('move_type', '=', 'in_invoice'), ('state', '=', 'posted'),
+ ('invoice_date', '>=', df), ('invoice_date', '<=', dt_), ('ref', '!=', False)]
+ rows = o.search_read('account.move', dom, ['name', 'partner_id', 'ref', 'amount_total', 'invoice_date'])
+ seen = {}
+ for r in rows:
+ k = (O.m2o_id(r.get('partner_id')), str(r.get('ref')).strip().lower(), round(r.get('amount_total') or 0, 2))
+ seen.setdefault(k, []).append(r)
+ dups = [v for v in seen.values() if len(v) > 1]
+ sample = sorted([{'vendor': O.m2o_name(v[0]['partner_id']), 'ref': v[0]['ref'],
+ 'amount': v[0]['amount_total'] or 0, 'copies': len(v)} for v in dups],
+ key=lambda x: -x['amount'])[:25]
+ amt = sum((len(v) - 1) * (v[0]['amount_total'] or 0) for v in dups)
+ return _check('dup_bills', CATEGORIES[3], 'Possible duplicate vendor bills (same vendor/ref/amount)',
+ 'high' if dups else 'low', 'period', len(dups), amt, 'dollar',
+ 'Review before paying — duplicate bills cause double payment.', sample, {'amount': 'money'})
+
+
+# ---- Inventory & COGS -------------------------------------------------------
+def _negative_margin(df, dt_):
+ o = O.get_odoo()
+ dom = O.sale_line_domain(df, dt_, extra=[('margin', '<', 0)])
+ n = o.search_count('sale.order.line', dom)
+ loss = _sum('sale.order.line', dom, 'margin')
+ g = o.read_group('sale.order.line', dom, ['margin:sum', 'product_id'], ['product_id'], lazy=False)
+ rows = sorted([{'product': O.m2o_name(r['product_id']), 'margin_lost': r.get('margin') or 0}
+ for r in g if r.get('product_id')], key=lambda x: x['margin_lost'])[:25]
+ return _check('neg_margin', CATEGORIES[4], 'Sales below cost (negative margin) in period',
+ 'high' if loss < -5000 else 'medium', 'period', n, loss, 'dollar',
+ 'Reprice or stop selling these SKUs; check for costing errors driving false losses.',
+ rows, {'margin_lost': 'money'})
+
+
+def _negative_stock(df, dt_):
+ o = O.get_odoo()
+ dom = [('location_id.usage', '=', 'internal'), ('quantity', '<', 0)]
+ n = o.search_count('stock.quant', dom)
+ rows = o.search_read('stock.quant', dom, ['product_id', 'quantity'], limit=25, order='quantity asc')
+ sample = [{'product': O.m2o_name(r['product_id']), 'on_hand': r['quantity']} for r in rows]
+ return _check('neg_stock', CATEGORIES[4], 'Negative on-hand stock (impossible quantities)',
+ 'high' if n > 20 else 'medium', 'current', n, None, None,
+ 'Fix receipts/adjustments — negative on-hand distorts inventory valuation and COGS.',
+ sample, {'on_hand': 'num'})
+
+
+def _product_master(df, dt_):
+ o = O.get_odoo()
+ prods = o.search_read('product.product', [('active', '=', True), ('default_code', '!=', False)],
+ ['id', 'default_code', 'name', 'standard_price', 'type', 'sale_ok', 'categ_id'])
+ q = o.read_group('stock.quant', [('location_id.usage', '=', 'internal')],
+ ['product_id', 'quantity:sum'], ['product_id'], lazy=False)
+ onhand = {O.m2o_id(r['product_id']): (r.get('quantity') or 0.0) for r in q if r.get('product_id')}
+ roots = {c['id'] for c in o.search_read('product.category', [('parent_id', '=', False)], ['id'])}
+ uncosted, dup, uncat = [], {}, []
+ for p in prods:
+ oh = onhand.get(p['id'], 0.0)
+ if p.get('type') == 'product' and oh > 0 and (p.get('standard_price') or 0) <= 0:
+ uncosted.append({'sku': p['default_code'], 'product': p['name'], 'on_hand': oh})
+ dup.setdefault(str(p['default_code']).strip(), []).append(p['name'])
+ if p.get('sale_ok') and O.m2o_id(p.get('categ_id')) in roots:
+ uncat.append({'sku': p['default_code'], 'product': p['name']})
+ dups = [{'sku': k, 'records': len(v)} for k, v in dup.items() if len(v) > 1]
+ c_unc = _check('uncosted', CATEGORIES[4], 'In-stock SKUs with zero cost (valuation gap)',
+ 'medium', 'current', len(uncosted), None, None,
+ 'Set standard cost — these read as $0 inventory and distort margin and valuation.',
+ sorted(uncosted, key=lambda x: -x['on_hand'])[:25], {'on_hand': 'num'})
+ c_dup = _check('dup_codes', CATEGORIES[5], 'Duplicate active SKU codes', 'medium', 'current',
+ len(dups), None, None, 'Merge/retire duplicates — shared codes double-count.',
+ sorted(dups, key=lambda x: -x['records'])[:25], {'records': 'int'})
+ c_cat = _check('uncat', CATEGORIES[5], 'Sellable products with no real category', 'low', 'current',
+ len(uncat), None, None, 'Assign a category so by-category reporting works.', uncat[:25], {})
+ return [c_unc, c_dup, c_cat]
+
+
+def _orders_no_rep(df, dt_):
+ o = O.get_odoo()
+ dom = [('state', 'in', ['sale', 'done']), ('team_id', 'in', O.TEAM_IDS), ('user_id', '=', False),
+ ('date_order', '>=', f'{df} 00:00:00'), ('date_order', '<=', f'{dt_} 23:59:59')]
+ n = o.search_count('sale.order', dom)
+ amt = _sum('sale.order', dom, 'amount_untaxed')
+ rows = o.search_read('sale.order', dom, ['name', 'partner_id', 'amount_untaxed'],
+ limit=25, order='amount_untaxed desc')
+ sample = [{'order': r['name'], 'customer': O.m2o_name(r['partner_id']), 'amount': r['amount_untaxed']}
+ for r in rows]
+ return _check('no_rep', CATEGORIES[5], 'Orders with no salesperson assigned', 'low', 'period',
+ n, amt, 'dollar', 'Assign a salesperson for correct attribution/commissions.',
+ sample, {'amount': 'money'})
+
+
+# ---- orchestration ----------------------------------------------------------
+def _overdue_activities(df, dt_):
+ """Scheduled activities (mail.activity) past their deadline — at probe time ALL 811 open
+ activities were overdue: the activity system is dead-lettered, so nothing scheduled there
+ can be trusted as a reminder."""
+ o = O.get_odoo()
+ today = P.today().isoformat()
+ n_open = o.search_count('mail.activity', [])
+ over = O.search_read('mail.activity', [('date_deadline', '<', today)],
+ ['user_id', 'date_deadline', 'res_model', 'summary'])
+ by_user = {}
+ for a in over:
+ u = O.m2o_name(a.get('user_id')) or '(unassigned)'
+ e = by_user.setdefault(u, {'user': u, 'overdue': 0, 'oldest': today})
+ e['overdue'] += 1
+ d = str(a.get('date_deadline') or today)[:10]
+ if d < e['oldest']:
+ e['oldest'] = d
+ sample = sorted(by_user.values(), key=lambda x: -x['overdue'])[:15]
+ return _check('overdue_activities', CATEGORIES[5], 'Scheduled activities past deadline',
+ 'medium' if len(over) < 50 else 'high', 'current', len(over), None, 'count',
+ f'{len(over)} of {n_open} open activities are overdue - clear or delete them; '
+ 'a reminder system where everything is late reminds nobody of anything.',
+ sample, {'overdue': 'int'})
+
+
+def _partner_tag_hygiene(df, dt_):
+ """Partner tags duplicate the BU concept (Fisch/Royal tags vs team_id) — flag duplicate tag
+ names and tag-vs-team mismatches (a Royal-tagged customer on the Fisch team)."""
+ o = O.get_odoo()
+ tags = O.search_read('res.partner.category', [], ['name'])
+ names = {}
+ for t in tags:
+ names.setdefault((t['name'] or '').strip().upper(), []).append(t['id'])
+ dups = {k: v for k, v in names.items() if len(v) > 1}
+ issues = [{'issue': f'duplicate tag name "{k}" ({len(v)} tags)', 'count': len(v)} for k, v in dups.items()]
+ mism = 0
+ sample_m = []
+ for tag_name, team in (('FISCH', 6), ('ROYAL', 5)): # tag says one BU, team says the OTHER
+ ids = [i for k, v in names.items() if k == tag_name for i in v]
+ if ids:
+ rows = O.search_read('res.partner',
+ [('category_id', 'in', ids), ('team_id', '=', team)],
+ ['name'], limit=10)
+ n = o.search_count('res.partner', [('category_id', 'in', ids), ('team_id', '=', team)])
+ mism += n
+ sample_m += [{'issue': f'tagged {tag_name.title()} but on the other BU team',
+ 'partner': r['name']} for r in rows[:5]]
+ total = sum(i['count'] for i in issues) + mism
+ return _check('tag_hygiene', CATEGORIES[5], 'Partner tag hygiene (duplicates / BU mismatch)',
+ 'low', 'current', total, None, 'count',
+ 'Merge duplicate tags; align Fisch/Royal tags with the sales team (tags feed '
+ 'segmentation - a mismatch silently mis-buckets the customer).',
+ issues + sample_m, {})
+
+
+def _no_terms_invoices(df, dt_):
+ """Posted customer invoices with NO payment terms — due date defaults silently and dunning
+ logic has nothing to anchor on."""
+ o = O.get_odoo()
+ dom = [('move_type', '=', 'out_invoice'), ('state', '=', 'posted'),
+ ('invoice_payment_term_id', '=', False),
+ ('invoice_date', '>=', f'{df}'), ('invoice_date', '<=', f'{dt_}')]
+ if _ex():
+ dom.append(('partner_id', 'not in', _ex()))
+ n = o.search_count('account.move', dom)
+ amt = _sum('account.move', dom, 'amount_total')
+ rows = O.search_read('account.move', dom, ['name', 'partner_id', 'invoice_date', 'amount_total'],
+ limit=15, order='amount_total desc')
+ sample = [{'invoice': r['name'], 'customer': O.m2o_name(r['partner_id']),
+ 'date': str(r['invoice_date'])[:10], 'amount': r['amount_total']} for r in rows]
+ return _check('no_terms', CATEGORIES[2], 'Invoices posted without payment terms',
+ 'low' if amt < 25000 else 'medium', 'period', n, amt, 'dollar',
+ 'Set a default payment term on these customers - no terms means the due date '
+ 'and any dunning cadence are meaningless for them.',
+ sample, {'amount': 'money'})
+
+
+# Economic-nexus (Wayfair) SALES thresholds by state, 2026 — transaction-count tests are mostly
+# repealed so only the revenue test is monitored. None = no state sales tax (NH/OR/MT/DE).
+# NY is $500k AND 100 sales; AK is local-option (monitored at $100k). Source: Avalara/TaxJar
+# state guides — VERIFY WITH THE CPA before registering anywhere; this is a radar, not advice.
+NEXUS_THRESHOLDS = {
+ 'AL': 250000, 'AK': 100000, 'AZ': 100000, 'AR': 100000, 'CA': 500000, 'CO': 100000,
+ 'CT': 100000, 'DE': None, 'FL': 100000, 'GA': 100000, 'HI': 100000, 'ID': 100000,
+ 'IL': 100000, 'IN': 100000, 'IA': 100000, 'KS': 100000, 'KY': 100000, 'LA': 100000,
+ 'ME': 100000, 'MD': 100000, 'MA': 100000, 'MI': 100000, 'MN': 100000, 'MS': 250000,
+ 'MO': 100000, 'MT': None, 'NE': 100000, 'NV': 100000, 'NH': None, 'NJ': 100000,
+ 'NM': 100000, 'NY': 500000, 'NC': 100000, 'ND': 100000, 'OH': 100000, 'OK': 100000,
+ 'OR': None, 'PA': 100000, 'RI': 100000, 'SC': 100000, 'SD': 100000, 'TN': 100000,
+ 'TX': 500000, 'UT': 100000, 'VT': 100000, 'VA': 100000, 'WA': 100000, 'WV': 100000,
+ 'WI': 100000, 'WY': 100000, 'DC': 100000}
+
+
+def nexus(t=None):
+ """Economic-nexus radar: trailing-12m invoiced revenue (posted invoices − credit notes) by
+ SHIP-TO state vs each state's Wayfair threshold. The company collects ZERO sales tax (all
+ resale-exempt) — crossing a threshold unnoticed creates back-liability. Trailing 12m is a
+ PROXY (states legally measure current/previous calendar year); status: OVER / >75% warming /
+ monitoring. Home state carries physical nexus regardless."""
+ t = t or P.today()
+ d12 = (t - dt.timedelta(days=365)).isoformat()
+
+ def _by_ship(mt, sign):
+ out = {}
+ for g in O.read_group('account.move',
+ [('move_type', '=', mt), ('state', '=', 'posted'),
+ ('invoice_date', '>=', d12)],
+ ['amount_untaxed:sum'], ['partner_shipping_id'], lazy=False):
+ pid = O.m2o_id(g.get('partner_shipping_id'))
+ if pid:
+ e = out.setdefault(pid, [0.0, 0])
+ e[0] += sign * (g.get('amount_untaxed') or 0.0)
+ e[1] += g.get('__count') or 0
+ return out
+ inv = _by_ship('out_invoice', 1)
+ for pid, (v, n) in _by_ship('out_refund', -1).items():
+ e = inv.setdefault(pid, [0.0, 0])
+ e[0] += v # refunds reduce state revenue; their doc count isn't a 'sale'
+ pids = list(inv.keys())
+ pstate = {}
+ for i in range(0, len(pids), 5000):
+ for p in O.search_read('res.partner', [('id', 'in', pids[i:i + 5000])],
+ ['state_id', 'country_id']):
+ code = None
+ if p.get('state_id'):
+ # state m2o name is the full name; pull the code from the state record below
+ code = O.m2o_id(p['state_id'])
+ pstate[p['id']] = {'state_rid': code,
+ 'country': O.m2o_name(p.get('country_id')) or ''}
+ srids = list({v['state_rid'] for v in pstate.values() if v['state_rid']})
+ scode = {}
+ for i in range(0, len(srids), 5000):
+ for s in O.search_read('res.country.state', [('id', 'in', srids[i:i + 5000])],
+ ['code', 'country_id']):
+ scode[s['id']] = {'code': s.get('code'), 'country': O.m2o_name(s.get('country_id'))}
+ per, unmapped_val, unmapped_n = {}, 0.0, 0
+ for pid, (val, n) in inv.items():
+ ps = pstate.get(pid) or {}
+ sc = scode.get(ps.get('state_rid')) or {}
+ code, ctry = sc.get('code'), (sc.get('country') or ps.get('country') or '')
+ if code and ('United States' in ctry or ctry == ''):
+ e = per.setdefault(code, {'state': code, 'revenue_12m': 0.0, 'n_invoices': 0})
+ e['revenue_12m'] += val
+ e['n_invoices'] += n
+ else:
+ unmapped_val += val
+ unmapped_n += n
+ rows = []
+ for e in per.values():
+ th = NEXUS_THRESHOLDS.get(e['state'])
+ e['threshold'] = th
+ e['pct_of_threshold'] = (e['revenue_12m'] / th * 100) if th else None
+ e['status'] = ('no sales tax' if th is None
+ else 'OVER' if e['revenue_12m'] >= th
+ else 'warming' if e['revenue_12m'] >= th * 0.75
+ else 'monitor')
+ rows.append(e)
+ rows.sort(key=lambda x: -(x['pct_of_threshold'] or 0))
+ total = sum(e['revenue_12m'] for e in per.values()) + unmapped_val
+ return {'rows': rows, 'unmapped_value': unmapped_val, 'unmapped_n': unmapped_n,
+ 'n_over': sum(1 for r in rows if r['status'] == 'OVER'),
+ 'n_warming': sum(1 for r in rows if r['status'] == 'warming'),
+ '_total_built': total, '_d12': d12}
+
+
+def nexus_validate(nx):
+ """Σ(state revenue) + unmapped == server net invoiced (partition, two aggregation paths)."""
+ d12 = nx['_d12']
+ srv = (O.sum_field('account.move',
+ [('move_type', '=', 'out_invoice'), ('state', '=', 'posted'),
+ ('invoice_date', '>=', d12)], 'amount_untaxed')
+ - O.sum_field('account.move',
+ [('move_type', '=', 'out_refund'), ('state', '=', 'posted'),
+ ('invoice_date', '>=', d12)], 'amount_untaxed'))
+ return [{'check': 'Nexus: Σ(state revenue) + unmapped == server net invoiced (12m)',
+ 'a': round(nx['_total_built'], 2), 'b': round(srv, 2),
+ 'gap': round(nx['_total_built'] - srv, 2),
+ 'ok': abs(nx['_total_built'] - srv) <= max(1.0, abs(srv) * 0.001)}]
+
+
+def _window(date_from=None, date_to=None, t=None):
+ t = t or P.today()
+ if date_from and date_to:
+ return date_from, date_to
+ return P.ytd(t) # default = year to date
+
+
+def run_all(date_from=None, date_to=None, t=None):
+ df, dt_ = _window(date_from, date_to, t)
+ checks = [_draft_moves(df, dt_), _unbilled_revenue(df, dt_), _grni(df, dt_),
+ _ancient_ar(df, dt_), _ar_recon(df, dt_), _stale_ar(df, dt_),
+ _ap_overdue(df, dt_), _duplicate_bills(df, dt_),
+ _negative_margin(df, dt_), _negative_stock(df, dt_), _orders_no_rep(df, dt_),
+ _overdue_activities(df, dt_), _partner_tag_hygiene(df, dt_),
+ _no_terms_invoices(df, dt_)]
+ checks += _product_master(df, dt_)
+ sev = {'high': 0, 'medium': 1, 'low': 2}
+ return sorted([c for c in checks if c],
+ key=lambda c: (sev.get(c['severity'], 9), -abs(c['impact'] or 0)))
+
+
+def by_category(date_from=None, date_to=None, t=None):
+ checks = run_all(date_from, date_to, t)
+ return {cat: [c for c in checks if c['category'] == cat] for cat in CATEGORIES}
+
+
+def summarize(checks):
+ """Build the summary KPIs from an already-computed checks list (no extra Odoo calls)."""
+ flagged = [c for c in checks if c['count'] > 0]
+ return {
+ 'total_checks': len(checks),
+ 'issues': len(flagged),
+ 'high': sum(1 for c in flagged if c['severity'] == 'high'),
+ 'dollar_at_stake': sum(abs(c['impact']) for c in flagged if c['impact_kind'] == 'dollar'),
+ 'clean': len(checks) - len(flagged),
+ }
+
+
+def summary(date_from=None, date_to=None, t=None):
+ return summarize(run_all(date_from, date_to, t))
+
+
+def validate(date_from=None, date_to=None, t=None):
+ """Light, independent reconciliations (no full run_all): aggregate vs row-by-row."""
+ df, dt_ = _window(date_from, date_to, t)
+ o = O.get_odoo()
+ out = []
+
+ # DNI: row-by-row delivered/invoiced quantity sums vs independent read_group aggregates
+ # over the SAME candidate domain (two aggregation paths must agree).
+ dom = [('order_id.state', 'in', ['sale', 'done']), ('order_id.team_id', 'in', O.TEAM_IDS),
+ ('qty_delivered', '>', 0),
+ ('order_id.date_order', '>=', f'{df} 00:00:00'),
+ ('order_id.date_order', '<=', f'{dt_} 23:59:59')]
+ if _ex():
+ dom.append(('order_partner_id', 'not in', _ex()))
+ lines, _ = _dni_lines(df, dt_)
+ row_qd = sum(r.get('qty_delivered') or 0 for r in lines)
+ row_qi = sum(r.get('qty_invoiced') or 0 for r in lines)
+ agg_qd = _sum('sale.order.line', dom, 'qty_delivered')
+ agg_qi = _sum('sale.order.line', dom, 'qty_invoiced')
+ out.append({'check': 'DNI: row Σ qty_delivered == read_group Σ (candidate lines, period)',
+ 'a': round(row_qd, 2), 'b': round(agg_qd, 2), 'gap': round(row_qd - agg_qd, 2),
+ 'ok': abs(row_qd - agg_qd) <= 0.01})
+ out.append({'check': 'DNI: row Σ qty_invoiced == read_group Σ (candidate lines, period)',
+ 'a': round(row_qi, 2), 'b': round(agg_qi, 2), 'gap': round(row_qi - agg_qi, 2),
+ 'ok': abs(row_qi - agg_qi) <= 0.01})
+
+ sdom = [('location_id.usage', '=', 'internal'), ('quantity', '<', 0)]
+ n_neg = o.search_count('stock.quant', sdom)
+ ids = o.search_read('stock.quant', sdom, ['id'])
+ out.append({'check': 'Negative-stock: search_count == len(search_read)',
+ 'a': n_neg, 'b': len(ids), 'gap': n_neg - len(ids), 'ok': n_neg == len(ids)})
+ return out
diff --git a/platform/modules/inventory.py b/platform/modules/inventory.py
new file mode 100644
index 0000000000000000000000000000000000000000..44c7b2479aecc3198417bb9e3932e234e699d9cf
--- /dev/null
+++ b/platform/modules/inventory.py
@@ -0,0 +1,294 @@
+"""Inventory module — working capital tied up, dead stock, stockouts blocking revenue,
+ABC, slow movers, turnover.
+
+Valuation: on-hand qty (stock.quant, internal locations) × standard cost. (stock.quant.value
+is a non-stored computed field Odoo refuses to aggregate, so standard-cost valuation is used
+and is independently cross-checked.) Sales velocity from sale.order.line over LTM (RI+FFS).
+"""
+import sys
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import pandas as pd
+import core.odoo as O
+import core.periods as P
+
+
+def _cat_main_map():
+ cats = O.search_read('product.category', [], ['id', 'complete_name'])
+ out = {}
+ for c in cats:
+ parts = [x.strip() for x in (c['complete_name'] or '').split('/')]
+ out[c['id']] = parts[1] if len(parts) >= 2 else (parts[0] if parts else None)
+ return out
+
+
+def _build(t=None):
+ """One master frame: product × on-hand × cost × category × LTM sales."""
+ t = t or P.today()
+ o = O.get_odoo()
+
+ # On-hand qty per product (internal locations only)
+ q = o.read_group('stock.quant', [('location_id.usage', '=', 'internal')],
+ ['product_id', 'quantity:sum'], ['product_id'], lazy=False)
+ onhand = {O.m2o_id(r['product_id']): (r.get('quantity') or 0.0)
+ for r in q if r.get('product_id')}
+
+ # Products (coded). 'type' lets us separate storable goods from services
+ # (delivery charges etc. are services — they can't "stock out").
+ fields = ['id', 'default_code', 'name', 'categ_id', 'standard_price', 'sale_ok', 'type']
+ prods = o.search_read('product.product', [('default_code', '!=', False)], fields)
+ catmap = _cat_main_map()
+
+ # LTM sales per product (line level, RI+FFS scope)
+ lf, lt = P.ltm(t)
+ s = o.read_group('sale.order.line', O.sale_line_domain(lf, lt),
+ ['product_id', 'price_subtotal:sum', 'product_uom_qty:sum'],
+ ['product_id'], lazy=False)
+ rev = {O.m2o_id(r['product_id']): (r.get('price_subtotal') or 0.0) for r in s if r.get('product_id')}
+ qty = {O.m2o_id(r['product_id']): (r.get('product_uom_qty') or 0.0) for r in s if r.get('product_id')}
+
+ rows = []
+ for p in prods:
+ pid = p['id']
+ oh = onhand.get(pid, 0.0)
+ cost = p.get('standard_price') or 0.0
+ rows.append({
+ 'product_id': pid,
+ 'sku': str(p['default_code']).strip(),
+ 'name': p['name'],
+ 'type': p.get('type') or '',
+ 'storable': (p.get('type') == 'product'),
+ 'category': catmap.get(O.m2o_id(p.get('categ_id'))) or '(uncategorized)',
+ 'cost': cost,
+ 'on_hand': oh,
+ 'inv_value': oh * cost,
+ 'rev_ltm': rev.get(pid, 0.0),
+ 'qty_ltm': qty.get(pid, 0.0),
+ })
+ return pd.DataFrame(rows), (lf, lt)
+
+
+def summary(t=None):
+ df, (lf, lt) = _build(t)
+ in_stock = df[df['on_hand'] > 0]
+ dead = df[(df['inv_value'] >= 1000) & (df['rev_ltm'] < 100)]
+ # stockouts only make sense for STORABLE goods (services like delivery never stock)
+ stockout = df[(df['storable']) & (df['rev_ltm'] >= 5000) & (df['on_hand'] <= 0)]
+ uncosted = in_stock[in_stock['cost'] <= 0]
+ return {
+ 'ltm_window': f'{lf} → {lt}',
+ 'total_inv_value': float(df['inv_value'].sum()),
+ 'total_on_hand_units': float(df['on_hand'].sum()),
+ 'skus_in_stock': int((df['on_hand'] > 0).sum()),
+ 'dead_skus': int(len(dead)),
+ 'dead_value': float(dead['inv_value'].sum()),
+ 'stockout_skus': int(len(stockout)),
+ 'stockout_rev_ltm': float(stockout['rev_ltm'].sum()),
+ 'uncosted_in_stock_skus': int(len(uncosted)),
+ }
+
+
+def by_category(t=None):
+ df, _ = _build(t)
+ g = df.groupby('category').agg(
+ inv_value=('inv_value', 'sum'),
+ rev_ltm=('rev_ltm', 'sum'),
+ skus=('product_id', 'count'),
+ in_stock=('on_hand', lambda s: int((s > 0).sum())),
+ ).reset_index()
+ # crude turnover proxy: LTM revenue / on-hand value (higher = faster)
+ g['turnover_x'] = g.apply(lambda r: (r['rev_ltm'] / r['inv_value']) if r['inv_value'] > 0 else None, axis=1)
+ return g.sort_values('inv_value', ascending=False).to_dict('records')
+
+
+def dead_stock(t=None, limit=50):
+ df, _ = _build(t)
+ d = df[(df['inv_value'] >= 1000) & (df['rev_ltm'] < 100)]
+ return d.sort_values('inv_value', ascending=False).head(limit)[
+ ['sku', 'name', 'category', 'on_hand', 'cost', 'inv_value', 'rev_ltm']].to_dict('records')
+
+
+def stockouts(t=None, limit=50):
+ df, _ = _build(t)
+ s = df[(df['storable']) & (df['rev_ltm'] >= 5000) & (df['on_hand'] <= 0)]
+ return s.sort_values('rev_ltm', ascending=False).head(limit)[
+ ['sku', 'name', 'category', 'on_hand', 'rev_ltm', 'qty_ltm']].to_dict('records')
+
+
+def abc(t=None):
+ """ABC by LTM revenue contribution. A=top 80%, B=next 15%, C=last 5%."""
+ df, _ = _build(t)
+ d = df[df['rev_ltm'] > 0].sort_values('rev_ltm', ascending=False).copy()
+ total = d['rev_ltm'].sum() or 1.0
+ d['cum'] = d['rev_ltm'].cumsum() / total
+ def cls(c):
+ return 'A' if c <= 0.80 else ('B' if c <= 0.95 else 'C')
+ d['abc'] = d['cum'].apply(cls)
+ out = d.groupby('abc').agg(skus=('product_id', 'count'),
+ rev_ltm=('rev_ltm', 'sum'),
+ inv_value=('inv_value', 'sum')).reset_index()
+ return out.to_dict('records')
+
+
+# ----------------------------------------------------------- deeper analytics
+_CARRY_PCT = 25.0 # default annual carrying cost as a % of inventory value (capital + storage + obsolescence)
+_COVERAGE_BUCKETS = [('Critical (<15d)', 0, 15), ('Lean (15–45d)', 15, 45),
+ ('Healthy (45–120d)', 45, 120), ('Ample (120–270d)', 120, 270),
+ ('Overstock (270–540d)', 270, 540), ('Excess (>540d)', 540, 1e15)]
+
+
+def _enrich(df, target_days):
+ """Add daily run-rate, days-of-supply, COGS, and excess-vs-target columns."""
+ df = df.copy()
+ daily = df['qty_ltm'] / 365.0
+ df['daily_rate'] = daily
+ df['cogs_ltm'] = df['qty_ltm'] * df['cost']
+
+ def _dos(r):
+ if r['daily_rate'] > 0:
+ return r['on_hand'] / r['daily_rate']
+ return float('inf') if r['on_hand'] > 0 else 0.0
+ df['dos'] = df.apply(_dos, axis=1)
+ df['target_units'] = daily * target_days
+ df['excess_units'] = (df['on_hand'] - df['target_units']).clip(lower=0)
+ df['excess_value'] = df['excess_units'] * df['cost']
+ return df
+
+
+def analytics(t=None, target_days=180, carry_pct=_CARRY_PCT):
+ """Inventory health analytics from ONE build: overstock (excess vs a target days-of-supply), the
+ coverage-profile distribution, turnover, average days-of-supply, and the carrying cost of excess."""
+ df, (lf, lt) = _build(t)
+ df = _enrich(df, target_days)
+ instock = df[(df['storable']) & (df['on_hand'] > 0)]
+ total_inv = float(df['inv_value'].sum())
+ total_cogs = float(df['cogs_ltm'].sum())
+
+ # overstock = sells, but holds materially more than the target coverage
+ over = df[(df['storable']) & (df['on_hand'] > 0) & (df['qty_ltm'] > 0)
+ & (df['dos'] > target_days) & (df['excess_value'] > 0)]
+ over_value = float(over['excess_value'].sum())
+ overrows = [{'sku': r['sku'], 'code': r['sku'], 'product': r['name'], 'category': r['category'],
+ 'on_hand': float(r['on_hand']),
+ 'dos': (None if r['dos'] == float('inf') else round(float(r['dos']), 0)),
+ 'excess_units': float(r['excess_units']), 'excess_value': float(r['excess_value']),
+ 'carry_cost': float(r['excess_value']) * (carry_pct / 100.0), 'rev_ltm': float(r['rev_ltm'])}
+ for _, r in over.sort_values('excess_value', ascending=False).head(80).iterrows()]
+
+ dead = df[(df['inv_value'] >= 1000) & (df['rev_ltm'] < 100)]
+
+ # coverage profile (in-stock storable, by days-of-supply)
+ prof = []
+ for nm, lo, hi in _COVERAGE_BUCKETS:
+ sub = instock[(instock['qty_ltm'] > 0) & (instock['dos'] >= lo) & (instock['dos'] < hi)]
+ prof.append({'bucket': nm, 'skus': int(len(sub)), 'inv_value': float(sub['inv_value'].sum()),
+ 'units': float(sub['on_hand'].sum())})
+ nosale = instock[instock['qty_ltm'] <= 0]
+ prof.append({'bucket': 'No recent sales', 'skus': int(len(nosale)),
+ 'inv_value': float(nosale['inv_value'].sum()), 'units': float(nosale['on_hand'].sum())})
+
+ healthy_val = sum(p['inv_value'] for p in prof if p['bucket'].startswith(('Healthy', 'Ample')))
+ excess_val = sum(p['inv_value'] for p in prof if p['bucket'].startswith(('Overstock', 'Excess', 'No recent')))
+ return {
+ 'window': f'{lf} → {lt}', 'target_days': target_days, 'carry_pct': carry_pct,
+ 'total_inv_value': total_inv,
+ 'turnover_x': (total_cogs / total_inv) if total_inv else None,
+ 'avg_dos': (total_inv / (total_cogs / 365.0)) if total_cogs else None,
+ 'overstock': overrows, 'overstock_value': over_value, 'overstock_skus': int(len(over)),
+ 'carrying_cost': over_value * (carry_pct / 100.0),
+ 'coverage': prof, 'healthy_value': healthy_val, 'excess_value_total': excess_val,
+ 'dead_value': float(dead['inv_value'].sum()), 'dead_skus': int(len(dead)),
+ }
+
+
+def _bucket(dos_raw, on_hand, qty_ltm):
+ """Coverage-bucket label for one SKU from its days-of-supply (matches the coverage profile)."""
+ if on_hand <= 0:
+ return 'Out of stock'
+ if qty_ltm <= 0:
+ return 'No recent sales'
+ for nm, lo, hi in _COVERAGE_BUCKETS:
+ if lo <= dos_raw < hi:
+ return nm
+ return _COVERAGE_BUCKETS[-1][0]
+
+
+# the coverage facet, worst→best, for the SKU directory filter
+COVERAGE_LABELS = ['Out of stock'] + [b[0] for b in _COVERAGE_BUCKETS] + ['No recent sales']
+
+
+def sku_inventory(target_days=180, carry_pct=_CARRY_PCT, t=None):
+ """Per-SKU-code inventory position for the SKU module — keyed by SKU code (variants merged the
+ same way the SKU module merges them). CONSOLIDATED: on-hand stock is one physical warehouse, not
+ brand-tagged, so this is brand-independent. Returns {code: {name, category, storable, on_hand,
+ inv_value, unit_cost, qty_ltm, dos (None=never sells through), bucket, excess_units, excess_value,
+ carry_cost, turns, target_units, target_days}}."""
+ df, _ = _build(t)
+ df = _enrich(df, target_days)
+ g = df.groupby('sku').agg(
+ name=('name', 'first'), category=('category', 'first'), storable=('storable', 'max'),
+ on_hand=('on_hand', 'sum'), inv_value=('inv_value', 'sum'),
+ cogs_ltm=('cogs_ltm', 'sum'), qty_ltm=('qty_ltm', 'sum'), rev_ltm=('rev_ltm', 'sum'),
+ ).reset_index()
+ out = {}
+ for r in g.itertuples(index=False):
+ daily = r.qty_ltm / 365.0
+ dos_raw = (r.on_hand / daily) if daily > 0 else (float('inf') if r.on_hand > 0 else 0.0)
+ target_units = daily * target_days
+ excess_units = max(r.on_hand - target_units, 0.0)
+ # code-level unit cost: on-hand-weighted where in stock, else the LTM COGS unit cost
+ unit_cost = (r.inv_value / r.on_hand) if r.on_hand > 0 else (
+ (r.cogs_ltm / r.qty_ltm) if r.qty_ltm > 0 else 0.0)
+ excess_value = excess_units * unit_cost
+ out[r.sku] = {
+ 'name': r.name, 'category': r.category, 'storable': bool(r.storable),
+ 'on_hand': float(r.on_hand), 'inv_value': float(r.inv_value),
+ 'unit_cost': float(unit_cost), 'qty_ltm': float(r.qty_ltm),
+ 'dos': (None if dos_raw == float('inf') else round(float(dos_raw), 0)),
+ 'bucket': _bucket(dos_raw, r.on_hand, r.qty_ltm),
+ 'excess_units': float(excess_units), 'excess_value': float(excess_value),
+ 'carry_cost': float(excess_value) * (carry_pct / 100.0),
+ 'turns': (float(r.cogs_ltm) / float(r.inv_value)) if r.inv_value > 0 else None,
+ 'target_units': float(target_units), 'target_days': target_days,
+ }
+ return out
+
+
+def validate(t=None):
+ df, _ = _build(t)
+ o = O.get_odoo()
+ checks = []
+
+ # 1. On-hand units: Σ(per-product) == ungrouped Odoo total
+ g = o.read_group('stock.quant', [('location_id.usage', '=', 'internal')],
+ ['quantity:sum'], [], lazy=False)
+ odoo_total = (g[0].get('quantity') or 0.0) if g else 0.0
+ # our df only covers coded products; compare coded-product on-hand to a coded-only Odoo total
+ coded_ids = set(df['product_id'])
+ ours = float(df['on_hand'].sum())
+ checks.append({
+ 'check': 'On-hand units (coded SKUs) ≤ Odoo total internal qty',
+ 'a': round(ours, 0), 'b': round(odoo_total, 0),
+ 'gap': round(odoo_total - ours, 0),
+ 'ok': ours <= odoo_total + 1}) # coded ≤ all (uncoded/raw exist)
+
+ # 2. Σ(category inv_value) == total inv_value
+ cat_sum = sum(c['inv_value'] for c in by_category(t))
+ tot = float(df['inv_value'].sum())
+ checks.append({
+ 'check': 'Inv value: Σ(category) == total',
+ 'a': round(cat_sum, 2), 'b': round(tot, 2),
+ 'gap': round(cat_sum - tot, 2),
+ 'ok': abs(cat_sum - tot) <= 1.0})
+
+ # 3. inv_value definition holds for a sampled SKU (qty×cost)
+ smp = df[df['on_hand'] > 0].head(1)
+ if len(smp):
+ r = smp.iloc[0]
+ recomputed = r['on_hand'] * r['cost']
+ checks.append({
+ 'check': f"inv_value == on_hand×cost (sample {r['sku']})",
+ 'a': round(float(r['inv_value']), 2), 'b': round(float(recomputed), 2),
+ 'gap': round(float(r['inv_value'] - recomputed), 2),
+ 'ok': abs(r['inv_value'] - recomputed) <= 0.01})
+ return checks
diff --git a/platform/modules/management.py b/platform/modules/management.py
new file mode 100644
index 0000000000000000000000000000000000000000..05c8dc16f74306e95704eadde193e8ec021af9be
--- /dev/null
+++ b/platform/modules/management.py
@@ -0,0 +1,224 @@
+"""modules/management.py — Management Income Statements (FFS-M / RI-M / GD-M / BU-M),
+reproduced from RAW ODOO for the Sep-2024 cutover onward.
+
+Domain logic only (pure: data in -> plain dicts out). The heavy lifting is in
+core/management_pl.py (live clean-entity pull + `-M = clean + overlay`); this module shapes it
+for the page and provides validate(). See MODEL_LOGIC_MAP.md §10.
+
+Company-level financial reporting with its own entity + month picker (the management basis spans
+Fisch / Royal / Giftware + a consolidation — not the 2-team Fisch/Royal DBA brand), so it is an HQ
+module that ignores the global brand selector.
+"""
+import json
+import os
+
+from core import management_pl as MP
+from core import odoo as O
+
+ENTITIES = [('FFS', 'Fisch (FFS)'), ('RI', 'Royal (RI)'), ('GD', 'Giftware (GD)'), ('BU', 'Consolidated')]
+ENTITY_LABEL = dict(ENTITIES)
+_EXCL_PATH = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'data', 'mgmt_exclusions.json')
+_SECTION_ORDER = ['income', 'other_income', 'cogs', 'expense', 'deprec', '']
+_SECTION_LABEL = {'income': 'Income', 'other_income': 'Other income', 'cogs': 'Cost of revenue',
+ 'expense': 'Operating expense', 'deprec': 'Depreciation', '': ''}
+
+
+def months_available():
+ """Months we can reproduce -M for = the months present in the extracted overlay
+ (Sep-2024 .. last reconciled month in the model). Ascending list of (year, month)."""
+ out = []
+ for ym in sorted(MP._overlay().keys()):
+ y, m = ym.split('-')
+ out.append((int(y), int(m)))
+ return out
+
+
+def summary_kpis(year, month, entity):
+ s = MP.statement(year, month, entity)
+ rev = s['income']
+ return {'income': rev, 'gross_profit': s['gross_profit'], 'net_profit': s['net_profit'],
+ 'gross_margin': (s['gross_profit'] / rev * 100) if rev else 0.0,
+ 'net_margin': (s['net_profit'] / rev * 100) if rev else 0.0}
+
+
+def statement(year, month, entity):
+ """Section subtotals (income / cogs / gross / opex / deprec / net) for one entity-month."""
+ return MP.statement(year, month, entity)
+
+
+def line_rows(year, month, entity):
+ """Account-level rows for the statement table: {section,code,account,amount}, P&L-ordered."""
+ s = MP.statement(year, month, entity)
+ name_by_code = {a['code']: a['name'] for a in MP.account_master().values()}
+ rows = [{'section': _SECTION_LABEL.get(MP._bucket(code) or '', ''),
+ 'code': code, 'account': name_by_code.get(code, ''), 'amount': round(amt, 2)}
+ for code, amt in s['lines'].items()]
+ order = {lbl: i for i, lbl in enumerate(_SECTION_LABEL[k] for k in _SECTION_ORDER)}
+ rows.sort(key=lambda r: (order.get(r['section'], 9), str(r['code'])))
+ return rows
+
+
+def _exclusions():
+ """{entity: [{code,name,flag}]} — GL codes excluded from each entity's analytics (from the
+ model's -M tabs, via build_mgmt_overlay.py). flag=True = a real misclassification to flag."""
+ try:
+ with open(_EXCL_PATH, encoding='utf-8') as f:
+ return json.load(f)
+ except (FileNotFoundError, json.JSONDecodeError):
+ return {}
+
+
+def _odoo_base():
+ return os.environ.get('ODOO_URL', '').rstrip('/')
+
+
+def _move_links(gid, ana, start, end):
+ """Deep-links to the Odoo journal entries behind a misclassified balance, so the bookkeeper can
+ open each and re-tag its analytic. Read-only: these are just URLs into Odoo's own UI."""
+ base = _odoo_base()
+ if not base:
+ return []
+ lines = O.search_read('account.analytic.line',
+ [('date', '>=', start), ('date', '<=', end),
+ ('general_account_id', '=', gid), ('account_id', '=', ana)], ['move_line_id'])
+ mlids = [l['move_line_id'][0] for l in lines if l.get('move_line_id')]
+ moves = []
+ if mlids:
+ mls = O.search_read('account.move.line', [('id', 'in', mlids)], ['move_id'])
+ moves = sorted({ml['move_id'][0] for ml in mls if ml.get('move_id')})
+ return [f"{base}/web#id={mid}&model=account.move&view_type=form" for mid in moves]
+
+
+def classification_flags(year=None, month=None):
+ """Health check: any *flaggable* excluded GL code with a nonzero balance in its entity's analytic
+ is a misclassification (e.g. an Amazon cost booked to Fisch, or a mortgage to a BU instead of HQ).
+ EBMS / inventory adjustments are excluded by design and never flagged. Each flag carries the
+ offending amount + click-to-fix Odoo journal-entry links. Defaults to the latest month."""
+ if year is None or month is None:
+ av = months_available()
+ if not av:
+ return []
+ year, month = av[-1]
+ excl = _exclusions()
+ start, end = MP.month_bounds(year, month)
+ code_id = {a['code']: gid for gid, a in MP.account_master().items()}
+ flags = []
+ for entity, items in excl.items():
+ ana = MP.ENTITY_ANALYTIC.get(entity)
+ if ana is None:
+ continue
+ for it in items:
+ if not it.get('flag'):
+ continue
+ gid = code_id.get(it['code'])
+ if not gid:
+ continue
+ bal = O.sum_field('account.analytic.line',
+ [('date', '>=', start), ('date', '<=', end),
+ ('general_account_id', '=', gid), ('account_id', '=', ana)], 'amount')
+ if abs(bal) > 0.005:
+ flags.append({'entity': entity, 'entity_label': ENTITY_LABEL.get(entity, entity),
+ 'code': it['code'], 'account': it['name'], 'amount': round(bal, 2),
+ 'moves': _move_links(gid, ana, start, end)})
+ return flags
+
+
+def _recent_months(n, anchor=None):
+ """The last `n` (year, month) tuples ending at `anchor` (default = latest reproducible month,
+ else the current month)."""
+ import datetime
+ if anchor is None:
+ av = months_available()
+ anchor = av[-1] if av else (datetime.date.today().year, datetime.date.today().month)
+ y, m = anchor
+ out = []
+ for _ in range(n):
+ out.append((y, m)); m -= 1
+ if m == 0:
+ y, m = y - 1, 12
+ return list(reversed(out))
+
+
+def account_detail(code, months=13):
+ """Canonical financial-account view (consolidated, brand-independent): one GL account's monthly
+ trend split by business unit (clean analytic basis, management display sign) + recent posted
+ journal lines + an Odoo deep-link. Same data wherever the account is opened from. None if unknown."""
+ am = MP.account_master()
+ gid = next((i for i, a in am.items() if a['code'] == code), None)
+ if gid is None:
+ return None
+ acc = am[gid]
+ section = _SECTION_LABEL.get(MP._bucket(code) or '', '') or (acc.get('type') or '')
+ yms = _recent_months(months)
+ ent_keys = [('FFS', 'Fisch'), ('RI', 'Royal'), ('GD', 'GD'), ('HQ', 'HQ')]
+ trend = []
+ for (y, m) in yms:
+ ce = MP.clean_entities(y, m)
+ row = {'month': f'{y}-{m:02d}'}
+ tot = 0.0
+ for k, _lbl in ent_keys:
+ v = ce.get(k, {}).get(code, 0.0)
+ row[k] = round(v, 2); tot += v
+ tot += ce.get('Internal', {}).get(code, 0.0)
+ row['total'] = round(tot, 2)
+ trend.append(row)
+
+ base = _odoo_base()
+ jl = O.search_read('account.move.line', [('account_id', '=', gid), ('parent_state', '=', 'posted')],
+ ['date', 'move_id', 'partner_id', 'name', 'balance'], order='date desc', limit=30)
+ lines = []
+ for l in jl:
+ mid = l['move_id'][0] if l.get('move_id') else None
+ lines.append({'date': l.get('date') or '', 'entry': O.m2o_name(l.get('move_id')),
+ 'partner': O.m2o_name(l.get('partner_id')) or '', 'label': l.get('name') or '',
+ 'amount': round(l.get('balance') or 0.0, 2),
+ 'link': (f"{base}/web#id={mid}&model=account.move&view_type=form" if base and mid else None)})
+ return {'code': code, 'name': acc.get('name', ''), 'type': acc.get('type'), 'section': section,
+ 'window': f"{yms[0][0]}-{yms[0][1]:02d} -> {yms[-1][0]}-{yms[-1][1]:02d}",
+ 'window_total': round(sum(r['total'] for r in trend), 2),
+ 'odoo_link': (f"{base}/web#id={gid}&model=account.account&view_type=form" if base else None),
+ 'trend': trend, 'lines': lines}
+
+
+def validate(year=None, month=None):
+ """Reconcile the reproduced consolidated -M to INDEPENDENT Odoo aggregates (works on the Space,
+ no workbook): each headline = a separate read_group sum straight from Odoo. Defaults to the
+ latest reproducible month. Returns [{check,a,b,gap,ok}] per the platform module contract."""
+ if year is None or month is None:
+ avail = months_available()
+ if not avail:
+ return [{'check': 'overlay present (data/mgmt_overlay.json)', 'a': 0, 'b': 1, 'gap': -1, 'ok': False}]
+ year, month = avail[-1]
+ checks = []
+ start, end = MP.month_bounds(year, month)
+ clean = MP.clean_entities(year, month)
+ am = MP.account_master()
+ code_id = {a['code']: gid for gid, a in am.items()}
+ bu_ana = [MP.ENTITY_ANALYTIC[b] for b in MP.BUS]
+
+ for code, label in (('51000', 'Product Sales'), ('600000', 'Product Cost')):
+ gid = code_id.get(code)
+ indep = 0.0
+ if gid:
+ g = O.read_group('account.analytic.line',
+ domain=[('date', '>=', start), ('date', '<=', end),
+ ('general_account_id', '=', gid), ('account_id', 'in', bu_ana)],
+ fields=['amount:sum'], groupby=[], lazy=False)
+ indep = abs((g[0].get('amount') or 0.0) if g else 0.0) # display positive
+ repro = sum(clean.get(b, {}).get(code, 0.0) for b in MP.BUS)
+ gap = round(repro - indep, 2)
+ checks.append({'check': f'{code} {label} — consolidated clean vs direct Odoo sum',
+ 'a': round(repro, 2), 'b': round(indep, 2), 'gap': gap, 'ok': abs(gap) < 0.01})
+
+ # consolidation consistency: BU net == FFS + RI + GD net
+ bu_net = MP.statement(year, month, 'BU')['net_profit']
+ parts = sum(MP.statement(year, month, b)['net_profit'] for b in MP.BUS)
+ gap = round(bu_net - parts, 2)
+ checks.append({'check': 'BU-M net profit == FFS-M + RI-M + GD-M',
+ 'a': round(bu_net, 2), 'b': round(parts, 2), 'gap': gap, 'ok': abs(gap) < 0.01})
+
+ # classification health: no excluded GL code should post to the wrong entity's analytic
+ nflag = len(classification_flags(year, month))
+ checks.append({'check': 'No GL misclassifications (excluded codes in wrong business unit)',
+ 'a': nflag, 'b': 0, 'gap': nflag, 'ok': nflag == 0})
+ return checks
diff --git a/platform/modules/map.py b/platform/modules/map.py
new file mode 100644
index 0000000000000000000000000000000000000000..e627e16180d3bda185a6c3b0dbe38bd7c7e59049
--- /dev/null
+++ b/platform/modules/map.py
@@ -0,0 +1,304 @@
+"""Map module — every customer pinned at their EXACT street address (not city-aggregated).
+
+Coordinates resolve in this order, per customer:
+ 1. Odoo's own partner_latitude / partner_longitude when present;
+ 2. else a geocode of the street address, cached in the writable HF store (`geocoords.json`,
+ keyed by partner id + an address hash so a changed address re-geocodes). Geocoding uses the
+ free US Census batch geocoder (these customers are almost all US/NY-metro florists).
+Customers with no usable address (or a geocode that fails) fall to a list under the map.
+
+Odoo stays STRICTLY read-only — geocodes are cached in the platform's own store, never written back
+to Odoo. The map's purpose is select-and-export (e.g. to assign agents): box/lasso-select on the map
+builds an Excel list. Assigning agents happens in Odoo / via that export, never as an app write.
+"""
+import csv
+import io
+import hashlib
+
+import core.odoo as O
+import core.periods as P
+import core.store as store
+import modules.sales as sales_mod
+import modules.customers as cust_mod
+
+_GEO_NS = 'geocoords' # store file: {str(pid): {lat,lon,src,h,addr}}
+_BASE_FROM = '2015-01-01' # "all-time" floor for the customer base
+_CENSUS_URL = 'https://geocoding.geo.census.gov/geocoder/locations/addressbatch'
+# Americas bounds (US + AK/HI + PR/VI + Canada + Caribbean/Guyana) — wide enough for every real
+# customer, tight enough to still reject garbage coordinates (0,0 / Europe / Asia).
+_LAT_LO, _LAT_HI, _LON_LO, _LON_HI = 6.0, 60.0, -160.0, -58.0
+
+
+def _today_iso():
+ return P.today().isoformat()
+
+
+def _norm_state(s):
+ return (s or '').replace(' (US)', '').strip()
+
+
+def _addr_parts(p):
+ """(street, city, state, zip) cleaned from a res.partner row."""
+ street = ' '.join(x for x in [(p.get('street') or '').strip(),
+ (p.get('street2') or '').strip()] if x)
+ return (street, (p.get('city') or '').strip(),
+ _norm_state(O.m2o_name(p.get('state_id'))), (p.get('zip') or '').strip())
+
+
+def _addr_str(p):
+ return ', '.join(x for x in _addr_parts(p) if x)
+
+
+def _addr_hash(p):
+ return hashlib.sha1('|'.join(_addr_parts(p)).lower().encode('utf-8')).hexdigest()[:16]
+
+
+def _has_coords(p):
+ la, lo = p.get('partner_latitude'), p.get('partner_longitude')
+ return bool(la) and bool(lo) and (abs(la) > 1e-6 or abs(lo) > 1e-6)
+
+
+def _in_bounds(lat, lon):
+ return lat is not None and lon is not None and _LAT_LO <= lat <= _LAT_HI and _LON_LO <= lon <= _LON_HI
+
+
+def _base_pids(team_id=None, agent_pids=None):
+ """Partner ids of every customer with a confirmed order in scope (team/agent), giftware
+ excluded — via the same order_domain the rest of the app uses."""
+ g = O.read_group('sale.order',
+ sales_mod.order_domain(_BASE_FROM, _today_iso(), team_id, partner_ids=agent_pids),
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False)
+ return [O.m2o_id(r.get('partner_id')) for r in g if O.m2o_id(r.get('partner_id'))]
+
+
+def _read_partners(pids):
+ """One res.partner read: address + Odoo coords + agent, with agent ids resolved to names."""
+ if not pids:
+ return [], {}
+ # ('active','in',[True,False]) keeps archived partners that still carry orders, so the map
+ # covers every order customer and reconciles to the distinct-partner count.
+ parts = O.search_read('res.partner', [('id', 'in', list(pids)), ('active', 'in', [True, False])],
+ ['name', 'street', 'street2', 'city', 'state_id', 'zip', 'country_id',
+ 'partner_latitude', 'partner_longitude', 'agent_ids'])
+ aids = {a for p in parts for a in (p.get('agent_ids') or [])}
+ anames = ({x['id']: x['name'] for x in
+ O.search_read('res.partner', [('id', 'in', list(aids))], ['name'])} if aids else {})
+ return parts, anames
+
+
+def customer_locations(t=None, team_id=None, agent_pids=None):
+ """The map dataset. Returns {'located', 'unlocated', 'stats', 'validation'}.
+ Each located row: pid, customer, lat, lon, source, address, city, state, zip, agent,
+ rev_ltm, rev_total, orders, last_order. Unlocated rows carry a 'reason' instead of lat/lon."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ today = _today_iso()
+ dom = sales_mod.order_domain(_BASE_FROM, today, team_id, partner_ids=agent_pids)
+ # Wave 1 — five independent reads concurrently (this is the slow part): all-time revenue (which
+ # also yields the customer set), LTM revenue, last-order dates, the independent base count, and
+ # the geocode cache. Running them in parallel cuts a cold load from ~15s to ~5s.
+ all_rev, ltm_rev, last_ord, base_indep, cache = O.parallel([
+ lambda: cust_mod._cust_rev(_BASE_FROM, today, team_id, agent_pids),
+ lambda: cust_mod._cust_rev(lf, lt, team_id, agent_pids),
+ lambda: cust_mod._last_order_dates(_BASE_FROM, today, team_id, agent_pids),
+ lambda: O.distinct_count('sale.order', dom, 'partner_id'),
+ lambda: (store.get(_GEO_NS) if store.available() else {}),
+ ])
+ # Agent-scoped map = the agent's WHOLE assigned book (a "my customers" coverage view), NOT just
+ # the order-history subset. Active accounts with an address that simply haven't ordered yet are
+ # still the agent's customers and belong on their map — so the count reconciles to the Agents-page
+ # book (e.g. an agent's 114 assigned customers show 114, not the 80 who happen to have ordered).
+ # A never-ordered customer has no BU, so this only applies in the All-BU view; a specific-BU map
+ # stays order-based, since BU is derived from orders (owner 2026-07-21).
+ book_scoped = agent_pids is not None and team_id is None
+ pids = list(set(all_rev.keys()) | (set(agent_pids) if book_scoped else set()))
+ if not pids:
+ return {'located': [], 'unlocated': [],
+ 'stats': {'total': 0, 'located': 0, 'unlocated': 0, 'no_agent': 0, 'need_geocode': 0},
+ 'validation': validate_rows(0, 0, 0, base_indep)}
+ parts, anames = _read_partners(pids) # Wave 2 — needs the customer ids from Wave 1
+
+ located, unlocated = [], []
+ for p in parts:
+ pid = p['id']
+ ag = p.get('agent_ids') or []
+ row = {
+ 'pid': pid, 'customer': p.get('name') or f'#{pid}',
+ 'address': _addr_str(p),
+ 'city': ((p.get('city') or '').strip().title()) or '(none)',
+ 'state': _norm_state(O.m2o_name(p.get('state_id'))) or '(none)',
+ 'zip': (p.get('zip') or '').strip(),
+ 'agent': (anames.get(ag[0]) or '(none)') if ag else '(none)',
+ 'rev_ltm': (ltm_rev.get(pid) or {}).get('rev', 0.0),
+ 'rev_total': (all_rev.get(pid) or {}).get('rev', 0.0),
+ 'orders': (all_rev.get(pid) or {}).get('orders', 0),
+ 'last_order': last_ord.get(pid, ''),
+ }
+ lat = lon = src = None
+ if _has_coords(p):
+ lat, lon, src = p['partner_latitude'], p['partner_longitude'], 'odoo'
+ else:
+ c = cache.get(str(pid))
+ if c and c.get('h') == _addr_hash(p) and c.get('lat') is not None:
+ lat, lon, src = c['lat'], c['lon'], c.get('src', 'geocode')
+ if _in_bounds(lat, lon):
+ located.append({**row, 'lat': round(lat, 6), 'lon': round(lon, 6), 'source': src})
+ else:
+ _street, _city, _stt, _zip = _addr_parts(p)
+ geocodable = bool(_street and (_city or _zip))
+ if not row['address']:
+ reason = 'no address in Odoo'
+ elif (cache.get(str(pid)) or {}).get('src') == 'census_nomatch':
+ reason = 'address could not be located'
+ elif geocodable:
+ reason = 'not geocoded yet'
+ else:
+ reason = 'address too incomplete to locate'
+ unlocated.append({**row, 'reason': reason})
+
+ located.sort(key=lambda r: -r['rev_ltm'])
+ unlocated.sort(key=lambda r: -r['rev_ltm'])
+ stats = {
+ 'total': len(parts), 'located': len(located), 'unlocated': len(unlocated),
+ 'no_agent': sum(1 for r in (located + unlocated) if r['agent'] == '(none)'),
+ 'need_geocode': sum(1 for r in unlocated if r['reason'] == 'not geocoded yet'),
+ }
+ # Reconcile to the set we set out to map: the agent's full book when book-scoped, else the
+ # independent distinct-order-customer count.
+ recon = len(pids) if book_scoped else base_indep
+ return {'located': located, 'unlocated': unlocated, 'stats': stats,
+ 'validation': validate_rows(len(parts), len(located), len(unlocated), recon,
+ bad=[r for r in located if not _in_bounds(r['lat'], r['lon'])])}
+
+
+def coords_for(pids):
+ """{pid: {'lat','lon'}} for the given partners — Odoo's own coordinates, else the geocode
+ CACHE (read-only reuse; NEVER triggers geocoding). Wave-7 W11: the Customer table's Map
+ VIEW reads these off the pool rows; the standalone Map page retired the same day, and
+ this module survives as the geocode library."""
+ if not pids:
+ return {}
+ try:
+ cache = store.get(_GEO_NS) if store.available() else {}
+ parts = O.search_read(
+ 'res.partner', [('id', 'in', list(pids)), ('active', 'in', [True, False])],
+ ['street', 'street2', 'city', 'state_id', 'zip',
+ 'partner_latitude', 'partner_longitude'])
+ except Exception:
+ return {} # a table that renders without pins beats a table that cannot render
+ out = {}
+ for p in parts:
+ lat = lon = None
+ if _has_coords(p):
+ lat, lon = p['partner_latitude'], p['partner_longitude']
+ else:
+ c = cache.get(str(p['id']))
+ if c and c.get('h') == _addr_hash(p) and c.get('lat') is not None:
+ lat, lon = c['lat'], c['lon']
+ if _in_bounds(lat, lon):
+ out[p['id']] = {'lat': round(lat, 6), 'lon': round(lon, 6)}
+ return out
+
+
+def validate_rows(total, n_loc, n_unloc, base_indep, bad=None):
+ """Reconcile the map dataset to an independent Odoo aggregate (distinct order partners)."""
+ checks = [{
+ 'check': 'Map: located + unlocated == customers in scope',
+ 'a': n_loc + n_unloc, 'b': base_indep, 'gap': (n_loc + n_unloc) - base_indep,
+ 'ok': (n_loc + n_unloc) == base_indep,
+ }, {
+ 'check': 'Map: every plotted point within plausible bounds',
+ 'a': n_loc - len(bad or []), 'b': n_loc, 'gap': -len(bad or []), 'ok': not (bad or []),
+ }]
+ return checks
+
+
+def validate(team_id=None):
+ """Registry hook for validate.py."""
+ return customer_locations(team_id=team_id)['validation']
+
+
+# ---------------------------------------------------------------- geocoding (US Census batch)
+def _geocodable_pids(team_id=None):
+ """Every customer that can appear on a map: order-customers (per the team filter) PLUS every
+ customer ASSIGNED to an agent. The latter is why an agent's never-ordered accounts can be
+ geocoded and pinned on their 'my customers' map (customer_locations now includes the full book);
+ without it those addresses would never enter the geocode queue."""
+ pids = set(_base_pids(team_id))
+ for p in O.search_read('res.partner', [('agent_ids', '!=', False), ('active', 'in', [True, False])],
+ ['id'], limit=100000):
+ pids.add(p['id'])
+ return list(pids)
+
+
+def _pending_geocode(team_id=None):
+ """res.partner rows with an address, no Odoo coords, and no cache entry for that exact address."""
+ pids = _geocodable_pids(team_id)
+ parts, _ = _read_partners(pids)
+ cache = store.get(_GEO_NS) if store.available() else {}
+ pend = []
+ for p in parts:
+ if _has_coords(p):
+ continue
+ street, city, _state, zc = _addr_parts(p)
+ if not (street and (city or zc)):
+ continue # too little to geocode → stays unlocated
+ c = cache.get(str(p['id']))
+ if c and c.get('h') == _addr_hash(p):
+ continue # already attempted for this exact address
+ pend.append(p)
+ return pend, cache
+
+
+def geocode_missing(team_id=None, limit=None, _chunk=2000):
+ """Geocode pending addresses via the US Census batch geocoder; cache results (incl. no-match,
+ so we never retry the same address) in the HF store. Returns a summary dict. Read-only on Odoo."""
+ if not store.available():
+ return {'error': 'No writable store (HF_TOKEN missing).'}
+ try:
+ import requests
+ except ImportError:
+ return {'error': 'requests not installed'}
+ pend, cache = _pending_geocode(team_id)
+ if limit:
+ pend = pend[:limit]
+ if not pend:
+ return {'attempted': 0, 'matched': 0, 'failed': 0, 'cache_size': len(cache)}
+ matched = failed = 0
+ for i in range(0, len(pend), _chunk):
+ batch = pend[i:i + _chunk]
+ buf = io.StringIO()
+ w = csv.writer(buf)
+ for p in batch:
+ street, city, state, zc = _addr_parts(p)
+ w.writerow([p['id'], street, city, state, zc])
+ try:
+ resp = requests.post(_CENSUS_URL,
+ files={'addressFile': ('a.csv', buf.getvalue(), 'text/csv')},
+ data={'benchmark': 'Public_AR_Current'}, timeout=300)
+ resp.raise_for_status()
+ except Exception as e:
+ store.put(_GEO_NS, cache)
+ return {'error': f'Census request failed: {e}', 'matched': matched, 'failed': failed}
+ by_pid = {p['id']: p for p in batch}
+ for row in csv.reader(io.StringIO(resp.text)):
+ if not row:
+ continue
+ try:
+ pid = int(row[0])
+ except (ValueError, IndexError):
+ continue
+ p = by_pid.get(pid)
+ if p is None:
+ continue
+ h = _addr_hash(p)
+ if len(row) >= 6 and row[2] == 'Match' and row[5]:
+ lon, lat = row[5].split(',')
+ cache[str(pid)] = {'lat': float(lat), 'lon': float(lon), 'src': 'census',
+ 'h': h, 'addr': row[4]}
+ matched += 1
+ else:
+ cache[str(pid)] = {'lat': None, 'lon': None, 'src': 'census_nomatch', 'h': h}
+ failed += 1
+ store.put(_GEO_NS, cache)
+ return {'attempted': len(pend), 'matched': matched, 'failed': failed, 'cache_size': len(cache)}
diff --git a/platform/modules/o2c.py b/platform/modules/o2c.py
new file mode 100644
index 0000000000000000000000000000000000000000..eb3f0cc3ab6c6d4c7925724d92ac74c139fb2430
--- /dev/null
+++ b/platform/modules/o2c.py
@@ -0,0 +1,210 @@
+"""Order-to-Cash timing — where the days hide, by stage, each with its owner:
+
+ order → ship (warehouse) sale.order.date_order → effective_date (delivery complete)
+ ship → invoice (admin — a FREE DSO leak; links to the DNI list in Data Health)
+ invoice → paid (collections) invoice date → full-reconcile settlement date
+ (same OCA partner_time_to_pay semantics as ar.days_to_pay)
+
+Plus the terms-gap rollup: per payment term, contractual days vs $-weighted actual days —
+"are the TERMS wrong?" — with the stranded free-credit $ it represents (reuses the validated
+per-customer machinery in modules/ar.days_to_pay: dominant term, excess days, free credit).
+Medians (not means) per stage — one whale order must not move the story.
+"""
+import datetime as dt
+
+import core.odoo as O
+import core.periods as P
+import modules.ar as ar
+
+
+def _median(v):
+ v = sorted(v)
+ n = len(v)
+ if not n:
+ return None
+ return v[n // 2] if n % 2 else (v[n // 2 - 1] + v[n // 2]) / 2.0
+
+
+def _d(s):
+ s = str(s or '')[:10]
+ try:
+ return dt.date.fromisoformat(s)
+ except ValueError:
+ return None
+
+
+def stages(team_id=None, t=None):
+ """Per-BU stage medians + monthly trend over the LTM. Coverage counts are honest:
+ each stage only scores orders where both endpoints exist."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ ex = O.excluded_partner_ids()
+
+ dom = [('state', 'in', ['sale', 'done']),
+ ('date_order', '>=', f'{lf} 00:00:00'), ('date_order', '<=', f'{lt} 23:59:59')]
+ dom.append(('team_id', '=', team_id) if team_id is not None
+ else ('team_id', 'in', O.TEAM_IDS))
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ orders = O.search_read('sale.order', dom,
+ ['name', 'date_order', 'effective_date', 'team_id'])
+ by_name = {o['name']: o for o in orders}
+
+ # invoices LTM joined by exact invoice_origin (multi-origin merges skipped — counted)
+ inv_dom = [('move_type', '=', 'out_invoice'), ('state', '=', 'posted'),
+ ('invoice_date', '>=', lf)]
+ if ex:
+ inv_dom.append(('partner_id', 'not in', list(ex)))
+ invs = O.search_read('account.move', inv_dom,
+ ['invoice_origin', 'invoice_date', 'name'])
+ first_inv = {}
+ multi_origin = 0
+ for iv in invs:
+ og = (iv.get('invoice_origin') or '').strip()
+ if not og:
+ continue
+ if ',' in og:
+ multi_origin += 1
+ continue
+ d = str(iv.get('invoice_date') or '')[:10]
+ if og in by_name and d and (og not in first_inv or d < first_inv[og]):
+ first_inv[og] = d
+
+ # invoice → settled (receivable full-reconcile max counterpart date), LTM invoices
+ pay_dom = [('move_id.move_type', '=', 'out_invoice'), ('move_id.state', '=', 'posted'),
+ ('account_id.account_type', '=', 'asset_receivable'),
+ ('full_reconcile_id', '!=', False), ('date', '>=', lf)]
+ if ex:
+ pay_dom.append(('partner_id', 'not in', list(ex)))
+ rec_lines = O.search_read('account.move.line', pay_dom,
+ ['date', 'full_reconcile_id'])
+ fr_ids = list({O.m2o_id(l['full_reconcile_id']) for l in rec_lines})
+ settle = {}
+ # raw lines + local max — a grouped read here makes the server echo the full id-list
+ # domain back per group (__domain) and dies with a MemoryError at 5k-id chunks
+ for i in range(0, len(fr_ids), 5000):
+ for l in O.search_read('account.move.line',
+ [('full_reconcile_id', 'in', fr_ids[i:i + 5000])],
+ ['full_reconcile_id', 'date']):
+ k = O.m2o_id(l.get('full_reconcile_id'))
+ d = str(l.get('date') or '')[:10]
+ if k and d:
+ settle[k] = max(settle.get(k, ''), d)
+ # survivorship guard: a recent invoice only appears here if it is ALREADY reconciled,
+ # so the newest cohort is all fast payers. Score only invoices ≥120d old (they've had
+ # time to be slow); the honest label carries into the UI.
+ pay_cutoff = (t - dt.timedelta(days=120)).isoformat()
+ pay_days = []
+ for l in rec_lines:
+ i_d, s_d = _d(l.get('date')), _d(settle.get(O.m2o_id(l['full_reconcile_id'])))
+ if i_d and s_d and s_d >= i_d and i_d.isoformat() <= pay_cutoff:
+ pay_days.append(((s_d - i_d).days, i_d))
+
+ # assemble per-order stage observations
+ obs = [] # {bu, month, ship_days?, inv_days?}
+ for o in orders:
+ od, sd = _d(o.get('date_order')), _d(o.get('effective_date'))
+ bu = O.TEAM_NAMES.get(O.m2o_id(o.get('team_id')), '?')
+ month = str(o.get('date_order') or '')[:7]
+ ship = (sd - od).days if od and sd and sd >= od else None
+ iv = _d(first_inv.get(o['name']))
+ invd = (iv - sd).days if sd and iv and iv >= sd else None
+ obs.append({'bu': bu, 'month': month, 'ship': ship, 'inv': invd})
+
+ def _roll(rows, key):
+ vals = [r[key] for r in rows if r.get(key) is not None]
+ return _median(vals), len(vals)
+
+ by_bu = []
+ for bu in sorted({r['bu'] for r in obs}):
+ sub = [r for r in obs if r['bu'] == bu]
+ m_ship, n_ship = _roll(sub, 'ship')
+ m_inv, n_inv = _roll(sub, 'inv')
+ by_bu.append({'bu': bu, 'order_to_ship': m_ship, 'n_ship': n_ship,
+ 'ship_to_invoice': m_inv, 'n_inv': n_inv})
+ m_pay = _median([d for d, _ in pay_days])
+
+ trend = []
+ months = sorted({r['month'] for r in obs})
+ for m in months:
+ sub = [r for r in obs if r['month'] == m]
+ s, ns = _roll(sub, 'ship')
+ v, nv = _roll(sub, 'inv')
+ p_vals = [d for d, i_d in pay_days if i_d.isoformat()[:7] == m]
+ if ns >= 10 and s is not None:
+ trend.append({'month': m, 'stage': 'order-to-ship', 'days': s})
+ if nv >= 10 and v is not None:
+ trend.append({'month': m, 'stage': 'ship-to-invoice', 'days': v})
+ if len(p_vals) >= 10:
+ trend.append({'month': m, 'stage': 'invoice-to-paid', 'days': _median(p_vals)})
+
+ ship_all, n_ship_all = _roll(obs, 'ship')
+ inv_all, n_inv_all = _roll(obs, 'inv')
+ return {
+ 'by_bu': by_bu, 'pay_median': m_pay, 'n_pay': len(pay_days), 'trend': trend,
+ 'ship_median': ship_all, 'n_ship': n_ship_all,
+ 'inv_median': inv_all, 'n_inv': n_inv_all,
+ 'n_orders': len(orders), 'n_invoices': len(invs), 'multi_origin': multi_origin,
+ 'window': (lf, lt),
+ }
+
+
+def terms_gap(t=None):
+ """Per payment term: contractual days vs invoiced-$-weighted actual days-to-pay and the
+ stranded free-credit $ — rolled up from ar.days_to_pay's validated per-customer rows
+ (dominant term per customer)."""
+ dtp = ar.days_to_pay(t, limit=100000)
+ rows = dtp['rows'] if isinstance(dtp, dict) else dtp
+ per = {}
+ for r in rows:
+ term = r.get('terms') or '(none)'
+ eff = r.get('avg_days_ytd') if r.get('avg_days_ytd') is not None else r.get('avg_days')
+ if eff is None:
+ continue
+ e = per.setdefault(term, {'term': term, 'term_days': r.get('term_days') or 0,
+ 'w': 0.0, 'wd': 0.0, 'customers': 0, 'free_credit': 0.0,
+ 'open': 0.0})
+ inv_w = max(r.get('open') or 0.0, 0.0) + 1.0 # weight by open AR (+1 floor so
+ # zero-AR customers still count)
+ e['w'] += inv_w
+ e['wd'] += eff * inv_w
+ e['customers'] += 1
+ e['free_credit'] += r.get('free_credit') or 0.0
+ e['open'] += r.get('open') or 0.0
+ out = []
+ for e in per.values():
+ actual = e['wd'] / e['w'] if e['w'] else None
+ out.append({'term': e['term'], 'term_days': e['term_days'],
+ 'actual_days': actual,
+ 'gap_days': (actual - e['term_days']) if actual is not None else None,
+ 'customers': e['customers'], 'open_ar': e['open'],
+ 'free_credit': e['free_credit']})
+ out.sort(key=lambda x: -(x['free_credit'] or 0))
+ return out
+
+
+def validate(t=None, team_id=None):
+ """Pull-completeness both sides: LTM order count and posted-invoice count vs
+ independent search_count on the same domains."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ ex = O.excluded_partner_ids()
+ dom = [('state', 'in', ['sale', 'done']),
+ ('date_order', '>=', f'{lf} 00:00:00'), ('date_order', '<=', f'{lt} 23:59:59')]
+ dom.append(('team_id', '=', team_id) if team_id is not None
+ else ('team_id', 'in', O.TEAM_IDS))
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ b = stages(team_id, t)
+ n_orders = O.get_odoo().search_count('sale.order', dom)
+ inv_dom = [('move_type', '=', 'out_invoice'), ('state', '=', 'posted'),
+ ('invoice_date', '>=', lf)]
+ if ex:
+ inv_dom.append(('partner_id', 'not in', list(ex)))
+ n_inv = O.get_odoo().search_count('account.move', inv_dom)
+ return [
+ {'check': 'LTM orders — pull complete', 'a': b['n_orders'], 'b': n_orders,
+ 'gap': b['n_orders'] - n_orders, 'ok': b['n_orders'] == n_orders},
+ {'check': 'LTM posted invoices — pull complete', 'a': b['n_invoices'], 'b': n_inv,
+ 'gap': b['n_invoices'] - n_inv, 'ok': b['n_invoices'] == n_inv},
+ ]
diff --git a/platform/modules/outreach.py b/platform/modules/outreach.py
new file mode 100644
index 0000000000000000000000000000000000000000..573e01d6a06ccca3acede7d3644c1230a84f0e3f
--- /dev/null
+++ b/platform/modules/outreach.py
@@ -0,0 +1,451 @@
+"""Outreach — the internal campaign engine (the HubSpot-parity build, crm-outreach brief v1).
+
+Select a segment of customers → render a personalized template per recipient → queue one
+mail.mail each through the ONE sanctioned write path (modules/collections_send.py client:
+mail.mail create only, SAFE_MODE allow-list enforced in the data layer) → read outcomes back
+from mail.mail state → attribute orders placed within the window to the campaign (the thing
+HubSpot can't do: revenue attribution straight off sale.order).
+
+Store keys:
+ suppression {email_lower: {reason: unsub|bounce|manual, source, at}}
+ outreach_templates {id: {name, class: marketing|transactional, subject, body_html, ...}}
+ campaigns {seq, items: {id: {name, template_id, segment, audience[], excluded[],
+ status draft|queued, scheduled_base, send_log[], sent_at, created_by}}}
+
+Compliance (CAN-SPAM — applies fully to B2B):
+ - marketing-class sends get the physical-address + unsubscribe footer appended ALWAYS;
+ - the suppression list is enforced HERE (same choke point as SAFE_MODE), not in the UI;
+ - unsubscribe v1 = reply-to-unsubscribe (explicitly valid) + List-Unsubscribe mailto header;
+ - frequency governor: max 1 marketing email per dealer per 7 days across ALL campaigns.
+O365 limits: 30 msgs/min → sends are staggered via mail.mail.scheduled_date in 1-min buckets
+of 25; 10k recipients/day is far above the dealer book.
+"""
+import os
+import html as _html
+import datetime as dt
+
+from jinja2 import Environment, StrictUndefined
+
+import core.store as store
+import core.odoo as O
+import core.periods as P
+import modules.customers as cust
+import modules.collections_send as cs
+
+K_SUPP = 'suppression'
+K_TPL = 'outreach_templates'
+K_CAMP = 'campaigns'
+
+BATCH_PER_MINUTE = 25 # O365 message rate limit is 30/min — stay under it
+GOVERNOR_DAYS = 7 # max 1 marketing email per dealer per 7 days
+ATTRIB_DAYS = 14 # orders within N days of send count toward the campaign
+
+_env = Environment(undefined=StrictUndefined, autoescape=False)
+
+
+def _now():
+ return dt.datetime.now().strftime('%Y-%m-%d %H:%M')
+
+
+# ------------------------------------------------------------------ suppression
+def suppression():
+ return store.get(K_SUPP) or {}
+
+
+def is_suppressed(email):
+ return str(email or '').strip().lower() in suppression()
+
+
+def suppress(email, reason, source, by='?'):
+ e = str(email or '').strip().lower()
+ if not e:
+ return
+
+ def _add(d):
+ d[e] = {'reason': reason, 'source': source, 'by': by, 'at': _now()}
+ return d
+ store.update(K_SUPP, _add)
+
+
+def unsuppress(email):
+ e = str(email or '').strip().lower()
+
+ def _rm(d):
+ d.pop(e, None)
+ return d
+ store.update(K_SUPP, _rm)
+
+
+# ------------------------------------------------------------------ templates
+DEFAULT_TEMPLATES = {
+ 'reorder-v1': {
+ 'name': 'Reorder reminder', 'class': 'marketing',
+ 'subject': 'Time to restock, {{ customer }}?',
+ 'body_html': (
+ '
Hi {{ customer }},
'
+ '
It has been {{ days_since }} days since your last order with us'
+ '{% if last_order %} (placed {{ last_order }}){% endif %} — based on your usual '
+ 'rhythm, you may be running low.
'
+ '{% if top_skus %}
Your recent favorites:
'
+ '{% for s in top_skus %}
{{ s }}
{% endfor %}
{% endif %}'
+ '
Reply to this email or reach out to {{ agent }} and we will get your next '
+ 'order moving.
'
+ '
Thank you for your business, {{ company }}
'),
+ },
+ 'winback-v1': {
+ 'name': 'Win-back', 'class': 'marketing',
+ 'subject': 'We miss you at {{ company }}, {{ customer }}',
+ 'body_html': (
+ '
Hi {{ customer }},
'
+ '
We noticed your orders have slowed this year and wanted to check in — our new '
+ 'catalog has landed and we would love to get you back to the table.
'
+ '
Reply to this email or contact {{ agent }} to hear what is new.
'
+ '
Thank you, {{ company }}
'),
+ },
+}
+
+
+def templates():
+ t = store.get(K_TPL) or {}
+ if not t:
+ stamped = {k: {**v, 'created_by': 'system', 'at': _now()}
+ for k, v in DEFAULT_TEMPLATES.items()}
+ try:
+ store.update(K_TPL, lambda d: (d.update(stamped), d)[1] if not d else d)
+ t = store.get(K_TPL) or stamped
+ except Exception:
+ t = stamped
+ return t
+
+
+def save_template(tid, name, tclass, subject, body_html, by='?'):
+ tid = (tid or name).strip().lower().replace(' ', '-')
+
+ def _set(d):
+ d[tid] = {'name': name, 'class': tclass, 'subject': subject,
+ 'body_html': body_html, 'created_by': by, 'at': _now()}
+ return d
+ store.update(K_TPL, _set)
+ return tid
+
+
+def render(subject_tmpl, body_tmpl, ctx):
+ """StrictUndefined — a missing token fails the PREVIEW, never a live send."""
+ return (_env.from_string(subject_tmpl).render(**ctx),
+ _env.from_string(body_tmpl).render(**ctx))
+
+
+# ------------------------------------------------------------------ company footer (CAN-SPAM)
+_company_cache = {}
+
+
+def company_address():
+ """Physical postal address for the compliance footer. Env override, else res.company."""
+ if 'addr' in _company_cache:
+ return _company_cache['addr']
+ addr = os.environ.get('COMPANY_ADDRESS', '').strip()
+ if not addr:
+ try:
+ rows = O.search_read('res.company', [], ['name', 'street', 'street2', 'city',
+ 'state_id', 'zip'])
+ # multi-company instance: take the first company with a real street address
+ c = next((r for r in rows if r.get('street')), None)
+ if c:
+ bits = [c.get('street') or '', c.get('street2') or '', c.get('city') or '',
+ O.m2o_name(c.get('state_id')), c.get('zip') or '']
+ addr = ', '.join(b for b in bits if b)
+ except Exception:
+ addr = ''
+ _company_cache['addr'] = addr
+ return addr
+
+
+def marketing_footer():
+ addr = company_address()
+ return (f"
{_html.escape(cs.COMPANY)}"
+ + (f" · {_html.escape(addr)}" if addr else '')
+ + " You are receiving this because you are a wholesale customer of "
+ f"{_html.escape(cs.COMPANY)}. To stop receiving these emails, reply with "
+ "the word unsubscribe and we will remove you within 10 business days."
+ "
')
+ return shell
+
+
+# ------------------------------------------------------------------ audiences
+SEGMENT_SOURCES = {
+ 'reorder': 'Reorder due — overdue vs their own cadence',
+ 'winback': 'Win-back — bought LY, down or gone this year',
+ 'new': 'New / reactivated this year',
+}
+
+
+def build_audience(source, team_id=None, agent=None, limit=500):
+ """Segment spec → candidate rows [{pid, customer, metric, agent?}] (active-list semantics:
+ evaluated NOW; the campaign freezes a snapshot)."""
+ pids_scope = cust.agent_partner_ids(agent) if agent else None
+ if source == 'reorder':
+ rows = cust.contact_recommendations(team_id=team_id, limit=limit, agent_pids=pids_scope)
+ return [{'pid': r['pid'], 'customer': r['customer'], 'agent': r.get('agent', ''),
+ 'metric': r.get('est_missed', 0.0), 'metric_label': 'est. missed $'}
+ for r in rows]
+ if source == 'winback':
+ rows = cust.at_risk(team_id=team_id, limit=limit, agent_pids=pids_scope)
+ return [{'pid': r['pid'], 'customer': r['customer'], 'agent': '',
+ 'metric': r.get('at_risk', 0.0), 'metric_label': 'at-risk $'} for r in rows]
+ if source == 'new':
+ rows = cust.new_customers(team_id=team_id, limit=limit, agent_pids=pids_scope)
+ return [{'pid': r['pid'], 'customer': r['customer'], 'agent': '',
+ 'metric': r.get('rev_ytd', 0.0), 'metric_label': 'YTD $'} for r in rows]
+ raise ValueError(f'unknown segment source {source}')
+
+
+def _partner_info(pids):
+ """{pid: {email, name, credit}} in one read."""
+ if not pids:
+ return {}
+ rows = O.search_read('res.partner', [('id', 'in', list(pids))],
+ ['name', 'email', 'credit'])
+ return {r['id']: r for r in rows}
+
+
+def _tokens_bulk(pids, team_id=None):
+ """Per-recipient template context, pulled in TWO read_groups (never per-recipient calls):
+ cadence (last order / days since) + top-3 SKUs by LTM revenue."""
+ cad = cust._cadence_bulk(team_id=team_id)
+ lf, lt = P.ltm(P.today()) # ISO strings already (periods convention)
+ g = O.read_group('sale.order.line',
+ O.sale_line_domain(lf, lt, team_id, partner_ids=list(pids)),
+ ['price_subtotal:sum'], ['order_partner_id', 'product_id'], lazy=False)
+ by_pid = {}
+ for r in g:
+ pid = O.m2o_id(r.get('order_partner_id'))
+ name = O.m2o_name(r.get('product_id'))
+ if pid and name:
+ by_pid.setdefault(pid, []).append((r.get('price_subtotal') or 0.0, name))
+ top = {pid: [n for _, n in sorted(v, reverse=True)[:3]] for pid, v in by_pid.items()}
+ out = {}
+ for pid in pids:
+ c = cad.get(pid, {})
+ out[pid] = {'last_order': c.get('last_order') or '',
+ 'days_since': int(c.get('days_since') or 0),
+ 'top_skus': top.get(pid, [])}
+ return out
+
+
+def _agent_disp(a):
+ """Agent token for templates — the '(none)' placeholder must never reach a customer."""
+ a = str(a or '').strip()
+ return a if a and a.lower() != '(none)' else 'your account manager'
+
+
+def _recent_marketing_sends():
+ """{email_lower: last marketing send date iso} across all campaigns — the frequency governor."""
+ out = {}
+ camps = (store.get(K_CAMP) or {}).get('items', {})
+ for c in camps.values():
+ if c.get('template_class') != 'marketing':
+ continue
+ day = (c.get('sent_at') or '')[:10]
+ if not day:
+ continue
+ for s in c.get('send_log', []):
+ e = str(s.get('email', '')).lower()
+ if e and (e not in out or out[e] < day):
+ out[e] = day
+ return out
+
+
+# ------------------------------------------------------------------ campaigns
+def campaigns():
+ d = store.get(K_CAMP) or {}
+ return d.get('items', {})
+
+
+def create_campaign(name, template_id, segment_spec, audience_rows, by='?'):
+ """Freeze the audience snapshot with exclusions applied UP FRONT (each with its reason —
+ the excluded rows are shown, never silently dropped): no email / suppressed / marketing
+ governor (emailed < GOVERNOR_DAYS ago) / duplicate email within the audience."""
+ tpl = templates().get(template_id) or {}
+ tclass = tpl.get('class', 'marketing')
+ info = _partner_info([r['pid'] for r in audience_rows])
+ recent = _recent_marketing_sends() if tclass == 'marketing' else {}
+ supp = suppression()
+ cutoff = (dt.date.today() - dt.timedelta(days=GOVERNOR_DAYS)).isoformat()
+ seen = set()
+ audience, excluded = [], []
+ for r in audience_rows:
+ p = info.get(r['pid']) or {}
+ email = str(p.get('email') or '').strip()
+ el = email.lower()
+ if not email:
+ excluded.append({**r, 'reason': 'no email address'})
+ elif el in supp:
+ excluded.append({**r, 'reason': f"suppressed ({supp[el].get('reason', '?')})"})
+ elif tclass == 'marketing' and recent.get(el, '') >= cutoff:
+ excluded.append({**r, 'reason': f'emailed within {GOVERNOR_DAYS}d (governor)'})
+ elif el in seen:
+ excluded.append({**r, 'reason': 'duplicate email in audience'})
+ else:
+ seen.add(el)
+ audience.append({**r, 'email': email})
+ created = {}
+
+ def _add(d):
+ d.setdefault('seq', 0)
+ d.setdefault('items', {})
+ d['seq'] += 1
+ cid = f"c{d['seq']}"
+ d['items'][cid] = {
+ 'id': cid, 'name': name, 'template_id': template_id, 'template_class': tclass,
+ 'segment': segment_spec, 'audience': audience, 'excluded': excluded,
+ 'status': 'draft', 'send_log': [], 'sent_at': None,
+ 'created_by': by, 'created_at': _now(),
+ }
+ created['id'] = cid
+ return d
+ store.update(K_CAMP, _add)
+ return created['id'], len(audience), len(excluded)
+
+
+def preview_samples(campaign, n=3, team_id=None):
+ """Render the template for the first n recipients — StrictUndefined surfaces bad tokens
+ here, at preview time."""
+ tpl = templates().get(campaign['template_id']) or {}
+ aud = campaign['audience'][:n]
+ toks = _tokens_bulk([r['pid'] for r in aud], team_id)
+ out = []
+ for r in aud:
+ ctx = {'customer': r['customer'], 'agent': _agent_disp(r.get('agent')),
+ 'company': cs.COMPANY, 'open_balance': 0.0, **toks.get(r['pid'], {})}
+ subj, body = render(tpl.get('subject', ''), tpl.get('body_html', ''), ctx)
+ out.append({'to': r['email'], 'subject': subj,
+ 'body': wrap_body(body, tpl.get('class', 'marketing'))})
+ return out
+
+
+def send_campaign(cid, base_dt_utc=None, by='?', team_id=None):
+ """Queue every audience mail (personalized, one mail.mail per recipient, staggered
+ scheduled_date ≤ BATCH_PER_MINUTE/min). SAFE_MODE is checked per recipient HERE: while the
+ guardrail is ON, non-allow-listed recipients are SKIPPED (logged), so a test send to
+ yourself works without touching real customers. Returns (queued, skipped)."""
+ camps = campaigns()
+ c = camps.get(cid)
+ if not c or c.get('status') != 'draft':
+ raise ValueError('campaign missing or already sent')
+ tpl = templates().get(c['template_id']) or {}
+ tclass = tpl.get('class', 'marketing')
+ base = base_dt_utc or dt.datetime.utcnow()
+ toks = _tokens_bulk([r['pid'] for r in c['audience']], team_id)
+ info = _partner_info([r['pid'] for r in c['audience']])
+ odoo = cs.Odoo()
+ log = []
+ queued = skipped = 0
+ for i, r in enumerate(c['audience']):
+ email = r['email']
+ if is_suppressed(email): # re-check at send time
+ log.append({**r, 'result': 'suppressed'})
+ skipped += 1
+ continue
+ if not cs.safe_recipient_ok(email):
+ log.append({**r, 'result': 'safe-mode-skip'})
+ skipped += 1
+ continue
+ ctx = {'customer': r['customer'], 'agent': _agent_disp(r.get('agent')),
+ 'company': cs.COMPANY,
+ 'open_balance': float((info.get(r['pid']) or {}).get('credit') or 0.0),
+ **toks.get(r['pid'], {})}
+ try:
+ subj, body = render(tpl.get('subject', ''), tpl.get('body_html', ''), ctx)
+ when = base + dt.timedelta(minutes=queued // BATCH_PER_MINUTE)
+ payload = {
+ 'subject': subj, 'body_html': wrap_body(body, tclass),
+ 'email_to': email,
+ 'email_from': cs.SENDER_DISPLAY, 'reply_to': cs.REPLY_TO,
+ 'mail_server_id': cs.ROYAL_MAIL_SERVER_ID, 'author_id': cs.ROYAL_AUTHOR_ID,
+ 'state': 'outgoing', 'auto_delete': False,
+ 'scheduled_date': when.strftime('%Y-%m-%d %H:%M:%S'),
+ 'model': 'res.partner', 'res_id': r['pid'], # audit trail in chatter
+ 'headers': repr({'List-Unsubscribe':
+ f''}),
+ }
+ mid = odoo.queue_mail(payload)
+ log.append({**r, 'result': 'queued', 'mail_id': mid,
+ 'scheduled': when.strftime('%H:%M')})
+ queued += 1
+ except Exception as e:
+ log.append({**r, 'result': f'error: {str(e)[:90]}'})
+ skipped += 1
+
+ def _fin(d):
+ item = d.get('items', {}).get(cid)
+ if item:
+ item['status'] = 'queued'
+ item['send_log'] = log
+ item['sent_at'] = _now()
+ item['sent_by'] = by
+ return d
+ store.update(K_CAMP, _fin)
+ return queued, skipped
+
+
+def refresh_outcomes(cid):
+ """Read mail.mail state back for a campaign's queued mails (sent / exception + reason)."""
+ c = campaigns().get(cid) or {}
+ ids = [s['mail_id'] for s in c.get('send_log', []) if s.get('mail_id')]
+ if not ids:
+ return {}
+ rows = O.search_read('mail.mail', [('id', 'in', ids)],
+ ['state', 'failure_reason'])
+ by_id = {r['id']: r for r in rows}
+
+ def _upd(d):
+ item = d.get('items', {}).get(cid)
+ if item:
+ for s in item.get('send_log', []):
+ r = by_id.get(s.get('mail_id'))
+ if r:
+ s['state'] = r.get('state')
+ fr = r.get('failure_reason')
+ if fr:
+ s['failure'] = str(fr)[:120]
+ return d
+ store.update(K_CAMP, _upd)
+ return by_id
+
+
+def attribution(cid, days=ATTRIB_DAYS):
+ """Orders placed by audience customers within `days` of send → per-customer rows + totals.
+ Correlation window, honestly labeled — not causal ML."""
+ c = campaigns().get(cid) or {}
+ sent = (c.get('sent_at') or '')[:10]
+ if not sent:
+ return {'rows': [], 'orders': 0, 'revenue': 0.0, 'window': days, 'from': None, 'to': None}
+ pids = [r['pid'] for r in c.get('audience', [])]
+ if not pids:
+ return {'rows': [], 'orders': 0, 'revenue': 0.0, 'window': days, 'from': sent, 'to': None}
+ end = (dt.date.fromisoformat(sent) + dt.timedelta(days=days)).isoformat()
+ g = O.read_group('sale.order',
+ [('partner_id', 'in', pids), ('state', 'in', ['sale', 'done']),
+ ('date_order', '>=', f'{sent} 00:00:00'),
+ ('date_order', '<=', f'{end} 23:59:59')],
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False)
+ names = {r['pid']: r['customer'] for r in c.get('audience', [])}
+ rows = []
+ for r in g:
+ pid = O.m2o_id(r.get('partner_id'))
+ if not pid:
+ continue
+ rows.append({'pid': pid, 'customer': names.get(pid) or O.m2o_name(r.get('partner_id')),
+ 'orders': r.get('__count') or 0,
+ 'revenue': r.get('amount_untaxed') or 0.0})
+ rows.sort(key=lambda x: -x['revenue'])
+ return {'rows': rows, 'orders': sum(x['orders'] for x in rows),
+ 'revenue': sum(x['revenue'] for x in rows), 'window': days,
+ 'from': sent, 'to': end}
diff --git a/platform/modules/overstock.py b/platform/modules/overstock.py
new file mode 100644
index 0000000000000000000000000000000000000000..f62543af508f7c99dd4847f26e424085101dda38
--- /dev/null
+++ b/platform/modules/overstock.py
@@ -0,0 +1,265 @@
+"""Overstock & dead-stock module (lives under Inventory).
+
+A deeper, book-value-accurate lens on trapped inventory capital than the standard-cost coverage
+view in inventory.py. Three things:
+
+ 1. DEEP per-SKU list — every in-stock SKU with its BOOK value (cumulative stock.valuation.layer,
+ which ties to GL account 05000), days-of-inventory (DSI = on-hand / last-3mo annualised
+ ALL-CHANNEL sales), a dead/excess/slow/healthy status, last-sold month and trailing units.
+ 2. SUMMARY — trapped capital = dead + excess; share of inventory; bucket distribution.
+ 3. ROLLING COHORT RECOVERY — each month-end classifies its dead cohort, then tracks it forward;
+ a SKU "graduates" only when DSI < 120 days. Quantifies how little dead stock self-clears.
+
+CONSOLIDATED (HQ): on-hand stock is one physical warehouse, not brand-tagged — ignores the DBA
+filter, like the rest of Inventory. ALL-CHANNEL sales (no team/partner scope) are used on purpose:
+a SKU that sells only through the Amazon/GIFTWARE channel is NOT dead.
+
+READ-ONLY.
+"""
+import sys
+import calendar
+import datetime
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+
+DEAD_UNITS_12M = 5 # < this many units sold (all channels) in trailing 12mo = dead
+GRADUATE_DSI = 120 # days-of-inventory below this = healthy turnover ("graduated")
+EXCESS_DSI = 365 # sells, but holds > 1 year of supply = excess/overstock
+_VAL_FLOOR = 50.0 # ignore sub-$50 book scraps as noise
+
+
+# --------------------------------------------------------------------------- date helpers
+def _today():
+ return datetime.date.today()
+
+
+def _eom(y, m):
+ return datetime.date(y, m, calendar.monthrange(y, m)[1])
+
+
+def _seq(y0, m0, y1, m1):
+ out, y, m = [], y0, m0
+ while (y, m) <= (y1, m1):
+ out.append((y, m)); y, m = (y + (m // 12)), (m % 12 + 1)
+ return out
+
+
+# --------------------------------------------------------------------------- raw pulls
+def _monthly_sales(yms):
+ """All-channel confirmed sales UNITS per product per (y,m). Parallelised — one read_group/month."""
+ def _one(ym):
+ y, m = ym
+ f = f"{y}-{m:02d}-01 00:00:00"; t = f"{y}-{m:02d}-{calendar.monthrange(y, m)[1]} 23:59:59"
+ g = O.read_group('sale.order.line',
+ [('order_id.state', 'in', ['sale', 'done']), ('order_id.date_order', '>=', f),
+ ('order_id.date_order', '<=', t), ('product_id.type', '!=', 'service')],
+ ['product_uom_qty:sum', 'product_id'], ['product_id'], lazy=False)
+ return {O.m2o_id(r['product_id']): (r.get('product_uom_qty') or 0.0) for r in g if r.get('product_id')}
+ res = O.parallel([(lambda ym=ym: _one(ym)) for ym in yms])
+ return dict(zip(yms, res))
+
+
+def _onhand(asof):
+ """Cumulative on-hand (qty, book value) per product from stock.valuation.layer as of `asof` (a
+ 'YYYY-MM-DD' date). Book value ties to GL 05000 (validated)."""
+ g = O.read_group('stock.valuation.layer', [('create_date', '<=', f'{asof} 23:59:59')],
+ ['value:sum', 'quantity:sum', 'product_id'], ['product_id'], lazy=False)
+ return {O.m2o_id(r['product_id']): ((r.get('quantity') or 0.0), (r.get('value') or 0.0))
+ for r in g if r.get('product_id')}
+
+
+def _cat_main(catid_map, categ):
+ cid = O.m2o_id(categ)
+ return catid_map.get(cid) or '(uncategorized)'
+
+
+def _master(pids):
+ """Product code/name/category for a set of ids (incl. archived — re-SKUed items)."""
+ if not pids:
+ return {}, {}
+ prods = O.search_read('product.product', [('id', 'in', list(pids)), ('active', 'in', [True, False])],
+ ['default_code', 'name', 'categ_id'])
+ cats = O.search_read('product.category', [], ['id', 'complete_name'])
+ catmap = {}
+ for c in cats:
+ parts = [x.strip() for x in (c['complete_name'] or '').split('/')]
+ catmap[c['id']] = parts[1] if len(parts) >= 2 else (parts[0] if parts else None)
+ pm = {p['id']: {'sku': (p.get('default_code') or f"#{p['id']}"), 'name': p.get('name') or '',
+ 'category': _cat_main(catmap, p.get('categ_id'))} for p in prods}
+ return pm, catmap
+
+
+# --------------------------------------------------------------------------- classification
+def _dsi(on_hand, units_3m):
+ if units_3m > 0:
+ return on_hand / (units_3m / 91.25)
+ return None # no recent sales -> effectively infinite cover
+
+
+def _status(units_12m, dsi):
+ if units_12m < DEAD_UNITS_12M:
+ return 'Dead (no sales 12mo)'
+ if dsi is None or dsi > EXCESS_DSI:
+ return 'Excess (>365d cover)'
+ if dsi > GRADUATE_DSI:
+ return 'Slow (120-365d)'
+ return 'Healthy (<120d)'
+
+
+def deep(asof=None):
+ """The deep snapshot: per-SKU rows + summary KPIs + bucket distribution, as of `asof` (default today)."""
+ asof = asof or _today().isoformat()
+ y, m = int(asof[:4]), int(asof[5:7])
+ yms = _seq(*(lambda d: (d.year, d.month))(_eom(y, m).replace(day=1) - datetime.timedelta(days=365)),
+ y, m) # 13 months incl. current
+ sales = _monthly_sales(yms)
+ onhand = _onhand(asof)
+ pids = [pid for pid, (q, v) in onhand.items() if q > 0.5 and v > 0]
+ pm, _ = _master(pids)
+
+ def trailing(pid, n):
+ return sum(sales.get(ym, {}).get(pid, 0.0) for ym in yms[-n:])
+
+ def last_sold(pid):
+ for ym in reversed(yms):
+ if sales.get(ym, {}).get(pid, 0.0) > 0:
+ return f"{calendar.month_abbr[ym[1]]} {ym[0]}"
+ return '12+ mo ago'
+
+ rows = []
+ for pid in pids:
+ q, v = onhand[pid]
+ u12, u3 = trailing(pid, 12), trailing(pid, 3)
+ dsi = _dsi(q, u3)
+ meta = pm.get(pid, {})
+ rows.append({
+ 'product_id': pid, 'sku': meta.get('sku', f'#{pid}'), 'code': meta.get('sku', f'#{pid}'),
+ 'product': meta.get('name', ''), 'name': meta.get('name', ''),
+ 'category': meta.get('category', '(uncategorized)'),
+ 'on_hand': float(q), 'book_value': float(v), 'unit_cost': float(v / q) if q else 0.0,
+ 'units_12mo': float(u12), 'units_3mo': float(u3),
+ 'dsi': (None if dsi is None else round(dsi, 0)), 'last_sold': last_sold(pid),
+ 'status': _status(u12, dsi),
+ })
+ rows.sort(key=lambda r: -r['book_value'])
+
+ total = sum(r['book_value'] for r in rows)
+ def grp(pred):
+ sub = [r for r in rows if pred(r)]
+ return len(sub), sum(r['book_value'] for r in sub)
+ dn, dv = grp(lambda r: r['status'].startswith('Dead'))
+ en, ev = grp(lambda r: r['status'].startswith('Excess'))
+ sn, sv = grp(lambda r: r['status'].startswith('Slow'))
+ hn, hv = grp(lambda r: r['status'].startswith('Healthy'))
+ buckets = [{'status': lbl, 'skus': n, 'book_value': val,
+ 'share': (val / total * 100 if total else 0)}
+ for lbl, (n, val) in [('Dead (no sales 12mo)', (dn, dv)), ('Excess (>365d cover)', (en, ev)),
+ ('Slow (120-365d)', (sn, sv)), ('Healthy (<120d)', (hn, hv))]]
+ summary = {
+ 'asof': asof, 'window': f'{yms[0][0]}-{yms[0][1]:02d} → {yms[-1][0]}-{yms[-1][1]:02d}',
+ 'total_book': total,
+ 'trapped_value': dv + ev, 'trapped_skus': dn + en, 'trapped_share': ((dv + ev) / total * 100 if total else 0),
+ 'dead_value': dv, 'dead_skus': dn, 'excess_value': ev, 'excess_skus': en,
+ 'slow_value': sv, 'slow_skus': sn, 'healthy_value': hv, 'healthy_skus': hn,
+ }
+ return {'rows': rows, 'summary': summary, 'buckets': buckets}
+
+
+# --------------------------------------------------------------------------- rolling cohort recovery
+def cohort_recovery(asof=None):
+ """For each month-end (Jan-2025 → last full month) classify the dead cohort, then track it forward:
+ a SKU graduates when DSI < 120. Returns the average recovery curve + per-cohort summary."""
+ asof = asof or _today()
+ if isinstance(asof, str):
+ asof = datetime.date.fromisoformat(asof)
+ last = asof.replace(day=1) - datetime.timedelta(days=1) # last complete month
+ cohorts = _seq(2025, 1, last.year, last.month)
+ smon = _seq(2024, 1, last.year, last.month) # trailing-12 needs a year of runway
+ sales = _monthly_sales(smon)
+
+ def trail(pid, ym, n):
+ i = smon.index(ym)
+ return sum(sales.get(smon[j], {}).get(pid, 0.0) for j in range(max(0, i - n + 1), i + 1))
+
+ # on-hand (qty, value) at each cohort month-end, in parallel
+ ends = [_eom(y, m).isoformat() for (y, m) in cohorts]
+ states = dict(zip(cohorts, O.parallel([(lambda e=e: _onhand(e)) for e in ends])))
+
+ # per (cohort-month, pid): value, dead?, dsi
+ flat = {}
+ for ym in cohorts:
+ d = {}
+ for pid, (q, v) in states[ym].items():
+ if q <= 0.5 or v <= 0:
+ continue
+ dsi = _dsi(q, trail(pid, ym, 3))
+ d[pid] = (v, (v > _VAL_FLOOR and trail(pid, ym, 12) < DEAD_UNITS_12M), dsi)
+ flat[ym] = d
+
+ idx = {c: i for i, c in enumerate(cohorts)}
+ def graduated_by(pid, c, k):
+ for t in cohorts[idx[c]:idx[c] + k + 1]:
+ st = flat[t].get(pid)
+ if st and st[2] is not None and st[2] < GRADUATE_DSI:
+ return True
+ return False
+
+ curve_num, curve_den = {}, {}
+ rows = []
+ for c in cohorts:
+ cv = {pid: flat[c][pid][0] for pid in flat[c] if flat[c][pid][1]} # dead pids -> entry value
+ tot = sum(cv.values())
+ if not tot:
+ continue
+ maxk = len(cohorts) - 1 - idx[c]
+ for k in range(maxk + 1):
+ rec = sum(v for pid, v in cv.items() if graduated_by(pid, c, k))
+ curve_num[k] = curve_num.get(k, 0.0) + rec
+ curve_den[k] = curve_den.get(k, 0.0) + tot
+
+ def pct_at(k):
+ return (sum(v for pid, v in cv.items() if graduated_by(pid, c, k)) / tot * 100) if k <= maxk else None
+ stuck = sum(v for pid, v in cv.items() if not graduated_by(pid, c, maxk))
+ rows.append({'cohort': f"{c[0]}-{c[1]:02d}", 'skus': len(cv), 'dead_value': tot,
+ 'rec_3mo': pct_at(3), 'rec_6mo': pct_at(6),
+ 'rec_today': (tot - stuck) / tot * 100, 'stuck_value': stuck})
+
+ curve = [{'months_since': k, 'recovered_pct': (curve_num[k] / curve_den[k] * 100 if curve_den[k] else 0)}
+ for k in sorted(curve_num)]
+ cd = {p['months_since']: p['recovered_pct'] for p in curve}
+ return {'curve': curve, 'cohorts': rows,
+ 'rec_3mo': cd.get(3), 'rec_6mo': cd.get(6), 'rec_12mo': cd.get(12),
+ 'latest_stuck': (rows[-1]['stuck_value'] if rows else 0.0)}
+
+
+# --------------------------------------------------------------------------- validate
+def validate(asof=None):
+ """Reconcile to independent Odoo aggregates."""
+ asof = asof or _today().isoformat()
+ d = deep(asof)
+ checks = []
+
+ # 1. layer book value (in-stock SKUs) ties to GL account 05000 balance (the audited inventory line)
+ acc = O.search_read('account.account', [('code', '=', '05000')], ['id'])
+ if acc:
+ gl = O.sum_field('account.move.line', [('parent_state', '=', 'posted'),
+ ('account_id', '=', acc[0]['id']), ('date', '<=', asof)], 'balance')
+ ours = d['summary']['total_book']
+ checks.append({'check': 'On-hand book value ≈ GL 05000 Inventory',
+ 'a': round(ours, 0), 'b': round(gl, 0), 'gap': round(ours - gl, 0),
+ 'ok': abs(ours - gl) <= max(2500.0, abs(gl) * 0.05)})
+
+ # 2. buckets partition the total book value exactly
+ bsum = sum(b['book_value'] for b in d['buckets'])
+ tot = d['summary']['total_book']
+ checks.append({'check': 'Σ(status buckets) == total book value', 'a': round(bsum, 2),
+ 'b': round(tot, 2), 'gap': round(bsum - tot, 2), 'ok': abs(bsum - tot) <= 1.0})
+
+ # 3. trapped = dead + excess (definition holds)
+ s = d['summary']
+ checks.append({'check': 'Trapped == dead + excess value', 'a': round(s['trapped_value'], 2),
+ 'b': round(s['dead_value'] + s['excess_value'], 2),
+ 'gap': round(s['trapped_value'] - s['dead_value'] - s['excess_value'], 2),
+ 'ok': abs(s['trapped_value'] - s['dead_value'] - s['excess_value']) <= 1.0})
+ return checks
diff --git a/platform/modules/pricecomp.py b/platform/modules/pricecomp.py
new file mode 100644
index 0000000000000000000000000000000000000000..72b93b8a8486fd2ed7c4d7321cedd017c295610a
--- /dev/null
+++ b/platform/modules/pricecomp.py
@@ -0,0 +1,174 @@
+"""Price compliance — selling below the customer's pricelist tier (pocket-price floor).
+
+Discount FIELDS are unused in this Odoo (verified dead), but reps can still key a low
+price_unit directly — leakage that is invisible today. Per (customer × SKU) over the LTM:
+realized unit price (Σ subtotal ÷ Σ qty — discount-true) vs the customer's applicable
+pricelist tier (fixed-price rules, qty break matched on the average order quantity).
+Exceptions below THRESHOLD of tier form the worklist, each valued at its annualized leak
+(= (tier − realized) × LTM qty). Pricing canon: ~1% realization ≈ 8-9% operating profit.
+
+v1 simplifications (documented, deliberate):
+ - qty break matched on AVG order qty per (customer, SKU) — not per order line;
+ - fixed-price rules only (this instance prices via fixed tiers, like the legacy SKU app);
+ - LTM window, wholesale scope.
+"""
+import datetime as dt
+
+import core.odoo as O
+import core.periods as P
+import modules.customers as cust
+
+THRESHOLD = 0.97 # below 97% of tier = exception
+
+
+def _rules():
+ """All date-valid fixed-price pricelist rules, indexed by (pricelist, product-variant)
+ and (pricelist, product-template). Highest min_quantity ≤ qty wins at match time."""
+ today = P.today().isoformat()
+ rows = O.search_read(
+ 'product.pricelist.item',
+ [('compute_price', '=', 'fixed'),
+ ('applied_on', 'in', ['0_product_variant', '1_product'])],
+ ['pricelist_id', 'product_id', 'product_tmpl_id', 'min_quantity',
+ 'fixed_price', 'date_start', 'date_end', 'applied_on'])
+ ok = []
+ for r in rows:
+ ds = str(r.get('date_start') or '')[:10]
+ de = str(r.get('date_end') or '')[:10]
+ if (ds and ds > today) or (de and de < today):
+ continue
+ ok.append(r)
+ by_var, by_tmpl = {}, {}
+ for r in ok:
+ pl = O.m2o_id(r['pricelist_id'])
+ if r['applied_on'] == '0_product_variant' and r.get('product_id'):
+ by_var.setdefault((pl, O.m2o_id(r['product_id'])), []).append(r)
+ elif r.get('product_tmpl_id'):
+ by_tmpl.setdefault((pl, O.m2o_id(r['product_tmpl_id'])), []).append(r)
+ return ok, by_var, by_tmpl
+
+
+def _tier_for(pl, pid, tmpl, qty, by_var, by_tmpl):
+ """The applicable fixed tier price: variant rules beat template rules; within a scope,
+ the highest qty break ≤ qty wins."""
+ for cands in (by_var.get((pl, pid)), by_tmpl.get((pl, tmpl))):
+ if not cands:
+ continue
+ eligible = [r for r in cands if (r.get('min_quantity') or 0) <= max(qty, 1)]
+ if eligible:
+ best = max(eligible, key=lambda r: r.get('min_quantity') or 0)
+ return best.get('fixed_price') or None
+ return None
+
+
+def matched_pairs(team_id=None, t=None):
+ """The shared substrate: every (customer × SKU) pair bought in the LTM with its applicable
+ fixed tier attached (tier=None when the customer has no pricelist / no rule matches).
+ Used by the compliance sweep here AND by the price corridor + pocket waterfall
+ (modules/reprice.py) — one definition of 'realized vs tier' everywhere."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+
+ # realized price per (customer, SKU) — one server-side aggregate
+ g = O.read_group('sale.order.line', O.sale_line_domain(lf, lt, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum'],
+ ['order_partner_id', 'product_id'], lazy=False)
+ pairs = []
+ for r in g:
+ pid = O.m2o_id(r.get('order_partner_id'))
+ prod = O.m2o_id(r.get('product_id'))
+ qty = r.get('product_uom_qty') or 0.0
+ rev = r.get('price_subtotal') or 0.0
+ n = r.get('__count') or 1
+ if pid and prod and qty > 0 and rev > 0:
+ pairs.append({'pid': pid, 'customer': O.m2o_name(r.get('order_partner_id')),
+ 'prod': prod, 'product': O.m2o_name(r.get('product_id')),
+ 'qty': qty, 'rev': rev, 'lines': n,
+ 'unit': rev / qty, 'avg_order_qty': qty / n})
+
+ # customer pricelists + product template/code lookups
+ pids = list({p['pid'] for p in pairs})
+ plists = {}
+ for i in range(0, len(pids), 2000):
+ for r in O.search_read('res.partner', [('id', 'in', pids[i:i + 2000])],
+ ['property_product_pricelist']):
+ plists[r['id']] = O.m2o_id(r.get('property_product_pricelist'))
+ prods = list({p['prod'] for p in pairs})
+ pinfo = {}
+ for i in range(0, len(prods), 2000):
+ for r in O.search_read('product.product',
+ [('id', 'in', prods[i:i + 2000]),
+ ('active', 'in', [True, False])],
+ ['product_tmpl_id', 'default_code']):
+ pinfo[r['id']] = {'tmpl': O.m2o_id(r.get('product_tmpl_id')),
+ 'code': (r.get('default_code') or '').strip()}
+
+ all_rules, by_var, by_tmpl = _rules()
+ for p in pairs:
+ info = pinfo.get(p['prod'], {})
+ p['sku'] = info.get('code', '')
+ pl = plists.get(p['pid'])
+ tier = (_tier_for(pl, p['prod'], info.get('tmpl'), p['avg_order_qty'],
+ by_var, by_tmpl) if pl else None)
+ p['tier'] = tier if (tier and tier > 0) else None
+ return {'pairs': pairs, 'checked': len(pairs), 'n_rules': len(all_rules),
+ 'window': (lf, lt)}
+
+
+def build(team_id=None, t=None, pre=None):
+ """The compliance sweep. Returns dict(rows[exceptions], checked, matched, kpis…)."""
+ mp = pre or matched_pairs(team_id, t)
+ matched_list = [p for p in mp['pairs'] if p.get('tier')]
+ exceptions = [p for p in matched_list if p['unit'] / p['tier'] < THRESHOLD]
+ attrs = cust._partner_attrs(list({p['pid'] for p in exceptions}))
+ rows = []
+ for p in exceptions:
+ tier = p['tier']
+ rows.append({
+ 'pid': p['pid'], 'customer': p['customer'],
+ 'sku': p['sku'], 'product': p['product'],
+ 'agent': (attrs.get(p['pid']) or {}).get('agent', '(none)'),
+ 'tier_price': tier, 'realized': p['unit'],
+ 'pct_of_tier': p['unit'] / tier * 100.0,
+ 'qty_ltm': p['qty'], 'rev_ltm': p['rev'],
+ 'leak': (tier - p['unit']) * p['qty'], 'lines': p['lines'],
+ })
+ rows.sort(key=lambda x: -x['leak'])
+ return {
+ 'rows': rows, 'checked': mp['checked'], 'matched': len(matched_list),
+ 'n_rules': mp['n_rules'],
+ 'leak_total': sum(r['leak'] for r in rows),
+ 'exception_rate': (len(rows) / len(matched_list) * 100.0) if matched_list else 0.0,
+ 'window': mp['window'],
+ }
+
+
+def validate(t=None, team_id=None):
+ """(1) rule pull complete vs search_count; (2) the TOP exception re-derived row-level:
+ its realized unit price recomputed from its raw order lines (independent path) must match
+ the read_group aggregate the sweep used."""
+ b = build(team_id, t)
+ n = O.get_odoo().search_count(
+ 'product.pricelist.item',
+ [('compute_price', '=', 'fixed'),
+ ('applied_on', 'in', ['0_product_variant', '1_product'])])
+ checks = [{'check': 'fixed pricelist rules — pull complete (pre date-filter)',
+ 'a': b['n_rules'], 'b': f'<= {n}', 'gap': '',
+ 'ok': b['n_rules'] <= n}]
+ if b['rows']:
+ top = b['rows'][0]
+ lf, lt = b['window']
+ lines = O.search_read('sale.order.line',
+ O.sale_line_domain(lf, lt, team_id,
+ partner_ids=[top['pid']],
+ extra=[('product_id.default_code', '=',
+ top['sku'])]),
+ ['price_subtotal', 'product_uom_qty'])
+ qty = sum(l.get('product_uom_qty') or 0 for l in lines)
+ rev = sum(l.get('price_subtotal') or 0 for l in lines)
+ unit = rev / qty if qty else 0.0
+ checks.append({'check': f"top exception realized price — {top['sku']}",
+ 'a': round(unit, 4), 'b': round(top['realized'], 4),
+ 'gap': round(unit - top['realized'], 4),
+ 'ok': abs(unit - top['realized']) < 0.01})
+ return checks
diff --git a/platform/modules/pricing.py b/platform/modules/pricing.py
new file mode 100644
index 0000000000000000000000000000000000000000..c49f49988cc7f329afb253879efcc941eef8812f
--- /dev/null
+++ b/platform/modules/pricing.py
@@ -0,0 +1,395 @@
+"""Pricing module — per-SKU economics for pricing decisions.
+
+For every SKU (LTM): units, revenue, unit cost, avg selling price, GROSS margin $/%, markup %
+(= revenue/COGS − 1), and a fully-loaded NET margin after allocating operating expenses to the SKU.
+
+COST-TO-SKU ALLOCATION (tiered, channel-scoped, SELECTABLE driver):
+ COGS is per-SKU already (Odoo Margin module). Operating expenses live per analytic
+ (Fisch/Royal/Amazon/HQ). Each channel pool = its analytic opex; we distribute it across that
+ channel's SKUs by a chosen DRIVER, and HQ overhead across all SKUs by the same driver:
+ pool_C = channel_rate_C * Σ(channel revenue) # rate-based magnitude (robust to Amazon
+ opex(sku)= Σ_C pool_C * driverC(sku)/Σ driverC + pool_HQ * driver(sku)/Σ driver
+ # invoice revenue not fully visible per-SKU)
+ Driver options:
+ - 'cogs' : cost-weighted (default) — higher-cost items bear more overhead.
+ - 'cbm' : physical size — units × volume (m³); BIGGER/bulkier SKUs absorb more (storage/freight/
+ FBA scale with size). Volume is on ~24% of SKUs in Odoo; the rest are imputed at the
+ category (else global) median volume. Weight is unusable (~0% populated).
+ - 'revenue': % of sale (reduces to channel_rate × revenue).
+ - 'units' : per-unit.
+ net(sku) = gross_margin(sku) − opex(sku). NET is a decision estimate; GROSS (margin/markup) is exact.
+
+Brand-filterable: team_id None = all channels (incl Amazon); 5 = Fisch, 6 = Royal (wholesale scope).
+READ-ONLY.
+"""
+import sys
+import statistics
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+
+_ANA = {1: 'Fisch', 2: 'Royal', 3: 'Amazon', 4: 'HQ', 5: 'Internal'}
+# Period: calendar 2025 (not LTM) so the pricing P&L ties to the 2025 P&L / GL / vendor analyses.
+_FY = ('2025-01-01', '2025-12-31')
+_FY_LABEL = 'FY2025'
+DRIVERS = {'cogs': 'COGS (cost-weighted)', 'cbm': 'CBM / volume (size)', 'revenue': 'Revenue', 'units': 'Units'}
+_DRIVER_SHORT = {'cogs': 'COGS', 'cbm': 'CBM', 'units': 'Units', 'revenue': 'Revenue'}
+
+
+def has_driver_data(row, driver):
+ """True if the SKU has REAL (not imputed / defaulted) data for the chosen allocation driver."""
+ if driver == 'cbm':
+ return bool(row.get('vol_known')) # volume on file in Odoo (else category-median imputed)
+ if driver == 'cogs':
+ return (row.get('cogs') or 0) > 0 # has a real product cost (else uncosted)
+ if driver == 'units':
+ return (row.get('units') or 0) > 0
+ return (row.get('revenue') or 0) > 0 # revenue: always present in the table
+
+
+def rates(t=None):
+ """LTM opex rates per channel + HQ, from the analytic ledger. {channel: opex/revenue}."""
+ lf, lt = _FY
+ o = O.get_odoo()
+ rev = {_ANA.get(O.m2o_id(r['account_id'])): (r['amount'] or 0.0) for r in o.read_group(
+ 'account.analytic.line', [('date', '>=', lf), ('date', '<=', lt),
+ ('general_account_id.account_type', 'in', ['income', 'income_other'])],
+ ['amount:sum', 'account_id'], ['account_id'], lazy=False) if O.m2o_id(r['account_id']) in _ANA}
+ opx = {_ANA.get(O.m2o_id(r['account_id'])): -(r['amount'] or 0.0) for r in o.read_group(
+ 'account.analytic.line', [('date', '>=', lf), ('date', '<=', lt),
+ ('general_account_id.account_type', 'in', ['expense', 'expense_depreciation'])],
+ ['amount:sum', 'account_id'], ['account_id'], lazy=False) if O.m2o_id(r['account_id']) in _ANA}
+ tot_rev = sum(rev.values()) or 1.0
+ def rate(k):
+ return (opx.get(k, 0.0) / rev[k]) if rev.get(k) else 0.0
+ return {'Fisch': rate('Fisch'), 'Royal': rate('Royal'), 'Amazon': rate('Amazon'),
+ 'HQ': (opx.get('HQ', 0.0) + opx.get('Internal', 0.0)) / tot_rev,
+ 'window': _FY_LABEL, '_rev': rev, '_opex': opx, '_tot_rev': tot_rev}
+
+
+def _meta(pids):
+ prods = O.search_read('product.product', [('id', 'in', pids), ('active', 'in', [True, False])],
+ ['default_code', 'name', 'categ_id', 'volume'])
+ cats = {}
+ for c in O.search_read('product.category', [], ['id', 'complete_name']):
+ parts = [x.strip() for x in (c['complete_name'] or '').split('/')]
+ cats[c['id']] = parts[1] if len(parts) >= 2 else (parts[0] if parts else None)
+ # median volume per category + global, to impute the SKUs without volume on file
+ by_cat = {}
+ allv = []
+ for p in prods:
+ v = p.get('volume') or 0.0
+ if v > 0:
+ allv.append(v)
+ by_cat.setdefault(O.m2o_id(p.get('categ_id')), []).append(v)
+ gmed = statistics.median(allv) if allv else 0.0
+ cmed = {c: statistics.median(vs) for c, vs in by_cat.items()}
+ out = {}
+ for p in prods:
+ cid = O.m2o_id(p.get('categ_id'))
+ v = p.get('volume') or 0.0
+ out[p['id']] = {'sku': p.get('default_code') or f"#{p['id']}", 'name': p.get('name') or '',
+ 'category': cats.get(cid) or '(uncategorized)',
+ 'volume': v, 'vol_used': v if v > 0 else (cmed.get(cid) or gmed), 'vol_known': v > 0}
+ return out
+
+
+def _build(team_id=None, driver='cogs', t=None):
+ t = t or P.today()
+ lf, lt = _FY
+ o = O.get_odoo()
+ rt = rates(t)
+ gift = list(O.excluded_partner_ids())
+ win = [('order_id.date_order', '>=', f'{lf} 00:00:00'), ('order_id.date_order', '<=', f'{lt} 23:59:59')]
+ sbase = [('order_id.state', 'in', ['sale', 'done']), ('product_id.type', '!=', 'service')] + win
+
+ def by_prod(extra, fields):
+ return {O.m2o_id(r['product_id']): r for r in o.read_group('sale.order.line', sbase + extra,
+ fields + ['product_id'], ['product_id'], lazy=False) if r.get('product_id')}
+
+ if team_id in (5, 6): # one wholesale BU
+ allc = by_prod([('order_id.team_id', '=', team_id), ('order_partner_id', 'not in', gift)],
+ ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'])
+ chan_of = {pid: ('Fisch' if team_id == 5 else 'Royal') for pid in allc}
+ chan_rev = {pid: {('Fisch' if team_id == 5 else 'Royal'): (a['price_subtotal'] or 0.0)} for pid, a in allc.items()}
+ else: # all channels
+ allc = by_prod([], ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'])
+ rf = by_prod([('order_id.team_id', '=', 5), ('order_partner_id', 'not in', gift)], ['price_subtotal:sum'])
+ rr = by_prod([('order_id.team_id', '=', 6), ('order_partner_id', 'not in', gift)], ['price_subtotal:sum'])
+ ra = by_prod([('order_partner_id', 'in', gift)] if gift else [('id', '=', -1)], ['price_subtotal:sum'])
+ chan_rev = {pid: {'Fisch': (rf.get(pid, {}).get('price_subtotal') or 0.0),
+ 'Royal': (rr.get(pid, {}).get('price_subtotal') or 0.0),
+ 'Amazon': (ra.get(pid, {}).get('price_subtotal') or 0.0)} for pid in allc}
+
+ meta = _meta(list(allc))
+ # assemble per-SKU base
+ skus = {}
+ for pid, a in allc.items():
+ rev = a['price_subtotal'] or 0.0
+ if rev <= 0:
+ continue
+ units = a['product_uom_qty'] or 0.0
+ gm = a['margin'] or 0.0
+ cogs = rev - gm
+ m = meta.get(pid, {})
+ skus[pid] = {'rev': rev, 'units': units, 'gm': gm, 'cogs': cogs, 'cr': chan_rev.get(pid, {}),
+ 'cbm': units * (m.get('vol_used') or 0.0), 'm': m}
+
+ # driver value per SKU + its apportionment to each channel (by revenue mix)
+ def dval(s):
+ return {'cogs': s['cogs'], 'cbm': s['cbm'], 'units': s['units'], 'revenue': s['rev']}.get(driver, s['cogs'])
+ chans = ['Fisch', 'Royal', 'Amazon']
+ pool = {C: rt[C] * sum(s['cr'].get(C, 0.0) for s in skus.values()) for C in chans} # rate × visible channel rev
+ pool_hq = rt['HQ'] * sum(s['rev'] for s in skus.values())
+ sumdrvC = {C: sum(dval(s) * (s['cr'].get(C, 0.0) / s['rev']) for s in skus.values() if s['rev']) for C in chans}
+ sumdrv = sum(dval(s) for s in skus.values()) or 1.0
+
+ rows = []
+ for pid, s in skus.items():
+ load = pool_hq * (dval(s) / sumdrv)
+ for C in chans:
+ if sumdrvC[C] > 0 and s['rev']:
+ load += pool[C] * (dval(s) * (s['cr'].get(C, 0.0) / s['rev'])) / sumdrvC[C]
+ rev, gm, cogs, units = s['rev'], s['gm'], s['cogs'], s['units']
+ net = gm - load
+ m = s['m']
+ rows.append({
+ 'product_id': pid, 'sku': m.get('sku', f'#{pid}'), 'code': m.get('sku', f'#{pid}'),
+ 'product': m.get('name', ''), 'name': m.get('name', ''), 'category': m.get('category', '(uncategorized)'),
+ 'units': units, 'revenue': rev, 'cogs': cogs,
+ 'unit_cost': (cogs / units) if units else 0.0, 'avg_price': (rev / units) if units else 0.0,
+ 'cbm_unit': m.get('volume', 0.0), 'cbm_used': m.get('vol_used', 0.0), 'cbm_total': s['cbm'],
+ 'vol_known': m.get('vol_known', False), 'cbm_src': ('on file' if m.get('vol_known') else 'imputed'),
+ 'gm_dollars': gm, 'gm_pct': (gm / rev * 100) if rev else 0.0,
+ 'markup_pct': (gm / cogs * 100) if cogs > 0 else None,
+ 'opex_load': load, 'opex_pct': (load / rev * 100) if rev else 0.0,
+ 'net_dollars': net, 'net_pct': (net / rev * 100) if rev else 0.0,
+ 'status': ('Below cost' if gm < 0 else 'Net-negative' if net < 0 else 'Thin (<10% net)' if (net / rev) < 0.10 else 'Healthy'),
+ })
+ rows.sort(key=lambda r: -r['revenue'])
+ return rows, rt
+
+
+def table(team_id=None, driver='cogs', t=None):
+ return _build(team_id, driver, t)[0]
+
+
+def summary(team_id=None, driver='cogs', t=None, built=None):
+ rows, rt = built or _build(team_id, driver, t)
+ rev = sum(r['revenue'] for r in rows)
+ gm = sum(r['gm_dollars'] for r in rows)
+ net = sum(r['net_dollars'] for r in rows)
+ mk = [r['markup_pct'] for r in rows if r['markup_pct'] is not None]
+ vol_known = sum(1 for r in rows if r['vol_known'])
+ driver_known = sum(1 for r in rows if has_driver_data(r, driver))
+ return {
+ 'window': rt['window'], 'skus': len(rows), 'revenue': rev, 'driver': driver, 'driver_label': DRIVERS.get(driver, driver),
+ 'driver_short': _DRIVER_SHORT.get(driver, driver),
+ 'gm_dollars': gm, 'gm_pct': (gm / rev * 100) if rev else 0.0,
+ 'net_dollars': net, 'net_pct': (net / rev * 100) if rev else 0.0,
+ 'avg_markup': (sum(mk) / len(mk)) if mk else 0.0,
+ 'below_cost_skus': sum(1 for r in rows if r['gm_dollars'] < 0),
+ 'net_negative_skus': sum(1 for r in rows if r['net_dollars'] < 0),
+ 'net_negative_rev': sum(r['revenue'] for r in rows if r['net_dollars'] < 0),
+ 'vol_coverage': (vol_known / len(rows) * 100) if rows else 0.0,
+ 'driver_known': driver_known, 'driver_coverage': (driver_known / len(rows) * 100) if rows else 0.0,
+ 'rates': {k: round(rt[k] * 100, 1) for k in ('Fisch', 'Royal', 'Amazon', 'HQ')},
+ }
+
+
+def cost_drift(t=None, team_id=None):
+ """Replacement-cost drift from confirmed PO lines: the net price paid per unit in the LAST
+ 12 months vs the 12 months BEFORE, per product, joined to what the SELL price did over the
+ same two windows (BU-scoped sell side; cost is company-wide). ERODING = cost up >5% while
+ the selling price followed by less than half — the margin leaks silently until repriced.
+ cost_impact_12m = (cost_now − cost_prior) × units sold last 12m (the annualized $ at stake)."""
+ t = t or P.today()
+ d24 = (t - dt.timedelta(days=730)).isoformat()
+ d12 = (t - dt.timedelta(days=365)).isoformat()
+ lines = O.search_read('purchase.order.line',
+ [('order_id.state', 'in', ('purchase', 'done')),
+ ('order_id.date_order', '>=', d24),
+ ('product_qty', '>', 0), ('price_unit', '>', 0)],
+ ['product_id', 'product_qty', 'product_uom_qty', 'price_subtotal',
+ 'order_id'])
+ oids = list({O.m2o_id(l['order_id']) for l in lines if l.get('order_id')})
+ od = {}
+ for i in range(0, len(oids), 5000):
+ for o_ in O.search_read('purchase.order', [('id', 'in', oids[i:i + 5000])], ['date_order']):
+ od[o_['id']] = str(o_['date_order'])[:10]
+ cur, prior = {}, {} # pid -> [net spend, qty]
+ for l in lines:
+ pid = O.m2o_id(l.get('product_id'))
+ d = od.get(O.m2o_id(l.get('order_id')))
+ if not pid or not d:
+ continue
+ e = (cur if d >= d12 else prior).setdefault(pid, [0.0, 0.0])
+ e[0] += l.get('price_subtotal') or 0.0
+ # BASE-UoM qty, so a piece→case purchase-UoM switch doesn't fake a price spike
+ e[1] += l.get('product_uom_qty') or l.get('product_qty') or 0.0
+ both = [p for p in cur if p in prior and prior[p][1] > 0 and cur[p][1] > 0]
+
+ def _sell(a, b_):
+ out = {}
+ for g in O.read_group('sale.order.line', O.sale_line_domain(a, b_, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum'], ['product_id'],
+ lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ if pid:
+ out[pid] = (g.get('price_subtotal') or 0.0, g.get('product_uom_qty') or 0.0)
+ return out
+ s_now, s_pri = _sell(d12, t.isoformat()), _sell(d24, d12)
+
+ meta = {}
+ for i in range(0, len(both), 5000):
+ for p in O.search_read('product.product',
+ [('id', 'in', both[i:i + 5000]), ('active', 'in', [True, False])],
+ ['default_code', 'name', 'standard_price']):
+ meta[p['id']] = p
+ rows = []
+ for pid in both:
+ c_now, c_pri = cur[pid][0] / cur[pid][1], prior[pid][0] / prior[pid][1]
+ if c_pri <= 0:
+ continue
+ rn, qn = s_now.get(pid, (0.0, 0.0))
+ rp, qp = s_pri.get(pid, (0.0, 0.0))
+ asp_now = rn / qn if qn else None
+ asp_pri = rp / qp if qp else None
+ p = meta.get(pid, {})
+ rows.append({'pid': pid, 'code': (p.get('default_code') or '').strip(),
+ 'product': p.get('name') or '',
+ 'cost_prior': c_pri, 'cost_now': c_now,
+ 'drift_pct': (c_now / c_pri - 1) * 100,
+ 'buy_qty_12m': cur[pid][1], 'std_cost': p.get('standard_price') or 0.0,
+ 'asp_now': asp_now, 'asp_prior': asp_pri,
+ 'price_chg_pct': ((asp_now / asp_pri - 1) * 100)
+ if (asp_now and asp_pri) else None,
+ 'units_12m': qn, 'cost_impact_12m': (c_now - c_pri) * qn,
+ 'gm_pct_now': ((asp_now - c_now) / asp_now * 100) if asp_now else None})
+ # a >3x (or <1/3) per-base-unit move is a UoM/master-data break, not market inflation —
+ # surfaced as its own data-quality list so it can't pollute the erosion signal
+ breaks = sorted((r for r in rows if not (1 / 3 <= (r['cost_now'] / r['cost_prior']) <= 3)),
+ key=lambda r: -abs(r['drift_pct']))
+ broken = {r['pid'] for r in breaks}
+ eroding = sorted((r for r in rows
+ if r['pid'] not in broken
+ and r['drift_pct'] > 5 and (r['units_12m'] or 0) > 0
+ and (r['price_chg_pct'] is None or r['price_chg_pct'] < r['drift_pct'] / 2)),
+ key=lambda r: -(r['cost_impact_12m'] or 0))
+ improving = sorted((r for r in rows if r['pid'] not in broken
+ and r['drift_pct'] < -5 and (r['units_12m'] or 0) > 0),
+ key=lambda r: r['cost_impact_12m'])
+ return {'rows': rows, 'eroding': eroding, 'improving': improving, 'breaks': breaks,
+ 'n_products': len(rows),
+ 'erosion_total': sum(r['cost_impact_12m'] for r in eroding),
+ 'tailwind_total': sum(r['cost_impact_12m'] for r in improving),
+ '_cur_spend': sum(e[0] for e in cur.values()),
+ '_cur_domain_from': d12, 'windows': (d24, d12, t.isoformat())}
+
+
+def cost_drift_validate(cd, t=None):
+ """The 12m PO spend our per-product weighting is built on == the server-side sum over the
+ identical domain (two independent aggregation paths)."""
+ t = t or P.today()
+ dom = [('order_id.state', 'in', ('purchase', 'done')),
+ ('order_id.date_order', '>=', cd['_cur_domain_from']),
+ ('product_qty', '>', 0), ('price_unit', '>', 0)]
+ srv = O.sum_field('purchase.order.line', dom, 'price_subtotal')
+ return [{'check': 'Cost drift: Σ(per-product 12m PO spend) == server Σ(line subtotal), same domain',
+ 'a': round(cd['_cur_spend'], 2), 'b': round(srv, 2),
+ 'gap': round(cd['_cur_spend'] - srv, 2),
+ 'ok': abs(cd['_cur_spend'] - srv) <= max(1.0, abs(srv) * 0.001)}]
+
+
+def _pnl_entities(t=None):
+ """Actual LTM P&L per analytic entity (the basis the Management P&L is built from)."""
+ lf, lt = _FY
+ o = O.get_odoo()
+ def grp(types):
+ return {_ANA.get(O.m2o_id(r['account_id'])): (r['amount'] or 0.0) for r in o.read_group(
+ 'account.analytic.line', [('date', '>=', lf), ('date', '<=', lt),
+ ('general_account_id.account_type', 'in', types)], ['amount:sum', 'account_id'], ['account_id'], lazy=False)
+ if O.m2o_id(r['account_id']) in _ANA}
+ inc, cog, opx = grp(['income', 'income_other']), grp(['expense_direct_cost']), grp(['expense', 'expense_depreciation'])
+ return {k: {'revenue': inc.get(k, 0.0), 'cogs': -cog.get(k, 0.0), 'opex': -opx.get(k, 0.0)} for k in _ANA.values()}
+
+
+def gl_pnl(t=None):
+ """Actual LTM P&L straight from the posted GL (the official books) — the independent reconciliation
+ target. Revenue − COGS − Opex = Net."""
+ lf, lt = _FY
+ def s(types):
+ return O.sum_field('account.move.line', [('parent_state', '=', 'posted'), ('date', '>=', lf),
+ ('date', '<=', lt), ('account_id.account_type', 'in', types)], 'balance')
+ rev = -s(['income', 'income_other']) # income is credit → flip to positive
+ cogs = s(['expense_direct_cost'])
+ opex = s(['expense', 'expense_depreciation'])
+ return {'revenue': rev, 'cogs': cogs, 'gm': rev - cogs, 'opex': opex, 'net': rev - cogs - opex}
+
+
+def reconcile(team_id=None, driver='cogs', t=None, built=None):
+ """Bridge the per-SKU P&L to the ACTUAL P&L: attributed SKUs + unattributed (Amazon-direct, not
+ booked per-SKU) = the displayed P&L. Ties by construction; the unattributed line is the residual."""
+ rows, rt = built or _build(team_id, driver, t)
+ ent = _pnl_entities(t)
+ tot_rev = sum(e['revenue'] for e in ent.values()) or 1.0
+ hq_rate = (ent['HQ']['opex'] + ent['Internal']['opex']) / tot_rev
+ if team_id in (5, 6):
+ k = 'Fisch' if team_id == 5 else 'Royal'
+ rev_t, cogs_t = ent[k]['revenue'], ent[k]['cogs']
+ opex_t = ent[k]['opex'] + hq_rate * ent[k]['revenue'] # BU opex + its share of HQ
+ else:
+ rev_t = sum(e['revenue'] for e in ent.values())
+ cogs_t = sum(e['cogs'] for e in ent.values())
+ opex_t = sum(e['opex'] for e in ent.values()) # all opex incl HQ
+ net_t = rev_t - cogs_t - opex_t
+ rev_s = sum(r['revenue'] for r in rows)
+ gm_s = sum(r['gm_dollars'] for r in rows)
+ cogs_s, opex_s = rev_s - gm_s, sum(r['opex_load'] for r in rows)
+ net_s = gm_s - opex_s
+ una = {'revenue': rev_t - rev_s, 'cogs': cogs_t - cogs_s, 'gm': (rev_t - rev_s) - (cogs_t - cogs_s),
+ 'opex': opex_t - opex_s, 'net': net_t - net_s}
+ pnl = {'revenue': rev_t, 'cogs': cogs_t, 'gm': rev_t - cogs_t, 'opex': opex_t, 'net': net_t}
+ sku = {'revenue': rev_s, 'cogs': cogs_s, 'gm': gm_s, 'opex': opex_s, 'net': net_s}
+ return {'pnl': pnl, 'sku': sku, 'unattrib': una, 'ties': abs((net_s + una['net']) - net_t) < 1.0}
+
+
+def page_data(team_id=None, driver='cogs', t=None):
+ """One build → rows + summary + reconciliation + validation (avoids rebuilding 4×)."""
+ built = _build(team_id, driver, t)
+ return {'rows': built[0], 'summary': summary(team_id, driver, t, built=built),
+ 'reconcile': reconcile(team_id, driver, t, built=built),
+ 'validation': validate(team_id, driver, t, built=built)}
+
+
+def validate(team_id=None, driver='cogs', t=None, built=None):
+ rows, rt = built or _build(team_id, driver, t)
+ checks = []
+ lf, lt = _FY
+ gift = list(O.excluded_partner_ids())
+ dom = [('order_id.state', 'in', ['sale', 'done']), ('order_id.date_order', '>=', f'{lf} 00:00:00'),
+ ('order_id.date_order', '<=', f'{lt} 23:59:59'), ('product_id.type', '!=', 'service'), ('price_subtotal', '>', 0)]
+ if team_id in (5, 6):
+ dom += [('order_id.team_id', '=', team_id), ('order_partner_id', 'not in', gift)]
+ indep = O.sum_field('sale.order.line', dom, 'price_subtotal')
+ ours = sum(r['revenue'] for r in rows)
+ checks.append({'check': 'Σ per-SKU revenue == scoped FY2025 (positive lines)', 'a': round(ours, 0),
+ 'b': round(indep, 0), 'gap': round(ours - indep, 0), 'ok': abs(ours - indep) <= max(50.0, indep * 0.01)})
+ if rows:
+ s = rows[0]
+ checks.append({'check': f"GM == revenue−COGS (sample {s['sku']})", 'a': round(s['gm_dollars'], 2),
+ 'b': round(s['revenue'] - s['cogs'], 2), 'gap': round(s['gm_dollars'] - (s['revenue'] - s['cogs']), 2),
+ 'ok': abs(s['gm_dollars'] - (s['revenue'] - s['cogs'])) <= 0.5})
+ # THE finance check — per-SKU P&L reconciles to the actual P&L (and that target ties to the posted GL)
+ rc = reconcile(team_id, driver, t, built=(rows, rt))
+ checks.append({'check': 'Attributed SKUs + unattributed net == P&L net (reconciles)',
+ 'a': round(rc['sku']['net'] + rc['unattrib']['net'], 0), 'b': round(rc['pnl']['net'], 0),
+ 'gap': round(rc['sku']['net'] + rc['unattrib']['net'] - rc['pnl']['net'], 0), 'ok': rc['ties']})
+ if team_id is None:
+ gl = gl_pnl(t)
+ checks.append({'check': 'P&L target (analytic) == posted GL net (actual books)',
+ 'a': round(rc['pnl']['net'], 0), 'b': round(gl['net'], 0),
+ 'gap': round(rc['pnl']['net'] - gl['net'], 0), 'ok': abs(rc['pnl']['net'] - gl['net']) <= 2.0})
+ return checks
diff --git a/platform/modules/procurement.py b/platform/modules/procurement.py
new file mode 100644
index 0000000000000000000000000000000000000000..8632737d8d1cfd4bd41ced18ece8dd5a782d92db
--- /dev/null
+++ b/platform/modules/procurement.py
@@ -0,0 +1,540 @@
+"""Procurement module — biweekly buy list + the full Qualify-tab workflow, rebuilt from the Royal
+Imports Inventory System (v24/v25).
+
+Master data (Supplier / Country / Lead / CBM / container / first cost) comes from the curated map
+`procurement_suppliers.json` (~3,960 SKUs from the Inventory System Mastersheet). The team's live
+edits (change vendor/country/cost) are overlaid in the UI from a `procurement_overrides` store, so a
+re-vendored SKU regroups instantly without re-pulling Odoo. Alternative vendors + prices come from
+Odoo `product.supplierinfo` (the cheapest-vendor view). Demand / on-hand / incoming POs are live
+from Odoo (read-only).
+
+Reorder math (validated on the v24.4 Backend):
+ 8-month demand = units sold same 8-month window last year (all channels)
+ avg/day = 8M demand / window days
+ days of cover = (on-hand + incoming PO) / avg/day
+ reorder point = lead-time days * avg/day
+ Reorder QTY = ceil(reorder point * 1.05) [Baseline]
+ Reorder +trend = Reorder QTY * (YTD units this yr / last yr)
+ BUY TODAY = days of cover < lead time
+READ-ONLY on Odoo; the team's Order Qty + master-data edits persist in the platform store.
+"""
+import sys
+import json
+import math
+import calendar
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+from functools import lru_cache
+import core.odoo as O
+import core.periods as P
+
+_HERE = Path(__file__).resolve().parent
+_SAFETY = 0.05
+_PROJ_MONTHS = 8
+_NO_SVC = [('product_id.type', '!=', 'service')]
+
+
+@lru_cache(maxsize=1)
+def suppliers():
+ """SKU(default_code) -> {desc, unit, qty_per_unit, first_cost, cbm, max_container, vendor,
+ country, lead} from the curated map."""
+ f = _HERE.parent / 'procurement_suppliers.json'
+ try:
+ return json.loads(f.read_text(encoding='utf-8'))
+ except Exception:
+ return {}
+
+
+def _add_months(d, n):
+ m = d.month - 1 + n
+ y = d.year + m // 12
+ m = m % 12 + 1
+ return dt.date(y, m, min(d.day, calendar.monthrange(y, m)[1]))
+
+
+def _proj_window(t):
+ return t, _add_months(t, _PROJ_MONTHS)
+
+
+def _demand_domain(a, b):
+ return [('order_id.state', 'in', ('sale', 'done')), ('order_id.date_order', '>=', a),
+ ('order_id.date_order', '<=', b)] + _NO_SVC
+
+
+def _units(a, b):
+ g = O.read_group('sale.order.line', _demand_domain(a, b), ['product_uom_qty:sum'],
+ ['product_id'], lazy=False)
+ return {O.m2o_id(r['product_id']): (r.get('product_uom_qty') or 0.0)
+ for r in g if r.get('product_id')}
+
+
+def _incoming_po():
+ out = {}
+ for r in O.read_group('purchase.order.line', [('state', '=', 'purchase')],
+ ['product_qty:sum', 'qty_received:sum'], ['product_id'], lazy=False):
+ pid = O.m2o_id(r.get('product_id'))
+ q = (r.get('product_qty') or 0.0) - (r.get('qty_received') or 0.0)
+ if pid and q > 0:
+ out[pid] = q
+ return out
+
+
+def _bought_12m(cutoff_iso):
+ """Units PURCHASED from suppliers in the last 12 months (confirmed POs), per product — the
+ reference for 'how much we actually bought last year' next to the projected need."""
+ out = {}
+ for r in O.read_group('purchase.order.line',
+ [('order_id.state', 'in', ('purchase', 'done')),
+ ('order_id.date_order', '>=', cutoff_iso)],
+ ['product_qty:sum'], ['product_id'], lazy=False):
+ pid = O.m2o_id(r.get('product_id'))
+ if pid:
+ out[pid] = r.get('product_qty') or 0.0
+ return out
+
+
+def _supplierinfo_by_tmpl():
+ """{template_id: [{'vendor','vendor_id','price'}...]} — Odoo's vendors per product, for the
+ multiple-vendor / cheapest-price views (Odoo prices are populated; lead times are not)."""
+ out = {}
+ for s in O.search_read('product.supplierinfo', [], ['product_tmpl_id', 'partner_id', 'price'],
+ limit=100000):
+ t = O.m2o_id(s.get('product_tmpl_id'))
+ if not t:
+ continue
+ out.setdefault(t, []).append({'vendor': O.m2o_name(s.get('partner_id')),
+ 'vendor_id': O.m2o_id(s.get('partner_id')),
+ 'price': s.get('price') or 0.0})
+ return out
+
+
+def _preorders(cutoff_iso):
+ """Per-product open customer demand (undelivered units on confirmed orders) + earliest need-by
+ date. STORED fields only — `qty_to_deliver` is a computed field and filtering/aggregating it forces
+ Odoo to compute across the whole line population (8+ min); instead sum the stored
+ `product_uom_qty - qty_delivered`. Bounded to orders since `cutoff_iso` so ancient never-closed
+ backorders don't dominate the figures. Returns ({pid: qty}, {pid: 'YYYY-MM-DD'})."""
+ dom = [('order_id.state', '=', 'sale'), ('order_id.date_order', '>=', cutoff_iso)]
+ qty = {}
+ for r in O.read_group('sale.order.line', dom, ['product_uom_qty:sum', 'qty_delivered:sum'],
+ ['product_id'], lazy=False):
+ pid = O.m2o_id(r.get('product_id'))
+ d = (r.get('product_uom_qty') or 0.0) - (r.get('qty_delivered') or 0.0)
+ if pid and d > 0:
+ qty[pid] = d
+ # need-by: only never-shipped lines (qty_delivered is STORED, so this filter is cheap) AND only
+ # for products that actually have open qty — need_by is consumed ONLY when preorder_qty>0 (pid in
+ # qty), so scoping the pull to those product_ids is both correct and much faster (~849 of ~2,870
+ # products → the search drops from ~8.4s to ~5s; the other ~2,000 products' rows were pure waste).
+ open_pids = list(qty)
+ if not open_pids:
+ return qty, {}
+ lines = O.search_read('sale.order.line',
+ dom + [('qty_delivered', '=', 0), ('product_id', 'in', open_pids)],
+ ['product_id', 'order_id'], limit=400000)
+ odate = {}
+ oids = list({O.m2o_id(l['order_id']) for l in lines if l.get('order_id')})
+ for o in O.search_read('sale.order', [('id', 'in', oids)], ['commitment_date', 'date_order']):
+ d = o.get('commitment_date') or o.get('date_order')
+ if d:
+ odate[o['id']] = str(d)[:10]
+ need = {}
+ for l in lines:
+ pid, oid = O.m2o_id(l['product_id']), O.m2o_id(l['order_id'])
+ d = odate.get(oid)
+ if pid and d and (pid not in need or d < need[pid]):
+ need[pid] = d
+ return qty, need
+
+
+def recommendations(t=None):
+ """Base per-SKU table (curated master data + live Odoo demand/stock/PO + alt-vendors). The UI
+ overlays the team's vendor/country/cost edits on top; reorder methods + CBM/container are here."""
+ t = t or P.today()
+ sup = suppliers()
+ if not sup:
+ return []
+ codeset = set(sup.keys())
+ ps, pe = _proj_window(t)
+ window_days = max(1, (pe - ps).days)
+ d8a, d8b = _add_months(t, -12).isoformat(), _add_months(pe, -12).isoformat()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ prods, demand8, ytd_now, ytd_prev, inpo, si, preorders, bought = O.parallel([
+ lambda: O.search_read('product.product',
+ [('default_code', '!=', False), ('active', 'in', [True, False])],
+ ['default_code', 'name', 'qty_available', 'standard_price', 'product_tmpl_id']),
+ lambda: _units(d8a, d8b),
+ lambda: _units(yf, yt),
+ lambda: _units(lf, lt),
+ _incoming_po,
+ _supplierinfo_by_tmpl,
+ lambda: _preorders(d8a),
+ lambda: _bought_12m(d8a),
+ ])
+ pre_qty, pre_need = preorders
+ today_iso = t.isoformat()
+ by_code = {}
+ for p in prods:
+ c = (p.get('default_code') or '').strip()
+ if c and c in codeset and c not in by_code:
+ by_code[c] = p
+ if not by_code:
+ return []
+
+ rows = []
+ for code, p in by_code.items():
+ pid = p['id']
+ meta = sup.get(code, {})
+ lead = meta.get('lead') or 0
+ tmpl = O.m2o_id(p.get('product_tmpl_id'))
+ alts = si.get(tmpl, [])
+ priced = sorted((a for a in alts if (a.get('price') or 0) > 0), key=lambda a: a['price'])
+ cheapest = priced[0] if priced else None
+ cost = (meta.get('first_cost') or (cheapest['price'] if cheapest else None)
+ or p.get('standard_price') or 0.0)
+ d8 = demand8.get(pid, 0.0)
+ avg_day = d8 / window_days if window_days else 0.0
+ on_hand = p.get('qty_available') or 0.0
+ po = inpo.get(pid, 0.0)
+ avail = on_hand + po
+ days_cover = (avail / avg_day) if avg_day > 0 else (None if avail <= 0 else 9999.0)
+ reorder_pt = lead * avg_day
+ rbase = math.ceil(reorder_pt * (1 + _SAFETY)) if reorder_pt > 0 else 0
+ yn, yp = ytd_now.get(pid, 0.0), ytd_prev.get(pid, 0.0)
+ trend = (yn / yp) if yp > 0 else None
+ rtrend = int(round(rbase * trend)) if trend is not None else rbase
+ buy = (days_cover is not None and lead > 0 and avg_day > 0 and days_cover < lead)
+ rows.append({
+ 'code': code, 'product': meta.get('desc') or p.get('name') or code,
+ 'unit': meta.get('unit') or '', 'qty_per_unit': meta.get('qty_per_unit'),
+ 'vendor': meta.get('vendor') or '(no supplier)', 'country': meta.get('country') or '',
+ 'lead': lead, 'on_hand': on_hand, 'incoming_po': po, 'demand_8m': d8, 'avg_day': avg_day,
+ 'bought_12m': bought.get(pid, 0.0),
+ 'days_cover': days_cover, 'reorder_baseline': rbase, 'reorder_trend': rtrend,
+ 'trend_pct': ((trend - 1) * 100) if trend is not None else None,
+ 'ytd_units': yn, 'ytd_units_ly': yp, 'unit_cost': cost, 'buy': buy,
+ 'cbm': meta.get('cbm'), 'max_container': meta.get('max_container'),
+ 'preorder_qty': pre_qty.get(pid, 0.0),
+ 'need_by': pre_need.get(pid) if pre_qty.get(pid, 0) > 0 else None,
+ 'overdue': bool(pre_qty.get(pid, 0) > 0 and pre_need.get(pid) and pre_need.get(pid) < today_iso),
+ 'email': meta.get('email'), 'city': meta.get('city'), 'street': meta.get('street'),
+ 'port': meta.get('port'),
+ 'n_vendors': len({a['vendor_id'] for a in alts if a.get('vendor_id')}),
+ 'cheapest_vendor': cheapest['vendor'] if cheapest else None,
+ 'cheapest_price': cheapest['price'] if cheapest else None,
+ 'alt_vendors': priced,
+ })
+ return rows
+
+
+def purchase_need_key(r):
+ """Sort key = 'what we need to purchase', most urgent first. SKUs flagged BUY (past the
+ reorder point) come before OK SKUs; within each, lower days-of-cover (closer to stocking out)
+ ranks higher; a bigger suggested reorder breaks ties. No-demand / fully-covered SKUs
+ (days_cover None or 9999) sink to the bottom. This is what orders the per-vendor line list so
+ that in 'All SKUs' mode the actionable SKUs float to the top while the whole catalogue stays
+ visible below."""
+ dc = r.get('days_cover')
+ if dc is None or dc >= 9999:
+ dc = float('inf')
+ return (0 if r.get('buy') else 1, dc, -(r.get('reorder_trend') or 0))
+
+
+def by_supplier(recs):
+ """Group rows into per-vendor purchase orders (pure — call with overrides already applied).
+ Each vendor's lines are ordered by purchase need (buy-first, most urgent on top — see
+ purchase_need_key), so the buy list and the 'All SKUs per vendor' view surface what to order
+ without hunting; the full SKU set for the vendor is still present, just sorted underneath."""
+ pos = {}
+ for r in recs:
+ v = r['vendor']
+ po = pos.setdefault(v, {'vendor': v, 'country': r.get('country', ''), 'lead': r.get('lead', 0),
+ 'lines': [], 'skus': 0})
+ po['lines'].append(r)
+ po['skus'] += 1
+ for po in pos.values():
+ po['lines'].sort(key=purchase_need_key)
+ return sorted(pos.values(), key=lambda x: (x['vendor'] or '~'))
+
+
+def data_quality():
+ sup = suppliers()
+ codes = list(sup.keys())
+ cs = set(codes)
+ found = {c for c in ((p.get('default_code') or '').strip()
+ for p in O.search_read('product.product',
+ [('default_code', '!=', False), ('active', 'in', [True, False])],
+ ['default_code'])) if c in cs}
+ missing = [c for c in codes if c not in found]
+ no_vendor = [c for c, d in sup.items() if not d.get('vendor')]
+ no_lead = [c for c, d in sup.items() if not d.get('lead')]
+ return [
+ {'issue': 'Curated SKU not found in Odoo (no live data)', 'count': len(missing),
+ 'fix': 'Check the SKU internal reference matches Odoo, or remove it from the mapping.',
+ 'sample': [{'default_code': c, 'name': sup.get(c, {}).get('desc')} for c in missing]},
+ {'issue': 'No supplier in the mapping', 'count': len(no_vendor),
+ 'fix': 'Set the vendor on the SKU (Procurement page or Vendor module) so a PO can be grouped.',
+ 'sample': [{'default_code': c, 'name': sup.get(c, {}).get('desc')} for c in no_vendor]},
+ {'issue': 'No lead time in the mapping', 'count': len(no_lead),
+ 'fix': 'Set the supplier lead time (days) — the buy trigger needs it.',
+ 'sample': [{'default_code': c, 'name': sup.get(c, {}).get('desc')} for c in no_lead]},
+ ]
+
+
+def _open_po_lines():
+ """All confirmed-PO lines still (partly) undelivered: state='purchase', open qty > 0, with the
+ line's expected date. One pull powers the PO board, the per-SKU inbound match and the late
+ chase list. (Same open-qty semantics as _incoming_po — the two are cross-validated.)"""
+ lines = O.search_read('purchase.order.line',
+ [('state', '=', 'purchase'), ('product_qty', '>', 0)],
+ ['order_id', 'partner_id', 'product_id', 'product_qty', 'qty_received',
+ 'price_unit', 'price_subtotal', 'date_planned'])
+ out = []
+ for r in lines:
+ open_qty = (r.get('product_qty') or 0) - (r.get('qty_received') or 0)
+ if open_qty <= 1e-3:
+ continue
+ qty = r.get('product_qty') or 0
+ unit = (r['price_subtotal'] / qty) if qty else (r.get('price_unit') or 0)
+ r['open_qty'] = open_qty
+ r['open_value'] = open_qty * unit
+ r['expected'] = str(r.get('date_planned') or '')[:10]
+ out.append(r)
+ return lines, out
+
+
+def open_pos(t=None):
+ """The open-PO board matched to procurement: order-level list of every confirmed PO with
+ undelivered quantity, per-SKU inbound (open qty + earliest ETA + late portion) keyed by
+ default_code so it joins the buy list, and the late-delivery chase list."""
+ t = t or P.today()
+ today = t.isoformat()
+ _all, lines = _open_po_lines()
+
+ pids = list({O.m2o_id(l['product_id']) for l in lines if l.get('product_id')})
+ codes = {}
+ for i in range(0, len(pids), 5000):
+ for p in O.search_read('product.product',
+ [('id', 'in', pids[i:i + 5000]), ('active', 'in', [True, False])],
+ ['default_code']):
+ codes[p['id']] = (p.get('default_code') or '').strip()
+
+ oids = list({O.m2o_id(l['order_id']) for l in lines if l.get('order_id')})
+ odates = {}
+ for i in range(0, len(oids), 5000):
+ for o_ in O.search_read('purchase.order', [('id', 'in', oids[i:i + 5000])],
+ ['date_order', 'amount_total']):
+ odates[o_['id']] = {'date_order': str(o_.get('date_order') or '')[:10],
+ 'amount_total': o_.get('amount_total') or 0.0}
+
+ by_po, by_sku, late_rows = {}, {}, []
+ for l in lines:
+ po_id = O.m2o_id(l['order_id'])
+ po_nm = O.m2o_name(l['order_id'])
+ sup = O.m2o_name(l['partner_id'])
+ pid = O.m2o_id(l['product_id'])
+ code = codes.get(pid) or O.m2o_name(l['product_id'])
+ exp = l['expected']
+ is_late = bool(exp and exp < today)
+
+ e = by_po.setdefault(po_nm, {
+ 'po': po_nm, 'supplier': sup,
+ 'ordered': odates.get(po_id, {}).get('date_order', ''),
+ 'po_value': odates.get(po_id, {}).get('amount_total', 0.0),
+ 'expected': exp, 'open_lines': 0, 'open_value': 0.0, 'late_value': 0.0})
+ e['open_lines'] += 1
+ e['open_value'] += l['open_value']
+ if exp and (not e['expected'] or exp < e['expected']):
+ e['expected'] = exp
+ if is_late:
+ e['late_value'] += l['open_value']
+
+ s = by_sku.setdefault(code, {'open_qty': 0.0, 'open_value': 0.0, 'eta': None,
+ 'late_qty': 0.0, 'pos': set()})
+ s['open_qty'] += l['open_qty']
+ s['open_value'] += l['open_value']
+ s['pos'].add(po_nm)
+ if exp and (s['eta'] is None or exp < s['eta']):
+ s['eta'] = exp
+ if is_late:
+ s['late_qty'] += l['open_qty']
+
+ if is_late:
+ days_late = (t - dt.date.fromisoformat(exp)).days
+ late_rows.append({'supplier': sup, 'po': po_nm, 'sku': code,
+ 'product': O.m2o_name(l['product_id']),
+ 'open_qty': l['open_qty'], 'open_value': l['open_value'],
+ 'expected': exp, 'days_late': days_late})
+
+ for s in by_sku.values():
+ s['pos'] = sorted(s['pos'])
+ pos = sorted(by_po.values(), key=lambda x: (x['expected'] or '9999'))
+ late_rows.sort(key=lambda x: -x['days_late'])
+ return {
+ 'pos': pos, 'by_sku': by_sku, 'late': late_rows,
+ 'n_pos': len(pos), 'open_value': sum(p['open_value'] for p in pos),
+ 'late_value': sum(p['late_value'] for p in pos), 'n_late_lines': len(late_rows),
+ }
+
+
+def _pctl(sorted_vals, q):
+ return sorted_vals[min(len(sorted_vals) - 1, int(len(sorted_vals) * q))] if sorted_vals else None
+
+
+def vendor_reliability(t=None):
+ """Vendor delivery truth from COMPLETED POs (24m): actual lead (date_order → effective_date)
+ and promise lateness (date_planned → effective_date), per vendor. purchase.order carries all
+ three dates, so no picking join is needed (the 'incoming picking' route is polluted by
+ customer returns — verified live: only 29% of incoming pickings match a PO).
+ The buy trigger runs on the CURATED nominal lead; this measures how wrong that is per vendor."""
+ t = t or P.today()
+ cutoff = (t - dt.timedelta(days=730)).isoformat()
+ pos_ = O.search_read('purchase.order',
+ [('state', 'in', ('purchase', 'done')), ('date_order', '>=', cutoff),
+ ('effective_date', '!=', False)],
+ ['name', 'partner_id', 'date_order', 'date_planned', 'effective_date',
+ 'amount_total'])
+ # nominal lead per vendor = the most common curated per-SKU lead for that vendor (upper-name join)
+ nom = {}
+ for d in suppliers().values():
+ v = (d.get('vendor') or '').strip().upper()
+ if v and d.get('lead'):
+ nom.setdefault(v, {})
+ nom[v][d['lead']] = nom[v].get(d['lead'], 0) + 1
+ nominal = {v: max(c.items(), key=lambda kv: kv[1])[0] for v, c in nom.items()}
+
+ rows, per = [], {}
+ for p in pos_:
+ v = (O.m2o_name(p.get('partner_id')) or '(unknown)').strip()
+ o = dt.date.fromisoformat(str(p['date_order'])[:10])
+ e = dt.date.fromisoformat(str(p['effective_date'])[:10])
+ lead = (e - o).days
+ late = None
+ if p.get('date_planned'):
+ late = (e - dt.date.fromisoformat(str(p['date_planned'])[:10])).days
+ rows.append({'po': p['name'], 'vendor': v, 'ordered': o.isoformat(),
+ 'promised': str(p.get('date_planned') or '')[:10] or None,
+ 'received': e.isoformat(), 'lead_days': lead, 'days_late': late,
+ 'po_value': p.get('amount_total') or 0.0})
+ s = per.setdefault(v, {'vendor': v, 'n_pos': 0, 'value': 0.0, 'leads': [], 'lates': []})
+ s['n_pos'] += 1
+ s['value'] += p.get('amount_total') or 0.0
+ s['leads'].append(lead)
+ if late is not None:
+ s['lates'].append(late)
+
+ vendors = []
+ for s in per.values():
+ s['leads'].sort()
+ s['lates'].sort()
+ vu = s['vendor'].upper()
+ v_nom = nominal.get(vu)
+ p90 = _pctl(s['leads'], 0.9)
+ vendors.append({'vendor': s['vendor'], 'n_pos': s['n_pos'], 'value': s['value'],
+ 'lead_med': _pctl(s['leads'], 0.5), 'lead_p90': p90,
+ 'nominal_lead': v_nom,
+ 'lead_gap': (p90 - v_nom) if (v_nom and p90 is not None) else None,
+ 'on_promise_pct': (sum(1 for d in s['lates'] if d <= 0) / len(s['lates']) * 100)
+ if s['lates'] else None,
+ 'late_med': _pctl(s['lates'], 0.5), 'late_p90': _pctl(s['lates'], 0.9)})
+ vendors.sort(key=lambda x: -x['value'])
+ all_lates = sorted(r['days_late'] for r in rows if r['days_late'] is not None)
+ return {'vendors': vendors, 'rows': rows, 'n_pos': len(rows),
+ 'n_late': sum(1 for d in all_lates if d > 0),
+ 'late_share_pct': (sum(1 for d in all_lates if d > 0) / len(all_lates) * 100)
+ if all_lates else None,
+ 'late_med': _pctl(all_lates, 0.5), 'late_p90': _pctl(all_lates, 0.9),
+ 'n_vendors': len(vendors),
+ 'actual_p90_by_vendor': {v['vendor'].upper(): v['lead_p90'] for v in vendors
+ if v['n_pos'] >= 3 and v['lead_p90'] is not None}}
+
+
+def buy_under_actual_lead(recs, vr):
+ """SKUs the nominal-lead trigger says are SAFE but that are already past the reorder point
+ under their vendor's ACTUAL p90 lead (vendors with 3+ completed POs). The honest delta —
+ the base buy list is untouched."""
+ p90 = vr.get('actual_p90_by_vendor') or {}
+ out = []
+ for r in recs:
+ if r.get('buy'):
+ continue
+ ap = p90.get((r.get('vendor') or '').strip().upper())
+ if ap is None or r.get('days_cover') is None or r['days_cover'] >= 9999:
+ continue
+ eff = max(ap, r.get('lead') or 0)
+ if r.get('avg_day', 0) > 0 and r['days_cover'] < eff:
+ out.append({**r, 'actual_lead_p90': ap})
+ out.sort(key=lambda x: (x['days_cover'] if x['days_cover'] is not None else 9999))
+ return out
+
+
+def summary(t=None):
+ t = t or P.today()
+ recs = recommendations(t)
+ ps, pe = _proj_window(t)
+ vr = vendor_reliability(t)
+ return {
+ 'recs': recs, 'n_skus': len(recs),
+ 'window_days': max(1, (pe - ps).days), 'safety_pct': _SAFETY * 100,
+ 'inbound': open_pos(t),
+ 'data_quality': data_quality(),
+ 'vendor_reliability': vr,
+ 'buy_flip': buy_under_actual_lead(recs, vr),
+ 'pulled_at': dt.datetime.now().strftime('%Y-%m-%d %H:%M'),
+ }
+
+
+def vendor_book(t=None):
+ """Per-vendor rollup for the Vendor module: each vendor's SKU count, lead, country, demand value,
+ and the SKUs they supply. Plus the multiple-vendor / cheapest-price view."""
+ recs = recommendations(t)
+ multi = [r for r in recs if (r.get('n_vendors') or 0) > 1]
+ return {'recs': recs, 'multi_vendor': multi, 'n_multi': len(multi)}
+
+
+def validate(t=None, team_id=None):
+ t = t or P.today()
+ _, pe = _proj_window(t)
+ f, to = _add_months(t, -12).isoformat(), _add_months(pe, -12).isoformat()
+ g = O.read_group('sale.order.line', _demand_domain(f, to), ['product_uom_qty:sum'],
+ ['product_id'], lazy=False)
+ per = sum((r.get('product_uom_qty') or 0.0) for r in g if r.get('product_id'))
+ tot = O.sum_field('sale.order.line', _demand_domain(f, to), 'product_uom_qty')
+ checks = [{'check': '8-month demand: Σ(per-SKU units) == line-level units',
+ 'a': round(per, 2), 'b': round(tot, 2), 'gap': round(per - tot, 2),
+ 'ok': abs(per - tot) <= 1.0}]
+
+ # Open POs: row-by-row NET (product_qty − qty_received over ALL confirmed lines — the same
+ # semantics as _incoming_po, over-receipts included) vs the _incoming_po read_group aggregate.
+ # Two aggregation paths, small live-drift tolerance (two RPC snapshots on a live ledger).
+ ib = open_pos(t)
+ all_lines, _ = _open_po_lines()
+ row_net = sum((l.get('product_qty') or 0) - (l.get('qty_received') or 0) for l in all_lines)
+ agg_net = sum(_incoming_po().values())
+ checks.append({'check': 'Open POs: row-level Σ net qty == read_group Σ net qty (live-drift tol)',
+ 'a': round(row_net, 2), 'b': round(agg_net, 2),
+ 'gap': round(row_net - agg_net, 2),
+ 'ok': abs(row_net - agg_net) <= max(1.0, abs(agg_net) * 0.001)})
+
+ # Internal consistency: the late chase list is exactly the late portion of the SKU rollup.
+ late_val = sum(r['open_value'] for r in ib['late'])
+ sku_late_val_ok = sum(p['late_value'] for p in ib['pos'])
+ checks.append({'check': 'Open POs: Σ(late chase lines) == Σ(per-PO late value)',
+ 'a': round(late_val, 2), 'b': round(sku_late_val_ok, 2),
+ 'gap': round(late_val - sku_late_val_ok, 2),
+ 'ok': abs(late_val - sku_late_val_ok) <= 1.0})
+
+ # Vendor reliability: the per-vendor rollup partitions the PO rows exactly (counts AND value).
+ vr = vendor_reliability(t)
+ vn = sum(v['n_pos'] for v in vr['vendors'])
+ checks.append({'check': 'Vendor reliability: Σ(per-vendor POs) == PO rows pulled',
+ 'a': vn, 'b': vr['n_pos'], 'gap': vn - vr['n_pos'],
+ 'ok': vn == vr['n_pos']})
+ vv = sum(v['value'] for v in vr['vendors'])
+ rv = sum(r['po_value'] for r in vr['rows'])
+ checks.append({'check': 'Vendor reliability: Σ(per-vendor PO value) == Σ(row PO value)',
+ 'a': round(vv, 2), 'b': round(rv, 2), 'gap': round(vv - rv, 2),
+ 'ok': abs(vv - rv) <= 1.0})
+ return checks
diff --git a/platform/modules/product_data.py b/platform/modules/product_data.py
new file mode 100644
index 0000000000000000000000000000000000000000..ada17a006d90572237c1205aa310c1eb4d3e8d21
--- /dev/null
+++ b/platform/modules/product_data.py
@@ -0,0 +1,368 @@
+"""modules/product_data.py — the PRODUCT table's pool (wave 15 item 9/10, contract C-TOPIC).
+
+The second object on the table-page factory: same grid, same engine, same permission wall — the
+only difference is the field schema and the identity. `modules/customer_data.pool()` is the
+template and this deliberately mirrors its signature and its row shape.
+
+⛔ THREE DECISIONS THIS FILE HAD TO MAKE, EACH RECORDED BECAUSE A LATER READER WILL WONDER.
+
+1. **THE IDENTITY IS A SKU CODE, WHICH IS A STRING, AND THE GRID WANTS AN INTEGER `pid`.**
+ Cohort membership, `allowed_pids`, the measure channel and `rows_from_pool` all key on an
+ integer. So each row carries BOTH: `pid` (a stable CRC32 of the code, so the same SKU gets the
+ same id on every pull and across processes — never an enumeration index, which would reshuffle
+ whenever the catalogue changes) and `code`, the real business key, as a visible column.
+ `_assert_no_pid_collision` fails the BUILD rather than the read: two SKUs sharing a pid would
+ silently merge in every downstream set operation, and a loud build failure is the only version
+ of that anyone would notice.
+
+2. **THE SCOPE RULE — inventory columns are CONSOLIDATED and are therefore OMITTED for a
+ BU-scoped caller.** `products.directory(t, team_id)` is brand-shaped; `inventory.sku_inventory`
+ is explicitly NOT (its own docstring: "on-hand stock is one physical warehouse, not
+ brand-tagged"). Joining them for a Fisch-only user would put BU-shaped revenue beside
+ company-wide stock IN THE SAME ROW — the mixed-scope value defect wave 15's amendment 3 exists
+ for, arriving through a different door. The honest options were "omit" or "label the columns
+ company-wide"; omit is the fail-closed one, and a column that is absent asks a question,
+ whereas a column that is silently company-wide answers one wrongly.
+
+3. **WHAT IS NOT HERE, NAMED RATHER THAN QUIETLY MISSING.** R4 lists ~20 fields. Vendor and
+ COUNTRY are not in Odoo at all — they live in the inventory WORKBOOK
+ ([[odoo-vendor-country-origin]]) and need a loader this module deliberately does not invent.
+ Margin % comes from `modules/pricing.table`, which is a heavier build (channel-rate cost
+ allocation) and is left for the wave that needs it. `validate()` reconciles what SHIPS; it
+ does not pretend to cover columns that are absent.
+"""
+import json
+import zlib
+from pathlib import Path
+
+import core.periods as P
+import core.table_store as table_store
+import modules.products as products
+
+#: POOL-ROW KEYS that exist ONLY on a consolidated pull. See decision 2.
+#: `cover_gap_d` / `buy_now` (wave 17) join it because both are computed FROM `dos`, and a buy
+#: signal built on a stock number the caller cannot see would be a recommendation nobody could
+#: check ([[no-unverifiable-aggregates]]).
+#:
+#: ⚠ ROW KEYS, NOT FIELDS, and the distinction started mattering on 2026-08-03. Two readers:
+#: `verify_perm_scope` asserts the shape of a POOL ROW against this, and `routes_products`
+#: narrows the FIELD list with it. Since owner item 5 `buy_now` is a row key with no Field —
+#: computed as `validate()`'s oracle, projected onto no wire — so it belongs here for the first
+#: reader and is inert for the second. Removing it would stop the scope gate proving that a
+#: BU-scoped pull withholds it.
+CONSOLIDATED_ONLY = ("on_hand", "unit_cost", "inv_value", "qty_ltm", "dos", "stock_bucket",
+ "cover_gap_d", "buy_now")
+
+#: ⛔ POOL-ROW KEYS THAT DELIBERATELY HAVE NO FIELD — they must never reach a browser.
+#:
+#: `rows_from_pool` projects strictly through the field contract, so "no Field" already means
+#: "no cell on the wire". This tuple makes that a CHECKED fact rather than a consequence nobody
+#: is watching: `verify_perm_scope` asserts every member is absent from BOTH product contracts,
+#: and that every OTHER `CONSOLIDATED_ONLY` key is present in the consolidated one.
+#:
+#: Written because the two tuples silently diverged the moment owner item 5 retired `buy_now`'s
+#: Field while keeping its computation, and the gate — which was asserting a FIELD property from
+#: a ROW-key list — went red with no way to tell a deliberate divergence from a dropped column.
+UNSHIPPED_ROW_KEYS = ("buy_now",)
+
+#: Wave 17 (owner item 13, ruling R3) — the SUPPLIER MASTER, from the curated mastersheet map
+#: `procurement_suppliers.json` (3,963 SKUs; supplier on 3,624, lead time on 3,563). NOT Odoo:
+#: the owner confirmed this data came from the Inventory System Mastersheet, which is why
+#: `modules/product_data`'s header said Vendor/Country were "NOT HERE, named rather than
+#: quietly missing" and needed "a loader this module deliberately does not invent". This is
+#: that loader.
+#:
+#: ⛔ THESE ARE CONTRACT COLUMNS, NOT USER-CREATED FIELDS, AND THE REASON IS A PERMISSION FACT.
+#: A user-created field and its values live in the PER-USER strata (`table_store.workspace`
+#: reads `store.get(key)[username]`); only VIEWS are shared. So a shared "Buy list" view that
+#: filtered on a user-created column would, for every OTHER account, name a column that does not
+#: exist — and an unknown column is an INACTIVE condition in the tri-state engine, which IGNORES
+#: it and therefore WIDENS. The buy list would silently show the whole catalogue to everyone but
+#: its author. Contract columns are identical for every reader, so the view means one thing.
+#: ⭢ The owner asked for these to be EDITABLE ("turn this Excel sheet into a User created Field
+#: that we can edit"). That needs a SHARED field/overlay stratum, which the platform does not
+#: have yet — booked as the named gap in the wave-17 doc rather than faked per-user.
+_SUPPLIER_MAP_PATH = Path(__file__).resolve().parent.parent / "procurement_suppliers.json"
+_SUPPLIER_CACHE = {}
+
+
+def supplier_master():
+ """`{code: {supplier, lead_days, origin_country, first_cost}}`, read once per process.
+
+ Degrades to `{}` when the file is unreadable, matching `_inventory_by_code`: a product table
+ that will not render because a master map is missing is a worse failure than one with blank
+ supplier columns.
+ """
+ if _SUPPLIER_CACHE:
+ return _SUPPLIER_CACHE
+ try:
+ raw = json.loads(_SUPPLIER_MAP_PATH.read_text(encoding="utf-8"))
+ except Exception:
+ return {}
+ for code, meta in (raw or {}).items():
+ if not isinstance(meta, dict):
+ continue
+ lead = meta.get("lead")
+ _SUPPLIER_CACHE[str(code)] = {
+ "supplier": (meta.get("vendor") or "") or None,
+ "lead_days": int(lead) if isinstance(lead, (int, float)) else None,
+ "origin_country": (meta.get("country") or "") or None,
+ "first_cost": meta.get("first_cost"),
+ }
+ return _SUPPLIER_CACHE
+
+#: Wave 16 C-TOPIC — the PRODUCT table's OWN workspace bucket. ⛔ Never the customer one:
+#: product pids are CRC32 hashes of SKU codes and customer pids are Odoo partner ids, so in a
+#: SHARED overlay bucket a hash collision would silently write a product note onto somebody's
+#: customer (or the reverse). Separate store keys make that structurally impossible, which is
+#: the whole reason the table-page factory exists ("a new table object gets its own
+#: table_store.make('_table_workspace')").
+TABLE_KEY = 'product_table_workspace'
+TABLE_OPS = table_store.make(TABLE_KEY)
+
+
+def sku_pid(code):
+ """A stable integer id for a SKU code. CRC32, masked to 31 bits so it is always positive and
+ always JSON-safe. Stable across processes and pulls, which an enumeration index is not."""
+ return zlib.crc32(str(code).encode("utf-8")) & 0x7FFFFFFF
+
+
+def _assert_no_pid_collision(rows):
+ """Two SKUs sharing a pid would MERGE in every set operation downstream — cohort membership,
+ allowed_pids, the measure channel — and nothing would report it. Fail the build instead."""
+ seen = {}
+ for r in rows:
+ prior = seen.get(r["pid"])
+ if prior is not None and prior != r["code"]:
+ raise ValueError(
+ f"product_data: pid collision — {prior!r} and {r['code']!r} both hash to "
+ f"{r['pid']}. Downstream set operations would merge them silently; widen the id "
+ f"before shipping this catalogue.")
+ seen[r["pid"]] = r["code"]
+
+
+def _inventory_by_code(t):
+ """`{code: {...}}` from the inventory module, or `{}` if it cannot be read.
+
+ Degrades to empty rather than raising, matching `customer_data._pool_build`'s treatment of
+ its own slow families: a product table that will not render because inventory is momentarily
+ unreachable is a worse failure than one with blank stock columns.
+ """
+ try:
+ import modules.inventory as inventory
+ return inventory.sku_inventory(t=t) or {}
+ except Exception:
+ return {}
+
+
+def pool(team_id=None, t=None):
+ """One row per SKU across the scoped book — the PRODUCT analogue of `customer_data.pool`.
+
+ `team_id` shapes the revenue columns exactly as it does for customers (`products.directory`
+ passes it into `_sku_rev`), which is why `core.perm_scope.derive_pool_scope` must keep
+ driving it rather than a post-filter deciding the BU.
+ """
+ t = t or P.today()
+ consolidated = team_id is None
+ inv = _inventory_by_code(t) if consolidated else {}
+ sup = supplier_master()
+
+ rows = []
+ for r in products.directory(t=t, team_id=team_id):
+ code = r["code"]
+ row = {
+ "pid": sku_pid(code),
+ "code": code,
+ "product": r.get("product") or code,
+ "category": r.get("category") or "(uncategorized)",
+ "rev_ytd": r.get("rev_ytd", 0.0),
+ "rev_ly": r.get("rev_ly", 0.0),
+ "yoy_pct": r.get("yoy_pct"),
+ "qty_ytd": r.get("qty_ytd", 0.0),
+ "orders_ytd": r.get("orders_ytd", 0),
+ }
+ # Wave 17 R3 — the supplier master, on every pull (it is catalogue data, not stock).
+ s = sup.get(code) or {}
+ row.update({
+ "supplier": s.get("supplier") or "(none)",
+ "lead_days": s.get("lead_days"),
+ "origin_country": s.get("origin_country") or "(none)",
+ "first_cost": s.get("first_cost"),
+ })
+ if consolidated:
+ e = inv.get(code) or {}
+ row.update({
+ "on_hand": e.get("on_hand"),
+ "unit_cost": e.get("unit_cost"),
+ "inv_value": e.get("inv_value"),
+ "qty_ltm": e.get("qty_ltm"),
+ "dos": e.get("dos"),
+ "stock_bucket": e.get("bucket"),
+ })
+ # THE BUY TRIGGER (R3), ported from `modules/procurement`'s lead-time-cover rule:
+ # buy when the shelf runs out before a reorder could land.
+ #
+ # ⚠ BLANK, NOT "OK", WHEN EITHER INPUT IS MISSING. 339 SKUs have no supplier and 400
+ # no lead time; `dos` is null for anything that never sells through. "We don't know"
+ # and "you're fine" are different sentences, and only one of them is safe to print
+ # beside a purchasing decision.
+ #
+ # ⛔ `buy_now` SHIPS NOWHERE ANY MORE, and is computed anyway. OWNER 2026-08-03: it
+ # is not a preset field — it is a formula over the two columns beside it, and the
+ # platform has a formula field type for exactly that. Its Field is gone from
+ # `aios_grid_fields.json`, and `rows_from_pool` projects rows STRICTLY through that
+ # contract, so no Field means no cell on the wire. Nothing renders this key.
+ #
+ # It stays computed because deleting it would delete the PROOF. `validate()` below
+ # reconciles the formula's predicate against this one, row for row, which is the only
+ # thing that makes "the same exact figures" a claim rather than an assertion — and
+ # this repo has the scar already (wave 17: archiving `ar` "would have DELETED the
+ # proof"). Two comparisons per SKU is what that costs.
+ dos, lead = e.get("dos"), s.get("lead_days")
+ if isinstance(dos, (int, float)) and isinstance(lead, (int, float)) and lead > 0:
+ row["cover_gap_d"] = int(round(dos - lead))
+ row["buy_now"] = "Buy now" if dos < lead else "OK"
+ else:
+ row["cover_gap_d"] = None
+ row["buy_now"] = None
+ rows.append(row)
+
+ rows.sort(key=lambda r: -(r["rev_ytd"] or 0.0))
+ _assert_no_pid_collision(rows)
+ return rows
+
+
+#: ⭐ THE BUY SIGNAL, AS THE FORMULA FIELD EVALUATES IT (owner, 2026-08-03).
+#:
+#: The owner's ruling was that "Buy signal" is not a preset field — it is a formula over two
+#: columns the product table already carries, and the platform has a formula field type for it.
+#: The formula, verbatim, is what `_seed_wave17.BUY_SIGNAL_FORMULA` creates and what the JSON
+#: contract's `_product_removed_buy_now` note records:
+#:
+#: IF({lead_days} > 0, IF({dos} < {lead_days}, "Buy now", "OK"), "")
+#:
+#: This function is a PORT of how `customer-grid/formulaEngine.ts` evaluates that tree, not a
+#: restatement of the business rule — that is the whole point, because the two could drift and
+#: `validate()` is where the drift must show. Three engine behaviours it reproduces exactly:
+#:
+#: · a `ref` to a missing/non-numeric cell is None (`case "ref"` returns null for anything
+#: that is not a finite number or a string);
+#: · `cmp` returns BLANK unless BOTH sides read as numbers — it never coerces a blank to 0,
+#: which is the difference between this and a filter engine's `toNum(null) === 0`;
+#: · `IF` with a non-boolean condition returns BLANK ("no truthiness"), so a blank comparison
+#: propagates out as a blank cell rather than taking the false branch.
+BUY_SIGNAL_FORMULA = 'IF({lead_days} > 0, IF({dos} < {lead_days}, "Buy now", "OK"), "")'
+
+
+def _buy_signal_formula(row):
+ """Evaluate `BUY_SIGNAL_FORMULA` over one pool row -> 'Buy now' | 'OK' | '' (blank)."""
+ def num(v):
+ # The engine's `ref` + `asNumber`: booleans are not values here, and a non-finite
+ # number is null. `isinstance(True, int)` is True in Python, so bool is excluded first.
+ if isinstance(v, bool) or not isinstance(v, (int, float)):
+ return None
+ return v if v == v and v not in (float('inf'), float('-inf')) else None
+
+ lead, dos = num(row.get("lead_days")), num(row.get("dos"))
+ if lead is None: # `{lead_days} > 0` is blank -> IF(blank, …) is blank
+ return ""
+ if not lead > 0:
+ return "" # the formula's own else-branch
+ if dos is None: # `{dos} < {lead_days}` is blank -> IF(blank, …) is blank
+ return ""
+ return "Buy now" if dos < lead else "OK"
+
+
+def validate(team_id=None, t=None):
+ """Reconcile what SHIPS to an independent aggregate — the platform's own rule that a number
+ which does not tie to Odoo does not ship.
+
+ The check is deliberately narrow and says so: Σ per-SKU YTD revenue must equal the SKU
+ module's own YTD total over the same scope. It does NOT cover the inventory columns (they are
+ a different module's reconciliation, and they are absent on a scoped pull anyway).
+ """
+ t = t or P.today()
+ rows = pool(team_id=team_id, t=t)
+ ours = round(sum(r["rev_ytd"] or 0.0 for r in rows), 2)
+ yf, yt = P.ytd(t)
+ theirs = round(sum(v.get("rev", 0.0)
+ for v in (products._sku_rev(yf, yt, team_id) or {}).values()), 2)
+ checks = [{
+ "check": "Σ per-SKU YTD revenue == modules.products._sku_rev over the same window",
+ "ours": ours, "theirs": theirs, "ok": abs(ours - theirs) < 0.01,
+ }]
+ # WAVE 17 R3 — the BUY SIGNAL must be a total, exact partition of the catalogue, and every
+ # member of it must be re-derivable from the two columns beside it. A signal somebody buys
+ # stock on cannot be "mostly right": the failure that matters is a row that says OK because
+ # an input was missing, so the blank leg is checked as hard as the other two.
+ if team_id is None: # consolidated only — the inputs exist only there
+ buy = [r for r in rows if r.get("buy_now") == "Buy now"]
+ ok_rows = [r for r in rows if r.get("buy_now") == "OK"]
+ blank = [r for r in rows if r.get("buy_now") is None]
+ mis = sum(1 for r in buy if not (r["dos"] < r["lead_days"]))
+ mis += sum(1 for r in ok_rows if not (r["dos"] >= r["lead_days"]))
+ # A blank must be UNKNOWN — never a row we could have answered and quietly did not.
+ mis += sum(1 for r in blank
+ if isinstance(r.get("dos"), (int, float))
+ and isinstance(r.get("lead_days"), (int, float)) and r["lead_days"] > 0)
+ checks.append({
+ "check": "Buy signal partitions the catalogue (buy + ok + unknown == rows, none "
+ "misclassified)",
+ "ours": len(buy) + len(ok_rows) + len(blank) - mis, "theirs": len(rows),
+ "ok": mis == 0 and len(buy) + len(ok_rows) + len(blank) == len(rows),
+ "detail": {"buy_now": len(buy), "ok": len(ok_rows), "unknown": len(blank),
+ "misclassified": mis},
+ })
+ # ⭐ OWNER 2026-08-03 — "use the formula fields to come up to the same EXACT figures".
+ #
+ # This is that sentence, as a check. The retired preset column and the formula that
+ # replaces it must agree on every SKU, in all three states, or the replacement is not a
+ # replacement. `_buy_signal_formula` is a line-by-line port of the client formula
+ # engine's evaluation of
+ #
+ # IF({lead_days} > 0, IF({dos} < {lead_days}, "Buy now", "OK"), "")
+ #
+ # including the part that is easy to get wrong: a comparison against a BLANK is blank,
+ # never a coerced 0. (The client engine's `cmp` returns null unless both sides read as
+ # numbers, and `IF` refuses a non-boolean condition — so a missing `dos` yields "" and
+ # not "Buy now". A filter engine would have said `0 < 30` and swept in every SKU that
+ # never sells through; the formula engine does not, and this check is what holds it.)
+ #
+ # ⚠ It compares SETS OF SKUs, not counts. Two different partitions can share a shape.
+ disagree = sorted(r["code"] for r in rows
+ if (r.get("buy_now") or "") != _buy_signal_formula(r))
+ checks.append({
+ "check": 'Buy signal as a FORMULA field == the retired preset column, per SKU '
+ '(IF({lead_days} > 0, IF({dos} < {lead_days}, "Buy now", "OK"), ""))',
+ "ours": len(rows) - len(disagree), "theirs": len(rows),
+ "ok": not disagree,
+ "detail": {"disagreeing_skus": disagree[:10], "n_disagree": len(disagree)},
+ })
+ # The other half of "the same figures": the SHARED Buy list view can no longer filter on
+ # the retired column, and its replacement conditions must select the same SKUs. They are
+ # `dos isNotEmpty AND lead_days isNotEmpty AND lead_days > 0 AND dos < lead_days`
+ # (_seed_wave17.views), so this reproduces exactly that conjunction.
+ #
+ # ⛔ THE NEGATIVE CONTROL IS WHY THIS IS NOT `cover_gap_d < 0`, which reads like the
+ # obvious filter and is WRONG: `cover_gap_d` is `int(round(dos - lead))`, so a genuine
+ # gap of -0.4 days rounds to 0 and that SKU drops off a buy list it belongs on.
+ view_rows = {r["code"] for r in rows
+ if isinstance(r.get("dos"), (int, float))
+ and isinstance(r.get("lead_days"), (int, float))
+ and r["lead_days"] > 0 and r["dos"] < r["lead_days"]}
+ signal_rows = {r["code"] for r in buy}
+ rounding_would_miss = sorted(
+ c for c in signal_rows
+ if next((r for r in rows if r["code"] == c), {}).get("cover_gap_d") == 0)
+ checks.append({
+ "check": "Buy list view conditions (dos/lead_days, no retired column) select "
+ "exactly the Buy-now SKUs",
+ "ours": len(view_rows), "theirs": len(signal_rows),
+ "ok": view_rows == signal_rows,
+ "detail": {"only_in_view": sorted(view_rows - signal_rows)[:10],
+ "only_in_signal": sorted(signal_rows - view_rows)[:10],
+ # Reported, not asserted: how many SKUs a `cover_gap_d < 0` filter would
+ # have silently dropped. 0 today does not make that filter correct.
+ "cover_gap_rounds_to_zero": len(rounding_would_miss)},
+ })
+ return checks
diff --git a/platform/modules/products.py b/platform/modules/products.py
new file mode 100644
index 0000000000000000000000000000000000000000..b5b6f1435abd29d24aeea8498422793ee840a087
--- /dev/null
+++ b/platform/modules/products.py
@@ -0,0 +1,500 @@
+"""Products / SKU module — SKU health: YoY movers (risers & decliners), zombie SKUs
+(catalog rot — sellable, formerly selling, now dead), new winners, coverage collapse
+(SKUs losing customer breadth — the FFS-recovery early-warning signal), and velocity leaders.
+
+Per-SKU margin already lives in the Financial module (low_margin_skus); not duplicated here.
+Basket / co-purchase (MBA) is intentionally deferred — the existing client app computes it
+runtime-side, and a local co-occurrence pull over 74k LTM lines is the kind of heavy job the
+project guardrails keep off the local PC. (See BACKLOG.)
+
+All line-level (sale.order.line), RI+FFS scope, excluded accounts removed — reusing sale_line_domain.
+Coverage (distinct customers per SKU) uses a 2-level read_group and is a touch slow (~15s/
+window), so it's its own function the app calls lazily and caches.
+"""
+import sys
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+from functools import lru_cache
+import core.odoo as O
+import core.periods as P
+import modules.sales as sales_mod
+
+# SKU-health views are about real products — exclude service/delivery pseudo-SKUs
+# (Delivery Charges otherwise dominate movers/winners). Dot-path FILTER works (groupby
+# on the dot-path does not). Validation reconciles on this same non-service universe.
+_NO_SVC = [('product_id.type', '!=', 'service')]
+
+
+@lru_cache(maxsize=1)
+def _code_map():
+ """product_id → SKU code. Multiple product records can share a default_code (re-SKUing
+ /duplicates); keying by code merges them so a re-coded item doesn't read as a fake
+ decliner + fake riser. Products without a code fall back to a per-id key. Archived
+ products are INCLUDED — re-SKUing typically archives the old record and creates a new
+ one under the same code, and the old record still carries last-year sales."""
+ prods = O.search_read('product.product', [('active', 'in', [True, False])], ['id', 'default_code'],
+ limit=50000)
+ return {p['id']: (str(p['default_code']).strip() if p.get('default_code') else f"pid:{p['id']}")
+ for p in prods}
+
+
+def _sku_rev(date_from, date_to, team_id=None):
+ """{sku_code: {'name','rev','qty','orders'}} over a window (services excluded,
+ duplicate product records merged by SKU code)."""
+ g = O.read_group('sale.order.line', O.sale_line_domain(date_from, date_to, team_id, extra=_NO_SVC),
+ ['price_subtotal:sum', 'product_uom_qty:sum'], ['product_id'], lazy=False)
+ codes = _code_map()
+ out = {}
+ for r in g:
+ pid = O.m2o_id(r.get('product_id'))
+ if not pid:
+ continue
+ key = codes.get(pid, f"pid:{pid}")
+ e = out.setdefault(key, {'name': O.m2o_name(r.get('product_id')),
+ 'rev': 0.0, 'qty': 0.0, 'orders': 0})
+ e['rev'] += r.get('price_subtotal') or 0.0
+ e['qty'] += r.get('product_uom_qty') or 0.0
+ e['orders'] += r.get('__count') or 0
+ return out
+
+
+def yoy_movers(t=None, limit=20, team_id=None):
+ """Top SKU risers and decliners by YTD-vs-same-period-LY revenue change."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _sku_rev(yf, yt, team_id)
+ last = _sku_rev(lf, lt, team_id)
+ rows = []
+ for pid in set(this) | set(last):
+ tr = this.get(pid, {'rev': 0.0, 'name': last.get(pid, {}).get('name', '')})
+ lr = last.get(pid, {'rev': 0.0})
+ name = this.get(pid, {}).get('name') or last.get(pid, {}).get('name') or ''
+ rows.append({'code': pid, 'product': name, 'rev_ytd': tr['rev'], 'rev_ly': lr['rev'],
+ 'change': tr['rev'] - lr['rev']})
+ risers = sorted([r for r in rows if r['change'] > 0], key=lambda x: -x['change'])[:limit]
+ decliners = sorted([r for r in rows if r['change'] < 0], key=lambda x: x['change'])[:limit]
+ return {'risers': risers, 'decliners': decliners}
+
+
+def zombie_skus(t=None, limit=30, min_prior=1500.0, team_id=None):
+ """Catalog rot: SKUs that sold materially last year but are ~dead this year."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _sku_rev(yf, yt, team_id)
+ last = _sku_rev(lf, lt, team_id)
+ rows = []
+ for pid, lr in last.items():
+ if lr['rev'] < min_prior:
+ continue
+ tr = this.get(pid, {'rev': 0.0})
+ if tr['rev'] > 0.05 * lr['rev']: # still selling at >5% of prior → not a zombie
+ continue
+ rows.append({'code': pid, 'product': lr['name'], 'rev_ly': lr['rev'], 'rev_ytd': tr['rev'],
+ 'lost': lr['rev'] - tr['rev']})
+ rows.sort(key=lambda x: -x['lost'])
+ return rows[:limit]
+
+
+def new_winners(t=None, limit=20, min_this=1500.0, team_id=None):
+ """SKUs that barely sold last year but are selling well this year."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _sku_rev(yf, yt, team_id)
+ last = _sku_rev(lf, lt, team_id)
+ rows = []
+ for pid, tr in this.items():
+ if tr['rev'] < min_this:
+ continue
+ lr = last.get(pid, {'rev': 0.0})
+ if lr['rev'] > 0.05 * tr['rev']:
+ continue
+ rows.append({'code': pid, 'product': tr['name'], 'rev_ytd': tr['rev'], 'rev_ly': lr['rev'],
+ 'gained': tr['rev'] - lr['rev']})
+ rows.sort(key=lambda x: -x['gained'])
+ return rows[:limit]
+
+
+def velocity_leaders(t=None, limit=25, team_id=None):
+ """Top SKUs by LTM unit velocity (units/month) and revenue."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ sku = _sku_rev(lf, lt, team_id)
+ rows = [{'code': k, 'product': v['name'], 'units_ltm': v['qty'], 'units_per_mo': v['qty'] / 12.0,
+ 'rev_ltm': v['rev'], 'orders_ltm': v['orders']} for k, v in sku.items()]
+ rows.sort(key=lambda x: -x['units_ltm'])
+ return rows[:limit]
+
+
+def _code_category():
+ """code -> category name. Built from _code_map (pid->code) + the sales category map
+ (pid->category); the first record carrying a code sets that code's category."""
+ codes = _code_map()
+ cats = sales_mod._product_cat()
+ out = {}
+ for pid, code in codes.items():
+ if code not in out and pid in cats:
+ out[code] = cats[pid]
+ return out
+
+
+def directory(t=None, team_id=None):
+ """Every SKU that sold this YTD or the same period last year, with the fields the SKU
+ drill-down filters/sorts on: category, YTD/LY revenue, YoY %, units and orders. Mirrors the
+ customer directory — the full list (filtering happens in the UI), sorted by YTD revenue."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this = _sku_rev(yf, yt, team_id)
+ last = _sku_rev(lf, lt, team_id)
+ code_cat = _code_category()
+ rows = []
+ for code in set(this) | set(last):
+ tr = this.get(code, {})
+ lr = last.get(code, {})
+ rev_ytd = tr.get('rev', 0.0)
+ rev_ly = lr.get('rev', 0.0)
+ rows.append({'code': code, 'product': tr.get('name') or lr.get('name') or code,
+ 'category': code_cat.get(code, '(uncategorized)'),
+ 'rev_ytd': rev_ytd, 'rev_ly': rev_ly, 'change': rev_ytd - rev_ly,
+ 'yoy_pct': P.yoy_pct(rev_ytd, rev_ly),
+ 'qty_ytd': tr.get('qty', 0.0), 'orders_ytd': tr.get('orders', 0)})
+ rows.sort(key=lambda r: -r['rev_ytd'])
+ return rows
+
+
+def categories(t=None, team_id=None):
+ """Sorted distinct category names present in the SKU directory (for the drill-down filter)."""
+ return sorted({r['category'] for r in directory(t, team_id)})
+
+
+def _coverage(date_from, date_to, team_id=None):
+ """{sku_code: distinct_customer_count} via 2-level read_group (slow-ish), merged by code.
+ (A customer buying two records sharing a code can count twice; duplicates are rare, and
+ code-level avoids the bigger error of a re-SKUed product reading as full coverage loss.)"""
+ g = O.read_group('sale.order.line', O.sale_line_domain(date_from, date_to, team_id, extra=_NO_SVC),
+ ['__count'], ['product_id', 'order_partner_id'], lazy=False)
+ codes = _code_map()
+ cov = {}
+ names = {}
+ for r in g:
+ pid = O.m2o_id(r.get('product_id'))
+ if not pid:
+ continue
+ key = codes.get(pid, f"pid:{pid}")
+ cov[key] = cov.get(key, 0) + 1
+ names.setdefault(key, O.m2o_name(r.get('product_id')))
+ return cov, names
+
+
+def coverage_collapse(t=None, limit=25, min_prior_custs=8, team_id=None):
+ """SKUs that lost the most customer breadth YoY — early warning a SKU is dying even if
+ revenue hasn't fully cratered yet."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ cov_t, names_t = _coverage(yf, yt, team_id)
+ cov_l, names_l = _coverage(lf, lt, team_id)
+ rows = []
+ for pid, lc in cov_l.items():
+ if lc < min_prior_custs:
+ continue
+ tc = cov_t.get(pid, 0)
+ drop = lc - tc
+ if drop <= 0:
+ continue
+ rows.append({'code': pid, 'product': names_l.get(pid) or names_t.get(pid) or '',
+ 'custs_ly': lc, 'custs_ytd': tc, 'lost_custs': drop,
+ 'pct_drop': drop / lc * 100})
+ rows.sort(key=lambda x: (-x['lost_custs'], -x['pct_drop']))
+ return rows[:limit]
+
+
+# ====================================================================== SKU DRAWER (mirror of customer drawer)
+def _sku_product_ids(code):
+ """All product.product ids sharing this SKU code (merged variants / archived records)."""
+ return [pid for pid, c in _code_map().items() if c == code]
+
+
+def _sku_dom(pids, date_from, date_to, team_id=None):
+ return O.sale_line_domain(date_from, date_to, team_id, extra=[('product_id', 'in', pids)] + _NO_SVC)
+
+
+def _sku_name_category(pids):
+ rows = O.search_read('product.product', [('id', 'in', pids)], ['name', 'categ_id'])
+ name = rows[0]['name'] if rows else '(unknown)'
+ catmap = sales_mod._product_cat()
+ main = next((catmap.get(p) for p in pids if catmap.get(p)), '(uncategorized)')
+ return name, main
+
+
+def _sku_buyers(pids, date_from, date_to, team_id=None):
+ """{partner_id: {'name','rev','qty'}} for buyers of this SKU over a window."""
+ g = O.read_group('sale.order.line', _sku_dom(pids, date_from, date_to, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum'], ['order_partner_id'], lazy=False)
+ out = {}
+ for r in g:
+ pid = O.m2o_id(r.get('order_partner_id'))
+ if pid:
+ out[pid] = {'name': O.m2o_name(r.get('order_partner_id')),
+ 'rev': r.get('price_subtotal') or 0.0, 'qty': r.get('product_uom_qty') or 0.0}
+ return out
+
+
+def sku_detail(code, t=None, team_id=None, n_months=13, allsku=None):
+ """KPIs (rev/qty/buyers YoY, GM%), monthly trend, rank & % of BU for one SKU code.
+ Pass `allsku` (a cached _sku_rev YTD map) to skip the ~all-SKU rank read."""
+ t = t or P.today()
+ pids = _sku_product_ids(code)
+ if not pids:
+ return None
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ mf, mt = P.ltm(t)
+ name, category = _sku_name_category(pids)
+
+ def s(df, dtt, field='price_subtotal'):
+ return O.sum_field('sale.order.line', _sku_dom(pids, df, dtt, team_id), field)
+ rev_ytd, rev_ly = s(yf, yt), s(lf, lt)
+ qty_ytd, qty_ly = s(yf, yt, 'product_uom_qty'), s(lf, lt, 'product_uom_qty')
+ buyers_ytd = len(_sku_buyers(pids, yf, yt, team_id))
+ buyers_ly = len(_sku_buyers(pids, lf, lt, team_id))
+ g = O.read_group('sale.order.line', _sku_dom(pids, mf, mt, team_id),
+ ['price_subtotal:sum', 'margin:sum'], [], lazy=False)
+ line_rev = (g[0].get('price_subtotal') if g else 0) or 0.0
+ margin = (g[0].get('margin') if g else 0) or 0.0
+
+ # Monthly trend: bin lines by their order's month in Python (dot-path month groupby is rejected
+ # on sale.order.line), in 2 reads instead of 26 point queries.
+ range_start = dt.date(t.year - 2, t.month, 1).isoformat()
+ lines = O.search_read('sale.order.line', _sku_dom(pids, range_start, t.isoformat(), team_id),
+ ['price_subtotal', 'order_id'])
+ oids = list({O.m2o_id(line['order_id']) for line in lines if line.get('order_id')})
+ odate = {}
+ for i in range(0, len(oids), 1000):
+ for o in O.search_read('sale.order', [('id', 'in', oids[i:i + 1000])], ['date_order']):
+ if o.get('date_order'):
+ odate[o['id']] = str(o['date_order'])[:7]
+ mrev = {}
+ for line in lines:
+ ym = odate.get(O.m2o_id(line.get('order_id')))
+ if ym:
+ mrev[ym] = mrev.get(ym, 0.0) + (line.get('price_subtotal') or 0.0)
+ monthly = []
+ for ym, start, end in P.month_starts(n_months, t):
+ y, m = int(ym[:4]) - 1, int(ym[5:7])
+ monthly.append({'month': ym, 'revenue': mrev.get(ym, 0.0),
+ 'revenue_ly': mrev.get(f'{y:04d}-{m:02d}', 0.0)})
+
+ allsku = allsku if allsku is not None else _sku_rev(yf, yt, team_id)
+ total = sum(v['rev'] for v in allsku.values()) or 1.0
+ rank = next((i + 1 for i, (c, _v) in enumerate(sorted(allsku.items(), key=lambda kv: -kv[1]['rev']))
+ if c == code), None)
+ return {
+ 'code': code, 'name': name, 'category': category,
+ 'rev_ytd': rev_ytd, 'rev_ly': rev_ly, 'rev_yoy_pct': P.yoy_pct(rev_ytd, rev_ly),
+ 'qty_ytd': qty_ytd, 'qty_ly': qty_ly, 'qty_yoy_pct': P.yoy_pct(qty_ytd, qty_ly),
+ 'buyers_ytd': buyers_ytd, 'buyers_ly': buyers_ly, 'buyers_delta': buyers_ytd - buyers_ly,
+ 'gm_pct': (margin / line_rev * 100) if line_rev else 0.0, 'gm_dollars': margin,
+ 'rank': rank, 'n_skus': len(allsku), 'pct_of_bu': rev_ytd / total * 100,
+ 'monthly': monthly,
+ }
+
+
+def sku_buyer_bridge(code, t=None, team_id=None, top=12):
+ """Who drives the SKU's YoY: retained / new / churned buyers + a $-ranked churned call list."""
+ t = t or P.today()
+ pids = _sku_product_ids(code)
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this, last = _sku_buyers(pids, yf, yt, team_id), _sku_buyers(pids, lf, lt, team_id)
+ tset, lset = set(this), set(last)
+ retained, new, churned = tset & lset, tset - lset, lset - tset
+ churned_list = sorted([{'pid': p, 'customer': last[p]['name'], 'ly_rev': last[p]['rev']}
+ for p in churned], key=lambda x: -x['ly_rev'])[:top]
+ return {'retained': {'n': len(retained), 'rev': sum(this[p]['rev'] for p in retained)},
+ 'new': {'n': len(new), 'rev': sum(this[p]['rev'] for p in new)},
+ 'churned': {'n': len(churned), 'rev': sum(last[p]['rev'] for p in churned)},
+ 'buyer_retention_pct': (len(retained) / len(lset) * 100) if lset else 0.0,
+ 'churned_buyers': churned_list, 'buyers_this': len(tset), 'buyers_last': len(lset),
+ 'this_total': sum(v['rev'] for v in this.values())}
+
+
+def sku_concentration(code, t=None, team_id=None):
+ """Buyer-concentration risk: top-1/top-3 share, Herfindahl index, effective buyer count (LTM)."""
+ t = t or P.today()
+ mf, mt = P.ltm(t)
+ buyers = _sku_buyers(_sku_product_ids(code), mf, mt, team_id)
+ revs = sorted([v['rev'] for v in buyers.values()], reverse=True)
+ total = sum(revs) or 1.0
+ hhi = sum((r / total) ** 2 for r in revs)
+ return {'n_buyers': len(revs), 'top1_pct': (revs[0] / total * 100) if revs else 0.0,
+ 'top3_pct': (sum(revs[:3]) / total * 100) if revs else 0.0,
+ 'hhi': hhi, 'eff_buyers': (1 / hhi) if hhi else 0.0}
+
+
+def sku_price_dispersion(code, t=None, team_id=None, cap=60):
+ """Realized $/unit per buyer (LTM) vs the volume-weighted average; recoverable $ on below-VWAP
+ accounts. list_price is unreliable, so the dispersion among actual buyers is the margin lever."""
+ t = t or P.today()
+ mf, mt = P.ltm(t)
+ g = O.read_group('sale.order.line', _sku_dom(_sku_product_ids(code), mf, mt, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum'], ['order_partner_id'], lazy=False)
+ rows, tot_rev, tot_qty = [], 0.0, 0.0
+ for r in g:
+ pid = O.m2o_id(r.get('order_partner_id'))
+ rev = r.get('price_subtotal') or 0.0
+ qty = r.get('product_uom_qty') or 0.0
+ if not pid or qty <= 0:
+ continue
+ rows.append({'pid': pid, 'customer': O.m2o_name(r.get('order_partner_id')),
+ 'price': rev / qty, 'qty': qty, 'rev': rev})
+ tot_rev += rev
+ tot_qty += qty
+ vwap = (tot_rev / tot_qty) if tot_qty else 0.0
+ for r in rows:
+ r['recoverable'] = max(0.0, vwap - r['price']) * r['qty']
+ rows.sort(key=lambda x: -x['recoverable'])
+ return {'vwap': vwap, 'n_buyers': len(rows),
+ 'recoverable_total': sum(r['recoverable'] for r in rows), 'rows': rows[:cap]}
+
+
+def sku_top_buyers(code, t=None, team_id=None, top=15):
+ """Ranked buyers of this SKU (YTD) with YoY — clickable to open the customer drawer."""
+ t = t or P.today()
+ pids = _sku_product_ids(code)
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ this, last = _sku_buyers(pids, yf, yt, team_id), _sku_buyers(pids, lf, lt, team_id)
+ rows = [{'pid': p, 'customer': v['name'], 'rev': v['rev'], 'qty': v['qty'],
+ 'yoy_pct': P.yoy_pct(v['rev'], last.get(p, {}).get('rev', 0.0))} for p, v in this.items()]
+ rows.sort(key=lambda x: -x['rev'])
+ return rows[:top]
+
+
+_BUYER_TIERS = [('Whale (≥$25k)', 25000.0), ('Large ($10–25k)', 10000.0),
+ ('Mid ($2–10k)', 2000.0), ('Small (<$2k)', 0.0)]
+
+
+def sku_customer_analysis(code, t=None, team_id=None, top=15):
+ """WHO buys this SKU (LTM), as customers: the value-tier mix of its buyers (by each buyer's TOTAL
+ spend), and the accounts most DEPENDENT on it (this SKU as a share of their spend — who gets hurt
+ most if it stocks out / who to protect)."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ pids = _sku_product_ids(code)
+ empty = {'segments': [], 'dependency': [], 'n_buyers': 0, 'avg_dependency': 0.0}
+ if not pids:
+ return empty
+ buyers = _sku_buyers(pids, lf, lt, team_id) # {pid: {name, rev(this SKU), qty}}
+ if not buyers:
+ return empty
+ bpids = list(buyers)
+ g = O.read_group('sale.order', sales_mod.order_domain(lf, lt, team_id) + [('partner_id', 'in', bpids)],
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False)
+ total = {O.m2o_id(r['partner_id']): (r.get('amount_untaxed') or 0.0) for r in g if r.get('partner_id')}
+
+ def tier(rev):
+ for nm, lo in _BUYER_TIERS:
+ if rev >= lo:
+ return nm
+ return _BUYER_TIERS[-1][0]
+ seg = {nm: {'tier': nm, 'buyers': 0, 'sku_rev': 0.0} for nm, _ in _BUYER_TIERS}
+ dep = []
+ for p, v in buyers.items():
+ ct = total.get(p, v['rev']) or v['rev']
+ s = seg[tier(ct)]
+ s['buyers'] += 1
+ s['sku_rev'] += v['rev']
+ dep.append({'customer': v['name'], 'pid': p, 'sku_rev': v['rev'], 'cust_total': ct,
+ 'dependency_pct': (v['rev'] / ct * 100) if ct else None})
+ tot = sum(s['sku_rev'] for s in seg.values()) or 1.0
+ segments = []
+ for nm, _ in _BUYER_TIERS:
+ s = seg[nm]
+ s['rev_share'] = s['sku_rev'] / tot * 100
+ s['avg_per_buyer'] = (s['sku_rev'] / s['buyers']) if s['buyers'] else 0.0
+ segments.append(s)
+ dep.sort(key=lambda x: -x['sku_rev'])
+ deps_known = [d['dependency_pct'] for d in dep if d['dependency_pct'] is not None]
+ return {'segments': segments, 'dependency': dep[:top], 'n_buyers': len(buyers),
+ 'avg_dependency': (sum(deps_known) / len(deps_known)) if deps_known else 0.0}
+
+
+def sku_whitespace(code, t=None, team_id=None, top=15):
+ """Customers who buy this SKU's category but NOT this SKU — ranked prospect list."""
+ import modules.customers as cust_mod
+ t = t or P.today()
+ pids = _sku_product_ids(code)
+ _name, category = _sku_name_category(pids)
+ cat_buyers = cust_mod.category_buyers(category, team_id=team_id) or set()
+ mf, mt = P.ltm(t)
+ prospects = list(cat_buyers - set(_sku_buyers(pids, mf, mt, team_id)))
+ if not prospects:
+ return {'category': category, 'rows': []}
+ g = O.read_group('sale.order', sales_mod.order_domain(mf, mt, team_id) + [('partner_id', 'in', prospects)],
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False)
+ rows = [{'pid': O.m2o_id(r['partner_id']), 'customer': O.m2o_name(r['partner_id']),
+ 'total_spend': r.get('amount_untaxed') or 0.0} for r in g if r.get('partner_id')]
+ rows.sort(key=lambda x: -x['total_spend'])
+ return {'category': category, 'rows': rows[:top]}
+
+
+def sku_drawer_bundle(code, t=None, team_id=None, allsku=None):
+ """The whole SKU drawer's first paint in one cached unit: sku_detail first (the not-found gate),
+ then the other six pulls CONCURRENTLY (O.parallel). Cuts a ~6-call cold open to ~max(call)."""
+ detail = sku_detail(code, t=t, team_id=team_id, allsku=allsku)
+ if detail is None:
+ return {'detail': None}
+ bridge, conc, price, buyers, white, ca = O.parallel([
+ lambda: sku_buyer_bridge(code, t, team_id),
+ lambda: sku_concentration(code, t, team_id),
+ lambda: sku_price_dispersion(code, t, team_id),
+ lambda: sku_top_buyers(code, t, team_id),
+ lambda: sku_whitespace(code, t, team_id),
+ lambda: sku_customer_analysis(code, t, team_id),
+ ])
+ return {'detail': detail, 'bridge': bridge, 'conc': conc, 'price': price,
+ 'buyers': buyers, 'white': white, 'ca': ca}
+
+
+def validate(t=None, team_id=None):
+ """Reconcile SKU metrics to independent Odoo aggregates. When team_id is set (a single BU
+ selected) every check runs SCOPED to that BU, so the validation panel never reconciles
+ against — or exposes — the other BU's numbers. All checks here are BU-scopeable (no cross-BU
+ mirror), so team_id threads straight through."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ checks = []
+ sku = _sku_rev(yf, yt, team_id)
+ sku_sum = sum(v['rev'] for v in sku.values())
+ line_total = O.sum_field('sale.order.line',
+ O.sale_line_domain(yf, yt, team_id, extra=_NO_SVC), 'price_subtotal')
+ checks.append({'check': 'SKU rev: Σ(per-SKU) == total line revenue, ex-services (YTD)',
+ 'a': round(sku_sum, 2), 'b': round(line_total, 2),
+ 'gap': round(sku_sum - line_total, 2),
+ 'ok': abs(sku_sum - line_total) <= 1.0})
+
+ m = yoy_movers(t, limit=10**9, team_id=team_id)
+ movers_sum = sum(r['change'] for r in m['risers']) + sum(r['change'] for r in m['decliners'])
+ lf, lt = P.ytd_last_year(t)
+ last_total = O.sum_field('sale.order.line',
+ O.sale_line_domain(lf, lt, team_id, extra=_NO_SVC), 'price_subtotal')
+ checks.append({'check': 'SKU movers: Σ(Δ) == (YTD − LY) total',
+ 'a': round(movers_sum, 2), 'b': round(line_total - last_total, 2),
+ 'gap': round(movers_sum - (line_total - last_total), 2),
+ 'ok': abs(movers_sum - (line_total - last_total)) <= 1.0})
+
+ # SKU drawer: buyer-bridge reconciles — retained + new buyer revenue == this-period SKU revenue
+ top_code = max(sku.items(), key=lambda kv: kv[1]['rev'])[0] if sku else None
+ if top_code:
+ bb = sku_buyer_bridge(top_code, t, team_id=team_id)
+ recon = bb['retained']['rev'] + bb['new']['rev']
+ checks.append({'check': 'SKU drawer: retained+new buyer rev == SKU YTD revenue',
+ 'a': round(recon, 2), 'b': round(bb['this_total'], 2),
+ 'gap': round(recon - bb['this_total'], 2),
+ 'ok': abs(recon - bb['this_total']) <= 1.0})
+ return checks
diff --git a/platform/modules/reprice.py b/platform/modules/reprice.py
new file mode 100644
index 0000000000000000000000000000000000000000..55925be809309769276b68d6ef0e2f6cd011aa55
--- /dev/null
+++ b/platform/modules/reprice.py
@@ -0,0 +1,409 @@
+"""Reprice lifecycle — the price-side discipline the pricing brief found missing
+(.claude/wiki/research/pricing.md): rule hygiene BEFORE the reprice, realization tracking
+AFTER it, and the between-waves views (pocket waterfall, peer price corridor).
+
+Everything reads sale.order.line + product.pricelist.item + product masters, read-only.
+NO elasticity claims — rejected at wholesale data density (see the brief's anti-patterns).
+
+Windows: LTM for corridor/waterfall (matches pricecomp), all-channel sales for the DEAD-rule
+flag (the Amazon channel-scope trap: a rule serving Amazon sales is not dead).
+"""
+import datetime as dt
+
+import core.odoo as O
+import core.periods as P
+import modules.pricecomp as pcomp
+import modules.customers as cust_mod
+
+STALE_MONTHS = 24
+MIN_CORRIDOR_BUYERS = 8
+CORRIDOR_FLOOR_PCTL = 25 # floor = p25 of %-of-tier among the SKU's buyers
+REALIZED_TARGET_PCT = 80.0 # an increase that landed <80% = worklist
+
+
+def _chunk(ids, n=400):
+ ids = list(ids)
+ for i in range(0, len(ids), n):
+ yield ids[i:i + n]
+
+
+def _all_channel_sold(lf, lt):
+ """{product_id: qty} confirmed sales, ALL channels (never flag an Amazon seller as dead)."""
+ out = {}
+ for g in O.read_group('sale.order.line',
+ [('state', 'in', ['sale', 'done']), ('product_id', '!=', False),
+ ('order_id.date_order', '>=', f'{lf} 00:00:00'),
+ ('order_id.date_order', '<=', f'{lt} 23:59:59')],
+ ['product_uom_qty:sum'], ['product_id'], lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ if pid:
+ out[pid] = g.get('product_uom_qty') or 0.0
+ return out
+
+
+# ================================================================ 1. RULE HYGIENE
+def rule_health(t=None):
+ """Every fixed pricelist rule flagged for the pre-reprice cleanup. One verb per flag:
+ STALE → reprice it · DEAD → archive it · BELOW-COST → raise it NOW (before the next
+ order books — the realized below-cost view only catches it after) · OVERLAP → resolve
+ precedence."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ stale_cut = (t - dt.timedelta(days=STALE_MONTHS * 30)).isoformat()
+ today = t.isoformat()
+
+ rules = O.search_read(
+ 'product.pricelist.item',
+ [('compute_price', '=', 'fixed'),
+ ('applied_on', 'in', ['0_product_variant', '1_product'])],
+ ['pricelist_id', 'product_id', 'product_tmpl_id', 'applied_on', 'fixed_price',
+ 'min_quantity', 'date_start', 'date_end', 'write_date'])
+
+ # resolve template rules to variants; pull cost + active per involved variant
+ tmpl_ids = {O.m2o_id(r['product_tmpl_id']) for r in rules
+ if r['applied_on'] == '1_product' and r.get('product_tmpl_id')}
+ var_ids = {O.m2o_id(r['product_id']) for r in rules
+ if r['applied_on'] == '0_product_variant' and r.get('product_id')}
+ by_tmpl, vinfo = {}, {}
+ for ch in _chunk(list(tmpl_ids) | set() if not tmpl_ids else list(tmpl_ids), 2000):
+ for p in O.search_read('product.product',
+ [('product_tmpl_id', 'in', ch), ('active', 'in', [True, False])],
+ ['product_tmpl_id', 'standard_price', 'active',
+ 'default_code']):
+ by_tmpl.setdefault(O.m2o_id(p['product_tmpl_id']), []).append(p)
+ vinfo[p['id']] = p
+ for ch in _chunk([v for v in var_ids if v not in vinfo], 2000):
+ for p in O.search_read('product.product',
+ [('id', 'in', ch), ('active', 'in', [True, False])],
+ ['product_tmpl_id', 'standard_price', 'active',
+ 'default_code']):
+ vinfo[p['id']] = p
+
+ sold = _all_channel_sold(lf, lt)
+
+ def _variants_of(r):
+ if r['applied_on'] == '0_product_variant':
+ v = vinfo.get(O.m2o_id(r.get('product_id')))
+ return [v] if v else []
+ return by_tmpl.get(O.m2o_id(r.get('product_tmpl_id')), [])
+
+ # overlap detection: same (pricelist, target, qty break) with overlapping date windows
+ def _target_key(r):
+ return (O.m2o_id(r['pricelist_id']), r['applied_on'],
+ O.m2o_id(r.get('product_id')) or O.m2o_id(r.get('product_tmpl_id')),
+ r.get('min_quantity') or 0)
+ seen_keys = {}
+ for r in rules:
+ seen_keys.setdefault(_target_key(r), []).append(r)
+
+ def _windows_overlap(a, b):
+ a0 = str(a.get('date_start') or '')[:10] or '0000'
+ a1 = str(a.get('date_end') or '')[:10] or '9999'
+ b0 = str(b.get('date_start') or '')[:10] or '0000'
+ b1 = str(b.get('date_end') or '')[:10] or '9999'
+ return a0 <= b1 and b0 <= a1
+
+ rows = []
+ counts = {'stale': 0, 'dead': 0, 'below_cost': 0, 'overlap': 0}
+ below_cost_gap = 0.0
+ for r in rules:
+ de = str(r.get('date_end') or '')[:10]
+ if de and de < today:
+ continue # already expired — not operating
+ variants = _variants_of(r)
+ v_sold = sum(sold.get(v['id'], 0.0) for v in variants)
+ any_active = any(v.get('active') for v in variants)
+ # cost basis: the CHEAPEST variant — flags only when price is below even that
+ costs = [v.get('standard_price') or 0.0 for v in variants
+ if (v.get('standard_price') or 0.0) > 0]
+ min_cost = min(costs) if costs else None
+ price = r.get('fixed_price') or 0.0
+ code = next(((v.get('default_code') or '').strip() for v in variants
+ if (v.get('default_code') or '').strip()), '')
+
+ flags = []
+ if not variants or not any_active or (any_active and v_sold <= 0):
+ if not variants or not any_active:
+ flags.append(('dead', 'Archive rule — product archived/missing'))
+ elif v_sold <= 0:
+ flags.append(('dead', 'Archive rule — no sales in 12m (all channels)'))
+ if str(r.get('write_date') or '')[:10] < stale_cut and v_sold > 0:
+ flags.append(('stale', f'Reprice — untouched >{STALE_MONTHS}m, still selling'))
+ if min_cost is not None and price > 0 and price < min_cost and v_sold > 0:
+ flags.append(('below_cost', 'Raise NOW — tier below current unit cost'))
+ below_cost_gap += (min_cost - price) * v_sold
+ siblings = seen_keys.get(_target_key(r), [])
+ if len(siblings) > 1 and any(s is not r and _windows_overlap(r, s)
+ for s in siblings):
+ flags.append(('overlap', 'Resolve precedence — duplicate qty-break rule'))
+ if not flags:
+ continue
+ for kind, _v in flags:
+ counts[kind] += 1
+ rows.append({
+ 'rule_id': r['id'], 'pricelist': O.m2o_name(r['pricelist_id']),
+ 'sku': code,
+ 'product': O.m2o_name(r.get('product_id')) or O.m2o_name(r.get('product_tmpl_id')),
+ 'qty_break': r.get('min_quantity') or 0, 'price': price,
+ 'unit_cost': min_cost if min_cost is not None else '',
+ 'sold_12m': v_sold, 'last_touched': str(r.get('write_date') or '')[:10],
+ 'flags': ', '.join(k for k, _ in flags),
+ 'action': flags[0][1],
+ })
+ rows.sort(key=lambda x: (0 if 'below_cost' in x['flags'] else 1, -(x['sold_12m'] or 0)))
+ return {'rows': rows, 'n_rules': len(rules), 'counts': counts,
+ 'below_cost_gap': below_cost_gap, 'window': (lf, lt)}
+
+
+# ================================================================ 2. REALIZATION TRACKER
+def realization_events(t=None, months_back=15, min_rules=15):
+ """Candidate reprice events = days on which many fixed rules were (re)written. Odoo keeps
+ no price history, so the event DATE is the anchor and the CURRENT rule price is the target."""
+ t = t or P.today()
+ since = (t - dt.timedelta(days=months_back * 30)).isoformat()
+ rules = O.search_read('product.pricelist.item',
+ [('compute_price', '=', 'fixed'),
+ ('applied_on', 'in', ['0_product_variant', '1_product']),
+ ('write_date', '>=', since)],
+ ['write_date', 'product_id', 'product_tmpl_id'])
+ per_day = {}
+ for r in rules:
+ d = str(r.get('write_date') or '')[:10]
+ if d:
+ e = per_day.setdefault(d, {'n_rules': 0, 'targets': set()})
+ e['n_rules'] += 1
+ e['targets'].add(O.m2o_id(r.get('product_id'))
+ or O.m2o_id(r.get('product_tmpl_id')))
+ out = [{'date': d, 'n_rules': v['n_rules'], 'n_products': len(v['targets'])}
+ for d, v in per_day.items() if v['n_rules'] >= min_rules]
+ out.sort(key=lambda x: x['date'], reverse=True)
+ return out
+
+
+def _avg_price_by_product(prod_ids, a, b, team_id=None):
+ """{product_id: (avg unit price, qty)} over a window — chunked (large in-domains make
+ grouped reads echo the domain per group and MemoryError server-side)."""
+ out = {}
+ for ch in _chunk(prod_ids):
+ dom = O.sale_line_domain(a, b, team_id, extra=[('product_id', 'in', ch)])
+ for g in O.read_group('sale.order.line', dom,
+ ['price_subtotal:sum', 'product_uom_qty:sum'],
+ ['product_id'], lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ qty = g.get('product_uom_qty') or 0.0
+ rev = g.get('price_subtotal') or 0.0
+ if pid and qty > 0:
+ out[pid] = (rev / qty, qty)
+ return out
+
+
+def realization(event_date, t=None, team_id=None, before_days=180, after_min_days=30):
+ """Did the increase STICK? For every product whose rule was written on `event_date`:
+ realized avg before (180d) vs after (event → today) vs the CURRENT rule target.
+ realization % = (after − before) / (target − before). <80% at scale = the worklist."""
+ t = t or P.today()
+ ev = dt.date.fromisoformat(event_date)
+ if (t - ev).days < after_min_days:
+ return {'rows': [], 'note': f'event only {(t - ev).days}d old — too early to score',
+ 'event': event_date}
+ rules = O.search_read('product.pricelist.item',
+ [('compute_price', '=', 'fixed'),
+ ('applied_on', 'in', ['0_product_variant', '1_product']),
+ ('write_date', '>=', f'{event_date} 00:00:00'),
+ ('write_date', '<=', f'{event_date} 23:59:59')],
+ ['product_id', 'product_tmpl_id', 'applied_on', 'fixed_price',
+ 'min_quantity'])
+ # base tier target per product (lowest qty break); template rules → variants
+ tmpl_ids = [O.m2o_id(r['product_tmpl_id']) for r in rules
+ if r['applied_on'] == '1_product' and r.get('product_tmpl_id')]
+ t2v = {}
+ for ch in _chunk(tmpl_ids, 2000):
+ for p in O.search_read('product.product',
+ [('product_tmpl_id', 'in', ch), ('active', 'in', [True, False])],
+ ['product_tmpl_id', 'default_code']):
+ t2v.setdefault(O.m2o_id(p['product_tmpl_id']), []).append(p)
+ target, codes = {}, {}
+ for r in sorted(rules, key=lambda x: x.get('min_quantity') or 0, reverse=True):
+ price = r.get('fixed_price') or 0.0
+ if price <= 0:
+ continue
+ if r['applied_on'] == '0_product_variant' and r.get('product_id'):
+ target[O.m2o_id(r['product_id'])] = price # lowest break wins (reverse sort)
+ else:
+ for p in t2v.get(O.m2o_id(r.get('product_tmpl_id')), []):
+ target[p['id']] = price
+ codes[p['id']] = (p.get('default_code') or '').strip()
+ prods = list(target)
+ if not prods:
+ return {'rows': [], 'note': 'no fixed rules found on that date', 'event': event_date}
+ for ch in _chunk([p for p in prods if p not in codes], 2000):
+ for p in O.search_read('product.product',
+ [('id', 'in', ch), ('active', 'in', [True, False])],
+ ['default_code', 'name']):
+ codes[p['id']] = (p.get('default_code') or '').strip()
+
+ b0 = (ev - dt.timedelta(days=before_days)).isoformat()
+ b1 = (ev - dt.timedelta(days=1)).isoformat()
+ before = _avg_price_by_product(prods, b0, b1, team_id)
+ after = _avg_price_by_product(prods, event_date, t.isoformat(), team_id)
+
+ rows = []
+ for pid in prods:
+ if pid not in before or pid not in after:
+ continue
+ p0, _q0 = before[pid]
+ p1, q1 = after[pid]
+ tgt = target[pid]
+ if tgt <= p0 * 1.005:
+ continue # not an increase vs realized base — skip
+ realized_pct = (p1 - p0) / (tgt - p0) * 100.0
+ days_since = max((t - ev).days, 1)
+ run_rate = q1 / days_since * 365.0
+ rows.append({'prod': pid, 'sku': codes.get(pid, f'#{pid}'),
+ 'before': p0, 'after': p1, 'target': tgt,
+ 'realized_pct': realized_pct, 'qty_after': q1,
+ 'missing': max(0.0, (tgt - p1)) * run_rate})
+ rows.sort(key=lambda x: -x['missing'])
+ n = len(rows)
+ landed = sum(1 for r in rows if r['realized_pct'] >= REALIZED_TARGET_PCT)
+ return {'rows': rows, 'event': event_date, 'n_scored': n,
+ 'n_landed': landed,
+ 'landed_pct': (landed / n * 100.0) if n else None,
+ 'missing_total': sum(r['missing'] for r in rows),
+ 'note': None}
+
+
+# ================================================================ 3. CORRIDOR + WATERFALL
+def corridor(team_id=None, t=None, pre=None):
+ """Peer price corridor: within each SKU (≥MIN_CORRIDOR_BUYERS tier-matched buyers), the
+ floor = p{CORRIDOR_FLOOR_PCTL} of realized-%-of-tier. A customer below the floor AND below
+ 95% of tier is off-corridor even if 'on' their assigned tier — the tier ASSIGNMENT review.
+ Uplift = (floor − actual) × tier × qty."""
+ mp = pre or pcomp.matched_pairs(team_id, t)
+ by_prod = {}
+ for p in mp['pairs']:
+ if p.get('tier'):
+ by_prod.setdefault(p['prod'], []).append(p)
+ flags, n_skus = [], 0
+ for prod, plist in by_prod.items():
+ if len(plist) < MIN_CORRIDOR_BUYERS:
+ continue
+ n_skus += 1
+ ratios = sorted(x['unit'] / x['tier'] for x in plist)
+ floor = ratios[max(0, int(len(ratios) * CORRIDOR_FLOOR_PCTL / 100) - 1)]
+ for x in plist:
+ ratio = x['unit'] / x['tier']
+ if ratio < floor and ratio < 0.95:
+ flags.append({'pid': x['pid'], 'customer': x['customer'],
+ 'sku': x['sku'], 'product': x['product'],
+ 'pct_of_tier': ratio * 100.0, 'floor_pct': floor * 100.0,
+ 'qty_ltm': x['qty'],
+ 'uplift': (floor - ratio) * x['tier'] * x['qty']})
+ flags.sort(key=lambda x: -x['uplift'])
+ per_cust = {}
+ for f in flags:
+ e = per_cust.setdefault(f['pid'], {'pid': f['pid'], 'customer': f['customer'],
+ 'skus': 0, 'uplift': 0.0})
+ e['skus'] += 1
+ e['uplift'] += f['uplift']
+ by_customer = sorted(per_cust.values(), key=lambda x: -x['uplift'])
+ return {'flags': flags, 'by_customer': by_customer, 'n_skus_scored': n_skus,
+ 'uplift_total': sum(f['uplift'] for f in flags), 'window': mp['window']}
+
+
+def waterfall(team_id=None, t=None, pre=None):
+ """Honest pocket-price waterfall, LTM, tier-matched pairs only (coverage stated):
+ tier list value → − below-tier selling → + above-tier selling → invoice value
+ → − credit notes (company-level, not BU-taggable) → pocket. Stages with no data are
+ DROPPED, never imputed."""
+ mp = pre or pcomp.matched_pairs(team_id, t)
+ lf, lt = mp['window']
+ matched = [p for p in mp['pairs'] if p.get('tier')]
+ tier_value = sum(p['tier'] * p['qty'] for p in matched)
+ invoice_value = sum(p['rev'] for p in matched)
+ below = sum(max(0.0, (p['tier'] - p['unit'])) * p['qty'] for p in matched)
+ above = sum(max(0.0, (p['unit'] - p['tier'])) * p['qty'] for p in matched)
+ matched_rev_share = (invoice_value /
+ sum(p['rev'] for p in mp['pairs']) * 100.0) if mp['pairs'] else 0.0
+ # credit notes, LTM, product lines (company-level — honesty note in the UI)
+ refunds = O.sum_field('account.move.line',
+ [('move_id.move_type', '=', 'out_refund'),
+ ('parent_state', '=', 'posted'),
+ ('move_id.invoice_date', '>=', lf),
+ ('move_id.invoice_date', '<=', lt),
+ ('product_id', '!=', False)], 'price_subtotal')
+ stages = [{'stage': 'Tier list value', 'amount': tier_value, 'kind': 'base'}]
+ if below > 0:
+ stages.append({'stage': 'Below-tier selling', 'amount': -below, 'kind': 'leak'})
+ if above > 0:
+ stages.append({'stage': 'Above-tier selling', 'amount': above, 'kind': 'gain'})
+ stages.append({'stage': 'Invoice value', 'amount': invoice_value, 'kind': 'subtotal'})
+ if refunds:
+ stages.append({'stage': 'Credit notes (company)', 'amount': -refunds, 'kind': 'leak'})
+ stages.append({'stage': 'Pocket value', 'amount': invoice_value - (refunds or 0.0),
+ 'kind': 'total'})
+ return {'stages': stages, 'tier_value': tier_value, 'invoice_value': invoice_value,
+ 'below': below, 'above': above, 'refunds': refunds or 0.0,
+ 'matched_rev_share': matched_rev_share, 'window': (lf, lt)}
+
+
+def below_tier_detail(team_id=None, t=None, pre=None):
+ """The waterfall's below-tier bar, drilled: every pair sold under its tier (the FULL gap,
+ not just the <97% compliance threshold), rolled up by customer / SKU / agent. Each rollup's
+ total reproduces the waterfall stage to the cent (rule 8b — no unverifiable aggregates)."""
+ mp = pre or pcomp.matched_pairs(team_id, t)
+ below = [p for p in mp['pairs'] if p.get('tier') and p['unit'] < p['tier']]
+ attrs = cust_mod._partner_attrs(list({p['pid'] for p in below}))
+ by_cust, by_sku, by_agent = {}, {}, {}
+ for p in below:
+ gap = (p['tier'] - p['unit']) * p['qty']
+ c = by_cust.setdefault(p['pid'], {'pid': p['pid'], 'customer': p['customer'],
+ 'skus': 0, 'gap': 0.0, 'rev': 0.0})
+ c['skus'] += 1
+ c['gap'] += gap
+ c['rev'] += p['rev']
+ s = by_sku.setdefault(p['prod'], {'code': p['sku'] or f"#{p['prod']}",
+ 'product': p['product'], 'customers': 0,
+ 'gap': 0.0, 'rev': 0.0})
+ s['customers'] += 1
+ s['gap'] += gap
+ s['rev'] += p['rev']
+ a_name = (attrs.get(p['pid']) or {}).get('agent') or '(none)'
+ a = by_agent.setdefault(a_name, {'agent': a_name, 'pairs': 0, 'gap': 0.0})
+ a['pairs'] += 1
+ a['gap'] += gap
+ out = {
+ 'by_customer': sorted(by_cust.values(), key=lambda x: -x['gap']),
+ 'by_sku': sorted(by_sku.values(), key=lambda x: -x['gap']),
+ 'by_agent': sorted(by_agent.values(), key=lambda x: -x['gap']),
+ 'total': sum((p['tier'] - p['unit']) * p['qty'] for p in below),
+ 'n_pairs': len(below),
+ }
+ return out
+
+
+# ================================================================ VALIDATION
+def validate(t=None, team_id=None, pre_mp=None):
+ """(1) rule universe ties search_count; (2) waterfall arithmetic closes exactly:
+ tier − below + above == invoice (same pairs, two computation paths)."""
+ n = O.get_odoo().search_count('product.pricelist.item',
+ [('compute_price', '=', 'fixed'),
+ ('applied_on', 'in', ['0_product_variant', '1_product'])])
+ rh = rule_health(t)
+ checks = [{'check': 'pricelist rules — pull complete',
+ 'a': rh['n_rules'], 'b': n, 'gap': rh['n_rules'] - n,
+ 'ok': rh['n_rules'] == n}]
+ wf = waterfall(team_id, t, pre=pre_mp)
+ lhs = wf['tier_value'] - wf['below'] + wf['above']
+ checks.append({'check': 'waterfall closes: tier − below + above == invoice',
+ 'a': round(lhs, 2), 'b': round(wf['invoice_value'], 2),
+ 'gap': round(lhs - wf['invoice_value'], 2),
+ 'ok': abs(lhs - wf['invoice_value']) < 1.0})
+ bd = below_tier_detail(team_id, t, pre=pre_mp)
+ for key in ('by_customer', 'by_sku', 'by_agent'):
+ s = sum(r['gap'] for r in bd[key])
+ checks.append({'check': f'below-tier drill {key} == the waterfall bar',
+ 'a': round(s, 2), 'b': round(wf['below'], 2),
+ 'gap': round(s - wf['below'], 2),
+ 'ok': abs(s - wf['below']) < 1.0})
+ return checks
\ No newline at end of file
diff --git a/platform/modules/returns.py b/platform/modules/returns.py
new file mode 100644
index 0000000000000000000000000000000000000000..0991b506809f1bb6c91d0bfa33b859d4678e63d2
--- /dev/null
+++ b/platform/modules/returns.py
@@ -0,0 +1,238 @@
+"""Returns module — the credit-note lens nobody reads: 14% of billing documents are refunds.
+
+Governing question: WHERE DO RETURNS CONCENTRATE — WHICH SKUs (quality signal), WHICH
+CUSTOMERS (behavior signal), WHICH CATEGORIES (product-line signal), WHICH SUPPLIERS
+(sourcing-quality signal) AND WHICH AGENTS (book-behavior signal) — AND IS THE RATE MOVING?
+Odoo has no return-reason field, so the concentration IS the diagnostic. Rates are always shown
+next to raw $ — a big seller with average rate is noise; a small line with 4x the company rate
+is the finding.
+
+Supplier attribution: curated procurement map (default_code) first, else the DOMINANT vendor
+from confirmed PO history (most units bought), else '(no supplier data)'. Agent attribution:
+the customer's res.partner agent — credit-note team_id is NOT trustworthy.
+
+Company-level (credit notes carry team_id=1 for everything). READ-ONLY.
+"""
+import sys
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+import modules.customers as cust_mod
+import modules.procurement as proc_mod
+
+_EX_MOVE = [] # posted customer docs only
+
+
+def _mdom(move_type, a, b):
+ return [('move_type', '=', move_type), ('state', '=', 'posted'),
+ ('invoice_date', '>=', a), ('invoice_date', '<=', b)]
+
+
+def _ldom(move_type, a, b):
+ return [('move_id.move_type', '=', move_type), ('parent_state', '=', 'posted'),
+ ('move_id.invoice_date', '>=', a), ('move_id.invoice_date', '<=', b),
+ ('product_id', '!=', False)]
+
+
+def build(t=None):
+ t = t or P.today()
+ d12 = (t - dt.timedelta(days=365)).isoformat()
+ d13m = (t.replace(day=1) - dt.timedelta(days=380)).replace(day=1).isoformat()
+ ti = t.isoformat()
+
+ # ---- headline + monthly (from the MOVES — count + untaxed value) -----------------------
+ def _monthly(mt):
+ out = {}
+ for g in O.read_group('account.move', _mdom(mt, d13m, ti),
+ ['amount_untaxed:sum'], ['invoice_date:month'], lazy=False):
+ k = g.get('invoice_date:month')
+ out[str(k)] = {'value': g.get('amount_untaxed') or 0.0, 'n': g.get('__count') or 0}
+ return out
+ ref_m, inv_m = _monthly('out_refund'), _monthly('out_invoice')
+ months = sorted(set(ref_m) | set(inv_m),
+ key=lambda m: dt.datetime.strptime(m, '%B %Y'))
+ monthly = []
+ for m in months:
+ r, i = ref_m.get(m, {'value': 0, 'n': 0}), inv_m.get(m, {'value': 0, 'n': 0})
+ monthly.append({'month': m, 'refund_value': r['value'], 'n_refunds': r['n'],
+ 'invoice_value': i['value'], 'n_invoices': i['n'],
+ 'rate_pct': (r['value'] / i['value'] * 100) if i['value'] else None})
+
+ # ---- by customer (moves, 12m) ----------------------------------------------------------
+ def _by_partner(mt):
+ out = {}
+ for g in O.read_group('account.move', _mdom(mt, d12, ti),
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False):
+ pid = O.m2o_id(g.get('partner_id'))
+ if pid:
+ out[pid] = {'name': O.m2o_name(g.get('partner_id')),
+ 'value': g.get('amount_untaxed') or 0.0, 'n': g.get('__count') or 0}
+ return out
+ ref_c, inv_c = _by_partner('out_refund'), _by_partner('out_invoice')
+ by_customer = []
+ for pid, r in ref_c.items():
+ inv = inv_c.get(pid, {'value': 0.0, 'n': 0})
+ by_customer.append({'pid': pid, 'customer': r['name'], 'ret_value': r['value'],
+ 'n_refunds': r['n'], 'invoiced': inv['value'],
+ 'rate_pct': (r['value'] / inv['value'] * 100) if inv['value'] else None})
+ by_customer.sort(key=lambda x: -x['ret_value'])
+
+ # ---- by SKU (refund LINES vs invoice LINES, 12m) ----------------------------------------
+ def _by_product(mt):
+ out = {}
+ for g in O.read_group('account.move.line', _ldom(mt, d12, ti),
+ ['price_subtotal:sum', 'quantity:sum'], ['product_id'], lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ if pid:
+ out[pid] = {'value': g.get('price_subtotal') or 0.0,
+ 'qty': g.get('quantity') or 0.0}
+ return out
+ ref_p, inv_p = _by_product('out_refund'), _by_product('out_invoice')
+ # meta for the UNION of refunded + sold products (category/supplier denominators need the
+ # invoice side too)
+ all_pids = list(set(ref_p) | set(inv_p))
+ meta = {}
+ for i in range(0, len(all_pids), 5000):
+ for p in O.search_read('product.product',
+ [('id', 'in', all_pids[i:i + 5000]),
+ ('active', 'in', [True, False])],
+ ['default_code', 'name', 'categ_id']):
+ meta[p['id']] = p
+ by_sku = []
+ for pid, r in ref_p.items():
+ inv = inv_p.get(pid, {'value': 0.0, 'qty': 0.0})
+ m = meta.get(pid, {})
+ by_sku.append({'pid': pid, 'code': (m.get('default_code') or '').strip() or f'#{pid}',
+ 'product': m.get('name') or '',
+ 'ret_value': r['value'], 'ret_units': r['qty'],
+ 'sold_value': inv['value'], 'sold_units': inv['qty'],
+ 'rate_pct': (r['value'] / inv['value'] * 100) if inv['value'] else None})
+ by_sku.sort(key=lambda x: -x['ret_value'])
+
+ # ---- by CATEGORY (product-line signal: which kinds of products come back) ---------------
+ def _cat_of(pid):
+ return O.m2o_name((meta.get(pid) or {}).get('categ_id')) or '(none)'
+ cat = {}
+ for pid, r in ref_p.items():
+ e = cat.setdefault(_cat_of(pid), {'ret_value': 0.0, 'ret_units': 0.0,
+ 'sold_value': 0.0, 'n_skus': 0})
+ e['ret_value'] += r['value']
+ e['ret_units'] += r['qty']
+ e['n_skus'] += 1
+ for pid, r in inv_p.items():
+ e = cat.setdefault(_cat_of(pid), {'ret_value': 0.0, 'ret_units': 0.0,
+ 'sold_value': 0.0, 'n_skus': 0})
+ e['sold_value'] += r['value']
+ by_category = [{'category': k, **v,
+ 'rate_pct': (v['ret_value'] / v['sold_value'] * 100)
+ if v['sold_value'] else None}
+ for k, v in cat.items() if v['ret_value'] > 0]
+ by_category.sort(key=lambda x: -x['ret_value'])
+
+ # ---- by SUPPLIER (sourcing-quality signal) ----------------------------------------------
+ # dominant vendor per product from confirmed PO history (most units bought), one grouped read
+ po_vendor, _best_q = {}, {}
+ try:
+ for g in O.read_group('purchase.order.line',
+ [('order_id.state', 'in', ('purchase', 'done')),
+ ('product_id', '!=', False)],
+ ['product_qty:sum'], ['product_id', 'partner_id'], lazy=False):
+ pid = O.m2o_id(g.get('product_id'))
+ q = g.get('product_qty') or 0.0
+ v = O.m2o_name(g.get('partner_id'))
+ if pid and v and q > _best_q.get(pid, 0.0):
+ _best_q[pid] = q
+ po_vendor[pid] = v
+ except Exception:
+ pass
+ sup_map = proc_mod.suppliers()
+
+ def _vendor_of(pid):
+ code = ((meta.get(pid) or {}).get('default_code') or '').strip()
+ cur = sup_map.get(code) or {}
+ return (cur.get('vendor') or '').strip() or po_vendor.get(pid) or '(no supplier data)'
+ sup = {}
+ for pid, r in ref_p.items():
+ e = sup.setdefault(_vendor_of(pid), {'ret_value': 0.0, 'ret_units': 0.0,
+ 'sold_value': 0.0, 'n_skus': 0})
+ e['ret_value'] += r['value']
+ e['ret_units'] += r['qty']
+ e['n_skus'] += 1
+ for pid, r in inv_p.items():
+ e = sup.setdefault(_vendor_of(pid), {'ret_value': 0.0, 'ret_units': 0.0,
+ 'sold_value': 0.0, 'n_skus': 0})
+ e['sold_value'] += r['value']
+ by_supplier = [{'supplier': k, **v,
+ 'rate_pct': (v['ret_value'] / v['sold_value'] * 100)
+ if v['sold_value'] else None}
+ for k, v in sup.items() if v['ret_value'] > 0]
+ by_supplier.sort(key=lambda x: -x['ret_value'])
+
+ # ---- by AGENT (book-behavior signal; agent = the customer's res.partner agent, NOT the
+ # credit-note team_id). Denominator = the agent's WHOLE invoiced book, not just refunders.
+ attrs = cust_mod._partner_attrs(list(set(ref_c) | set(inv_c)))
+
+ def _agent_of(pid):
+ return (attrs.get(pid) or {}).get('agent') or '(none)'
+ ag = {}
+ for pid, r in ref_c.items():
+ e = ag.setdefault(_agent_of(pid), {'ret_value': 0.0, 'n_refunds': 0, 'invoiced': 0.0,
+ 'top_customer': '', 'top_value': 0.0, 'top_pid': None})
+ e['ret_value'] += r['value']
+ e['n_refunds'] += r['n']
+ if r['value'] > e['top_value']:
+ e['top_value'] = r['value']
+ e['top_customer'] = r['name']
+ e['top_pid'] = pid
+ for pid, r in inv_c.items():
+ e = ag.setdefault(_agent_of(pid), {'ret_value': 0.0, 'n_refunds': 0, 'invoiced': 0.0,
+ 'top_customer': '', 'top_value': 0.0, 'top_pid': None})
+ e['invoiced'] += r['value']
+ by_agent = [{'agent': k, **v,
+ 'rate_pct': (v['ret_value'] / v['invoiced'] * 100) if v['invoiced'] else None}
+ for k, v in ag.items() if v['ret_value'] > 0]
+ by_agent.sort(key=lambda x: -x['ret_value'])
+
+ # ---- headline ---------------------------------------------------------------------------
+ n_ref = sum(r['n'] for r in ref_c.values())
+ ref_val = sum(r['value'] for r in ref_c.values())
+ n_inv = sum(r['n'] for r in inv_c.values())
+ inv_val = sum(r['value'] for r in inv_c.values())
+ top10 = sum(r['ret_value'] for r in by_sku[:10])
+ return {'monthly': monthly, 'by_customer': by_customer, 'by_sku': by_sku,
+ 'by_category': by_category, 'by_supplier': by_supplier, 'by_agent': by_agent,
+ 'n_refunds': n_ref, 'refund_value': ref_val,
+ 'n_invoices': n_inv, 'invoice_value': inv_val,
+ 'doc_rate_pct': (n_ref / n_inv * 100) if n_inv else None,
+ 'value_rate_pct': (ref_val / inv_val * 100) if inv_val else None,
+ 'top10_share_pct': (top10 / ref_val * 100) if ref_val else None,
+ 'window': (d12, ti)}
+
+
+def validate(t=None, team_id=None, pre=None):
+ t = t or P.today()
+ b = pre or build(t)
+ d12, ti = b['window']
+ checks = []
+ srv_val = O.sum_field('account.move', _mdom('out_refund', d12, ti), 'amount_untaxed')
+ a = sum(r['ret_value'] for r in b['by_customer'])
+ checks.append({'check': 'Returns: Σ(per-customer refunds) == server Σ(credit-note untaxed)',
+ 'a': round(a, 2), 'b': round(srv_val, 2), 'gap': round(a - srv_val, 2),
+ 'ok': abs(a - srv_val) <= max(1.0, abs(srv_val) * 0.001)})
+ srv_line = O.sum_field('account.move.line', _ldom('out_refund', d12, ti), 'price_subtotal')
+ a2 = sum(r['ret_value'] for r in b['by_sku'])
+ checks.append({'check': 'Returns: Σ(per-SKU refund lines) == server Σ(refund product lines)',
+ 'a': round(a2, 2), 'b': round(srv_line, 2), 'gap': round(a2 - srv_line, 2),
+ 'ok': abs(a2 - srv_line) <= max(1.0, abs(srv_line) * 0.001)})
+ # the three new rollups are re-groupings of the SAME universes — they must tie exactly
+ for key, base, label in (('by_category', a2, 'per-SKU lines'),
+ ('by_supplier', a2, 'per-SKU lines'),
+ ('by_agent', sum(r['ret_value'] for r in b['by_customer']),
+ 'per-customer refunds')):
+ s = sum(r['ret_value'] for r in b[key])
+ checks.append({'check': f'Returns: Σ({key}) == Σ({label})',
+ 'a': round(s, 2), 'b': round(base, 2), 'gap': round(s - base, 2),
+ 'ok': abs(s - base) <= 1.0})
+ return checks
diff --git a/platform/modules/sales.py b/platform/modules/sales.py
new file mode 100644
index 0000000000000000000000000000000000000000..b9d791d858a4a73360fb35032f80a83ccefa93f3
--- /dev/null
+++ b/platform/modules/sales.py
@@ -0,0 +1,775 @@
+"""Sales module — revenue, YoY (same-period), seasonality, rep/customer/SKU breakdowns.
+
+Scope: confirmed orders (state sale/done) on Fisch+Royal teams, excluded accounts removed.
+Order-level metrics come from sale.order (amount_untaxed); SKU-level from
+sale.order.line (price_subtotal). Each public metric has a paired validate_* that
+reconciles against an independent Odoo aggregate.
+"""
+import sys
+from functools import lru_cache
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1])) # platform/
+import core.odoo as O
+import core.periods as P
+import modules.inventory as inv_mod # reuse the main-category resolver
+
+
+def order_domain(date_from=None, date_to=None, team_id=None, partner_ids=None):
+ """Confirmed sale.order domain (RI+FFS scope, house accounts excluded). partner_ids (a
+ collection, possibly empty) restricts to those customers — the Customer-module Agent filter
+ rides on this; None = no partner restriction (an empty collection matches no orders)."""
+ dom = [('state', 'in', ['sale', 'done']), ('team_id', 'in', TEAMS(team_id))]
+ if date_from:
+ dom.append(('date_order', '>=', f'{date_from} 00:00:00'))
+ if date_to:
+ dom.append(('date_order', '<=', f'{date_to} 23:59:59'))
+ ex = O.excluded_partner_ids()
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ if partner_ids is not None:
+ dom.append(('partner_id', 'in', list(partner_ids)))
+ if O.doc_mode() == 'invoice':
+ dom.append(('invoice_status', '=', 'invoiced'))
+ return dom
+
+
+def TEAMS(team_id):
+ return [team_id] if team_id is not None else O.TEAM_IDS
+
+
+# ---- order-level primitives: STORE-backed (OM-2 retrofit 2026-07-12) with LIVE fallback ------
+# headline/scorecard/trends make ~50 of these per build; the store serves them in milliseconds
+# (kept minutes-fresh by the app's auto-sync). The SQL mirrors order_domain() EXACTLY — same
+# states, teams, exclusions, date bounds and the Orders/Invoiced basis (invoice_status is
+# synced). validate() stays on live Odoo = the standing parity proof. Any store problem falls
+# back to the live reads.
+USE_STORE = True
+
+
+def _order_where_store(date_from, date_to, team_id):
+ """(where_sql, params) mirroring order_domain() for the store's sale_order table."""
+ params, w = [], ["state IN ('sale','done')"]
+ teams = TEAMS(team_id)
+ w.append("team_id IN (" + ",".join("?" * len(teams)) + ")")
+ params += list(teams)
+ if date_from:
+ w.append("CAST(date_order AS TIMESTAMP) >= CAST(? AS TIMESTAMP)")
+ params.append(f"{date_from} 00:00:00")
+ if date_to:
+ w.append("CAST(date_order AS TIMESTAMP) <= CAST(? AS TIMESTAMP)")
+ params.append(f"{date_to} 23:59:59")
+ ex = O.excluded_partner_ids()
+ if ex:
+ w.append("partner_id NOT IN (" + ",".join("?" * len(ex)) + ")")
+ params += list(ex)
+ if O.doc_mode() == 'invoice':
+ w.append("invoice_status = 'invoiced'")
+ return " AND ".join(w), params
+
+
+def _order_agg_store(expr, date_from, date_to, team_id):
+ import harness.datastore as DS
+ where, params = _order_where_store(date_from, date_to, team_id)
+ r = DS.ro_con().execute(
+ f"SELECT {expr} FROM sale_order WHERE {where}", params).fetchone()
+ return r[0] or 0
+
+
+def _order_partner_groups_store(date_from, date_to, team_id):
+ """[(partner_id, n_orders, revenue)] — feeds cadence + concentration."""
+ import harness.datastore as DS
+ where, params = _order_where_store(date_from, date_to, team_id)
+ return DS.ro_con().execute(
+ f"SELECT partner_id, count(*), sum(amount_untaxed) FROM sale_order WHERE {where} "
+ "GROUP BY 1", params).fetchall()
+
+
+def _orev(date_from, date_to, team_id=None):
+ if USE_STORE:
+ try:
+ return float(_order_agg_store('sum(amount_untaxed)', date_from, date_to, team_id))
+ except Exception:
+ pass
+ return O.sum_field('sale.order', order_domain(date_from, date_to, team_id), 'amount_untaxed')
+
+
+def _orders(date_from, date_to, team_id=None):
+ if USE_STORE:
+ try:
+ return int(_order_agg_store('count(*)', date_from, date_to, team_id))
+ except Exception:
+ pass
+ return O.get_odoo().search_count('sale.order', order_domain(date_from, date_to, team_id))
+
+
+def _custs(date_from, date_to, team_id=None):
+ if USE_STORE:
+ try:
+ return int(_order_agg_store('count(DISTINCT partner_id)',
+ date_from, date_to, team_id))
+ except Exception:
+ pass
+ return O.distinct_count('sale.order', order_domain(date_from, date_to, team_id), 'partner_id')
+
+
+# ---------------------------------------------------------------- headline
+def headline(t=None, team_id=None):
+ """Headline scoped to a DBA (team_id) or consolidated (None). by_team always shows both."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ rev = _orev(yf, yt, team_id)
+ rev_ly = _orev(lf, lt, team_id)
+ orders = _orders(yf, yt, team_id)
+ custs = _custs(yf, yt, team_id)
+ out = {
+ 'as_of': yt,
+ 'ytd_revenue': rev,
+ 'ytd_revenue_ly': rev_ly,
+ 'yoy_pct': P.yoy_pct(rev, rev_ly),
+ 'ytd_orders': orders,
+ 'ytd_customers': custs,
+ 'aov': (rev / orders) if orders else 0.0,
+ 'by_team': {},
+ }
+ for tid in O.TEAM_IDS:
+ out['by_team'][O.TEAM_NAMES[tid]] = {
+ 'ytd': _orev(yf, yt, tid),
+ 'ytd_ly': _orev(lf, lt, tid),
+ }
+ return out
+
+
+# ---------------------------------------------------------------- period scorecard
+# (label, key, weekday-aligned-LY?) — Today/WTD compare to 52 weeks ago (same weekday); the
+# month/quarter/year periods compare to the same calendar window last year.
+_PERIODS = [('Today', 'today', True), ('Week to date', 'wtd', True), ('Month to date', 'mtd', False),
+ ('Quarter to date', 'qtd', False), ('Year to date', 'ytd', False)]
+
+
+def _period_window(key, t):
+ import datetime as dt
+ if key == 'today':
+ return P._d(t), P._d(t)
+ return {'wtd': P.wtd, 'mtd': P.mtd, 'qtd': P.qtd, 'ytd': P.ytd}[key](t)
+
+
+def period_scorecard(t=None, team_id=None):
+ """The headline period scorecard: revenue (+ YoY same-period), orders, AOV and active customers
+ for Today / WTD / MTD / QTD / YTD. Each entry carries its date window so the UI can make every
+ number click through to the decomposition drawer."""
+ t = t or P.today()
+ out = []
+ for label, key, wk in _PERIODS:
+ f, tt = _period_window(key, t)
+ cf, ct = P.shift_year(f, tt, weeks=wk)
+ rev = _orev(f, tt, team_id)
+ rev_ly = _orev(cf, ct, team_id)
+ orders = _orders(f, tt, team_id)
+ out.append({
+ 'key': key, 'label': label, 'date_from': f, 'date_to': tt,
+ 'cmp_from': cf, 'cmp_to': ct,
+ 'revenue': rev, 'revenue_ly': rev_ly, 'yoy_pct': P.yoy_pct(rev, rev_ly),
+ 'orders': orders, 'customers': _custs(f, tt, team_id),
+ 'aov': (rev / orders) if orders else 0.0,
+ })
+ return out
+
+
+# ---------------------------------------------------------------- seasonality / trend
+def weekly_trend(n_weeks=13, t=None, team_id=None):
+ """Per-week revenue for the last n_weeks (Mon–Sun) vs the same week 52 weeks earlier (weekday-
+ aligned YoY). Each row carries start/end so a clicked week decomposes to its exact window."""
+ t = t or P.today()
+ rows = []
+ for label, start, end in P.week_starts(n_weeks, t):
+ this = _orev(start, end, team_id)
+ cf, ct = P.shift_year(start, end, weeks=True)
+ last = _orev(cf, ct, team_id)
+ rows.append({'week': label, 'start': start, 'end': end, 'cmp_from': cf, 'cmp_to': ct,
+ 'revenue': this, 'revenue_ly': last, 'yoy_pct': P.yoy_pct(this, last)})
+ return rows
+
+
+def monthly_trend(n=13, t=None, team_id=None):
+ """Per-month revenue for the last n months + same month one year earlier (YoY)."""
+ t = t or P.today()
+ rows = []
+ for ym, start, end in P.month_starts(n, t):
+ this = _orev(start, end, team_id)
+ # same month last year
+ y, m = int(ym[:4]) - 1, int(ym[5:7])
+ import datetime as dt
+ ly_start = dt.date(y, m, 1).isoformat()
+ ly_end = (dt.date(y + (m // 12), (m % 12) + 1, 1) - dt.timedelta(days=1)).isoformat()
+ last = _orev(ly_start, ly_end, team_id)
+ rows.append({'month': ym, 'start': start, 'end': end, 'cmp_from': ly_start, 'cmp_to': ly_end,
+ 'revenue': this, 'revenue_ly': last, 'yoy_pct': P.yoy_pct(this, last)})
+ return rows
+
+
+# ---------------------------------------------------------------- breakdowns
+def by_team(t=None):
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ return [{'team': O.TEAM_NAMES[tid], 'ytd': _orev(yf, yt, tid),
+ 'ytd_ly': _orev(lf, lt, tid),
+ 'yoy_pct': P.yoy_pct(_orev(yf, yt, tid), _orev(lf, lt, tid))}
+ for tid in O.TEAM_IDS]
+
+
+def by_rep(t=None, limit=25, team_id=None):
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ g = O.read_group('sale.order', order_domain(yf, yt, team_id),
+ ['amount_untaxed:sum'], ['user_id'], lazy=False)
+ rows = [{'rep': O.m2o_name(r.get('user_id')) or '(none)', 'uid': O.m2o_id(r.get('user_id')),
+ 'revenue': r.get('amount_untaxed') or 0.0,
+ 'orders': r.get('__count') or r.get('user_id_count') or 0}
+ for r in g]
+ rows.sort(key=lambda x: -x['revenue'])
+ return rows[:limit]
+
+
+def category_product_ids(category):
+ """The product ids belonging to a main category — for decomposing a category number."""
+ return [pid for pid, c in _product_cat().items() if c == category]
+
+
+def _top_customers_store(yf, yt, team_id, limit):
+ import harness.datastore as DS
+ params, w = [], ["state IN ('sale','done')"]
+ teams = TEAMS(team_id)
+ w.append("team_id IN (" + ",".join("?" * len(teams)) + ")")
+ params += list(teams)
+ w.append("CAST(date_order AS TIMESTAMP) >= CAST(? AS TIMESTAMP)")
+ params.append(f"{yf} 00:00:00")
+ w.append("CAST(date_order AS TIMESTAMP) <= CAST(? AS TIMESTAMP)")
+ params.append(f"{yt} 23:59:59")
+ ex = O.excluded_partner_ids()
+ if ex:
+ w.append("partner_id NOT IN (" + ",".join("?" * len(ex)) + ")")
+ params += list(ex)
+ if O.doc_mode() == 'invoice':
+ w.append("invoice_status = 'invoiced'")
+ rows = DS.ro_con().execute(
+ "SELECT o.partner_id, coalesce(p.name, '#' || o.partner_id), "
+ "sum(o.amount_untaxed), count(*) "
+ "FROM sale_order o LEFT JOIN res_partner p ON p.id = o.partner_id "
+ "WHERE " + " AND ".join(w) + " GROUP BY 1, 2 ORDER BY 3 DESC LIMIT ?",
+ params + [int(limit)]).fetchall()
+ return [{'pid': r[0], 'customer': r[1], 'revenue': r[2] or 0.0, 'orders': r[3]}
+ for r in rows if r[0]]
+
+
+def top_customers(t=None, limit=25, team_id=None):
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ if USE_STORE:
+ try:
+ return _top_customers_store(yf, yt, team_id, limit)
+ except Exception:
+ pass
+ g = O.read_group('sale.order', order_domain(yf, yt, team_id),
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False)
+ rows = [{'pid': O.m2o_id(r.get('partner_id')),
+ 'customer': O.m2o_name(r.get('partner_id')),
+ 'revenue': r.get('amount_untaxed') or 0.0,
+ 'orders': r.get('__count') or 0}
+ for r in g if r.get('partner_id')]
+ rows.sort(key=lambda x: -x['revenue'])
+ return rows[:limit]
+
+
+def _top_skus_store(yf, yt, team_id, limit):
+ """Mirrors sale_line_domain: confirmed states, order-side teams/dates/invoice-mode,
+ line-side partner exclusion, product_id set. Names + SKU codes join in-store (the live
+ path needs an extra search_read for codes)."""
+ import harness.datastore as DS
+ params, w = [], ["o.state IN ('sale','done')", "l.product_id IS NOT NULL"]
+ teams = TEAMS(team_id)
+ w.append("o.team_id IN (" + ",".join("?" * len(teams)) + ")")
+ params += list(teams)
+ w.append("CAST(o.date_order AS TIMESTAMP) >= CAST(? AS TIMESTAMP)")
+ params.append(f"{yf} 00:00:00")
+ w.append("CAST(o.date_order AS TIMESTAMP) <= CAST(? AS TIMESTAMP)")
+ params.append(f"{yt} 23:59:59")
+ ex = O.excluded_partner_ids()
+ if ex:
+ w.append("l.order_partner_id NOT IN (" + ",".join("?" * len(ex)) + ")")
+ params += list(ex)
+ if O.doc_mode() == 'invoice':
+ w.append("o.invoice_status = 'invoiced'")
+ rows = DS.ro_con().execute(
+ "SELECT l.product_id, coalesce(p.name, '#' || l.product_id), p.default_code, "
+ "sum(l.price_subtotal), sum(l.product_uom_qty), sum(l.margin), count(*) "
+ "FROM sale_order_line l JOIN sale_order o ON o.id = l.order_id "
+ "LEFT JOIN product_product p ON p.id = l.product_id "
+ "WHERE " + " AND ".join(w) + " GROUP BY 1, 2, 3 ORDER BY 4 DESC LIMIT ?",
+ params + [int(limit)]).fetchall()
+ return [_sku_profit({'product': r[1], 'pid': r[0],
+ 'code': (str(r[2]).strip() if r[2] else None),
+ 'revenue': r[3] or 0.0, 'qty': r[4] or 0.0,
+ 'margin': r[5] or 0.0, 'lines': r[6]})
+ for r in rows if r[0]]
+
+
+def top_skus(t=None, limit=25, team_id=None):
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ if USE_STORE:
+ try:
+ return _top_skus_store(yf, yt, team_id, limit)
+ except Exception:
+ pass
+ g = O.read_group('sale.order.line', O.sale_line_domain(yf, yt, team_id),
+ ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'], ['product_id'], lazy=False)
+ rows = [_sku_profit({'product': O.m2o_name(r.get('product_id')), 'pid': O.m2o_id(r.get('product_id')),
+ 'revenue': r.get('price_subtotal') or 0.0,
+ 'qty': r.get('product_uom_qty') or 0.0,
+ 'margin': r.get('margin') or 0.0, 'lines': r.get('__count') or 0})
+ for r in g if r.get('product_id')]
+ rows.sort(key=lambda x: -x['revenue'])
+ rows = rows[:limit]
+ if rows: # attach SKU code so the UI can deep-link each to its SKU drawer
+ codemap = {}
+ for pr in O.search_read('product.product', [('id', 'in', [r['pid'] for r in rows])], ['default_code']):
+ codemap[pr['id']] = str(pr['default_code']).strip() if pr.get('default_code') else None
+ for r in rows:
+ r['code'] = codemap.get(r['pid'])
+ return rows
+
+
+def _sku_profit(s):
+ """Attach profit/order + margin% to a SKU row (uses the Margin module's `margin` sum). `lines`
+ (order lines) ~= the number of orders containing the SKU (one line per SKU per order in
+ practice), so profit/order = total margin ÷ lines."""
+ lines = s.get('lines') or 0
+ s['profit_per_order'] = (s['margin'] / lines) if lines else 0.0
+ s['margin_pct'] = (s['margin'] / s['revenue'] * 100.0) if s.get('revenue') else 0.0
+ return s
+
+
+def _attach_sku_codes(rows, pid_key='pid'):
+ """Attach SKU `code` (default_code) to product rows so each can deep-link to its SKU drawer."""
+ ids = [r[pid_key] for r in rows if r.get(pid_key)]
+ if not ids:
+ return rows
+ codemap = {}
+ for pr in O.search_read('product.product', [('id', 'in', ids)], ['default_code']):
+ codemap[pr['id']] = str(pr['default_code']).strip() if pr.get('default_code') else None
+ for r in rows:
+ r['code'] = codemap.get(r.get(pid_key))
+ return rows
+
+
+def decompose(date_from, date_to, team_id=None, line_extra=None, order_extra=None,
+ product_ids=None, compare=None, top=30):
+ """Universal decomposition of ANY sales number into its contributors over a window. Line-level
+ (sale.order.line) so it breaks down by customer, SKU and category consistently and ties to the
+ headline (line == order revenue, proven in validate()).
+
+ line_extra extra sale.order.line domain clauses (e.g. a rep via order_id.user_id)
+ order_extra the order-level translation of the same scope (for the orders count)
+ product_ids restrict to a category's products
+ compare (cmp_from, cmp_to) for the same-period-last-year total (YoY headline)
+
+ Returns totals + ranked `customers`, `skus`, `categories` (each with revenue + % share)."""
+ ex = list(line_extra or [])
+ if product_ids is not None:
+ ex.append(('product_id', 'in', list(product_ids)))
+ dom = O.sale_line_domain(date_from, date_to, team_id, extra=ex)
+
+ gc = O.read_group('sale.order.line', dom, ['price_subtotal:sum', 'product_uom_qty:sum'],
+ ['order_partner_id'], lazy=False)
+ customers = [{'pid': O.m2o_id(r.get('order_partner_id')), 'customer': O.m2o_name(r.get('order_partner_id')),
+ 'revenue': r.get('price_subtotal') or 0.0, 'qty': r.get('product_uom_qty') or 0.0,
+ 'lines': r.get('__count') or 0} for r in gc if r.get('order_partner_id')]
+
+ gs = O.read_group('sale.order.line', dom, ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'],
+ ['product_id'], lazy=False)
+ skus = [_sku_profit({'pid': O.m2o_id(r.get('product_id')), 'product': O.m2o_name(r.get('product_id')),
+ 'revenue': r.get('price_subtotal') or 0.0, 'qty': r.get('product_uom_qty') or 0.0,
+ 'margin': r.get('margin') or 0.0, 'lines': r.get('__count') or 0})
+ for r in gs if r.get('product_id')]
+
+ cat = _product_cat()
+ cagg = {}
+ for s in skus:
+ c = cat.get(s['pid'], '(uncategorized)')
+ e = cagg.setdefault(c, {'category': c, 'revenue': 0.0, 'qty': 0.0, 'skus': 0})
+ e['revenue'] += s['revenue']; e['qty'] += s['qty']; e['skus'] += 1
+ categories = sorted(cagg.values(), key=lambda x: -x['revenue'])
+
+ total = sum(c['revenue'] for c in customers)
+ units = sum(s['qty'] for s in skus)
+ for lst in (customers, skus, categories):
+ for r in lst:
+ r['pct'] = (r['revenue'] / total * 100.0) if total else 0.0
+ customers.sort(key=lambda x: -x['revenue'])
+ skus.sort(key=lambda x: -x['revenue'])
+ _attach_sku_codes(skus)
+
+ # orders count (order-level, single cheap aggregate) + AOV
+ odom = order_domain(date_from, date_to, team_id) + list(order_extra or [])
+ if product_ids is not None and not order_extra:
+ odom = odom + [('order_line.product_id', 'in', list(product_ids))]
+ orders = O.get_odoo().search_count('sale.order', odom)
+
+ total_ly = None
+ if compare:
+ lex = list(line_extra or [])
+ if product_ids is not None:
+ lex.append(('product_id', 'in', list(product_ids)))
+ total_ly = O.sum_field('sale.order.line',
+ O.sale_line_domain(compare[0], compare[1], team_id, extra=lex), 'price_subtotal')
+
+ return {
+ 'window': f'{date_from} → {date_to}', 'date_from': date_from, 'date_to': date_to,
+ 'total': total, 'total_ly': total_ly, 'yoy_pct': (P.yoy_pct(total, total_ly) if total_ly is not None else None),
+ 'orders': orders, 'units': units, 'n_customers': len(customers), 'n_skus': len(skus),
+ 'aov': (total / orders) if orders else 0.0,
+ 'customers': customers[:top], 'skus': skus[:top], 'categories': categories,
+ 'all_customers': customers, 'all_skus': skus,
+ }
+
+
+_ORDER_STATE = {'draft': 'Quote', 'sent': 'Quote sent', 'sale': 'Confirmed', 'done': 'Locked',
+ 'cancel': 'Cancelled'}
+_ORDER_INV = {'upselling': 'Upselling', 'invoiced': 'Invoiced', 'to invoice': 'To invoice',
+ 'no': 'Nothing to invoice'}
+
+
+def orders_in_scope(date_from, date_to, team_id=None, line_extra=None, order_extra=None,
+ product_ids=None):
+ """The per-ORDER list behind any sales number over a window — the raw sale.order rows that make
+ up a decomposition, so a chart click drills all the way down to the individual orders (each
+ exportable to Excel). Revenue / units / margin are the IN-SCOPE line contribution (e.g. for a
+ clicked SKU, only that SKU's lines), so Σ(order revenue) ties to the decomposition headline.
+ Returns ALL orders (no silent cap — the export must be complete), newest-revenue first."""
+ ex = list(line_extra or [])
+ if product_ids is not None:
+ ex.append(('product_id', 'in', list(product_ids)))
+ dom = O.sale_line_domain(date_from, date_to, team_id, extra=ex)
+ g = O.read_group('sale.order.line', dom,
+ ['price_subtotal:sum', 'product_uom_qty:sum', 'margin:sum'],
+ ['order_id'], lazy=False)
+ by_id = {}
+ for r in g:
+ oid = O.m2o_id(r.get('order_id'))
+ if not oid:
+ continue
+ by_id[oid] = {'oid': oid, 'order': O.m2o_name(r.get('order_id')),
+ 'revenue': r.get('price_subtotal') or 0.0,
+ 'qty': r.get('product_uom_qty') or 0.0,
+ 'margin': r.get('margin') or 0.0, 'lines': r.get('__count') or 0}
+ if not by_id:
+ return []
+ # one order-level pull for the human columns (date / customer / status)
+ for m in O.search_read('sale.order', [('id', 'in', list(by_id))],
+ ['name', 'date_order', 'partner_id', 'state', 'invoice_status']):
+ e = by_id.get(m['id'])
+ if not e:
+ continue
+ e['order'] = m.get('name') or e['order']
+ e['date'] = (m.get('date_order') or '')[:10]
+ e['customer'] = O.m2o_name(m.get('partner_id'))
+ e['status'] = _ORDER_STATE.get(m.get('state'), m.get('state') or '')
+ e['invoiced'] = _ORDER_INV.get(m.get('invoice_status'), m.get('invoice_status') or '')
+ return sorted(by_id.values(), key=lambda x: -x['revenue'])
+
+
+@lru_cache(maxsize=1)
+def _product_cat():
+ """product_id → main category name (reuses inventory's category resolver).
+ Cached for the process — the category taxonomy is structural and rarely changes; this avoids
+ re-reading the whole product master on every customer drill-down / win-back."""
+ catmap = inv_mod._cat_main_map()
+ prods = O.search_read('product.product', [('default_code', '!=', False)], ['id', 'categ_id'])
+ return {p['id']: (catmap.get(O.m2o_id(p.get('categ_id'))) or '(uncategorized)') for p in prods}
+
+
+def _line_rev_by_product_store(date_from, date_to, team_id):
+ """[(product_id, Σ price_subtotal)] mirroring sale_line_domain (order-side scope join,
+ line-side exclusions, product set)."""
+ import harness.datastore as DS
+ params, w = [], ["o.state IN ('sale','done')", "l.product_id IS NOT NULL"]
+ teams = TEAMS(team_id)
+ w.append("o.team_id IN (" + ",".join("?" * len(teams)) + ")")
+ params += list(teams)
+ w.append("CAST(o.date_order AS TIMESTAMP) >= CAST(? AS TIMESTAMP)")
+ params.append(f"{date_from} 00:00:00")
+ w.append("CAST(o.date_order AS TIMESTAMP) <= CAST(? AS TIMESTAMP)")
+ params.append(f"{date_to} 23:59:59")
+ ex = O.excluded_partner_ids()
+ if ex:
+ w.append("l.order_partner_id NOT IN (" + ",".join("?" * len(ex)) + ")")
+ params += list(ex)
+ if O.doc_mode() == 'invoice':
+ w.append("o.invoice_status = 'invoiced'")
+ return DS.ro_con().execute(
+ "SELECT l.product_id, sum(l.price_subtotal) FROM sale_order_line l "
+ "JOIN sale_order o ON o.id = l.order_id WHERE " + " AND ".join(w) + " GROUP BY 1",
+ params).fetchall()
+
+
+def _cat_rev(date_from, date_to, cat, team_id=None):
+ """Revenue per main category over a window (line-level, brand-aware)."""
+ if USE_STORE:
+ try:
+ out = {}
+ for pid, amt in _line_rev_by_product_store(date_from, date_to, team_id):
+ c = cat.get(pid, '(uncategorized)')
+ out[c] = out.get(c, 0.0) + (amt or 0.0)
+ return out
+ except Exception:
+ pass
+ g = O.read_group('sale.order.line', O.sale_line_domain(date_from, date_to, team_id),
+ ['price_subtotal:sum'], ['product_id'], lazy=False)
+ out = {}
+ for r in g:
+ pid = O.m2o_id(r.get('product_id'))
+ if not pid:
+ continue
+ c = cat.get(pid, '(uncategorized)')
+ out[c] = out.get(c, 0.0) + (r.get('price_subtotal') or 0.0)
+ return out
+
+
+def by_category(t=None, limit=20, team_id=None):
+ """Revenue by main category, YTD vs same-period last year — which categories drive (or
+ drag) the number. Brand-filterable, so you can see e.g. which categories Fisch is losing."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ cat = _product_cat()
+ this = _cat_rev(yf, yt, cat, team_id)
+ last = _cat_rev(lf, lt, cat, team_id)
+ rows = [{'category': c, 'revenue': this.get(c, 0.0), 'revenue_ly': last.get(c, 0.0),
+ 'change': this.get(c, 0.0) - last.get(c, 0.0),
+ 'yoy_pct': P.yoy_pct(this.get(c, 0.0), last.get(c, 0.0))}
+ for c in (set(this) | set(last))]
+ rows.sort(key=lambda x: -x['revenue'])
+ return rows[:limit]
+
+
+def cadence(t=None, team_id=None):
+ """Reorder behaviour over LTM: repeat-purchase rate, avg orders/customer, and the
+ order-frequency distribution. A wholesale-health signal (are customers coming back?)."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ counts = None
+ if USE_STORE:
+ try:
+ counts = [r[1] for r in _order_partner_groups_store(lf, lt, team_id) if r[0]]
+ except Exception:
+ counts = None
+ if counts is None:
+ g = O.read_group('sale.order', order_domain(lf, lt, team_id),
+ ['partner_id'], ['partner_id'], lazy=False)
+ counts = [r.get('__count') or 0 for r in g if r.get('partner_id')]
+ n = len(counts)
+ total_orders = sum(counts)
+ repeat = sum(1 for c in counts if c >= 2)
+ buckets = [('1 order', lambda c: c == 1), ('2-3 orders', lambda c: 2 <= c <= 3),
+ ('4-9 orders', lambda c: 4 <= c <= 9), ('10+ orders', lambda c: c >= 10)]
+ dist = [{'frequency': label, 'customers': sum(1 for c in counts if fn(c)),
+ 'pct': (sum(1 for c in counts if fn(c)) / n * 100) if n else 0.0}
+ for label, fn in buckets]
+ return {
+ 'customers': n,
+ 'total_orders': total_orders,
+ 'avg_orders': (total_orders / n) if n else 0.0,
+ 'repeat_customers': repeat,
+ 'repeat_rate': (repeat / n * 100) if n else 0.0,
+ 'distribution': dist,
+ 'ltm_window': f'{lf} → {lt}',
+ }
+
+
+def concentration(t=None, team_id=None):
+ """Top-N customer share of YTD revenue."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ revs = None
+ if USE_STORE:
+ try:
+ revs = sorted([r[2] or 0.0 for r in _order_partner_groups_store(yf, yt, team_id)
+ if r[0]], reverse=True)
+ except Exception:
+ revs = None
+ if revs is None:
+ g = O.read_group('sale.order', order_domain(yf, yt, team_id),
+ ['amount_untaxed:sum'], ['partner_id'], lazy=False)
+ revs = sorted([r.get('amount_untaxed') or 0.0 for r in g if r.get('partner_id')],
+ reverse=True)
+ total = sum(revs) or 1.0
+ def share(n):
+ return sum(revs[:n]) / total * 100.0
+ return {'n_customers': len(revs), 'total': total,
+ 'top10_pct': share(10), 'top25_pct': share(25),
+ 'top50_pct': share(50), 'top100_pct': share(100)}
+
+
+# ---------------------------------------------------------------- returns (credit notes)
+# Returns = posted customer credit notes (account.move, move_type='out_refund'). They carry a
+# partner and salesperson but sit on the generic 'Sales' team (not Fisch/Royal team 5/6), so
+# returns are reported CONSOLIDATED and sliced by agent (via the customer's res.partner.agent_ids)
+# and by period — never BU-split. amount_untaxed_signed is negative for out_refund; we flip it so
+# a "return" reads as a positive dollar figure everywhere.
+def returns_domain(date_from=None, date_to=None, partner_ids=None):
+ dom = [('move_type', '=', 'out_refund'), ('state', '=', 'posted')]
+ if date_from:
+ dom.append(('invoice_date', '>=', date_from))
+ if date_to:
+ dom.append(('invoice_date', '<=', date_to))
+ ex = O.excluded_partner_ids()
+ if ex:
+ dom.append(('partner_id', 'not in', list(ex)))
+ if partner_ids is not None:
+ dom.append(('partner_id', 'in', list(partner_ids)))
+ return dom
+
+
+def _returns_amt(date_from, date_to, partner_ids=None):
+ """Total returns $ (positive) over a window."""
+ v = O.sum_field('account.move', returns_domain(date_from, date_to, partner_ids), 'amount_untaxed_signed')
+ return -(v or 0.0)
+
+
+def returns_monthly(n=13, t=None, partner_ids=None):
+ """Returns $ per month for the last n months + same month one year earlier (YoY). Shaped like
+ the revenue trend (`revenue`/`revenue_ly` keys) so it renders through the same chart_yoy_bars.
+ ONE month-grouped read over a ~2-year span (was 2n sequential sum queries)."""
+ t = t or P.today()
+ months = P.month_starts(n, t)
+ span_from = f"{int(months[0][0][:4]) - 1:04d}-{months[0][0][5:7]}-01" # 1 year before the first month
+ g = O.read_group('account.move', returns_domain(span_from, t.isoformat(), partner_ids),
+ ['amount_untaxed_signed:sum'], ['invoice_date:month'], lazy=False)
+ mret = {}
+ for r in g:
+ ym = ((r.get('__range') or {}).get('invoice_date:month') or {}).get('from', '')[:7]
+ if ym:
+ mret[ym] = -(r.get('amount_untaxed_signed') or 0.0)
+ rows = []
+ for ym, start, end in months:
+ y, m = int(ym[:4]) - 1, int(ym[5:7])
+ this, last = mret.get(ym, 0.0), mret.get(f'{y:04d}-{m:02d}', 0.0)
+ rows.append({'month': ym, 'start': start, 'end': end,
+ 'revenue': this, 'revenue_ly': last, 'yoy_pct': P.yoy_pct(this, last)})
+ return rows
+
+
+def returns_by_partner(t=None, partner_ids=None):
+ """{partner_id: returns$ YTD} (positive) — the raw per-customer credit-note total. The agent
+ rollup maps these to res.partner.agent_ids in the Customers module."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ g = O.read_group('account.move', returns_domain(yf, yt, partner_ids),
+ ['amount_untaxed_signed:sum'], ['partner_id'], lazy=False)
+ return {O.m2o_id(r.get('partner_id')): -(r.get('amount_untaxed_signed') or 0.0)
+ for r in g if r.get('partner_id')}
+
+
+def returns_headline(t=None, partner_ids=None):
+ """YTD returns $ + YoY + return rate (returns / gross revenue). Consolidated."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ lf, lt = P.ytd_last_year(t)
+ ret = _returns_amt(yf, yt, partner_ids)
+ ret_ly = _returns_amt(lf, lt, partner_ids)
+ gross = _orev(yf, yt, None) if partner_ids is None else O.sum_field(
+ 'sale.order', order_domain(yf, yt, None, partner_ids=partner_ids), 'amount_untaxed')
+ return {'ytd': ret, 'ytd_ly': ret_ly, 'yoy_pct': P.yoy_pct(ret, ret_ly),
+ 'rate_pct': (ret / gross * 100.0) if gross else 0.0}
+
+
+# ---------------------------------------------------------------- VALIDATION
+def validate(t=None, team_id=None):
+ """Reconcile metrics against independent Odoo aggregates. Returns list of checks.
+
+ When team_id is set (a single BU selected) every check runs SCOPED to that BU, so the
+ validation panel never reconciles against — or exposes — the other BU's numbers. The one
+ cross-BU check (#2, Σ teams == total) only makes sense consolidated, so it runs only when
+ team_id is None."""
+ t = t or P.today()
+ yf, yt = P.ytd(t)
+ checks = []
+
+ # 1. Order-level revenue (sale.order) vs line-level revenue (sale.order.line)
+ order_rev = _orev(yf, yt, team_id)
+ line_rev = O.sum_field('sale.order.line', O.sale_line_domain(yf, yt, team_id), 'price_subtotal')
+ gap = order_rev - line_rev
+ checks.append({
+ 'check': 'YTD revenue: order-level == line-level',
+ 'a': round(order_rev, 2), 'b': round(line_rev, 2),
+ 'gap': round(gap, 2),
+ 'ok': abs(gap) <= max(1.0, 0.001 * order_rev)})
+
+ # 2. Sum of per-team revenue == total (consolidated only — cross-BU)
+ if team_id is None:
+ team_sum = sum(_orev(yf, yt, tid) for tid in O.TEAM_IDS)
+ checks.append({
+ 'check': 'YTD revenue: Σ(team) == total',
+ 'a': round(team_sum, 2), 'b': round(order_rev, 2),
+ 'gap': round(team_sum - order_rev, 2),
+ 'ok': abs(team_sum - order_rev) <= 1.0})
+
+ # 3. Sum of per-customer revenue == total
+ cust_sum = sum(c['revenue'] for c in top_customers(t, limit=10**9, team_id=team_id))
+ checks.append({
+ 'check': 'YTD revenue: Σ(customer) == total',
+ 'a': round(cust_sum, 2), 'b': round(order_rev, 2),
+ 'gap': round(cust_sum - order_rev, 2),
+ 'ok': abs(cust_sum - order_rev) <= 1.0})
+
+ # 4. Σ(category revenue) == line-level total (YTD) — SAME-SOURCE on purpose (wave-14 debt
+ # sweep). `by_category` reads the DATASTORE mirror when USE_STORE while `line_rev` above is
+ # LIVE Odoo, so this check used to compare two sources and went red on a pending sync
+ # (a stable +2,499.90 measured twice 75s apart, 2026-08-02 — the same mixed-source
+ # signature as the wave-13 ±$8.5k triple, which healed on resync). The decomposition's
+ # claim — every line lands in exactly one category, none lost, none doubled — must be
+ # judged against the SAME rows the decomposition consumed; order-vs-line freshness is
+ # check 1's job, on one source.
+ cat_sum = sum(c['revenue'] for c in by_category(t, limit=10**9, team_id=team_id))
+ cat_line_total = line_rev
+ if USE_STORE:
+ try:
+ cat_line_total = sum((amt or 0.0) for _pid, amt in
+ _line_rev_by_product_store(yf, yt, team_id))
+ except Exception:
+ pass
+ checks.append({
+ 'check': 'YTD revenue: Σ(category) == line-level total',
+ 'a': round(cat_sum, 2), 'b': round(cat_line_total, 2),
+ 'gap': round(cat_sum - cat_line_total, 2),
+ 'ok': abs(cat_sum - cat_line_total) <= 1.0})
+
+ # 6. Cadence: Σ(frequency-bucket customers) == total LTM customers
+ cad = cadence(t, team_id=team_id)
+ bucket_n = sum(d['customers'] for d in cad['distribution'])
+ checks.append({
+ 'check': 'Cadence: Σ(frequency buckets) == LTM customers',
+ 'a': bucket_n, 'b': cad['customers'],
+ 'gap': bucket_n - cad['customers'],
+ 'ok': bucket_n == cad['customers']})
+
+ # 7. Decompose ties out: the YTD decomposition total == line-level YTD, and its customer / SKU /
+ # category breakdowns each sum back to that total (the drill-any-number drawer is trustworthy).
+ dec = decompose(yf, yt, team_id=team_id)
+ checks.append({
+ 'check': 'Decompose YTD total == line-level revenue',
+ 'a': round(dec['total'], 2), 'b': round(line_rev, 2),
+ 'gap': round(dec['total'] - line_rev, 2),
+ 'ok': abs(dec['total'] - line_rev) <= max(1.0, 0.001 * line_rev)})
+ cust_d = sum(c['revenue'] for c in dec['all_customers'])
+ sku_d = sum(s['revenue'] for s in dec['all_skus'])
+ cat_d = sum(c['revenue'] for c in dec['categories'])
+ checks.append({
+ 'check': 'Decompose: Σ(customers)=Σ(SKUs)=Σ(categories)=total',
+ 'a': round(cust_d, 2), 'b': round(dec['total'], 2),
+ 'gap': round(max(abs(cust_d - dec['total']), abs(sku_d - dec['total']), abs(cat_d - dec['total'])), 2),
+ 'ok': all(abs(x - dec['total']) <= 1.0 for x in (cust_d, sku_d, cat_d))})
+
+ return checks
diff --git a/platform/modules/spend.py b/platform/modules/spend.py
new file mode 100644
index 0000000000000000000000000000000000000000..0569ceb81e5d52a6f9af393720777ca2ba098d02
--- /dev/null
+++ b/platform/modules/spend.py
@@ -0,0 +1,301 @@
+"""Spend & Payables — the expense-waste module (cost-waste brief recs 1/3/4): the first
+systematic analysis of vendor bills on this platform.
+
+ 1. TERMS CAPTURE — per supplier: effective terms (per-bill due-date gap — partner-level terms
+ are sparsely populated) vs actual bill→settlement days (payable full-reconcile counterpart
+ date). Paying EARLY = free cash surrendered (the mirror of the receivables free-credit
+ finding). China/import suppliers are deposit-based — DPO stretch is structurally capped, so
+ the book is SPLIT by supplier country; the verb is pay-to-TERMS, never pay-late.
+ 2. DUPLICATE BILLS — same supplier + same amount (±$1) within 45 days, or same non-empty
+ vendor ref. Classic AP recovery: 0.1-0.5% of spend.
+ 3. SPEND CUBE — NON-product bill lines (Stock Interim / inventory accounts excluded) by
+ GL account × supplier × month: category fragmentation (consolidate + rebid) and
+ MAVERICK % = lines that never touched a PO (no purchase_line_id).
+ 4. FREIGHT RECOVERY — outbound freight PAID (the 'Freight Out' expense account) vs freight
+ BILLED to customers (freight/shipping lines on customer invoices). NAW: distributors
+ recapture only ~70%.
+
+READ-ONLY. Supplier names normalized with a dependency-free suffix-strip (upgrade path:
+RapidFuzz+cleanco per the brief).
+"""
+import re
+import datetime as dt
+
+import core.odoo as O
+import core.periods as P
+
+DUP_WINDOW_DAYS = 45
+EARLY_GRACE_DAYS = 5 # paying ≤5d early is noise, not a finding
+FREIGHT_OUT_PAT = re.compile(r'freight out|freight-out', re.I)
+FREIGHT_BILL_PAT = re.compile(r'freight|shipping|delivery', re.I)
+# product-side interim/inventory accounts excluded from the OPEX cube
+PRODUCT_ACC_PAT = re.compile(r'stock interim|inventory|goods received', re.I)
+
+_SUFFIX = re.compile(r'\b(inc|llc|ltd|corp|corporation|co|company|s\.?a\.?|gmbh)\b\.?', re.I)
+
+
+def _norm_supplier(name):
+ s = _SUFFIX.sub('', str(name or '').upper())
+ return re.sub(r'[^A-Z0-9 ]', '', s).strip() or str(name or '')
+
+
+def _chunk(ids, n=2000):
+ ids = list(ids)
+ for i in range(0, len(ids), n):
+ yield ids[i:i + n]
+
+
+def _bills(lf, lt):
+ return O.search_read('account.move',
+ [('move_type', '=', 'in_invoice'), ('state', '=', 'posted'),
+ ('invoice_date', '>=', lf), ('invoice_date', '<=', lt)],
+ ['partner_id', 'invoice_date', 'invoice_date_due', 'amount_total',
+ 'amount_untaxed', 'ref', 'payment_state', 'name'])
+
+
+def terms_capture(t=None):
+ """Per-supplier payment discipline over the LTM + the duplicate-bill worklist."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ bills = _bills(lf, lt)
+
+ # settlement date per bill: payable line's full-reconcile group, max counterpart date
+ move_ids = [b['id'] for b in bills]
+ pay_lines = []
+ for ch in _chunk(move_ids):
+ pay_lines += O.search_read('account.move.line',
+ [('move_id', 'in', ch),
+ ('account_id.account_type', '=', 'liability_payable'),
+ ('full_reconcile_id', '!=', False)],
+ ['move_id', 'full_reconcile_id'])
+ fr_by_move = {O.m2o_id(l['move_id']): O.m2o_id(l['full_reconcile_id']) for l in pay_lines}
+ settle = {}
+ for ch in _chunk(list(set(fr_by_move.values())), 4000):
+ for l in O.search_read('account.move.line', [('full_reconcile_id', 'in', ch)],
+ ['full_reconcile_id', 'date']):
+ k = O.m2o_id(l['full_reconcile_id'])
+ d = str(l.get('date') or '')[:10]
+ if k and d:
+ settle[k] = max(settle.get(k, ''), d)
+
+ # supplier country for the import/domestic split
+ pids = list({O.m2o_id(b['partner_id']) for b in bills})
+ country = {}
+ for ch in _chunk(pids):
+ for r in O.search_read('res.partner', [('id', 'in', ch)], ['country_id']):
+ country[r['id']] = O.m2o_name(r.get('country_id')) or '(none)'
+
+ per = {}
+ for b in bills:
+ pid = O.m2o_id(b['partner_id'])
+ inv_d = str(b.get('invoice_date') or '')[:10]
+ due_d = str(b.get('invoice_date_due') or '')[:10]
+ if not pid or not inv_d:
+ continue
+ e = per.setdefault(pid, {'pid': pid, 'supplier': O.m2o_name(b['partner_id']),
+ 'country': country.get(pid, '(none)'), 'bills': 0,
+ 'spend': 0.0, 'terms': [], 'actual': [],
+ 'early_cash': 0.0, 'early_bills': 0})
+ e['bills'] += 1
+ e['spend'] += b.get('amount_total') or 0.0
+ terms_days = None
+ if due_d and due_d >= inv_d:
+ terms_days = (dt.date.fromisoformat(due_d) - dt.date.fromisoformat(inv_d)).days
+ e['terms'].append(terms_days)
+ fr = fr_by_move.get(b['id'])
+ pay_d = settle.get(fr, '') if fr else ''
+ if pay_d and pay_d >= inv_d:
+ actual = (dt.date.fromisoformat(pay_d) - dt.date.fromisoformat(inv_d)).days
+ e['actual'].append(actual)
+ if terms_days is not None and actual < terms_days - EARLY_GRACE_DAYS:
+ early = terms_days - actual
+ e['early_cash'] += early / 365.0 * (b.get('amount_total') or 0.0)
+ e['early_bills'] += 1
+
+ def _med(v):
+ v = sorted(v)
+ return v[len(v) // 2] if v else None
+ rows = []
+ for e in per.values():
+ seg = ('(country unset)' if e['country'] == '(none)'
+ else 'import' if e['country'] not in ('United States', 'Canada')
+ else 'domestic')
+ rows.append({'pid': e['pid'], 'supplier': e['supplier'], 'country': e['country'],
+ 'segment': seg,
+ 'bills': e['bills'], 'spend': e['spend'],
+ 'terms_days': _med(e['terms']), 'actual_days': _med(e['actual']),
+ 'early_bills': e['early_bills'], 'early_cash': e['early_cash']})
+ rows.sort(key=lambda x: -x['early_cash'])
+
+ # duplicate-bill candidates
+ by_partner = {}
+ for b in bills:
+ by_partner.setdefault(O.m2o_id(b['partner_id']), []).append(b)
+ dups = []
+ for pid, bs in by_partner.items():
+ bs = sorted(bs, key=lambda x: str(x.get('invoice_date') or ''))
+ for i, a in enumerate(bs):
+ for c in bs[i + 1:]:
+ da = str(a.get('invoice_date') or '')[:10]
+ dc = str(c.get('invoice_date') or '')[:10]
+ if not da or not dc:
+ continue
+ gap = (dt.date.fromisoformat(dc) - dt.date.fromisoformat(da)).days
+ if gap > DUP_WINDOW_DAYS:
+ break
+ amt_a, amt_c = a.get('amount_total') or 0.0, c.get('amount_total') or 0.0
+ same_ref = (a.get('ref') and a.get('ref') == c.get('ref'))
+ # same vendor ref = strong signal at any gap; without a ref, only a same-amount
+ # bill within 7 days counts (monthly recurring bills — rent, loans, standing
+ # POs — land ~28-31 days apart and are NOT duplicates)
+ if abs(amt_a - amt_c) <= 1.0 and amt_a > 100 and (same_ref or gap <= 7):
+ dups.append({'supplier': O.m2o_name(a['partner_id']),
+ 'bill_a': a['name'], 'bill_b': c['name'],
+ 'date_a': da, 'date_b': dc, 'amount': amt_a,
+ 'same_ref': 'yes' if same_ref else '',
+ 'ref': str(a.get('ref') or '')[:24]})
+ dups.sort(key=lambda x: -x['amount'])
+ return {'rows': rows, 'dups': dups,
+ 'n_bills': len(bills), 'spend_total': sum(b.get('amount_total') or 0 for b in bills),
+ 'early_cash_total': sum(r['early_cash'] for r in rows),
+ 'dup_exposure': sum(d['amount'] for d in dups),
+ 'window': (lf, lt)}
+
+
+def _bill_lines(lf, lt):
+ lines = []
+ # account.move.line.display_type is a SELECTION ('product'/'tax'/'payment_term'/…),
+ # not a boolean — '= False' matches nothing (found live 2026-07-05)
+ got = O.search_read('account.move.line',
+ [('move_id.move_type', '=', 'in_invoice'),
+ ('parent_state', '=', 'posted'),
+ ('move_id.invoice_date', '>=', lf),
+ ('move_id.invoice_date', '<=', lt),
+ ('display_type', '=', 'product'),
+ ('price_subtotal', '!=', 0)],
+ ['partner_id', 'account_id', 'price_subtotal', 'purchase_line_id',
+ 'product_id', 'date'])
+ acc_ids = list({O.m2o_id(l['account_id']) for l in got if l.get('account_id')})
+ atype = {}
+ for ch in _chunk(acc_ids):
+ for a in O.search_read('account.account', [('id', 'in', ch)], ['account_type']):
+ atype[a['id']] = a.get('account_type') or ''
+ for l in got:
+ l['account'] = O.m2o_name(l.get('account_id'))
+ l['atype'] = atype.get(O.m2o_id(l.get('account_id')), '')
+ lines.append(l)
+ return lines
+
+
+def spend_cube(t=None):
+ """OPEX spend by GL category × supplier(normalized), with fragmentation and no-PO %.
+ Scope = expense-type accounts ONLY (account_type 'expense'/'expense_depreciation'):
+ inventory-interim (asset) and loan/advance (liability) bill lines are excluded by TYPE,
+ and COGS (expense_direct_cost) belongs to the product side. Note: this company runs no
+ PO process for indirect spend, so no-PO% ≈ 100% by construction — it becomes a signal
+ only if POs are ever adopted for indirect purchases."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ lines = [l for l in _bill_lines(lf, lt)
+ if l.get('atype') in ('expense', 'expense_depreciation')]
+ cats, sup_cat = {}, {}
+ for l in lines:
+ acc = l['account']
+ amt = l.get('price_subtotal') or 0.0
+ sup = _norm_supplier(O.m2o_name(l.get('partner_id')))
+ c = cats.setdefault(acc, {'category': acc, 'spend': 0.0, 'lines': 0,
+ 'maverick': 0.0, 'suppliers': set()})
+ c['spend'] += amt
+ c['lines'] += 1
+ c['suppliers'].add(sup)
+ if not l.get('purchase_line_id'):
+ c['maverick'] += amt
+ k = (acc, sup)
+ sup_cat[k] = sup_cat.get(k, 0.0) + amt
+ rows = []
+ for c in cats.values():
+ n_sup = len(c['suppliers'])
+ top = sorted(((s, v) for (a, s), v in sup_cat.items() if a == c['category']),
+ key=lambda kv: -kv[1])
+ rows.append({'category': c['category'], 'spend': c['spend'], 'lines': c['lines'],
+ 'n_suppliers': n_sup,
+ 'maverick_pct': (c['maverick'] / c['spend'] * 100) if c['spend'] else 0.0,
+ 'top_supplier': top[0][0][:30] if top else '',
+ 'top_share_pct': (top[0][1] / c['spend'] * 100) if (top and c['spend']) else 0.0,
+ 'consolidate': ('yes' if n_sup >= 3 and c['spend'] > 10000 else '')})
+ rows.sort(key=lambda x: -x['spend'])
+ return {'rows': rows,
+ 'spend_total': sum(r['spend'] for r in rows),
+ 'maverick_total': sum(r['spend'] * r['maverick_pct'] / 100 for r in rows),
+ 'frag_categories': [r for r in rows if r['consolidate']],
+ 'window': (lf, lt)}
+
+
+def freight_recovery(t=None):
+ """Outbound freight paid (the 'Freight Out' expense account) vs freight billed to
+ customers (freight/shipping/delivery lines on out_invoices), monthly + the headline
+ recovery %. Company-level."""
+ t = t or P.today()
+ lf, lt = P.ltm(t)
+ paid_lines = [l for l in _bill_lines(lf, lt)
+ if l['account'] and FREIGHT_OUT_PAT.search(l['account'])]
+ paid_m = {}
+ for l in paid_lines:
+ m = str(l.get('date') or '')[:7]
+ paid_m[m] = paid_m.get(m, 0.0) + (l.get('price_subtotal') or 0.0)
+
+ billed = O.search_read('account.move.line',
+ [('move_id.move_type', '=', 'out_invoice'),
+ ('parent_state', '=', 'posted'),
+ ('move_id.invoice_date', '>=', lf),
+ ('move_id.invoice_date', '<=', lt),
+ ('display_type', '=', 'product')],
+ ['account_id', 'product_id', 'price_subtotal', 'date',
+ 'partner_id'])
+ billed_lines = [l for l in billed
+ if FREIGHT_BILL_PAT.search(O.m2o_name(l.get('product_id')) or '')
+ or FREIGHT_BILL_PAT.search(O.m2o_name(l.get('account_id')) or '')]
+ billed_m, billed_cust = {}, {}
+ for l in billed_lines:
+ m = str(l.get('date') or '')[:7]
+ amt = l.get('price_subtotal') or 0.0
+ billed_m[m] = billed_m.get(m, 0.0) + amt
+ pid = O.m2o_id(l.get('partner_id'))
+ if pid:
+ billed_cust[pid] = billed_cust.get(pid, 0.0) + amt
+ months = sorted(set(paid_m) | set(billed_m))
+ monthly = [{'month': m, 'paid': paid_m.get(m, 0.0), 'billed': billed_m.get(m, 0.0)}
+ for m in months]
+ paid_total = sum(paid_m.values())
+ billed_total = sum(billed_m.values())
+ return {'monthly': monthly, 'paid_total': paid_total, 'billed_total': billed_total,
+ 'recovery_pct': (billed_total / paid_total * 100) if paid_total else None,
+ 'n_billed_customers': len(billed_cust),
+ 'window': (lf, lt)}
+
+
+def validate(t=None, team_id=None, pre=None):
+ """(1) bill headline ties the server sum over the same domain; (2) the cube total +
+ excluded product-account lines re-adds to the full bill-line total (nothing dropped
+ silently)."""
+ t = t or P.today()
+ tc = pre or terms_capture(t)
+ lf, lt = tc['window']
+ srv = O.sum_field('account.move',
+ [('move_type', '=', 'in_invoice'), ('state', '=', 'posted'),
+ ('invoice_date', '>=', lf), ('invoice_date', '<=', lt)],
+ 'amount_total')
+ a = tc['spend_total']
+ checks = [{'check': 'vendor-bill spend — client Σ == server Σ',
+ 'a': round(a, 2), 'b': round(srv, 2), 'gap': round(a - srv, 2),
+ 'ok': abs(a - srv) <= max(1.0, srv * 0.001)}]
+ all_lines = _bill_lines(lf, lt)
+ full = sum(l.get('price_subtotal') or 0 for l in all_lines)
+ cube = spend_cube(t)
+ excluded = sum(l.get('price_subtotal') or 0 for l in all_lines
+ if l.get('atype') not in ('expense', 'expense_depreciation'))
+ lhs = cube['spend_total'] + excluded
+ checks.append({'check': 'opex cube + non-expense-type lines == all bill lines',
+ 'a': round(lhs, 2), 'b': round(full, 2), 'gap': round(lhs - full, 2),
+ 'ok': abs(lhs - full) < 1.0})
+ return checks
\ No newline at end of file
diff --git a/platform/modules/tasks.py b/platform/modules/tasks.py
new file mode 100644
index 0000000000000000000000000000000000000000..90e60338597af63414d9e47e940518ca69d0b6ec
--- /dev/null
+++ b/platform/modules/tasks.py
@@ -0,0 +1,213 @@
+"""Store-backed task / worklist lifecycle — the writable PROCESS layer over the read-only ERP
+(the Palantir split: subject layer = Odoo, read-only; process layer = this, in the HF store).
+
+Store key 'tasks': {"seq": int, "items": {id: task}}. A task:
+ id 't' — stable
+ title verb-first next action ("Call Smith Floral about reorder")
+ detail one-line evidence/why (frozen at flag time for rule tasks)
+ entity {'kind': customer|sku|agent|account, 'id': …, 'label': …} | None
+ owner_user username in the users registry
+ due 'YYYY-MM-DD' | None
+ state open | done | snoozed | dismissed
+ source 'user' | 'rule:'
+ cond_key rule tasks: fingerprint of the flagging condition — a dismissed task is NOT
+ re-created until the condition RESETS (cond_key changes). The anti-fatigue rule.
+ dismiss_reason enumerated (required on dismiss); reviewed to tune/kill rules
+ outcome 'self-resolved' when a rule flag cleared on its own (auto-closed)
+ created_by / created_at / status_changed / snooze_until / history (append-only)
+
+All mutations go through store.update (strict read-modify-write — never get()+put()).
+"""
+import datetime as dt
+
+import core.store as store
+
+KEY = 'tasks'
+DISMISS_REASONS = ['Not relevant', 'Already handled', 'Data is wrong', 'Duplicate', 'Other']
+STATES = ('open', 'done', 'snoozed', 'dismissed')
+
+
+def _now():
+ return dt.datetime.now().strftime('%Y-%m-%d %H:%M')
+
+
+def _today():
+ return dt.date.today().isoformat()
+
+
+def _entity_key(entity):
+ if not entity:
+ return None
+ return f"{entity.get('kind')}:{entity.get('id')}"
+
+
+def all_tasks():
+ d = store.get(KEY)
+ return list((d.get('items') or {}).values())
+
+
+def effective_state(t, today=None):
+ """Snoozed past its wake date reads as open (Linear semantics — wake early on due)."""
+ s = t.get('state', 'open')
+ if s == 'snoozed' and (t.get('snooze_until') or '') <= (today or _today()):
+ return 'open'
+ return s
+
+
+def for_owner(owner=None, states=('open',)):
+ """Open queue for a user (None = everyone), due-date order, snooze-awakened."""
+ today = _today()
+ rows = [t for t in all_tasks()
+ if (owner is None or t.get('owner_user') == owner)
+ and effective_state(t, today) in states]
+ return sorted(rows, key=lambda t: (t.get('due') or '9999-12-31', t.get('id', '')))
+
+
+def counts_by_user():
+ """{user: {'open': n, 'overdue': n, 'stale7': n}} — feeds the owner rollup + digests."""
+ today = _today()
+ week_ago = (dt.date.today() - dt.timedelta(days=7)).isoformat()
+ out = {}
+ for t in all_tasks():
+ if effective_state(t, today) != 'open':
+ continue
+ u = t.get('owner_user') or '—'
+ rec = out.setdefault(u, {'open': 0, 'overdue': 0, 'stale7': 0})
+ rec['open'] += 1
+ if (t.get('due') or '9999') < today:
+ rec['overdue'] += 1
+ if (t.get('status_changed') or t.get('created_at') or '')[:10] <= week_ago:
+ rec['stale7'] += 1
+ return out
+
+
+def create(title, owner_user, created_by, detail='', entity=None, due=None,
+ source='user', cond_key=None):
+ """Create one task (human producer). Returns the new task id."""
+ created = {}
+
+ def _add(d):
+ d.setdefault('seq', 0)
+ d.setdefault('items', {})
+ d['seq'] += 1
+ tid = f"t{d['seq']}"
+ d['items'][tid] = {
+ 'id': tid, 'title': str(title).strip(), 'detail': str(detail or '').strip(),
+ 'entity': entity or None, 'owner_user': owner_user, 'due': due,
+ 'state': 'open', 'source': source, 'cond_key': cond_key,
+ 'dismiss_reason': None, 'outcome': None,
+ 'created_by': created_by, 'created_at': _now(), 'status_changed': _now(),
+ 'snooze_until': None,
+ 'history': [{'at': _now(), 'by': created_by, 'event': 'created'}],
+ }
+ created['id'] = tid
+ return d
+ store.update(KEY, _add)
+ return created.get('id')
+
+
+def set_state(tid, state, user, dismiss_reason=None, snooze_until=None):
+ """Move a task through its lifecycle. Dismiss REQUIRES an enumerated reason."""
+ if state not in STATES:
+ raise ValueError(f'bad state {state}')
+ if state == 'dismissed' and not dismiss_reason:
+ raise ValueError('dismiss requires a reason')
+
+ def _set(d):
+ t = (d.get('items') or {}).get(tid)
+ if not t:
+ return d
+ t['state'] = state
+ t['status_changed'] = _now()
+ if state == 'dismissed':
+ t['dismiss_reason'] = dismiss_reason
+ if state == 'snoozed':
+ t['snooze_until'] = snooze_until
+ t.setdefault('history', []).append(
+ {'at': _now(), 'by': user, 'event': state,
+ **({'reason': dismiss_reason} if dismiss_reason else {}),
+ **({'until': snooze_until} if snooze_until else {})})
+ return d
+ store.update(KEY, _set)
+
+
+def sync_rule_tasks(rule_id, flags, default_owner=None):
+ """Rule producer (the nightly job): reconcile the store against the CURRENT flag set.
+
+ flags: [{entity, title, detail, owner_user?, due?, cond_key}] — cond_key fingerprints the
+ condition (e.g. bucket/threshold hit), so:
+ - open/snoozed task for the same (rule, entity): refresh detail (evidence stays current);
+ - done/dismissed task with the SAME cond_key: skip (never re-nag until the condition resets);
+ - cond_key changed: create a NEW task (the condition reset and re-fired);
+ - open rule task whose entity no longer flags: auto-close as self-resolved (the
+ stale-list/paid-invoice trust-killer).
+ One store commit for the whole reconcile.
+ """
+ src = f'rule:{rule_id}'
+
+ def _sync(d):
+ d.setdefault('seq', 0)
+ d.setdefault('items', {})
+ items = d['items']
+ by_entity = {}
+ for t in items.values():
+ if t.get('source') == src and t.get('entity'):
+ by_entity.setdefault(_entity_key(t['entity']), []).append(t)
+ seen = set()
+ for f in flags:
+ ek = _entity_key(f.get('entity'))
+ if not ek:
+ continue
+ seen.add(ek)
+ existing = sorted(by_entity.get(ek, []), key=lambda t: t['id'])
+ live = [t for t in existing if t.get('state') in ('open', 'snoozed')]
+ if live:
+ live[-1]['detail'] = f.get('detail', live[-1].get('detail'))
+ live[-1]['cond_key'] = f.get('cond_key', live[-1].get('cond_key'))
+ continue
+ closed_same = [t for t in existing
+ if t.get('cond_key') and t.get('cond_key') == f.get('cond_key')]
+ if closed_same:
+ continue # dismissed/done and unchanged — stay quiet
+ d['seq'] += 1
+ tid = f"t{d['seq']}"
+ items[tid] = {
+ 'id': tid, 'title': f.get('title', rule_id), 'detail': f.get('detail', ''),
+ 'entity': f.get('entity'), 'owner_user': f.get('owner_user') or default_owner,
+ 'due': f.get('due'), 'state': 'open', 'source': src,
+ 'cond_key': f.get('cond_key'), 'dismiss_reason': None, 'outcome': None,
+ 'created_by': 'system', 'created_at': _now(), 'status_changed': _now(),
+ 'snooze_until': None,
+ 'history': [{'at': _now(), 'by': 'system', 'event': 'created'}],
+ }
+ for ek, ts in by_entity.items():
+ if ek in seen:
+ continue
+ for t in ts:
+ if t.get('state') in ('open', 'snoozed'):
+ t['state'] = 'done'
+ t['outcome'] = 'self-resolved'
+ t['status_changed'] = _now()
+ t.setdefault('history', []).append(
+ {'at': _now(), 'by': 'system', 'event': 'self-resolved'})
+ return d
+ store.update(KEY, _sync)
+
+
+def rule_health():
+ """fired / actioned(done by a person) / dismissed / self-resolved per rule — the noise budget.
+ <20% actioned = the rule is noise: tighten or kill (SRE actionability test)."""
+ out = {}
+ for t in all_tasks():
+ src = t.get('source') or ''
+ if not src.startswith('rule:'):
+ continue
+ r = out.setdefault(src[5:], {'fired': 0, 'done': 0, 'dismissed': 0, 'self_resolved': 0})
+ r['fired'] += 1
+ if t.get('outcome') == 'self-resolved':
+ r['self_resolved'] += 1
+ elif t.get('state') == 'done':
+ r['done'] += 1
+ elif t.get('state') == 'dismissed':
+ r['dismissed'] += 1
+ return out
diff --git a/platform/modules/vendor.py b/platform/modules/vendor.py
new file mode 100644
index 0000000000000000000000000000000000000000..9469417e9fc9f1efc37a67383fa14a13ae5f3b6f
--- /dev/null
+++ b/platform/modules/vendor.py
@@ -0,0 +1,43 @@
+"""Vendor module — per-vendor rollup + the multiple-vendor / cheapest-price view.
+
+PURE: it takes the procurement recs (which already merge the curated supplier map + live Odoo
+demand/stock + Odoo's alternative vendors via product.supplierinfo) and groups them by vendor, so
+there is NO extra Odoo round-trip — the Procurement page and this page share one cached pull. Vendor
+master-data edits (country / lead) persist through the procurement overrides store, applied to every
+SKU of that vendor (the UI does the bulk write). READ-ONLY on Odoo.
+"""
+
+
+def rollup(recs):
+ """[{vendor, country, lead, n_skus, n_buy, demand_units, buy_value, lines}], by SKU count desc."""
+ out = {}
+ for r in recs:
+ v = r.get('vendor') or '(no supplier)'
+ g = out.setdefault(v, {'vendor': v, 'country': r.get('country', ''), 'lead': r.get('lead', 0),
+ 'n_skus': 0, 'n_buy': 0, 'demand_units': 0.0, 'buy_value': 0.0, 'lines': []})
+ g['n_skus'] += 1
+ if r.get('buy'):
+ g['n_buy'] += 1
+ g['demand_units'] += (r.get('demand_8m') or 0)
+ g['buy_value'] += (r.get('reorder_trend') or 0) * (r.get('unit_cost') or 0)
+ g['lines'].append(r)
+ if not g['country'] and r.get('country'):
+ g['country'] = r['country']
+ if not g['lead'] and r.get('lead'):
+ g['lead'] = r['lead']
+ return sorted(out.values(), key=lambda x: (-x['n_skus'], x['vendor'] or '~'))
+
+
+def multi_vendor(recs):
+ """SKUs Odoo lists with >1 vendor — current vendor/cost vs the cheapest alternative (price-shop)."""
+ out = []
+ for r in recs:
+ if (r.get('n_vendors') or 0) <= 1:
+ continue
+ cur = r.get('unit_cost') or 0
+ cheapest = r.get('cheapest_price')
+ cheaper = bool(cheapest is not None and cur > 0 and cheapest < cur - 1e-9)
+ out.append({**r, 'current_cost': cur,
+ 'savings': (cur - cheapest) if cheaper else 0.0, 'cheaper': cheaper})
+ out.sort(key=lambda r: -r['savings'])
+ return out
diff --git a/platform/modules/warehouse.py b/platform/modules/warehouse.py
new file mode 100644
index 0000000000000000000000000000000000000000..be73f2dff793f3e77cc281d21d23759e19b9b3e4
--- /dev/null
+++ b/platform/modules/warehouse.py
@@ -0,0 +1,936 @@
+"""Warehouse module — SKU movement & warehouse efficiency, live from stock.picking / stock.move
+(read-only). Physical operations are consolidated (one network of warehouses, not BU-tagged).
+
+What the data supports (probed 2026-07-05): date_done is fully populated on done pickings, the
+Ditmas Ave outbound runs an explicit Pick -> Pack -> Ship funnel (separate picking types), ~25k
+pickings and ~221k moves a year, and inventory-adjustment moves (~10k/yr) give a shrinkage /
+correction signal. Cycle times, on-time rates, throughput, backlog age and adjustment dollars are
+all derivable; anything scanner-level (walk paths, per-picker rates) is NOT in the data and is
+not claimed.
+
+All metrics are computed from ONE 12-month done-picking pull + small side pulls; validate()
+reconciles row-built aggregates to independent read_group/search_count paths.
+"""
+import sys
+import datetime as dt
+from pathlib import Path
+sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
+import core.odoo as O
+import core.periods as P
+
+ONTIME_GRACE_DAYS = 1 # shipped within scheduled + 1 day counts as on time
+# Main-warehouse funnel + Putaway (the dock-to-stock proxy: receipts sit until put away).
+_STAGE_NAMES = {'Pick': 'Pick', 'Pack': 'Pack', 'Delivery Orders': 'Ship', 'Putaway': 'Putaway'}
+
+
+def _dtp(v):
+ try:
+ return dt.datetime.fromisoformat(str(v)[:19])
+ except Exception:
+ return None
+
+
+def _types():
+ """picking_type_id -> {code, wh, name, stage} (stage set for the main-warehouse funnel)."""
+ out = {}
+ for t in O.search_read('stock.picking.type', [], ['name', 'code', 'warehouse_id']):
+ wh = O.m2o_name(t.get('warehouse_id')) or ''
+ stage = _STAGE_NAMES.get(t['name']) if 'Ditmas' in wh else None
+ out[t['id']] = {'code': t['code'], 'wh': wh, 'name': t['name'], 'stage': stage}
+ return out
+
+
+def _done_pickings(y1):
+ return O.search_read('stock.picking',
+ [('state', '=', 'done'), ('date_done', '>=', y1)],
+ ['picking_type_id', 'scheduled_date', 'date_done', 'date',
+ 'backorder_id'])
+
+
+def _open_pickings():
+ return O.search_read('stock.picking',
+ [('state', 'in', ['confirmed', 'waiting', 'assigned'])],
+ ['picking_type_id', 'scheduled_date', 'date', 'origin', 'partner_id',
+ 'state'])
+
+
+def _median(v):
+ if not v:
+ return None
+ s = sorted(v)
+ n = len(s)
+ return s[n // 2] if n % 2 else (s[n // 2 - 1] + s[n // 2]) / 2
+
+
+def _p90(v):
+ if not v:
+ return None
+ s = sorted(v)
+ return s[min(len(s) - 1, int(len(s) * 0.9))]
+
+
+def _iso_week(d):
+ y, w, _ = d.isocalendar()
+ return f'{y}-W{w:02d}', w
+
+
+def _xmr(series):
+ """Wheeler XmR (individuals) limits + the THREE detection rules — no more (extra rules =
+ alarm fatigue; see the warehouse research brief). series = [(label, value)] in time order.
+ Ported logic cribbed from xmrit (MIT); ~30 lines, no dependency."""
+ vals = [v for _, v in series]
+ if len(vals) < 8:
+ return {'center': None, 'unpl': None, 'lnpl': None, 'points': [
+ {'label': l, 'value': v, 'signal': ''} for l, v in series]}
+ center = sum(vals) / len(vals)
+ mrs = [abs(vals[i] - vals[i - 1]) for i in range(1, len(vals))]
+ mr_bar = sum(mrs) / len(mrs) if mrs else 0.0
+ unpl = min(100.0, center + 2.66 * mr_bar)
+ lnpl = max(0.0, center - 2.66 * mr_bar)
+ pts = []
+ for i, (l, v) in enumerate(series):
+ sig = ''
+ if v > unpl or v < lnpl:
+ sig = 'outside limits' # rule 1
+ if not sig and i >= 7 and all((x - center) > 0 for _, x in series[i - 7:i + 1]):
+ sig = 'sustained shift (8 above center)' # rule 2
+ if not sig and i >= 7 and all((x - center) < 0 for _, x in series[i - 7:i + 1]):
+ sig = 'sustained shift (8 below center)'
+ if not sig and i >= 3:
+ last4 = [x for _, x in series[i - 3:i + 1]]
+ near = sum(1 for x in last4
+ if abs(x - center) > 0.5 * ((unpl - center) if x >= center else (center - lnpl)))
+ if near >= 3:
+ sig = 'moderate shift emerging' # rule 3
+ pts.append({'label': l, 'value': v, 'signal': sig})
+ return {'center': center, 'unpl': unpl, 'lnpl': lnpl, 'points': pts}
+
+
+def build(t=None):
+ """The full warehouse-efficiency bundle from one done-picking pull + side pulls.
+ Pull window ~14 months so the weekly volume series has a same-week-last-year comparison."""
+ t = t or P.today()
+ y1 = (t - dt.timedelta(days=430)).isoformat()
+ types = _types()
+ done = _done_pickings(y1)
+ open_ = _open_pickings()
+ _y365 = (t - dt.timedelta(days=365)).isoformat()
+
+ # ---- monthly throughput by flow (12m) ----------------------------------
+ monthly = {}
+ for r in done:
+ if str(r['date_done'])[:10] < _y365:
+ continue
+ ti = types.get(O.m2o_id(r['picking_type_id']), {})
+ code = ti.get('code') or '?'
+ m = str(r['date_done'])[:7]
+ key = {'incoming': 'Receipts', 'outgoing': 'Deliveries',
+ 'internal': 'Internal'}.get(code, code)
+ if ti.get('name') == 'Returns':
+ key = 'Returns'
+ e = monthly.setdefault(m, {'month': m, 'Receipts': 0, 'Deliveries': 0,
+ 'Internal': 0, 'Returns': 0})
+ e[key] = e.get(key, 0) + 1
+ monthly_rows = sorted(monthly.values(), key=lambda x: x['month'])
+
+ # ---- outbound funnel cycle times (main warehouse Pick -> Pack -> Ship, + Putaway) --------
+ stages, stage_m = {}, {}
+ for r in done:
+ if str(r['date_done'])[:10] < _y365:
+ continue
+ ti = types.get(O.m2o_id(r['picking_type_id']), {})
+ if not ti.get('stage'):
+ continue
+ cr, dd, sch = _dtp(r['date']), _dtp(r['date_done']), _dtp(r['scheduled_date'])
+ if not (cr and dd):
+ continue
+ cyc = (dd - cr).total_seconds() / 86400
+ s = stages.setdefault(ti['stage'], {'stage': ti['stage'], 'n': 0,
+ 'cycle': [], 'vs_sched': []})
+ s['n'] += 1
+ s['cycle'].append(cyc)
+ if sch:
+ s['vs_sched'].append((dd - sch).total_seconds() / 86400)
+ stage_m.setdefault((ti['stage'], str(r['date_done'])[:7]), []).append(cyc)
+ stage_rows = []
+ for name in ('Pick', 'Pack', 'Ship', 'Putaway'):
+ s = stages.get(name)
+ if s:
+ stage_rows.append({'stage': name, 'done_12m': s['n'],
+ 'median_days': round(_median(s['cycle']) or 0, 2),
+ 'p90_days': round(_p90(s['cycle']) or 0, 2),
+ 'vs_sched_median': round(_median(s['vs_sched']) or 0, 2)})
+ stage_monthly = sorted(
+ ({'stage': k[0], 'month': k[1], 'median_days': round(_median(v) or 0, 2),
+ 'p90_days': round(_p90(v) or 0, 2), 'n': len(v)} for k, v in stage_m.items()),
+ key=lambda x: (x['month'], x['stage']))
+
+ # ---- on-time ship (outgoing): monthly + WEEKLY (XmR grain) + clean-order --
+ y365 = (t - dt.timedelta(days=365)).isoformat()
+ d90 = (t - dt.timedelta(days=90)).isoformat()
+ ontime_m, weekly, clean_m, wk_vol = {}, {}, {}, {}
+ ship_cycles = []
+ clean90 = {'n': 0, 'clean': 0, 'late': 0, 'bo': 0}
+ for r in done:
+ ti = types.get(O.m2o_id(r['picking_type_id']), {})
+ if ti.get('code') != 'outgoing':
+ continue
+ dd, sch, cr = _dtp(r['date_done']), _dtp(r['scheduled_date']), _dtp(r['date'])
+ if not dd:
+ continue
+ dstr = str(r['date_done'])[:10]
+ wk_key, wk_no = _iso_week(dd.date())
+ wk_vol.setdefault(wk_key, {'week': wk_key, 'wk_no': wk_no, 'year': dd.year, 'n': 0})
+ wk_vol[wk_key]['n'] += 1
+ late = not (sch and (dd - sch).total_seconds() / 86400 <= ONTIME_GRACE_DAYS)
+ bo = bool(r.get('backorder_id'))
+ if dstr < y365:
+ continue # older-than-12m rows only feed the LY weekly compare
+ m = dstr[:7]
+ e = ontime_m.setdefault(m, {'month': m, 'shipped': 0, 'on_time': 0,
+ 'backorders': 0, 'cycle': []})
+ e['shipped'] += 1
+ if not late:
+ e['on_time'] += 1
+ if bo:
+ e['backorders'] += 1
+ if cr:
+ c = (dd - cr).total_seconds() / 86400
+ e['cycle'].append(c)
+ ship_cycles.append(c)
+ w = weekly.setdefault(wk_key, {'week': wk_key, 'n': 0, 'on_time': 0})
+ w['n'] += 1
+ if not late:
+ w['on_time'] += 1
+ cm = clean_m.setdefault(m, {'month': m, 'On time & complete': 0, 'Late only': 0,
+ 'Backordered only': 0, 'Late + backordered': 0})
+ cat = ('On time & complete' if not late and not bo else
+ 'Late only' if late and not bo else
+ 'Backordered only' if bo and not late else 'Late + backordered')
+ cm[cat] += 1
+ if dstr >= d90:
+ clean90['n'] += 1
+ clean90['clean'] += (0 if (late or bo) else 1)
+ clean90['late'] += (1 if late else 0)
+ clean90['bo'] += (1 if bo else 0)
+ ontime_rows = []
+ for m in sorted(ontime_m):
+ e = ontime_m[m]
+ ontime_rows.append({'month': m, 'shipped': e['shipped'],
+ 'on_time_pct': e['on_time'] / e['shipped'] * 100 if e['shipped'] else None,
+ 'median_days': round(_median(e['cycle']) or 0, 2),
+ 'backorder_pct': e['backorders'] / e['shipped'] * 100 if e['shipped'] else None})
+ n_out = sum(e['shipped'] for e in ontime_m.values())
+ n_ontime = sum(e['on_time'] for e in ontime_m.values())
+
+ # weekly on-time series (complete weeks only — drop the in-progress week) -> XmR
+ cur_wk = _iso_week(t)[0]
+ wk_series = [(k, weekly[k]['on_time'] / weekly[k]['n'] * 100)
+ for k in sorted(weekly) if k != cur_wk and weekly[k]['n'] >= 5]
+ xmr = _xmr(wk_series[-52:])
+
+ # weekly volume: last 13 complete weeks vs same ISO week last year
+ vol_rows = []
+ for k in sorted(wk_vol):
+ v = wk_vol[k]
+ if k == cur_wk or v['year'] < t.year - 1:
+ continue
+ if v['year'] == t.year:
+ ly = next((x for x in wk_vol.values()
+ if x['wk_no'] == v['wk_no'] and x['year'] == v['year'] - 1), None)
+ vol_rows.append({'week': f"W{v['wk_no']:02d}", 'shipped': v['n'],
+ 'shipped_ly': ly['n'] if ly else 0})
+ vol_rows = vol_rows[-13:]
+ clean_rows = [clean_m[m] for m in sorted(clean_m)]
+ clean_pct_90d = (clean90['clean'] / clean90['n'] * 100) if clean90['n'] else None
+
+ # ---- backlog (open pickings, oldest first) + expedite list --------------
+ today = dt.datetime.combine(t, dt.time())
+ ship_med = _median([s for s in ship_cycles]) or 1.0
+ bl, expedite = {}, []
+ for r in open_:
+ ti = types.get(O.m2o_id(r['picking_type_id']), {})
+ label = f"{ti.get('wh', '?')}: {ti.get('name', '?')}"
+ sch = _dtp(r['scheduled_date']) or _dtp(r['date'])
+ age = (today - sch).days if sch else None
+ e = bl.setdefault(label, {'queue': label, 'open': 0, 'overdue': 0, 'oldest_days': 0})
+ e['open'] += 1
+ if age is not None and age > 0:
+ e['overdue'] += 1
+ e['oldest_days'] = max(e['oldest_days'], age)
+ # Expedite: outgoing, past scheduled+grace, waited longer than the normal ship cycle.
+ # 'waiting' state = unreserved stock -> that's a PROCUREMENT gap, routed separately
+ # (don't tell the warehouse to expedite what it cannot pick).
+ if (ti.get('code') == 'outgoing' and age is not None
+ and age > ONTIME_GRACE_DAYS and age > ship_med):
+ expedite.append({'order': r.get('origin') or '', 'customer': O.m2o_name(r.get('partner_id')),
+ 'queue': label, 'scheduled': str(r.get('scheduled_date') or '')[:10],
+ 'days_late': age,
+ 'blocked_on_stock': r.get('state') == 'waiting'})
+ backlog_rows = sorted(bl.values(), key=lambda x: (-x['oldest_days'], -x['open']))
+ expedite.sort(key=lambda x: -x['days_late'])
+
+ n_done_12m = sum(1 for r in done if str(r['date_done'])[:10] >= _y365)
+ return {
+ 'monthly': monthly_rows, 'stages': stage_rows, 'stage_monthly': stage_monthly,
+ 'ontime': ontime_rows, 'backlog': backlog_rows, 'expedite': expedite,
+ 'xmr': xmr, 'weekly_vol': vol_rows, 'clean': clean_rows,
+ 'clean_pct_90d': clean_pct_90d,
+ 'kpi': {
+ 'done_12m': n_done_12m, 'open_now': len(open_),
+ 'ontime_pct': (n_ontime / n_out * 100) if n_out else None,
+ 'ship_median_days': round(_median(ship_cycles) or 0, 2),
+ 'shipped_12m': n_out,
+ 'backlog_overdue': sum(e['overdue'] for e in bl.values()),
+ },
+ '_n_out_rowpath': n_out,
+ }
+
+
+def adjustments(t=None, top=15):
+ """Inventory-adjustment moves (to/from an 'inventory'-usage location) = the shrinkage /
+ correction signal. Valued from Odoo's stock.valuation.layer (ACTUAL historical cost) where a
+ layer exists for the move; current standard cost only as fallback — upgraded 2026-07-05 from
+ the all-approximation version. Monthly gains/losses + the most-corrected SKUs."""
+ t = t or P.today()
+ y1 = (t - dt.timedelta(days=365)).isoformat()
+ gains = O.search_read('stock.move',
+ [('state', '=', 'done'), ('date', '>=', y1),
+ ('location_id.usage', '=', 'inventory')],
+ ['product_id', 'product_uom_qty', 'date'])
+ losses = O.search_read('stock.move',
+ [('state', '=', 'done'), ('date', '>=', y1),
+ ('location_dest_id.usage', '=', 'inventory')],
+ ['product_id', 'product_uom_qty', 'date'])
+ pids = list({O.m2o_id(r['product_id']) for r in gains + losses if r.get('product_id')})
+ cost = {}
+ for i in range(0, len(pids), 5000):
+ for p in O.search_read('product.product',
+ [('id', 'in', pids[i:i + 5000]), ('active', 'in', [True, False])],
+ ['default_code', 'standard_price']):
+ cost[p['id']] = {'code': (p.get('default_code') or '').strip() or f"#{p['id']}",
+ 'cost': p.get('standard_price') or 0.0}
+
+ # Actual valuation per move from stock.valuation.layer (Σ |value| per move; a move can carry
+ # several layers). Moves WITH a layer row use it — even a legitimate 0; only layerless moves
+ # fall back to qty × current standard cost.
+ mids = [m['id'] for m in gains + losses]
+ layer_val, layer_seen = {}, set()
+ for i in range(0, len(mids), 5000):
+ for l in O.search_read('stock.valuation.layer',
+ [('stock_move_id', 'in', mids[i:i + 5000])],
+ ['stock_move_id', 'value']):
+ mid = O.m2o_id(l['stock_move_id'])
+ layer_seen.add(mid)
+ layer_val[mid] = layer_val.get(mid, 0.0) + abs(l.get('value') or 0.0)
+
+ d90 = (t - dt.timedelta(days=90)).isoformat()
+ monthly, per_sku = {}, {}
+ n_layer = n_fallback = 0
+ for rows, sign, key in ((gains, +1, 'gains'), (losses, -1, 'losses')):
+ for r in rows:
+ pid = O.m2o_id(r['product_id'])
+ c = cost.get(pid, {'code': '?', 'cost': 0.0})
+ if r['id'] in layer_seen:
+ val = layer_val.get(r['id'], 0.0)
+ n_layer += 1
+ else:
+ val = (r.get('product_uom_qty') or 0.0) * c['cost']
+ n_fallback += 1
+ m = str(r['date'])[:7]
+ e = monthly.setdefault(m, {'month': m, 'gains': 0.0, 'losses': 0.0, 'moves': 0})
+ e[key] += val
+ e['moves'] += 1
+ s = per_sku.setdefault(pid, {'sku': c['code'], 'product': O.m2o_name(r['product_id']),
+ 'net_qty': 0.0, 'net_value': 0.0, 'moves': 0,
+ 'moves_90d': 0, 'gross_value': 0.0})
+ s['net_qty'] += sign * (r.get('product_uom_qty') or 0.0)
+ s['net_value'] += sign * val
+ s['gross_value'] += abs(val)
+ s['moves'] += 1
+ if str(r['date'])[:10] >= d90:
+ s['moves_90d'] += 1
+ monthly_rows = sorted(monthly.values(), key=lambda x: x['month'])
+ all_sku = list(per_sku.values())
+ top_rows = sorted(all_sku, key=lambda x: -abs(x['net_value']))[:top]
+ # Pareto: cumulative share of gross correction value (the "N SKUs = 80% of corrections" view)
+ by_gross = sorted(all_sku, key=lambda x: -x['gross_value'])
+ tot_gross = sum(s['gross_value'] for s in by_gross) or 1.0
+ run = 0.0
+ pareto = []
+ for s in by_gross[:30]:
+ run += s['gross_value']
+ pareto.append({'sku': s['sku'], 'gross_value': s['gross_value'],
+ 'cum_pct': run / tot_gross * 100})
+ # Worklists (exception-first: every flag terminates in an actionable list)
+ cc_list = sorted((s for s in all_sku if s['moves_90d'] >= 3),
+ key=lambda x: (-x['moves_90d'], -abs(x['net_value'])))
+ churn_list = sorted((s for s in all_sku
+ if s['gross_value'] > 500 and s['gross_value'] > 2 * abs(s['net_value'])),
+ key=lambda x: -x['gross_value'])
+ return {'monthly': monthly_rows, 'top': top_rows, 'pareto': pareto,
+ # FULL worklists — the UI paginates; a silent [:40] cap made the headline counts
+ # unverifiable in-app (owner rule: every sum drills to its rows)
+ 'cycle_count': cc_list, 'churn': churn_list,
+ 'n_cycle_count': len(cc_list), 'n_churn': len(churn_list),
+ 'total_losses': sum(m['losses'] for m in monthly_rows),
+ 'total_gains': sum(m['gains'] for m in monthly_rows),
+ 'n_moves': sum(m['moves'] for m in monthly_rows),
+ 'n_layer_valued': n_layer, 'n_cost_fallback': n_fallback,
+ '_rowsum_loss_qty': sum((r.get('product_uom_qty') or 0.0) for r in losses),
+ '_rowsum_layer_abs': sum(layer_val.values()),
+ '_y1': y1}
+
+
+def touches(t=None, top=25):
+ """Most-handled SKUs by done stock-move count — where warehouse labor concentrates.
+ Carries default_code so the rows open the canonical SKU drawer (cross-module interop)."""
+ t = t or P.today()
+ y1 = (t - dt.timedelta(days=365)).isoformat()
+ g = O.read_group('stock.move', [('state', '=', 'done'), ('date', '>=', y1)],
+ ['product_uom_qty:sum'], ['product_id'], lazy=False)
+ rows = []
+ total = 0
+ for r in g:
+ n = r.get('__count') or 0
+ total += n
+ if r.get('product_id'):
+ rows.append({'pid': O.m2o_id(r['product_id']), 'product': O.m2o_name(r['product_id']),
+ 'moves': n, 'units': r.get('product_uom_qty') or 0.0})
+ rows.sort(key=lambda x: -x['moves'])
+ rows = rows[:top]
+ pids = [r['pid'] for r in rows]
+ codes = {p['id']: (p.get('default_code') or '').strip()
+ for p in O.search_read('product.product',
+ [('id', 'in', pids), ('active', 'in', [True, False])],
+ ['default_code'])}
+ for r in rows:
+ r['share_pct'] = r['moves'] / total * 100 if total else None
+ r['code'] = codes.get(r['pid'], '')
+ return {'top': rows, 'total_moves': total}
+
+
+def _sop(diagnose, fix, verify, cadence):
+ """Embedded runbook per flag: versioned IN CODE (like metric definitions — an SOP that drifts
+ in a UI editor breaks the explainability contract). Rendered as a drill-down under the flag."""
+ return {'diagnose': diagnose, 'fix': fix, 'verify': verify, 'cadence': cadence}
+
+
+def flags(b, adj, ph=None):
+ """The recommendation engine: explainable rules from the warehouse research brief
+ (wiki/research/warehouse.md), each terminating in an action AND carrying its SOP drill-down.
+ Three Wheeler rules on the weekly on-time XmR, stage bottleneck/stalled-subset, clean-order
+ breach, backorder jump, backlog breach, capacity-ahead-of-season, adjustment worklists,
+ counting-program health."""
+ out = []
+
+ if ph and ph.get('ratio_pct') is not None and ph['ratio_pct'] > 1:
+ out.append({'sev': 'high',
+ 'title': f"Corrections churn = {ph['ratio_pct']:.0f}% of inventory value per year "
+ "(the accepted band is 1%; world-class runs under 0.5%)",
+ 'detail': f"Gross adjustments {ph['gross_12m']:,.0f} against ~{ph['inv_value_approx']:,.0f} "
+ "of stock (ratio uses current-standard-cost inventory value - an approximation "
+ "for this ratio only).",
+ 'action': 'This is a counting-PROGRAM problem, not per-SKU noise. Until it heals, '
+ 'quantity-based recommendations for flagged SKUs carry count-trust '
+ 'warnings on the Procurement, Inventory and Assortment pages.',
+ 'sop': _sop(
+ ['Confirm the churn is process, not shrink: the gains-vs-losses chart '
+ 'below - roughly offsetting bars = counting/UoM/receiving errors.',
+ 'The Pareto names where the value concentrates; the churn worklist '
+ 'names the process suspects.'],
+ ['Stand up the weekly cycle-count ritual (worklist below, 10-20 SKUs/wk, '
+ 'counter =/= approver, root-cause tag on every correction).',
+ 'Fix the top-5 churn SKUs\' unit-of-measure/receiving practice first - '
+ 'one UoM fix can kill hundreds of corrections.',
+ 'Track this ratio monthly; it should fall as counts come clean.'],
+ ['Ratio trending toward 1%, then 0.5%; the cycle-count worklist shrinking '
+ 'month over month.'],
+ 'Monthly program review; weekly count ritual.')})
+
+ sigs = [p for p in b['xmr']['points'][-8:] if p['signal']]
+ if sigs:
+ out.append({'sev': 'high', 'title': 'On-time shipping shows a real signal, not noise',
+ 'detail': '; '.join(f"{p['label']}: {p['value']:.0f}% ({p['signal']})" for p in sigs[-3:]),
+ 'action': 'Investigate those weeks specifically - carrier, holiday, stockout or '
+ 'staffing. XmR limits say this is beyond routine variation.',
+ 'sop': _sop(
+ ['Open the signal week(s) in Odoo: Inventory > Transfers, filter Delivery '
+ 'Orders, Done, date_done in that week, then sort by scheduled date.',
+ 'Classify the late ones: carrier pickup missed / short-staffed day / '
+ 'stock not available (backorder created) / holiday cluster.',
+ 'One cause should cover most of the week - a signal week is a COMMON '
+ 'cause, not many little ones.'],
+ ['Carrier: escalate with the carrier rep, add a second pickup on peak days.',
+ 'Staffing: move the pack-day roster; see the Weekly-volume chart for which '
+ 'weekdays run hot.',
+ 'Stock: the backorder share in the Clean-orders chart confirms it - work '
+ 'the Procurement buy list, not the floor.'],
+ ['The next 2 weekly points fall back inside the band.',
+ 'If 8+ points stay above/below center, re-baseline the chart (the process '
+ 'genuinely changed).'],
+ 'On signal only - do NOT investigate routine (in-band) weeks.')})
+
+ if b.get('clean_pct_90d') is not None and b['clean_pct_90d'] < 90:
+ out.append({'sev': 'high', 'title': f"Clean-order rate {b['clean_pct_90d']:.0f}% (90d) - below the 90% bar",
+ 'detail': 'Clean = shipped on time AND complete (no backorder). Top-quartile B2B is 95%+.',
+ 'action': 'Decompose in the clean-order chart: a late-driven gap is a warehouse/carrier '
+ 'issue; a backorder-driven gap is availability - route to Procurement.',
+ 'sop': _sop(
+ ['Read the Clean-orders chart: which slice eats the gap - Late only (gold), '
+ 'Backordered only (gray), or both (red)?',
+ 'Late-driven: pull the expedite list + the signal-week SOP above.',
+ 'Backorder-driven: these SKUs stocked out at ship time - cross-reference '
+ 'the Procurement buy list and the open-PO late chase list.'],
+ ['Late-driven: fix the floor/carrier cause (see the on-time SOP).',
+ 'Backorder-driven: expedite the late POs for the affected SKUs (Procurement '
+ '> Late deliveries names the supplier and days late); raise reorder points '
+ 'on repeat offenders.',
+ 'Both: work availability first - a complete late order beats an on-time '
+ 'partial for most wholesale customers.'],
+ ['Trailing-90d clean rate back over 90% (top-quartile bar: 95%).'],
+ 'Weekly review until >90%, then monthly.')})
+
+ pr = b.get('promise') or {}
+ if pr.get('on_promise_pct') is not None and pr['on_promise_pct'] < 85:
+ out.append({'sev': 'high' if pr['on_promise_pct'] < 70 else 'medium',
+ 'title': f"Promise-date OTIF {pr['on_promise_pct']:.0f}% - customers get "
+ f"{len(pr['missed']):,} of {pr['n_measured']:,} promised orders late",
+ 'detail': 'Delivered vs the commitment_date QUOTED to the customer (+1d '
+ f"grace); p90 lateness +{pr['late_p90']}d. The internal on-time "
+ 'XmR can look healthy while promises are still missed - the '
+ 'promise is set at order entry, not by the warehouse.',
+ 'action': 'Fix the PROMISE first: quote commitment dates from the real '
+ 'schedule (order-to-ship p50 + a buffer), then work the missed '
+ 'list below.',
+ 'sop': _sop(
+ ['Open the Promise vs delivered section: compare the promise-OTIF trend '
+ 'to the internal on-time XmR - a wide gap = promises are quoted '
+ 'tighter than the process can ship.',
+ 'Sample 10 missed orders: was the commitment_date realistic at entry '
+ '(vs the median order-to-ship time), or did the floor slip?'],
+ ['Unrealistic promises -> set commitment dates at entry from the real '
+ 'p50 ship time + 1 day buffer (sales SOP, not a warehouse fix).',
+ 'Floor slippage -> the expedite list + backlog SOPs above own it.'],
+ ['Promise-OTIF trend back over 90% and converging with the internal '
+ 'on-time line.'],
+ 'Weekly with the on-time review.')})
+
+ om = b['ontime']
+ if len(om) >= 7:
+ last_bo = om[-1]['backorder_pct'] or 0
+ base_bo = sum((r['backorder_pct'] or 0) for r in om[-7:-1]) / 6
+ if last_bo - base_bo > 5:
+ out.append({'sev': 'medium', 'title': f"Backorder rate jumped to {last_bo:.0f}% (was ~{base_bo:.0f}%)",
+ 'detail': 'First-pass fill is slipping - an availability problem, not a floor problem.',
+ 'action': 'Cross-check the Procurement buy list and the open-PO late chase list.',
+ 'sop': _sop(
+ ['List last month\'s backordered deliveries in Odoo (Delivery Orders '
+ 'with a backorder) and tally the missing SKUs.',
+ 'For each: is it on the Procurement BUY list (never ordered) or on the '
+ 'open-PO LATE list (ordered, supplier late)?'],
+ ['Never ordered: place the PO - the buy list has qty and supplier.',
+ 'Supplier late: expedite via the late chase list; consider the '
+ 'alternative vendor shown on the Procurement page.',
+ 'Chronic repeat SKUs: raise the reorder baseline (lead-time cover).'],
+ ['Backorder share back within 5pts of its 6-month norm.'],
+ 'Check at the biweekly procurement ritual.')})
+
+ sm = b['stage_monthly']
+ for stage in ('Pick', 'Pack', 'Ship', 'Putaway'):
+ hist = [r for r in sm if r['stage'] == stage]
+ if len(hist) >= 7:
+ last = hist[-1]
+ base = sorted(r['p90_days'] for r in hist[-7:-1])[3] # median of prior 6
+ if base > 0 and last['p90_days'] > 2 * base:
+ out.append({'sev': 'medium', 'title': f"{stage} p90 cycle {last['p90_days']:.1f}d - over 2x its 6-month norm ({base:.1f}d)",
+ 'detail': f"Month {last['month']}, n={last['n']}.",
+ 'action': f'Bottleneck forming at {stage} - rebalance labor or clear holds there.',
+ 'sop': _sop(
+ [f'Open the {stage} queue in Odoo, sort oldest first: is the tail a '
+ 'few ancient transfers (holds) or is the WHOLE queue slower (capacity)?',
+ 'Compare the stage trend chart: did volume also jump that month?'],
+ ['Holds: clear or cancel the stuck transfers (supervisor sign-off).',
+ 'Capacity: shift labor from the fastest stage for 1-2 weeks; the '
+ 'stage chart shows which stage has slack.'],
+ [f'{stage} p90 back under 2x its 6-month norm next month.'],
+ 'Monthly, at the stage-trend review.')})
+ for s in b['stages']:
+ if s['median_days'] > 0 and s['p90_days'] / max(s['median_days'], 0.01) > 4 and s['p90_days'] > 1:
+ out.append({'sev': 'info', 'title': f"{s['stage']}: a subset of transfers stalls (p90 {s['p90_days']:.1f}d vs median {s['median_days']:.1f}d)",
+ 'detail': 'A long tail this wide is usually holds or stockouts, not capacity.',
+ 'action': 'Audit the stalled tail - the expedite list below names the current ones.',
+ 'sop': _sop(
+ [f'The median {s["stage"]} transfer takes {s["median_days"]:.1f}d - the slowest '
+ '10% take 4x+ longer. Sample 10 of the slowest done transfers this month '
+ '(Odoo: sort by date_done minus create date).',
+ 'Tag each: waiting on stock / waiting on a person or approval / lost paperwork.'],
+ ['Stock waits: those belong to Procurement (see the stock-blocked flag).',
+ 'Approval waits: name the approval and set a same-day rule for it.',
+ 'Lost paperwork: cancel-and-recreate is usually cheaper than archaeology.'],
+ ['p90/median ratio trending toward 2-3x within two months.'],
+ 'Monthly sample of 10.')})
+
+ k = b['kpi']
+ if k['open_now'] and k['backlog_overdue'] / k['open_now'] > 0.10:
+ out.append({'sev': 'high', 'title': f"{k['backlog_overdue']:,} of {k['open_now']:,} open transfers are past schedule "
+ f"({k['backlog_overdue'] / k['open_now'] * 100:.0f}% - the healthy bar is under 10%)",
+ 'detail': 'Old queues (see Backlog) almost always contain dead paperwork as well as real work.',
+ 'action': 'Clear or cancel the ancient queues (Putaway/Move Back to Stock first); '
+ 'then work the expedite list daily until past-due is under 5%.',
+ 'sop': _sop(
+ ['Backlog table below, oldest queue first: anything older than ~60 days is '
+ 'almost certainly dead paperwork, not real work.',
+ 'For each ancient queue, sample 10 transfers in Odoo: does the stock '
+ 'movement it describes still need to happen?'],
+ ['Dead paperwork: CANCEL in Odoo (ops supervisor does it - this app is '
+ 'read-only by design). One focused afternoon usually clears years.',
+ 'Real work: schedule a catch-up block per queue (Putaway first - it '
+ 'poisons on-hand accuracy, which poisons the buy list).',
+ 'Then: the expedite list is the daily ritual until past-due < 5%.'],
+ ['Past-due share under 10% within a month, 5% steady-state; oldest-days '
+ 'column under 30 everywhere.'],
+ 'One-time cleanup, then daily expedite ritual + weekly backlog glance.')})
+
+ vol = b['weekly_vol']
+ if len(vol) >= 4:
+ now4 = sum(r['shipped'] for r in vol[-4:])
+ ly4 = sum(r['shipped_ly'] for r in vol[-4:])
+ p90_rising = False
+ ship_hist = [r for r in sm if r['stage'] == 'Ship']
+ if len(ship_hist) >= 7:
+ p90_rising = ship_hist[-1]['p90_days'] > sorted(r['p90_days'] for r in ship_hist[-7:-1])[3]
+ if ly4 and now4 / ly4 > 1.15 and p90_rising:
+ out.append({'sev': 'medium', 'title': f'Volume running {now4 / ly4 * 100 - 100:.0f}% above last year AND ship times rising',
+ 'detail': f'Last 4 weeks: {now4:,} shipped vs {ly4:,} same weeks last year.',
+ 'action': 'Capacity signal - open the staffing conversation now (practice: hire '
+ '8-12 weeks before peak).',
+ 'sop': _sop(
+ ['Weekly-volume chart: how many weeks until the seasonal peak (last '
+ 'year\'s shape shows it)?',
+ 'Estimate the gap: volume % above LY ~= extra hands needed % (floor '
+ 'labor scales near-linearly at this size).'],
+ ['Under 12 weeks to peak: start temp hiring NOW (8-12 week practice; '
+ '12-14 in a tight market).',
+ 'Over 12 weeks: schedule the decision, prep onboarding docs.',
+ 'Short-term relief: shift labor to the bottleneck stage (stage trend '
+ 'chart names it).'],
+ ['Ship p90 flat while volume grows; on-time XmR stays in band through '
+ 'the peak.'],
+ 'Re-check weekly during the run-up.')})
+
+ if adj['n_cycle_count']:
+ out.append({'sev': 'medium', 'title': f"{adj['n_cycle_count']} SKUs adjusted 3+ times in 90 days",
+ 'detail': 'Repeat corrections = the system count for these is not trusted.',
+ 'action': 'Work the cycle-count list below weekly until each SKU has two clean counts.',
+ 'sop': _sop(
+ ['Print the cycle-count worklist (top of the list first - it is ranked by '
+ 'repeat count then value).',
+ 'For each SKU note WHERE the count went wrong last time (the SKU drawer '
+ 'shows its movement; the churn list says if it is a process error).'],
+ ['Count 10-20 SKUs per week from the top of the list.',
+ 'Counter and approver are DIFFERENT people (segregation - the practice '
+ 'that keeps counts honest).',
+ 'Tag every correction with a root cause (miscount / damage / receiving '
+ 'error / UoM) - the tags are what fix the process.',
+ 'A SKU exits the list after TWO consecutive clean counts.'],
+ ['Worklist shrinking month over month; adjustment gross $ trending down '
+ 'on the monthly chart.'],
+ 'Weekly, 10-20 SKUs; the list re-ranks itself as data updates.')})
+ if adj['n_churn']:
+ out.append({'sev': 'medium', 'title': f"{adj['n_churn']} SKUs churn both ways (gross corrections > 2x net)",
+ 'detail': 'Offsetting gains and losses = a counting/receiving/UoM process error, not shrink.',
+ 'action': 'Check unit-of-measure, receiving and put-away practice for the churn list below.',
+ 'sop': _sop(
+ ['Take the top 5 churn SKUs: open each in the SKU drawer and note the pack '
+ 'size (e.g. "288-Piece per Pack" - candles are classic UoM churn).',
+ 'Ask receiving: are these counted in PIECES or PACKS on arrival? Ask the '
+ 'floor: which unit does picking use?'],
+ ['UoM mismatch found: fix the unit on the product / retrain the count '
+ 'habit - one setting usually kills hundreds of corrections.',
+ 'Put-away confusion (same SKU in several spots): consolidate locations.',
+ 'Receiving misses: count at the dock against the PO line, not from the '
+ 'packing slip.'],
+ ['The SKU stops appearing in the churn list within two cycles; gross '
+ 'corrections fall while net stays flat.'],
+ 'Top-5 review at the weekly count session.')})
+
+ real_exp = [e for e in b['expedite'] if not e['blocked_on_stock']]
+ stock_exp = [e for e in b['expedite'] if e['blocked_on_stock']]
+ if real_exp:
+ out.append({'sev': 'medium', 'title': f'{len(real_exp)} shipments to expedite today',
+ 'detail': 'Past schedule and older than the normal ship cycle, stock available.',
+ 'action': 'Expedite list below, worst first.',
+ 'sop': _sop(
+ ['Expedite list below, top rows first (worst days-late).',
+ 'For each: confirm in Odoo the stock is actually reserved (assigned '
+ 'state) and the order is not on customer hold.'],
+ ['Pick-pack-ship the top of the list TODAY; anything a customer has '
+ 'called about jumps the queue.',
+ 'On hold / no longer wanted: cancel the transfer so it stops polluting '
+ 'the backlog stats.'],
+ ['Expedite list under 10 rows and oldest under 7 days late.'],
+ 'Daily, first thing - it is a 15-minute ritual once the backlog is clean.')})
+ if stock_exp:
+ out.append({'sev': 'info', 'title': f'{len(stock_exp)} late shipments are blocked on STOCK, not the floor',
+ 'detail': 'Waiting-state transfers cannot be picked - expediting them is pointless.',
+ 'action': 'Routed to Procurement: cross-check the buy list / open-PO ETAs for these.',
+ 'sop': _sop(
+ ['Filter the expedite list to "Blocked on stock = YES" - these SKUs are '
+ 'sold but not on the shelf.',
+ 'Procurement page: is each SKU on an open PO (check the inbound-matched '
+ 'table for its ETA) or not ordered at all?'],
+ ['On a PO: tell the customer the ETA; expedite the PO if the customer '
+ 'matters (late chase list has the supplier contact context).',
+ 'Not ordered: it should be flashing on the buy list - order it or offer '
+ 'the customer a substitute.'],
+ ['Stock-blocked count trending to near zero outside deep season.'],
+ 'Reviewed at the biweekly procurement ritual.')})
+
+ sev_rank = {'high': 0, 'medium': 1, 'info': 2}
+ out.sort(key=lambda f: sev_rank.get(f['sev'], 9))
+ return out
+
+
+def untrusted_counts(t=None):
+ """The cross-module COUNT-TRUST set: default_code -> adjustment count for SKUs adjusted 3+
+ times in the last 90 days. For these, the system quantity is unverified until two clean
+ cycle counts — any recommendation built on their on-hand (buy list cover, dead-stock DSI,
+ season readiness) should say so. Deliberately lightweight (grouped reads over 90 days) so
+ any page can join it without running the full adjustments()."""
+ t = t or P.today()
+ d90 = (t - dt.timedelta(days=90)).isoformat()
+ per = {}
+ for loc in ('location_id', 'location_dest_id'):
+ for g in O.read_group('stock.move',
+ [('state', '=', 'done'), ('date', '>=', d90),
+ (loc + '.usage', '=', 'inventory')],
+ ['id'], ['product_id'], lazy=False):
+ if g.get('product_id'):
+ pid = O.m2o_id(g['product_id'])
+ per[pid] = per.get(pid, 0) + (g.get('__count') or 0)
+ pids = [p for p, n in per.items() if n >= 3]
+ codes = {}
+ for i in range(0, len(pids), 5000):
+ for p in O.search_read('product.product',
+ [('id', 'in', pids[i:i + 5000]), ('active', 'in', [True, False])],
+ ['default_code']):
+ c = (p.get('default_code') or '').strip()
+ if c:
+ codes[c] = per[p['id']]
+ return codes
+
+
+def program_health(adj):
+ """Counting-program health: gross corrections (12m, layer-valued) as a share of inventory
+ value. Inventory value here is qty x CURRENT standard cost — an approximation used only for
+ this RATIO (the GL-tied book value lives in Overstock). WERC practice band: <=0.5% target,
+ ~1% acceptable, beyond that = formal program review."""
+ prods = O.search_read('product.product',
+ [('default_code', '!=', False), ('active', 'in', [True, False])],
+ ['default_code', 'name', 'qty_available', 'standard_price'])
+ valued = [{'code': (p.get('default_code') or '').strip(), 'product': p.get('name') or '',
+ 'qty': p.get('qty_available') or 0.0, 'std_cost': p.get('standard_price') or 0.0,
+ 'value': (p.get('qty_available') or 0.0) * (p.get('standard_price') or 0.0)}
+ for p in prods if (p.get('qty_available') or 0.0) > 0]
+ inv_val = sum(v['value'] for v in valued)
+ gross = adj['total_losses'] + adj['total_gains']
+ # denominator composition, so the ratio is verifiable in-app down to SKUs (owner rule);
+ # the numerator's rows are the adjustment worklists/Pareto on the same page
+ valued.sort(key=lambda v: -v['value'])
+ return {'inv_value_approx': inv_val, 'gross_12m': gross,
+ 'ratio_pct': (gross / inv_val * 100) if inv_val else None,
+ 'n_skus_valued': len(valued), 'value_rows': valued}
+
+
+def freight(t=None):
+ """Carrier mix + delivery-charge economics: who we ship with, what delivery revenue we
+ charge, and who rides the free-delivery carrier (the coverage question: free delivery for a
+ customer we then pay Uber/local fees to serve)."""
+ t = t or P.today()
+ y1 = (t - dt.timedelta(days=365)).isoformat()
+ mix = []
+ for g in O.read_group('stock.picking',
+ [('state', '=', 'done'), ('date_done', '>=', y1),
+ ('carrier_id', '!=', False)],
+ ['id'], ['carrier_id'], lazy=False):
+ if g.get('carrier_id'):
+ mix.append({'carrier': O.m2o_name(g['carrier_id']), 'pickings': g.get('__count') or 0})
+ mix.sort(key=lambda x: -x['pickings'])
+ tot_pk = sum(m['pickings'] for m in mix) or 1
+ for m in mix:
+ m['share_pct'] = m['pickings'] / tot_pk * 100
+
+ ex = O.excluded_partner_ids()
+ dom = [('is_delivery', '=', True), ('order_id.state', 'in', ['sale', 'done']),
+ ('order_id.date_order', '>=', y1)]
+ if ex:
+ dom.append(('order_partner_id', 'not in', list(ex)))
+ lines = O.search_read('sale.order.line', dom,
+ ['price_subtotal', 'order_partner_id', 'create_date'])
+ monthly = {}
+ for l in lines:
+ m = str(l.get('create_date') or '')[:7]
+ e = monthly.setdefault(m, {'month': m, 'revenue': 0.0, 'lines': 0})
+ e['revenue'] += l.get('price_subtotal') or 0.0
+ e['lines'] += 1
+ rev_total = sum(l.get('price_subtotal') or 0.0 for l in lines)
+
+ free = []
+ for g in O.read_group('stock.picking',
+ [('state', '=', 'done'), ('date_done', '>=', y1),
+ ('carrier_id.name', 'ilike', 'free')],
+ ['id'], ['partner_id'], lazy=False):
+ if g.get('partner_id'):
+ free.append({'pid': O.m2o_id(g['partner_id']), 'customer': O.m2o_name(g['partner_id']),
+ 'free_deliveries': g.get('__count') or 0})
+ free.sort(key=lambda x: -x['free_deliveries'])
+
+ return {'mix': mix, 'monthly': sorted(monthly.values(), key=lambda x: x['month']),
+ 'revenue_12m': rev_total, 'n_charge_lines': len(lines),
+ 'free_top': free[:20], 'n_free_customers': len(free),
+ 'n_free_deliveries': sum(f['free_deliveries'] for f in free),
+ '_rowsum_rev': rev_total, '_dom_is_delivery': dom}
+
+
+def promise_otif(t=None):
+ """Delivered vs PROMISED — the CUSTOMER's on-time, distinct from the internal schedule the
+ on-time XmR measures. 94% of confirmed orders carry a commitment_date; an order is
+ on-promise when its LAST completed outgoing shipment finished by that date +1 day (the same
+ grace the internal measure uses). Measured set = promised orders that HAVE shipped."""
+ t = t or P.today()
+ d12 = (t - dt.timedelta(days=365)).isoformat()
+ orders = O.search_read('sale.order',
+ [('state', '=', 'sale'), ('date_order', '>=', d12),
+ ('commitment_date', '!=', False)],
+ ['name', 'partner_id', 'commitment_date', 'date_order'])
+ picks = O.search_read('stock.picking',
+ [('picking_type_code', '=', 'outgoing'), ('state', '=', 'done'),
+ ('date_done', '>=', d12)],
+ ['origin', 'date_done'])
+ last_done = {}
+ for p_ in picks:
+ o_, d = p_.get('origin'), str(p_.get('date_done') or '')[:10]
+ if o_ and d and (o_ not in last_done or d > last_done[o_]):
+ last_done[o_] = d
+ rows = []
+ for so in orders:
+ dd = last_done.get(so['name'])
+ if not dd:
+ continue
+ promised = str(so['commitment_date'])[:10]
+ rows.append({'order': so['name'], 'pid': O.m2o_id(so.get('partner_id')),
+ 'customer': O.m2o_name(so.get('partner_id')),
+ 'promised': promised, 'delivered': dd,
+ 'days_late': (dt.date.fromisoformat(dd)
+ - dt.date.fromisoformat(promised)).days})
+ n = len(rows)
+ ontime = sum(1 for r in rows if r['days_late'] <= 1)
+ lates = sorted(r['days_late'] for r in rows)
+ per_m = {}
+ for r in rows:
+ e = per_m.setdefault(r['promised'][:7], [0, 0])
+ e[0] += 1
+ e[1] += 1 if r['days_late'] <= 1 else 0
+ return {'n_measured': n, 'n_promised': len(orders), 'n_unshipped': len(orders) - n,
+ 'n_on_promise': ontime,
+ 'on_promise_pct': (ontime / n * 100) if n else None,
+ 'late_p90': lates[int(len(lates) * .9)] if lates else None,
+ 'missed': sorted((r for r in rows if r['days_late'] > 1),
+ key=lambda r: -r['days_late']),
+ # trend only for months with a real sample — orders PROMISED before the pull window
+ # can ship inside it and leave a 1-2 order month that drags the line to 0/100%
+ 'trend': [{'month': k, 'measured': v[0],
+ 'on_promise_pct': v[1] / v[0] * 100}
+ for k, v in sorted(per_m.items()) if v[0] >= 10],
+ '_d12': d12}
+
+
+def summary(t=None):
+ t = t or P.today()
+ b = build(t)
+ b['adjustments'] = adjustments(t)
+ b['touches'] = touches(t)
+ b['freight'] = freight(t)
+ b['program_health'] = program_health(b['adjustments'])
+ b['promise'] = promise_otif(t)
+ b['flags'] = flags(b, b['adjustments'], b['program_health'])
+ b['pulled_at'] = dt.datetime.now().strftime('%Y-%m-%d %H:%M')
+ return b
+
+
+def validate(t=None, team_id=None, pre=None, adj=None, fr=None):
+ """pre/adj/fr: pass the bundle's precomputed build()/adjustments()/freight() to avoid
+ re-running the heavy pulls (the ar.py lesson); validate.py calls bare and computes fresh."""
+ t = t or P.today()
+ y1 = (t - dt.timedelta(days=365)).isoformat()
+ o = O.get_odoo()
+ b = pre or build(t)
+ checks = []
+
+ n_out_direct = o.search_count('stock.picking',
+ [('state', '=', 'done'), ('date_done', '>=', y1),
+ ('picking_type_code', '=', 'outgoing')])
+ checks.append({'check': 'Warehouse: row-built outgoing done == search_count (12m)',
+ 'a': b['_n_out_rowpath'], 'b': n_out_direct,
+ 'gap': b['_n_out_rowpath'] - n_out_direct,
+ 'ok': abs(b['_n_out_rowpath'] - n_out_direct) <= max(2, n_out_direct * 0.001)})
+
+ pr = b.get('promise') or promise_otif(t)
+ if pr:
+ n_srv = o.search_count('sale.order',
+ [('state', '=', 'sale'), ('date_order', '>=', pr['_d12']),
+ ('commitment_date', '!=', False)])
+ checks.append({'check': 'Promise-OTIF: promised-order universe == server count',
+ 'a': pr['n_promised'], 'b': n_srv, 'gap': pr['n_promised'] - n_srv,
+ 'ok': abs(pr['n_promised'] - n_srv) <= max(2, n_srv * 0.001)})
+ part = pr['n_on_promise'] + len(pr['missed'])
+ checks.append({'check': 'Promise-OTIF: on-promise + missed == measured (partition)',
+ 'a': part, 'b': pr['n_measured'], 'gap': part - pr['n_measured'],
+ 'ok': part == pr['n_measured']})
+
+ mm = sum(sum(v for k, v in m.items() if k != 'month') for m in b['monthly'])
+ n_all = o.search_count('stock.picking', [('state', '=', 'done'), ('date_done', '>=', y1)])
+ checks.append({'check': 'Warehouse: Σ(monthly throughput) == all done pickings (12m)',
+ 'a': mm, 'b': n_all, 'gap': mm - n_all,
+ 'ok': abs(mm - n_all) <= max(2, n_all * 0.001)})
+
+ # Clean-order decomposition is exhaustive: the four categories partition every shipped picking.
+ clean_sum = sum(sum(v for kk, v in m.items() if kk != 'month') for m in b['clean'])
+ ship_sum = sum(r['shipped'] for r in b['ontime'])
+ checks.append({'check': 'Warehouse: Σ(clean-order categories) == Σ shipped (partition test)',
+ 'a': clean_sum, 'b': ship_sum, 'gap': clean_sum - ship_sum,
+ 'ok': clean_sum == ship_sum})
+
+ adj = adj or adjustments(t)
+ agg_loss_qty = O.sum_field('stock.move',
+ [('state', '=', 'done'), ('date', '>=', adj['_y1']),
+ ('location_dest_id.usage', '=', 'inventory')],
+ 'product_uom_qty')
+ checks.append({'check': 'Warehouse: adjustment loss qty row-sum == read_group Σ (live-drift tol)',
+ 'a': round(adj['_rowsum_loss_qty'], 2), 'b': round(agg_loss_qty, 2),
+ 'gap': round(adj['_rowsum_loss_qty'] - agg_loss_qty, 2),
+ 'ok': abs(adj['_rowsum_loss_qty'] - agg_loss_qty) <= max(1.0, abs(agg_loss_qty) * 0.001)})
+
+ # Valuation layers: our per-move Σ|value| vs the signed read_group sums over the same layer
+ # domains (gains positive, losses negative → |gains| + |losses| should tie).
+ lay_g = O.sum_field('stock.valuation.layer',
+ [('stock_move_id.state', '=', 'done'), ('stock_move_id.date', '>=', adj['_y1']),
+ ('stock_move_id.location_id.usage', '=', 'inventory')], 'value')
+ lay_l = O.sum_field('stock.valuation.layer',
+ [('stock_move_id.state', '=', 'done'), ('stock_move_id.date', '>=', adj['_y1']),
+ ('stock_move_id.location_dest_id.usage', '=', 'inventory')], 'value')
+ lay_agg = abs(lay_g) + abs(lay_l)
+ checks.append({'check': 'Warehouse: Σ|layer value| row-path == |read_group gains|+|losses| (tol)',
+ 'a': round(adj['_rowsum_layer_abs'], 2), 'b': round(lay_agg, 2),
+ 'gap': round(adj['_rowsum_layer_abs'] - lay_agg, 2),
+ 'ok': abs(adj['_rowsum_layer_abs'] - lay_agg) <= max(5.0, lay_agg * 0.005)})
+
+ # Freight: delivery-charge revenue row-sum vs an independent read_group sum, same domain.
+ fr = fr or freight(t)
+ agg_rev = O.sum_field('sale.order.line', fr['_dom_is_delivery'], 'price_subtotal')
+ checks.append({'check': 'Warehouse: Σ delivery-charge revenue row-sum == read_group Σ (tol)',
+ 'a': round(fr['_rowsum_rev'], 2), 'b': round(agg_rev, 2),
+ 'gap': round(fr['_rowsum_rev'] - agg_rev, 2),
+ 'ok': abs(fr['_rowsum_rev'] - agg_rev) <= max(1.0, abs(agg_rev) * 0.001)})
+ return checks
diff --git a/platform/odoo_client.py b/platform/odoo_client.py
new file mode 100644
index 0000000000000000000000000000000000000000..b7cba17ac397b77ac60770d958f601c3d8e2cff3
--- /dev/null
+++ b/platform/odoo_client.py
@@ -0,0 +1,140 @@
+"""Read-only Odoo XML-RPC client for the FFS/RI analytics dashboard.
+
+Credentials come from environment variables (local .env OR Hugging Face Secrets):
+ ODOO_URL, ODOO_DB, ODOO_USER, ODOO_API_KEY
+
+READ_ONLY is hard-enforced: any write/create/delete/action method is blocked.
+This is a defense-in-depth measure on top of using a read-only Odoo user.
+"""
+import os
+import http.client
+import threading
+import xmlrpc.client
+
+try:
+ from dotenv import load_dotenv
+ from pathlib import Path
+ load_dotenv(Path(__file__).parent / '.env')
+except Exception:
+ pass # On HF, env comes from Secrets — no .env file needed.
+
+WRITE_METHODS = {
+ 'write', 'create', 'unlink', 'copy', 'load', 'import_data', 'execute',
+}
+WRITE_PREFIXES = ('write_', 'create_', 'unlink_', 'delete_', 'remove_', 'update_',
+ 'set_', 'do_', 'action_', 'button_', 'process_', 'send_',
+ 'cancel_', 'confirm_', 'approve_', 'validate_', 'commit_', 'apply_')
+
+
+class ReadOnlyError(RuntimeError):
+ pass
+
+
+# stdlib ServerProxy has NO timeout: a stalled socket hangs a worker forever (one cause of the
+# transport-break hangs the reconnect logic below papers over). Generous default — this is a
+# hang-guard, not a performance knob; big ledger pulls legitimately take a while.
+_RPC_TIMEOUT = float(os.environ.get('ODOO_RPC_TIMEOUT', '180'))
+
+
+class _TimeoutSafeTransport(xmlrpc.client.SafeTransport):
+ def make_connection(self, host):
+ conn = super().make_connection(host)
+ conn.timeout = _RPC_TIMEOUT
+ return conn
+
+
+class _TimeoutTransport(xmlrpc.client.Transport):
+ def make_connection(self, host):
+ conn = super().make_connection(host)
+ conn.timeout = _RPC_TIMEOUT
+ return conn
+
+
+def _proxy(uri):
+ tr = _TimeoutSafeTransport() if uri.startswith('https') else _TimeoutTransport()
+ return xmlrpc.client.ServerProxy(uri, transport=tr)
+
+
+class OdooClient:
+ READ_ONLY = True
+
+ def __init__(self, creds=None):
+ """`creds` (R3 keychain cutover): an explicit {url, db, user, api_key} dict — a TENANT'S
+ stored credentials — wins over the environment. None keeps the env/.env behavior every
+ existing caller relies on (tenant #0's connection)."""
+ creds = creds or {}
+ self.url = str(creds.get('url') or os.environ.get('ODOO_URL', '')).rstrip('/')
+ self.db = str(creds.get('db') or os.environ.get('ODOO_DB', ''))
+ self.user = str(creds.get('user') or os.environ.get('ODOO_USER', ''))
+ self.api_key = str(creds.get('api_key') or os.environ.get('ODOO_API_KEY', ''))
+ missing = [k for k, v in [('ODOO_URL', self.url), ('ODOO_DB', self.db),
+ ('ODOO_USER', self.user), ('ODOO_API_KEY', self.api_key)] if not v]
+ if missing:
+ raise RuntimeError(f"Missing Odoo env vars: {', '.join(missing)}")
+ # ONE in-flight XML-RPC call per client. `ServerProxy` keeps a single persistent HTTP
+ # connection, and stdlib http.client is NOT thread-safe on one connection: two threads
+ # (FastAPI's sync-route threadpool, a background cache refresh, Streamlit's own threads)
+ # interleaving on it raise CannotSendRequest/ResponseNotReady and each collision costs a
+ # reconnect — churn that reads as random multi-second lag. Serialising the transport is
+ # correct and cheap: Odoo calls are the slow path and the caches keep them rare.
+ self._xlock = threading.RLock()
+ self._connect()
+
+ def _connect(self, _retried=False):
+ """(Re)establish the XML-RPC connection. Called on init and to recover a broken socket.
+ uid is cached for the client's lifetime (authenticate is just a uid lookup — never
+ re-fire it per request). One retry on a transient connect failure (WinError 10060 etc.)
+ so a momentary network blip during prewarm doesn't error a whole module."""
+ try:
+ common = _proxy(f'{self.url}/xmlrpc/2/common')
+ self.uid = common.authenticate(self.db, self.user, self.api_key, {})
+ except (http.client.HTTPException, ConnectionError, OSError):
+ if _retried:
+ raise
+ import time as _time
+ _time.sleep(3)
+ return self._connect(_retried=True)
+ if not self.uid:
+ raise RuntimeError("Odoo authentication failed — check credentials.")
+ self.models = _proxy(f'{self.url}/xmlrpc/2/object')
+
+ def _guard(self, method):
+ if self.READ_ONLY and (method in WRITE_METHODS or any(method.startswith(p) for p in WRITE_PREFIXES)):
+ raise ReadOnlyError(f"BLOCKED write op '{method}' — dashboard is read-only.")
+
+ def execute_kw(self, model, method, args, kwargs=None):
+ self._guard(method)
+ with self._xlock:
+ try:
+ return self.models.execute_kw(self.db, self.uid, self.api_key, model, method, args, kwargs or {})
+ except (http.client.HTTPException, ConnectionError, OSError) as e:
+ # transient transport breakage (CannotSendRequest / broken pipe / reset) leaves the
+ # persistent socket dead — reconnect once and retry. xmlrpc Faults are NOT caught here,
+ # so genuine Odoo errors still propagate.
+ try:
+ self._connect()
+ except Exception:
+ raise e
+ return self.models.execute_kw(self.db, self.uid, self.api_key, model, method, args, kwargs or {})
+
+ def search_read(self, model, domain=None, fields=None, limit=None, offset=0, order=None):
+ kwargs = {'fields': fields or [], 'offset': offset}
+ if limit is not None:
+ kwargs['limit'] = limit
+ if order:
+ kwargs['order'] = order
+ return self.execute_kw(model, 'search_read', [domain or []], kwargs)
+
+ def search_count(self, model, domain=None):
+ return self.execute_kw(model, 'search_count', [domain or []])
+
+ def read_group(self, model, domain=None, fields=None, groupby=None, lazy=False, orderby=None, limit=None):
+ kwargs = {'fields': fields or [], 'groupby': groupby or [], 'lazy': lazy}
+ if orderby:
+ kwargs['orderby'] = orderby
+ if limit is not None:
+ kwargs['limit'] = limit
+ return self.execute_kw(model, 'read_group', [domain or []], kwargs)
+
+ def fields_get(self, model, attributes=('string', 'type')):
+ return self.execute_kw(model, 'fields_get', [], {'attributes': list(attributes)})
diff --git a/platform/procurement_suppliers.json b/platform/procurement_suppliers.json
new file mode 100644
index 0000000000000000000000000000000000000000..7834cd7a2430cfe8ca6cf64950839382b78624db
--- /dev/null
+++ b/platform/procurement_suppliers.json
@@ -0,0 +1,59447 @@
+{
+"CAND2T-XMAS": {
+"desc": "2 TONE XMAS PILLAR CANDLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.68,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": null,
+"lead": 150
+},
+"SB-NEST": {
+"desc": "SMALL HANGING GLASS W/ BIRD | 1-Piece per Pack / 72-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 140.4,
+"cbm": 0.065,
+"max_container": 1046,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": null
+},
+"R6265G": {
+"desc": "GLOBE INSERT FOR CANDLEABRA | 4-Piece per Pack/20 Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 57.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SETOF4-CYL": {
+"desc": "SET OF 4 CYLINDER 6\",8\",9\",11\" | 1 Set Per Pack / 6 sets Per Case",
+"unit": "Set",
+"qty_per_unit": null,
+"first_cost": 20.16,
+"cbm": 0.091,
+"max_container": 747,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PL456CYL": {
+"desc": "4\", 5\", 6\" SET OF 3 PLASTIC CYLINDERS | 3-Piece per SET / 12-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 31.56,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PL456CYL-WH": {
+"desc": "4\", 5\", 6\" SET/3 WHITE PLASTIC CYLINDER | 3-Piece per SET / 12-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 31.56,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CST-301-GD": {
+"desc": "12,14,16\" SET OF 3 GOLD CANDLE HOLDERS | 1 SET PER BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 16.3,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"VCAND-10WH": {
+"desc": "10 HOUR VOTIVE CANDLE | 72-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"CAND3T-FALL": {
+"desc": "3-TONE FALL PILLAR CANDLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.8,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"PL-NAPHOLDER": {
+"desc": "7X7X2.5\" ACRYLIC NAPKIN HOLDER |18 PC/ CASE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.4,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "JAYI ACRYLIC LTD",
+"email": null,
+"country": "China",
+"city": "CENTRAL HONG KONG",
+"street": "RM 301 7A 3F HONGKONG TRADE CTR",
+"port": "YANTIAN",
+"lead": 150
+},
+"40VEL-RGE": {
+"desc": "2 1/2\" RED WIRED GOLD EDGE | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.1,
+"cbm": 0.0038,
+"max_container": 17894,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"FTAPE": {
+"desc": "1/2\" FIBER TAPE | 12 Roll Per Pack / 12 Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.56,
+"cbm": 0.0002,
+"max_container": 340000,
+"vendor": "MKAY PACKAGING",
+"email": "accounting@mkaypkg.com",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "1439 OCEAN AVENUE",
+"port": null,
+"lead": 50
+},
+"TLG-01": {
+"desc": "UNFILLED VOTIVE GLASS | 24-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 24,
+"first_cost": 7.68,
+"cbm": 0.015,
+"max_container": 4533,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"MADJ": {
+"desc": "MEDIUM ADJUSTABLE PACKER | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 31.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FREEDMAN PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "BROOKLYN",
+"street": "454 LIVONIA AVENUE",
+"port": null,
+"lead": 50
+},
+"SETOF4-CAN": {
+"desc": "CYLINDER WITH CANDLE 6\",8\",9\",11\" | 4-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 4,
+"first_cost": 5.87,
+"cbm": 0.0904,
+"max_container": 752,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL510": {
+"desc": "5\"X10\" CYLINDER CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.52,
+"cbm": 0.0634,
+"max_container": 1072,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40VEL-RRE": {
+"desc": "2 1/2\" RED WIRED REDEDGE | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.1,
+"cbm": 0.0038,
+"max_container": 17894,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SPAN": {
+"desc": "SPANISH MOSS | 3-Pounds per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEMEX",
+"email": null,
+"country": "Mexico",
+"city": null,
+"street": null,
+"port": null,
+"lead": 50
+},
+"R9CARD": {
+"desc": "9\" CARDETTES | 100-Piece per Bag / 1000-Piece per Box",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 8.6,
+"cbm": 0.014,
+"max_container": 4857,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RWAX-LBL": {
+"desc": "WAX TISSUE LIGHT BLUE 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"VCAND-10IV": {
+"desc": "10 HOUR VOTIVE CANDLE IVORY | 72-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 10.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"FLORALFOAM-6": {
+"desc": "6 BRICK FLORAL FOAM | 6-Piece per Pack / 8 Packs per case",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 2.3,
+"cbm": 0.0075,
+"max_container": 9066,
+"vendor": "TECNOFEN",
+"email": "VANESSA.SANTACRUZ@TECNOFEN.COM.MX",
+"country": "Mexico",
+"city": "SAN NATEO ATENCO",
+"street": "INDEPENDENCIA 1458, COL SAN ANTONIO",
+"port": null,
+"lead": 50
+},
+"9LP": {
+"desc": "9\" DESIGN DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 10.2,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CEL3020": {
+"desc": "30\" CELLOPHANE 2.0 MIL | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 31.48,
+"cbm": 0.0312,
+"max_container": 2179,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"CAND12-BK-12": {
+"desc": "12\" BLACK TAPERS | 12-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.26,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"AZ28": {
+"desc": "28\" X 8\" EVENT VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 28.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"FCAND3-WH-72": {
+"desc": "3\" FLOATING CANDLE | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 30.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"2PVC": {
+"desc": "2\" PACKING TAPE X 110 YARDS | 6-Roll per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7.02,
+"cbm": 8e-05,
+"max_container": 32692,
+"vendor": "JIANGMEN NEWERA PACKING MATERIAL CO",
+"email": null,
+"country": "China",
+"city": "GUANGDONG 330300",
+"street": "LTD NO 1 JIAOXING WESTROADJIAO",
+"port": null,
+"lead": 0
+},
+"PL456": {
+"desc": "4\", 5\", 6\" SET OF 3 PLASTIC CUBES | 12-SET Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 41.64,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-PLACE-HEX": {
+"desc": "HEXAGON ACRYLIC PLACECARDS | 20-Piece per Box / 32 Boxes Per Case",
+"unit": "Box",
+"qty_per_unit": 20,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JAYI ACRYLIC LTD",
+"email": null,
+"country": "China",
+"city": "CENTRAL HONG KONG",
+"street": "RM 301 7A 3F HONGKONG TRADE CTR",
+"port": "YANTIAN",
+"lead": 150
+},
+"CAND3T-SANG": {
+"desc": "3 TONE SANGRIA PILLAR CANDLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.8,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"FCAND2-WH-72": {
+"desc": "2\" FLOATING WHITE CANDLES | 72-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 72,
+"first_cost": 20.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"LRV3": {
+"desc": "4\" CLEAR ROSE VIAL | 500-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 500,
+"first_cost": 12.6,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CAND10-BK-12": {
+"desc": "10\" BLACK TAPERS | 12-Piece per BOX / 12-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 2.76,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"SSAD": {
+"desc": "SINGLE SADDLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.32,
+"cbm": 0.018,
+"max_container": 3777,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PCEM": {
+"desc": "PLASTIC CEMETERY CONES | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 8.64,
+"cbm": 0.0232,
+"max_container": 2931,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-CYL510-12": {
+"desc": "5X10 PLASTIC CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.4,
+"cbm": 0.067,
+"max_container": 1014,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CRV2PC": {
+"desc": "3\" CLEAR ROSE VIAL PRE-CAPPED | 1000-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 19.6,
+"cbm": 0.0321,
+"max_container": 2118,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM972C": {
+"desc": "8\" HALF DOZEN ROSE VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.44,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RP40-RED": {
+"desc": "ROYAL 2 3/4\"X100YD RED POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SGV01F-36": {
+"desc": "PREFILLED SHOT GLASS VOTIVE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 10.8,
+"cbm": 0.0114,
+"max_container": 5964,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"BASX2": {
+"desc": "BASIN VASE SET OF 2 | 6 SET PER BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 15,
+"cbm": 0.074,
+"max_container": 918,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"OY01": {
+"desc": "OYSTER VOTIVE GLASS | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 3.24,
+"cbm": 0.011,
+"max_container": 6181,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CYL508": {
+"desc": "5\"X8\" CYLINDER CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.92,
+"cbm": 0.0506,
+"max_container": 1343,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CEL2420": {
+"desc": "24\" CELLOPHANE 2.0 MIL | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.62,
+"cbm": 0.025,
+"max_container": 2720,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"MR": {
+"desc": "MINI ROSARY | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"PL-REC4412": {
+"desc": "4X4X12 PLASTIC RECTANGLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.8,
+"cbm": 0.052,
+"max_container": 1307,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CARN-WH": {
+"desc": "3 1/2\" WHITE CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CEL3012": {
+"desc": "30\" CELLOPHANE 1.2 MIL | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19.47,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"BX-GD": {
+"desc": "LATEX BALLOON GOLD | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"FRP01": {
+"desc": "PREFILLED ROLY POLY VOTIVE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 13.32,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CEL3016": {
+"desc": "30\" CELLOPHANE 1.6 MIL | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.5,
+"cbm": 0.0266,
+"max_container": 2556,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"SGV01MS": {
+"desc": "UNFILLED MERCURY VOTIVE SILVER/GOLD | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 8.28,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CARN-RD": {
+"desc": "3 1/2\" RED CARNATION | 100-Piece Per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZTOV12-MIR": {
+"desc": "10\" OVAL MIRROR X 5\"X\" OPEN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 54.24,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LRIBB": {
+"desc": "ASPIDISTRA GREEN LEAF RIBBON 4\" | 50-Yards Per Roll / 12-Rolls Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.35,
+"cbm": 0.0011,
+"max_container": 61818,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"BWRST": {
+"desc": "BULK WRISTLETS | 144-Piece per Pack / 25-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 15.84,
+"cbm": 0.0024,
+"max_container": 28333,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"PL666": {
+"desc": "6X6X6 PLASTIC CUBES | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 18.6,
+"cbm": 0.0478,
+"max_container": 1422,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RLIGHT-36": {
+"desc": "SUBMERSIBLE LED LIGHTS | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 5.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"ACCX3-GD": {
+"desc": "SET OF 3 CANDLE HOLDER- GOLD BASE | 3-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 8,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CYL420": {
+"desc": "4''X20'' CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24,
+"cbm": 0.081,
+"max_container": 839,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-AND": {
+"desc": "GOLD WORD - AND | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-SQ5510W-12": {
+"desc": "5X5X10 PLASTIC TALL SQUARE WHITE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 22.2,
+"cbm": 0.066,
+"max_container": 1030,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL414": {
+"desc": "4''X14'' CYLINDER CLEAR | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 18,
+"cbm": 0.062,
+"max_container": 1096,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"VCAND-15IV": {
+"desc": "15 HOUR IVORY VOTIVE CANDLE | 36-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 6.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"SCRIPT-DADDY": {
+"desc": "GOLD WORD - DADDY | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"GL14401": {
+"desc": "ALUMINUM 9 LED FLASHLIGHT | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"GL20WH": {
+"desc": "GLASS EIFFEL TOWER VASE WHITE 20\" | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 61.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"HURX3": {
+"desc": "HURX3 - CLEAR GLASS VASES | 3-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 2.93,
+"cbm": 0.0123,
+"max_container": 5528,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"ACR1-GD": {
+"desc": "ACRYLIC COLOR ROCKS GOLD | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.96,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"PL6CYL-WH": {
+"desc": "6X6X6 WHITE PLASTIC CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 21,
+"cbm": 0.0528,
+"max_container": 1287,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL311": {
+"desc": "3.5\"X10.5\" CLEAR CLYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 12.6,
+"cbm": 0.039,
+"max_container": 1743,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40VEL-BBE": {
+"desc": "2 1/2\" BURGANDY WIRED | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.1,
+"cbm": 0.0038,
+"max_container": 17894,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SGV01SV": {
+"desc": "UNFILLED MERCURY VOTIVE SILVER GLASS | 36-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 5.4,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"7WST": {
+"desc": "7\" WIRED GREEN STICKS | 250-Piece per Pack / 8-Pack per Case / 32-Pack per Master",
+"unit": "Pack",
+"qty_per_unit": 250,
+"first_cost": 1.64,
+"cbm": 0.0014,
+"max_container": 48571,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"LY27RD": {
+"desc": "11\" RED URN VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 8.52,
+"cbm": 0.0549,
+"max_container": 1238,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"1532": {
+"desc": "FLORAL ADHESIVE GLUE TUBE | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-MOTHER": {
+"desc": "GOLD WORD - MOTHER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"FCAND3-WH-12": {
+"desc": "3\" FLOATING CANDLE - WHITE | 12-Piece per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 5.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"LY27GD": {
+"desc": "11\" GOLD URN VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 11.4,
+"cbm": 0.0549,
+"max_container": 1238,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"774": {
+"desc": "7X7X4 DELIVERY BOX | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 27.03,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FREEDMAN PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "BROOKLYN",
+"street": "454 LIVONIA AVENUE",
+"port": null,
+"lead": 50
+},
+"CEL2412": {
+"desc": "24\" CELLOPHANE 1.2 MIL | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 15.64,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"LY27C": {
+"desc": "11\" CLEAR URN VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 6.6,
+"cbm": 0.0549,
+"max_container": 1238,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CL-536-BK": {
+"desc": "36\" BLACK STAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 40,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL88": {
+"desc": "8x8x8 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12.54,
+"cbm": 0.0633,
+"max_container": 1074,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL4412-ETCH-GD": {
+"desc": "4X4X12 CYLINDER ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.2,
+"cbm": 0.0542,
+"max_container": 1254,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CARN-PU": {
+"desc": "3 1/2\" PURPLE CARNATION PK | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"H1827": {
+"desc": "24\" MACHE BACK OPEN OASIS HEART | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 18.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3WST": {
+"desc": "3\" WIRED GREEN STICKS | 400-Piece per Pack / 20-Pack per Case / 80-Pack per Master",
+"unit": "Pack",
+"qty_per_unit": 400,
+"first_cost": 2.13,
+"cbm": 0.0007,
+"max_container": 97142,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RWAX-YEL": {
+"desc": "WAX TISSUE YELLOW 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.0418,
+"max_container": 1626,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"SROSE-RD": {
+"desc": "SINGLE RED ROSE | 12-Piece per Pack / 20-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.12,
+"cbm": 0.0158,
+"max_container": 4303,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"WBEAD": {
+"desc": "WATER BEADS | 500-Grams per Bottle / 12-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 2.39,
+"cbm": 0.00113,
+"max_container": 60176,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CRV2": {
+"desc": "3\" CLEAR ROSE VIAL | 1000-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 18.8,
+"cbm": 0.03552,
+"max_container": 1914,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"EXT2": {
+"desc": "4\" EXTENDABLE WATER TUBE | 1000-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 15.5,
+"cbm": 0.0352,
+"max_container": 1931,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL309": {
+"desc": "3.5\"X9\" CLEAR CLYLINDER PK 12 [Case] | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.96,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL512": {
+"desc": "5\" X 12\" CYLINDER CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.9,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PL6CYL": {
+"desc": "6X6X6 PLASTIC CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 12.6,
+"cbm": 0.0528,
+"max_container": 1287,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM973C": {
+"desc": "9\" DOZEN ROSE VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.64,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PLNT-FIDDLE-LG": {
+"desc": "FIDDLE LEAF FIG - LARGE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.76,
+"cbm": 0.016,
+"max_container": 4250,
+"vendor": "ZHEJIANG JIAWEI ARTS & CRAFTS CO.,LTD",
+"email": null,
+"country": "China",
+"city": null,
+"street": "Park, Dongyang, Zhejiang, China",
+"port": "SHENZHEN",
+"lead": 150
+},
+"CYL55-PK48": {
+"desc": "5X5X5 CYLINDER | 48-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 48,
+"first_cost": 47.04,
+"cbm": 0.068,
+"max_container": 1000,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"J7F": {
+"desc": "GREEN UTILITY DISH | 36 PC per Pack / 3-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.84,
+"cbm": 0.02123,
+"max_container": 3203,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40SHEER-GD": {
+"desc": "2 1/2\" GOLD WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"FT5WH": {
+"desc": "1/2\" WHITE FLORAL TAPE | 12-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"212-200-09": {
+"desc": "12\" SAUCER CRYSTAL PK 10",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 127.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PL666-WH-12": {
+"desc": "6X6X6 WHITE PLASTIC CUBE | 12 Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 19.2,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"LY27SV": {
+"desc": "11\" SILVER URN VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 10.14,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"AMZREC4412-MIR": {
+"desc": "RECTANGLE MIRROR VASE 4X4X12 | 6-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 35.46,
+"cbm": 0.065,
+"max_container": 1046,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"FCAND3-WH-PK24": {
+"desc": "FCAND3-WH | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 10.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"CARN-RBL": {
+"desc": "3 1/2\" ROYAL BLUE CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CAND10-WH-36": {
+"desc": "10\" WHITE TAPERS | 36-Piece Per Pack / 4-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 5.35,
+"cbm": 0.0075,
+"max_container": 9066,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"PL-RECDIV": {
+"desc": "PLASTIC 3 PART DIVIDER | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 25.6,
+"cbm": 0.08,
+"max_container": 850,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"FCAND2-WH": {
+"desc": "2\" FLOATING CANDLES | 144-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 144,
+"first_cost": 44.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"CARN-HTPK": {
+"desc": "3 1/2\"HOT PINK CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-SQ4510-12": {
+"desc": "4X5X10 PLASTIC TALL SQUARE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 22.2,
+"cbm": 0.0458,
+"max_container": 1484,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CARN-IV": {
+"desc": "3 1/2\" IVORY CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"V1830": {
+"desc": "12\" ROSE VASE X 6\" OPENING | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.1,
+"cbm": 0.075,
+"max_container": 906,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"MM39C": {
+"desc": "8\" X 4.5\" SQUARE GATHERING VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.96,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R965C": {
+"desc": "9X6X5 CORSAGE BOX | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 12,
+"cbm": 0.0293,
+"max_container": 2320,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CARN-GR": {
+"desc": "3 1/2\" GREEN CARNATION | 100-Piece Per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"RWAX-GRN": {
+"desc": "WAX TISSUE PAPER 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"40CHECK-BKWH": {
+"desc": "2 1/2\" WIRED BLACK/WHITE CHECKERED RIBBON | 50-Yards Per Roll / 12-Rolls Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.13,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CL-536-GD": {
+"desc": "36\" GOLD STAND [Piece] | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 40,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"1BOPP": {
+"desc": "1\" CLEAR ADHESIVE TAPE | 12-Roll per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JIANGMEN NEWERA PACKING MATERIAL CO",
+"email": null,
+"country": "China",
+"city": "GUANGDONG 330300",
+"street": "LTD NO 1 JIAOXING WESTROADJIAO",
+"port": null,
+"lead": 0
+},
+"6LP": {
+"desc": "6\" DESIGN DISH | 24-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 24,
+"first_cost": 4.56,
+"cbm": 0.0068,
+"max_container": 10000,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"VCAND-15WH": {
+"desc": "15 HOUR WHITE VOTIVE CANDLE | 36-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 6.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"60EASEL": {
+"desc": "60\" EASELS (5 Feet) | 5-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 14.25,
+"cbm": 0.0435,
+"max_container": 1563,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"11PP": {
+"desc": "11\" PIE PLATE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 12.72,
+"cbm": 0.0169,
+"max_container": 4023,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"6002-48-07": {
+"desc": "AQUAFOAM BRICK - GREEN | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 21.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CL-SPD-GD": {
+"desc": "36' GOLD STAND [Piece] | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 25,
+"cbm": 0.09011,
+"max_container": 754,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"CAND12-IV-12": {
+"desc": "12\" IVORY TAPERS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.23,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"FTAPE-1": {
+"desc": "1\" FIBER TAPE | 12-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JIANGMEN NEWERA PACKING MATERIAL CO",
+"email": null,
+"country": "China",
+"city": "GUANGDONG 330300",
+"street": "LTD NO 1 JIAOXING WESTROADJIAO",
+"port": null,
+"lead": 0
+},
+"LR": {
+"desc": "LARGE EMPTY ROSARY - 53 BEAD | 1-Piece Per Pack / 20-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.63,
+"cbm": 0.0017,
+"max_container": 40000,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"RWAX-ORG": {
+"desc": "WAX TISSUE ORANGE 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"W22X18G": {
+"desc": "22 GAUGE X 18 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.55,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"LRV3PC": {
+"desc": "4\" CLEAR ROSE VIAL PRECAPPED | 500-Piece per Box",
+"unit": "Box",
+"qty_per_unit": 500,
+"first_cost": 14,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL814": {
+"desc": "8\" X 14\" CYLINDER CLEAR | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 13.84,
+"cbm": 0.075,
+"max_container": 906,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"GGTUBE": {
+"desc": "GREEN GERBERA TUBE | 250-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 250,
+"first_cost": 0.96,
+"cbm": 0.00628,
+"max_container": 10828,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"8HPC-NAT": {
+"desc": "8\" HARD WICKER POT COVER - NATURAL | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.76,
+"cbm": 0.0588,
+"max_container": 1156,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RTING-OPAL": {
+"desc": "CURLY TING OPAL PK 25",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 52.5,
+"cbm": 0.0625,
+"max_container": 1088,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CARN-YEL": {
+"desc": "3 1/2\" YELLOW CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"RWAX-APG": {
+"desc": "WAX TISSUE APPLE GREEN 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"FT1WH": {
+"desc": "1\" WHITE FLORAL TAPE | 6RL PER Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"F06028-CL": {
+"desc": "OVAL GLASS VASE CLEAR 14 1/2\" X 3.75\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 42,
+"cbm": 0.066,
+"max_container": 1030,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"FCAND3-WH-PK36": {
+"desc": "FCAND3-WH | 36-Piece Per Pack",
+"unit": "Units",
+"qty_per_unit": 36,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"12HPC-WW": {
+"desc": "12\" HWPC -WHITE WASH | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.8,
+"cbm": 0.138,
+"max_container": 492,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"PF4": {
+"desc": "PRECAPPED 4\" WATER TUBE | 1000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 16.4,
+"cbm": 0.03546,
+"max_container": 1917,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"V0272": {
+"desc": "GLASS PEDESTAL BOWL 7 1/2\" | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 12.36,
+"cbm": 0.0741,
+"max_container": 917,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"LY28": {
+"desc": "9.25\" X 6\" OPEN VASE |12 Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 17.28,
+"cbm": 0.075,
+"max_container": 906,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"CL-SPD-BK": {
+"desc": "36\" BLACK STAND [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0.09011,
+"max_container": 754,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL416": {
+"desc": "4''X16'' CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.8,
+"cbm": 0.067,
+"max_container": 1014,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"P6R": {
+"desc": "7\" FUNERAL BASKET | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.56,
+"cbm": 0.106,
+"max_container": 641,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CS-SET-GD": {
+"desc": "SET OF 2 RING & TALL RECTANGLE GOLD | 2-Piece per Set",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 12.09,
+"cbm": 0.07336,
+"max_container": 926,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"F06028-WH": {
+"desc": "OVAL GLASS VASE WHITE 14 1/2\" X 3.75\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 42.72,
+"cbm": 0.066,
+"max_container": 1030,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"8UWST": {
+"desc": "8\" UNWIRED GREEN STICKS | 1000-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 3.5,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"V1740": {
+"desc": "12\" ROSE VASE X 6\" OPENING | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.86,
+"cbm": 0.067,
+"max_container": 1014,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CARN-LAV": {
+"desc": "3 1/2\" LAVENDER CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"6WST": {
+"desc": "6\" WIRED GREEN STICKS | 750-Piece Per Bag / 4-Bag per Case / 16-Bag Per Master",
+"unit": "Bag",
+"qty_per_unit": 750,
+"first_cost": 2.22,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CAND10-IV-36": {
+"desc": "10\" IVORY TAPERS | 36-Piece per BOX / 4-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 5.35,
+"cbm": 0.0075,
+"max_container": 9066,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"CYL804": {
+"desc": "8\" X 4\" LOW CYLINDER CLEAR | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 14,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SHEER-RD": {
+"desc": "2 1/2\" RED WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"9VEL-RRE": {
+"desc": "1 1/2\" RED WIRED RED EDGE | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.31,
+"cbm": 0.00264,
+"max_container": 25757,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40CHECK-RDBK": {
+"desc": "2 1/2\" WIRED RED/BLACK CHECKERED RIBBON | 50-Yards Per Roll / 12-Rolls Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.13,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40VEL-GGE": {
+"desc": "2 1/2\" GREEN WIRED GREENEDGE | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.1,
+"cbm": 0.0038,
+"max_container": 17894,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"BHYD-GR": {
+"desc": "SILK HYDRANGEA GREEN | 5-Heads per Bunch/ 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"EG610": {
+"desc": "10\" x 6\" OPEN VASE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 16.32,
+"cbm": 0.108,
+"max_container": 629,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"FT1GR": {
+"desc": "1\" GREEN FLORAL TAPE | 6-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"12HPC": {
+"desc": "12\" HWPC - NATURAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.8,
+"cbm": 0.138,
+"max_container": 492,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"8HPC-WW": {
+"desc": "8\" HARD WICKER POT COVER - WHITE WASH | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.76,
+"cbm": 0.0588,
+"max_container": 1156,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"CARN-RWBL": {
+"desc": "3 1/2\" RED WHITE BLUE CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL507": {
+"desc": "5\" X 7\" CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 10.8,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CEL2416": {
+"desc": "24\" CELLOPHANE 1.6 MIL | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20.76,
+"cbm": 0.0213,
+"max_container": 3192,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"H1825": {
+"desc": "18\" MACHE BACK OPEN OASIS HEART | 2-Piece Per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 13.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"228-200-09": {
+"desc": "8\" DEEP LINERS | 25-Piece per BAG / 8-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 25,
+"first_cost": 11.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9DFS-RD": {
+"desc": "#9 DOUBLE FACED SATIN - HOT RED | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CAND10-WH-12": {
+"desc": "10\" WHITE TAPERS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.73,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"CYL55": {
+"desc": "5X5X5 CYLINDER PACKED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9,
+"cbm": 0.034,
+"max_container": 2000,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SV01": {
+"desc": "EURO SQUARE VOTIVE GLASS | 36-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 6.3,
+"cbm": 0.009,
+"max_container": 7555,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"RWAX-AZ": {
+"desc": null,
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-OV4412": {
+"desc": "4X4X12 PLASTIC OVAL | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 17.4,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RP40-WH": {
+"desc": "ROYAL 2 3/4\"X100YD WHITE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"STPL": {
+"desc": "STANDARD STAPLES | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"MM21-RED": {
+"desc": "RED GLASS VASE - 4.33 X 7\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.76,
+"cbm": 0.0296,
+"max_container": 2297,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"6UWST": {
+"desc": "6\" UNWIRED GREEN STICKS | 1000-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 3.4,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"4WST": {
+"desc": "4\" WIRED GREEN STICKS | 375-Piece per Pack / 12-Pack per Case / 48-Pack per Master",
+"unit": "Pack",
+"qty_per_unit": 375,
+"first_cost": 2.25,
+"cbm": 0.0022,
+"max_container": 30909,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RPETAL-RD": {
+"desc": "ROSE PETALS RED | 1000-Piece per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 1000,
+"first_cost": 1.14,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CAND10-IV-12": {
+"desc": "10\" IVORY TAPERS | 12-Piece Per BOX / 12-BOX Per Case",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 2.73,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"SCRIPT-LOVING": {
+"desc": "GOLD WORD - LOVING | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"LFR-PIN": {
+"desc": "LARGE PINK ROSARY SILK FLOWER FILLED - 53 BEAD | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.87,
+"cbm": 0.0063,
+"max_container": 10793,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"REC4412-MIR": {
+"desc": "RECTANGLE MIRROR VASE 4X4X12 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27.9,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PCP": {
+"desc": "PRECAPPED PT2- 4\" POINTED WATER TUBE | 1000-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 16.2,
+"cbm": 0.0355,
+"max_container": 1915,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"10HPC-NAT": {
+"desc": "10\" HARD WICKER POT COVER - NATURAL | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.32,
+"cbm": 0.084,
+"max_container": 809,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RBWIRE-GR": {
+"desc": "BIND WIRE GREEN | 675-Feet Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.68,
+"cbm": 0.00084,
+"max_container": 80952,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"MM100C": {
+"desc": "9\" X 4\" VERTICAL SWIRL VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.4,
+"cbm": 0.052,
+"max_container": 1307,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"66EASEL": {
+"desc": "66\" EASELS (5 1/2 Feet) | 5-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 15.4,
+"cbm": 0.055,
+"max_container": 1236,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"40WIRED-PLA": {
+"desc": "2 1/2\" RED PLAID GOLD EDGE WIRED | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.13,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R93C": {
+"desc": "7 1/2\" GINGER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.4,
+"cbm": 0.0728,
+"max_container": 934,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"R543C": {
+"desc": "5X4X3 CORSAGE BOX | 200-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 200,
+"first_cost": 12,
+"cbm": 0.0252,
+"max_container": 2698,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZREC4412": {
+"desc": "RECTANGLE VASE 4X4X12 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 24.54,
+"cbm": 0.063,
+"max_container": 1079,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"REC4418-MIR-12": {
+"desc": "RECTANGLE VASE MIRROR 4X4X18 PACKED 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 60,
+"cbm": 0.09,
+"max_container": 755,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"12CANDRED": {
+"desc": "12\" CANDLES RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"CAND12-IV-36": {
+"desc": "12\" IVORY TAPERS PK 36 [Box] | 36-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 6.42,
+"cbm": 0.009,
+"max_container": 7555,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"9MET-GD": {
+"desc": "1 1/2\" GOLD METALLIC | 25-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.78,
+"cbm": 0.00054,
+"max_container": 125925,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"R5111": {
+"desc": "12\"HT X 6.5\"OP GATHERING | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 16.5,
+"cbm": 0.0771,
+"max_container": 881,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"LFR-RD": {
+"desc": "LARGE RED ROSARY SILK FLOWER FILLED - 53 BEAD | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.87,
+"cbm": 0.0063,
+"max_container": 10793,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"W1840": {
+"desc": "18\" MACHE BACK OASIS WREATH | 2-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 15.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL418": {
+"desc": "4\" X 18\" CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.8,
+"cbm": 0.077,
+"max_container": 883,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL524": {
+"desc": "5\" X 24\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 16.62,
+"cbm": 0.073,
+"max_container": 931,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-MOM": {
+"desc": "GOLD WORD - MOM | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"FLORALFOAM-2": {
+"desc": "2 BRICK FLORAL FOAM | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 1.05,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "TECNOFEN",
+"email": "VANESSA.SANTACRUZ@TECNOFEN.COM.MX",
+"country": "Mexico",
+"city": "SAN NATEO ATENCO",
+"street": "INDEPENDENCIA 1458, COL SAN ANTONIO",
+"port": null,
+"lead": 50
+},
+"AMZSQ12": {
+"desc": "12X12 GLASS PLATE SQUARE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 23.97,
+"cbm": 0.105,
+"max_container": 647,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40BURL": {
+"desc": "2 1/2\" BURLAP RIBBON W/ WIRED EDGE | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0.00389,
+"max_container": 17480,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"AMZSKEWER": {
+"desc": "METAL BBQ SKEWERS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ANPING COUNTY XINGWEI METAL WIRE MESH",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "WANGEZHUANG DEVELOPMENT AREA ANPING",
+"port": "TIANJIN",
+"lead": 150
+},
+"18PST": {
+"desc": "18\" GREEN PLANT STAKES | 1000-Piece per Pack / 3-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 10.25,
+"cbm": 0.0173,
+"max_container": 3930,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"ROCK-LRG-BK": {
+"desc": "LARGE BLACK ROCKS 15-25MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-BELOVED": {
+"desc": "GOLD WORD - BELOVED | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL518": {
+"desc": "5\" X 18\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12.6,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PL-CYL508": {
+"desc": "5X8 PLASTIC CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 17.04,
+"cbm": 0.05295,
+"max_container": 1284,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-SUPSIL": {
+"desc": "SPRAY DYE SUPER SILVER | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"FT5GR": {
+"desc": "1/2\" GREEN FLORAL TAPE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"9SHEER-RD": {
+"desc": "1 1/2\" RED WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"HV12-6": {
+"desc": "12\" HURRICANE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15.78,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"GL4412": {
+"desc": "4X4X12\" RECTANGLE GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 38.76,
+"cbm": 0.059,
+"max_container": 1152,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"SBSLV": {
+"desc": "SMALL BOUQ SLEEVES ASSORTED COLORS | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"AMZMMGSTRAIGHT": {
+"desc": "5\" X 2\" X 14\" MIRROR GLASS VASE | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 25.8,
+"cbm": 0.055,
+"max_container": 1236,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL306": {
+"desc": "3.5\"X6\" CLEAR CLYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 6.72,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"H220RD": {
+"desc": "12\" HEART VASE RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 23.52,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"MM99PK": {
+"desc": "8\" BUNCH VASE PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"ROCK-SML-BK": {
+"desc": "SMALL BLACK ROCKS 8-15MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"ADH.25G": {
+"desc": "1/4\" GREEN ADHESIVE TAPE | 60-Yards per Roll / 48-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.97,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"SQ4510": {
+"desc": "4X5X10 SQUARE TAPERED VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 21.72,
+"cbm": 0.0658,
+"max_container": 1033,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MINISROSE-RD": {
+"desc": "MINIROSE STEM - RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.24,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GTUBE": {
+"desc": "CLEAR GERBERA TUBE | 250-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 250,
+"first_cost": 0.96,
+"cbm": 0.00628,
+"max_container": 10828,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"WDISC-4": {
+"desc": "WOOD DISCS | 4-Piece Per Set / 6 Sets Per Box",
+"unit": "Set",
+"qty_per_unit": 4,
+"first_cost": 4.6,
+"cbm": 0.00992,
+"max_container": 6854,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"PLNT-SENSCIO": {
+"desc": "SENECIO ROWLEYANUS | 2-Piece per Pack / 18 Packs Per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 2.67,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "ZHEJIANG JIAWEI ARTS & CRAFTS CO.,LTD",
+"email": null,
+"country": "China",
+"city": null,
+"street": "Park, Dongyang, Zhejiang, China",
+"port": "SHENZHEN",
+"lead": 150
+},
+"OV10": {
+"desc": "5 x H10\"OVAL VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.08,
+"cbm": 0.097,
+"max_container": 701,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"40MET-GD": {
+"desc": "2 1/2\" GOLD METALLIC | 25-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.81,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"BXB8-CLR": {
+"desc": "8\" BUBBLE BALL CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.64,
+"cbm": 0.089,
+"max_container": 764,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"FL68-DS": {
+"desc": "SET OF 4 SHALLOW HANDLED BASKET 19\",16\",15\",12\" | / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": null,
+"first_cost": 6.55,
+"cbm": 0.0413,
+"max_container": 1646,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"R1205": {
+"desc": "12\" x 5\" EURO VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.5,
+"cbm": 0.07,
+"max_container": 971,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"RWAX-LAV": {
+"desc": "WAX TISSUE LAVENDER 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"CRV2PC-PK25": {
+"desc": "3\" CLEAR ROSE VIAL PRE-CAPPED | 25 Piece Per Bag / 40 Bags Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 20.58,
+"cbm": 0.00089,
+"max_container": 76404,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RB8GD": {
+"desc": "GOLD REVERE BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 24,
+"cbm": 0.0533,
+"max_container": 1275,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RTING-GD": {
+"desc": "CURLY TING GOLD | 75-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 75,
+"first_cost": 2.1,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CH-LOOP18-GD": {
+"desc": "18\" HT GOLD LOOP CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SHEER-RBL": {
+"desc": "2 1/2\" ROYAL BLUE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"PL-PLACE-RECT": {
+"desc": "ACRYLIC PLACE CARDS IN RECTANGLE SHAPE | 20-Piece per BOX / 32-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 20,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JAYI ACRYLIC LTD",
+"email": null,
+"country": "China",
+"city": "CENTRAL HONG KONG",
+"street": "RM 301 7A 3F HONGKONG TRADE CTR",
+"port": "YANTIAN",
+"lead": 150
+},
+"FM5-CL": {
+"desc": "FLAT MARBLES CLEAR | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.26,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GL502181BK": {
+"desc": "LARGER PLASTIC TAPE DISPENSER BLACK | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.4,
+"cbm": 0.00225,
+"max_container": 30222,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"RB11": {
+"desc": "6 x H11\" BUBBLE VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.8,
+"cbm": 0.11,
+"max_container": 618,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM99RD": {
+"desc": "8\" BUNCH VASE RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CARN-LBL": {
+"desc": "3 1/2\" LIGHT BLUE CARNATION | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CH-LOOP24-GD": {
+"desc": "24\" HT GOLD LOOP CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 11.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"L8": {
+"desc": "8\" PRUNER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 9.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"MM100RD": {
+"desc": "9\" X 4\" RED VERTICAL SWIRL VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.84,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RVS812": {
+"desc": "12\" X 8\" HURRICANE VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 11.97,
+"cbm": 0.0877,
+"max_container": 775,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"24PSTN": {
+"desc": "24\" NATURAL PLANT STAKES | 500-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 500,
+"first_cost": 7.22,
+"cbm": 0.038,
+"max_container": 1789,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-CYL804": {
+"desc": "4X8 PLASTIC CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18.36,
+"cbm": 0.0687,
+"max_container": 989,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"TOV12-MIR": {
+"desc": "10\" OVAL MIRROR X 5\"X\" OPEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 44.52,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"2X9PILL-12": {
+"desc": "2X9 PILLAR CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"BSK-816": {
+"desc": "8\" X 16\" FRIDGE BUCKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.28,
+"cbm": 0.767,
+"max_container": 88,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CST-812-GD": {
+"desc": "8 & 12\" SET OF 2 CANDLE STEM HOLDER | 2-Piece per SET",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 4.47,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"RLIGHT-24": {
+"desc": "SUBMERSIBLE LED LIGHTS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL608-12": {
+"desc": "6\" X 8\" CYLINDER CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.32,
+"cbm": 0.0146,
+"max_container": 4657,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"FOAMBALL-8": {
+"desc": "8\" FLORAL FOAM SPHERES | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 19.9,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "TECNOFEN",
+"email": "VANESSA.SANTACRUZ@TECNOFEN.COM.MX",
+"country": "Mexico",
+"city": "SAN NATEO ATENCO",
+"street": "INDEPENDENCIA 1458, COL SAN ANTONIO",
+"port": null,
+"lead": 50
+},
+"RTING-IR": {
+"desc": "CURLY TING IRRIDECENT | 75-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 75,
+"first_cost": 2.1,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SFR-RD": {
+"desc": "SMALL RED ROSARY SILK FLOWER FILLED - 53 BEAD | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 11.97,
+"cbm": 0.00632,
+"max_container": 10759,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"REC4412-ETCH-GD-PK6": {
+"desc": "4X4X12L RECTANGLE ETCH- GOLD | 6-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 6,
+"first_cost": 16.5,
+"cbm": 0.01517,
+"max_container": 4482,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"40RAIN": {
+"desc": "2 1/2\" RAINBOW WIRED EDGE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.25,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"TCAND-5": {
+"desc": "5 HR TEALIGHTS IN PLASTIC CUPS | 125-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 125,
+"first_cost": 11.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"DSAD": {
+"desc": "DOUBLE SADDLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.96,
+"cbm": 0.0296,
+"max_container": 2297,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYLBAND": {
+"desc": "9\" x 4\" CYLINDER BAND VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 23.04,
+"cbm": 0.104,
+"max_container": 653,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"B240": {
+"desc": "6\"HT X 2\" OPEN BUD VASE | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 52.8,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"TT": {
+"desc": "1/2\" STATIONERY TESA TAPE | 12-Roll per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MKAY PACKAGING",
+"email": "accounting@mkaypkg.com",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "1439 OCEAN AVENUE",
+"port": null,
+"lead": 50
+},
+"SPCEM-12": {
+"desc": "SMALL PLASTIC CEMETERY CONES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.4,
+"cbm": 0.0186,
+"max_container": 3655,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"ROCK-GRV-NT": {
+"desc": "NATURAL COLOR GRAVEL ROCKS 4-8MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.55,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"FRP01-GD": {
+"desc": "PREFILLED ROLY POLY VOTIVE GOLD | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 23.04,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"MM804-FALL": {
+"desc": "8\" x 4\" FALL MIX VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.68,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"15656": {
+"desc": "CERAMIC SET OF 2 GOLD 6X6X6 & 5X5X5 | 2-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"RBWIRE-NT": {
+"desc": "BIND WIRE NATURAL | 675-Feet Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.68,
+"cbm": 0.00084,
+"max_container": 80952,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CER-BD-2301": {
+"desc": "3 VASE SET - WHITE | 1-SET per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.08,
+"cbm": 0.0103,
+"max_container": 6601,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM99-FALL": {
+"desc": "8\" X 4\" FALL BUNCH VASE PK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.12,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SAND-NAT": {
+"desc": "NATURAL SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"RTING-SV": {
+"desc": "CURLY TING SILVER | 75-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 75,
+"first_cost": 2.1,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL520": {
+"desc": "5\" X 20\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.52,
+"cbm": 0.0635,
+"max_container": 1070,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BOUT-PEARLIZED": {
+"desc": "1 1/2\" PEARL BOUT PIN | 144-Piece per BOX / 10-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 144,
+"first_cost": 1.71,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SHEER-WH": {
+"desc": "2 1/2\" WHITE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40SWRL-GDGD": {
+"desc": "2 1/2\" GOLD W/ GOLD SWIRL RIBBON | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SSPKL-28": {
+"desc": "28\"X5\" SPECKLED SILVER PILSNER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 39.6,
+"cbm": 0.0865,
+"max_container": 786,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"CS-SET-BK": {
+"desc": "SET OF 2 RING & TALL RECTANGLE BLACK | 2-Piece per Set",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 12.09,
+"cbm": 0.07336,
+"max_container": 926,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL424": {
+"desc": "4''X24'' CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.2,
+"cbm": 0.096,
+"max_container": 708,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"WAX-NAT": {
+"desc": "WAX TISSUE NATURAL 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 24.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PCEM-12": {
+"desc": "PLASTIC CEMETERY CONES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.88,
+"cbm": 0.0232,
+"max_container": 2931,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM99C": {
+"desc": "8\" BUNCH VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.72,
+"cbm": 0.039,
+"max_container": 1743,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40DOT-BK": {
+"desc": "2 1/2\" BLACK POLKA DOT WIRED EDGE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"TC2": {
+"desc": "UNIVERSAL PLASTIC CAGE EMPTY | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 52.56,
+"cbm": 0.154,
+"max_container": 441,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM175C": {
+"desc": "10\" CLEAR COLUMN VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.2,
+"cbm": 0.0624,
+"max_container": 1089,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RB8SV": {
+"desc": "SILVER REVERE BOWL | 24-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 24,
+"first_cost": 20.88,
+"cbm": 0.0533,
+"max_container": 1275,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"GSPKL-28": {
+"desc": "28\"X5\" GOLD PILSNER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 39.6,
+"cbm": 0.0865,
+"max_container": 786,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"54EASEL": {
+"desc": "54\" EASELS (4 1/2 Feet) | 5-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 11.95,
+"cbm": 0.0308,
+"max_container": 2207,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"PL-SQ5510-12": {
+"desc": "5X5X10 PLASTIC TALL SQUARE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 22.32,
+"cbm": 0.0551,
+"max_container": 1234,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"11476": {
+"desc": "12\"H x 5\" CERAMIC VASE MATTE WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"AMZCMG-MIR": {
+"desc": "MIRROR GLASS VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 27.64,
+"cbm": 0.081,
+"max_container": 839,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"REC4412-MIR-12": {
+"desc": "RECTANGLE MIRROR VASE 4X4X12 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 48.38,
+"cbm": 0.0638,
+"max_container": 1065,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"226-300-09": {
+"desc": "6\" DEEP LINERS | 25-Piece per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 25,
+"first_cost": 6.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"M88BL": {
+"desc": "8\" X 4\" GATHERING VASE BLUE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CH-RING18-SV": {
+"desc": "18\" HT SILVER RING CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"W102-WH": {
+"desc": "8\" ROUND HANDLED BASKET W/ LINER WHITE | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.84,
+"cbm": 0.0357,
+"max_container": 1904,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"MCDETTE": {
+"desc": "METAL CARDETTES 30CM | 1000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 40,
+"cbm": 0.014,
+"max_container": 4857,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-ROSGLD": {
+"desc": "SPRAY DYE ROSE GOLD | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"V1525C": {
+"desc": "10\" FLARED VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.6,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"MROCK-BK": {
+"desc": "BLACK RIVER ROCKS - 1-3CM,] | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SGV01FSV-72": {
+"desc": "PREFILLED MERCURY VOTIVE SILVER | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 25.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"V0273": {
+"desc": "GLASS PEDESTAL BOWL 9\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.4,
+"cbm": 0.081,
+"max_container": 839,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"9SHEER-GD": {
+"desc": "1 1/2\" GOLD WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SP-GLOWHI": {
+"desc": "SPRAY DYE GLOSSY WHITE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RWAX-BRN": {
+"desc": "WAX TISSUE BROWN 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"MM21-PUR": {
+"desc": "PURPLE GLASS VASE 4.33 X 7\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.76,
+"cbm": 0.0296,
+"max_container": 2297,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BX-BUX": {
+"desc": "LATEX BALLOONS- BLUE MIX | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"BX-PKX": {
+"desc": "LATEX BALLOONS- PINK MIX | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"125LACE": {
+"desc": "36\" WIDE LACE RUNNER | 125-Feet per ROLL / 10-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 17.57,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"V120C": {
+"desc": "10\" MODENA VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.5,
+"cbm": 0.059,
+"max_container": 1152,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CRY-2000": {
+"desc": "CRYSTAL VASE 4.75\" X 12\"H | 6-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 16.02,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"CER-OCEAN-IV": {
+"desc": "CERAMIC IVORY OCEAN VASE 7.5 X 4.5 X 9 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"BSK-813": {
+"desc": "8\" X 13\" FRIDGE BUCKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 89.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CRY-2001": {
+"desc": "CRYSTAL VASE 4.75\" X 12\"H | 6-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 16.02,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"SGV01F": {
+"desc": "PREFILLED SHOT GLASS VOTIVE | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 18.72,
+"cbm": 0.0209,
+"max_container": 3253,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"40WIREDMET-RG": {
+"desc": "2 1/2\" ROSE GOLD METALLIC WIRED | 25-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.75,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"BHYD-BL": {
+"desc": "SILK HYDRANGEA BLUE | 5-Heads per Bunch / 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"24PST": {
+"desc": "24\" GREEN PLANT STAKES | 500-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 500,
+"first_cost": 7.52,
+"cbm": 0.0524,
+"max_container": 1297,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40SHEER-SV": {
+"desc": "2 1/2\" SILVER WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"AMZSQ8": {
+"desc": "8X2X8\" SQUARE PLATE GLASS VASE | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 29.88,
+"cbm": 0.057,
+"max_container": 1192,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"AMZPG3812-CL": {
+"desc": "8LX3WX12H TALL RECTANGLE GLASS VASE CLEAR | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 35.88,
+"cbm": 0.086,
+"max_container": 790,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"WSPOOL26": {
+"desc": "26 GAUGE SPOOL WIRE | 0.5-Pounds per Roll / 12-Roll per Case / 48-Roll per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.89,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"2X6PILL": {
+"desc": "2 X 6 PILLAR CANDLES WHITE | 36-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 39.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"40SNFK-GDGD": {
+"desc": "2 1/2\" GOLD W/ GOLD FLAKE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"BHYD-PU": {
+"desc": "SILK HYDRANGEA PURPLE | 5-Heads per Bunch / 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CRY-2004": {
+"desc": "CRYSTAL VASE 4.75\" X 12\"H | 6-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.74,
+"cbm": 0.079,
+"max_container": 860,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"R55": {
+"desc": "5X5X5 CLEAR CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.96,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CER-SHELL-IV": {
+"desc": "CERAMIC IVORY SHELL VASE 11 X 4 X 7.5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.07,
+"max_container": 971,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"CER-SHELL-GRY": {
+"desc": "CERAMIC GREY SHELL VASE 11 X 4 X 7.5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.07,
+"max_container": 971,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"CARN-LPK": {
+"desc": "3 1/2\" LIGHT PINK CARNATION | 100-Piece Per Pack / 10-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 4.4,
+"cbm": 0.0074,
+"max_container": 9189,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"LY27PU": {
+"desc": "11\" PLUM URN VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 8.52,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"MM100A": {
+"desc": "9\" X 4\" ASST VERTICAL SWIRL FALL ASST | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0.052,
+"max_container": 1307,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-UNCLE": {
+"desc": "GOLD WORD - UNCLE - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"2X9PILL-36": {
+"desc": "2X9 PILLAR CANDLES WHITE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 68.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"PILS-ETCH-SV": {
+"desc": "5X5X12 PILSNER ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 44.16,
+"cbm": 0.075,
+"max_container": 906,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"PILS-ETCH-GD": {
+"desc": "5X5X12 PILSNER ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.2,
+"cbm": 0.079,
+"max_container": 860,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"W23X18G": {
+"desc": "23 GAUGE X 18 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.45,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"72EASEL": {
+"desc": "72\" EASELS (6 Feet) | 5-Piece per Pack / 3-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 20.05,
+"cbm": 0.087,
+"max_container": 781,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"SGV01FMS": {
+"desc": "PREFILLED MERCURY VOTIVE SILVER/ GOLD | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 14.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"12BR": {
+"desc": "12\" BREAD BASKET | 12-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.2,
+"cbm": 0.0456,
+"max_container": 1491,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"WSPOOL23": {
+"desc": "23 GAUGE SPOOL WIRE | 0.5-Pounds per Roll / 12-Roll per Case / 48-Roll per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.81,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"AMZCYL608-PF": {
+"desc": "6X8 Glass Cylinder | 6 Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 9.3,
+"cbm": 0.055,
+"max_container": 1236,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"LY29": {
+"desc": "9.25\" X 6\" OPEN VASE |12 Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 17.28,
+"cbm": 0.075,
+"max_container": 906,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"UGLUE-DASH": {
+"desc": "U-GLUE ADHESIVE DASH | 1000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 24.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LSQ10X4": {
+"desc": "10X10X4\"LOW RECTANGLE PLATE GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.08,
+"cbm": 0.105,
+"max_container": 647,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PL-CYL804-WH": {
+"desc": "4X8 WHITE PLASTIC CYLINDER | 12-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.64,
+"cbm": 0.067,
+"max_container": 1014,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"BGROSE-RD": {
+"desc": "ROSE BOUQUET- RED | 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"225-400-09": {
+"desc": "5\" DEEP LINERS | 25-Piece per BAG / 16-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 25,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MDV": {
+"desc": "7\" MEDIUM WHITE DOVE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.28,
+"cbm": 0.00875,
+"max_container": 7771,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-OV4412W": {
+"desc": "4X4X12 PLASTIC OVAL WHITE | 12-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.4,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"P5R": {
+"desc": "6\" FUNERAL BASKET | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 15.12,
+"cbm": 0.042,
+"max_container": 1619,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"B240-BK": {
+"desc": "6\" HT X 2\" OPEN BLACK BUD VASE | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 67.2,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"B240-WH": {
+"desc": "6\" HT X 2\" OPEN WHITE BUD VASE | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 67.2,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"LRIBB-25": {
+"desc": "ASPIDISTRA GREEN LEAF RIBBON 4\" | 25-Yards Per Roll / 12- Rolls Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"HBALL-GR/RD": {
+"desc": "GREEN/RED TINT HANGING FERN BALL | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.26,
+"cbm": 0.0048,
+"max_container": 14166,
+"vendor": "HOUSE XIAMEN LIMITED",
+"email": null,
+"country": "China",
+"city": "XIAMEN",
+"street": "NO.215-503 DONGHUANG RD",
+"port": null,
+"lead": 150
+},
+"6009": {
+"desc": "29\" X 7\" PEDESTAL VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 27.4,
+"cbm": 0.143,
+"max_container": 475,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"BD210": {
+"desc": "CYLINDER 2\" OPEN X 10\" TALL | 36-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 36,
+"first_cost": 43.2,
+"cbm": 0.073,
+"max_container": 931,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"10HPC-WW": {
+"desc": "10\" HARD WICKER POT COVER - WHITE WASH | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.32,
+"cbm": 0.084,
+"max_container": 809,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"CS-BKGD-16": {
+"desc": "16\" BLACK & GOLD CANDLEHOLDER | 10 Piece Per Case",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 95.1,
+"cbm": 0.077,
+"max_container": 883,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM21-C": {
+"desc": "CLEAR GLASS VASE - 4.33 X 7\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0.0296,
+"max_container": 2297,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"OVL4X8-ETCH-GD-24": {
+"desc": "4HX8L OVAL ETCH- GOLD | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 25.84,
+"cbm": 0.14,
+"max_container": 485,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"AMZCYL612-PF": {
+"desc": "6X12 CYLINDER | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 12.18,
+"cbm": 0.077,
+"max_container": 883,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"35417": {
+"desc": "4\"x14\"H CERAMIC ROUND CYLINDER VASE W/UNEVEN LIP & EMBOSSED PATTERN-MATTE WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"R654C": {
+"desc": "6X5X4 BOUTONNIERE BOX | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 7.3,
+"cbm": 0.0177,
+"max_container": 3841,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"663": {
+"desc": "6X6X3 DELIVERY BOX | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 21.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FREEDMAN PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "BROOKLYN",
+"street": "454 LIVONIA AVENUE",
+"port": null,
+"lead": 50
+},
+"LSQ8X4": {
+"desc": "8X8X4\"LOW RECTANGLE PLATE GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 21.48,
+"cbm": 0.076,
+"max_container": 894,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"2GSTY": {
+"desc": "2X12X36\" GREEN STYROFOAM BOARD | 10-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 58.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"V2084": {
+"desc": "27\" X 5\" EURO VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 31.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"86PCE-24": {
+"desc": "8.5 x 7\" HANDLED WICKER BASKET | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 31.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"R30X5": {
+"desc": "PLASTIC ROSE BOX | 50-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 18.6,
+"cbm": 0.0535,
+"max_container": 1271,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZMMGTAPERED": {
+"desc": "6\" X 2\" X 14\" MIRROR GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 35.34,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"37327": {
+"desc": "5\"x6\"H CERAMIC BELLIED ROUND POT W/DISTRESSED IRREGULAR LIP-GLOSS WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"H1815": {
+"desc": "18\" MACHE BACK SOLID OASIS HEART | 2-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 12.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"6HPC-NAT": {
+"desc": "6\" HARD WICKER POT COVER- NATURAL | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.8,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"40SNFK-RDGD": {
+"desc": "2 1/2\" RED W/ GOLD FLAKE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"PV11-RD": {
+"desc": "RED PLASTIC ROSE VASE | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 14.94,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"150LACE": {
+"desc": "36\" WIDE LACE RUNNER | 150-Feet per ROLL / 9-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 21.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R67B": {
+"desc": "6\" BUBBLE BALL CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.12,
+"cbm": 0.0417,
+"max_container": 1630,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CH-L12-GD": {
+"desc": "12\" LONG CANDLEABRA- GOLD | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM175PK": {
+"desc": "10\" PINK COLUMN VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.72,
+"cbm": 0.0624,
+"max_container": 1089,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"ACR3-GD": {
+"desc": "ACRYLIC COLOR ROCKS GOLD | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 5.38,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"ORCHID-WHT": {
+"desc": "ORCHID WHITE- 36\" LENGTH X 8 FLOWER | 12-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.08,
+"cbm": 0.0115,
+"max_container": 5913,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"OS": {
+"desc": "OASIS STANDARD FLORAL FOAM | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 31.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CSMIX": {
+"desc": "SET OF 3 SAUCERS 6\",8\",10\" [Set]",
+"unit": "Set",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0.0041,
+"max_container": 16585,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"CH-RING24-GD": {
+"desc": "24\" HT GOLD RING CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"LY27PK": {
+"desc": "11\" PINK URN VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 8.52,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"OY01SV": {
+"desc": "OYSTER VOTIVE - UNFILLED SILVER | 36-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 6.12,
+"cbm": 0.011,
+"max_container": 6181,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CYL308": {
+"desc": "3.5\"X7.75\" CLEAR CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 7.68,
+"cbm": 0.029,
+"max_container": 2344,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40CHECK-RDWH": {
+"desc": "2 1/2\" WIRED RED/WHITE CHECKERED RIBBON | 50-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.13,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"VGM12": {
+"desc": "11.5\" HT x 6.25\" CLEAR VASE MIDDLE GOLD | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 28.2,
+"cbm": 0.1012,
+"max_container": 671,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"C975": {
+"desc": "3 1/2\" X 9\" CYLINDER - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RSWING": {
+"desc": "GOLD SWING STAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 41.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"REC4424-MIR": {
+"desc": "RECTANGLE MIRROR VASE 4X4X24 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 31.88,
+"cbm": 0.0465,
+"max_container": 1462,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40DOT-RD": {
+"desc": "2 1/2\" RED POLKA DOT WIRED EDGE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CYL610": {
+"desc": "6\" OPEN X 10\"HT CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.44,
+"cbm": 0.087,
+"max_container": 781,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"FV01": {
+"desc": "2X2 EURO SQUARE VOTIVE GLASS | 36-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 6.84,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"GL-V1208": {
+"desc": "12\" HT x 7.5\" OPENING x 5\" BASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.4,
+"cbm": 0.093,
+"max_container": 731,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"FWALL-WH": {
+"desc": "16\"X24\" HYDRANGEA/ROSES FLOWER WALL WHITE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 94.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"MM55-FALL": {
+"desc": "5X5X5 FALL CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.44,
+"cbm": 0.026,
+"max_container": 2615,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZCYL88": {
+"desc": "8X8X8 GLASS CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 15.9,
+"cbm": 0.063,
+"max_container": 1079,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PL-TOWHOLDER": {
+"desc": "9.5X5.5X2.5\" ACRYLIC TOWEL HOLDER | 1-Piece Per Pack / 18-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.6,
+"cbm": 0.0059,
+"max_container": 11525,
+"vendor": "JAYI ACRYLIC LTD",
+"email": null,
+"country": "China",
+"city": "CENTRAL HONG KONG",
+"street": "RM 301 7A 3F HONGKONG TRADE CTR",
+"port": "YANTIAN",
+"lead": 150
+},
+"41125": {
+"desc": "10\" X 3\" FLARED VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"9VEL-RGE-25": {
+"desc": "1 1/2\" RED WIRED GOLD EDGEX | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.1,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SHYD-IV": {
+"desc": "HYDRANGEAS IVORY- SINGLE STEM | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.0168,
+"max_container": 4047,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"40SHEER-DGRN": {
+"desc": "2 1/2\" DARK GREEN WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"GAR-PALM": {
+"desc": "81\" PALM GARLAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"40SWRL-SV": {
+"desc": "2 1/2\" SILVER SWIRL RIBBON | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SCRIPT-NIECE": {
+"desc": "GOLD WORD - NIECE | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"ADH.5G": {
+"desc": "1/2\" GREEN ADHESIVE TAPE | 60-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"3PVC": {
+"desc": "3\" PACKING TAPE X 110 YARDS | 4-ROLL per Sleeve/ 6-Sleeve Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.12,
+"cbm": 0.00075,
+"max_container": 90666,
+"vendor": "JIANGMEN NEWERA PACKING MATERIAL CO",
+"email": null,
+"country": "China",
+"city": "GUANGDONG 330300",
+"street": "LTD NO 1 JIAOXING WESTROADJIAO",
+"port": null,
+"lead": 0
+},
+"FL68-HS": {
+"desc": "SET OF 4 SHALLOW HANDLED BASKET 19\",16\",15\",12\" | 4-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 4,
+"first_cost": 6.55,
+"cbm": 0.0413,
+"max_container": 1646,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"MINISROSE-IV": {
+"desc": "MINIROSE STEM - IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.24,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"MM175RD": {
+"desc": "10\" RED COLUMN VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.72,
+"cbm": 0.0624,
+"max_container": 1089,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CER-WINK-DKGR": {
+"desc": "10\" x 4.5\" DARK TURQ CERAMIC VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 27.84,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"H220C": {
+"desc": "12\" HEART VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18.72,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"SP-ANTGOL": {
+"desc": "SPRAY DYE ANTIQUE GOLD | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"FV12C": {
+"desc": "12\" FLARED CLEAR VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 11.7,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"WOOD4616-WH": {
+"desc": "4X6X16 WHITE WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 25.32,
+"cbm": 0.084,
+"max_container": 809,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"6AB": {
+"desc": "6\" ROUND BASKET W/ LINER -| 1-Piece per Pack / 100-Piece Per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.56,
+"cbm": 0.00105,
+"max_container": 64761,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"C419": {
+"desc": "4\" BUBBLE BALL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 18,
+"cbm": 0.0544,
+"max_container": 1250,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R44": {
+"desc": "4X4X4 CLEAR CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.8,
+"cbm": 0.018,
+"max_container": 3777,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RROCKN": {
+"desc": "NATURAL STONE RIVER ROCKS | 5-Pounds per Bag / 6-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.36,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-FATHER": {
+"desc": "GOLD WORD - FATHER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"9SAT-WH": {
+"desc": "1&1/2\" SATIN RIBBON WHITE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GL546605": {
+"desc": "LED LIGHT STRIP | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"BHYD-FUS": {
+"desc": "SILK HYDRANGEA FUSCHIA | 5-Heads per Bunch / 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL4412-ETCH-GD-6": {
+"desc": "4X4X12 CYLINDER ETCH- GOLD | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.1,
+"cbm": 0.07,
+"max_container": 971,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"6046-BK": {
+"desc": "16\" TROPHY VASE - BLACK | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.4,
+"cbm": 0.105,
+"max_container": 647,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"CYL612": {
+"desc": "6X12 CYLINDER CLEAR | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 10.68,
+"cbm": 0.0517,
+"max_container": 1315,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RMESH-WH": {
+"desc": "SISAL MESH 20\" WHITE | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"CEL4020": {
+"desc": "40\" CELLOPHANE 2.0 MIL | 1200-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 34.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"90272": {
+"desc": "26\" & 32\" CANDLE HOLDER | 2-Piece per SET",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 39.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RB6SV": {
+"desc": "6\" SILVER REVERE BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 12.48,
+"cbm": 0.023,
+"max_container": 2956,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"M88PU": {
+"desc": "8\" X 4\" GATHERING VASE PURPLE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"TS168-PK": {
+"desc": "TABLE SKIRT 168\" X 30\" - PINK [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.77,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"GARHYD-IV": {
+"desc": "GARLAND HYDRANGEA - IVORY COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL510-PK24": {
+"desc": "5\"X10\" CYLINDER | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 23.04,
+"cbm": 0.127,
+"max_container": 535,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R25X5": {
+"desc": "PLASTIC ROSE BOX | 50-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 14.5,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"RTING-BK": {
+"desc": "CURLY TING BLACK | 75-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 75,
+"first_cost": 2.1,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"LY27BL": {
+"desc": "11\" COBALT BLUE URN VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 8.52,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"RBWIRE-BR": {
+"desc": "BIND WIRE BROWN | 675-Feet per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.68,
+"cbm": 0.00084,
+"max_container": 80952,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"9SHEER-RBL": {
+"desc": "1 1/2\" ROYAL BLUE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"REC4424-WH": {
+"desc": "RECTANGLE WHITE VASE 4X4X24 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 41.1,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL624": {
+"desc": "6\" X 24\" CYLINDER CLEAR | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 11.68,
+"cbm": 0.101,
+"max_container": 673,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"24CANDWH": {
+"desc": "24\" CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"SBSLV-CL": {
+"desc": "SMALL BOUQ SLEEVES - ALL CLEAR PK 50",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"V201SVGD": {
+"desc": "ROLY POLY VOTIVE SILVER SPECKLE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 15.12,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"40SWRL-RDRD": {
+"desc": "2 1/2\" RED W/ RED SWIRL RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"REC4412-ETCH-SV": {
+"desc": "4X4X12L RECTANGLE ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 33,
+"cbm": 0.063,
+"max_container": 1079,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"SP-24PUGLD": {
+"desc": "SPRAY DYE 24KT PURE GOLD | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"2X3PILL-WH": {
+"desc": "2X3 PILLAR CANDLES WHITE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 25.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"M88PK": {
+"desc": "8\" X 4\" GATHERING VASE PINK | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"VCAND-10RD": {
+"desc": "10 HOUR VOTIVE CANDLE | 72-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 10.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"CH-C24-GD": {
+"desc": "24\" HT GOLD CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 15.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZPG368": {
+"desc": "6X3X8H RECTANGLE PLATEGLASS VASE PK 6 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.56,
+"cbm": 0.051,
+"max_container": 1333,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"FLOWERWALL": {
+"desc": "16\"X24\" HYDRANGEA FLOWER MAT WHITE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 142.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"40CHECK-RDBK-25": {
+"desc": "2 1/2\" WIRED RED/BLACK CHECKERED RIBBON | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.47,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"ACCX3-CL": {
+"desc": "SET OF 3 CANDLE HOLDER | 3-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 6.72,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"18PSTN": {
+"desc": "18\" NATURAL PLANT STAKES | 1000-Piece per Pack / 3-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 9.39,
+"cbm": 0.0173,
+"max_container": 3930,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM39RD": {
+"desc": "8\" X 4.5\" RED SQUARE GATHERING VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.28,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RTING-RD": {
+"desc": "CURLY TING RED | 75-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 75,
+"first_cost": 2.1,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-GLORED": {
+"desc": "SPRAY DYE GLOSSY RED | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"ORCHID-FUS-12": {
+"desc": "ORCHID FUCHSIA- 36\" LENGTH X 8 FLOWER | 12-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.6,
+"cbm": 0.115,
+"max_container": 591,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"R55GD": {
+"desc": "5X5X5 GOLD CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.56,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"W105-WH": {
+"desc": "10\" ROUND HANDLED BASKET W/ LINER WHITE | 12-Piece per Pack / 3-Packs per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0.0744,
+"max_container": 913,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"MIR-SQ10": {
+"desc": "9 X 3 X 9 MIRROR VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 26.4,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"4DP": {
+"desc": "4\" DOUBLE POINTED STICKS | 10000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10000,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"EG12-TUQ": {
+"desc": "12\" TURQUOISE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"MM99PU": {
+"desc": "8\" BUNCH VASE PURPLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"W1845": {
+"desc": "22\" MACHE BACK OASIS WREATH | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 17.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"TCAND-8": {
+"desc": "8 HR TEALIGHTS IN PLASTIC CUPS | 100-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"SETOF3-CYL-SMALL": {
+"desc": "SET OF 3 CYLINDER 6\",8\",11\" | 1-SET per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.94,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"TRIPL-MIR": {
+"desc": "10\"X2 3/4\"X12\" H GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.8,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL4412-ETCH-SV": {
+"desc": "4X4X12 CYLINDER ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 27,
+"cbm": 0.0542,
+"max_container": 1254,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"RP40-RBL": {
+"desc": "ROYAL 2 3/4\"X100YD ROYAL BLUE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RWAX-RD": {
+"desc": "WAX TISSUE RED 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.38,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"MM4086C": {
+"desc": "8.5\" ROSE VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.56,
+"cbm": 0.0355,
+"max_container": 1915,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"6008-BKGD": {
+"desc": "24\" BLACK VASE W/ GOLD BASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.6,
+"cbm": 0.073,
+"max_container": 931,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"PL-REC4412-WH": {
+"desc": "4X4X12 PLASTIC RECTANGLE WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.8,
+"cbm": 0.052,
+"max_container": 1307,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"STPLG": {
+"desc": "STAPLE GUN [Piece] | 1-Piece per Pack / 36-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SSPKL-24": {
+"desc": "24\"X5\" SPECKLED SILVER PILSNER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 34.5,
+"cbm": 0.0557,
+"max_container": 1220,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"W137-WH": {
+"desc": "6\" PRINCESS BASKET WHITE COLOR | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.32,
+"cbm": 0.0384,
+"max_container": 1770,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"MM4086RD": {
+"desc": "8.5\" RED ROSE VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.76,
+"cbm": 0.0355,
+"max_container": 1915,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"3X12PILL-WH": {
+"desc": "3X12 PILLAR CANDLES WHITE PACKED | 12 Piece per pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 48.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"SQ10-ETCH-SV": {
+"desc": "10X10X4H SQUARE ETCH- SILVER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 25.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"RWAX-LPK": {
+"desc": "WAX TISSUE LIGHT PINK, 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"REC6612-MIR": {
+"desc": "RECTANGLE MIRROR VASE 6X6X12 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 42.6,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"R709": {
+"desc": "8.75\" GLASS URN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.84,
+"cbm": 0.066,
+"max_container": 1030,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CN16SV": {
+"desc": "16\" X 5\" SILVER PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 60.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"RP9-RED": {
+"desc": "1 3/8\"X100YD RED POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"GL60408": {
+"desc": "PVC TAPE DISPENSER | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.56,
+"cbm": 0.00225,
+"max_container": 30222,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"TACK-GR": {
+"desc": "SURE STICK CLING GREEN | 33FT PER Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"WSPOOL22": {
+"desc": "22 GAUGE SPOOL WIRE | 0.5-Pounds per Roll / 12-Roll per Case / 48-Roll per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.81,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"W24X12G": {
+"desc": "24 GAUGE X 12 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.56,
+"cbm": 0.0022,
+"max_container": 30909,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"M88GN": {
+"desc": "8\" X 4\" GATHERING VASE GREEN | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"WAX-BOT": {
+"desc": "WAX TISSUE 24X36 BOTANICAL MIX 400 SHEETS PER REAM",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL528": {
+"desc": "5' X 28\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 19.92,
+"cbm": 0.09,
+"max_container": 755,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CUB01": {
+"desc": "2.5 HT X 1.5 OPEN RIBBED SQUARE CANDLE HOLDER | 72-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 72,
+"first_cost": 25.92,
+"cbm": 0.0132,
+"max_container": 5151,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"9SHEER-WH": {
+"desc": "1 1/2\" WHITE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"OY01F": {
+"desc": "PREFILLED OYSTER VOTIVE GLASS | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 7.56,
+"cbm": 0.011,
+"max_container": 6181,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"REC4412-BK-12": {
+"desc": "4X4X12 BLACK RECTANGLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 44.04,
+"cbm": 0.0637,
+"max_container": 1067,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PL444": {
+"desc": "4X4X4 PLASTIC CUBES | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 9.72,
+"cbm": 0.0154,
+"max_container": 4415,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"27977": {
+"desc": "CANDLE HOLDER 14\",17\",19\"H | 3-Piece per SET",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 24.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"R66": {
+"desc": "6X6X6 CLEAR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.48,
+"cbm": 0.029,
+"max_container": 2344,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"14BR": {
+"desc": "14\" BREAD BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18.36,
+"cbm": 0.0636,
+"max_container": 1069,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"REC4410": {
+"desc": "RECTANGLE VASE 4X4X10 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 29.16,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PL555-WH": {
+"desc": "5X5X5 WHITE PLASTIC CUBE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 13.8,
+"cbm": 0.034,
+"max_container": 2000,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40BARK": {
+"desc": "BARK RIBBON 103 | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.6,
+"cbm": 0.0035,
+"max_container": 19428,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"MM973RD": {
+"desc": "9\" DOZEN ROSE VASE RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"WOOD884-BR": {
+"desc": "8X8X4 WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM95-C": {
+"desc": "10\" X 5\" VASE CLEAR | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 5.4,
+"cbm": 0.0407,
+"max_container": 1670,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"45929": {
+"desc": "CERAMIC CYLINDER EMBOSSED MATTE SILVER 10X5X5 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"CYL632": {
+"desc": "6\" X 32\" GLASS CYLINDERS | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 17.12,
+"cbm": 0.084,
+"max_container": 809,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM74-C": {
+"desc": "CLEAR GLASS VASE - 4.5X7.9\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.16,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SNFK-IVGD": {
+"desc": "2 1/2\" IVORY W/ GOLD FLAKE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"MM21-BLU": {
+"desc": "BLUE GLASS VASE 4.33 X 7\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.76,
+"cbm": 0.0296,
+"max_container": 2297,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"WP10928": {
+"desc": "WEDDING CENTERPIECE 28\"H | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 16.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"W26X18G": {
+"desc": "26 GAUGE X 18 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.68,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"WREATH-SUC": {
+"desc": "SUCCULENT WREATH | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.57,
+"cbm": 0.0018,
+"max_container": 37777,
+"vendor": "HOUSE XIAMEN LIMITED",
+"email": null,
+"country": "China",
+"city": "XIAMEN",
+"street": "NO.215-503 DONGHUANG RD",
+"port": null,
+"lead": 150
+},
+"30SWFR": {
+"desc": "30\" RED ROSE PAPER SAY IT WITH FLOWER | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"40MET-SV": {
+"desc": "2 1/2\" SILVER METALLIC | 25-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.81,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"GSPKL-24": {
+"desc": "24\"X5\" GOLD PILSNER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 34.5,
+"cbm": 0.0557,
+"max_container": 1220,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"55419": {
+"desc": "4\"x9\"H CERAMIC RECTANGLE VASE W/EMBOSSED ABSTRACT DESIGN-GLOSS GOLD| 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"BXB14": {
+"desc": "14\" ROUND BUBBLE BALL CLEAR | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 17.56,
+"cbm": 0.16,
+"max_container": 425,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"15PST": {
+"desc": "15\" GREEN PLANT STAKES | 1000-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 7.91,
+"cbm": 0.01473,
+"max_container": 4616,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"C1839": {
+"desc": "36\" MACHE BACK OASIS CROSS | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 20.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL424-6": {
+"desc": "4''X24'' CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"50LED": {
+"desc": "LED 50'S LIGHTS | 16-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"7021-06-01": {
+"desc": "AQUA PLUS | 1-Gallon per Bottle / 6-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": 0,
+"first_cost": 18.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"83-03740": {
+"desc": "CROWNING GLORY HYDRATION SOLUTION | 32-Oz. per Bottle / 12-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 5.33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RROCKW": {
+"desc": "WHITE RIVER ROCKS | 5-Pounds per Bag / 6-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"ROCK-GRV-WH": {
+"desc": "WHITE GRAVEL ROCKS 4-8MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.4,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"TIRIBB": {
+"desc": "TI- LEAF RIBBON 4\" | 50-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"LFH-ROSE-IV": {
+"desc": "IVORY ROSE HEAD XXL | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 43.2,
+"cbm": 0.15,
+"max_container": 453,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"MM39BL": {
+"desc": "8\" X 4.5\" BLUE SQUARE GATHERING VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.28,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BGROSE-IV": {
+"desc": "ROSE BOUQUET- IVORY | 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "LANGFANG WINSTON FLOWER DECORATION CO",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "DAWANGFU LANGFANG HEBEI PROVINCE",
+"port": null,
+"lead": 150
+},
+"40SNFK-SV": {
+"desc": "2 1/2\" SILVER W/ SILVER FLAKE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SR": {
+"desc": "SMALL EMPTY ROSARY- 53 BEAD | 1-Piece Per Pack / 20-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.16,
+"cbm": 0.0017,
+"max_container": 40000,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"PLNT-SANSER-LG": {
+"desc": "SANSEVIERIA LG | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 12.95,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "ZHEJIANG JIAWEI ARTS & CRAFTS CO.,LTD",
+"email": null,
+"country": "China",
+"city": null,
+"street": "Park, Dongyang, Zhejiang, China",
+"port": "SHENZHEN",
+"lead": 150
+},
+"WT3": {
+"desc": "2.5 \"SMALL POINTED GREEN TUBE | 1000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 10.87,
+"cbm": 0.0175,
+"max_container": 3885,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"WSPOOL24": {
+"desc": "24 GAUGE SPOOL WIRE | 0.5-Pounds per Roll / 12-Roll per Case / 48-Roll per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.82,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"ACR1-CL": {
+"desc": "ACRYLIC ROCKS CLEAR | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.15,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"WOOD888-BR": {
+"desc": "8X8X8 WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"LFH-HYD-IV": {
+"desc": "IVORY HYDRANGEA HEAD XXL | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 52.8,
+"cbm": 0.11,
+"max_container": 618,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"SP-YELYEL": {
+"desc": "SPRAY DYE YELLOW YELLOW | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SQ5510": {
+"desc": "5X5X10 GLASS SQUARE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12.36,
+"cbm": 0.033,
+"max_container": 2060,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"S18825WH": {
+"desc": "41\" WHITE CHERRY BLOSSOM [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"REC4412-WH": {
+"desc": "RECTANGLE WHITE VASE 4X4X12 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.08,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"MM972RD": {
+"desc": "8\" HALF DOZEN ROSE VASE RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"9SHEER-HPK": {
+"desc": "1 1/2\" HOT PINK WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.2,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SP-BRIGOL": {
+"desc": "SPRAY DYE BRILLIANT GOLD | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"R14H": {
+"desc": "14\" HANDLED BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 20.88,
+"cbm": 0.0134,
+"max_container": 5074,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"40WIRED-SPCHECK": {
+"desc": "2 1/2\" FUSHSIA/BLUE/YEL/RED CHECKERED WIRED | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.41,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"3DFS-RD": {
+"desc": "1/2\" DOUBLE FACE SATIN RED | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.36,
+"cbm": 0.0004,
+"max_container": 170000,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"TACK-WH": {
+"desc": "SURE STICK CLING WHITE | 33FT PER Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"6056": {
+"desc": "10X10 ROUND FLASK VASE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15,
+"cbm": 0.052,
+"max_container": 1307,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"AZ32": {
+"desc": "32\" X 8\" OPEN EVENT VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"CYL66": {
+"desc": "6X6X6 CYLINDER CLEAR | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 12.72,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BCALL-PU": {
+"desc": "CALLA LILY PURPLE | 6-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"ACR3-CL": {
+"desc": "ACRYLIC COLOR ROCKS CLEAR | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"W22X12G": {
+"desc": "22 GAUGE X 12 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.83,
+"cbm": 0.0022,
+"max_container": 30909,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"SCAL-01": {
+"desc": "CANDLE HOLDER |36 Pc Per Box {6 Sets Of 6 Per Box}",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 10.44,
+"cbm": 0.01554,
+"max_container": 4375,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"18R": {
+"desc": "18 BEAD HAND HELD ROSARY | 1-Piece Per Pack / 20-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.96,
+"cbm": 0.0017,
+"max_container": 40000,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"W26X12G": {
+"desc": "26 GAUGE X 12 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.66,
+"cbm": 0.0022,
+"max_container": 30909,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"A163": {
+"desc": "EYE 7X3.5MX10.5HX12D | 6 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.2,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"TS168-IV": {
+"desc": "TABLE SKIRT 168\" X 30\" - IVORY | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.77,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"M88RD": {
+"desc": "8\" X 4\" GATHERING VASE RED | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-REST": {
+"desc": "GOLD WORD - REST | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"51438": {
+"desc": "10\"x4\"x10\"H CERAMIC TALL OVAL POT W/EMBOSSED LATTICE DESIGN-MATTE WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"FV13WH": {
+"desc": "13\" FLARED VASE X 6.5 OPEN WHITE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.7,
+"cbm": 0.068,
+"max_container": 1000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"MM95-RD": {
+"desc": "10\" X 5\" VASE RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0.04125,
+"max_container": 1648,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"9SHEER-DGRN": {
+"desc": "1 1/2\" DK GREEN WIRED SHEER | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SGV01GD": {
+"desc": "GOLD INSIDE / GOLD OUTSIDE EMPTY VOTIVE | 36-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 5.4,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"40SNFK-RDSV": {
+"desc": "2 1/2\" RED W/ SILVER FLAKE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"91922": {
+"desc": "MTL GLASS CANDLE HOLDER S/2 24\" 32\"H | 2-Piece per SET",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 21.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"24CANDIVR": {
+"desc": "24\" CANDLES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"M88C": {
+"desc": "8\" X 4\" GATHERING VASE CLEAR | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 4.92,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SAND-BK": {
+"desc": "BLACK SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"R922": {
+"desc": "5 1/4\" FLUTED IVY BALL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 8.88,
+"cbm": 0.062,
+"max_container": 1096,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"W102-NAT": {
+"desc": "8\" ROUND HANDLED BASKET W/ LINER NATURAL | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.12,
+"cbm": 0.0357,
+"max_container": 1904,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"MM973PK": {
+"desc": "9\" DOZEN ROSE VASE PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R55-WH-MIR": {
+"desc": "5X5X5 DESIGNER WHITE CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.32,
+"cbm": 0.0396,
+"max_container": 1717,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9001OV-WW": {
+"desc": "SET OF 3 OVAL HANDLED WILLOW BASKET 18\",16\"14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.05,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"BB12W": {
+"desc": "WHITE OBLONG ARRANGMENT DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 10.44,
+"cbm": 0.0176,
+"max_container": 3863,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"24SWFP": {
+"desc": "24\" PINK ROSE PAPER SAY IT WITH FLOWER | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"RTUL54-WH": {
+"desc": "TULLE BOLT 54\" WHITE ROLL | 40-Yards per ROLL / 18-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.75,
+"cbm": 0.0063,
+"max_container": 10793,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"CH-RING18-GD": {
+"desc": "18\" HT GOLD RING CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"CRY6": {
+"desc": "6' CRYSTAL GARLAND | 1-Piece per Pack / 60-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"RP40-YEL": {
+"desc": "ROYAL 2 3/4\"X100YD YELLOW POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"R55-BK-MIR": {
+"desc": "5X5X5 DESIGNER BLACK CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36.96,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"MA33": {
+"desc": "3X3X3 CLEAR CUBES | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 18.24,
+"cbm": 0.0165,
+"max_container": 4121,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"1500QT": {
+"desc": "CRYSTAL CLEAR 300, POWDER | 30-Pounds per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 55.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CAND12-RD-12": {
+"desc": "12\" TAPER CANDLES - RED | 12-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.68,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"CEL3616": {
+"desc": "36\" CELLOPHANE 1.6 MIL | 1200-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.54,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"RMESH-RD": {
+"desc": "SISAL MESH 20\" RED | 10-Yards per Roll / 24-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"GL546619": {
+"desc": "5M STICK-ON LED STRIP LIGHTS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"WD10925": {
+"desc": "WEDDING CENTERPIECE 25\" H - PACKED 2",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"40CHECK-BKWH-25": {
+"desc": "2 1/2\" WIRED BLACK/WHITE CHECKERED RIBBON | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.47,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"MM900-FALL": {
+"desc": "9\" FALL MIX BUD VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 8.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"6HPC-WW": {
+"desc": "6\" HARD WICKER POT COVER - WHITE WASH | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.96,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"MM55RD": {
+"desc": "5X5X5 RED CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40WIRED-SPGING": {
+"desc": "2 1/2\" YELLOW/GREEN/BLUE/PINK GINGHAM WIRED EDGE | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.41,
+"cbm": 0.00146,
+"max_container": 46575,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"PCE": {
+"desc": "PRECAPPED EXT2- 4\" EXTENDABLE WATER TUBE | 1000-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 16.9,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CH-RING24-SV": {
+"desc": "24\" HT SILVER RING CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"29PB": {
+"desc": "LARGE FUNERAL BASKET W/ HANDLE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 22.56,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZPG2710-CL": {
+"desc": "RECTANGLE PLATE GLASS 7x2x10\" CLEAR | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 25.8,
+"cbm": 0.057,
+"max_container": 1192,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BHYD-PK": {
+"desc": "SILK HYDRANGEA PINK | 5-Heads per Bunch / 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"3279-24-429": {
+"desc": "7\" COLORED JARS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 48.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BUNROSE-PK": {
+"desc": "BUNCH ROSE BOUQUET PINK | 18-Heads per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"REC4412-ETCH-GD": {
+"desc": "4X4X12L RECTANGLE ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.68,
+"cbm": 0.2836,
+"max_container": 239,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"BUNROSE-WH": {
+"desc": "BUNCH ROSE BOUQUET WHITE | 18-Heads per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL624-WH": {
+"desc": "6\" X 24\" CYLINDER WHITE | 4-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 14.76,
+"cbm": 0.074,
+"max_container": 918,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BUNROSE-BLUSH": {
+"desc": "BUNCH ROSE BOUQUET BLUSH | 18-Heads per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"Z83B": {
+"desc": "5HX 10W PEDESTAL BOWL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 7.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"X1056-GR": {
+"desc": "10\" GREEN EMERALD FERN | 288-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 288,
+"first_cost": 34.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"C448": {
+"desc": "24\" X 5\" PILSNER VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18.96,
+"cbm": 0.1024,
+"max_container": 664,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"OI": {
+"desc": "OASIS INSTANT FOAM | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 31.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CRY-2003": {
+"desc": "CRYSTAL VASE 4.15\" X 8\"H | 6-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 7.5,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"PLNT-SANSER-SM": {
+"desc": "SANSEVIERIA SMALL | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.15,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "ZHEJIANG JIAWEI ARTS & CRAFTS CO.,LTD",
+"email": null,
+"country": "China",
+"city": null,
+"street": "Park, Dongyang, Zhejiang, China",
+"port": "SHENZHEN",
+"lead": 150
+},
+"21005": {
+"desc": "28\" X 5.75\" GLASS VASE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CER-BD-2304": {
+"desc": "3 VASE SET - CORAL, MINT, IVORY 5\" | 3-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 1.28,
+"cbm": 0.0082,
+"max_container": 8292,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"E32-12-04": {
+"desc": "7\" X 13\" COOLER BUCKET - BLACK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 67.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"XPH-PICKX2": {
+"desc": "Holly Berry Pick w/ Pine | 12 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"SCRIPT-FRIENDS": {
+"desc": "GOLD WORD - FRIENDS | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"REC4424-BK": {
+"desc": "RECTANGLE BLACK VASE 4X4X24 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 31.88,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"24WSTY": {
+"desc": "2X24X36 WHITE STYROFOAM BOARD | 5-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 54.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40SHEER-NVB": {
+"desc": "2 1/2\" NAVY BLUE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"RB6GD": {
+"desc": "GOLD REVERE BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 13.92,
+"cbm": 0.0234,
+"max_container": 2905,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"680-02-07": {
+"desc": "18\" PLASTIC BACK FOAM WREATH | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 17.02,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"MM21-PK": {
+"desc": "PINK GLASS VASE - 4.33 X 7\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.72,
+"cbm": 0.0296,
+"max_container": 2297,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R44-36": {
+"desc": "4X4X4 GLASS CUBES | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 25.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"24SWFR": {
+"desc": "24\" RED ROSE PAPER SAY IT WITH FLOWER | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"FL68-WW": {
+"desc": "SET OF 4 HANDLED BASKET 19\",16\",15\",12\" | 3 Baskets per set / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": null,
+"first_cost": 6.55,
+"cbm": 0.0413,
+"max_container": 1646,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RP40-PU": {
+"desc": "ROYAL 2 3/4\"X100YD PURPLE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"PLNT-DIEFFEN": {
+"desc": "DIEFFENBACHIA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6,
+"cbm": 0.027,
+"max_container": 2518,
+"vendor": "ZHEJIANG JIAWEI ARTS & CRAFTS CO.,LTD",
+"email": null,
+"country": "China",
+"city": null,
+"street": "Park, Dongyang, Zhejiang, China",
+"port": "SHENZHEN",
+"lead": 150
+},
+"CQUARTZ-AMT": {
+"desc": "CRUSHED QUARTZ - AMETHYST ASST | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"ACR3-BK": {
+"desc": "ACRYLIC COLOR ROCKS BLACK | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.09,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BHYD-WH": {
+"desc": "SILK HYDRANGEA WHITE | 5-Heads per Bunch / 24-Bunch per Case / 240-Bunch Per Master",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9SHEER-SV": {
+"desc": "1 1/2\" SILVER WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"WD1140": {
+"desc": "40\" X 9\" EURO EVENT VASE PK 1",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 21,
+"cbm": 0.07,
+"max_container": 971,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"S66": {
+"desc": "6\" SMALL GATHERING VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.6,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"6PLS": {
+"desc": "6\" PLASTIC STICKS PK 3000 [Case] | 3000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 3000,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"8BR": {
+"desc": "8\" BREAD BASKETS | 12-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.4,
+"cbm": 0.0216,
+"max_container": 3148,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"R55-M": {
+"desc": "5X5X5 DESIGNER MIRROR CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36.6,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"FV36": {
+"desc": "10\" X 5\" FLARED VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"9SAT-LTBLU": {
+"desc": "1&1/2\" SATIN RIBBON LIGHT BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-GLOBLA": {
+"desc": "SPRAY DYE GLOSSY BLACK | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"CER-JAR-SPRING": {
+"desc": "6\" SPRING MASON JARS | 3-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 2.93,
+"cbm": 0.0173,
+"max_container": 3930,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"BX-RD": {
+"desc": "LATEX BALLOON RED | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"SCRIPT-SYMP": {
+"desc": "GOLD WORD - SYMPATHY - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MMGSTRAIGHT": {
+"desc": "5\" X 2\" X 14\" MIRROR GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.2,
+"cbm": 0.042,
+"max_container": 1619,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LFH-PEO-IV": {
+"desc": "IVORY PEONY HEAD XXL | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 38.4,
+"cbm": 0.08,
+"max_container": 850,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"MM39PK": {
+"desc": "8\" X 4.5\" PINK SQUARE GATHERING VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.28,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"ABSP-HGR": {
+"desc": "ABSORBTION DYE HOLIDAY GREEN | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"PILSBAND": {
+"desc": "5.5 x H11.5\" PILSNER TAPERED VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.8,
+"cbm": 0.049,
+"max_container": 1387,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"SAND-WH": {
+"desc": "WHITE SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SETOF3-CYL": {
+"desc": "SET OF 3 CYLINDER 6\",8\",11\" | 1-SET Per Pack / 6-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.49,
+"cbm": 0.0119,
+"max_container": 5714,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-ATREST": {
+"desc": "GOLD WORD - AT REST | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"REC6612-WH": {
+"desc": "RECTANGLE WHITE MIRROR VASE 6X6X12 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 45.6,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RCORN": {
+"desc": "14\" CORNUCOPIA BASKET | 1-Piece per Pack / 20-Pieces per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-DEAREST": {
+"desc": "GOLD WORD - DEAREST | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"LFH-ROSE-FU": {
+"desc": "FUCHSIA ROSE HEAD XXL | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 43.2,
+"cbm": 0.15,
+"max_container": 453,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"SP-PERPK": {
+"desc": "SPRAY DYE PERFECT PINK | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SHYD-PK": {
+"desc": "HYDRANGEAS PINK - SINGLE STEM | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.0168,
+"max_container": 4047,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"MM39PU": {
+"desc": "8\" X 4.5\" PURPLE SQUARE GATHERING VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.92,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SAT-HUN": {
+"desc": "2&3/4\" SATIN RIBBON HUNTER | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SHYD-PU": {
+"desc": "HYDRANGEAS PURPLE- SINGLE STEM | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.0168,
+"max_container": 4047,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"FV90-CL": {
+"desc": "10\" EURO BUD VASE - CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.4,
+"cbm": 0.0115,
+"max_container": 5913,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"5MET-GD": {
+"desc": "1\" GOLD METALLIC | 25-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.85,
+"cbm": 0.00035,
+"max_container": 194285,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"VCAND-10BL": {
+"desc": "10 HOUR VOTIVE CANDLE -BLACK | 72-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"FM5-RD": {
+"desc": "FLAT MARBLES RED [Bag] | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.56,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-GLUCK": {
+"desc": "GOLD WORD - GOOD LUCK | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CAND12-XMAS-12": {
+"desc": "12\" XMAS MIXED TAPER CANDLES | 12-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.68,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"40SWRL-RDSV": {
+"desc": "2 1/2\" RED W/ SILVER SWIRL RIBBON| 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.55,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"5SAT-PUR": {
+"desc": "1\" SATIN RIBBON PURPLE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PL-CYL510-WH": {
+"desc": "5X10 WHITE PLASTIC CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 8.7,
+"cbm": 0.03312,
+"max_container": 2053,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SQ-18": {
+"desc": "18H X 2 X 18 GLASS PLATE SQUARE | 3-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 32.25,
+"cbm": 0.078,
+"max_container": 871,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LFH-HYD-FU": {
+"desc": "FUCHSIA HYDRANGEA HEAD XXL | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 52.8,
+"cbm": 0.11,
+"max_container": 618,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"SP-FLABLA": {
+"desc": "SPRAY DYE FLAT BLACK | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"MROCK-NAT": {
+"desc": "NATURE RIVER ROCKS - 1-3CM | 5-Pounds Per Bag / 6-Bags Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"RRCANE7": {
+"desc": "7' NATURAL RIVER CANE | 25-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 1.55,
+"cbm": 0.00969,
+"max_container": 7017,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"6093": {
+"desc": "23\" H X 6\" BUBBLE VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"MM55BL": {
+"desc": "5X5X5 BLUE CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.027,
+"max_container": 2518,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R55-EMIR": {
+"desc": "SILVER MIRROR GLASS CANDLE HOLDER, 5X5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.56,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PL5CYL": {
+"desc": "5X5X5 PLASTIC CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 10.2,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SHWX-GR": {
+"desc": "SHREDDED WAX PAPER GREEN | 10-Pounds per BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 37.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"R41130": {
+"desc": "12\"X4\" USHAPE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.1,
+"cbm": 0.0569,
+"max_container": 1195,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"3X6PILL-WH": {
+"desc": "3X6 PILLAR CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"WOOD666-WH": {
+"desc": "6X6X6 WHITE WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"CS-BKGD-12": {
+"desc": "12\" BLACK & GOLD CANDLEHOLDER | 10-Piece per Pack / 2-Pack per Case",
+"unit": "Units",
+"qty_per_unit": 10,
+"first_cost": 81.3,
+"cbm": 0.09,
+"max_container": 755,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM410-C": {
+"desc": "10\" X 4\" GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM99BL": {
+"desc": "8\" BUNCH VASE BLUE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"5SAT-LAV": {
+"desc": "1\" SATIN RIBBON LAVENDER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BCALL-ORG": {
+"desc": "CALLA LILY ORANGE | 9-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.56,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZCYL804-PF": {
+"desc": "4X8 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12,
+"cbm": 0.049,
+"max_container": 1387,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SP-PINGLO": {
+"desc": "SPRAY DYE PINK GLOW | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"BLING-BKSV": {
+"desc": "BLING WRAP- BLACK & SILVER | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.85,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"5SAT-IVO": {
+"desc": "1\" SATIN RIBBON IVORY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SHYD-WH": {
+"desc": "HYDRANGEAS WHITE- SINGLE STEM | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"MIR-BRDG-12": {
+"desc": "MIRROR BRIDGE VASE 10 X 3 X 12 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 37.5,
+"cbm": 0.067,
+"max_container": 1014,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"W20X18G": {
+"desc": "20 GAUGE X 18 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.32,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"15LP": {
+"desc": "15\" DESIGN DISH | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.76,
+"cbm": 0.0365,
+"max_container": 1863,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"W1030": {
+"desc": "15\" PLASTIC BACK OASIS WREATH | 1-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL412": {
+"desc": "4\" X 12\" CYLINDER CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.74,
+"cbm": 0.048,
+"max_container": 1416,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CER-BD-2300": {
+"desc": "3 VASE SET - WHITE | 3 PC Per Set \\ 6-sets per Case",
+"unit": "Set",
+"qty_per_unit": null,
+"first_cost": 1.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RP9-WH": {
+"desc": "1 3/8\"X100YD WHITE POLY RIBBON | 100-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"CQUARTZ-ROSE": {
+"desc": "CRUSHED QUARTZ - ROSE | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SFH-ROSE-IV": {
+"desc": "IVORY ROSE HEAD XL - | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 19.2,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"18PST-100": {
+"desc": "18\" PLANT STAKES | 100-Piece Per Bundle / 30-Bundles per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.05,
+"cbm": 0.0014,
+"max_container": 48571,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"12PST": {
+"desc": "12\" GREEN PLANT STAKES | 1000-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 6.4,
+"cbm": 0.01163,
+"max_container": 5846,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"FLOWERWALL-PK": {
+"desc": "16\" X 24\" HYDRANGEA FLOWER WALL PINK | 24 -Piece per Pack",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 3,
+"cbm": 0.005,
+"max_container": 13600,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SQ10-ETCH-GD-8": {
+"desc": "10X10X4H SQUARE ETCH- GOLD | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 24,
+"cbm": 0.0138,
+"max_container": 4927,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"SP-BRISIL": {
+"desc": "SPRAY DYE BRILLIANT SILVER | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"31892": {
+"desc": "3.25\"x9.75\"H CERAMIC ROUND CYLINDER VASE-MATTE WHITE| 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"9DFS-WH": {
+"desc": "1 1/2\" DOUBLE FACE SATIN WHITE | 50-Yards Per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0.00096,
+"max_container": 70833,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"15108": {
+"desc": "GOLD WIDE OVAL VASE 7.50\"x 3.00\"x 10.25\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"3DFS-WH": {
+"desc": "1/2\" DOUBLE FACE SATIN WHITE | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.36,
+"cbm": 0.0004,
+"max_container": 170000,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CYL804-6": {
+"desc": "8\" X 4\" LOW CYLINDER PACKED 6 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10.5,
+"cbm": 0.03225,
+"max_container": 2108,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"P7R": {
+"desc": "9\" FUNERAL BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SWRAP": {
+"desc": "15\" STRECH WRAP CLEAR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRIME PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "Brooklyn",
+"street": "1290 METROPOLITAN AVE.",
+"port": null,
+"lead": 50
+},
+"ACR1-PK": {
+"desc": "ACRYLIC COLOR ROCKS PINK | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.25,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"H1817": {
+"desc": "24\" MACHE BACK SOLID OASIS HEART | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 19.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GL-BD-101": {
+"desc": "4\" HT GLASS BUD VASES | 4-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 4,
+"first_cost": 0.91,
+"cbm": 0.0048,
+"max_container": 14166,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CSTAR-GD": {
+"desc": "11\" X 5\" STAR VASE - GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 31.2,
+"cbm": 0.069,
+"max_container": 985,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"PL444-WH": {
+"desc": "4X4X4 WHITE PLASTIC CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.2,
+"cbm": 0.0196,
+"max_container": 3469,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL828": {
+"desc": "8\"X 28\" GLASS CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 27.4,
+"cbm": 0.13,
+"max_container": 523,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"LMGSTRAIGHT": {
+"desc": "7\" X 4\" X 20\" MIRROR GLASS VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28.48,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RIP18-SV": {
+"desc": "18\"X5\" SILVER RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 40.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"V6050": {
+"desc": "16\" x 4.5\" OPEN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 19.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"PG-BX11": {
+"desc": "ROUND VASE W/ BUBBLE BALL 9 X 6 X 9 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 33,
+"cbm": 0.064,
+"max_container": 1062,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PICK-HEART": {
+"desc": "40MM GLITTER FOAM HEART RED PICK | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 8.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-AUNT": {
+"desc": "GOLD WORD - AUNT | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CWIRE24": {
+"desc": "24\" CHICKEN WIRE X 150FT | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 12.92,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"CER-BD-2302": {
+"desc": "ROSE/GOLD/SILVER 5\" [Carton] | 3-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 2.18,
+"cbm": 0.00675,
+"max_container": 10074,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"R210GN": {
+"desc": "GREEN RECTANGLE DIAS DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 9.96,
+"cbm": 0.0188,
+"max_container": 3617,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CH-COLUMN-28": {
+"desc": "28\" COLUMN CANDLE HOLDER| 1-Piece per Pack 5 Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 30.55,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"ABSP-PU": {
+"desc": "ABSORBTION DYE PURPLE | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 10.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"PL-CYL510-WH-12": {
+"desc": "5X10 WHITE PLASTIC CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.4,
+"cbm": 0.067,
+"max_container": 1014,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM100S": {
+"desc": "9\" X 4\" VERTICAL SWIRL SPRING ASST | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0.0522,
+"max_container": 1302,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"6008": {
+"desc": "24\" X 6\" PEDESTAL VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 18.4,
+"cbm": 0.0774,
+"max_container": 878,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"TS108-BL": {
+"desc": "TABLE SKIRT 108\" X 30\" - BLUE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.65,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"WD11032": {
+"desc": "WEDDING CENTERPIECE 32\" H | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 9.2,
+"cbm": 0.129,
+"max_container": 527,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"15CANDWH": {
+"desc": "15\" CANDLES WHITE TAPER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"R12H": {
+"desc": "12\" HANDLED BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.8,
+"cbm": 0.1776,
+"max_container": 382,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"15PST-25": {
+"desc": "15\" PLANT STAKES | 25-Piece per BUNDLE / 100-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 25,
+"first_cost": 0.25,
+"cbm": 0.00018,
+"max_container": 377777,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"X1894-GW": {
+"desc": "HOLLY PICK WITH RED BERRY - GRN/WH | 144 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"DS-45": {
+"desc": "8MM GLASS PLATE STAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 42.9,
+"cbm": 0.341,
+"max_container": 199,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SP-PUR": {
+"desc": "SPRAY DYE PURPLE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SCRIPT-FROM": {
+"desc": "GOLD WORD - FROM | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SHYD-FUS": {
+"desc": "HYDRANGEAS FUCHSIA SINGLE STEM | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.0168,
+"max_container": 4047,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"45928": {
+"desc": "CERAMIC CYLINDER EMBOSSED MATTE BLACK 10X5X5 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"RP40-PK": {
+"desc": "ROYAL 2 3/4\"X100YD PINK POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"ADH.25C": {
+"desc": "1/4\" CLEAR OASIS TAPE | 60-Yards per Roll / 48-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WAX-TROP": {
+"desc": "WAX TISSUE TROPICAL 24X36 | 400-SHEETS per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.94,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40RAIN-25": {
+"desc": "2 1/2\" RAINBOW WIRED EDGE RIBBON | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.51,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"28LP": {
+"desc": "11\" DESIGN DISH | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.82,
+"cbm": 0.018,
+"max_container": 3777,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PV11": {
+"desc": "PLASTIC ROSE VASE | 18-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 18,
+"first_cost": 15.84,
+"cbm": 0.0442,
+"max_container": 1538,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"20H": {
+"desc": "20\" GREEN REINFORCED STYRO HEART | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 12.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"CER-PLT-1162": {
+"desc": "GREY/WHITE 2TONE PLANTER W/ GOLD STRIPE] | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18.48,
+"cbm": 0.129,
+"max_container": 527,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"R297SV": {
+"desc": "SILVER PLASTIC BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 20.4,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"GL-SHADE-8IN": {
+"desc": "GLASS SHADES 8\" | 60-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 60,
+"first_cost": 58.8,
+"cbm": 0.1825,
+"max_container": 372,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CER-BD-2303": {
+"desc": "3 VASE SET - WHITE/GREEN/GREY 5\" | 3-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 1.45,
+"cbm": 0.0076,
+"max_container": 8947,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"P710": {
+"desc": "PLASTIC CONTAINER 12\" X 10\" OPEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.52,
+"cbm": 0.0625,
+"max_container": 1088,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CRY-2002": {
+"desc": "CRYSTAL VASE 4.15\" X 8\"H | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 7.5,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"PG-BX18": {
+"desc": "ROUND VASE W/ BUBBLE BALL PACKED 1",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"WOOD4610-BR": {
+"desc": "4X6X10 WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 21.48,
+"cbm": 0.048,
+"max_container": 1416,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"TUB-5": {
+"desc": "6\"X6\"X25\" TUBE VASE X5 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 30.4,
+"cbm": 0.082,
+"max_container": 829,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"3X9PILL-WH": {
+"desc": "3X9 PILLAR CANDLE WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 29.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"PL555": {
+"desc": "5X5X5 PLASTIC CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.32,
+"cbm": 0.034,
+"max_container": 2000,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"C973-12": {
+"desc": "9 3/8\" ROSE VASE ASSORTED - CRYSTAL= | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MM104-C": {
+"desc": "CLEAR GLASS VASE - 4.5 X 9.5\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.64,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R66-M-PK12": {
+"desc": "6X6X6 DESIGNER MIRROR CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 42.6,
+"cbm": 0.0645,
+"max_container": 1054,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SMGSTRAIGHT": {
+"desc": "5\" X 2\" X 10\" MIRROR GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.2,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"WOOD888-WH": {
+"desc": "8X8X8 WHITE WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"R18CARD": {
+"desc": "18\" CARDETTES | 100-Piece per Bag / 1000-Piece per Box",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 14,
+"cbm": 0.0328,
+"max_container": 2073,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SROSE-WH": {
+"desc": "SINGLE WHITE ROSE | 12-Piece per Pack / 20-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.12,
+"cbm": 0.019,
+"max_container": 3578,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"ACR3-PK": {
+"desc": "ACRYLIC COLOR ROCKS PINK | 3-Pounds Per Bag / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.42,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"VBX12-FR": {
+"desc": "12\" H x 6.25\" OPEN CLEAR TOP FROSTED BASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 13.26,
+"cbm": 0.0346,
+"max_container": 1965,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"15115": {
+"desc": "CERAMIC BRUSH SILVER 12X5X5 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"45927": {
+"desc": "CERAMIC CYLINDER EMBOSSED MATTE WHITE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 33.29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"ACR3-PU": {
+"desc": "ACRYLIC COLOR ROCKS PURPLE | 3-Pounds Per Bag / 4-Bag Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.09,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"HBASK-10": {
+"desc": "10\" HANGING BASKET W/ LINER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 55.2,
+"cbm": 0.163,
+"max_container": 417,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"GL541198": {
+"desc": "LED LIGHT SWITCH | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"V1045": {
+"desc": "10\" H x 4.5\" OPEN | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 16.52,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"DG804": {
+"desc": "8X4 GLASS DISHGARDEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.2,
+"cbm": 0.0625,
+"max_container": 1088,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"WD11": {
+"desc": "11\" CLEAR PLASTIC TRAY ROUND 1.5\"H | 24 PIECES PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 165.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SP-14KGLD": {
+"desc": "SPRAY DYE 14KT GOLD | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"ACR3-GR": {
+"desc": "ACRYLIC COLOR ROCKS GREEN | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.09,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GL62104": {
+"desc": "BLACK MARKER- WIDE POINT | 12-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"615-24-07": {
+"desc": "AQUAFOAM SNAP CAGE -CLOSED BASE- GREEN | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 42.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LFH-PEO-FU": {
+"desc": "FUCHSIA PEONY HEAD XXL | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 38.4,
+"cbm": 0.08,
+"max_container": 850,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"GLITC-SV": {
+"desc": "SILVER GLITTER - COARSE | 16-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 8.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"LREC-ORCHIDW": {
+"desc": "LG HANGING GLASS ORCHID WHITE FLOWER | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 56,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LBSLV": {
+"desc": "LARGE BOUQ SLEEVES - ASSORTED COLORS | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 6.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"KP2440": {
+"desc": "24\" KRAFT PAPER ROLL | 1-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRIME PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "Brooklyn",
+"street": "1290 METROPOLITAN AVE.",
+"port": null,
+"lead": 50
+},
+"GSPKL-20": {
+"desc": "20\"X5\" GOLD PILSNER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.5,
+"cbm": 0.0465,
+"max_container": 1462,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"R55-RG": {
+"desc": "5X5X5 ROSE MIRROR GOLD CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BLING-FUS": {
+"desc": "BLING WRAP - FUS | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.17,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL44": {
+"desc": "4X4X4 CYLINDER CLEAR | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 16.8,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R55-MGD": {
+"desc": "5X5X5 MIRROR GOLD CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 40.44,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"3X3PILL-WH": {
+"desc": "3X3 PILLAR CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"SHWX-WH": {
+"desc": "SHREDDED WAX PAPER WHITE | 10-Pounds per BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 28.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"6094": {
+"desc": "20\" H X 5\" BUBBLE VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 40,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"R297W": {
+"desc": "WHITE PLASTIC BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 10.92,
+"cbm": 0.0571,
+"max_container": 1190,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-CARRED": {
+"desc": "SPRAY DYE CARNATION RED | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"12PST-100": {
+"desc": "12\" PLANT STAKES | 100-Piece Per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 100,
+"first_cost": 0.82,
+"cbm": 0.00043,
+"max_container": 158139,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"R66-RG": {
+"desc": "6X6X6 ROSE MIRROR GOLD CUBE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 28.16,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LY12": {
+"desc": "12\" X 5\" URN VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"3SAT-IVO": {
+"desc": "3/4\" SATIN RIBBON IVORY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WAX-WH": {
+"desc": "WAX TISSUE WHITE 24X36 | 400-SHEETS per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 21.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PV9": {
+"desc": "PLASTIC ROSE VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 14.4,
+"cbm": 0.04056,
+"max_container": 1676,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SQ4510-6": {
+"desc": "4X5X10 SQUARE TAPERED VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.86,
+"cbm": 0.02,
+"max_container": 3400,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"WOOD104-WH": {
+"desc": "10X10X4 WHITE WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"FM5-BK": {
+"desc": "FLAT MARBLES BLACK [Bag] | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.5,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"9SHEER-NVB": {
+"desc": "1 1/2\" NAVY BLUE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"W21X18G": {
+"desc": "21 GAUGE X 18 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.38,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"AL8": {
+"desc": "ARRET 8\" PRUNER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 7.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"SCRIPT-GRANDFA": {
+"desc": "GOLD WORD - GRANDFATHER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"9VEL-RRE-25": {
+"desc": "1 1/2\" RED WIRED RED EDGEX | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.1,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SSPKL-20": {
+"desc": "20\"X5\" SPECKLED SILVER PILSNER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.5,
+"cbm": 0.0465,
+"max_container": 1462,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"MM410-R": {
+"desc": "10\" X 4\" RED GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BLING-8ROW-GD": {
+"desc": "BLING MESH 10YD 8 ROW GOLD | 1-Piece Per Roll",
+"unit": "Roll",
+"qty_per_unit": 1,
+"first_cost": 1.13,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"LRG-EMPTY": {
+"desc": "6.5\" HANGING GLASS CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18.36,
+"cbm": 0.054,
+"max_container": 1259,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9SAT-RED": {
+"desc": "1&1/2\" SATIN RIBBON RED | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CER-JADE-GRN": {
+"desc": "CERAMIC JADE GREEN VASE 11 X 5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-GRANDMO": {
+"desc": "GOLD WORD - GRANDMOTHER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40SWRL-RDGD": {
+"desc": "2 1/2\" RED W/ GOLD SWIRL RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"5DFS-RD": {
+"desc": "1\" DOUBLE FACE SATIN RED | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.45,
+"cbm": 0.0006,
+"max_container": 113333,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"FM5-BLU": {
+"desc": "FLAT MARBLES BLUE | 5-Pounds Per Bag / 6-Bag Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.35,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"9003RE-DS": {
+"desc": "SET OF 3 RECTAN HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.75,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"SMGTAPERED": {
+"desc": "6\" X 2\" X 10\" MIRROR GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.8,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40SHEER-BLK": {
+"desc": "2 1/2\" BLACK WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"PL5CYL-WH": {
+"desc": "5X5X5 WHITE PLASTIC CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.2,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"AB2312": {
+"desc": "5HX7.5W ROUNDED PEDESTAL BOWL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R55-BK": {
+"desc": "5X5 BLACK GLASS CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.56,
+"cbm": 0.0321,
+"max_container": 2118,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SAT-HPK": {
+"desc": "2&3/4\" SATIN RIBBON HOT PINK | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"19FIR": {
+"desc": "19\" FIRESIDE BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 27.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"C1837": {
+"desc": "30\" MACHE BACK OASIS CROSS | 2-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 14.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL412SV": {
+"desc": "4\" X 12\" SILVER CYLINDERS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"86PCE-12": {
+"desc": null,
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"C107": {
+"desc": "4.5\"x9.5\" CYLINDER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.43,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SP-LAV": {
+"desc": "SPRAY DYE LAVENDER | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RAF-NAT": {
+"desc": "RAFFIA NATURAL | 16-Oz. per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.34,
+"cbm": 0.0091,
+"max_container": 7472,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"FV90-BL": {
+"desc": "10\" EURO BUD VASE - BLUE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.6,
+"cbm": 0.0115,
+"max_container": 5913,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"682-02-07": {
+"desc": "24\" PLASTIC BACK FOAM WREATH PK 2 [Piece] | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 24.63,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"V409-BKGD": {
+"desc": "10\"X5\" BLACK VASE W/ GOLD BASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 33.6,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"9003RE-HS": {
+"desc": "SET OF 3 RECTAN HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.75,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"CIRBRG-24": {
+"desc": "ROSE GOLD VASE W SILVERPLATING BALL SIZE 24\" | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 56.4,
+"cbm": 0.186,
+"max_container": 365,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"REC4418-MIR": {
+"desc": "RECTANGLE MIRROR VASE 4X4X18 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 38.46,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9003RE-WW": {
+"desc": "SET OF 3 RECTAN HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.75,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"18CANDWH": {
+"desc": "18\" CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"REC4418-WH": {
+"desc": "RECTANGLE WHITE VASE 4X4X18 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 38.52,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"AMZREC448-CL": {
+"desc": "8LX4WX4H RECTANGLE GLASS VASE CLEAR | 6 Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 17.16,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"11065": {
+"desc": "MATTE WHITE VASE 4.50\"x4.50\"x8.50\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"SPCEM": {
+"desc": "SMALL PLASTIC CEMETERY CONES | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 8.4,
+"cbm": 0.0421,
+"max_container": 1615,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MINISROSE-PK": {
+"desc": "MINIROSE STEM - PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.24,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"GL-V1200": {
+"desc": "12\" TAPERED CYLINDER VASE x 5.5\" OPEN x 8\" BASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.4,
+"cbm": 0.093,
+"max_container": 731,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"TSQ24": {
+"desc": "TALL PLATE GLASS SQUARE 24\" | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 30.68,
+"cbm": 0.066,
+"max_container": 1030,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"WOOD664-WH": {
+"desc": "6X6X4 WHITE WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"BX-WH": {
+"desc": "LATEX BALLOON WHITE | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"VP164": {
+"desc": "16 X 4\" VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 20.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SOLBIKA SP ZOO",
+"email": "SOLBIKA@SOLBIKA.COM.PL",
+"country": "Poland",
+"city": "MAKOW UL LIPOWA",
+"street": "MAKOW, UL LIPOWA 84",
+"port": null,
+"lead": 150
+},
+"ACC-16": {
+"desc": "16\" TALL CANDLE HOLDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.58,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"BLING-8ROW-SV": {
+"desc": "BLING MESH 10YD 8 ROW SILVER | 1-Piece per ROLL",
+"unit": "Roll",
+"qty_per_unit": 1,
+"first_cost": 0.97,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"40SAT-SON": {
+"desc": "2&3/4\" SATIN RIBBON SONIA | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"6055": {
+"desc": "8X8 ROUND FLASK VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.08,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"BTUL-HTPK": {
+"desc": "TULIP LT HOT PINK | 9-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.86,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"FM5-SV": {
+"desc": "FLAT MARBLES SILVER | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.82,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"40SHEER-IV": {
+"desc": "2 1/2\" IVORY WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"AMZCYL510-PF": {
+"desc": "5X10 CYLINDER | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 6.96,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"24H": {
+"desc": "24\" GREEN REINFORCED STYRO HEART | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 15.33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"SCRIPT-INPEACE": {
+"desc": "GOLD WORD - IN PEACE | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"8PP": {
+"desc": "8\" PIE PLATE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 7.56,
+"cbm": 0.0122,
+"max_container": 5573,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM104-PASTEL": {
+"desc": "PASTEL GLASS VASE - 4.5X9.5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.56,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SHEER-LAV": {
+"desc": "2 1/2\" LAVENDER WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40BIRCH": {
+"desc": "BIRCH RIBBON 103 | 50-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.0035,
+"max_container": 19428,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"REC4418-RGD": {
+"desc": "4X4X18 ROSE GOLD MIRROR RECTANGLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BLING-PRL": {
+"desc": "BLING WRAP - WHITE PEARL | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"DL": {
+"desc": "DELUXE HEAVY DENSITY FOAM | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 33.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FV13RD": {
+"desc": "13\" FLARED VASE X 6.5 OPEN RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 32.88,
+"cbm": 0.1322,
+"max_container": 514,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"ACC-20": {
+"desc": "20\" TALL CANDLE HOLDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.94,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"PSQ-WH": {
+"desc": "WHITE SQUARE BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 6.24,
+"cbm": 0.011,
+"max_container": 6181,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RP9-LAV": {
+"desc": "1 3/8\"X100YD LAVENDER POLY RIBBON | 100-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"R66-MGD": {
+"desc": "6X6X6 MIRROR GOLD CUBE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 35.92,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SP-PINPET": {
+"desc": "SPRAY DYE PINK PETUNIA | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RSCALE": {
+"desc": "GOLD CANDLE SCALE STAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 30.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"BX-BK": {
+"desc": "LATEX BALLOON BLACK | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"3SAT-LTBLU": {
+"desc": "3/4\" SATIN RIBBON LIGHT BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9002RD-DS": {
+"desc": "SET OF 3 ROUND HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.25,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"RP40-LAV": {
+"desc": "ROYAL 2 3/4\"X100YD LAVENDER POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"MM55PK": {
+"desc": "5X5X5 PINK CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.027,
+"max_container": 2518,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"LG-SHELLS": {
+"desc": "LARGE SEA SHELLS 8-10 CM | Approximately 20-Piece Per Pack/ 6-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-WITH": {
+"desc": "GOLD WORD - WITH - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40CHECK-RDWH-25": {
+"desc": "2 1/2\" WIRED RED/WHITE CHECKERED RIBBON | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.47,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40PEP-25": {
+"desc": "2 1/2\" RED/WHITE PEP RIBBON | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.13,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CER-OCEAN-BL": {
+"desc": "CERAMIC BLUE OCEAN VASE 7.5 X 4.5 X 9 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.085,
+"max_container": 800,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"25MM-RD": {
+"desc": "25MM RED GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"PG-348": {
+"desc": "4X3X8H RECTANGLE PLATE GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30.72,
+"cbm": 0.029,
+"max_container": 2344,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40SAT-PK": {
+"desc": "2&3/4\" SATIN RIBBON PINK | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"681-02-07": {
+"desc": "22\" PLASTIC BACK FOAM WREATH PK 2 [Piece] | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 19.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R297G": {
+"desc": "GOLD PLASTIC BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 20.88,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"BHYD-IV": {
+"desc": "SILK HYDRANGEA IVORY | 5-Heads per Bunch/ 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"15PST-100": {
+"desc": "15\" PLANT STAKES | 100-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 100,
+"first_cost": 0.96,
+"cbm": 0.00071,
+"max_container": 95774,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SROLL-40760020": {
+"desc": "SHEET MOSS ROLL RUNNER GREEN | 1-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R66-M": {
+"desc": "6X6X6 DESIGNER MIRROR CUBE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 35.92,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40SHEER-LIM": {
+"desc": "2 1/2\" LIME WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.78,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CH-COLUMN-20": {
+"desc": "20\" COLUMN CANDLE HOLDER| 1-Piece per Pack 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 23.73,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SLV-28": {
+"desc": "28\" X 5\" SILVER PILSNER VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 31.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"ABSP-ORG": {
+"desc": "ABSORBTION DYE ORANGE | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 10.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"PG-FAN": {
+"desc": "MIRROR FAN VASE 12 X 2.5 X 5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36.36,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RP9-PK": {
+"desc": "1 3/8\"X100YD PINK POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9VEL-RGE": {
+"desc": "1 1/2\" RED WIRED GOLD EDGE | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.31,
+"cbm": 0.00264,
+"max_container": 25757,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"BLING-BKG": {
+"desc": "BLING WRAP - BLACK & GOLD | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.78,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"X1564-RD": {
+"desc": "7\" POINSETTIA HEAD RED | 100 Piece per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CYL1004": {
+"desc": "LOW CYLINDER 10\" X 4\" HT | 8-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 8,
+"first_cost": 21.6,
+"cbm": 0.065,
+"max_container": 1046,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"55417": {
+"desc": "CERAMIC TALL WAVE GLOSS GOLD 11X4X3 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 31.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"MM175C-PK6": {
+"desc": "10\" CLEAR COLUMN VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 4.1,
+"cbm": 0.0312,
+"max_container": 2179,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"5SAT-ORA": {
+"desc": "1\" SATIN RIBBON ORANGE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BXB12": {
+"desc": "12\" ROUND BUBBLE BALL CLEAR | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 10.32,
+"cbm": 0.0964,
+"max_container": 705,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BXD6-SV": {
+"desc": "6\" X 4.5\" H BUBBLE BALL SILVER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 10.56,
+"cbm": 0.0388,
+"max_container": 1752,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R67B-PK": {
+"desc": "6\" BUBBLE BALL PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL512-WH": {
+"desc": "5\" X 12\" CYLINDER WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.2,
+"cbm": 0.0741,
+"max_container": 917,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SCRIPT-MY": {
+"desc": "GOLD WORD - MY | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"GAR-EUC-GR": {
+"desc": "EUCALYPTUS GARLAND - GREEN",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"CER-187-PK": {
+"desc": "CERAMIC PINK TORNADO VASE 8 X 8 X 6 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.106,
+"max_container": 641,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"698-02-07": {
+"desc": "18\" PLASTIC BACK SOLID HEART | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 15.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"1.5BOPP": {
+"desc": "1/2 \" CLEAR ADHESIVE TAPE | 60-Yards per ROLL / 12-ROLL per SLEEVE / 144-ROLL per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JIANGMEN NEWERA PACKING MATERIAL CO",
+"email": null,
+"country": "China",
+"city": "GUANGDONG 330300",
+"street": "LTD NO 1 JIAOXING WESTROADJIAO",
+"port": null,
+"lead": 0
+},
+"PG-345": {
+"desc": "4X3X5H RECTANGLE PLATE GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.08,
+"cbm": 0.02,
+"max_container": 3400,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RNCONE": {
+"desc": "AUSTRICA NATURAL PINE CONE 2-3\" | 500-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 500,
+"first_cost": 45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"R66-EMIR": {
+"desc": "SILVER MIRROR GLASS CANDLE HOLDER, 6X6 | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 26.08,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"R27GD": {
+"desc": "GOLD RECTANGLE DIAS DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 18.48,
+"cbm": 0.021,
+"max_container": 3238,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"DC66-GD": {
+"desc": "6X6 DIMPLE PLAINTED GOLD CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15.18,
+"cbm": 0.0285,
+"max_container": 2385,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"WIST-IV": {
+"desc": "WISTERIA-IV | 12-Stems per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "EZ FLOWERY INC.",
+"email": null,
+"country": "United States",
+"city": "MONSEY",
+"street": "14 CALVERT DRIVE",
+"port": null,
+"lead": 50
+},
+"FM5-GR": {
+"desc": "FLAT MARBLES GREEN [Bag] | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.35,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"MROCK-WH": {
+"desc": "WHITE RIVER ROCKS - 1-3CM | 5-Pounds Per Bag / 6-Bags Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-GLOGRN": {
+"desc": "SPRAY DYE GLOSSY EASEL GREEN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SRG-EMPTY": {
+"desc": "5.5\" GLASS CANDLE HOLDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 20.64,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SFH-PEO-IV": {
+"desc": "IVORY PEONY HEAD XL | 48-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 48,
+"first_cost": 33.6,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"RP40-HPK": {
+"desc": "ROYAL 2 3/4\"X100YD HOT PINK POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SP-FREGRE": {
+"desc": "SPRAY DYE FRESH GREEN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"MCG-TAPERED": {
+"desc": "13.5\" CLEAR TAPERED VASE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 32.24,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BTUL-DKPU": {
+"desc": "TULIP LT DARK PURPLE | 9-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.86,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"REC448-CL": {
+"desc": "8LX4WX4H RECTANGLE GLASS VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.28,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"FCAND3-BK-12": {
+"desc": "3\" FLOATING CANDLE - BLACK | 12-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"WG-EMPTY": {
+"desc": "SMALL BULLET GLASS HANGING | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 26.4,
+"cbm": 0.069,
+"max_container": 985,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BCALL-PU-WH": {
+"desc": "CALLA LILY PURPLE- WHITE | 9-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.56,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"FV13C": {
+"desc": "13\" FLARED VASE X 6.5 OPEN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.7,
+"cbm": 0.068,
+"max_container": 1000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"ACR3-SV": {
+"desc": "ACRYLIC COLOR ROCKS SILVER | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 5.38,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GLITSV": {
+"desc": "SILVER FINE GLITTER | 16-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 8.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"ROCK-FLT-MED-WH": {
+"desc": "FLAT WHITE ROCKS 50-75MM | 5-Pounds Per Bag / 6-Bag Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"BXD6-GD": {
+"desc": "6\" X 4.5\" H BUBBLE BALL GOLD | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 10.56,
+"cbm": 0.0388,
+"max_container": 1752,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PEO-IV": {
+"desc": "PEONIES BUNCH IVORY | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.51,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"ABSP-HRED": {
+"desc": "ABSORBTION DYE HOLIDAY RED | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 10.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"R66-WH": {
+"desc": "6X6X6 DESIGNER WHITE CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.6,
+"cbm": 0.059,
+"max_container": 1152,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"X1980-GD": {
+"desc": "ASSORTED HOLIDAY PICKS GOLD COLOR | 12-Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SQ10-ETCH-GD": {
+"desc": "10X10X4H SQUARE ETCH- GOLD | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 12,
+"cbm": 0.069,
+"max_container": 985,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"40PO-YEL": {
+"desc": "2&3/4\" POLY SATIN YELLOW RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-FLAWHI": {
+"desc": "SPRAY DYE FLAT WHITE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RMESH-BL": {
+"desc": "SISAL MESH 20\" BLUE | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"BXD6-WH": {
+"desc": "6\" X 4.5\" H BUBBLE BALL CLEAR | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 9.36,
+"cbm": 0.0388,
+"max_container": 1752,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"WOOD4610-WH": {
+"desc": "4X6X10 WHITE WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 21.48,
+"cbm": 0.048,
+"max_container": 1416,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"802-12-09": {
+"desc": "2 1/8\" STEELPIX - SILVER | 2000-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 13.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CMG-MIR": {
+"desc": "MIRROR GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 64.8,
+"cbm": 0.072,
+"max_container": 944,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"ROCK-FLT-LRG-GY": {
+"desc": "LARGE FLAT GRAY ROCKS 75-125MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.26,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-GREAT": {
+"desc": "GOLD WORD - GREAT | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RWAX-XMAS": {
+"desc": "WAX TISSUE XMAS 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-OLIBRI": {
+"desc": "SPRAY DYE OLIVE BRIGHT | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"FV90-PL": {
+"desc": "10\" EURO BUD VASE - PLUM - PACKED 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18,
+"cbm": 0.0115,
+"max_container": 5913,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"10968": {
+"desc": "GOLD CYLINDER 5\"x5\"x5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"15001": {
+"desc": "9\"X5.5\"X5.50\"H CERAMIC OVAL VASE-GLOSS FINISH GOLD | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"51450": {
+"desc": "4.25\"x5\"H CERAMIC RECTANGLE VASE W/EMBOSSED LATTICE DESIGN-MATTE BLACK| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"CST-48": {
+"desc": "48\" TALL X3 ARM CANDLE HOLDER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 60,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"ACR1-SV": {
+"desc": "ACRYLIC COLOR ROCKS SILVER | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.96,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-NEPH": {
+"desc": "GOLD WORD - NEPHEW | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"R27WH": {
+"desc": "9\" WHITE RECTANGLE DIAS DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 7.2,
+"cbm": 0.0209,
+"max_container": 3253,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"S2247WH": {
+"desc": "15.4\" ROSE SPRAY W/ 4 FLOWERS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SP-COR": {
+"desc": "SPRAY DYE CORAL | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"1020": {
+"desc": "IGLU HOLDER 2 1/2\" x 2 5/8\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5SAT-LTBLU": {
+"desc": "1\" SATIN RIBBON LIGHT BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PY6-HRT-WH": {
+"desc": "6\" WHITE TEDDY BEAR W/ HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"40PO-RED": {
+"desc": "2&3/4\" POLY SATIN RED RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40WIRED-PL-25": {
+"desc": "2 1/2\" RED PLAID GOLD EDGE WIRED | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.56,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"OVL4X8-ETCH-SV-24": {
+"desc": "4HX8L OVAL ETCH- SILVER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 52.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"VINE-CBLOS": {
+"desc": "60\" CHERRY BLOSSOM VINE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"AMZCYL507-PF-6": {
+"desc": "5X7 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 6.3,
+"cbm": 0.0326,
+"max_container": 2085,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"16TAPEPK": {
+"desc": "16\" TAPERS PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"ROCK-FLT-LRG-WH": {
+"desc": "LARGE FLAT WHITE ROCKS 75-125MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.99,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"ABSP-HPK": {
+"desc": "ABSORBTION DYE HOT PINK | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 10.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"CYLRIP24": {
+"desc": "24\" H x 5.5\" OPEN RIP VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 19.2,
+"cbm": 0.0808,
+"max_container": 841,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM972PK": {
+"desc": "8\" HALF DOZEN ROSE VASE PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.16,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PT2": {
+"desc": "4\" POINTED WATER TUBE | 1000-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 1000,
+"first_cost": 15.5,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-GOLMED": {
+"desc": "SPRAY DYE GOLD MEDAL | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SQ-12-6": {
+"desc": "12X12 GLASS PLATE SQUARE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 35.82,
+"cbm": 0.063,
+"max_container": 1079,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"DC55-RD": {
+"desc": "5X5 DIMPLE RED-SILVER INSIDE CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.16,
+"cbm": 0.0302,
+"max_container": 2251,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BB12GR": {
+"desc": "GREEN OBLONG ARRANGMENT DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 10.44,
+"cbm": 0.0176,
+"max_container": 3863,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CRY-2005": {
+"desc": "CRYSTAL VASE 2.65\" X 7\"H | 6-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 4.74,
+"cbm": 0.029,
+"max_container": 2344,
+"vendor": "GOLDEN ACE INDUSTRIAL CO., LTD.",
+"email": "aaron@goldenace.cn",
+"country": "China",
+"city": "Zibo, Shandong, China",
+"street": "RM2004,20F, Guomao Bldg",
+"port": "QINGDAO",
+"lead": 150
+},
+"PG3812-CL": {
+"desc": "8LX3WX12H TALL RECTANGLE GLASS VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 38.64,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"1071": {
+"desc": "11\" DESIGN DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 16.44,
+"cbm": 0.039,
+"max_container": 1743,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"W0604": {
+"desc": "OVAL BASKET | 3-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"SFH-ROSE-FU": {
+"desc": "FUCHSIA ROSE HEAD XL | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 19.2,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"TOAK": {
+"desc": "TRANS OAK LEAVES YELLOW/ORANGE | 1-Pounds per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "KNUD NIELSEN COMPANY, INC",
+"email": null,
+"country": "United States",
+"city": "Evergreen",
+"street": "P.O. BOX 746-217 PARK STREET",
+"port": null,
+"lead": 50
+},
+"40SAT-LTBLU": {
+"desc": "2&3/4\" SATIN RIBBON LIGHT BLUE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"1508": {
+"desc": "FLORALOCK STEM ADHESIVE | 4.5-Oz. per CAN / 12-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 7.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5SAT-BK": {
+"desc": "1\" SATIN RIBBON BLACK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"V1735": {
+"desc": "10 X 5 VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 6.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"5SAT-PK": {
+"desc": "1\" SATIN RIBBON PINK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-SV": {
+"desc": "2&3/4\" SATIN RIBBON SILVER | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"50589": {
+"desc": "6\"x2.25\"x8\"H CERAMIC OVAL VASE W/BENT LIP-MATTE WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"CIRBCL-24": {
+"desc": "CLEAR GLASS VASE WROSE GLAD PLATING BALL 24\" | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 56.4,
+"cbm": 0.186,
+"max_container": 365,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RB6W": {
+"desc": "WHITE REVERE BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 6.65,
+"cbm": 0.023,
+"max_container": 2956,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"R273-WH": {
+"desc": "6\" WHITE PEANUT BASKET | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.6,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"ESTL-10": {
+"desc": "GLASS VASE, ARTS WITH LED LIGHTS | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 29.6,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"10BR": {
+"desc": "10\" BREAD BASKET | 12-Piece per Pack / 8-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.08,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"PY10-HRT-WH": {
+"desc": "10\"WHITE TEDDY BEAR W/ HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SREC-ORCHIDP": {
+"desc": "HANGING GLASS ORCHID PURPLE FLOWER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 60,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SMUG": {
+"desc": "4.5\" SMILE MUG | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.2,
+"cbm": 0.0438,
+"max_container": 1552,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"WOOD104-BR": {
+"desc": "10X10X4 WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"BTUL-WH": {
+"desc": "TULIP LT WHITE | 9-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.86,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"9SAT-EGG": {
+"desc": "1&1/2\" SATIN RIBBON EGGSHELL | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40WIRED-FALL": {
+"desc": "2 1/2\" FALL PATTERN WIRED | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.5,
+"cbm": 0.00145,
+"max_container": 46896,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"W135-WH": {
+"desc": "6\" HANDLED BASKET W/ LINER WHITE | 12-Piece per Pack / 3-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.8,
+"cbm": 0.0276,
+"max_container": 2463,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"SP-CORBRI": {
+"desc": "SPRAY DYE CORAL BRIGHT | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"9SHEER-IVO": {
+"desc": "1 1/2\" IVORY WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"6046-WH": {
+"desc": "16' TROPHY VASE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"9DFS-IV": {
+"desc": "1 1/2\" DOUBLE FACED SATIN - IVORY | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0.00096,
+"max_container": 70833,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"RP40-EMER": {
+"desc": "ROYAL 2 3/4\"X100YD EMERALD POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"DC66-C": {
+"desc": "6X6 DIMPLE CLEAR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 11.88,
+"cbm": 0.0285,
+"max_container": 2385,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PY6-HRT-BR": {
+"desc": "6\" BROWN TEDDY BEAR W/ HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"16TAPELBL": {
+"desc": "16\" TAPERS LIGHT BLUE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"40SAT-WH": {
+"desc": "2&3/4\" SATIN RIBBON WHITE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RMESH-BK": {
+"desc": "SISAL MESH 20\" BLACK | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"SQ-HRT": {
+"desc": "SQUARE HEART VASE 10\" X 10\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 32.76,
+"cbm": 0.038,
+"max_container": 1789,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"74-0106GD": {
+"desc": "MERMAID SHAPED VASE 39\" GOLD | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 36.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SREC-ORCHIDW": {
+"desc": "HANGING GLASS ORCHID WHITE FLOWER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 60,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RP40-ORG": {
+"desc": "ROYAL 2 3/4\"X100YD ORANGE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"40SHEER-HTPK": {
+"desc": "2 1/2\" HOT PINK WIRED SHEER X 50 YDS | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.78,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"PL4CYL": {
+"desc": "4X4X4 PLASTIC CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 8.16,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40CORK": {
+"desc": "CORK RIBBON 103 | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.9,
+"cbm": 0.0011,
+"max_container": 61818,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SHCELI": {
+"desc": "IRRIDECENT SHREDDED CELLOPHANE | 5-Pounds per BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 24.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"R88": {
+"desc": "8X8 GLASS CUBE | 4-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 21.04,
+"cbm": 0.0443,
+"max_container": 1534,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BX-SV": {
+"desc": "LATEX BALLOON SILVER | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"PLNT-FIDDLE-SM": {
+"desc": "FIDDLE LEAF FIG | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.11,
+"cbm": 0.004,
+"max_container": 17000,
+"vendor": "ZHEJIANG JIAWEI ARTS & CRAFTS CO.,LTD",
+"email": null,
+"country": "China",
+"city": null,
+"street": "Park, Dongyang, Zhejiang, China",
+"port": "SHENZHEN",
+"lead": 150
+},
+"PY8-HRT-WH": {
+"desc": "8\" WHITE TEDDY BEAR W/ HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"3X9PILL-IV": {
+"desc": "3X9 PILLAR CANDLE IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"CYL514SV": {
+"desc": "5\" X 14\" SILVER CYLINDERS | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.4,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZCYL55-PF": {
+"desc": "5X5 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 5.4,
+"cbm": 0.026,
+"max_container": 2615,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PY10-HRT-BR": {
+"desc": "10\" BROWN TEDDY BEAR W/ HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"3SAT-EGG": {
+"desc": "3/4\" SATIN RIBBON EGGSHELL | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CAND12-WH-36": {
+"desc": "12\" WHITE TAPERS | 36-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 6.42,
+"cbm": 0.009,
+"max_container": 7555,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"X1011-WH": {
+"desc": "11\" POINSETTIA HEAD | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 66.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"AMZCYL414-PF": {
+"desc": "4X4X14\" CYLINDER | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.9,
+"cbm": 0.062,
+"max_container": 1096,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RIP12-SV": {
+"desc": "12\"X5\" SILVER RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"X1795-WH": {
+"desc": "12\" LEATHERLEAF | 144-Piece per Box",
+"unit": "Box",
+"qty_per_unit": 144,
+"first_cost": 37.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"ABSP-PPK": {
+"desc": "ABSORBTION DYE PERFECT PINK | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 10.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SQ-8": {
+"desc": "8X2X8\" SQUARE PLATE GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 20.22,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"5SAT-SUN": {
+"desc": "1\" SATIN RIBBON SUNSHINE X 100 YARDS | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SM2004": {
+"desc": "NEVERWILT CROSS | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 54.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"MMGTAPERED": {
+"desc": "6\" X 2\" X 14\" MIRROR GLASS VASE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 32.72,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PG-2710-MIR": {
+"desc": "RECTANGLE PLATE GLASS 7x2x10\" MIRROR | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 42.08,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40SAT-AZA": {
+"desc": "2&3/4\" SATIN RIBBON AZALEA | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PY18-WH": {
+"desc": "18\" WILLIE BEAR - WHITE COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CIRBRG-17": {
+"desc": "ROSE GOLD VASE W SILVERPLATING BALL 17\" | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 34.8,
+"cbm": 0.089,
+"max_container": 764,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SGV01": {
+"desc": "UNFILLED SHOT GLASS VOTIVE | 36-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 3.24,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"SB55798-WH": {
+"desc": "WHITE HYDRANGEA BUSH",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"BLING-SVGD": {
+"desc": "BLING WRAP- SILVER+GOLD | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.38,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SCG-TAPERED": {
+"desc": "12\" CLEAR TAPERED VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 40.68,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"5FTD": {
+"desc": "5\" HANDLED UTILITY BASKET | 25-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 11,
+"cbm": 0.00062,
+"max_container": 109677,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"12PSTN-25": {
+"desc": null,
+"unit": "Bundle",
+"qty_per_unit": 25,
+"first_cost": 0.23,
+"cbm": 0.00043,
+"max_container": 158139,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MA33-24": {
+"desc": "3X3X3 CLEAR CUBES PK 24 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.12,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RRCANE3": {
+"desc": "3' NATURAL RIVER CANE | 25-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 1.46,
+"cbm": 0.0044,
+"max_container": 15454,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"40SAT-BDROS": {
+"desc": "2&3/4\" SATIN RIBBON BIRD ROSE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5SAT-SV": {
+"desc": "1\" SATIN RIBBON SILVER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-FUS": {
+"desc": "2&3/4\" SATIN RIBBON FUSCIA | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"VRIP12": {
+"desc": "12\" H x 5.9\" OPEN RIP VASE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 10.68,
+"cbm": 0.0486,
+"max_container": 1399,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"R55-WH": {
+"desc": "5X5 WHITE GLASS CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.56,
+"cbm": 0.0321,
+"max_container": 2118,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RK3": {
+"desc": "STRAIGHT BLADE NO FOLD KNIFE | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"TSQ20": {
+"desc": "TALL PLATE GLASS SQUARE 20\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 34.02,
+"cbm": 0.071,
+"max_container": 957,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40SAT-RED": {
+"desc": "2&3/4\" SATIN RIBBON RED | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"DS-12": {
+"desc": "12X12X12\" TALL GLASS PLATE STAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 9.09,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PSQ-BK": {
+"desc": "BLACK SQUARE BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 6.24,
+"cbm": 0.011,
+"max_container": 6181,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL55-ETCH-SV": {
+"desc": "5X5X5 CYLINDER ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"40WOOD": {
+"desc": "WOOD RIBBON 103 | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.9,
+"cbm": 0.0011,
+"max_container": 61818,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"RP40-GD": {
+"desc": "ROYAL 2 3/4\"X100YD GOLD POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SGV01FGD": {
+"desc": "GOLD INNER & OUTER WAX FILLED VOTIVE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 25.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"RMESH-LAV": {
+"desc": "SISAL MESH 20\" LAV | 10-Yards per Roll / 24-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"MM230": {
+"desc": "SQUARE BOTTOM BUD VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 4.56,
+"cbm": 0.0207,
+"max_container": 3285,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PY8-HRT-BR": {
+"desc": "8\" BROWN TEDDY BEAR W/ HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"PL4CYL-WH": {
+"desc": "4X4X4 WHITE PLASTIC CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.16,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"VSLANT": {
+"desc": "12\" HT x 3.5 OPEN CLEAR PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"R66-WH-MIR": {
+"desc": "6X6 WHITE GLASS CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 28.64,
+"cbm": 0.0404,
+"max_container": 1683,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"C0504": {
+"desc": "5\" X 4\" CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"FOAMBALL-4": {
+"desc": "4.5\" FLORAL FOAM SPHERES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.4,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "TECNOFEN",
+"email": "VANESSA.SANTACRUZ@TECNOFEN.COM.MX",
+"country": "Mexico",
+"city": "SAN NATEO ATENCO",
+"street": "INDEPENDENCIA 1458, COL SAN ANTONIO",
+"port": null,
+"lead": 50
+},
+"GL-BD-103": {
+"desc": "SET OF 2 MINI VASES - 6 SETS OF 2 PER CASE | 2-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 0.73,
+"cbm": 0.0042,
+"max_container": 16190,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"GL-BD-102": {
+"desc": "SET OF 3 TIED W/ ROPE | 3-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 1.02,
+"cbm": 0.0075,
+"max_container": 9066,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"DS-30": {
+"desc": "12X12X30\" TALL GLASS PLATE STAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 16.88,
+"cbm": 0.138,
+"max_container": 492,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SQ5512": {
+"desc": "5X5X12 GLASS SQUARE | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12.9,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CL-8CIR": {
+"desc": "36\" HT CANDLEABRA- GOLD MARBLE BASE [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CIRBCL-17": {
+"desc": "CLEAR GLASS VASE WROSE GLAD PLATING BALL 17\" | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 34.8,
+"cbm": 0.089,
+"max_container": 764,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL15154": {
+"desc": "15\"X 4\"H CYLINDER CLEAR GLASS | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"DC66-RD": {
+"desc": "6X6 DIMPLE PLAINTED RED CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.86,
+"cbm": 0.0285,
+"max_container": 2385,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"ROCK-FLT-MED-GY": {
+"desc": "FLAT GREY ROCKS 50-75MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SQRD-12": {
+"desc": "12X12 GLASS PLATE SQUARE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 31.56,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40PO-ROYAL": {
+"desc": "2&3/4\" POLY SATIN ROYAL BLUE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SM2029": {
+"desc": "NEVERWILT SATIN PILLOW W/CUP | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"QD": {
+"desc": "QUICK DIP | 1-Gallon per Bottle / 6-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 9.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"Z1284": {
+"desc": "8\" DESIGN BOWL x 7.5 OPEN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.22,
+"cbm": 0.0114,
+"max_container": 5964,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CARD-GWS": {
+"desc": "GET WELL SOON | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FM5-TEA": {
+"desc": "FLAT MARBLES - TEAL [Bag] | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.45,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZSQHRT-PF": {
+"desc": "SQUARE HEART VASE 10\" X 10\" | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28.4,
+"cbm": 0.038,
+"max_container": 1789,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SQ5516": {
+"desc": "5X5X16 GLASS SQUARE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.4,
+"cbm": 0.051,
+"max_container": 1333,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"TSQ12-MIR": {
+"desc": "12X4.5X4.5 MIRROR SQUARE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 33.9,
+"cbm": 0.033,
+"max_container": 2060,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"35MM-GD": {
+"desc": "35MM GOLD GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"9SHEER-TUR": {
+"desc": "1 1/2\" TURQUIOSE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"R55-ETCH-GD": {
+"desc": "5X5X5 SQUARE ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.48,
+"cbm": 0.0437,
+"max_container": 1556,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"4021-12-09": {
+"desc": "6 1/4\" GINGER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 21.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C1835": {
+"desc": "24\" MACHE BACK OASIS CROSS | 2-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 11.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ENV-56": {
+"desc": "#56 ENVELOPES",
+"unit": "Pack",
+"qty_per_unit": 500,
+"first_cost": 12.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"MM55SP": {
+"desc": "5X5X5 SPRING MIX CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.026,
+"max_container": 2615,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"REC4412-MGD-12": {
+"desc": "4X4X12 MIRROR GOLD RECTANGLE | 12-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 48.36,
+"cbm": 0.063,
+"max_container": 1079,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"X1454-SL": {
+"desc": "14\" SILVER GLITTER LEATHER FERN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"KMBSLV": {
+"desc": "MEDIUM BOUQ SLEEVES ASSORTED COLORS | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"SP-COP": {
+"desc": "SPRAY DYE COPPER | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"2112-14": {
+"desc": "14\" ARRANGEMENT BASKET | 4-Piece per SET / 3-SET per Case",
+"unit": "Set",
+"qty_per_unit": 4,
+"first_cost": 3.4,
+"cbm": 0.113,
+"max_container": 601,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"R66-BK-MIR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 8,
+"first_cost": 26.72,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"AMZR55BK": {
+"desc": "5X5X5 DESIGNER BLACK CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"WAX-RASPB": {
+"desc": "WAX TISSUE RASPBERRY 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 28.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"11471": {
+"desc": "GOLD VASE 55\" X 14\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 275,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"SAND-COR": {
+"desc": "CORAL SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-FUC": {
+"desc": "SPRAY DYE FUCHSIA | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"W135-NAT": {
+"desc": "6\" HANDLED BASKET W/ LINER- | 12-Piece per Pack / 3-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.76,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"TS168-BL": {
+"desc": "TABLE SKIRT 168\" X 30\" - BLUE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.77,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"9SHEER-LIM": {
+"desc": "1 1/2\" LIME WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.2,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40SAT-SUN": {
+"desc": "2&3/4\" SATIN RIBBON SUNSHINE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GLDOTS": {
+"desc": "GLUE DOTS HIGH TACK DABS | 1-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 38.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FPC CORP., DIANE CALLAHAN EXT 249",
+"email": null,
+"country": "United States",
+"city": "WAUCONDA",
+"street": "355 HOLLOW HILL DRIVE",
+"port": null,
+"lead": 50
+},
+"KCH": {
+"desc": "KOTCH STANDS 60\" WHITE | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 60,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DON'S WIRE FORMING CO.",
+"email": null,
+"country": "United States",
+"city": "JACKSON",
+"street": "960 ANDERSON RD",
+"port": null,
+"lead": 50
+},
+"W105-NAT": {
+"desc": "10\" ROUND HANDLED BASKET W/ LINER NATURAL | 12-Piece per Pack / 3-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.6,
+"cbm": 0.0744,
+"max_container": 913,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"AB2314": {
+"desc": "6HX10W ROUNDED PEDESTAL BOWL - PK-4 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"CYL620-6": {
+"desc": "6\" X 20\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15.12,
+"cbm": 0.135,
+"max_container": 503,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"78-48-07": {
+"desc": "DESIGN BOWL 10 1/2'' LONG | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 30.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SHYD-GR": {
+"desc": "HYDRANGEAS GREEN SINGLE STEM | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.0168,
+"max_container": 4047,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BS": {
+"desc": "34\" METAL BASKET STAND | 5-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 23.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DON'S WIRE FORMING CO.",
+"email": null,
+"country": "United States",
+"city": "JACKSON",
+"street": "960 ANDERSON RD",
+"port": null,
+"lead": 50
+},
+"REC4424-RGD": {
+"desc": "4X4X24 ROSE GOLD MIRROR RECTANGLE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 25.56,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"1042": {
+"desc": "8 1/2\" RING HOLDER | 2-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 8.26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GL-BD-100": {
+"desc": "5.5\" HT GLASS BUD VASES | 4-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 4,
+"first_cost": 0.8,
+"cbm": 0.0083,
+"max_container": 8192,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RIP14-GD": {
+"desc": "14\"X5\" GOLD RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"5SAT-FUS": {
+"desc": "1\" SATIN RIBBON FUSCHIA | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"V1850": {
+"desc": "13\" HT x 6.25\" OPEN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"16TAPEWH": {
+"desc": "16\" TAPERS WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"R999": {
+"desc": "8\" ROSE VASE CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.4,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"NWLEAF": {
+"desc": "2 3/4\" SILK CORSAGE LEAVES | 100-Piece Per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 3.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SP24": {
+"desc": "1 1/2\" BANK PIN | 0.5-Pounds per Pack / 10-Pack per SLEEVE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GL502181RD": {
+"desc": "LARGER PLASTIC TAPE DISPENSER RED | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.4,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-HOLRED": {
+"desc": "SPRAY DYE HOLIDAY RED | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"ESTK-30": {
+"desc": "30\" MIRROR BASE W/ STICKS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 38.7,
+"cbm": 0.066,
+"max_container": 1030,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SQCYL-12": {
+"desc": "SQUARE W/ CYLINDER 12 X 5 X 8 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 26.28,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SPAN-8OZ": {
+"desc": "SPANISH MOSS | 8-Oz. per BAG/ 6 Bags Per Box",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.1,
+"cbm": 0.00588,
+"max_container": 11564,
+"vendor": "HEMEX",
+"email": null,
+"country": "Mexico",
+"city": null,
+"street": null,
+"port": null,
+"lead": 50
+},
+"4048-06-09": {
+"desc": "8\" MILK JUG VASE - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 25.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"53858": {
+"desc": "BROWN LAYERED POT 8.00\"x 8.00\"x 5.50\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 26.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"REC4424-WH-6": {
+"desc": "RECTANGLE WHITE VASE 4X4X24 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30.84,
+"cbm": 0.07,
+"max_container": 971,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SP-PEA": {
+"desc": "SPRAY DYE PEACOCK | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SFH-PEO-FU": {
+"desc": "FUCHSIA PEONY HEAD XL | 48-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 48,
+"first_cost": 33.6,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"BCALL-PUR": {
+"desc": "CALLA LILY PURPLE | 9-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.21,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"PG-2710WH": {
+"desc": "RECTANGLE PLATE GLASS 7x2x10\" WHITE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 32,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BCALL-WH": {
+"desc": null,
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.56,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"REC4412-RGD-12": {
+"desc": "4X4X12 ROSE GOLD MIRROR RECTANGLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 48.36,
+"cbm": 0.065,
+"max_container": 1046,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"24W": {
+"desc": "24\" GREEN REINFORCED STYRO WREATH | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 11.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"SPGLIT-GD": {
+"desc": "SPRAY GLITTER - GOLD | 1-Oz. per Can / 6-Can per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 6.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"4UWST": {
+"desc": "4\" UNWIRED GREEN STICKS | 1000-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 2.2,
+"cbm": 0.0024,
+"max_container": 28333,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"R27SV": {
+"desc": "SILVER RECTANGLE DIAS DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 14.4,
+"cbm": 0.021,
+"max_container": 3238,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL812": {
+"desc": "8 x 12 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18.6,
+"cbm": 0.0942,
+"max_container": 721,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"16W": {
+"desc": "16\" GREEN REINFORCED STYRO WREATH | 1-Piece per Pack / 18-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 7.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"FCAND2-IV-72": {
+"desc": "2\" FLOATING CANDLE-IVORY | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 20.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"9SHEER-BK": {
+"desc": "1 1/2\" BLACK WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CST-6IN-GD": {
+"desc": "6\" SET OF 2 GOLD CANDLE HOLDERS | 2-Piece per SET / 30 Sets Per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 2,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"15680": {
+"desc": "6\"x7\"H CERAMIC ROUND POT ABSTRACT-MARBLE MATTE WHITE| 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"SP-NVBLU": {
+"desc": "SPRAY DYE NAVY BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SM2027": {
+"desc": "NEVERWILT SATIN CROSS W/CUP | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"SP-CORCHARM": {
+"desc": "SPRAY DYE CORAL CHARMING | 12-Oz. per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"36EASEL": {
+"desc": "36\" EASELS (3 Feet) | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 6.1,
+"cbm": 0.015,
+"max_container": 4533,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"CER-HCOMB-WH": {
+"desc": "10' x 4.5\" HONEYCOMB WHITE VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 32.28,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZCYL66-PF": {
+"desc": "6X6 CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 7.8,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"100LACE": {
+"desc": "36\" WIDE LACE RUNNER | 100-Feet per Pack / 9-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-NVBLU": {
+"desc": "1&1/2\" SATIN RIBBON NAVY BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S18400WH": {
+"desc": "32\" WHITE CHERRY BLOSSOM [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CYL66-ETCH-GD-6": {
+"desc": "6X6X6 CYLINDER ETCH- GOLD | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 9.6,
+"cbm": 0.054,
+"max_container": 1259,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"R6265-BR": {
+"desc": "IRON CANDLEABRA 24\" TALL - BROWN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MM99ORG": {
+"desc": "8\" BUNCH VASE ORANGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"2PP": {
+"desc": "2\" PEAR PEARL PIN | 144-Piece per Pack / 10-Pack per Case / 250-Pack per Master",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 2.81,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"AMZREC4412-MGD": {
+"desc": "4X4X12 MIRROR GOLD RECTANGLE 6 Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 35.46,
+"cbm": 0.065,
+"max_container": 1046,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CEL3620": {
+"desc": "36\" CELLOPHANE 2.0 MIL | 1200-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 31.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LIAONING PLASTICS CO",
+"email": null,
+"country": "China",
+"city": null,
+"street": null,
+"port": "DALIAN",
+"lead": 150
+},
+"RMESH-PU": {
+"desc": "SISAL MESH 20\" PURPLE | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"5SAT-AZA": {
+"desc": "1\" SATIN RIBBON AZALEA | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"KMBSLV-CL": {
+"desc": "MEDIUM BOUQ SLEEVES - ALL CLEAR PK 50",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"RP9-RBL": {
+"desc": "1 3/8\"X100YD ROYAL BLUE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"FV13PK": {
+"desc": "13\" FLARED VASE X 6.5 OPEN PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 32.88,
+"cbm": 0.1322,
+"max_container": 514,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"9SAT-CHOC": {
+"desc": "1&1/2\" RIBBON CHOCOLATE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EUC-ORG": {
+"desc": "EUCALYPTUS - ORANGE | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"GL16-WH": {
+"desc": "GLASS EIFFEL TOWER VASE WHITE 16\" | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 27.6,
+"cbm": 0.084,
+"max_container": 809,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"25106": {
+"desc": "3.25\"x7.50\"H CERAMIC ROUND VASE-MATTE WHITE| 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"SLP": {
+"desc": "STYRO & LACE PILLOW | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "A HART CO.",
+"email": "AHART-CO@SBCGLOBAL.NET",
+"country": "United States",
+"city": "CANTON",
+"street": "121 MILL STREET S.E.",
+"port": null,
+"lead": 50
+},
+"X2736-RD": {
+"desc": "20\" RED GLITTER LEATHER FERN | 12- Piece per pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"W1847": {
+"desc": "24\" MACHE BACK OASIS WREATH | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 22.63,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3292-24-09": {
+"desc": "5 1/2\" JARDIN VINTAGE JAR CRYSTAL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 21.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C929": {
+"desc": "12\" RIVIERA VASE - CRYSTAL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 38.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"W24X18G": {
+"desc": "24 GAUGE X 18 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.45,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"SHYD-BL": {
+"desc": "HYDYANGEA BLUE- SINGLE STEM | 12-Piece per Pack / 2 Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.44,
+"cbm": 0.01,
+"max_container": 6800,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"E34-06-04": {
+"desc": "10\" X 15\" COOLER BUCKET - BLACK | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 61.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BX-PU": {
+"desc": "LATEX BALLOON PURPLE |100 Per Bag",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"40SAT-CHOC": {
+"desc": "2&3.4\" SATIN RIBBON CHOCOLATE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FCAND3-RD-12": {
+"desc": "3\" FLOATING CANDLE - RED | 12-Piece Per BOX",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"PARCH": {
+"desc": "PARCHMENT PAPER SHRED | 10-Pounds per BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 21.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SHEER-BUR": {
+"desc": "1 1/2\" BURGANDY WIRED SHEER | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"CYL66-BK": {
+"desc": "6X6 BLACK CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 17.4,
+"cbm": 0.0544,
+"max_container": 1250,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SHEER-LTPK": {
+"desc": "2 1/2\" LIGHT PINK WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"5SAT-RLBLU": {
+"desc": "1\" SATIN RIBBON ROYAL BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CT": {
+"desc": "PENCIL CATTAILS BROWN | 100-Piece per BUNDLE",
+"unit": "Bundle",
+"qty_per_unit": 100,
+"first_cost": 3.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "KNUD NIELSEN COMPANY, INC",
+"email": null,
+"country": "United States",
+"city": "Evergreen",
+"street": "P.O. BOX 746-217 PARK STREET",
+"port": null,
+"lead": 50
+},
+"11410": {
+"desc": "AL GOLD VASE 47 X 11 | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 72.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-MEMORY": {
+"desc": "GOLD WORD - MEMORY | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL55-WH": {
+"desc": "5X5 GLASS WHITE CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.16,
+"cbm": 0.0343,
+"max_container": 1982,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"GIFTBOX-19": {
+"desc": "19\" PLASTIC GIFT BOX | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"AMZCYL66-PK6": {
+"desc": null,
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 0,
+"cbm": 0.039,
+"max_container": 1743,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"AZ40": {
+"desc": "40\" X 8\" EVENT VASE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"9BOW-BL": {
+"desc": "RIBBON 1&1/2\" PULL BOW BLUE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3GSTY": {
+"desc": "3X24X36\" GREEN STYROFOAM BOARD | 7-Piece per Case",
+"unit": "Pack",
+"qty_per_unit": 7,
+"first_cost": 90,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"MM900-24": {
+"desc": "9\" BUD VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"6046BK": {
+"desc": "15\" H X 9 X 7.5 BLACK TROPHY VASE | 1-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"AMZPG345": {
+"desc": "4X3X5H RECTANGLE PLATE GLASS VASE PACKED 6 Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 26.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9VEL-BBE-25": {
+"desc": "1 1/2\" BURGANDY WIRED | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.1,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"RP9-PEA": {
+"desc": "1 3/8\"X100YD PEACH POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RIP14-SV": {
+"desc": "14\"X5\" SILVER RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 31.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"25-0233GR": {
+"desc": "50\" PHALAENOPSIS ORCHIDS GREEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"ADH.5C": {
+"desc": "1/2\" CLEAR OASIS TAPE | 60-Yards per Roll / 48-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-SV": {
+"desc": "1&1/2\" SATIN RIBBON SILVER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PEP": {
+"desc": "2 1/2\" RED/WHITE PEP RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.75,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"REC4418-BK-12": {
+"desc": "RECTANGLE BLACK VASE 4X4X18 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 60,
+"cbm": 0.09,
+"max_container": 755,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"48EASEL": {
+"desc": "48\" EASELS (4 Feet) | 5-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 7.25,
+"cbm": 0.0225,
+"max_container": 3022,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"REC4424": {
+"desc": "RECTANGLE VASE 4X4X24 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30.84,
+"cbm": 0.07,
+"max_container": 971,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"75LACE": {
+"desc": "36\" WIDE LACE RUNNER | 75-Feet per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.71,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3293-24-429": {
+"desc": "6 1/2\" JARDIN VINTAGE JAR - 4 COLOR ASST | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 33.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BLING-4ROW-GD": {
+"desc": "BLING MESH 10YD 4 ROW GOLD | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.7,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"40SAT-BURG": {
+"desc": "2&3/4\" SATIN RIBBON BURGUNDY | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MGLPF": {
+"desc": "MIRACLE GROW 80Z LIQUID | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 19.49,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"RWRST": {
+"desc": "CARDED WRISTLETS | 20-Piece per Pack / 50-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 20,
+"first_cost": 2.3,
+"cbm": 0.0007,
+"max_container": 97142,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"40PO-EMER": {
+"desc": "2&3/4\" POLY EMERALD RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WHEAT-OR": {
+"desc": "WHEAT ORANGE | 0.5-Pounds per BUNDLE",
+"unit": "Bundle",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"RB16": {
+"desc": "1/16\" RUBBER BANDS | 1-Pounds per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LANXI WANGXING PLASTIC CO., LTD",
+"email": "SALES@CNRUBBERBAND.COM",
+"country": "China",
+"city": "YIWU CITY",
+"street": "ROOM 302, NO. 31-35, DISTRICT 5, ZI",
+"port": null,
+"lead": 150
+},
+"679-06-07": {
+"desc": "15\" PLASTIC BACK FOAM WREATH | 1-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 9.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CS6": {
+"desc": "6\" CLEAR SAUCER | 25-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.8,
+"cbm": 0.0009,
+"max_container": 75555,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"R66-BK": {
+"desc": "6X6 BLACK GLASS CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.6,
+"cbm": 0.059,
+"max_container": 1152,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"W24": {
+"desc": "WHITE PILSNER VASE 6\" BASE, 5.6\" OPEN, 24\"h | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 174,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CYL514-6": {
+"desc": "5\" X 14\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.2,
+"cbm": 0.0453,
+"max_container": 1501,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL804-ETCH-GD": {
+"desc": "8X8X4 CYLINDER ETCH- GOLD | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.14,
+"cbm": 0.0385,
+"max_container": 1766,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CER-PLT-1163": {
+"desc": "WHITE PLANTER 6\",5\",4\" | 3-Piece Per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 3.1,
+"cbm": 0.0028,
+"max_container": 24285,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZCYL306-PF": {
+"desc": "3X6 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 5.4,
+"cbm": 0.016,
+"max_container": 4250,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BTUL-OR": {
+"desc": "TULIP LT ORANGE -ORANGE | 10-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"BTUL-RD": {
+"desc": "TULIP RED | 10-Heads per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.86,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"RBTUL-DKPU": {
+"desc": "TULIP LT DARK PURPLE | 10-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"RBTUL-PK": {
+"desc": null,
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RBTUL-WH": {
+"desc": "TULIP LT WHITE | 10-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"EUC-RED": {
+"desc": "EUCALYPTUS - RED | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"2112-12": {
+"desc": "12\" ARRANGEMENT BASKET | 4-Piece per SET / 3-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 1.5,
+"cbm": 0.0315,
+"max_container": 2158,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"BHJR": {
+"desc": "JUNIOR MISS BOUQUET HOLDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 18.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PL-NAPHOLDER-18": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "JAYI ACRYLIC LTD",
+"email": null,
+"country": "China",
+"city": "CENTRAL HONG KONG",
+"street": "RM 301 7A 3F HONGKONG TRADE CTR",
+"port": "YANTIAN",
+"lead": 150
+},
+"18327": {
+"desc": "4.50\"x7.50\"H CERAMIC FOOTED POT W/SPHERE STUDS-MATTE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"16TAPEIV": {
+"desc": "16\" TAPERS IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"LREC-ORCHIDP": {
+"desc": "LG HANGING GLASS ORCHID PURPLE FLOWER | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 56,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RMESH-IV": {
+"desc": "SISAL MESH 20\" IVORY | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"9SAT-FUS": {
+"desc": "1&1/2\" SATIN RIBBON FUSCHIA | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BLING-4ROW-SV": {
+"desc": "BLING MESH 4 ROW SILVER | 10YD Per Roll",
+"unit": "Roll",
+"qty_per_unit": 1,
+"first_cost": 0.61,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"LENV-63": {
+"desc": "#63 WHITE ENVELOPES 4 1/4 X 2 1/2 | 500-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 500,
+"first_cost": 8.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ABSP-YEL": {
+"desc": "ABSORBTION DYE YELLOW | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 10.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-DELBLU": {
+"desc": "SPRAY DYE DELPHINIUM BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"AMZSQ4510-PF": {
+"desc": "5X4X10\" CLEAR TAPERED SQUARE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 11.1,
+"cbm": 0.0658,
+"max_container": 1033,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"EMB-ROY": {
+"desc": "EMBOSSED FOIL NO BACKING ROYAL 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP40-BL": {
+"desc": "ROYAL 2 3/4\"X100YD BLUE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"PG-368": {
+"desc": "6X3X8H RECTANGLE PLATEGLASS VASE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 24.32,
+"cbm": 0.029,
+"max_container": 2344,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"REC4412-RGD": {
+"desc": "4X4X12 ROSE GOLD MIRROR RECTANGLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 21,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CWIRE18": {
+"desc": "18\" CHICKEN WIRE X 150 FT | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.36,
+"cbm": 0.009,
+"max_container": 7555,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"PF-12X30": {
+"desc": "12X12X30 SQUARE MIRROR PLATFORM | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 43.33,
+"cbm": 0.13,
+"max_container": 523,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9VEL-GGE-25": {
+"desc": "1 1/2\" GREEN WIRED GREENEDGEX | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.1,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"614-12-07": {
+"desc": "2/3 BRICK CAGE WITH AQUAFOAM - GREEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 42.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"PL-CYL508-WH": {
+"desc": "5X8 WHITE PLASTIC CYLINDER | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 16.2,
+"cbm": 0.052,
+"max_container": 1307,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"5SAT-HPK": {
+"desc": "1\" SATIN RIBBON HOT PINK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"REC4418-12": {
+"desc": "RECTANGLE VASE 4X4X18 | 12-Piece per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 58.14,
+"cbm": 0.066,
+"max_container": 1030,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LRG-SSPKL": {
+"desc": "SPECKLED HANGING GLASS CANDLE HOLDER 6, | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"616-24-07": {
+"desc": "SNAP CAGE-OPEN BASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 41.22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RPETAL-PK": {
+"desc": "ROSE PETALS PINK | 1000-Piece per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 1000,
+"first_cost": 1.09,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"R44-M": {
+"desc": "4X4X4 DESIGNER MIRROR CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.72,
+"cbm": 0.023,
+"max_container": 2956,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"11-51775": {
+"desc": "GRANDE STRAIGHT WEDDING BELLE HOLDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CS245": {
+"desc": "4\"X3\"X10\" CRYSTAL SQUARE CANDLEHOLDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 72.84,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-PURPAN": {
+"desc": "SPRAY DYE PURPLE PANSY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"5SAT-RD": {
+"desc": "1\" SATIN RIBBON RED | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-PIN": {
+"desc": "1&1/2\" POLY PINK RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5BOW-RED": {
+"desc": "RIBBON 1\" PULL BOW RED | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BOXBALL-18": {
+"desc": "18\" BOXWOOD BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 50.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"EMB-PUR": {
+"desc": "EMBOSSED FOIL NO BACKING PURPLE 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"V201": {
+"desc": "ROLY POLY VOTIVE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 8.64,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"6041-N": {
+"desc": "5 (D) X 6 (H) X 3.5 (O) HANGING SILVER BALL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"UCAGE": {
+"desc": "UNIVERSAL PLASTIC CAGE WITH OASIS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18,
+"cbm": 0.1593,
+"max_container": 426,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SM2006": {
+"desc": "NEVERWILT CASCADE SADDLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 35.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"75-1115": {
+"desc": "LARGE LED LIGHT BASE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 12.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RP40-PEA": {
+"desc": "ROYAL 2 3/4\"X100YD PEACH POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SFR-PK": {
+"desc": "SMALL PINK ROSARY SILK FLOWER FILLED - 53 BEAD | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 11.97,
+"cbm": 0.00632,
+"max_container": 10759,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"3SAT-LAV": {
+"desc": "3/4\" SATIN RIBBON LAVENDER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EMB-LAV": {
+"desc": "EMBOSSED FOIL NO BACKING LAVENDER 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PEO-DPK": {
+"desc": "PEONIES BUNCH DEEP PINK | 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.51,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CER-6055-GD": {
+"desc": "12\" CERAMIC ROUND GOLD | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 15,
+"cbm": 0.079,
+"max_container": 860,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"WAX-VAN": {
+"desc": "WAX TISSUE VANILLA 24X36 | 400-SHEETS per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R55-ETCH-SV": {
+"desc": "5X5X5 SQUARE ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.48,
+"cbm": 0.0437,
+"max_container": 1556,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"R691S": {
+"desc": "OVAL WILLOW BASKET W/MOVABLE HANDLES | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"SCRIPT-GRANDMA": {
+"desc": "GOLD WORD - GRANDMA | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"LPRL-BK": {
+"desc": "PEARLS LARGE 30MM | 1-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"XFFSNOW-PINE": {
+"desc": "Full Face Snowman Pick w/ Pine | 36 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 48.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"602C": {
+"desc": "9\" DECO BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 26.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZSQ5510-PF": {
+"desc": "5X5X10 TALL CUBE | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.36,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZREC4410": {
+"desc": "RECTANGLE VASE 4X4X10 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 21.9,
+"cbm": 0.055,
+"max_container": 1236,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"DBUN-FALLPUM": {
+"desc": "Dried Fall Bundle | 24 Bags per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"40SAT-NVBLU": {
+"desc": "2&3/4\" SATIN RIBBON NAVY BLUE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"AMZCYL508-PF": {
+"desc": "5X8 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 6.36,
+"cbm": 0.039,
+"max_container": 1743,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MA495": {
+"desc": "9.45\" X 4.5\" OPEN VASE CLEAR | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 5.4,
+"cbm": 0.0468,
+"max_container": 1452,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"9MET-SV": {
+"desc": "1 1/2\" SILVER METALLIC | 25-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.78,
+"cbm": 0.00054,
+"max_container": 125925,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"9SHEER-LPK": {
+"desc": "1 1/2\" LIGHT PINK WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"613-12-07": {
+"desc": "1/3 BRICK CAGE WITH AQUAFOAM - GREEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 27.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"640-06-22": {
+"desc": "CAKE KIT - WHITE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 44.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"MA408-BL": {
+"desc": "8\" X 4\" BLUE CYLINDER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MM972ORG": {
+"desc": "8\" HALF DOZEN ROSE VASE ORANGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"EUC-BLU": {
+"desc": "EUCALYPTUS - BLUE | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"RBHO-D": {
+"desc": "BOUQUET HOLDER- STRAIGHT ROUND 3.1\" x 7.9\" H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12,
+"cbm": 0.023,
+"max_container": 2956,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"TSQ10": {
+"desc": "TALL PLATE GLASS SQUARE 10\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.8,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"24BEAD": {
+"desc": "2X24X42 BEAD BOARD | 9-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 9,
+"first_cost": 46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRIME STUCCO SUPPLY CORP",
+"email": null,
+"country": "United States",
+"city": "BROOKLYN",
+"street": "1271 MCDONALD AVE",
+"port": null,
+"lead": 50
+},
+"2C-628": {
+"desc": "LARGE URN W/ BASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.44,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CER-CYL55-SPRING": {
+"desc": "5X5 SPRING CYLINDER | 3-Piece Per SET / 4-SET Per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 3.48,
+"cbm": 0.014,
+"max_container": 4857,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"SP-DARCHO": {
+"desc": "SPRAY DYE DARK CHOCOLATE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"GLITGD": {
+"desc": "GOLD FINE GLITTER | 16-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 8.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"6043-N": {
+"desc": "7 (D) X 8 (H) X 4.25 (O) HANGING SILVER BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 37.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"1578A": {
+"desc": "ALL TEMP GLUE STICK APPROX 90 STICKS | 5-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FPC CORP., DIANE CALLAHAN EXT 249",
+"email": null,
+"country": "United States",
+"city": "WAUCONDA",
+"street": "355 HOLLOW HILL DRIVE",
+"port": null,
+"lead": 50
+},
+"86PCE": {
+"desc": "8.5 x 7\" HANDLED WICKER BASKET | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.65,
+"cbm": 0.01345,
+"max_container": 5055,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"WOOD448-WH": {
+"desc": "4X4X8 WHITE WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"R77": {
+"desc": "7X7X7 CLEAR CUBE | 4-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 4,
+"first_cost": 25.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"5SAT-GD": {
+"desc": "1\" SATIN RIBBON GOLD | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BHO": {
+"desc": "STANDARD BOUQUET HOLDER | 12-Piece per BOX / 8-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 11.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"16TAPEOR": {
+"desc": "16\" TAPERS ORANGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"EMB-RED": {
+"desc": "EMBOSSED FOIL NO BACKING RED 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30LILY": {
+"desc": "30\" BURGANDY LILY PAPER X 1500FT",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"LOBCONE": {
+"desc": "LOBOLLY NATURAL PINE CONE 3-4\" PK 100",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"699-02-07": {
+"desc": "24\" PLASTIC BACK SOLID HEART | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 21.09,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"16SAT-PK": {
+"desc": "2&1/2\" SATIN RIBBON PINK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 11.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BRIBB": {
+"desc": "BARK RIBBON 4\" | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZCYL416-PF": {
+"desc": "4X16 CYLINDER | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 11.1,
+"cbm": 0.057,
+"max_container": 1192,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RBUD": {
+"desc": "RED ROSE BUDS | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 4.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"R66-ETCH-SV": {
+"desc": "6X6X6 SQUARE ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 23.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"LPRL-IV": {
+"desc": "PEARLS LARGE 30MM | 1-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"X1980-RED": {
+"desc": "ASSORTED HOLIDAY PICKS RED COLOR | 12-Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"AMZCYL506-PF": {
+"desc": "5X6 Glass Cylinder | 6 Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40SAT-ORA": {
+"desc": "2&3/4\" SATIN RIBBON ORANGE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EMB-PK": {
+"desc": "EMBOSSED FOIL NO BACKING PINK 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"X1010-RD": {
+"desc": "7\" DIA POINSETTIA HEAD - RED | 10 Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"9BOW-BEAU": {
+"desc": "RIBBON 1&1/2\" PULL BOW BEAUTY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4099-12-09": {
+"desc": "8\" ROSE VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SQCYL-8": {
+"desc": "SQUARE W/ CYLINDER 10 X 5 X 8 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 23.46,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"STEMROSE-PK": {
+"desc": "STEM ROSES PINK | 12- Heads per Bunch",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.12,
+"cbm": 0.00295,
+"max_container": 23050,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"11-01010": {
+"desc": "FLORACAGE GRANDE HOLDER, 12/CS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 32.81,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-SUN": {
+"desc": "3/4\" SATIN RIBBON SUNSHINE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-CFINISH": {
+"desc": "SPRAY DYE CLEAR FINISH | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"WAX-PLUM": {
+"desc": "WAX TISSUE PLUM 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 28.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RPIN": {
+"desc": "DIAMANTE PINS CLEAR | 100-Piece per Pack / 10-Pack per Sleeve / 250-Pack per Master",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"AMZSQ5512-PF": {
+"desc": "5X5X12 TALL CUBE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 14.28,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"LAV-5": {
+"desc": "LAVENDER - 12 STEMS PER BAG | 12-Stems per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 4.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"LBSLV-CL": {
+"desc": "LARGE BOUQ SLEEVES - ALL CLEAR PK 50",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"SCRIPT-COUS": {
+"desc": "GOLD WORD - COUSIN | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SATC": {
+"desc": "ALL SATIN CROSS | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "A HART CO.",
+"email": "AHART-CO@SBCGLOBAL.NET",
+"country": "United States",
+"city": "CANTON",
+"street": "121 MILL STREET S.E.",
+"port": null,
+"lead": 50
+},
+"40SHEER-PU": {
+"desc": "2 1/2\" PURPLE WIRED SHEER | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"9SAT-IV": {
+"desc": "1&1/2\" SATIN RIBBON IVORY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-GD": {
+"desc": "1&1/2\" SATIN RIBBON GOLD | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MTLS4144": {
+"desc": "SILVER, 14\"X4\"OPEN,4\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 114,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"V415": {
+"desc": "16\" HT x 4.5\" OPEN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 16.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"LET-A": {
+"desc": "LETTER - A | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"ROCK-SML-WH": {
+"desc": "SMALL WHITE ROCKS 8-15MM | 5-Pounds per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"87215": {
+"desc": "MIRROR VASE 35\"H X 10\"W [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 33.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"R66-ETCH-GD": {
+"desc": "6X6X6 SQUARE ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"40SAT-LAV": {
+"desc": "2&3/4\" SATIN RIBBON LAVENDER | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EMB-WH": {
+"desc": "EMBOSSED FOIL NO BACKING WHITE 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PLNT-DRACA": {
+"desc": "DRACAENA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.11,
+"cbm": 0.009,
+"max_container": 7555,
+"vendor": "ZHEJIANG JIAWEI ARTS & CRAFTS CO.,LTD",
+"email": null,
+"country": "China",
+"city": null,
+"street": "Park, Dongyang, Zhejiang, China",
+"port": "SHENZHEN",
+"lead": 150
+},
+"5SAT-RUST": {
+"desc": "1\" SATIN RIBBON RUST | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-BEAU": {
+"desc": "1&1/2\" POLY BEAUTY RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"35MM-SV": {
+"desc": "35MM SILVER GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"XLBSLV": {
+"desc": "XTRA LARGE BOUQ SLEEVES - ALL CLEAR PK 50",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"CERWINK-WH": {
+"desc": "12.5\" CERAMIC VASE WHITE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"PL-SQ4510": {
+"desc": "4X5X10 PLASTIC TALL SQUARE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.9,
+"cbm": 0.0337,
+"max_container": 2017,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"9PO-RBL": {
+"desc": "1&1/2\" POLY ROYAL BLUE RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9002RD-HS": {
+"desc": "SET OF 3 ROUND HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.25,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"POLY-BIT": {
+"desc": "EMBOSSED FOIL POLY BACKING BITTERSWT 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-LAV": {
+"desc": "1&1/2\" SATIN RIBBON LAVENDER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"AMZSMGTAPERED": {
+"desc": "6\" X 2\" X 10\" MIRROR GLASS VASE | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"TS108-IV": {
+"desc": "TABLE SKIRT 108\" X 30\" - IVORY | 1-Roll per Pack",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.77,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"WOOD884-WH": {
+"desc": "8X8X4 WHITE WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"100SAT-RED": {
+"desc": "4\" SATIN RIBBON RED | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 11.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"W102-RD": {
+"desc": "8\" ROUND HANDLED BASKET W/ LINER RED | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.8,
+"cbm": 0.0357,
+"max_container": 1904,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"440OV-DS": {
+"desc": "OVAL BASKET ROPE TRIM 14\",16\",18\" | 3-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 7.3,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"R954C": {
+"desc": "9X5X4 CORSAGE BOX | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 10.2,
+"cbm": 0.0177,
+"max_container": 3841,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"3X3PILL-RD": {
+"desc": "3X3 RED PILLARS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"MM12-RD": {
+"desc": "RED GLASS VASE - 5.7 X 11.8\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 6.06,
+"cbm": 0.039,
+"max_container": 1743,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"30AMB": {
+"desc": "30\" CELLOPHANE - AMBER X 100' | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"25-0234WH": {
+"desc": "HYDRANGEA 27\" - WHITE SINGLE STEM | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RP9-YEL": {
+"desc": "1 3/8\"X100YD YELLOW POLY RIBBON | 100-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"92552": {
+"desc": "CERAMIC VASE THREE ASSORTED 12\"H X 3\"W | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 53.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"GL502181BLU": {
+"desc": "LARGER PLASTIC TAPE DISPENSER BLUE | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.4,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"B18-YOUR": {
+"desc": "BALLOON 18\" YOUR SO SPECIAL | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"5BOW-PK": {
+"desc": "RIBBON 1\" PULL BOW PINK | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5BOW-WH": {
+"desc": "RIBBON 1\" PULL BOW WHITE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-HOLGR": {
+"desc": "SPRAY DYE HOLIDAY GREEN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"5SAT-YELL": {
+"desc": "1\" SATIN RIBBON YELLOW | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"X2711": {
+"desc": "7\" FLOCKED SNOWMAN PICK | 12-Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"0148": {
+"desc": "DESIGNER OASIS BLOCK | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 29.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"X1011-RD": {
+"desc": "11\" POINSETTIA HEAD | 100 PIECES PER BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 66.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"ABSP-LIM": {
+"desc": "ABSORBTION DYE LIME | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"9BOW-RED": {
+"desc": "RIBBON 1&1/2\" PULL BOW RED | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP40-SV": {
+"desc": "ROYAL 2 3/4\"X100YD SILVER POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"40SAT-EGG": {
+"desc": "2&3/4\" SATIN RIBBON EGGSHELL | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3X3PILL-PK": {
+"desc": "3X3 PINK PILLARS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"9PO-YELL": {
+"desc": "1&1/2\" POLY YELLOW RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MA408-RD": {
+"desc": "8\" X 4\" RED CYLINDER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BIRDS": {
+"desc": "SMALL BIRDS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"RMESH-RBL": {
+"desc": "SISAL MESH 20\" ROYAL BLUE | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"SP-BAS": {
+"desc": "SPRAY DYE BASIL | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RCURL-RD": {
+"desc": "3/16\" RED CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SP-ICEBLU": {
+"desc": "SPRAY DYE ICE BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"2125GD": {
+"desc": "12\" X 5\" GOLD ANTIQUE PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"DTUB-B3": {
+"desc": "BAMBOO TUBE GLASS VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 25.8,
+"cbm": 0.078,
+"max_container": 871,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9SAT-PK": {
+"desc": "1&1/2\" SATIN RIBBON PINK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-WHI": {
+"desc": "3/4\" SATIN RIBBON WHITE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PSQ-GR": {
+"desc": "GREEN SQUARE BOWL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 6.24,
+"cbm": 0.011,
+"max_container": 6181,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RV128": {
+"desc": "12\" X 6.5\" VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 10,
+"cbm": 0.0849,
+"max_container": 800,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"16TAPEYEL": {
+"desc": "16\" TAPERS YELLOW | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"SP-PACBL": {
+"desc": "SPRAY DYE PACIFIC BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SCSLV": {
+"desc": "SINGLE SLEEVES | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 4.29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"TS108-WH": {
+"desc": "TABLE SKIRT 108\" X 30\" - WHITE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.65,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"30S": {
+"desc": "30\" MYLAR PAPER - SILVER | 100-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WOOD4616-BR": {
+"desc": "4X6X16 WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 25.32,
+"cbm": 0.084,
+"max_container": 809,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"SLC": {
+"desc": "STYRO & LACE CROSS 10'' x 14'' | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "A HART CO.",
+"email": "AHART-CO@SBCGLOBAL.NET",
+"country": "United States",
+"city": "CANTON",
+"street": "121 MILL STREET S.E.",
+"port": null,
+"lead": 50
+},
+"4061-06-09": {
+"desc": "10 5/8\" BELLA VASE - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 15.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"30C": {
+"desc": "30\" GREEN REINFORCED STYRO CROSS | 1-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 11.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"STEMROSE-YEL": {
+"desc": "STEM ROSES YELLOW | 12-Heads per Bunch",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.12,
+"cbm": 0.00295,
+"max_container": 23050,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"30MM-AST": {
+"desc": "30MM ASST GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"5SAT-BURG": {
+"desc": "1\" SATIN RIBBON BURGUNDY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"DC66-SV": {
+"desc": "6X6 DIMPLE SILVER CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.28,
+"cbm": 0.0285,
+"max_container": 2385,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CMC-4096": {
+"desc": "CMC TPR REC 6.25HX10X5.5 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"RMESH-GR": {
+"desc": "SISAL MESH 20'' GREEN | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"PF-12X1": {
+"desc": "12X12X1 MIRROR PLATFORM | 1-Piece per Pack / 8-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.99,
+"cbm": 0.005,
+"max_container": 13600,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RMESH-PK": {
+"desc": "SISAL MESH 20\" PINK | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"VP1207": {
+"desc": "12\" X 7\" OPEN VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 10,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"9001OV-DS": {
+"desc": "SET OF 3 OVAL HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.05,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"BSUNF-7": {
+"desc": "SUNFLOWER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.51,
+"cbm": 0.0021,
+"max_container": 32380,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"15110": {
+"desc": "GOLD TALL ROUND VASE 4.75\"x 4.75\"x 11.75\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"5SAT-WHI": {
+"desc": "1\" SATIN RIBBON WHITE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.84,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"25MM-GD": {
+"desc": "25MM GOLD GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"PEO-LPK": {
+"desc": "PEONIES BUNCH LIGHT PINK | 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.51,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"POLY-NILE": {
+"desc": "EMBOSSED FOIL POLY BACKING NILE GREEN 20\"X30' ROLL [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SB6": {
+"desc": "6\" STYRO BALLS | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"8015-WHT": {
+"desc": "SATIN & LACE FLOWER GIRL BASKET- WHT | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"40SAT-IV": {
+"desc": "2&3/4\" SATIN RIBBON IVORY | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"2363": {
+"desc": "5X8\" 1/2 GAL. FISH BOWL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.28,
+"cbm": 0.065,
+"max_container": 1046,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"9SHEER-GR": {
+"desc": "1 1/2\" GREEN WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"688-02-07": {
+"desc": "36\" PLASTIC BACK FOAM CROSS PK 2 [Piece] | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 22.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"BLING-RED": {
+"desc": "BLING WRAP- RED | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.11,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9PO-BLA": {
+"desc": "1&1/2\" POLY SATIN BLACK RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"TSQ14": {
+"desc": "TALL PLATE GLASS SQUARE 14\" | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 32,
+"cbm": 0.067,
+"max_container": 1014,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"A146": {
+"desc": "15\" H X 8 \" CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"40BOW-BEAU": {
+"desc": "RIBBON 2&1/2\" PULL BOW BEAUTY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-WH": {
+"desc": "3/16\" WHITE CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"40SAT-YEL": {
+"desc": "2&3/4\" SATIN RIBBON YELLOW | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9VGB1-RD": {
+"desc": "1 1/2\" VELVET GOLD BACK RED RIB | 25-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 15.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"24SHAM": {
+"desc": "24\" GREEN REINFORCED SHAMROCK | 1-Piece per Pack / 16-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"3SAT-PUR": {
+"desc": "3/4\" SATIN RIBBON PURPLE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BLAN-24": {
+"desc": "BLACK 5\"X5\"X21 1/2\"H GLASS CANDLE HOLDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 33.56,
+"cbm": 0.089,
+"max_container": 764,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL614": {
+"desc": "6\" X 14\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.68,
+"cbm": 0.0546,
+"max_container": 1245,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"3X6PILL-IV": {
+"desc": "3X6 PILLAR CANDLE IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"CER-HPLT-1165": {
+"desc": "WHITE PLANTER W/ GOLD METAL | 2-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 2.98,
+"cbm": 0.01,
+"max_container": 6800,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZPG348": {
+"desc": "4X3X8H RECTANGLE PLATE GLASS VASE | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"5DFS-WH": {
+"desc": "1\" DOUBLE FACE SATIN WHITE | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.45,
+"cbm": 0.0006,
+"max_container": 113333,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"3SAT-AZA": {
+"desc": "3/4\" SATIN RIBBON AZALEA",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"65496": {
+"desc": "MTL GOLD CANDELABRA 13\"H, 20\"W | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"SHELLS": {
+"desc": "SEA SHELLS 1LB BOTTLE 5-8 CM | Approximately 35-Piece Per Pack/ 6-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"40SHEER-TUR": {
+"desc": "2 1/2\" TURQUIOSE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"31-90152": {
+"desc": "4\" FOAM CANDY CANE | 8 PC PER PACK / 12PK/CS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3293-24-427": {
+"desc": "6 1/2\" JARDIN VINTAGE JAR - VINTAGE PINK | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 29.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-FREBLU": {
+"desc": "SPRAY DYE FRENCH BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"GLITRD": {
+"desc": "RED GLITTER FINE | 16-Oz. per CAN",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 8.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"CYL628": {
+"desc": "6\" X 28\" CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 13.8,
+"cbm": 0.084,
+"max_container": 809,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"11-41720": {
+"desc": "LG CLEAR WEDDING BOUQ HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SPAN-RIBB-BOY": {
+"desc": "SPANISH BABY BOY PATTERN RIBBON 25 YD[Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RP9-HPK": {
+"desc": "1 3/8\"X100YD HOT PINK POLY RIBBON | 100-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"X1012-WH": {
+"desc": "7\" DIA POINSETTA - WHITE [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"MIRR-RECT-S": {
+"desc": "12 X 8 RECTANGLE MIRROR GLASS CANDLE PLATE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 18.24,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9SAT-BK": {
+"desc": "1&1/2\" SATIN RIBBON BLACK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"12CANDGD": {
+"desc": "12\" CANDLES GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"PICK-HBD": {
+"desc": "HAPPY BIRTHDAY PICKS | 12-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"2WSTY": {
+"desc": "2X12X36 WHITE STYROFOAM BOARD | 10-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 58.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"687-02-07": {
+"desc": "30\" PLASTIC BACK FOAM CROSS | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 13.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"BOUT-WH": {
+"desc": "1 1/2\" BOUT PIN | 144-Piece per Pack / 10-Pack per Sleeve / 500-Pack per Master",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 2.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-BLUS": {
+"desc": "SPRAY DYE BLUSH | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"5MET-SV": {
+"desc": "1\" SILVER METALLIC | 25-Yards per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.85,
+"cbm": 0.00035,
+"max_container": 194285,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"RMESH-YEL": {
+"desc": "SISAL MESH 20\" YELLOW | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"KPAPER": {
+"desc": "30/40 KRAFT PAPER ROLLS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 22.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRIME PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "Brooklyn",
+"street": "1290 METROPOLITAN AVE.",
+"port": null,
+"lead": 50
+},
+"25MM-BUR": {
+"desc": "25MM BURGANDY GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SP-BLUSKY": {
+"desc": "SPRAY DYE BLUE SKY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"ADHS": {
+"desc": "ADHESIVE STRIPS PK 250 - PK6 | 250-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 250,
+"first_cost": 32.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SETOF4-CYL-SMALL": {
+"desc": "SET OF 4 CYLINDER 6\",8\",9\",11\" | 1 Set Per Pack",
+"unit": "Set",
+"qty_per_unit": null,
+"first_cost": 20.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BCALL-PK": {
+"desc": "CALLA LILY PINK | 9-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.18,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"POLY-EME": {
+"desc": "EMBOSSED FOIL POLY BACKING EMERALD 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S2444CM": {
+"desc": "32\" IVORY AMARANTHUS [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"40SAT-PEA": {
+"desc": "2&3/4\" SATIN RIBBON PEACH | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-MIN": {
+"desc": "2&3/4\" SATIN RIBBON MINT | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PF12X1-BK": {
+"desc": "12 X 1 X 1 BLACK MIRROR PK8",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 31.92,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"OVL4X8-ETCH-SV": {
+"desc": "4HX8L OVAL ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CYL506": {
+"desc": "5\" X 6\" CYLINDER CLEAR | 12-Piece per Pack",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 9.84,
+"cbm": 0.037,
+"max_container": 1837,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"ROCK-LRG-NT": {
+"desc": "LARGE NATURALLY COLORED ROCKS 15-25MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.43,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"RAF-RD": {
+"desc": "RAFFIA RED | 16-Oz. per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.57,
+"cbm": 0.0091,
+"max_container": 7472,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-OUR": {
+"desc": "GOLD WORD - OUR | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-HYDBLU": {
+"desc": "SPRAY DYE HYDRANGEA BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"100LED": {
+"desc": "LED 100'S LIGHTS | 33-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"4049-12-09": {
+"desc": "9\" JORDAN VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 33.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RG1016": {
+"desc": "16\" X 7\" ARRANGMENT VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 20.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"15715": {
+"desc": "4.25\"x10\"H CERAMIC VASE-MATTE BLACK| 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 40,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"ABSP-LBL": {
+"desc": "ABSORBTION DYE LARKSPUR BLUE | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"9SHEER-LAV": {
+"desc": "1 1/2\" LAVENDER WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"E30-12-04": {
+"desc": "7\" X 8\" COOLER BUCKET - BLACK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 43.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R273-DS": {
+"desc": "6\" PEANUT BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15,
+"cbm": 0.0408,
+"max_container": 1666,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"PLS8": {
+"desc": "SMALL LEAFSHINE POKON | 8.5-Oz. per Can / 12-Can per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHRYSAL USA INC.",
+"email": "INFO@CHRYSALUSA.COM",
+"country": "United States",
+"city": "MIAMI",
+"street": "3063 NW 107TH AVENUE",
+"port": null,
+"lead": 50
+},
+"FRP01-SVGD": {
+"desc": "PREFILLED ROLY POLY VOTIVE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 19.8,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"GEM3-GR": {
+"desc": "GEMS GREEN | 3-Pounds Per Bag / 4-Bag Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.79,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SAND-TUQ": {
+"desc": "TURQUOISE SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"39-06-09": {
+"desc": "18\" DESIGNER DISH - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 42.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-BK": {
+"desc": "2&3/4\" SATIN RIBBON BLACK | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"36C": {
+"desc": "36\" GREEN REINFORCED STYRO CROSS | 1-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 14.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"ROCK-LRG-MB": {
+"desc": "LARGE MARBLE ROCKS 15-25MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.06,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"MA408-PU": {
+"desc": "8\" X 4\" PURPLE CYLINDER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"LET-Q": {
+"desc": "LETTER - Q | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"M1070": {
+"desc": "MOM OASIS FORM | 1-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 25.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EUC-BAS": {
+"desc": "EUCALYPTUS - BASIL | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"ADH.25W": {
+"desc": "1/4\" WHITE ADHESIVE TAPE | 60-Yards per Roll / 48-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-BEAU": {
+"desc": "2&3/4\" POLY BEAUTY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-HUN": {
+"desc": "1&1/2\" SATIN RIBBON HUNTER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-LIL": {
+"desc": "SPRAY DYE LILAC | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"75POLY": {
+"desc": "75'X36\" WIDE POLY AISLE RUNNER | 75-Feet per ROLL / 16-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RRT": {
+"desc": "RAIL ROAD TRACKS PK 25 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DON'S WIRE FORMING CO.",
+"email": null,
+"country": "United States",
+"city": "JACKSON",
+"street": "960 ANDERSON RD",
+"port": null,
+"lead": 50
+},
+"270-25-09": {
+"desc": "CUT FLOWER BOX - CRYSTAL | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 53.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BX-YLW": {
+"desc": "LATEX BALLOON YELLOW | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 4.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"SLV-12": {
+"desc": "12\" X 5\" SILVER PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"SPGLIT-SLV": {
+"desc": "SPRAY GLITTER - SILVER | 1-Oz. per Can / 6-Can per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 3.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"9SHEER-YEL": {
+"desc": "1 1/2\" YELLOW WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40BOW-ROY": {
+"desc": "RIBBON 2&1/2\" PULL BOW ROYAL | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"POLY-ROY": {
+"desc": "EMBOSSED FOIL POLY BACKING ROYAL 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-RBL": {
+"desc": "3/4\" SATIN RIBBON ROYAL BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"24-24-22": {
+"desc": "BUD VASES - WHITE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 22.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"B18-WEL": {
+"desc": "BALLOON 18\" WELCOME BACK | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"RP9-PU": {
+"desc": "1 3/8\"X100YD PURPLE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"AMZCYL44-PK6": {
+"desc": "4X4X4 CYLINDER CLEAR | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"5BOW-GD": {
+"desc": "RIBBON 1\" PULL BOW GOLD | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ORC-SOIL": {
+"desc": "ORCHID SOIL 8QT POTTING MIX | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 19.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"R1118-BR": {
+"desc": "HANGING VOTIVE GLASS BROWN | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 7.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40SNFK-RDRD": {
+"desc": "2 1/2\" RED W/ RED FLAKE RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.88,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"MPRL-BK": {
+"desc": "PEARLS MEDIUM 20MM | 1-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"11017": {
+"desc": "CERAMIC BAMBOO VASE MATTE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"POLY-PU": {
+"desc": "EMBOSSED FOIL POLY BACKING PURPLE 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-ORG": {
+"desc": "3/16\" ORANGE CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"S109W4": {
+"desc": "STEPHANOTIS STEMS WHITE PK 200",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"440RE-DS": {
+"desc": "SET OF 3 RECTANGLE BASKET ROPE TRIM 14\",16\",18\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 7.3,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"MGPF": {
+"desc": "MIRACLE GROW 80Z POWDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"FV10": {
+"desc": "10\" x 4.5\" FLARED VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.03,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"40SHEER-OR": {
+"desc": "2 1/2\" ORANGE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"RROCKL": {
+"desc": "LIGHT RIVER ROCKS | 5-Pounds Per Bag / 6-Bag Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"9SAT-SONIA": {
+"desc": "1&1/2\" SATIN RIBBON SONIA | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-RUST": {
+"desc": "2&3/4\" SATIN RIBBON RUST | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-SIS": {
+"desc": "GOLD WORD - SISTER - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"EMB-AZA": {
+"desc": "EMBOSSED FOIL NO BACKING AZALEA 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R27GR": {
+"desc": "GREEN RECTANGLE DIAS DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 6.24,
+"cbm": 0.021,
+"max_container": 3238,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"BLING-BL": {
+"desc": "BLING WRAP- BLUE | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.28,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"RB64": {
+"desc": "#64 RUBBER BANDS | 1-Pounds per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R46968": {
+"desc": "18\" X 12\" RECTANGLE BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.05,
+"cbm": 0.318,
+"max_container": 213,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RMESH-BR": {
+"desc": "SISAL MESH 20\" BROWN | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"C0804": {
+"desc": "8\" X 4\"H CYLINDER | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 36.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"X1980-SV": {
+"desc": "ASSORTED HOLIDAY PICKS SILVER COLOR | 12-Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"PG-266": {
+"desc": "6X2X6H RECTANGLE PLATE GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.32,
+"cbm": 0.027,
+"max_container": 2518,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40SHEER-FUS": {
+"desc": "2 1/2\" FUSCHIA WIRED SHEER | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"MLAN-24": {
+"desc": "5\"X5\"X21 1/2\"H GLASS CANDLE HOLDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 33.56,
+"cbm": 0.089,
+"max_container": 764,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SAND-DBL": {
+"desc": "DARK BLUE SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"MINI-SUN-X7": {
+"desc": "MINI SUNFLOWER BUNCH | 7-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"SQCIR10-WH": {
+"desc": "10\" x 2.5\" CIRCLE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 24,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SP-SPRGR": {
+"desc": "SPRAY DYE SPRING GREEN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"VPHV-9": {
+"desc": "HURRICANE VASE 9\" X 7\" OPEN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"SATH": {
+"desc": "ALL SATIN HEART | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "A HART CO.",
+"email": "AHART-CO@SBCGLOBAL.NET",
+"country": "United States",
+"city": "CANTON",
+"street": "121 MILL STREET S.E.",
+"port": null,
+"lead": 50
+},
+"CQUARTZ-ASST": {
+"desc": "CRUSHED QUARTZ - FLOURITZ ASST | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9PO-IVO": {
+"desc": "1&1/2\" POLY IVORY RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PICK-ILY": {
+"desc": "I LOVE YOU PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"POLY-RED": {
+"desc": "EMBOSSED FOIL POLY BACKING RED 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SATP": {
+"desc": "ALL SATIN PILLOW | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "A HART CO.",
+"email": "AHART-CO@SBCGLOBAL.NET",
+"country": "United States",
+"city": "CANTON",
+"street": "121 MILL STREET S.E.",
+"port": null,
+"lead": 50
+},
+"RP40-FYO": {
+"desc": "ROYAL 2 3/4\"X100YD FOREVER YOURS POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SP-CHAMGOL": {
+"desc": "SPRAY DYE CHAMPAGNE GOLD | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RMESH-NAT": {
+"desc": "SISAL MESH 20\" NATURAL | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"3293-24-425": {
+"desc": "6 1/2\" JARDIN VINTAGE JAR - VINTAGE PURPLE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 29.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"DS-6": {
+"desc": "12X12X6 TALL GLASS PLATE STAND | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 13.2,
+"cbm": 0.042,
+"max_container": 1619,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BXB10-CLR": {
+"desc": "10\" BUBBLE BALL CLEAR | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 6,
+"cbm": 0.061,
+"max_container": 1114,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"4035-12-09": {
+"desc": "7\" CLASSIC URN - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 16.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9PO-LTBLU": {
+"desc": "1&1/2\" POLY LIGHT BLUE RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"REC4424-MGD": {
+"desc": "4X4X24 MIRROR GOLD RECTANGLE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 31.88,
+"cbm": 0.047,
+"max_container": 1446,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL55-ETCH-GD-PK6": {
+"desc": "5X5X5 CYLINDER ETCH- GOLD | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 6.1,
+"cbm": 0.0401,
+"max_container": 1695,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"TSQ12-WH": {
+"desc": "WHITE MIRROR GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 34.32,
+"cbm": 0.033,
+"max_container": 2060,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"POLY-MOSS": {
+"desc": "EMBOSSED FOIL POLY BACKING MOSS GREEN 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SLV2": {
+"desc": "#2 SWF SLEEVE 7X36 | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 3.27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SAND-YEL": {
+"desc": "YELLOW SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"EMB-LTBLU": {
+"desc": "EMBOSSED FOIL NO BACKING ICE BLUE 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-BURG": {
+"desc": "1&1/2\" SATIN RIBBON BURGUNDY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"W19X18G": {
+"desc": "19 GAUGE X 18 LENTH CUT WIRE | 12-Pounds per BOX / 4-BOX per Case",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 13.6,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"30XMASP": {
+"desc": "30\" XMAS POINSETTA PATTERN PAPER | 1500-Feet per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"40SHEER-GRN": {
+"desc": "2 1/2\" GREEN WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"9DWI-PUR": {
+"desc": "1&1/2\" DELUXE WIRED SHEER PURPLE RIBBON | 50-Yards Per ROLL",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SLH": {
+"desc": "STYRO & LACE HEART 10'' x 11'' | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "A HART CO.",
+"email": "AHART-CO@SBCGLOBAL.NET",
+"country": "United States",
+"city": "CANTON",
+"street": "121 MILL STREET S.E.",
+"port": null,
+"lead": 50
+},
+"X1795": {
+"desc": "15\" WHITE FERN | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 37.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"18W": {
+"desc": "18\" GREEN REINFORCED STYRO WREATH | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"694-02-07": {
+"desc": "24\" PLASTIC BACK OPEN HEART | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20.03,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SP-LARBLU": {
+"desc": "SPRAY DYE LARKSPUR BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"POLY-AZA": {
+"desc": "EMBOSSED FOIL POLY BACKING AZALEA 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PG-CR12": {
+"desc": "12 X 3 X 12 CIRCLE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 24,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RI-GL502181-3Cores": {
+"desc": "GL502181 | 3Cores Per Set",
+"unit": "Set",
+"qty_per_unit": null,
+"first_cost": 0.6,
+"cbm": 0.00015,
+"max_container": 453333,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL804-ETCH-SV": {
+"desc": "8X8X4 CYLINDER ETCH- SILVER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 11.7,
+"cbm": 0.0385,
+"max_container": 1766,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"RCURL-EME": {
+"desc": "3/16\" EMERALD CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SG1-BULK": {
+"desc": "GLUE PELLETS BULK | 25-Pounds per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 84.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FPC CORP., DIANE CALLAHAN EXT 249",
+"email": null,
+"country": "United States",
+"city": "WAUCONDA",
+"street": "355 HOLLOW HILL DRIVE",
+"port": null,
+"lead": 50
+},
+"9002RD-WW": {
+"desc": "SET OF 3 ROUND HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.25,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"624-12-07": {
+"desc": "EASEL CONTAINER CAGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"528WH": {
+"desc": "6\" FOOTED WHITE DESIGN BOWL | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 13.14,
+"cbm": 0.071,
+"max_container": 957,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"X1871-RD": {
+"desc": "16\" RUSCUS SPRAY | 12 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.57,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SM2001": {
+"desc": "NEVERWILT DOUBLE SADDLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 42.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"RIP18-GD": {
+"desc": "18\"X5\" GOLD RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"RP40-BEI": {
+"desc": "ROYAL 2 3/4\"X100YD BEIGE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"TUL54-LTBL": {
+"desc": "54\" TULLE X 40 YD - LIGHT BLUE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 7.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"15CANDIVR": {
+"desc": "15\" CANDLES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"40SAT-PUR": {
+"desc": "2&3/4\" SATIN RIBBON PURPLE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"440RD-DS": {
+"desc": "ROUND BASKET ROPE TRIM 14\",16\",18\" | 3-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 7.3,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"B18-SMILE": {
+"desc": "BALLOON 18\" SMILE | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"6042-N": {
+"desc": "6 (D) X 7 (H) X 3.5 (O) HANGING SILVER BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"PICK-XMAS": {
+"desc": "MERRY CHRISTMAS PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"9SAT-AZA": {
+"desc": "1&1/2\" SATIN RIBBON AZALEA | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"12PST-25": {
+"desc": "12\" PLANT STAKES Green| 25-Piece Per Bundle / 100-Bundle Per Case",
+"unit": "Bundle",
+"qty_per_unit": null,
+"first_cost": 0.23,
+"cbm": 0.0001,
+"max_container": 680000,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"3SAT-FUS": {
+"desc": "3/4\" SATIN RIBBON FUSCHIA | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP9-SV": {
+"desc": "1 3/8\"X100YD SILVER POLY RIBBON | 100-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"TCAND-7": {
+"desc": "7 HR TEALIGHTS IN PLASTIC CUPS | 100-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 12.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"9SHEER-PL": {
+"desc": "1 1/2\" PLUM WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SP20": {
+"desc": "1 1/4\" BANK PIN | 0.05-Pounds per Pack / 10-Pack per SLEEVE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-BLU": {
+"desc": "RIBBON 2&1/2\" PULL BOW BLUE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-LAV": {
+"desc": "RIBBON 2&1/2\" PULL BOW LAVENDER | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WAX-BLK": {
+"desc": "WAX TISSUE BLACK 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 39.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"25MM-SV": {
+"desc": "25MM SILVER GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"31883": {
+"desc": "4\"x9\"H CERAMIC ROUND VASE W/EMBOSSED CRYSTAL DESIGN-GLOSS WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"5BOW-BL": {
+"desc": "RIBBON 1\" PULL BOW BLUE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 8.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SSUNF": {
+"desc": "SINGLE STEM SUNFLOWER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"DTUB2": {
+"desc": "12X5X24 CLTUBE VASE, TUBE SIZE D0.30,H24 | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 25.8,
+"cbm": 0.077,
+"max_container": 883,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"11470": {
+"desc": "66\" X 15\" GOLD VASE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 350,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"SCRIPT-POP": {
+"desc": "GOLD WORD - POP | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SIS": {
+"desc": "HOUSEPLANT INSECT SPRAY 12OZ | 8-Bottle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"DC55-C": {
+"desc": "5X5 DIMPLE CLEAR CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.8,
+"cbm": 0.0302,
+"max_container": 2251,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PICK-HMD": {
+"desc": "HAPPY MOTHERS DAY PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"35MM-AST": {
+"desc": "35MM ASST GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"27-24-406": {
+"desc": "6 1/4\" GINGER VASE - SEASIDE PASTEL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 38.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CS12": {
+"desc": "12\" CLEAR SAUCER | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.8,
+"cbm": 0.00323,
+"max_container": 21052,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"SP-WILROS": {
+"desc": "SPRAY DYE WILD ROSE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"LET-I": {
+"desc": "LETTER - I | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"FTOUCH": {
+"desc": "FINISHING TOUCH | 1-Gallon per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 6.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-PER": {
+"desc": "1&1/2\" SATIN RIBBON PERIWINKLE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-EMER": {
+"desc": "1&1/2\" POLY EMERALD RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ESTL-6": {
+"desc": "GLASS VASE, ARTS W/ LED LIGHTS | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 38.4,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SP-BLUVIO": {
+"desc": "SPRAY DYE BLUE VIOLET | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"9SHEER-LBL": {
+"desc": "1 1/2\" LIGHT BLUE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SQ822": {
+"desc": "SQUARE BUD VASE 8H X 2.5 X 2.5 | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 22.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"X1075-WH": {
+"desc": "6\" CYCUS LEAVES | 720-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 720,
+"first_cost": 56.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"AMZCYL512-PF": {
+"desc": "5X12 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 7.5,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"9DWI-ORNG": {
+"desc": "1&1/2\" DELUXE WIRED SHEER ORANGE RIBBON | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5SAT-BR": {
+"desc": "1\" SATIN RIBBON CHOCO | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CL-6SQ": {
+"desc": "30\" GLOBE CANDLEABRA - GOLD | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 22.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"V430": {
+"desc": "12 X 4 CONE VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"R24X2": {
+"desc": "PLASTIC ROSE BOX | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 16,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"6006-20-58": {
+"desc": "DRI BRICK SAHARA FOAM | 20-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 20,
+"first_cost": 15.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"21107": {
+"desc": "GOLD ALUM CANDLEABRA 32 IN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 67.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BLING-SV": {
+"desc": "BLING WRAP - SILVER | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.76,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9SAT-PUR": {
+"desc": "1&1/2\" SATIN RIBBON PURPLE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EMB-NILE": {
+"desc": "EMBOSSED FOIL NO BACKING NILE 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CSHEET": {
+"desc": "SAY IT W/FLOWER CUT SHEETS | 25-Pounds per Bundle",
+"unit": "Bundle",
+"qty_per_unit": null,
+"first_cost": 22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"PINE-PICK": {
+"desc": "GREEN PINE PICK W/ CONES | 24-Piece per Case",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 21.84,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"3MET-GD": {
+"desc": "5/8\" GOLD METALLIC | 25-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.26,
+"cbm": 0.00023,
+"max_container": 295652,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"PICK-HVD": {
+"desc": "HAPPY VALENTINES DAY PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.67,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"M1071": {
+"desc": "DAD OASIS FORM | 1-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 25.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5SAT-HUN": {
+"desc": "1\" SATIN RIBBON HUNTER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EB0501": {
+"desc": "56 WHITE ENV N/E | 500-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 500,
+"first_cost": 10,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MTLG4166": {
+"desc": "GOLD,16\"X4\"OPEN,6\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"RL": {
+"desc": "RUBBER LEGS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DON'S WIRE FORMING CO.",
+"email": null,
+"country": "United States",
+"city": "JACKSON",
+"street": "960 ANDERSON RD",
+"port": null,
+"lead": 50
+},
+"CYL618": {
+"desc": "6\" X 18\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.8,
+"cbm": 0.081,
+"max_container": 839,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"BLING-PU": {
+"desc": "BLING WRAP- PURPLE | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.17,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"5BOW-ROYAL": {
+"desc": "RIBBON 1\" PULL BOW ROYAL | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GV18": {
+"desc": "20\" EVENT GATHER VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 23.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SOLBIKA SP ZOO",
+"email": "SOLBIKA@SOLBIKA.COM.PL",
+"country": "Poland",
+"city": "MAKOW UL LIPOWA",
+"street": "MAKOW, UL LIPOWA 84",
+"port": null,
+"lead": 150
+},
+"MFROCK-GR": {
+"desc": "MEDIUM FLAT ROCK | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"R1118-SV": {
+"desc": "HANGING VOTIVE GLASS SILVER - PACKED 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"686-02-07": {
+"desc": "24\" PLASTIC BACK CROSS - GREEN | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 13.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"35MM-BURG": {
+"desc": "35MM BURGUNDY GLASS BALLS | 72 PIECES PER BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 12.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"N1694": {
+"desc": "LILLY HEAD | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 11.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SP-FUCBRI": {
+"desc": "SPRAY DYE FUCHSIA BRIGHT | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"ACR3-BL": {
+"desc": "ACRYLIC COLOR ROCKS BLUE | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.09,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9SHEER-PU": {
+"desc": "1 1/2\" PURPLE WIRED SHEER | 50-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"RPETAL-GD": {
+"desc": "ROSE PETALS GOLD | 1000-Piece per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 1000,
+"first_cost": 1.76,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"4023-WH": {
+"desc": "60'' TULLE X 40 YD - WHITE [Roll] | 40-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"RP40-BAS": {
+"desc": "ROYAL 2 3/4\"X100YD BASIL POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"AMZCYL412-PF": {
+"desc": "4X4X12 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 6.96,
+"cbm": 0.048,
+"max_container": 1416,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SQ5514": {
+"desc": "5X5X14 GLASS SQUARE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15.3,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"ADH.5WH": {
+"desc": "1/2\" WHITE ADHESIVE TAPE | 60-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"DC66-PK": {
+"desc": "6X6 DIMPLE PLAINTED PINK CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 21,
+"cbm": 0.0285,
+"max_container": 2385,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"11-01000": {
+"desc": "FLORACAGE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18.67,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-YELL": {
+"desc": "3/4\" SATIN RIBBON YELLOW | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ORCHID-FUS": {
+"desc": "ORCHID FUCHSIA- 36\" LENGTH X 8 FLOWER | 24-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 52.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"ORCHID-LTF": {
+"desc": "ORCHID LIGHT FUCHSIA- 36\" LENGTH X 8 FLOWER | 24-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 52.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"40SAT-PERI": {
+"desc": "2&3/4\" SATIN RIBBON PERIWINKLE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-IV": {
+"desc": "RIBBON 2&1/2\" PULL BOW IVORY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"POMPAS-PK36": {
+"desc": "POMPAS GRASS 5-6 feet tall each stem | 36-Stems per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"X2775-AS": {
+"desc": "1\" GIFT BOX ASSORTED | 12-Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"4045-12-09": {
+"desc": "8\" JORDAN VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 18.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"ORCHID-WHT-24": {
+"desc": "ORCHID WHITE- 36\" LENGTH X 8 FLOWER | 24-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 34.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BH4": {
+"desc": "BOUQUET HOLDER STYRO | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"OPF": {
+"desc": "ORCHID PLANT FOOD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 44.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"RB105": {
+"desc": "5/8\" RUBBER BANDS | 1-Pounds per BAG / 10-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JIANGMEN NEWERA PACKING MATERIAL CO",
+"email": null,
+"country": "China",
+"city": "GUANGDONG 330300",
+"street": "LTD NO 1 JIAOXING WESTROADJIAO",
+"port": null,
+"lead": 0
+},
+"34-12-406": {
+"desc": "6.5\" JARDINIERE SEASIDE PASTEL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SHEER-PL": {
+"desc": "2 1/2\" PLUM WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"EMB-BEST": {
+"desc": "EMBOSSED FOIL NO BACKING BEST TIME 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CST-2IN-GD": {
+"desc": "2\" SET OF 2 GOLD CANDLE HOLDERS | 12 SETS PER CASE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.68,
+"cbm": 0.0348,
+"max_container": 1954,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"R44-ETCH-GD": {
+"desc": "4X4X4 SQUARE ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.84,
+"cbm": 0.0256,
+"max_container": 2656,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"BLAN-18": {
+"desc": "BLACK 5\"X5\"X17 1/2\" H GLASS CANDLE HOLDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28.4,
+"cbm": 0.049,
+"max_container": 1387,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SG1": {
+"desc": "SG-1 GLUE PELLETS | 1-Pounds per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FPC CORP., DIANE CALLAHAN EXT 249",
+"email": null,
+"country": "United States",
+"city": "WAUCONDA",
+"street": "355 HOLLOW HILL DRIVE",
+"port": null,
+"lead": 50
+},
+"RMESH-HTP": {
+"desc": "SISAL MESH 20\" HOT PINK | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"9SAT-RUST": {
+"desc": "1&1/2\" SATIN RIBBON RUST | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL810": {
+"desc": "8 X 10 CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15,
+"cbm": 0.0795,
+"max_container": 855,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CN12SV": {
+"desc": "12\" X 5\" SILVER PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 43.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"C0404": {
+"desc": "4X4 CYLINDERS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 51.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"TV9": {
+"desc": "9\"HT X 5\" OPEN VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"OVSCOOP-WH": {
+"desc": "8 3/4 X 6 X 5 2/3\" CERAMIC OVAL POT | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 11.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CRY10": {
+"desc": "10\" CRYSTAL GARLAND | 12-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"40PO-BK": {
+"desc": "2&3/4\" POLY BLACK RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GEM3-BK": {
+"desc": "GEMS BLACK | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.3,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"ROCK-FLT-LRG-BK": {
+"desc": "LARGE FLAT BLACK ROCKS 75-125MM | 5-Pounds per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"5BOW-PU": {
+"desc": "RIBBON 1\" PULL BOW PURPLE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SK1": {
+"desc": "UTILITY BOWL W/ FROG INSERT | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 10.44,
+"cbm": 0.039,
+"max_container": 1743,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"15CANDYEL": {
+"desc": "15\" CANDLES YELLOW | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.02,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"FL089": {
+"desc": null,
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X270": {
+"desc": "25MM CHERRY | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 10.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"WOPAD": {
+"desc": "WEDDING ORDER PAD- 50 SHEETS PER PAD [Pack] | 50-SHEETS per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"BLOOM": {
+"desc": "CROWNING GLORY HYDRATION SOLUTION | 1-Gallon per Bottle / 6-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 6.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-GRAND": {
+"desc": "GOLD WORD - GRAND | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-HOLY": {
+"desc": "GOLD WORD - HOLY | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"1WSTY": {
+"desc": "1X12X36 WHITE STYROFOAM BOARD | 20-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 20,
+"first_cost": 59.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"PF-12X24": {
+"desc": "12X12X24 SQUARE MIRROR PLATFORM | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 37.5,
+"cbm": 0.097,
+"max_container": 701,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BCARN-RD": {
+"desc": "BUNCH CARNATIONS RED | 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.74,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"GEM3-LBL": {
+"desc": "GEMS LIGHT BLUE | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.63,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9BOW-PK": {
+"desc": "RIBBON 1&1/2\" PULL BOW PINK | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BOW-WH": {
+"desc": "RIBBON 1&1/2\" PULL BOW WHITE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"REC4418-BK": {
+"desc": "RECTANGLE BLACK VASE 4X4X18 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36.6,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"150POLY": {
+"desc": "150'X36\" WIDE POLY AISLE RUNNER | 150-Feet per ROLL / 9-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 15.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"82-03055": {
+"desc": "CRYSTAL CLEAR 300, 5LB TUB | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 58.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"POLY-PK": {
+"desc": "EMBOSSED FOIL POLY BACKING PINK 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC4-GD": {
+"desc": "4\" SPEED COVER METTALIC GOLD | 10-Piece per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PG-2710-CL": {
+"desc": "RECTANGLE PLATE GLASS 7x2x10\" CLEAR | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 26.4,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"ROCK-SML-MB": {
+"desc": "SMALL MARBLE ROCKS 8-15MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.06,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"EMB-MOSS": {
+"desc": "EMBOSSED FOIL NO BACKING MOSS GREEN 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-EMER": {
+"desc": "1&1/2\" SATIN RIBBON EMERALD | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-PUR": {
+"desc": "1&1/2\" POLY PURPLE RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CER-CYL55-BK": {
+"desc": "CYL55 BLACK CERAMIC CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CSCONE-28": {
+"desc": "24\" X 3\" CONE CANDLE HOLDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"98-18-406": {
+"desc": "9\" BUD VASE FIESTA COLOR ASSORT | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 28.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LBH": {
+"desc": "LARGE BIBLE HEADS | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"CARD-HB": {
+"desc": "HAPPY BIRTHDAY [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SLV3": {
+"desc": "#3 SWF SLEEVE 8X36 | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 3.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"W135-RD": {
+"desc": "6\" RED HANDLED BASKET W/ LINER RED - PACKED 36 | 1-Piece per Pack / 36-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.7,
+"cbm": 0.00233,
+"max_container": 29184,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"40SAT-RBL": {
+"desc": "2&3/4\" SATIN RIBBON ROYAL BLUE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-BK": {
+"desc": "3/16\" BLACK CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"40BOW-YEL": {
+"desc": "RIBBON 2&1/2\" PULL BOW YELLOW | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-TURQ": {
+"desc": "2&3/4\" SATIN RIBBON TURQUIOSE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"500QT": {
+"desc": "CRYSTAL CLEAR 300 | 10-Pounds per pail",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 22.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-OSIPEA": {
+"desc": "SPRAY DYE OSIANA PEACH | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"DC55-GD": {
+"desc": "5X5 DIMPLE GOLD-SILVER INSIDE CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.56,
+"cbm": 0.0302,
+"max_container": 2251,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SP-BLUMAR": {
+"desc": "SPRAY DYE BLUE MARLIN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"1025": {
+"desc": "IGLU GRANDE HOLDER 3 1/4\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12.63,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SBALLF-PU": {
+"desc": "BALL FLOWER PURPLE | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GEM1-GR": {
+"desc": "GEMS GREEN | 1-Pounds Per Bag / 12-Bag Per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.38,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9SAT-HPK": {
+"desc": "1&1/2\" SATIN RIBBON HOT PINK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-BLACHE": {
+"desc": "SPRAY DYE BLACK CHERRY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"7035-06-01": {
+"desc": "HYDRAQUIK - NO COLOR | 1-Gallon per Bottle / 6-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": 0,
+"first_cost": 10.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"ACR1-LBL": {
+"desc": "ACRYLIC COLOR ROCKS LIGHT BLUE | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.09,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-DAD": {
+"desc": "GOLD WORD - DAD | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PICK-HAN": {
+"desc": "HAPPY ANNIVERSARY PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"SLV1": {
+"desc": "#1 SWF SLEEVE 6X30 | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9DWI-RED": {
+"desc": "1&1/2\" DELUXE WIRED SHEER RED RIBBON | 50-Yards Per ROLL",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-TURQ": {
+"desc": "1&1/2\" SATIN RIBBON TURQUIOSE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PUN-RD": {
+"desc": "2 1/2\" SIEVE RIBBON PUNCHINELLOx 44 YD",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LEO UHLFELDER INC.",
+"email": null,
+"country": "United States",
+"city": "MOUNT VERNON",
+"street": "420 S. FULTON AVE",
+"port": null,
+"lead": 50
+},
+"25MM-PUR": {
+"desc": "25MM PURPLE GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"LET-X": {
+"desc": "LETTER - X | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"3088": {
+"desc": "CYLINDER 8HX8 CHAM | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"SC10-MOSS": {
+"desc": "10\" SPEED COVER METTALIC MOSS | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ZCORD": {
+"desc": "1 PLY POLY TWINE | 1-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 29.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"RCURL-RBL": {
+"desc": "3/16\" ROYAL BLUE CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"3174-12-09": {
+"desc": "8 1/2\" CHIMNEY VASE - CRYSTAL - PACKED 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 21.97,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0405": {
+"desc": "4\" X 5\" HT CYLINDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 52.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PC306S": {
+"desc": "3\"X6\" SILVER METALLIC PILLAR CANDLE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 87.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"100SAT-YELL": {
+"desc": "4\" SATIN RIBBON YELLOW | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 11.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9DWI-LAV": {
+"desc": "1&1/2\" DELUXE WIRED SHEER LAVEND RIBBON | 50-Yards Per ROLL",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CB": {
+"desc": "CROSS BARS | 5-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 3.15,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"PG3812-MGD": {
+"desc": "8LX3WX12H TALL RECTANGLE GLASS VASE GOLD | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 58.24,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RPETAL-IV": {
+"desc": "ROSE PETALS IVORY | 1000-Piece per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 1000,
+"first_cost": 1.09,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CARD-THG": {
+"desc": "THANKSGIVING [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BOW-ROYAL": {
+"desc": "RIBBON 1&1/2\" PULL BOW ROYAL BLUE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-ORA": {
+"desc": "1&1/2\" POLY ORANGE RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GLITC-GD": {
+"desc": "GOLD GLITTER - COARSE | 16-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 8.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"ABSP-IBL": {
+"desc": "ABSORBTION DYE ICE BLUE | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RLAN-28": {
+"desc": "RED 5\"X5\"X27 1/3\" H GLASS CANDLE HOLDER | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 25.16,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9BOW-AZA": {
+"desc": "RIBBON 1&1/2\" PULL BOW AZALEA | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 13.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"POLY-FUC": {
+"desc": "EMBOSSED FOIL POLY BACKING FUCHSIA 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LENV-80": {
+"desc": "#80 Small Envelope Plain | 500-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 500,
+"first_cost": 7.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4005-SL": {
+"desc": "CYLINDER 6HX6 SLIVER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"3SAT-TURQ": {
+"desc": "3/4\" SATIN RIBBON TURQUIOSE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC8-ROSEP": {
+"desc": "8\" SPEED COVER ROSE PEARL | 25-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 11.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"10943": {
+"desc": "MATTE BLACK CYLINDER 5\"x5\"x5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"30MM-SV": {
+"desc": "30MM SILVER GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"BUN-ASPGRS": {
+"desc": "Dried Green Spogas | 12 bundles per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"PICK-BOY-72": {
+"desc": "IT'S A BOY PICKS | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 10.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"RSPRAY": {
+"desc": "RHINESTONE ON SPRAY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"18CANDRED": {
+"desc": "18\" CANDLES RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"CAND12-FALL-12": {
+"desc": "12\" FALL MIX TAPER CANDLES | 12-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.68,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"PY10-TAN": {
+"desc": "10\" TAN PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"R14H-WH": {
+"desc": "14\" HANDLED BASKET, WH | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18,
+"cbm": 0.01125,
+"max_container": 6044,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"GEM1-LBL": {
+"desc": "GEMS LIGHT BLUE | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"AMZPG266": {
+"desc": "6X2X6H RECTANGLE PLATE GLASS VASE PACKED 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"100SAT-PK": {
+"desc": "4\" SATIN RIBBON PINK | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 10.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-INLAW": {
+"desc": "GOLD WORD - INLAW | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"FERNBALL10-PUR": {
+"desc": "10\" FERNBALL PURPLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"40BOW-ORG": {
+"desc": "RIBBON 2&1/2\" PULL BOW ORANGE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-PEA": {
+"desc": "3/4\" SATIN RIBBON PEACH | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP9-ORG": {
+"desc": "1 3/8\"X100YD ORANGE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"PNL6": {
+"desc": "6\" TULLE COLLAR | 6-Piece per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 6,
+"first_cost": 4.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SHEER-YEL": {
+"desc": "2 1/2\" YELLOW WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"VWB-12": {
+"desc": "CLEAR GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"WHEAT-BUR": {
+"desc": "WHEAT BURGANDY | 0.5-Pounds per BUNDLE",
+"unit": "Bundle",
+"qty_per_unit": null,
+"first_cost": 0.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"18CANDIVR": {
+"desc": "18\" CANDLES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"SPF": {
+"desc": "SHULTZ PLANT FOOD 4 OZ | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"CARD-ANN": {
+"desc": "ANNIVERSARY | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SB8": {
+"desc": "8\" STYRO BALLS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"WOOD555-WH": {
+"desc": "5X5X5 WHITE WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"24XMASP": {
+"desc": "24\" XMAS POINSETTA PATTERN PAPER | 1500-Feet per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"15CANDOR": {
+"desc": "15\" CANDLES ORANGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"12CANDWH": {
+"desc": "12\" CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"900-24-1090": {
+"desc": "8.5\" BUD VASE- ORCHARD HARVEST | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 30.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4023-IV": {
+"desc": "60'' TULLE- IVORY | 40-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"SCRIPT-SON": {
+"desc": "GOLD WORD - SON - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"9BOW-YELL": {
+"desc": "RIBBON 1&1/2\" PULL BOW YELLOW | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EMPTYBOXES": {
+"desc": "Empty Boxes",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FREEDMAN PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "BROOKLYN",
+"street": "454 LIVONIA AVENUE",
+"port": null,
+"lead": 50
+},
+"PY36-WH": {
+"desc": "36\" LARGE RORY BEAR - WHITE COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"SCRIPT-DEEPEST": {
+"desc": "GOLD WORD - DEEPEST | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"9SAT-BET": {
+"desc": "1&1/2\" SATIN RIBBON BETTER TIMES | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ASST-FL-PU": {
+"desc": "BUNCH ASSORTED FLOWER PURPLE| 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"40SAT-WINE": {
+"desc": "2&3/4\" SATIN RIBBON WINE | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PICK-BG-24": {
+"desc": "BOY/GIRL PICKS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"125POLY": {
+"desc": "125'X36\" WIDE POLY AISLE RUNNER | 125-Feet per ROLL / 9-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 13.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30MM-BURG": {
+"desc": "30MM BURGUNDY GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"30MM-GR": {
+"desc": "30MM GREEN GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CW-305": {
+"desc": "ONE DOZEN ROSE BOX | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 59.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CURTIS WAGNER PLASTICS CORP",
+"email": null,
+"country": "United States",
+"city": "HOUSTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP9-BEI": {
+"desc": "1 3/8\"X100YD BEIGE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SC6-GD": {
+"desc": "6\" SPEED COVER METTALIC GOLD | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-RED": {
+"desc": "3/4\" SATIN RIBBON RED | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SPRL-IV": {
+"desc": "PEARLS SMALL 12MM | 1-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"8CANDWH": {
+"desc": "8\" CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"PY10-TEAMO-RD": {
+"desc": "10\" RED PLUSH TEDDY BEAR - TE AMO [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"9DWI-HOTP": {
+"desc": "1&1/2\" DELUXE WIRED SHEER HOT PINK RIBBON X 25 YD",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-PK": {
+"desc": "3/16\" PINK CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"SC8-RED": {
+"desc": "8\" SPEED COVER METTALIC RED | 25-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 11.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"X1454-RD": {
+"desc": "14\" RED GLITTER LEATHER FERN | 12 piece Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"3SAT-BLA": {
+"desc": "3/4\" SATIN RIBBON BLACK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-WDS": {
+"desc": "WITH DEEPEST SYMPATHY | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"87272": {
+"desc": "MIRROR PEDESTAL STAND 15\"W X 22\"H [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 57,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"WAX-CHOC": {
+"desc": "WAX TISSUE CHOCOLATE24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 28.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PLS20": {
+"desc": "LARGE LEAFSHINE POKON | 16.8-Oz. per Can / 12-Cans per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHRYSAL USA INC.",
+"email": "INFO@CHRYSALUSA.COM",
+"country": "United States",
+"city": "MIAMI",
+"street": "3063 NW 107TH AVENUE",
+"port": null,
+"lead": 50
+},
+"9PO-RED": {
+"desc": "1&1/2\" POLY RED RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3750": {
+"desc": "7\"H MADONNA PLANTER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"9SHEER-ORG": {
+"desc": "1 1/2\" ORANGE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40PUN-SV": {
+"desc": "2 1/2\" SIEVE RIBBON PUNCHINELLOx 44 YD",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LEO UHLFELDER INC.",
+"email": null,
+"country": "United States",
+"city": "MOUNT VERNON",
+"street": "420 S. FULTON AVE",
+"port": null,
+"lead": 50
+},
+"W1849": {
+"desc": "18\" SQUARE FRAME | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 16.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-WIFE": {
+"desc": "GOLD WORD - WIFE - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"5059": {
+"desc": "FLOWER STEM CUTTER GUILTIENE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"RCURL-PEA": {
+"desc": "3/16\" PEACH CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9SAT-FY": {
+"desc": "1&1/2\" SATIN RIBBON FORVER YOURS | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"W18X18G": {
+"desc": "18 GAUGE X 18 LENTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10.36,
+"cbm": 0.0027,
+"max_container": 25185,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"PICK-SEA": {
+"desc": "SEASONS GREETING PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"30MM-RD": {
+"desc": "30MM RED GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"BARK": {
+"desc": "CUT BARK | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"CN20SV": {
+"desc": "20\" X 5\" SILVER PILSNER VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"40PUN-GD": {
+"desc": "2 1/2\" SIEVE RIBBON PUNCHINELLOx 44 YD",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5SAT-BDROS": {
+"desc": "1\" SATIN RIBBON BIRD ROSE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-LAV": {
+"desc": "1&1/2\" POLY LAVENDER RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30TUL": {
+"desc": "30\" TULIP PAPER X 1500FT",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"FOAMBALL-6": {
+"desc": "6\" FLORAL FOAM SPHERES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16,
+"cbm": 0.0496,
+"max_container": 1370,
+"vendor": "TECNOFEN",
+"email": "VANESSA.SANTACRUZ@TECNOFEN.COM.MX",
+"country": "Mexico",
+"city": "SAN NATEO ATENCO",
+"street": "INDEPENDENCIA 1458, COL SAN ANTONIO",
+"port": null,
+"lead": 50
+},
+"X2961-NAT": {
+"desc": "2.5\"CONE PICK NATURAL PK 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"MM74-FALLMX": {
+"desc": "FALL COLORED VASE - 4.5 X 7.9\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.72,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"16SAT-YEL": {
+"desc": "2&1/2\" SATIN RIBBON YELLOW | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 11.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MGS": {
+"desc": "MIRACLE GROW 1.1 0Z SPIKES | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 31.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"4060-12-09": {
+"desc": "8 3/4\" BELLA VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 23.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"X1573-AST": {
+"desc": "2\" GIFT BOX ASSORTED- PK 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"VP106": {
+"desc": "10 X 6\" VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 5.52,
+"cbm": 0.045,
+"max_container": 1511,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"30MM-GD": {
+"desc": "30MM GOLD GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"9DWI-YELL": {
+"desc": "1&1/2\" DELUXE WIRED SHEER YELLOW RIBBON X 50 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-HEB3": {
+"desc": "HEBREW3 - MAZEL TOV [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"F2728GD": {
+"desc": "14'H,21' X 11' D GLASS VASE GOLD | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"RTING-PU": {
+"desc": "CURLY TING PURPLE | 75-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 75,
+"first_cost": 2.1,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"V1164": {
+"desc": "BULLET RECTANGLE 7.5H X 3.75 X 2.5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"RFLAG9": {
+"desc": "1 3/8\" FLAG PATTERN POLY RIBBON | 50-Yards per ROLL / 12-ROLL per Case / 36-ROLL per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"3SAT-PK": {
+"desc": "3/4\" SATIN RIBBON PINK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RFLAG40": {
+"desc": "2 3/4\" FLAG PATTERN POLY RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"LET-V": {
+"desc": "LETTER - V | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"POMPAS-STEM": {
+"desc": "SINGLE STEM POMPAS GRASS | 3-Stems per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 2.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"9PO-NVBLU": {
+"desc": "1&1/2\" POLY NAVY BLUE RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BOW-LAV": {
+"desc": "RIBBON 1&1/2\" PULL BOW LAVENDER | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"11-41770": {
+"desc": "GRANDE WHITE SLANT WEDDING BOUQ HOLDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 14.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PH3": {
+"desc": "GLASS PILLAR HOLDER 3\" DIAMETER PACKED 72 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 30.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"B18-THINK": {
+"desc": "BALLOON 18\" THINKING OF YOU | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"ACR3-LBL": {
+"desc": "ACRYLIC COLOR ROCKS LIGHT BLUE | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.85,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"4111-06-09": {
+"desc": "8\" GATHERING VASE - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 30.09,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SM2025": {
+"desc": "NEVERWILT SATIN HEART W/CUP | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"R67B-ETCH-SV": {
+"desc": "6X6X5 ROUND BUBBLE BALL SHAPE ETCH- SILVER - PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"X3773-GD": {
+"desc": "20\" GOLD GLITTER LEATHER FERN | 12- Piece per pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"AMZSMGSTRAIGHT": {
+"desc": "5\" X 2\" X 10\" MIRROR GLASS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.1,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"4024-06-09": {
+"desc": "10\" TWO DOZEN ROSE VASE",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 29.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GEM3-BL": {
+"desc": "GEMS BLUE | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.68,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9BOW-IV": {
+"desc": "RIBBON 1&1/2\" PULL BOW IVORY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 13.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9DWI-BLU": {
+"desc": "1&1/2\" DELUXE WIRED SHEER BLUE RIBBON X 50 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9DWI-GLD": {
+"desc": "1&1/2\" DELUXE WIRED SHEER GOLD RIBBON X 50 YARDS [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40MM-SV": {
+"desc": "40MM SILVER GLASS BALLS | 48-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X2960-NATW": {
+"desc": "2.5\"CONE PICK W/WHITE TIP - NAT/WHIT | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"7-058NC-WH": {
+"desc": "OVAL WHITE PLASTIC CONTAINER 13X6.5X3 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HILLS IMPORTS INC",
+"email": null,
+"country": "United States",
+"city": "QUAKERTOWN",
+"street": "675 CALIFORNIA ROAD",
+"port": null,
+"lead": 50
+},
+"WD6": {
+"desc": "6\" PLASTIC DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PY447B": {
+"desc": "12\" BLUE TEDDY BEAR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"SCRIPT-GODMO": {
+"desc": "GOLD WORD - GODMOTHER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SM2000": {
+"desc": "NEVERWILT SADDLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 45.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"50MM-RD": {
+"desc": "50MM RED GLASS BALLS | 24-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"35MM-ROY": {
+"desc": "35MM ROYAL GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"6014": {
+"desc": "16\" X 7\" PEDESTAL VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"CMC-4128": {
+"desc": "CMC OVAL 5HX7X2.5 BRWN | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"HBHY-PU": {
+"desc": "HANGING BUBBLE BALL WHITE HYDRANGEA | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL516": {
+"desc": "5\" X 16\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SP-TIGLIL": {
+"desc": "SPRAY DYE TIGER LILY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SC6-RED": {
+"desc": "6\" SPEED COVER METTALIC RED | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PICK-CON": {
+"desc": "CONGRATULATIONS PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"3SAT-ORA": {
+"desc": "3/4\" SATIN RIBBON ORANGE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-VIO": {
+"desc": "SPRAY DYE VIOLET | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"ASST-FL-PK": {
+"desc": "BUNCH ASSORTED FLOWER PURPLE| 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"CS10": {
+"desc": "10\" CLEAR SAUCER | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 1.3,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RCURL-YEL": {
+"desc": "3/16\" YELLOW CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"LET-S": {
+"desc": "LETTER - S | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"40PB-XMAS": {
+"desc": "2 1/2\" PRINTED POLY XMAS PATTERN | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH-WH": {
+"desc": "MESH - WHITE | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"40PO-PIN": {
+"desc": "2&3/4\" POLY PINK RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ACR1-RD": {
+"desc": "ACRYLIC COLOR ROCKS RED | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.05,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"C225": {
+"desc": "9\" MIDI VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 28.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RTUL6-GR": {
+"desc": "TULLE 6\" GREEN | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"1049": {
+"desc": "14 1/2\" OASIS RING | 1-Piece per Pack / 6-Packs per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"B0255-50GD": {
+"desc": "20H X 19 X5 GOLD RING EVENT PC",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 32.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ABC GLASS INC",
+"email": "mark168178@gmail.com",
+"country": "United States",
+"city": "NORCROSS",
+"street": "6900 PEACHTREE INDUSTRIAL BLVD",
+"port": null,
+"lead": 50
+},
+"RP9-BAS": {
+"desc": "1 3/8\"X100YD BASIL POLY RIBBON | 100-Yards Per Roll / 12-Roll Per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RP9-GD": {
+"desc": "1 3/8\"X100YD GOLD POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"73-48-07": {
+"desc": "SINGLE DESIGN BOWL GREEN | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 12.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RPETAL-BL": {
+"desc": "ROSE PETALS BLUE | 1000-Piece per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 1000,
+"first_cost": 1.12,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"RTUL6-IV": {
+"desc": "TULLE 6\" IVORY | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"SP-TANG": {
+"desc": "SPRAY DYE TANGERINE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"9SAT-YELL": {
+"desc": "1&1/2\" SATIN RIBBON YELLOW | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5SAT-PEA": {
+"desc": "1\" SATIN RIBBON PEACH | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-PEA": {
+"desc": "1&1/2\" SATIN RIBBON PEACH | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EMB-EME": {
+"desc": "EMBOSSED FOIL NO BACKING EMERALD 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PF-12X6": {
+"desc": "12X12X6 MIRROR PLATFORM | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 41.92,
+"cbm": 0.071,
+"max_container": 957,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"3SAT-GD": {
+"desc": "3/4\" SATIN RIBBON GOLD | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LOBCONE-RW": {
+"desc": "LOBOLLY PINE CONE 3-4\" RED/WHITE | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 31.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"RAF-GR": {
+"desc": "RAFFIA GREEN | 16-Oz. per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.57,
+"cbm": 0.0091,
+"max_container": 7472,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"X15-SILV": {
+"desc": "SILVER BERRY SPRAY | 2-Dozen per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CARD-ILY": {
+"desc": "LOVE YOU [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"POLY-WH": {
+"desc": "EMBOSSED FOIL POLY BACKING WHITE 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL66-OCT-GRY": {
+"desc": "CERAMIC OCTOGON CYLINDER GREY 6X6 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"PICK-BG": {
+"desc": "BOY/GIRL PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"5BOW-EGG": {
+"desc": "RIBBON 1\" PULL BOW EGGSHELL | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 8.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"80-12-04": {
+"desc": "DESIGNER URN - BLACK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ORCHID-PUR": {
+"desc": "ORCHID DARK PURPLE-36\" LENGTH X 8 | 24-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 37.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"9PUN-RD": {
+"desc": "1 1/2\" SIEVE RIBBON PUNCHINELLO | 44-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LEO UHLFELDER INC.",
+"email": null,
+"country": "United States",
+"city": "MOUNT VERNON",
+"street": "420 S. FULTON AVE",
+"port": null,
+"lead": 50
+},
+"PF-10X24": {
+"desc": "10X10X24 SQUARE MIRROR PLATFORM - PK 1 [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 37.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"5SAT-TURQ": {
+"desc": "1\" SATIN RIBBON TURQUIOSE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"W21X12G": {
+"desc": "21 GAUGE X 12 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10.76,
+"cbm": 0.0022,
+"max_container": 30909,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"CARE-ADDW": {
+"desc": "ADD WATER CARE TAG | 100-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-GD": {
+"desc": "2&3/4\" SATIN RIBBON GOLD | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FROST-24": {
+"desc": "FROSTED GLASS VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 33.8,
+"cbm": 0.103,
+"max_container": 660,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RTUL6-PU": {
+"desc": "TULLE 6\" PURPLE | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"24VAL": {
+"desc": "24\" VALENTINES HEART PAPER | 1500-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"WPG-16": {
+"desc": "WHITE EDGE GLASS VASE 16X2X4\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 25.62,
+"cbm": 0.042,
+"max_container": 1619,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40DWI-YEL": {
+"desc": "2&1/2\" DELUXE WIRED SHEER YELLOW RIBBON X 50 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"230-200-09": {
+"desc": "10\" DEEP CLEAR LINERS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R210WH": {
+"desc": "WHITE RECTANGLE DIAS DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 9.96,
+"cbm": 0.0188,
+"max_container": 3617,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RNCONE-NAT-PICK": {
+"desc": "AUSTRICA PICKED NATURAL PINE CONE 2-3\" | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 18.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"MESH-AGRN": {
+"desc": "MESH- APPLE GREEN | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25MM-RBL": {
+"desc": "25MM ROYAL BLUE GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"81-06-04": {
+"desc": "9 1/2\" DESIGNER URN - BLACK | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"20-12-404": {
+"desc": "SWEETHEART VASE - LAVENDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"12CANDOR": {
+"desc": "12\" CANDLES ORANGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"BX-ORG": {
+"desc": "LATEX BALLOON ORANGE | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"C0828": {
+"desc": "8 X 28 CYLINDERS | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 90,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"DBUN-XMAS": {
+"desc": "Dried Xmas Bundle | 12 bundles per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"SP-TURQ": {
+"desc": "SPRAY DYE TURQUOISE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"EMB-BIT": {
+"desc": "EMBOSSED FOIL NO BACKING BITTERSWEET 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-THINK": {
+"desc": "THINKING OF YOU [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-SUCCESS": {
+"desc": "GOLD WORD - SUCESS - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"BUNROSE-YEL": {
+"desc": "BUNCH ROSE BOUQUET YELLOW | 18-Heads per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"RHOL9": {
+"desc": "1 3/8\"X50YD HOLLY PATTERN POLY RIBBON [Case] | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"40SAT-EME": {
+"desc": "2&3/4\" SATIN RIBBON EMERALD | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SBH": {
+"desc": "SMALL BIBLE HEADS | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 7.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"74-0034": {
+"desc": "18\" CHANDELIER CRYSTAL STANDS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 177,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"CARE-POIN": {
+"desc": "POINSETTIA CARE TAG | 100-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FCAND3-IV-PK36": {
+"desc": "FCAND3-IV | 36-Piece Per Pack",
+"unit": "Units",
+"qty_per_unit": 36,
+"first_cost": 17.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"RVB1": {
+"desc": "CHRYSAL PROFESSIONAL HYDRATING SOLUTION | 1-Liter per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 14.67,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHRYSAL USA INC.",
+"email": "INFO@CHRYSALUSA.COM",
+"country": "United States",
+"city": "MIAMI",
+"street": "3063 NW 107TH AVENUE",
+"port": null,
+"lead": 50
+},
+"PY10-BR-GRAD": {
+"desc": "10\" BROWN GRADUATION BEAR W/ PHOTO FRAME [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SC6-MOSS": {
+"desc": "6\" SPEED COVER METTALIC MOSS | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC4-RED": {
+"desc": "4\" SPEED COVER METTALIC RED | 10-Piece per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SM2008": {
+"desc": "NEVERWILT DOUBLE CASCADE SADDLE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 35.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"H888": {
+"desc": "BLACK, 8\" X 8\" OPEN, 8\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 43.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"7087-04-00": {
+"desc": "AQUA FINISH CLEAR 1 GALLON PK 4 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 34.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-GRAFLA": {
+"desc": "SPRAY DYE GRAY FLANNEL | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-ROBEGG": {
+"desc": "SPRAY DYE ROBIN'S EGG | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"H1820": {
+"desc": "12\" MACHE BACK OPEN OASIS HEART | 2-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 8.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-TY": {
+"desc": "THANK YOU [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3CHIF-100-ORC": {
+"desc": "5/8\" ORCHID ORGANDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"3CHIF-100-PK": {
+"desc": "5/8\" PINK ORGANDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9SAT-FORE": {
+"desc": "1&1/2\" SATIN RIBBON FOREVER YOURS | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C0820": {
+"desc": "8x20 CYLINDERS | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 69.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S13708GW": {
+"desc": "18\" HOLLY BUSH GREEN WHITE 54 LEAVES | 1 bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"87220": {
+"desc": "MIRROR VASE 19\"H X 7\"W [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 17.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"LET-E": {
+"desc": "LETTER - E | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"40PO-PUR": {
+"desc": "2&3/4\" POLY SATIN PURPLE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"2.5NWST": {
+"desc": "2 1/2\" NATURAL WIRED STICKS | 500-Piece per Pack / 20-Pack per Case / 80-Pack per Master",
+"unit": "Pack",
+"qty_per_unit": 500,
+"first_cost": 1.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"5SAT-NVBLU": {
+"desc": "1\" SATIN RIBBON NAVY BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MTLG4146": {
+"desc": "GOLD CERAMIC REC 4\"X14\"OPEN,6\"H PK6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 56.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"40SHEER-LBL": {
+"desc": "2 1/2\" LIGHT BLUE WIRED SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"3BEAD": {
+"desc": "3X24X48 BEAD BOARD | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRIME STUCCO SUPPLY CORP",
+"email": null,
+"country": "United States",
+"city": "BROOKLYN",
+"street": "1271 MCDONALD AVE",
+"port": null,
+"lead": 50
+},
+"S7208WH": {
+"desc": "21\" ROSE SPRAY W/3F, 1B | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"XFFSNOW": {
+"desc": "Full Face Snowman Pick | 12 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"B18-XMAS": {
+"desc": "BALLOON 18\" CHRISTMAS | 5-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"RTUL6-ORG": {
+"desc": "TULLE 6\" ORANGE | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"0793": {
+"desc": "GOLD TWIST ELEGANT BOUQUET HOLDER | 4-Piece per BOX / 6-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 0,
+"first_cost": 6.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GTUL6-GD": {
+"desc": "GLITTER TULLE 6\" GOLD | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"B18-RDHRT": {
+"desc": "BALLOON 18\" RED HEART | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"CW0404": {
+"desc": "WHITE CY 4X4H | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 53.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S5524": {
+"desc": "CLEAR SQ 5X5 OPEN, 24\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 82.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"AMZSQ5514-PF": {
+"desc": "5X5X14 GLASS SQUARE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 31.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"9BURL": {
+"desc": "1 1/2\" BURLAP RIBBON W/ WIRED EDGE | 25-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"SCRIPT-GODFA": {
+"desc": "GOLD WORD - GODFATHER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"5BOW-ORG": {
+"desc": "RIBBON 1\" PULL BOW ORANGE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"STEMROSE-RD": {
+"desc": "STEM ROSES RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.12,
+"cbm": 0.00295,
+"max_container": 23050,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"SCRIPT-GRANDPA": {
+"desc": "GOLD WORD - GRANDPA | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-BIBLE": {
+"desc": "GOLD WORD - BIBLE | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"2165GD": {
+"desc": "16\" X 5\" GOLD ANTIQUE PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"7-416": {
+"desc": "8X8X4 GREY WOOD BOX | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 32.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"40PO-GD": {
+"desc": "2&3/4\" POLY GOLD RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"8CANDIVR": {
+"desc": "8\" CANDLES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"CS-20IN-GDRIM": {
+"desc": "20\" GOLD RIN CANDLEHOLDER | 1 PC PER PACK | 4PC PER CASE",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 11.5,
+"cbm": 0.02,
+"max_container": 3400,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SCRIPT-THE": {
+"desc": "GOLD WORD - THE - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"12CANDYEL": {
+"desc": "12\" CANDLES YELLOW | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.71,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"8000-03-2288": {
+"desc": "ALL SATIN PILLOW IN DISPLAY BOX | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CS-28IN-GDRIM": {
+"desc": "28\" GOLD RIN CANDLEHOLDER | 1 PC PER PACK | 4PC PER CASE",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 13.3,
+"cbm": 0.025,
+"max_container": 2720,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CSB555": {
+"desc": "BLACK, 5\"X5\"OPEN,5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 39.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"9SAT-RBL": {
+"desc": "1&1/2\" SATIN RIBBON ROYAL BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3368-12-09": {
+"desc": "9'' TAPERED SQUARE VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 31.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"40BOW-CIT": {
+"desc": "RIBBON 2&1/2\" PULL BOW CITRUS | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-BUR": {
+"desc": "3/16\" BURGANDY CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"B18-TY": {
+"desc": "BALLOON 18\" THANK YOU | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"RBIRD-SM": {
+"desc": "FEATHERED BIRDS 3.5 \" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"40SAT-COR": {
+"desc": "2&3/4\" SATIN RIBBON CORAL | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.49,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C008": {
+"desc": "GLASS SPHERE 3.5\"H | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 86.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CARD-LOV": {
+"desc": "LOVING MEMORY [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CSW555": {
+"desc": "CERAMIC SQ WHITE, 5X5 X5, | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"23FIR": {
+"desc": "23\" FIRESIDE BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RP9-BL": {
+"desc": "1 3/8\"X100YD BLUE POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"ACR1-GR": {
+"desc": "ACRYLIC COLOR ROCKS GREEN | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.05,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SP-HCOMB": {
+"desc": "SPRAY DYE HONEYCOMB | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"10970": {
+"desc": "GOLD CYLINDER 6\"x6\"x6\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"SCSLV-SV": {
+"desc": "SINGLE SILVER BACK SLEEVES | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"SP-CRAN": {
+"desc": "SPRAY DYE CRANBERRY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"5SAT-CYCL": {
+"desc": "1\" SATIN RIBBON CYCLAMENT | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-GIRL": {
+"desc": "GIRL [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RMESH-LGR": {
+"desc": "SISAL MESH 20\" LIGHT GREEN | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.4,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "FUZHOU SMILE ART CO.,LTD",
+"email": "sc@smilecheng.com",
+"country": "China",
+"city": ",FUZHOU",
+"street": "Add:4/F,NO.1 COMPLEX BUILDING",
+"port": "FUZHOU",
+"lead": 150
+},
+"C0604": {
+"desc": "6x4 CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 24.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CARD-WLO": {
+"desc": "WITH LOVE [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9DFS-GREY": {
+"desc": "1-1/2\" 38MM DF SATIN SHELL GREY | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.94,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"83-12-22": {
+"desc": "9 5/8\" PEDESTAL URN WHITE, PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 50.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"B18-EASTER": {
+"desc": "BALLOON 18\" HAPPY EASTER | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"SCRIPT-DEAR": {
+"desc": "GOLD WORD - DEAR | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"40SAT-BET": {
+"desc": "2&3/4\" SATIN RIBBON BETTER TIMES | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BRANX100-WH": {
+"desc": "4FT WHITE BRANCHES - PK 100 STEMS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"SC4-MOSS": {
+"desc": "4\" SPEED COVER METTALIC MOSS | 10-Piece per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RTUL6-YEL": {
+"desc": "TULLE 6\" YELLOW | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"CS-24IN-GDRIM": {
+"desc": "24\" GOLD RIN CANDLEHOLDER | 1 PC PER PACK | 4PC PER CASE",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 12.42,
+"cbm": 0.025,
+"max_container": 2720,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"BWRAP-24": {
+"desc": "24\" SMALL BUBBLE W/ PERF | 2-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 49.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRIME PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "Brooklyn",
+"street": "1290 METROPOLITAN AVE.",
+"port": null,
+"lead": 50
+},
+"RP9-FYO": {
+"desc": "1 3/8\"X100YD FOREVE YOURS POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"EE444": {
+"desc": "KIT LIQUID ILLUSION | 8-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 5.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CS-16IN-GDRIN": {
+"desc": "16\" GOLD RIN CANDLEHOLDER | 1 PC PER PACK | 4PC PER CASE",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 10.58,
+"cbm": 0.0175,
+"max_container": 3885,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"GTUL6-SV": {
+"desc": "GLITTER TULLE 6\" SILVER | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"CSW888": {
+"desc": "WHITE, 8\"X8\"OPEN,8\"H CERAMIC | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 49.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"GW18": {
+"desc": "18\" GRAPEVINE WREATH [Piece] | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"3709": {
+"desc": "8\" MADONNA FIGURE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"9DWI-WHT": {
+"desc": "1&1/2\" DELUXE WIRED SHEER WHITE RIBBON X 50 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP9-EMER": {
+"desc": "1 3/8\"X100YD EMERALD POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"X1075-GR": {
+"desc": "6\" CYCUS LEAVES | 720-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 720,
+"first_cost": 73.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"P811": {
+"desc": "9 1/2\" WHITE URN VASE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 11.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"RTUL6-LAV": {
+"desc": "TULLE 6\" LAVENDER | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"5BOW-IV": {
+"desc": "RIBBON 1\" PULL BOW IVORY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 8.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-GRY": {
+"desc": "1&1/2\" SATIN RIBBON GREY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-HOLGR": {
+"desc": "1&1/2\" SATIN RIBBON HOLIDAY GREEN | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C0416": {
+"desc": "4\" X 16\" H CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 72.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"B18-GWS": {
+"desc": "BALLOON 18\" GET WELL | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"B18-ANNVRSRY": {
+"desc": "BALLOON 18\" HAPPY ANNIVERSARY | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"PICK-THG": {
+"desc": "HAPPY THANKSGIVING PICKS | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 16.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"3NUM": {
+"desc": "NUMBER 3 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"X1305-RD": {
+"desc": "13\" RED RUSCUS PICK X 3 | 144 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"12CANDPK": {
+"desc": "12\" CANDLES PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"12CANDSV": {
+"desc": "12\" CANDLES SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"POLY-BEST": {
+"desc": "EMBOSSED FOIL POLY BACKING BEST TIME 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MTSS444": {
+"desc": "SILVER CERAMIC SQ 4\"X4\"OPENX4\"H | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 47.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"8015-IVY": {
+"desc": "SATIN & LACE FLOWER GIRL BASKET- IVY | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"S4408": {
+"desc": "CLEAR SQ 4X4 OPEN, 8\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 47.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S7208RD": {
+"desc": "21\" ROSE SPRAY W/3F, 1B | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"40SHEER-BUR": {
+"desc": "2 1/2\" BURGANDY SHEER | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.68,
+"cbm": 0.00142,
+"max_container": 47887,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"40BOW-GD": {
+"desc": "RIBBON 2&1/2\" PULL BOW GOLD | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SD14": {
+"desc": "14\" STYROFOAM DISC | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"X2782-SV": {
+"desc": "26\" GLITTER BALL SPRAY - SILVER [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CST-20": {
+"desc": "20\" CANDLE HOLDER X 4 LEGS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 70,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"CARD-XMA": {
+"desc": "CHRISTMAS | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5887-ASST": {
+"desc": "5\" FEATHER BUTTERFLY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"81-06-57": {
+"desc": "9 1/2\" DESIGNER URNMETALLIC ASSORT | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"50LACE": {
+"desc": "36\" WIDE LACE RUNNER | 50-Feet per ROLL / 16-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 9.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-MADAM": {
+"desc": "1&1/2\" SATIN RIBBON MADAME RED | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"18CANDYEL": {
+"desc": "18\" CANDLES YELLOW | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"40PO-EGG": {
+"desc": "2&3/4\" POLY EGGSHELL RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BRAN-RD": {
+"desc": "4FT RED BRANCHES - PK 50 STEMS [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"EUC-PUR": {
+"desc": "EUCALYPTUS - PURPLE | 1-Bunch per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"5SAT-FORE": {
+"desc": "1\" SATIN RIBBON FOREVER YOURS | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PUN-GD": {
+"desc": "1 1/2\" SIEVE RIBBON PUNCHINELLO | 44-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LEO UHLFELDER INC.",
+"email": null,
+"country": "United States",
+"city": "MOUNT VERNON",
+"street": "420 S. FULTON AVE",
+"port": null,
+"lead": 50
+},
+"SP-REDCLA": {
+"desc": "SPRAY DYE RED CLAY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"9NUM": {
+"desc": "NUMBER 9 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"7014XX": {
+"desc": "3' NORTHERN SPRUCE TREE (120 TIPS) - GREEN [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SCB": {
+"desc": "SMALL CELLO BAGS 4X2.75X9 | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 5.03,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"53618": {
+"desc": "CERAMIC ROUND POT CONCRETE FINISH 7X7X6 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"C017": {
+"desc": "GLASS SPHERE 8.5\"H,BODY D-6.5\" | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CER-T-STAR-WH": {
+"desc": "CERAMIC VASE - WHITE - 4.75 X 9.5\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"GLITC-RD": {
+"desc": "RED GLITTER 16OZ - COARSE | 16-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SP-FRAGR": {
+"desc": "SPRAY SCENT ROSE FRAGRANCE | 12-Oz. per CAN / 6-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 3.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-LEM": {
+"desc": "SPRAY DYE LEMON | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"620-06-04": {
+"desc": "DOUBLE CASKET SADDLE - BLACK | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 33.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9BOW-ORG": {
+"desc": "RIBBON 1&1/2\" PULL BOW ORANGE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BOW-SV": {
+"desc": "RIBBON 1&1/2\" PULL SILVER | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LET-L": {
+"desc": "LETTER - L | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"RLAN-24": {
+"desc": "RED 5\"X5\"X21 1/2\"H GLASS CANDLE HOLDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 33.56,
+"cbm": 0.089,
+"max_container": 764,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"25MM-AST": {
+"desc": "25MM ASST GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"TUL54-IV": {
+"desc": "54\" TULLE - IVORY | 40-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"X1057-WH": {
+"desc": "13\" EMERALD WHITE FERN | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 26.26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CARD-CON": {
+"desc": "CONGRATS | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"1066": {
+"desc": "9' GARLAND CAGE | 14-Piece per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 14,
+"first_cost": 26.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"50MM-GD": {
+"desc": "50MM GOLD GLASS BALLS | 24-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"GEM3-MIX": {
+"desc": "GEMS MIX | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.65,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"A329": {
+"desc": "CYLINDER VASE 5\"HX 4\" OPENING | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"S109W2": {
+"desc": "STEPHANOTIS STEMS GREEN | 200-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 200,
+"first_cost": 16.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"7154-SV": {
+"desc": "1.5MM (15 GUAGE) ALUMINUM WIRE, 10 YDS/ROLL",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FSTIX": {
+"desc": "OASIS FILLER STIX- 10 CUBIC FT | 1-Box per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH-IV": {
+"desc": "MESH - IVORY | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"3603": {
+"desc": "3\" CANDLE STAKE | 12-Piece per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 12,
+"first_cost": 5.33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C0808": {
+"desc": "8\" OPEN X 8\" CYLINDER PK 4 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 29.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"5SAT-MIN": {
+"desc": "1\" SATIN RIBBON MINT | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3CHIF-100-LBL": {
+"desc": "5/8\" LT. BLUE ORGANDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9SAT-BDROS": {
+"desc": "1&1/2\" SATIN RIBBON BIRD ROSE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FWIRE": {
+"desc": "FISHING NYLON | 100-Feet per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"POLY-YEL": {
+"desc": "EMBOSSED FOIL POLY BACKING YELLOW 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5877-ASST": {
+"desc": "3\" FEATHER BUTTERFLY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"SP-GLOWOO": {
+"desc": "SPRAY DYE GLOSSY WOODTONE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"3SAT-HPK": {
+"desc": "3/4\" SATIN RIBBON HOT PINK | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BRAN-NAT": {
+"desc": "9FT NATURAL TWIGGS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"AMZR55-PF": {
+"desc": "5X5 CLEAR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 7.08,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"S6624": {
+"desc": "SQ6X6 OPEN, 24\"H CLEAR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 124.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CER-WINK-WH": {
+"desc": "10\" x 4.5\" WHITE CERAMIC VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 25.68,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"72-0033WH": {
+"desc": "PEARL ROLLS 8MM WHITE | 66-Feet per ROLL / 18-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 12.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"CARD-BOY": {
+"desc": "BOY [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FWB-SV": {
+"desc": "SILVER BALLOON WEIGHTS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"CSB5510": {
+"desc": "BLACK CERAMIC SQ 5x5\" OPEN 10\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 60.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PF-8X1": {
+"desc": "8X8X1 MIRROR PLATFORM | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.25,
+"cbm": 0.0023,
+"max_container": 29565,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40MM-BURG": {
+"desc": "40MM BURGUNDY GLASS BALLS | 48-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"27701": {
+"desc": "METAL GLS VASE 24\"W, 8\"H | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RTUL6-BL": {
+"desc": "TULLE 6\" BLUE | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"1NUM": {
+"desc": "NUMBER 1 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"3SAT-CYCL": {
+"desc": "3/4\" SATIN RIBBON CYCLAMENT | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5BOW-BEAU": {
+"desc": "RIBBON 1\" PULL BOW BEAUTY PACKED 50 PER BOX [Box]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"NCPALM-NTWH": {
+"desc": "Natural/white Palmetto Bunch | 12 Bunches Per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"XWDTREE": {
+"desc": "24\" Wood Tree | 4 pieces per case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"CYL66-ETCH-SV-6": {
+"desc": "6X6X6 CYLINDER ETCH- SILVER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.6,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"BCARN-YEL": {
+"desc": "BUNCH CARNATIONS YELLOW | 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.74,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"R55-SV": {
+"desc": "5X5X5 SILVER CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"40DWI-HARVEST": {
+"desc": "2 1/2\" FALL PLAID | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CER-PLT-1164": {
+"desc": "GREY/WHITE 2 TONE HANGING PLANTER | 2-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 2.2,
+"cbm": 0.01175,
+"max_container": 5787,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"V201GD": {
+"desc": "ROLY POLY VOTIVE GOLD INSIDE/OUTSIDE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 18.36,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"PICK-BURPUMP": {
+"desc": "Burlap Pumpkin Pick | 24 Bunches per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"PICK-HMD-SPAN": {
+"desc": "SPANISH HAPPY MOTHERS DAY PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"40PO-PEA": {
+"desc": "2&3/4\" POLY SATIN PEACH RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-CYCL": {
+"desc": "2&3/4\" SATIN RIBBON CYCLAMIN | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3X9PILL-GD": {
+"desc": "3X9 GOLD PILLARS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 58.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"PC309S": {
+"desc": "3\"X9\" SILVER METALLIC PILLAR CANDLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 58.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CS221": {
+"desc": "2.5\"X9\" CRYSTAL SLIDE CANDLEHOLDER | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"X1795-GRN": {
+"desc": "12\" GREEN FERN | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 29.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"24CANDRD": {
+"desc": "24\" CANDLES RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"FOAMBALL-3": {
+"desc": "3\" FLORAL FOAM SPHERES | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 10,
+"cbm": 0.013,
+"max_container": 5230,
+"vendor": "TECNOFEN",
+"email": "VANESSA.SANTACRUZ@TECNOFEN.COM.MX",
+"country": "Mexico",
+"city": "SAN NATEO ATENCO",
+"street": "INDEPENDENCIA 1458, COL SAN ANTONIO",
+"port": null,
+"lead": 50
+},
+"178-18-332": {
+"desc": "5 3/8\" PARASOL VASE - POPSICLE ASSORTMENT | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 16.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC10-GD": {
+"desc": "10\" SPEED COVER METTALIC GOLD | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"APFOAM": {
+"desc": "ADVANTAGE PLUS FLORAL FOAM | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 23.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"75-0914WH": {
+"desc": "LED LIGHT WIRE WATERPROOF X 78\" LENGTH [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 115.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"POLY-GD": {
+"desc": "EMBOSSED FOIL POLY BACKING GOLD 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CER-PUMPKIN": {
+"desc": null,
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.28,
+"cbm": 0.08,
+"max_container": 850,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"FRP01-SV": {
+"desc": "PREFILLED ROLY POLY VOTIVE SILVER SPECKLE | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 12.24,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CP050": {
+"desc": "ROMAN PLASTIC PILLARS COLUMNS 36 5/8 X 11 7/8\"",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 114,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"CARD-FBET": {
+"desc": "FEELING BETTER | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LET-C": {
+"desc": "LETTER - C | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"SP-TEABLU": {
+"desc": "SPRAY DYE TEAL BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"GLITC-PK": {
+"desc": "PINK GLITTER - COARSE | 16-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"JAR6": {
+"desc": "6\"D,4\"OPEN, 5\"H | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 56.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SCRIPT-FAM": {
+"desc": "GOLD WORD - FAMILY | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"9PO-MIN": {
+"desc": "1&1/2\" POLY MINT RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FWB-BL": {
+"desc": "BLUE BALLOON WEIGHTS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"FWB-RD": {
+"desc": "RED BALLOON WEIGHTS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SD8": {
+"desc": "8\" STYRO DISC | 1-Piece per Pack / 174-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"100SAT-BLA": {
+"desc": "4\" SATIN RIBBON BLACK | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 10.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"803-10-09": {
+"desc": "3\" STEELPIX - SILVER | 2000-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 7.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GLITPK": {
+"desc": "PINK FINE GLITTER | 16-Oz. per CAN",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 6.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"0NUM": {
+"desc": "NUMBER 0 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"POLY-SAGE": {
+"desc": "EMBOSSED FOIL POLY BACKING SAGE 20\"X30' ROLLS [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"127-36-01": {
+"desc": "TRUMPET URN - GOLD | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 36.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-MAMA": {
+"desc": "GOLD WORD - MAMA - PACKED 10 [Pack] | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"2112-14-WH": {
+"desc": "14\" ARRANGEMENT BASKET WHITE | 8-Piece per case",
+"unit": "Set",
+"qty_per_unit": 8,
+"first_cost": 11.6,
+"cbm": 0.09175,
+"max_container": 741,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"CARE-SOLD": {
+"desc": "SOLD CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-EMER": {
+"desc": "3/4\" SATIN RIBBON EMERALD | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-FOY": {
+"desc": "3/16\" FOREVER YOURS CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"4017-18-09": {
+"desc": "5 1/2\" SWEETHEART VASE - CRYSTAL | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-MIN": {
+"desc": "2&3/4\" POLY SATIN MINT RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC10-RED": {
+"desc": "10\" SPEED COVER METTALIC RED | 25-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 12.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"51218": {
+"desc": "25\"H X 14\"W GOLD CANDLEABRA | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 26.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"50MM-SV": {
+"desc": "50MM SILVER GLASS BALLS | 24-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"EMB-GD": {
+"desc": "EMBOSSED FOIL NO BACKING GOLD 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WXROLL-GR": {
+"desc": "24\" GREEN WAX ON ROLL | 1-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 66.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-SV": {
+"desc": "3/16\" CURLING RIBBON SILVER | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40DWI-BLU": {
+"desc": "2&1/2\" DELUXE WIRED SHEER BLUE RIBBON | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MTGR606": {
+"desc": "GOLD CERAMIC CY 6\"OPEN, 6\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 50.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"R4126": {
+"desc": "4\" X 12\"OPEN, 6\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 52.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"X2782-RD": {
+"desc": "26\" GLITTER BALL SPRAY - RED [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"9SAT-ORA": {
+"desc": "1&1/2\" SATIN RIBBON ORANGE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-CROSE": {
+"desc": "CUT ROSE CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MTGS444": {
+"desc": "GOLD CERAMIC SQ 4\"X4\"OPENX4\"H | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 47.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"2NUM": {
+"desc": "NUMBER 2 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"B18-BWISH": {
+"desc": "BALLOON 18\" BEST WISHES | 5-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 5,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"B18-GDLCK": {
+"desc": "BALLOON 18\" GOOD LUCK | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"LENV-63-COLORED": {
+"desc": "#63 COLORED ENVELOPES 4 1/4 X 2 1/2 | 500-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 500,
+"first_cost": 11.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-LAV": {
+"desc": "3/16\" LAVENDER CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"FR": {
+"desc": "FINISHED ROSARY",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"B18-GIRL": {
+"desc": "BALLOON 18\" BABY GIRL | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"CSTAR-WH": {
+"desc": "11\" X 5\" STAR VASE - WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12,
+"cbm": 0.069,
+"max_container": 985,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"40MM-GD": {
+"desc": "40MM GOLD GLASS BALLS | 48-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"5BOW-NAVY": {
+"desc": "RIBBON 1\" PULL BOW NAVY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 8.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"267-100-09": {
+"desc": "25\"X2-1/4\"X2-1/4\" SINGLE ROSE BOX -CRYSTAL | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 20.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SAT-PIC": {
+"desc": "2&3/4\" SATIN RIBBON PICARDY | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MIRR-RECT-GD-M": {
+"desc": "16 X 8 RECT. GOLD MIRROR GLASS CANDLE PLATE | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 22.14,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CARD-THOU": {
+"desc": "THOUGHTS & PRAYERS [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-ROARR": {
+"desc": "ROSE ARRANGEMENT CARE TAG | 100-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GAR-IVY-PK12": {
+"desc": "84\" IVY GARLAND | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "EZ FLOWERY INC.",
+"email": null,
+"country": "United States",
+"city": "MONSEY",
+"street": "14 CALVERT DRIVE",
+"port": null,
+"lead": 50
+},
+"SP-CLIFE": {
+"desc": "SPRAY DYE CLEAR LIFE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"LET-U": {
+"desc": "LETTER - U | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"1072": {
+"desc": "8\" DESIGN DISH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 8.52,
+"cbm": 0.021,
+"max_container": 3238,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"BRAN-NAT": {
+"desc": "4FT NATURAL BRANCHES | 50-Piece per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": 50,
+"first_cost": 24.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"25MM-GR": {
+"desc": "25MM GREEN GLASS BALLS | 144-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"MTSR505": {
+"desc": "SILVER CERAMIC CY 5\" OPEN 5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CARD-SOR": {
+"desc": "IM SORRY [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"22-0318": {
+"desc": "METAL BIRD CAGE 2PC SET 11\" & 9\"",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"FWB-PK": {
+"desc": "PINK BALLOON WEIGHTS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"4007-12-09": {
+"desc": "9\" FLARED VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 19.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CS331": {
+"desc": "CANDLEHOLDER SMALL | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 12.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"PY10-TEAMO-PK": {
+"desc": "10\" PINK PLUSH TEDDY BEAR - TE AMO [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CER-187-WH": {
+"desc": "CERAMIC TORNADO VASE 8 X 8 X 6 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.106,
+"max_container": 641,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"RHOL40": {
+"desc": "2 3/4\"X50YD HOLLY PATTERN POLY RIBBON | 50-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RHV10": {
+"desc": "10 X 4 EURO VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"45-22099": {
+"desc": "10\" POINSETTA TIN OVAL | 12 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-NVBLU": {
+"desc": "3/16\" CURLING RIBBON NAVY BLUE | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"HALLOPICK": {
+"desc": "Halloween W/ Spider Pick |24 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"LCS32": {
+"desc": "32\" CLEAR CELLO SLEEVES | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAPPY DAY FLOWER CO., INC.",
+"email": null,
+"country": "United States",
+"city": "South Plainfield",
+"street": "243 st nicolas avenue",
+"port": null,
+"lead": 50
+},
+"B18-LOVE": {
+"desc": "BALLOON 18\" LOVE | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"LCB": {
+"desc": "LARGE CELLO BAGS 6X4X14.75 | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 8.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"90-0563": {
+"desc": "18\" OPEN ENDED GLASS SHADE TUBE | 16-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 16,
+"first_cost": 95.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RV100": {
+"desc": "10\" X 7\" OPEN VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 11.98,
+"cbm": 0.0587,
+"max_container": 1158,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"S3308": {
+"desc": "CLEAR SQ 3X3X8 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 31.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SP-PEACHY": {
+"desc": "SPRAY DYE PEACHY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 5.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"RRWB24": {
+"desc": "24\" WINDOW BOX | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"90-0021": {
+"desc": "8 1/2\" GLASS HURRICANE LANTERN PACKED 24 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 23.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SCRIPT-DAUGH": {
+"desc": "GOLD WORD - DAUGHTER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"5BOW-SV": {
+"desc": "RIBBON 1\" PULL BOW SILVER | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"DFBH49C/12": {
+"desc": "GALA HOLDER 4X9\": CRYSTAL W/ DRY FOAM | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"X15-GD": {
+"desc": "GOLD BERRY SPRAY | 2-Dozen per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CURL-LTBLU": {
+"desc": "3/16\" CURLING RIBBON LIGHT BLUE | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"11413": {
+"desc": "Missing Description",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 92.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"12HWPC-NAT": {
+"desc": "12\" HARD WICKER POT COVER - NAT | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"11-31720": {
+"desc": "LG CLEAR WEDDING BOUQ HOLDER | 6-Piece per BOX / 4-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 7.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH-LAV": {
+"desc": "MESH- LAVENDER | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"LVP20": {
+"desc": "20\" PEDESTAL BALL VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 22.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SOLBIKA SP ZOO",
+"email": "SOLBIKA@SOLBIKA.COM.PL",
+"country": "Poland",
+"city": "MAKOW UL LIPOWA",
+"street": "MAKOW, UL LIPOWA 84",
+"port": null,
+"lead": 150
+},
+"MTLG4124": {
+"desc": "GOLD, 12\"X4\"OPEN,4\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 82.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"1803": {
+"desc": "STICK WILLOW HONEY BASKET 14X10 - 16X12 | 2 Pieces per set",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"AMZLSQ10X4": {
+"desc": "10X10X4\"LOW RECTANGLE PLATE GLASS VASE | 4 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18.66,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"16SAT-RED": {
+"desc": "2&1/2\" SATIN RIBBON RED | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 11.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-GD": {
+"desc": "1&1/2\" POLY GOLD RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BX-DKBL": {
+"desc": "LATEX BALLOON DARK BLUE | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"SP-DRESC": {
+"desc": "SPRAY DYE DRESDEN CLEAR GLAZE | 12-Oz. per Can / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-MARO": {
+"desc": "SPRAY DYE MAROON | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"B18-BOY": {
+"desc": "BALLOON 18\" BABY BOY | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"SC6-ROSEP": {
+"desc": "6\" SPEED COVER ROSE PEARL | 25-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"800-RED": {
+"desc": "CHENILLE STEMS RED | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"9PO-EGG": {
+"desc": "1&1/2\" POLY SATIN EGGSHELL RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"X15-BUR": {
+"desc": "BURGANDY BERRY SPRAY | 2 Dozen per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"C0707": {
+"desc": "CLEAR CY 7X7\" | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 26.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"REL-MAD10": {
+"desc": "10\" WHT MADONNA PTRY",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"3CHIF-LTBL": {
+"desc": "5/8\" LT. BLUE ORGANDY RIBBON 25YD [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"GW24": {
+"desc": "24\" GRAPEVINE WREATH | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"CERBEAK-SV": {
+"desc": "11.5\" CERAMIC VASE SILVER PK6/CS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"90-0411": {
+"desc": "GLASS MARTINI 24\" | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 43.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"CLB4124": {
+"desc": "4X4X12 BLACK CERMIC REC | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 87.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SS": {
+"desc": "STEM SCRAPPER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"3203-24-427": {
+"desc": "VINTAGE BOTTLE VINTAGE PINK PK 24",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 43.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"16TAPEBLU": {
+"desc": "16\" TAPERS BLUE - PACKED 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"CSTND-BOSH": {
+"desc": "BOOKSHELF STAND [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"PICK-STAR": {
+"desc": "JEWISH STAR PICKS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"OVL4X8-ETCH-GD-12": {
+"desc": "4HX8L OVAL ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.92,
+"cbm": 0.072,
+"max_container": 944,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"MESH-PK": {
+"desc": "MESH ROLL - PINK | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"3203-24-09": {
+"desc": "VINTAGE BOTTLE COLLECTION CRYTAL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 40.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"7708N": {
+"desc": "8\" OASIS NETTED SPHERE, 1/BG, 9/CS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 85.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-FLARR": {
+"desc": "FLOWER ARRANGEMENT CARE TAG | 100-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 2.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40MM-GR": {
+"desc": "40MM GREEN GLASS BALLS | 48-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"P801": {
+"desc": "7 3/4\" WHITE URN VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"4252-04-09": {
+"desc": "10 3/4\" GINGER VASE - CRYSTAL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 40.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R348": {
+"desc": "3\" X4\" OPEN X 8\"H RECTANGLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 46.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"40PO-BURG": {
+"desc": "2&3/4\" POLY BURGUNDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-PIC": {
+"desc": "PICTURE CARD | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"90-0400": {
+"desc": "24\"X 5\" CYLINDER PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 83.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MIRR-RECT-M": {
+"desc": "16 X 8 RECTANGLE MIRROR GLASS CANDLE PLATE | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 17.28,
+"cbm": 0.029,
+"max_container": 2344,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PY6-BL": {
+"desc": "6\" BLUE BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"45-02999": {
+"desc": "8\" ROSE VASE PINK- PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC8-LAV": {
+"desc": "8\" SPEED COVER LAVENDER | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 4.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30080401": {
+"desc": "MIXED POINSETTIA BUSH: RED GLITTER 8X18 | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"3MET-SV": {
+"desc": "5/8\" SILVER METALLIC | 25-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.26,
+"cbm": 0.00023,
+"max_container": 295652,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"MESH-YEL": {
+"desc": "MESH - YELLOW | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"11442": {
+"desc": "Gold finish Aluminum Candelabra 47\"Hx 17\"D | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 82.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC6-WH": {
+"desc": "6\" SPEED COVER METTALIC WHITE | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FCAND3-IV": {
+"desc": "3\" FLOATING CANDLE- IVORY | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 16.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"REC4412": {
+"desc": "RECTANGLE VASE 4X4X12 CLEAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 33.84,
+"cbm": 0.0586,
+"max_container": 1160,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"HBHY-PK": {
+"desc": "HANGING BUBBLE BALL PINK HYDRANGEA | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"4013-24-09": {
+"desc": "4 1/2\" SWEETHEART VASE - CRYSTAL - PACKED 24",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 40.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MIRR-R18": {
+"desc": "18\" ROUND MIRROR PACKED 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 34.8,
+"cbm": 0.048,
+"max_container": 1416,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BCARN-FUS": {
+"desc": "BUNCH CARNATIONS FUCHIA | 1-Bundle per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.74,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"9BOW-PUR": {
+"desc": "RIBBON 1&1/2\" PULL BOW PURPLE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"7826-06-928": {
+"desc": "4 X 7\" CYLINDER - BROWN BIRCH AND WHITE BIRCH | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC8-SILVER": {
+"desc": "8\" SPEED COVER METTALIC SILVER | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WARCH": {
+"desc": "WEDDING ARCH [Piece] | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DON'S WIRE FORMING CO.",
+"email": null,
+"country": "United States",
+"city": "JACKSON",
+"street": "960 ANDERSON RD",
+"port": null,
+"lead": 50
+},
+"POLY-LAV": {
+"desc": "EMBOSSED FOIL POLY BACKING LAVENDER 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"16H": {
+"desc": "16\" GREEN REINFORCED STYRO HEART | 1-Piece per Pack / 18-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 9.94,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"MR12": {
+"desc": "12x12 ROUND MIRROR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"LET-P": {
+"desc": "LETTER - P | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"C013": {
+"desc": "GLASS SPHERE 5.5\"H,BODY D-6\" | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 39.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CARD-JEW": {
+"desc": "JEWISH STAR [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"H0632": {
+"desc": "CYL 6X32H BLACK | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 87.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"45-38342": {
+"desc": "DOUBLE BRICK TRAY | 48-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 48,
+"first_cost": 39.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MIRR-OCT": {
+"desc": "12\" OCTAGON MIRROR GLASS CANDLE PLATE | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 22.5,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LET-O": {
+"desc": "LETTER - O | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"LET-&": {
+"desc": "LETTER - & | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"SP-RASP": {
+"desc": "SPRAY DYE RASPBERRY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"C1010": {
+"desc": "10\" X 10\" H CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 41.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"2SAT-BDROSE": {
+"desc": "1/2\" X SATIN RIBBON BIRD ROSE X 100 YDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LET-D": {
+"desc": "LETTER - D | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"3SAT-HUN": {
+"desc": "3/4\" SATIN RIBBON HUNTER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S3210WH": {
+"desc": "ROSE BUD W/GYP BUSH X14 | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"5BOW-AZA": {
+"desc": "RIBBON 1\" PULL BOW AZALEA | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 8.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RTUL6-RD": {
+"desc": "TULLE 6\" RED | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"RKH4": {
+"desc": "HOOK BLADE FOLDING KNIFE RED | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"ACR3-MIX": {
+"desc": "ACRYLIC COLOR ROCKS MIX | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.42,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"C9818": {
+"desc": "7\"H,BODY D-3.5\" TEAR DROP SHAPE | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 76.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CARE-DEL": {
+"desc": "TELL TAG : \"DELIVERY NOTICE\" | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 2.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-DUB": {
+"desc": "2&3/4\" POLY DUBONNET ROSE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WOOD4124-BR": {
+"desc": "4\" X 4\" X 12\" WOOD RECTANGLE PK 24",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 75.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"C0303": {
+"desc": "3X3H CYCLINDER CLR | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 37.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"24C": {
+"desc": "24\" GREEN REINFORCED STYRO CROSS | 1-Piece per Pack / 14-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"11468": {
+"desc": "13\" x 5\" GOLD PILLAR STAND | 1 PIECE Per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BS36": {
+"desc": "36\" BIBLE KIT | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 74.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"CURL-BURG": {
+"desc": "3/16\" CURLING RIBBON BURGUNDY | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CLW4166": {
+"desc": "WHITE, 16\"X4\"OPEN, 6\"H, | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 74.22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"B9-VDAY": {
+"desc": "BALLOON 9\" VALENTINES DAY | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"MA408-PK": {
+"desc": "8\" X 4\" PINK CYLINDER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"POLY-LTBL": {
+"desc": "EMBOSSED FOIL POLY BACKING ICE BLUE 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH10-BL": {
+"desc": "MESH10\" - 10\" BLUE | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"PY10-BDAY-WH": {
+"desc": "10\"BIRTHDAY PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"800-MOS": {
+"desc": "CHENILLE STEMS MOSS | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"15385": {
+"desc": "CERAMIC TALL ROUND MATTE WHITE 8X7X7 | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"CMC-4092": {
+"desc": "CMC TPR REC 5HX8X4.5 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"CSW777": {
+"desc": "WHITE, 7\"X7\"OPEN,7\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SP-MOSGR": {
+"desc": "SPRAY DYE MOSS GREEN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SW444": {
+"desc": "WHITE, 4\" X 4\" OPEN, 4\"H | 12-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"TUL-SLV": {
+"desc": "TULLE 6\" SILVER | 25-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"Z916": {
+"desc": "8\" HT X 9\" OPN BOWL VASE PK 8",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CYL66-WH": {
+"desc": "6X6 GLASS WHITE CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.4,
+"cbm": 0.0544,
+"max_container": 1250,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"FWB-GD": {
+"desc": "GOLD BALLOON WEIGHTS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"79285": {
+"desc": "MIRROR CANDLE HOLDER 4\"W X 10\"H | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"B18-GRAD": {
+"desc": "BALLOON 18\" GRADUATION | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"LET-J": {
+"desc": "LETTER - J | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"C1408": {
+"desc": "8 1/2\" BUD VASE CRYSTAL | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 38.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"801-12-09": {
+"desc": "1 3/4\" STEELPIX - SILVER | 2000-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 10.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"S4405": {
+"desc": "SQ 4\" X 4\" OPEN, 5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 35.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"21508": {
+"desc": "SHEET MOSS PR BULK 20-24 SQ FT FG [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 35.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CS121": {
+"desc": "2.5\"X7\" CRYSTAL SLIDE CANDLEHOLDER | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"WOOD484-BR": {
+"desc": "RECTANGULAR 4X8\" WOOD BLOCK | 36-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 70.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"SQRD-18": {
+"desc": "18X18 GLASS PLATE SQUARE | 3-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 60.45,
+"cbm": 0.08,
+"max_container": 850,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"C991": {
+"desc": "5\" MIDI VASE | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 23.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CER-CYL56": {
+"desc": "CERAMIC WHITE/GOLD ETCH 5X5, 6X6 | 2-Piece per SET / 6-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 2.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"SM2011": {
+"desc": "NEVERWILT SPRAY BAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.84,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"GSPKL-16": {
+"desc": "16\"X5\" GOLD PILSNER PACKED 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 34.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"R346": {
+"desc": "3\" X4\" OPEN X 6\"H RECTANGLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S3310": {
+"desc": "CLEAR SQ 3X3 OPEN 10\"H | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 69.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"40PO-IV": {
+"desc": "2&3/4\" POLY IVORY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-LAVRED": {
+"desc": "1&1/2\" POLY LAVA RED RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-MOM": {
+"desc": "MOTHERS DAY | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4108-12-09": {
+"desc": "9\" CELEBRITY VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 32.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"7706": {
+"desc": "6\" OASIS FLORL FOAM SPHERE | 2-Piece per BAG / 10-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 2,
+"first_cost": 5.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"AMZLSQ8X4": {
+"desc": "8X8X4\"LOW RECTANGLE PLATE GLASS VASE, PACKED 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18.68,
+"cbm": 0.051,
+"max_container": 1333,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"B18-JSTBCSE": {
+"desc": "BALLOON 18\" JUST BECAUSE | 5-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 5,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"S5508": {
+"desc": "5\" X 5\" OPEN, 8\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 22.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"9V-BUR": {
+"desc": "1 1/2\" VELVET BURGANDY RIBBON X 25YD",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SHEER-FUS": {
+"desc": "1 1/2\" FUSCHIA WIRED SHEER | 50-Yards Per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"C0904": {
+"desc": "CLEAR CY 9X4 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 33.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"9DWI-PIN": {
+"desc": "1&1/2\" DELUXE WIRED SHEER PINK RIBBON | 50-Yards Per ROLL",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH-GD": {
+"desc": "MESH - GOLD | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SGV01FSV": {
+"desc": "PREFILLED MERCURY VOTIVE SILVER | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"3SAT-SIL": {
+"desc": "3/4\" SATIN RIBBON SILVER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH-GR": {
+"desc": "MESH - GREEN | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"WPG-14": {
+"desc": "WHITE EDGE PLATE GLASS VASE 14X2X4\" | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 28.24,
+"cbm": 0.042,
+"max_container": 1619,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"XPINETREE": {
+"desc": "32\" Pine Tree | 4 pieces per case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"5SAT-HOLGR": {
+"desc": "1\" SATIN RIBBON HOLIDAY GREEN | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"18CANDORG": {
+"desc": "18\" CANDLES ORANGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"X1564-WH": {
+"desc": "7\" POINSETTIA HEAD PK 100 WHITE [Box]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"T15716": {
+"desc": "3.5\" SMILING MUG | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 36.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"SAND-DBR": {
+"desc": "BROWN SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"S6616": {
+"desc": "SQ6X6 OPEN, 16\"H CLEAR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 65.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"9PB-XMAS": {
+"desc": "1 1/2\" XMAS PATTERN | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"REINMOSS-FS": {
+"desc": "REINDEER MOSS-FS | 1-Bag per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP9-BK": {
+"desc": "1 3/8\"X100YD BLACK POLY RIBBON | 100-Yards per Roll / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"CARD-DOG": {
+"desc": "DOGHOUSE [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9SAT-COR": {
+"desc": "1&1/2\" SATIN RIBBON CORAL | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S5520": {
+"desc": "CLEAR SQ 5X5 OPEN, 20\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 63.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"R4164": {
+"desc": "4x4x16 CLEAR RECTANGLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 63,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"REC4412-BK": {
+"desc": "4X4X12 BLACK RECTANGLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27.9,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"DGR505": {
+"desc": "SHINY GOLD CERAMIC CY, 5\" OPEN ,5H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 31.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"R66-GR": {
+"desc": "6X6X6 GREEN DESIGNER CUBE PK 8",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 31.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"T14000": {
+"desc": "3-4\" ASSORTMENT BABY PLANTER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 32.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"TSQ12-RG": {
+"desc": "ROSE GOLD MIRROR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27,
+"cbm": 0.033,
+"max_container": 2060,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"20W": {
+"desc": "20\" GREEN REINFORCED STYRO WREATH | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 7.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"4940-12-09": {
+"desc": "8\" GATHERING VASE-CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 12.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL20CL": {
+"desc": "GLASS EIFFEL TOWER VASE 20\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 61.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"35MM-PK": {
+"desc": "35MM PINK GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CURL-PUR": {
+"desc": "3/16\" CURLING RIBBON PURPLE | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-IV": {
+"desc": "3/16\" CURLING RIBBON IVORY | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"800-WH": {
+"desc": "CHENILLE STEMS WHITE | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"PL666-6": {
+"desc": "6X6X6 PLASTIC CUBES | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 4.65,
+"cbm": 0.0239,
+"max_container": 2845,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"51417": {
+"desc": "CERAMIC TALL EMBOSSED MATTE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 30.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"21101": {
+"desc": "NICKEL PLATED ALUM CANDLEABRA 32 IN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 60,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4004-SL": {
+"desc": "CYLINDER 5X5X5 ETCH SILVER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"9PO-SIL": {
+"desc": "1&1/2\" POLY SILVER RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PY12-PK": {
+"desc": "12\" PINK BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY36-BR": {
+"desc": "36\" LARGE RORY BEAR - BROWN COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"SC4-WH": {
+"desc": "4\" SPEED COVER METTALIC WHITE | 25-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 3.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"XD1967-1": {
+"desc": "18.5\" H X 7 CANDLEHOLDER - PACKED 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"4114-12-09": {
+"desc": "5 3/4\" SERENITY VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 29.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GEM3-PU": {
+"desc": "GEMS PURPLE | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.3,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"MT12": {
+"desc": "12\" MARTINI VASE - PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 58.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"LET-K": {
+"desc": "LETTER - K | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"CW0624": {
+"desc": "WHITE CYLINDER, 6X24H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"40PO-BET": {
+"desc": "2&3/4\" POLY BETTER TIMES RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH10-RG": {
+"desc": "MESH10\" - 10\" ROSE GOLD | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RCURL-HPK": {
+"desc": "3/16\" HOT PINK CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9PO-BET": {
+"desc": "1&1/2\" POLY SATIN BETTER TIMES RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LET-G": {
+"desc": "LETTER - G | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"MESH-SV": {
+"desc": "MESH- SILVER | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"LPOD": {
+"desc": "LOTUS PODS 3-4\" NATURAL | 10-Stems per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"A144": {
+"desc": "12H X 8X 2.5OP RECTANGLE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"HWR-LAV": {
+"desc": "14\" LAVENDER WREATH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"RPBOW9-ORG": {
+"desc": "1 3/8\" ORANGE PULL BOW | 25-Piece Per Bag / 10-Bags per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"X14-GD": {
+"desc": "20\" GOLD BERRY SPRAY PK 12 | 2 Dozen per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SCRIPT-HUSB": {
+"desc": "GOLD WORD - HUSBAND | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"LET-M": {
+"desc": "LETTER - M | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"FCONE-20": {
+"desc": "FROSTED GLASS VASE, D4 3/4\"X10 1/4\" | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 42,
+"cbm": 0.115,
+"max_container": 591,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SP-BLUBRI": {
+"desc": "SPRAY DYE BLUE BRIGHT | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SC6-LAV": {
+"desc": "6\" SPEED COVER METTALIC LAVENDER | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"V311": {
+"desc": "11\" x 2.75\" GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"FCG3": {
+"desc": "3\"GOLD FLOATING CANDLES 6PCS/ BOX-12BOX/CS [Box]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"40DWI-NVY": {
+"desc": "2&1/2\" DELUXE WIRED SHEER NAVY RIBBON | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CS8": {
+"desc": "8\" CLEAR SAUCER | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 3,
+"cbm": 0.00146,
+"max_container": 46575,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"CURL-AZA": {
+"desc": "3/16\" CURLING RIBBON AZALEA | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C0514": {
+"desc": "5\"X14\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 26.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"RIP12-GD": {
+"desc": "12\"X5\" GOLD RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"TUL-TUR": {
+"desc": "TULLE 6\" TURQUIOSE | 25-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"MESH-RD": {
+"desc": "MESH - RED | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"18-0004": {
+"desc": "GLUE GUN 40W | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"40BOW-AZA": {
+"desc": "RIBBON 2&1/2\" PULL BOW AZALEA | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 26.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-STP": {
+"desc": "ST. PATRICKS DAY [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WOOD4410-BR": {
+"desc": "4X4X10 WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 17.52,
+"cbm": 0.034,
+"max_container": 2000,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"RCURL-GD": {
+"desc": "3/16\" GOLD CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9SAT-MIN": {
+"desc": "1&1/2\" SATIN RIBBON MINT | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30SWFP": {
+"desc": "30\" PINK ROSE PAPER SAY IT WITH FLOWER | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 26,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"FWB-WH": {
+"desc": "WHITE BALLOON WEIGHTS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RIP18": {
+"desc": "18\"X5\" RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 39.48,
+"cbm": 0.1,
+"max_container": 680,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"LET-R": {
+"desc": "LETTER - R | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"LET-Y": {
+"desc": "LETTER - Y | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"3GRID": {
+"desc": "5\" PLASTIC GRID | 24-Piece per BAG/ 3-Bag per Case / 15-Bag Per Master",
+"unit": "Bag",
+"qty_per_unit": 24,
+"first_cost": 0.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PY6-PK": {
+"desc": "6\" PINK BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"BRAN-WHX100": {
+"desc": "4FT WHITE BRANCHES | 100-Branches per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 50.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"WOOD666-BR": {
+"desc": "6\" SQ WOODEN BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"CARD-BWI": {
+"desc": "BEST WISHES [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MIR-BRDG-24": {
+"desc": "MIRROR BRIDGE VASE 10 X 3 X 24 PK 1",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18.3,
+"cbm": 0.058,
+"max_container": 1172,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"MTSR606": {
+"desc": "MATTE SILVER CERAMIC CY 6\"X6\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 50.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CS290": {
+"desc": "4\"X4\"X14\" CRYSTAL GEM CANDLEHOLDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 18.22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BX-ASSRTD": {
+"desc": "LATEX BALLOON ASSORTED | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"LFR-WH": {
+"desc": "LARGE WHITE ROSARY SILK FLOWER FILLED - 53 | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 12.46,
+"cbm": 0.0063,
+"max_container": 10793,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"3SAT-BDROS": {
+"desc": "3/4\" SATIN RIBBON BIRD ROSE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-WATER": {
+"desc": "I'M THIRSTY TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"H1810": {
+"desc": "12\" MACHE BACK SOLID OASIS HEART | 2-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 9.93,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R67B-ETCH-GD-6": {
+"desc": "6X6X5 ROUND BUBBLE BALL SHAPE ETCH- GOLD | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.6,
+"cbm": 0.02,
+"max_container": 3400,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"MTLG4126": {
+"desc": "GOLD, 12\"X4\"OPEN,6\"H PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 49.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PPROOF": {
+"desc": "PETAL PROOFER # 661 | 11-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-FOILSEAL": {
+"desc": "SPRAY DYE FOLIAGE SEALER | 12-Oz. per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"31888": {
+"desc": "CERAMIC ROUND VASE W/ CHECKER MATTE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"BERRY-PICK": {
+"desc": "BERRY PICK W PINE CONES | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.72,
+"cbm": 0.0008,
+"max_container": 85000,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"PICK-BOY": {
+"desc": "IT'S A BOY PICKS | 12-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"S7401-PK": {
+"desc": "GARDENT PINK BUD | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 1.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"4023-12-09": {
+"desc": null,
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 48.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"PICK-PUMP": {
+"desc": "Pumpkin Pick |24 Bunches per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"S4424": {
+"desc": "4\" X 4\" OPEN, 24\"H PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CER-180-PK": {
+"desc": "CERAMIC PINK VASE 7 X 7 X 9.5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0.098,
+"max_container": 693,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"X1253": {
+"desc": "8\" LACQUERED HOLLY BERRY PICK | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 23.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SQ-BX20": {
+"desc": "SQUARE VASE PACKED 1",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 17,
+"cbm": 0.057,
+"max_container": 1192,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SC4-LAV": {
+"desc": "4\" LAVENDER PEARL 250/CS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC4.5-ROSE": {
+"desc": "4.5\" SPEED COVER METTALIC ROSE - PCK 250 PER CASE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-GLK": {
+"desc": "GOOD LUCK [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SPAN-RIBB-GIRL": {
+"desc": "SPANISH BABY GIRL PATTERN RIBBON 25 YD [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.09,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"16TAPERED": {
+"desc": "16\" TAPERS RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"S1756": {
+"desc": "CLEAR SQ 1.75 OPEN X 6\"h | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 46.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CARD-HH": {
+"desc": "HALLOWEEN | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GEM1-AQ": {
+"desc": "GEMS AQUA | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.42,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CSW5514": {
+"desc": "CERAMIC SQ WHITE, 5X5X14, 6 PCS/CS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 46.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"MR18": {
+"desc": "18\" ROUND MIRROR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 46.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"4254-04-09": {
+"desc": "13\" FLARED VASE - CRYSTAL - PACKED 4 [Case]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 46.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"B18-THANKSGIV": {
+"desc": "BALLOON 18\" THANKSGIVING | 5-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"3SAT-BROW": {
+"desc": "3/4\" SATIN RIBBON BROWN | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"10CANDYEL": {
+"desc": "10\" CANDLES YELLOW | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"MIRR-SQ": {
+"desc": "12\" SQUARE MIRROR GLASS CANDLE PLATE | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 18.9,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PL-SQ5510": {
+"desc": "5X5X10 PLASTIC TALL SQUARE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 11.16,
+"cbm": 0.033,
+"max_container": 2060,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"DS-4": {
+"desc": "5MM GLASS PLATE STAND | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 8.2,
+"cbm": 0.026,
+"max_container": 2615,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"1800": {
+"desc": "TRIBUTE CAGE HOLDER PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-BOUG": {
+"desc": "SPRAY DYE BOUGAINVILLEA | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-HYA": {
+"desc": "SPRAY DYE HYACINTH | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"VINE-LILAC": {
+"desc": "60\" LILAC VINE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"SLASH": {
+"desc": "SLASH PINE CONE 4-5\" | 225-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 225,
+"first_cost": 44.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"W0620": {
+"desc": "FROSTED 6X20 CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 44.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"30CELLO-GRN": {
+"desc": "30\" CELLOPHANE - GREEN X 100' [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SW555": {
+"desc": "WHITE SQ 5X5 OPEN, 5\" H, | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 44.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"3CHIF-100-IVO": {
+"desc": "5/8\" IVORY ORGANDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"RGLAN-24": {
+"desc": "ROSE GOLD 5\"X5\"X21 1/2\"H GLASS CANDLE HOLDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 33.56,
+"cbm": 0.089,
+"max_container": 764,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"40DWI-BURG": {
+"desc": "2&1/2\" DELUXE WIRED SHEER BURGANDY RIBBON | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"REC4418": {
+"desc": "RECTANGLE VASE 4X4X18 | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 38.76,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CURL-ORG": {
+"desc": "3/16\" CURLING RIBBON ORANGE | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCRIPT-NEIGHBOR": {
+"desc": "GOLD WORD - NEIGHBOR | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"B18-CONGR": {
+"desc": "BALLOON 18\" CONGRATS | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"20-12-13": {
+"desc": "SWEETHEART VASE - RUBY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 21.43,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ACR1-AQ": {
+"desc": "ACRYLIC COLOR ROCKS AQUA | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.09,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"31-24-22": {
+"desc": "JARDINIERE - WHITE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 42.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SETOF3-CAN": {
+"desc": "SET OF 3 CYLINDER 6\",8\",11\" WITH CANDLES | 1-SET Per Pack / 6-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.63,
+"cbm": 0.0619,
+"max_container": 1098,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"1180-WH": {
+"desc": "GLITTER WHITE 1 LB/JAR",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"45-22152": {
+"desc": "6\" CERAMIC TREE LOW CUBE, GRAY | 6 Piece Per Pack / 12 Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"HWR-LILAC": {
+"desc": "14\" LILAC WREATH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"SGAS/3": {
+"desc": "SEAGRASS WODCHIP | 3-Piece per SET / 24-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"UD0297": {
+"desc": "PLASTIC CARD RACK | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MULTI PACKAGING SOLUTIONS",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "75 REMITTANCE DRIVE",
+"port": null,
+"lead": 50
+},
+"SM2002": {
+"desc": "NEVERWILT TRIPLE SADDLE PK 4 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 41.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MULTI PACKAGING SOLUTIONS",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "75 REMITTANCE DRIVE",
+"port": null,
+"lead": 50
+},
+"9PO-WHI": {
+"desc": "1&1/2\" POLY WHITE RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3CHIF-DAF": {
+"desc": "1/2\" YELLOW CHIFFON RIBBON | 25-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"S5514": {
+"desc": "CLEAR SQ 5X5 OPEN, 14\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 41.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PY18-BR": {
+"desc": "18\" BROWN PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"REC4418-MGD": {
+"desc": "4X4X18 MIRROR GOLD RECTANGLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 35.82,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"C0210": {
+"desc": "2X10H CYLINDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 45.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CURL-GD": {
+"desc": "3/16\" CURLING RIBBON GOLD X 500 YARDS [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-LAV": {
+"desc": "3/16\" CURLING RIBBON LAVENDER | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"36CUT": {
+"desc": "36\" SERRATED ALL IN ONE CUTTER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 40.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BULMAN PRODUCTS INC.",
+"email": null,
+"country": "United States",
+"city": "GRAND RAPIDS",
+"street": "1650 MCREYNOLDS AVE NW",
+"port": null,
+"lead": 50
+},
+"14HPC": {
+"desc": "14\" HWPC - NATURAL | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.6,
+"cbm": 0.015,
+"max_container": 4533,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"H0412": {
+"desc": "CYLINDER BLACK, 4\"OPEN,12\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 40.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"TL-8": {
+"desc": "MIRROR TEA LIGHT HOLDER X 8 | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.3,
+"cbm": 0.0019,
+"max_container": 35789,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"MESH-DKGR": {
+"desc": "MESH - DARK GREEN | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RVS12": {
+"desc": "12 X 6 EURO VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 13.8,
+"cbm": 0.0535,
+"max_container": 1271,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"MTSS555": {
+"desc": "SILVER CERAMIC SQ 5\"X5\"OPENX5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 40.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"LET-N": {
+"desc": "LETTER - N | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"3108": {
+"desc": "10H X 8 OPENING | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"PY51": {
+"desc": null,
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"SP-CHEWOO": {
+"desc": "SPRAY DYE CHERRY WOODTONE | 12-Oz. per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"R46966": {
+"desc": "15\" X 10 \" RECTANGLE BASKET | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18.96,
+"cbm": 0.174,
+"max_container": 390,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"SD10": {
+"desc": "10\" STYRO DISC | 1-Piece per Pack / 112-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION",
+"email": null,
+"country": "United States",
+"city": "Ludington",
+"street": "1 Longfellow",
+"port": null,
+"lead": 60
+},
+"40DWI-PUR": {
+"desc": "2&1/2\" DELUXE WIRED SHEER PURPLE RIBBON | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-CFLO": {
+"desc": "CUT FLOWER CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 3.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RIP14": {
+"desc": "14\"X5\" RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 28.32,
+"cbm": 0.09,
+"max_container": 755,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"ABSP-TEA": {
+"desc": "ABSORBTION DYE TEAL BLUE | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"HWR-CBLOS": {
+"desc": "14\" CHERRY BLOSSOM WREATH | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"VINE-LAV": {
+"desc": "60\" LAVENDER VINE GARLAND | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"C0208": {
+"desc": "2X8H CYLINDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 38.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"3279-24-09": {
+"desc": "7\" CLEAR JARS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 35.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"OPAD": {
+"desc": "#2 ORDER PAD | 10-Books per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3CHIF-100-DAFF": {
+"desc": "5/8\" DAFFODIL ORGANDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"T4180M": {
+"desc": "6\"CERAMIC PUMPKIN-WHITE [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 38.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"CARE-DGAR": {
+"desc": "DISH GARDEN CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP40-BK": {
+"desc": "ROYAL 2 3/4\"X100YD BLACK POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"7NUM": {
+"desc": "NUMBER 7 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"FLCIR-11": {
+"desc": "11\" FLAT CIRCLE VASE PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 33,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"25-0476WH": {
+"desc": "ARTIFICIAL FLOWER MAT 24\" WHITE | 12 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"3752": {
+"desc": "10\" MADONNA FIGURE | 1 Piece Per Pack / 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"CERTRPS14-BK": {
+"desc": "13.5\" CERAMIC VASE BLACK | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CURL-EGG": {
+"desc": "3/16\" CURLING RIBBON EGGSHELL X 500 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30CUT": {
+"desc": "30\" SERRATED ALL IN ONE CUTTER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 36.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BULMAN PRODUCTS INC.",
+"email": null,
+"country": "United States",
+"city": "GRAND RAPIDS",
+"street": "1650 MCREYNOLDS AVE NW",
+"port": null,
+"lead": 50
+},
+"WOOD448-BR": {
+"desc": "4X4X8 WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0.024,
+"max_container": 2833,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL55-ETCH-GD": {
+"desc": "5X5X5 CYLINDER ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.2,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"SP-WALWOO": {
+"desc": "SPRAY DYE WALNUT WOODTONE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"CARD-HEB1": {
+"desc": "HEBREW1- YOMTOV | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CMC-4183": {
+"desc": "CERAMIC WHITE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"CSB777": {
+"desc": "BLACK, 7\"X7\"OPEN,7\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"DBUN-FALLFRT": {
+"desc": "Dried Fall Bundle with Fruit | 16 Bags per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"HVB-22": {
+"desc": "22\" X 7\" OPEN HURRICANE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"CARE-FBAS": {
+"desc": "FRUIT BASKET CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C1204": {
+"desc": "12 X 4 CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 35.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"R55-PK24": {
+"desc": "5X5X5 CLEAR CUBE | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 25.92,
+"cbm": 0.08,
+"max_container": 850,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"75256-BK": {
+"desc": "6X6X6 BLACK SQUARE CERAMIC VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 35.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S18400PK": {
+"desc": "32\" PINK CHERRY BLOSSOM [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.93,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"40BOW-EMER": {
+"desc": "RIBBON 2&1/2\" PULL BOW EMERALD | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-PK": {
+"desc": "RIBBON 2&1/2\" PULL BOW PINK | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-PU": {
+"desc": "RIBBON 2&1/2\" PULL BOW PURPLE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-RD": {
+"desc": "RIBBON 2&1/2\" PULL BOW RED | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-SILV": {
+"desc": "RIBBON 2&1/2\" PULL BOW SILVER | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40BOW-WH": {
+"desc": "RIBBON 2&1/2\" PULL BOW WHITE | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 35.23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"X2782-GD": {
+"desc": "26\" GLITTER BALL SPRAY - GOLD [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"H1813": {
+"desc": "13\" MACHE BACK SOLID OASIS HEART | 2-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 11.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S5506": {
+"desc": "5\" X 5\" OPEN, 6\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SSPKL-16": {
+"desc": "16\"X5\" SPECKLED SILVER PILSNER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"MLAN-18": {
+"desc": "5\"X5\"X17 1/2\" H GLASS CANDLE HOLDER PK 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 28.4,
+"cbm": 0.049,
+"max_container": 1387,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"RLAN-18": {
+"desc": "RED 5\"X5\"X17 1/2\" H GLASS CANDLE HOLDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28.4,
+"cbm": 0.049,
+"max_container": 1387,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"90-0108": {
+"desc": "GLASS HURRICANE VASE 6\" | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 34.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"GL24WH": {
+"desc": "GLASS EIFFEL TOWER VASE WHITE 24\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 34.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MESH-ORG": {
+"desc": "MESH- ORANGE | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"WOOD4412-WH": {
+"desc": "4X4X12 WHITE WOOD | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 21.48,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"4QT": {
+"desc": "4QT EARTHGRO POTTING SOIL= | 12-Packs per Case",
+"unit": "Case",
+"qty_per_unit": null,
+"first_cost": 34.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"C0810": {
+"desc": "8\" X 10\"H CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"MESH-PUR": {
+"desc": "MESH -PURPLE | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MIR-BD10": {
+"desc": "MIRROR VASE 3.5 X 3 X 9.5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30,
+"cbm": 0.031,
+"max_container": 2193,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"X1057-GR": {
+"desc": "13\" EMERALD GREEN FERN | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 33.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SCRIPT-BRO": {
+"desc": "GOLD WORD - BROTHER | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CW0614": {
+"desc": "WHITE CYLINDER , 6\"OPEN, 14\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 33.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"80-12-175": {
+"desc": "7 3/4\" DESIGNER URN - ANTIQUE BRASS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 33.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-HUNGR": {
+"desc": "SPRAY DYE HUNTER GREEN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"3SAT-NVBLU": {
+"desc": "3/4\" SATIN RIBBON NAVY BLUE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"XSLED": {
+"desc": "HOLIDAY SLEIGH BASKET - RED W/ LINER 4.75\"H X 16\"L| 12 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"GL24CL": {
+"desc": "GLASS EIFFEL TOWER VASE 24\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MTGR505": {
+"desc": "GOLD CERAMIC CY 5\"OPEN, 5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"X1026-WH": {
+"desc": "7.5\" LEATHER LEAF - WHITE | 144 PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"C950": {
+"desc": "5\" GINGER VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"H0512": {
+"desc": "BLACK CY 5X12H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"26282": {
+"desc": "METAL MIRROR VASE 15\"H X 10\"W | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"9PO-BROW": {
+"desc": "1&1/2\" POLY SATIN BROWN RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-EAST": {
+"desc": "EASTER [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4018-12-09": {
+"desc": "7\" SWEETHEART VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 32.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FBIRD-WH": {
+"desc": "Fancy Bird- White |16 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"S777": {
+"desc": "7X7X7 CUBE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 31.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"4105-09-09": {
+"desc": "9 3/8\" FOOTED GATHERING VASE CRYSTAL | 9-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 15.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"MLAN-28": {
+"desc": "5\"X5\"X27 1/3\" H GLASS CANDLE HOLDER PK 2",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.16,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"C0806": {
+"desc": "8\" OPEN X 6\" CYLINDER | 6- Piece per pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"GV28": {
+"desc": "28\" EVENT GATHER VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 15.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SOLBIKA SP ZOO",
+"email": "SOLBIKA@SOLBIKA.COM.PL",
+"country": "Poland",
+"city": "MAKOW UL LIPOWA",
+"street": "MAKOW, UL LIPOWA 84",
+"port": null,
+"lead": 150
+},
+"P1701": {
+"desc": "9\" UTILITY VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"EMB-FUC": {
+"desc": "EMBOSSED FOIL NO BACKING FUCHSIA 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MIRR-ROUND-GD-L": {
+"desc": "12\" ROUND GOLD MIRROR GLASS CANDLE PLATE PK-18",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 28.08,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SP-OCTBRO": {
+"desc": "SPRAY DYE OCTOBER BROWN | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"MESH10-RDGR": {
+"desc": "MESH10\" - 10\" CHRISTMAS PATTERN | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"R66-EBK": {
+"desc": "BLACK LINE GLASS CANDLE HOLDER, 6X6 | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 26.08,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CURL-BROW": {
+"desc": "3/16\" CURLING RIBBON BROWN X 500 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MM175PK-6": {
+"desc": "10\" PINK COLUMN VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 4.2,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MA66": {
+"desc": "6X6X6 CUBES | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 10.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"X15-RED": {
+"desc": "RED BERRY SPRAY | 2-Dozen per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"C449": {
+"desc": "24\" X 5\" PEDESTALS VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 15.9,
+"cbm": 0.126,
+"max_container": 539,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"R345": {
+"desc": "3\" X4\" OPEN X 5\"H RECTANGLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"TSQ12-MGD": {
+"desc": "12\" TALL SQUARE GOLD MIRROR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27,
+"cbm": 0.033,
+"max_container": 2060,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"6NUM": {
+"desc": "NUMBER 6 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"PL-CYL510": {
+"desc": "5X10 PLASTIC CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 8.7,
+"cbm": 0.0643,
+"max_container": 1057,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"MESH-XMAS": {
+"desc": "MESH - CHRISTMAS PATTERN | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"RTUL6-WH": {
+"desc": "TULLE 6\" WHITE | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"51449": {
+"desc": "CERAMIC LOW OVAL LATTICE DESIGN 10X4X5 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"FV8": {
+"desc": "8\" HT X 6\"OPEN GATHERING VASE PK 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"SV10": {
+"desc": "11\" X 4\" WAVE VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"B18-VDAY": {
+"desc": "BALLOON 18\" VALENTINES DAY | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"9SAT-CYCLA": {
+"desc": "1&1/2\" SATIN RIBBON CYCLAMIN | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 7.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MMESH-GD": {
+"desc": "METALLIC MESH 20\"GOLD | 5-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"2080-WH": {
+"desc": "8MM PEARL ON ROLL 8YD [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"3012-SET-WH": {
+"desc": "SET OF 2 PLANTERS 7.5\" & 9.5\" ] | 2-Piece Per Set / 3-SET Per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 3.2,
+"cbm": 0.0145,
+"max_container": 4689,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"6008-SV": {
+"desc": "24\" X 6\" PEDESTAL VASE SILVER- PACKED 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20.8,
+"cbm": 0.073,
+"max_container": 931,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"C0420": {
+"desc": "4\"X20\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 29.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"VC75-BL": {
+"desc": "2\" BLUE VOTIVES | 75-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 75,
+"first_cost": 29.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"4041-06-09": {
+"desc": "10 3/8\" FLARED VASE - CRYSTAL - PACKED 6 [Case]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 29.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"B9-WELCO": {
+"desc": "BALLOON 9\" WELCOME | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"CERTIDS-GD": {
+"desc": "12\" CERAMIC VASE GOLD | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"RCURL-BL": {
+"desc": "3/16\" BLUE CURLING RIBBON | 500-Yards per Roll / 12-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"35-06-09": {
+"desc": "15\" DESIGNER DISH - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28.66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4NUM": {
+"desc": "NUMBER 4 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"RPBOW9-YEL": {
+"desc": "1 3/8\" YELLOW PULL BOW | 25-Piece Per Bag / 10-Bags per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"1000PKT": {
+"desc": "CHRYSAL CLASSIC 5 GRAM FLOWER FOOD | 1000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1000,
+"first_cost": 28.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHRYSAL USA INC.",
+"email": "INFO@CHRYSALUSA.COM",
+"country": "United States",
+"city": "MIAMI",
+"street": "3063 NW 107TH AVENUE",
+"port": null,
+"lead": 50
+},
+"4002-24-09": {
+"desc": "7 1/2\" BUD VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 28.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SRG-SSPKL": {
+"desc": "SPECKLED HANGING GLASS CANDLE ER5.5\" | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 22.08,
+"cbm": 0.051,
+"max_container": 1333,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"6010-16-07": {
+"desc": "CAKE FOAM 6X4\" | 16-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 16,
+"first_cost": 28.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RP40-BURG": {
+"desc": "ROYAL 2 3/4\"X100YD BURGUNDY POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.98,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"B9-HB": {
+"desc": "BALLOON 9\" HAPPY BIRTHDAY | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"CW-226": {
+"desc": "LARGE SINGLE ROSE BOX | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CURTIS WAGNER PLASTICS CORP",
+"email": null,
+"country": "United States",
+"city": "HOUSTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-BURG": {
+"desc": "SPRAY DYE BURGUNDY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-IVO": {
+"desc": "SPRAY DYE IVORY | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-ORA": {
+"desc": "SPRAY DYE ORANGE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"GEM1-PK": {
+"desc": "GEMS PINK | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.35,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SC8-WH": {
+"desc": "8\" SPEED COVER WHITE | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 4.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC10-WH": {
+"desc": "10\" SPEED COVER METTALIC WHITE | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R5048": {
+"desc": "10\"HT X 4\"OPN JUG VASE PK 24",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"LET-Z": {
+"desc": "LETTER - Z | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"9BOW-NAVY": {
+"desc": "RIBBON 1&1/2\" PULL BOW NAVY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 13.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"FM5-GD": {
+"desc": "FLAT MARBLES GOLD [Bag] | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.71,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"R1405": {
+"desc": "14\" VASE X 5\" OPEN PK 6 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"RB32": {
+"desc": "3/18\" RUBBER BANDS | 1-Pounds per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.81,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ALLIANCE RUBBER COMPANY",
+"email": null,
+"country": "United States",
+"city": "HOT SPRINGS NATIONAL PARK",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CER-PLT-1160": {
+"desc": "GOLD/WHITE 2 TONE PLANTER SET OF 2 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.88,
+"cbm": 0.075,
+"max_container": 906,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"4149-06-09": {
+"desc": "10 5/8\" JORDAN VASE CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 23.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"4109-06-09": {
+"desc": "10 5/8\" CELEBRITY VASE - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 23.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"28992": {
+"desc": "MTL GLASS ACENT TABLE 19\"W, 24\"H | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 25.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"CYL514": {
+"desc": "5\" X 14\" CYLINDER PACKED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 20.4,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RP9-BUR": {
+"desc": "1 3/8\"X100YD BURGANDY POLY RIBBON | 100-Yards per ROLL / 12-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.89,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9BOW-CIT": {
+"desc": "RIBBON 1&1/2\" PULL BOW CITRUS | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 12.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"8NUM": {
+"desc": "NUMBER 8 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"C0506": {
+"desc": "5\"X6\" CYLINDER PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"FWB-PUR": {
+"desc": "PURPLE BALLOON WEIGHTS [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"ACR3-LAV": {
+"desc": "ACRYLIC COLOR ROCKS LAVENDER | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.09,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CS-BKGD": {
+"desc": "SET OF 3 - BLACK & GOLD CANDLEHOLDER",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"15106": {
+"desc": "CERAMIC BRUSH DIAMOND MATTE GOLD | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"4047-06-09": {
+"desc": "10\" TROPICAL GARDEN VASE - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 24.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"MMESH-SV": {
+"desc": "METALLIC MESH 20\" SILVER | 5-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"PICK-GIRL-72": {
+"desc": "IT'S A GIRL PICKS | 72-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"CARD-AML": {
+"desc": "ALL MY LOVE CARDS- ASST | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"805": {
+"desc": "4\" SMALL HOT MELT GLUE PAN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FPC CORP., DIANE CALLAHAN EXT 249",
+"email": null,
+"country": "United States",
+"city": "WAUCONDA",
+"street": "355 HOLLOW HILL DRIVE",
+"port": null,
+"lead": 50
+},
+"11085": {
+"desc": "CERAMIC TALL RECTANGLE MATTE WHITE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"71110BK": {
+"desc": "4x4x4 BLACK SQUARE CERAMIC PK 24",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ABC GLASS INC",
+"email": "mark168178@gmail.com",
+"country": "United States",
+"city": "NORCROSS",
+"street": "6900 PEACHTREE INDUSTRIAL BLVD",
+"port": null,
+"lead": 50
+},
+"XD1967": {
+"desc": "15\" H X 5.5 CANDLEHOLDER - PACKED 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"CYL66-OCT-WH": {
+"desc": "CERAMIC OCTOGON CYLINDER WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 18,
+"cbm": 0.046,
+"max_container": 1478,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"X1053": {
+"desc": "3.5\" RED FLOCKED SANTA | 12-Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 0.67,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"40BOW-BURG": {
+"desc": "RIBBON 2&1/2\" PULL BOW BURGANDY | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"46696": {
+"desc": "METAL GLASS LANTERN 13\"H X 6\"W SET OF 3 [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"10-20006": {
+"desc": "OASIS FLORAL FOAM BRICKS 6 PACK 6/CASE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WOOD4410-WH": {
+"desc": "4X4X10 WHITE WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 17.52,
+"cbm": 0.034,
+"max_container": 2000,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"30056248": {
+"desc": "CHRISTMAS BUSH 3X13, 2 COLORS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"RIP12": {
+"desc": "12\"X5\" CLEAR RIPPLE CANDLE HOLDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"MESH-SG": {
+"desc": "MESH 10 YD ROLL -SAGE | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SC4-PINK": {
+"desc": "4\" SPEED COVER METTALIC PINK | 10-Piece per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"DC55-SV": {
+"desc": "5X5 DIMPLE SILVER CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 17.76,
+"cbm": 0.0302,
+"max_container": 2251,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"4022-09-09": {
+"desc": "7 1/4\" GINGER JAR | 9-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 24.97,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"25325": {
+"desc": "FORREST MOSS PR BULK 1564 IN FG [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 21.07,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4002-GD": {
+"desc": "CMC CUBE 4X4X4 ETCH GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"MESH-TURQ": {
+"desc": "MESH- TURQUOISE | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"PX20-G": {
+"desc": "GOLD MARKER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"R6265C": {
+"desc": "HANGING CRYSTAL CANDLEABRA ACCESSORY",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PY12-WH-MOM": {
+"desc": "12\" WHITE MUSICAL MOTHERS DAY PLUSH [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"27-12-13": {
+"desc": "GINGER VASE - RUBY - PACKED 24 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4110-09-09": {
+"desc": "8\" SMALL GATHERING VASE - CRYSTAL | 9-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CYL620-4": {
+"desc": "6\" X 20\" CYLINDER PACKED 4 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.32,
+"cbm": 0.0675,
+"max_container": 1007,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"9CHIF-100-IVO": {
+"desc": "1&1/2\" IVORY ORGANDY RIBBON 100YD",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"V440": {
+"desc": "16\" X 4\" PILSNER VASE PACKED 9",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"612-28-07": {
+"desc": "GARLAND CAGE WITH AF - GREEN - PACKED 28",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20.18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"2PVC-RED": {
+"desc": "2\" PACKING TAPE X 110 YARDS PK 36 (RED)",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.41,
+"cbm": 0.00075,
+"max_container": 90666,
+"vendor": "JIANGMEN NEWERA PACKING MATERIAL CO",
+"email": null,
+"country": "China",
+"city": "GUANGDONG 330300",
+"street": "LTD NO 1 JIAOXING WESTROADJIAO",
+"port": null,
+"lead": 0
+},
+"3600": {
+"desc": "1\" CANDLE STAKE | 12 Piece per Bag",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"B9-GWS": {
+"desc": "BALLOON 9\" GET WELL | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"BUNROSE-FU": {
+"desc": "BUNCH ROSE BOUQUET FUSCHIA | 18-Heads per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"3204-24-423": {
+"desc": "3 1/2\" JARDIN VINTAGE JAR - VINTAGE AMBER - PCK 24",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3204-24-426": {
+"desc": "3 1/2\" JARDIN VINTAGE JAR - VINTAGE GREEN - PCK 24",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40DWI-ORNG": {
+"desc": "2&1/2\" DELUXE WIRED SHEER ORANGE RIBBON | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RK1": {
+"desc": "STRAIGHT BLADE FOLDING KNIFE- RED HANDLE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"VW444": {
+"desc": "4x4 WHITE CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"11-12118": {
+"desc": "LETTER S - MIDNIGHT OASIS FOAM | 2 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"B230PU": {
+"desc": "8.5H X 1.75 BUD VASE PURPLE PK 48",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"SC8-PINK": {
+"desc": "8\" SPEED COVER METTALIC PINK | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R67B-AM": {
+"desc": "6\" AMBER BUBBLE BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"85-0005SV": {
+"desc": "POLY MESHROLL SILVER | 10-Yards per ROLL / 20-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MESH-BR": {
+"desc": "MESH- BROWN | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MIRR-RECT-L": {
+"desc": "16 X 12 RECTANGLE MIRROR GLASS CANDLE PLATE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.48,
+"cbm": 0.028,
+"max_container": 2428,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CARD-TEQUIERO": {
+"desc": "TE QUIERO | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PICK-XMAS-72": {
+"desc": "MERRY CHRISTMAS PICKS | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 18.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"C0614": {
+"desc": "6\" X 14\"H CYLINDER PK 4 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"AZ14": {
+"desc": "15\"X5\" VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 18.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"1444D-GD": {
+"desc": "4X4X4 GOLD DIMPLE CUBE PACKED 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"53880": {
+"desc": "CERAMIC SQUARE WEAVED BASKET 7X7X6 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"CMC-4089": {
+"desc": "CMC TPR REC 5HX8X4.5 WHITE, PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"REC4412-WAVE-WH": {
+"desc": "WHITE GLAZED CERAMIC POT 11.75X4X4 | 12 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 15.6,
+"cbm": 0.056,
+"max_container": 1214,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"35MM-RD": {
+"desc": "35MM RED GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"LET-B": {
+"desc": "LETTER - B | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"CERSUR-GD": {
+"desc": "11\" CERAMIC VASE GOLD | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"TL-6": {
+"desc": "MIRROR TEA LIGHT HOLDER X 6 | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.3,
+"cbm": 0.0019,
+"max_container": 35789,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"45-22321": {
+"desc": "OASIS PLAID LACED TIN 6 & 1/2\" 9/CS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"VSLANT-OR": {
+"desc": "12\" HT X 3.5\" OPN ORANGE SLANT VASE PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"VSLANT-PK": {
+"desc": "12\" HT X 3.5\" OPN PINK SLANT VASE PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"20LB": {
+"desc": "SOIL EARTHGRO | 20-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"ACR1-BK": {
+"desc": "ACRYLIC COLOR ROCKS BLACK | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.27,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"MIRR-SQ-GD-M": {
+"desc": "8\" SQUARE GOLD MIRROR GLASS CANDLE PLATE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 16.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"CYL816": {
+"desc": "8 X 16 CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 16.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"71778": {
+"desc": "CERAMIC VASE GOLD 19\"H X 10\"W [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"SCRIPT-NANA": {
+"desc": "GOLD WORD - NANA | 10-Piece per Pack / 10-Pack per Bundle",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"DC44-C": {
+"desc": "4X4 DIMPLE CLEAR CUBE PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"VP511": {
+"desc": "11 X 5\" VASE PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SOLBIKA SP ZOO",
+"email": "SOLBIKA@SOLBIKA.COM.PL",
+"country": "Poland",
+"city": "MAKOW UL LIPOWA",
+"street": "MAKOW, UL LIPOWA 84",
+"port": null,
+"lead": 150
+},
+"WOOD664-BR": {
+"desc": "6X6X4 WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"71779": {
+"desc": "CERAMIC VASE GOLD 11\"H X 16\"W [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 16.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"692-02-07": {
+"desc": "18\" PLASTIC BACK OPEN HEART | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 16.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"B9-YRSOSPCL": {
+"desc": "BALLOON 9\" YOU'RE SO SPECIAL PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"VPHV9-PK8": {
+"desc": "9\" X 7\" HURRICANE VASE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"G0420": {
+"desc": "19.5\" TALL PEDESTAL VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 15.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"MESH-BG": {
+"desc": "MESH -BURGANDY | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"FFP": {
+"desc": "FILLY FERN GREENING PINS | 5-Pounds per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.77,
+"cbm": 0.018,
+"max_container": 3777,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"0795": {
+"desc": "GOLD LEAF ELEGANT BOUQUET HOLDER | 4-Piece per BOX / 6-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 0,
+"first_cost": 6.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"PICK-STP": {
+"desc": "ST PATRICK DAY PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 0.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GL954": {
+"desc": "8\" X 3\" BUD VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.32,
+"cbm": 0.044,
+"max_container": 1545,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CURL-WH": {
+"desc": "3/16\" CURLING RIBBON WHITE | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-HOLGR": {
+"desc": "2&3/4\" POLY HOLIDAY GREEN RIBBON X 100 YARDS [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RCURL-BEI": {
+"desc": "3/16\" BEIGE CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"1555D-RED": {
+"desc": "5X5X5 RED DIMPLE CUBE PACKED 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"9BOW-GD": {
+"desc": "RIBBON 1&1/2\" PULL BOW GOLD | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"DC44-SV": {
+"desc": "4X4 DIMPLE SILVER CUBE PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"PINECONEX3": {
+"desc": "NATURAL PINE CONE X3 | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PY8-BUNNY": {
+"desc": "8\" BUNNY PLUSH [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"MM48": {
+"desc": "5 X 8\"H Milk Jug Vase/Clear PK 12",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 9.36,
+"cbm": 0.0465,
+"max_container": 1462,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"RBHO-A": {
+"desc": "BOUQUET HOLDER - SLANTED DISC 3.1\" x 7.5\" H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12,
+"cbm": 0.023,
+"max_container": 2956,
+"vendor": "TECNOFEN",
+"email": "VANESSA.SANTACRUZ@TECNOFEN.COM.MX",
+"country": "Mexico",
+"city": "SAN NATEO ATENCO",
+"street": "INDEPENDENCIA 1458, COL SAN ANTONIO",
+"port": null,
+"lead": 50
+},
+"BLING-BK": {
+"desc": "BLING WRAP - BLACK | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.11,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GEM3-AMB": {
+"desc": "GEMS AMBER | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"C941": {
+"desc": "9 3/4\" GATHERING VASE - CRYSTAL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-SPANISH": {
+"desc": "SPANISH GREETING CARDS- ASST | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"H1828": {
+"desc": "26\" MACHE BACK OPEN DOUBLE OASIS HEART | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 14.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CYL55-BK": {
+"desc": "5X5 GLASS BLACK CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.16,
+"cbm": 0.0343,
+"max_container": 1982,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"18PSTN-25": {
+"desc": "18\" NATURAL PLANT STAKES - PK 25 [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.28,
+"cbm": 0.00035,
+"max_container": 194285,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"CARE-ORCH": {
+"desc": "ORCHID CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RWAX-DELIGHT": {
+"desc": "WAX TISSUE DELIGHT 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"LET-T": {
+"desc": "LETTER - T | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"LET-W": {
+"desc": "LETTER - W | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"26184": {
+"desc": "METAL MIRROR VASE 24\"H X 6\"W | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 13.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"RWAX-WH": {
+"desc": "WAX TISSUE WHITE 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.38,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"B9-GRAD": {
+"desc": "BALLOON 9\" GRADUATION PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"SP28": {
+"desc": "1 3/4\" BANK PIN - 1/2 LB BOX/10 BOX PER SLEEVE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R68S2": {
+"desc": "WILLOW BASKET W/HARD LINER | 2-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"PL666-WH": {
+"desc": "6X6X6 WHITE PLASTIC CUBE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 9.6,
+"cbm": 0.029,
+"max_container": 2344,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"V612": {
+"desc": "12\" X 6\" CLARICE VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"WOOD555-BR": {
+"desc": "5X5X5 WOOD BOX | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"15475": {
+"desc": "3.5\" HT X 3.25 OPEN BABY BLOCK | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 12.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"LET-F": {
+"desc": "LETTER - F | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"PICK-GIRL": {
+"desc": "IT'S A GIRL PICKS | 12-Piece per Pack / 6-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"B18-HB": {
+"desc": "BALLOON 18\" HAPPY BIRTHDAY | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"HBASK-13": {
+"desc": "13\" HANGING BASKET W/ LINER | 2-Piece per SET / 12-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 5.48,
+"cbm": 0.0055,
+"max_container": 12363,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RROCKBK": {
+"desc": "BLACK RIVER ROCKS | 5-Pounds per Bag / 6-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.63,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"CYL66-ETCH-WH": {
+"desc": "6X6X6 CERAMIC ROUND POT 12/CASE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"SC10-SV": {
+"desc": "10\" SPEED COVER METTALIC SILVER | 25-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"G0416": {
+"desc": "15.5\" TALL PEDESTAL VASE PK 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"4NOABALL": {
+"desc": "4\" NETTED OASIS BALLS | 5-Piece per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 5,
+"first_cost": 11.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3SAT-MIN": {
+"desc": "3/4\" SATIN RIBBON MINT | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"1178": {
+"desc": "SET OF 3 GATHERING BASKET 12\",14\",17\" | 3-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 6.9,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"1043": {
+"desc": "12 1/2\" RING HOLDER 12 x 1.5 x 1.75H - 8.5\" INSIDE DIAMETER | 2-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 11.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"8QTMGS": {
+"desc": "8QT MIRACLE GROW POTTING MIX | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 23.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"16SAT-IVO": {
+"desc": "2&1/2\" SATIN RIBBON IVORY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 11.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"16SAT-WHI": {
+"desc": "2&1/2\" SATIN RIBBON WHITE | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 11.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"M88ORG": {
+"desc": "8\" X 4\" GATHERING VASE ORANGE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0.0422,
+"max_container": 1611,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL512-6": {
+"desc": "5\" X 12\" CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 6.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"90-0438GD": {
+"desc": "GLASS CHARGER PLATE W/ GOLD BEADING 12 1/2\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"B9-REDHRT": {
+"desc": "BALLOON 9\" RED HEART | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"ACR1-MIX": {
+"desc": "ACRYLIC COLOR ROCKS | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.09,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"HRT1-PK": {
+"desc": "HEART SHAPE ACRYLIC - PINK 1LB BAG [Bag]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.1,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"FV45": {
+"desc": "10\" X 5\" FLARED VASE PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"CURL-HPK": {
+"desc": "3/16\" CURLING RIBBON HOT PINK | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"A164": {
+"desc": "14\" X 5.5\" EDGE VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 10.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"100POLY": {
+"desc": "100'X36\" WIDE POLY AISLE RUNNER | 100-Feet per ROLL / 11-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 10.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R67B-RD": {
+"desc": "6\" RED BUBBLES BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"100SAT-LAV": {
+"desc": "4\" SATIN RIBBON LAVENDER | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 10.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"16SAT-LAV": {
+"desc": "2&1/2\" SATIN RIBBON LAVENDER | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 10.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30081099": {
+"desc": "BOXWOOD BUSH: SILVER, 5X17 INCHES | 16 pieces per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"R44-ETCH-SV": {
+"desc": "4X4X4 SQUARE ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 10.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"B9-GIRL": {
+"desc": "BALLOON 9\" IT'S A GIRL PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"B9-TY": {
+"desc": "BALLOON 9\" THANK YOU PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"EUC-BRO": {
+"desc": "EUCALYPTUS - BROWN | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"EUC-GRN": {
+"desc": "EUCALYPTUS - GREEN | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"S2503GR": {
+"desc": "18\" HOLLY BUSH GREEN 171 LEAVES | 12 Bunch per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CURL-BEAUT": {
+"desc": "3/16\" CURLING RIBBON BEAUTY | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MR8": {
+"desc": "MIRRORS 8\"x 8\", 12PC/PKG [PK]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"W102-BR": {
+"desc": "8\" ROUND HANDLED BASKET W/ LINER BROWN | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.8,
+"cbm": 0.0357,
+"max_container": 1904,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"9001SOV-DS": {
+"desc": "SET OF 3 OVAL HANDLED WILLOW BASKET 16\",14\",12\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 4.85,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"LET-H": {
+"desc": "LETTER - H | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"41129": {
+"desc": "12\"X3\" OPEN U-SHAPED VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 8.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAODING MODERN ARTS & CRAFTS IMP & EXP LTD.",
+"email": "SALES@BAODINGMODERN.COM",
+"country": "China",
+"city": "BAODING",
+"street": "RM#D301 TOMPO BUSINESS HOTEL NO.899",
+"port": "TIANJIN",
+"lead": 150
+},
+"X1980-AST": {
+"desc": "ASSORTED HOLIDAY PICKS ASST COLOR PK 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"CS110": {
+"desc": "2\"X2\"X6\" CRYSTAL BLOCK CANDLEHOLDER [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"200PKT": {
+"desc": "CHRYSAL CLASSIC 5 GRAM FLOWER FOOD | 200-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 200,
+"first_cost": 8.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHRYSAL USA INC.",
+"email": "INFO@CHRYSALUSA.COM",
+"country": "United States",
+"city": "MIAMI",
+"street": "3063 NW 107TH AVENUE",
+"port": null,
+"lead": 50
+},
+"RPBOW9-LAV": {
+"desc": "1 3/8\" LAVENDER PULL BOW | 25-Piece Per Bag / 10-Bags per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9DFS-LTBLU": {
+"desc": "#9 DOUBLE FACED SATIN - LIGHT BLUE | 50-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.34,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9DFS-SP": {
+"desc": "1-1/2\" 38MM DF SATIN SHOCKING PINK | 50-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.34,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"B9-BOY": {
+"desc": "BALLOON 9\" IT'S A BOY PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"B9-SMLE": {
+"desc": "BALLOON 9\" SMILE PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"B9-THNKGOFYOU": {
+"desc": "BALLOON 9\" THINKING OF YOU PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"CH-TS18-GD": {
+"desc": "18\" HT STICK CANDLEABRA- GOLD | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SHENZHEN MAVIS LIGHTING CO LTD",
+"email": null,
+"country": "China",
+"city": "GUANGDONG PROVINCE",
+"street": "508 HONGYUAN BUILDING BAOYUAN ROAD",
+"port": "QINGDAO",
+"lead": 150
+},
+"PY24-WH": {
+"desc": "24\" BEAR - WHITE COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"ABSP-LAV": {
+"desc": "ABSORBTION DYE LAVENDER | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"MA408-C": {
+"desc": "8\" X 4\" CYLINDER W/ GOLD RIM VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"SD12": {
+"desc": "12\" STYRO DISC | 1-Piece per Pack / 78-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION",
+"email": null,
+"country": "United States",
+"city": "Ludington",
+"street": "1 Longfellow",
+"port": null,
+"lead": 60
+},
+"ROCK-FLT-MED-BK": {
+"desc": "FLAT BLACK ROCKS 50-75MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.06,
+"cbm": 0.002,
+"max_container": 34000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"5BOW-HUNT": {
+"desc": "RIBBON 1\" PULL BOW HUNTER | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 7.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30083356": {
+"desc": "POINSETTIA PICK WITH PINECONES: RED 6\"X12\"| 1 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"MM55C": {
+"desc": "5X5X5 CLEAR CUBE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.92,
+"cbm": 0.026,
+"max_container": 2615,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL55-ETCH-WH": {
+"desc": "5X5X5 CERAMIC WHITE POT 12PC/CASE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"PICK-HMD-PK24": {
+"desc": "HAPPY MOTHERS DAY PICKS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"SC4-SILVER": {
+"desc": "4\" SPEED COVER METTALIC SILVER | 10-Piece per Pack / 25-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 0.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3NOABALL": {
+"desc": "3\" NETTED OASIS BALLS | 6-Piece per BAG / 10-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 6,
+"first_cost": 7.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"LFROCK-GR": {
+"desc": "LARGE FLAT ROCK 8-10CM [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.78,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"18PSTN-100": {
+"desc": "18\" NATURAL PLANT STAKES - PK 100 [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1,
+"cbm": 0.0014,
+"max_container": 48571,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"LDV": {
+"desc": "10\" LARGE WHITE DOVE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"RBIRD-LG": {
+"desc": "SMALL BIRDS 5.5\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"30080357": {
+"desc": "POINSETTIA GARLAND: RED GLITZ, 5\" X 72\" | 12 Piece per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"MPBRANCH-SV": {
+"desc": "PLASTIC BRANCHES SILVER | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GEM3-SV": {
+"desc": "GEMS SILVER | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 5.82,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"B9-HAN": {
+"desc": "BALLOON 9\" HAPPY ANNIVERSARY | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"HX1": {
+"desc": "PLASTIC TAPER HOLDER 1Inch | 36 PER BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 5.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"HX3": {
+"desc": "PLASTIC PILLAR HOLDER -8PC PER BAG [Bag]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-BLACBER": {
+"desc": "SPRAY DYE BLACKBERRY | 12-Oz. per Pack / 4-Pack per Case",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 5.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"WDISC-2": {
+"desc": "WOOD DISCS | 2-Piece Per Set / 12 Sets Per Box",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 2.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"PY16-DBR": {
+"desc": "16\" DARK BROWN PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"B9-ILY": {
+"desc": "BALLOON 9\" I LOVE YOU | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"RPBOW9-PK": {
+"desc": "1 3/8\" PINK PULL BOW | 25-Piece Per Bag / 10-Bags per Case",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-DPBLU": {
+"desc": "SPRAY DYE DEEP BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"PICK-GWS": {
+"desc": "GET WELL SOON PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"6NOABALL": {
+"desc": "6\" NETTED OASIS BALLS | 2-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 5.11,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"Z83-BL": {
+"desc": "SMALL BLUE PEDESTAL BOWL | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 5.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"BIRD-PEA": {
+"desc": "PEACOCK BIRD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JILIN XIECHENG IMP & EXP TRADE CO",
+"email": null,
+"country": "China",
+"city": "CHANG CHUN",
+"street": "707 NO 6-2 HAIKOU ROAD",
+"port": null,
+"lead": 0
+},
+"PY12-WH": {
+"desc": "12\" WHITE BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"DS-901-102": {
+"desc": "BERRY SPRAY - 35 BERRIES - METALLIC SILVER | 12 Pieces per Pack/ 3 Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"8CANDORG": {
+"desc": "8\" CANDLES ORANGE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"RTUL6-PK": {
+"desc": "TULLE 6\" PINK | 25-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 0.37,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"803": {
+"desc": "5.5\" LARGE HOT MELT GLUE PAN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.67,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FPC CORP., DIANE CALLAHAN EXT 249",
+"email": null,
+"country": "United States",
+"city": "WAUCONDA",
+"street": "355 HOLLOW HILL DRIVE",
+"port": null,
+"lead": 50
+},
+"PY18-TAN": {
+"desc": "18\" WILLIE BEAR W/ LOVE HEART- TAN COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"40PO-AZA": {
+"desc": "2&3/4\" POLY AZALEA RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MPRL-IV": {
+"desc": "PEARLS MEDIUM 20MM | 1-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"31-01561": {
+"desc": "OASIS HOT MELT GLUE | 16-Oz. per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 4.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GEM6-CL": {
+"desc": "GEMS CLEAR 12MM | 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.09,
+"cbm": 0.0034,
+"max_container": 20000,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"7460-WH": {
+"desc": "5\" LED LIGHT BALL, 100 LIGHTS | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"CER-PLT-1161": {
+"desc": "GREY/WHITE 2 TONE PLANTER | 2-Piece per SET / 4-SET per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 2.58,
+"cbm": 0.015,
+"max_container": 4533,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"XSNOW": {
+"desc": "SNOW SPRAY | 13-Oz. per CAN",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"CQUARTZ-CRY": {
+"desc": "CRUSHED QUARTZ - CLEAR | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"50R": {
+"desc": "SMALL CRUSIFIX ROSARY- 50 BEAD | 1-Piece Per Pack / 20-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.99,
+"cbm": 0.0017,
+"max_container": 40000,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"40SAT-FORE": {
+"desc": "2&3/4\" SATIN RIBBON FOREVER YOUR | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SP-MINBLU": {
+"desc": "SPRAY DYE MINERAL BLUE | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"USEDEASEL-48": {
+"desc": "USED EASELS 48\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"TS72-IV": {
+"desc": "TABLE SKIRT 72\" X 30\" - IVORY [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"6869": {
+"desc": "SMALL BUTTERFLIES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"75-1114": {
+"desc": "SMALL LED LIGHT BASE [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"S13691RD": {
+"desc": "20\" RED POINSETTIA BUSH [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"30084921": {
+"desc": "CHRISTMAS TREE PICK WHITE 3\" x 11\" | 144 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X1252": {
+"desc": "7\" BERRY PICK PK 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"SFC": {
+"desc": "SILK FLOWER CLEANER [Can] | 1-Piece per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": 1,
+"first_cost": 3.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"40PO-HOTPIN": {
+"desc": "2&3/4\" POLY HOT PINK RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SROLL": {
+"desc": "SHEET MOSS ON ROLL 18\" | 48-Inches per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GEM3-RD": {
+"desc": "GEMS RED | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"CAND12-WH-12": {
+"desc": "12\" WHITE TAPERS | 12-Piece Per Pack / 12-Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.23,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "LIGHTING STAR CRAFTS DL CO LTD",
+"email": "s-julia@lightingstar.org",
+"country": "China",
+"city": "Dalian, China",
+"street": "No. 31-1, Caixiayuan,",
+"port": "CAI MEP - VIETNAM",
+"lead": 150
+},
+"BTUL-YEL": {
+"desc": "TULIP LT ORANGE - YELLOW | 9-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.5,
+"cbm": 0.0015,
+"max_container": 45333,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"SAND-GR": {
+"desc": "GREEN SAND | 5-Pounds per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0.0062,
+"max_container": 10967,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"HRT3-PK": {
+"desc": "HEART SHAPE ACRYLIC - PINK | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BOUT-BLK": {
+"desc": "1 1/2\" BLACK BOUT PIN | 100-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 3.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"GEM1-RD": {
+"desc": "GEMS RED | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.42,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"MESH-FUS": {
+"desc": "MESH- FUSCIA | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"S7401-RD": {
+"desc": "GARDENT ROSE BUD | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"GEM1-CL": {
+"desc": "GEMS CLEAR | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.28,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"CURL-MIN": {
+"desc": "3/16\" CURLING RIBBON MINT | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"TUL54-WH": {
+"desc": "54\" TULLE - WHITE | 40-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"DS-6006-54": {
+"desc": "CHRISTMAS HOLLY BERRY BUSH: 12.5 INCHES | 36 Per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"15PSTN-25": {
+"desc": "15\" PLANT STAKES NATURAL | 25-Piece Per Bundle / 100-Pack per Case",
+"unit": "Bundle",
+"qty_per_unit": 25,
+"first_cost": 0.25,
+"cbm": 0.00018,
+"max_container": 377777,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PY12-TAN": {
+"desc": "12\" WILLIE BEAR W/ LOVE HEART- TAN COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"2RP": {
+"desc": "2\" ROUND PEARL PIN | 144-Piece per Pack / 10-Pack per Sleeve",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 2.49,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BLING-GD": {
+"desc": "BLING WRAP - GOLD | 10-Yards per ROLL / 24-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.17,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GEM1-AMB": {
+"desc": "GEMS AMBER | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.1,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"TL-4": {
+"desc": "MIRROR TEA LIGHT HOLDER X 4 | 1-Piece per Pack / 36-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.3,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"GEM1-SV": {
+"desc": "GEMS SILVER | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.26,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"3CHIF-100-RD": {
+"desc": "5/8\" RED ORGANDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.34,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"SPRL-BK": {
+"desc": "PEARLS SMALL 12MM | 1-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"3293-24-09": {
+"desc": "6 1/2\" JARDIN VINTAGE JAR -CRYSTAL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 22.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PY8-BR": {
+"desc": "8\" BROWN COLOR PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"BELLCUP": {
+"desc": "BELL CUPS | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 2.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"RBFLY-3": {
+"desc": "COLORED BUTTERFLY 3\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"86PCE-FH": {
+"desc": "8\" FOLDING HANDLE WICKER BASKET [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.65,
+"cbm": 0.0035,
+"max_container": 19428,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"B9-CNGRTS": {
+"desc": "BALLOON 9\" CONGRATULATIONS PACKED 10 [BOX] | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"B18-MOTHER": {
+"desc": "BALLOON 18\" MOTHER DAY | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 1.97,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"B9-MOTH": {
+"desc": "BALLOON 9\" MOTHERS DAY | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"RPETAL-SV": {
+"desc": "ROSE PETALS SILVER | 1000-Piece per BAG / 25-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 1000,
+"first_cost": 1.76,
+"cbm": 0.0012,
+"max_container": 56666,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"PICK-SEC": {
+"desc": "SECRETARY PICK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"40SOFT-YE": {
+"desc": "2 3/4\" SOFTIQUE RIBBON YELLOW | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"99-0018": {
+"desc": "BALLOON STICKS 16\" | 144-Piece per BAG / 48-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 144,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"4098-24-09": {
+"desc": "9\" BUD VASE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 16.83,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"800-PK": {
+"desc": "CHENILLE STEMS PINK | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"800-ROY": {
+"desc": "CHENILLE STEMS ROYAL | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"MRBL": {
+"desc": "MARBLES CLEAR | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.26,
+"cbm": 0.003,
+"max_container": 22666,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GEM1-BL": {
+"desc": "GEMS BLUE | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.42,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GEM1-LAV": {
+"desc": "GEMS LAVENDER | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.42,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"DROUTE": {
+"desc": "DRIVER ROUTE PAD | 5-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MULTI PACKAGING SOLUTIONS",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "75 REMITTANCE DRIVE",
+"port": null,
+"lead": 50
+},
+"TL-2": {
+"desc": "MIRROR TEA LIGHT HOLDER X 2 | 1-Piece per Pack / 48-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.3,
+"cbm": 0.0006,
+"max_container": 113333,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"GEM1-BK": {
+"desc": "GEMS BLACK | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.15,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"ACR1-BL": {
+"desc": "ACRYLIC COLOR ROCKS BLUE | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.05,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"X1057GR": {
+"desc": "13\" EMERALD FERN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"800-BK": {
+"desc": "CHENILLE STEMS BLACK | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"PICK-HMDHEART": {
+"desc": "HAPPY MOTHERS DAY HEART PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"GL-SHADE": {
+"desc": "GLASS SHADES | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"800-GD": {
+"desc": "CHENILLE STEMS GOLD PACKED 100 [Box]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"800-SV": {
+"desc": "CHENILLE STEMS SILVER | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"PY6-BR": {
+"desc": "6\" BROWN BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY6-TAN": {
+"desc": "6\" TAN BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"USEDBS": {
+"desc": "USED BASKET STANDS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"WCB-13": {
+"desc": "12\" WILLOW BASKET | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"90-0268": {
+"desc": "GLASS BUBBLE FISJH BOWL 4 1/2\" -PK 18",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"B9-CHRSTMS": {
+"desc": "BALLOON 9\" CHRISTMAS PACKED 10 [BOX]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"3X3PILL-IV": {
+"desc": "3X3 PILLAR CANDLES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"3012-BK": {
+"desc": "CERAMIC DISH GARDEN 7X2.75 BLACK [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CARD-JBC": {
+"desc": "JUST BECAUSE | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-VDA": {
+"desc": "VALENTINES DAY | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"R385": {
+"desc": "10\" ARRANGMENT BASKET PK 24 [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"STPL-R": {
+"desc": "STANDARD STAPLES- RAPID BRAND | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CARD-FAT": {
+"desc": "FATHER'S DAY | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 0.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BUNHOLLY-GRWH": {
+"desc": "GREEN/WHITE HOLLY BERRY BUSH 21LVS [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.54,
+"cbm": 0.00061,
+"max_container": 111475,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"ROCK-LRG-LT": {
+"desc": "LARGE LIGHT COLORED ROCKS 15-25MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"TUL-IV": {
+"desc": "TULLE 6\" IVORY | 25-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"SC8-GD": {
+"desc": "8\" SPEED COVER METTALIC GOLD | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 5.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BUNHOLLY-GR": {
+"desc": "GREEN HOLLY BERRY BUSH 21LVS [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.43,
+"cbm": 0.00061,
+"max_container": 111475,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"18PST-25": {
+"desc": "18\" PLANT STAKES | 25-Piece per BUNDLE / 100-BUNDLE per Case",
+"unit": "Bundle",
+"qty_per_unit": 25,
+"first_cost": 0.28,
+"cbm": 0.00035,
+"max_container": 194285,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"BELLCUP-BULK": {
+"desc": "BELL CUPS BULK | 200-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"10-00127": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"1000PKT-SM": {
+"desc": "CRYSTAL CLEAR 300- 1000PKT",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHRYSAL USA INC.",
+"email": "INFO@CHRYSALUSA.COM",
+"country": "United States",
+"city": "MIAMI",
+"street": "3063 NW 107TH AVENUE",
+"port": null,
+"lead": 50
+},
+"1045": {
+"desc": "10 1/2\" DESIGN RING | 2-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 6.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"10942": {
+"desc": "MATTE WHITE CYLINDER 5\"x5\"x5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"10952": {
+"desc": "MATTE WHITE CUBE 5\"x5\"x5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"10953": {
+"desc": "MATTE BLACK CUBE 5\"x5\"x5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"10CANDIVR": {
+"desc": "10\" CANDLES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"10CANDRED": {
+"desc": "10\" CANDLES RED - PACKED 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"10CANDWH": {
+"desc": "10\" CANDLES WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 4.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"11075": {
+"desc": "CERAMIC LOW RECTANGLE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"11080": {
+"desc": "CERAMIC RECTANGLE WAVE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"11082": {
+"desc": "CERAMIC WIDE RECTANGLE WAVE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"11087": {
+"desc": "CERAMIC RECTANGLE MATTE WHITE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"11090": {
+"desc": "GINGHAM WHITE RECTANGLE 9.00\"x 5.00\"x 6.00\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"11095": {
+"desc": "CERAMIC HEXAGON POT MATTE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 14.02,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"11401": {
+"desc": "AL GOLD VASE 40 in H X 7.5 in| 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 47,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"11499": {
+"desc": "ALUMN GOLD TREE SMALL| 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 46.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"1180-SV": {
+"desc": "GLITTER SILVER | 1-Pounds per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"12773": {
+"desc": "13\"H x 4\" CERAMIC VASE EMBOSSED-GLOSS WHITE BLACK EDGES | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"12CANDBL": {
+"desc": "12\" CANDLES BLUE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"12CANDIV": {
+"desc": "12\" CANDLES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 5.22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"15275": {
+"desc": "10.5\"X5.50\"X5.50\"H CERAMIC OVAL POT W/BRUSHED LAYERED DESIGN-MATTE WHITE FINISH| 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"15300": {
+"desc": "6\"X10.25\"H CERAMIC ROUND VASE W/EMBOSSED SPIRAL DESIGN-MATTE WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"15329": {
+"desc": "3.75\"x9.25\"H CERAMIC RECTANGLE POT W/PATTERN DESIGN-MATTE WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 41.67,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"15600": {
+"desc": "CERAMIC TREE BRANCH 9X2.5X5 | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"15639": {
+"desc": "4.75\"X10.25\"H CERAMIC ROUND BELLIED VASE-MATTE WHITE| 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"15714": {
+"desc": "4.25\"x10\"H CERAMIC VASE-MATTE WHITE| 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 40,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"15CANDRED": {
+"desc": "15\" CANDLES RED | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"15PSTN-100": {
+"desc": "15\" PLANT STAKES NATURAL - PK 100 [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"16QT": {
+"desc": "MIRACLE GROW POTTING MIX | 16-QT per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 5.05,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ARETT SALES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "PITTSBURGH",
+"street": "PO BOX 536608",
+"port": null,
+"lead": 50
+},
+"170-12-22": {
+"desc": "THE VERSATILE 9\" CONTAINER - WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 27.66,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"18-0001": {
+"desc": "GLUE STICKS 10\" | 2.2-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"18FR-PIN": {
+"desc": "18 FILLED PINK ROSARY | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"18FR-RED": {
+"desc": "18 FILLED RED ROSARY | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"20-12-405": {
+"desc": "SWEETHEART VASE - YELLOW | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 23.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"20-24-406": {
+"desc": "SWEETHEART VASE - SEASIDE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 23.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"2000PKT": {
+"desc": "CHRYSAL 5 GRAM FLOWER FOOD | 2000-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2000,
+"first_cost": 56.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHRYSAL USA INC.",
+"email": "INFO@CHRYSALUSA.COM",
+"country": "United States",
+"city": "MIAMI",
+"street": "3063 NW 107TH AVENUE",
+"port": null,
+"lead": 50
+},
+"21103": {
+"desc": "WHITE ALUM CANDLEABRA 32 IN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"21112": {
+"desc": "Gold Aluminum tree candleabra 36\"Hx26\"W | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 100,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"21113": {
+"desc": "Nickle Aluminum tree candleabra 36\"Hx26\"W | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 90,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"2165SV": {
+"desc": "16\" X 5\" SILVER ANTIQUE PILSNER VASE - PACKED 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 59.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"21678": {
+"desc": "4.5\" GOLD TEXTURED CYLINDER PLANTER| 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"21710": {
+"desc": "REINDEER MOSS PR BULK FS | 3-Pounds per BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 25.03,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"22011": {
+"desc": "METAL GLD PEDSTL BWL 8 in | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 9.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "S.N.K. ENTERPISES, INC.",
+"email": "SNKENT@SBCGLOBAL.NET",
+"country": "United States",
+"city": "Chesterfield",
+"street": null,
+"port": null,
+"lead": 50
+},
+"2325": {
+"desc": "32H X 5 CLEAR PILSNER VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"24CUT": {
+"desc": "24\" SERRATED ALL IN ONE CUTTER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 32.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BULMAN PRODUCTS INC.",
+"email": null,
+"country": "United States",
+"city": "GRAND RAPIDS",
+"street": "1650 MCREYNOLDS AVE NW",
+"port": null,
+"lead": 50
+},
+"24GSTY": {
+"desc": "2X24X36 GREEN STYROFOAM BOARD | 5-Piece per Pack / 2-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 5,
+"first_cost": 54.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION",
+"email": null,
+"country": "United States",
+"city": "Ludington",
+"street": "1 Longfellow",
+"port": null,
+"lead": 60
+},
+"24PST-25": {
+"desc": "24\" PLANT STAKES - PK 25 [Bun]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.33,
+"cbm": 0.00048,
+"max_container": 141666,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"25-0228IV": {
+"desc": "SILK FLOWER KISSING BALL 6\", IVORY | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 38.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0228LA": {
+"desc": "SILK FLOWER KISSING BALL 6\", LAVENDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 33.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0228WH": {
+"desc": "SILK FLOWER KISSING BALL 6\", WHITE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 38.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0229IV": {
+"desc": "SILK FLOWER KISSING BALL 10\", IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0229WH": {
+"desc": "SILK FLOWER KISSING BALL 10\", WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0233PU": {
+"desc": "50\" PHALAENOPSIS ORCHIDS PUPLE | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0288": {
+"desc": "IVY EXPANDABLE FENCE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 134,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0296WH": {
+"desc": "6 1/2\" FOAM FLOWER BALLS WHITE PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25-0308": {
+"desc": "SUCCULENTS STEM",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"25151": {
+"desc": "REINDEER MOSS PR BULK MA | 3-Pounds per BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 26.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"30-56201": {
+"desc": "SPRAY COLOUR 24K GOLD METALLIC PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 31.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3012-SET-BK": {
+"desc": "SET OF 2 PLANTERS 7.5\" & 9.5\" | 2-Piece Per Set / 3-Set Per Case",
+"unit": "Set",
+"qty_per_unit": 2,
+"first_cost": 3.2,
+"cbm": 0.0145,
+"max_container": 4689,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"30X5": {
+"desc": "30X5 WHITE ROSE BOXES | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 38.43,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"31-24-04": {
+"desc": "JARDINIERE - BLACK | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 38.61,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"31-24-406": {
+"desc": "4 1/2\" JARDINIERE - SEASIDE PASTEL | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 22.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"31884": {
+"desc": "3.25\"x10.75\"H CERAMIC ROUND VASE W/EMBOSSED WAVY STRIPES-MATTE WHITE| 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"35MM-GR": {
+"desc": "35MM GREEN GLASS BALLS | 72-Balls per Box",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 7.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"3CHIF-100-WH": {
+"desc": "5/8\" WHITE ORGANDY RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"3CHIF-IVO": {
+"desc": "1/2\" IVORY CHIFFON RIBBON X 25YD [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MOREX RIBBON",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"3SAT-BURG": {
+"desc": "3/4\" SATIN RIBBON BURGUNDY | 100-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"3X6PILL-GD": {
+"desc": "3X6 GOLD PILLARS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 43.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"4001-SV": {
+"desc": "6X6X6 ETCH SILVER CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 23.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"4036-12-09": {
+"desc": "8 X 4 3/4\" CLASSIC URN VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"40AQ-WH": {
+"desc": "2 1/2\" AQUA SATIN WHITE [Roll]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.19,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"40DAZG": {
+"desc": "#40 DAZZLE - GOLD X 22 YARD PER ROLL [Roll] | 1 per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40MM-RD": {
+"desc": "40MM RED GLASS BALLS PK 48 PER BOX [Box]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"40PB-RWB": {
+"desc": "2 1/2\" PRINTED POLY RED/WHITE/BLUE PATTERN | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-BR": {
+"desc": "2&3/4\" POLY BROWN RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-LTBLU": {
+"desc": "2&3/4\" POLY LIGHT BLUE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-NVBLU": {
+"desc": "2&3/4\" POLY SATIN NAVY BLUE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-ORA": {
+"desc": "2&3/4\" POLY SATIN ORANGE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-PIC": {
+"desc": "2&3/4\" POLY SATIN PICARDY RIBBON X 100 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-SV": {
+"desc": "2&3/4\" POLY SATIN SILVER RIBBON X 100 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-TURQ": {
+"desc": "2&3/4\" POLY SATIN TURQUIOSE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40PO-WH": {
+"desc": "2&3/4\" POLY SATIN WHITE RIBBON | 100-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.59,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40SOFT-BL": {
+"desc": "2 3/4\" SOFTIQUE RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.79,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"40SOFT-PINK": {
+"desc": "2 3/4\" SOFTIQUE RIBBON X 100YD- PINK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"40VGB1-RD": {
+"desc": "2 1/2\" VELVET GOLD BACK RED RIB X 100YD",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40WIRED-GD-TAJ": {
+"desc": "2 1/2\" WIRED GOLD SILK | 10-Yards per ROLL | 1 Roll per pack",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40WIREDMET-GD": {
+"desc": "2 1/2\" GOLD METALLIC WIRED | 25-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.75,
+"cbm": 0.0026,
+"max_container": 26153,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"42-.0011WH": {
+"desc": "LACE GLOVES (KID'S SIZE) 6 1/2\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"45-22154": {
+"desc": "8 1/2\" CERAMIC TREE RECTANGLE - GRAY 6PK/CS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"45-22324": {
+"desc": "OASIS TARTAN INLAY TIN 6-12\" 9/CS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"45-72708": {
+"desc": "9\" HURRICANE VASE, APPLE GREEN ICE - PK 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"4OABALL": {
+"desc": "4\" OASIS BALLS | 5-Piece per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 5,
+"first_cost": 10.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"50MM-AST": {
+"desc": "50MM ASST GLASS BALLS PK 24 PER BOX [Box]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"51419": {
+"desc": "CERAMIC TALL OVAL VASE 11X5.25X9\"HT | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "URBAN TRENDS COLLECTION",
+"email": null,
+"country": "United States",
+"city": "VERNON",
+"street": "2652 EAST 45TH STREET",
+"port": null,
+"lead": 50
+},
+"5705-WH": {
+"desc": "2\" ROUND PEARL PIN - PK 144/10 BX PER SLEEVE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5865-ASS": {
+"desc": "2.5\" FEATHER BUTTERFLIES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"5866-ASST": {
+"desc": "2.5\" FEATHER BUTTERFLY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"5886-ASS": {
+"desc": "5\" FEATHER BUTTERFLIES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"59780": {
+"desc": "CERAMIC GOLD CANDLEHOLDER | 3-Piece per SET",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"5BOW-CIT": {
+"desc": "RIBBON 1\" PULL BOW CITRUS | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 8.17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5BOW-LAV": {
+"desc": "RIBBON 1\" PULL BOW LAVENDER | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 8.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5BOW-MGLD": {
+"desc": "RIBBON 1&1/2\" PULL BOW METALLIC GOLD | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5BOW-YEL": {
+"desc": "RIBBON 1\" PULL BOW YELLOW | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 23.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5NUM": {
+"desc": "NUMBER 5 | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 0.21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"6020-10-07": {
+"desc": "FILLER STICK- GREEN-AQUA FOAM-10 CUB FT | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 27.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"65298": {
+"desc": "CERAMIC LACQUER VASE 19\"H X 7\"W | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 12.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"7-582GLS": {
+"desc": "X-CLEAR CNDL GLASS CYLINDER 3.375X6 | 1-Piece per Pack / 18-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HILLS IMPORTS INC",
+"email": null,
+"country": "United States",
+"city": "QUAKERTOWN",
+"street": "675 CALIFORNIA ROAD",
+"port": null,
+"lead": 50
+},
+"7241-SIL": {
+"desc": "ACRYLIC CHANDELIER, 8.75\"(D) X 10.5\"(H\") | 1-Piece per Pack / 24-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"73-48-22": {
+"desc": "SINGLE DESIGN BOWL WHITE | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 10.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"74-0107GD": {
+"desc": "CANDELABRA 5 ARM CANDLE HOLDER 60 1/2\" GOLD | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 48.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"75-0141BG": {
+"desc": "PLASTIC SOFT GRAPES BURGANDY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"75-0141BK": {
+"desc": "PLASTIC SOFT GRAPES BLACK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"75-0141GR": {
+"desc": "PLASTIC SOFT GRAPES GREEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"75-0800WH": {
+"desc": "11\" MINIATURE LACE UMBRELLA | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"75-0903BK": {
+"desc": "VELCRO HOOK AND LOOP WITH ADHESIVE BACK, BLACK | 1-Bag per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"75-1228": {
+"desc": "FLASHING BOWL LED 14 OZ | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 55.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"7706N": {
+"desc": "6\" OASIS NETTED SPHERE 2/BG, 10/CS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 77.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"81-06-175": {
+"desc": "9 1/2\" DESIGNER URN ANTIQUE BRASS | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 34.98,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"81-06-22": {
+"desc": "9 1/2\" DESIGNER URN - WHITE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 30.35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"82-03035": {
+"desc": "CRYSTAL CLEAR, SACHETS 1PT | 200-Piece per BOX / 6-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 200,
+"first_cost": 7.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"82-03053": {
+"desc": "FLOWER FOOD 300 | 5-Pounds per Bottle / 6-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 9.27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"85-0005PK": {
+"desc": "POLY MESHROLL PINK | 10-Yards per ROLL / 20-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"85-0005RD": {
+"desc": "POLY MESHROLL RED | 10-Yards per ROLL / 20-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"85-0005WH": {
+"desc": "POLY MESHROLL WHITE | 10-Yards per ROLL / 20-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"85-0005YEL": {
+"desc": "POLY MESHROLL YELLOW 10YD PK 20R/CS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"85-0006RG": {
+"desc": "MESH 10YD RED GREEN STRIPE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"8566-CO": {
+"desc": "6\" SILK ROSE BALL, CORAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"8566-FS": {
+"desc": "6\" SILK ROSE BALL, FUCHSIA | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"8566-PK": {
+"desc": "6\" SILK ROSE BALL, PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"8571-FS": {
+"desc": "7\" SILK HYDRANGEA BALLS, FUCHSIA | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"8571-PK": {
+"desc": "6\" SILK HYDRANGEA BALLS, PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"8571-WH": {
+"desc": "6\" SILK HYDRANGEA BALLS, WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"8573-WH": {
+"desc": "11\" SILK HYDRANGEA BALLS, WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 55.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"87219": {
+"desc": "MIRROR VASE 16\"H X 6\"W | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 11.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"87238": {
+"desc": "MIRROR CANDLE HOLDER 10\"H X 7\"W [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"8CANDYEL": {
+"desc": "8\" CANDLES YELLOW PACKED 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CANDLE ARTISANS, INC",
+"email": null,
+"country": "United States",
+"city": "WASHINGTON",
+"street": "253 e washington avenue",
+"port": null,
+"lead": 50
+},
+"8HPC-BS": {
+"desc": "8\" HARD WICKER POT COVER - BAMBOO | 12-Piece per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.76,
+"cbm": 0.0588,
+"max_container": 1156,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"8NOABALL": {
+"desc": "8\" NETTED OASIS BALLS | 1-Piece per BAG / 9-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 1,
+"first_cost": 10.41,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9-176/1-GD": {
+"desc": "6\" GOLD BEADED BALL W/HANGER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"9-176/1-SV": {
+"desc": "6\" SILVER BEADED BALL W/HANGER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 37.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"9-177/1-GD": {
+"desc": "8\" GOLD BEADED BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 60,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"9-177/1-SL": {
+"desc": "8\" SILVER BEADED BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"90-0638": {
+"desc": "7\" GLASS DOME BOWL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"9001OV-HS": {
+"desc": "SET OF 3 OVAL HANDLED WILLOW BASKET 18\",16\",14\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.05,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"9002SRD-HS": {
+"desc": "SET OF 3 ROUND HANDLED WILLOW BASKET 16\",14\",12\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 4.85,
+"cbm": 0.0335,
+"max_container": 2029,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"9003SRE-DS": {
+"desc": "SET OF 3 RECTAN HANDLED WILLOW BASKET 16\",14\",12\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.53,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"9003SRE-WW": {
+"desc": "SET OF 3 RECTAN HANDLED WILLOW BASKET 16\",14\",12\" | 3-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 3,
+"first_cost": 5.53,
+"cbm": 0.032,
+"max_container": 2125,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"92588": {
+"desc": "CERAMIC VASE THREE ASSORTED 12\"H X 3\"W | 18-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 18,
+"first_cost": 70,
+"cbm": 0,
+"max_container": 0,
+"vendor": "UMA ENTERPRISES INC.",
+"email": null,
+"country": "United States",
+"city": "COLUMBUS",
+"street": "LOCKBOX # 3878",
+"port": null,
+"lead": 50
+},
+"99-0023": {
+"desc": "BALLOON CUPS CLEAR | 12-Piece per BAG / 48-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": 12,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"9BOW-EME": {
+"desc": "RIBBON 1&1/2\" PULL EMERALD | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BOW-HPK": {
+"desc": "RIBBON 1&1/2\" PULL BOW HOT PINK PACKED 50 PER BOX",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BOW-LIME": {
+"desc": "RIBBON 1&1/2\" PULL BOW LIME | 50-Piece per BOX",
+"unit": "Box",
+"qty_per_unit": 50,
+"first_cost": 12.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9BRAN-WH": {
+"desc": "9FT WHITE TWIGGS 10 PER BUN",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"9DAZG": {
+"desc": "#9 DAZZLE - GOLD | 22-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"9DAZS": {
+"desc": "#9 DAZZLE - SILVER | 22-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "KY RIBBON - GEMLUX ENTERPRISE CO LTD",
+"email": null,
+"country": "Taiwan",
+"city": "TAICHUNG CITY - TAIWAN",
+"street": "3F NO 292 SEC 2 CHONGDE 2ND RD",
+"port": null,
+"lead": 150
+},
+"9DFS-BK": {
+"desc": "1-1/2\" 38MM DF SATIN BLACK | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.94,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9DFS-HPK": {
+"desc": "1-1/2\" 38MM DF SATIN HOT PINK | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.94,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9DFS-LEM": {
+"desc": "1-1/2\" 38MM DF SATIN LEMON | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 8.34,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9DFS-LTP": {
+"desc": "1-1/2\" 38MM DF SATIN LT. PINK | 50-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.34,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9DFS-ORC": {
+"desc": "#9 DOUBLE FACED SATIN - ORCHID | 50-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9DFS-PK": {
+"desc": "#9 DOUBLE FACED SATIN -PINK | 50-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.94,
+"cbm": 0.00097,
+"max_container": 70103,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9DFSW": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "MOREX RIBBON, ROBERT ROGOFF",
+"email": null,
+"country": "United States",
+"city": "BALTIMORE",
+"street": "PO BOX 64446",
+"port": null,
+"lead": 50
+},
+"9PB-VAL": {
+"desc": "1 1/2\" PRINTED POLY VALENTINES PATTERN - 50 YDS PER ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.31,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9PO-AZA": {
+"desc": "1&1/2\" POLY SATIN AZALEA RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9PO-FUS": {
+"desc": "1&1/2\" POLY FUSCIA RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9PO-PEA": {
+"desc": "1&1/2\" POLY PEACH RIBBON | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"9SOFT-BL": {
+"desc": "1 1/2\" SOFTIQUE RIBBON BLUE | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"9SOFT-LAV": {
+"desc": "1 1/2\" SOFTIQUE RIBBON LAVENDER | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"9SOFT-WH": {
+"desc": "1 1/2\" SOFTIQUE RIBBON WHITE | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"9SOFT-YEL": {
+"desc": "1 1/2\" SOFTIQUE RIBBON YELLOW | 100-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"A162": {
+"desc": "EDGE VASE 6X2.5 X 9H X 10D PK 8",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 30.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"ABSP-DBLU": {
+"desc": "ABSORBTION DYE DEEP BLUE | 4-Oz. per BOTTLE / 6-BOTTLE per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 7.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"ACR3-RD": {
+"desc": "ACRYLIC COLOR ROCKS RED | 3-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.09,
+"cbm": 0.00335,
+"max_container": 20298,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"AMAZON FEES": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AMAZON-GROSS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AMZCYL44-PF": {
+"desc": "4X4X4 CYLINDER PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZCYL507-PF": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZCYL88-6": {
+"desc": "8X8X8 GLASS CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 16.2,
+"cbm": 0.08,
+"max_container": 850,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZCYL88-PF-4": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": "QINGDAO",
+"lead": 150
+},
+"AMZFCAND3-IV": {
+"desc": "3\" FLOATING CANDLE - IVORY | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 28.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"AMZFCAND3-IV-24": {
+"desc": "3\" FLOATING CANDLE - IVORY | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 9.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"AMZMCGTAPERED": {
+"desc": "13.5\" CLEAR TAPERED VASE - PACKED 6 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 23.4,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"AMZR55-M": {
+"desc": "5X5X5 DESIGNER MIRROR CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 28,
+"cbm": 0.04,
+"max_container": 1700,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"B0194-90": {
+"desc": "7 X 7 X 36\" WHITE EVENT VASE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 30.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ABC GLASS INC",
+"email": "mark168178@gmail.com",
+"country": "United States",
+"city": "NORCROSS",
+"street": "6900 PEACHTREE INDUSTRIAL BLVD",
+"port": null,
+"lead": 50
+},
+"B9-EASTER": {
+"desc": "BALLOON 9\" EASTER | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"BHOX": {
+"desc": "LOMEY XL BOUQ HOLDER | 9-Piece per Pack / 8-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 9,
+"first_cost": 15.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BHYD-CR": {
+"desc": "SILK HYDRANGEA CREAM/PINK | 5-Heads per Bunch/ 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BHYD-MINT": {
+"desc": "SILK HYDRANGEA MINT GREEN | 5-Heads per Bunch/ 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BHYD-VI": {
+"desc": "SILK HYDRANGEA VIOLET | 5-Heads per Bunch / 24-Bunch per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 1.82,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BLING-16ROW-GD": {
+"desc": "BLING MESH 10YD 16 ROW GOLD | 1-Piece per ROLL",
+"unit": "Roll",
+"qty_per_unit": 1,
+"first_cost": 1.65,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BLING-16ROW-SV": {
+"desc": "BLING MESH 10YD 16 ROW SILVER | 1-Piece per ROLL",
+"unit": "Roll",
+"qty_per_unit": 1,
+"first_cost": 1.52,
+"cbm": 0.0025,
+"max_container": 27200,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"BOXBALL-9": {
+"desc": "9\" BOXWOOD BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"BOXWALL": {
+"desc": "BOXWOOD WALL 16X24 | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 36.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"BQ6205": {
+"desc": "CYLINDER BUD VASE 8H X 2.5 X 2.5 | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 21.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"BRAN-WH": {
+"desc": "4FT WHITE BRANCHES | 50-Branches per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 30.78,
+"cbm": 0,
+"max_container": 0,
+"vendor": "MAVRODE FARMS FLORIST'S SUPPLIES",
+"email": "MAVRODEFARMS@YAHOO.COM",
+"country": "United States",
+"city": "RINGOES",
+"street": "9 HAMPTON CORNER ROAD",
+"port": null,
+"lead": 50
+},
+"BROWN4104": {
+"desc": "4X4X10\" SQUARE WOOD | 24 PC PER BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 72.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"BROWN555": {
+"desc": "5\" SQUARE WOOD | 48 PC PER BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 110.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"BROWN777": {
+"desc": "7\" SQUARE WOOD PK 36 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 140.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"BSUN3": {
+"desc": "SUNFLOWER STEM | 3-Heads per STEM",
+"unit": "Stem",
+"qty_per_unit": null,
+"first_cost": 1.29,
+"cbm": 0.00275,
+"max_container": 24727,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"BUNROSE-LAV": {
+"desc": "BUNCH ROSE BOUQUET LAVENDER | 18-Heads per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"BUNROSE-RD": {
+"desc": "BUNCH ROSE BOUQUET RED | 12-Heads per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0.0046,
+"max_container": 14782,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"BURBAG-PUM": {
+"desc": "Fall Pumpkin Mix in Burlap Bag | 1 Bag Per Pack / 16 Bags per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"BW8C": {
+"desc": "8\" CLEAR EURO TAPERED VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"BW8PL": {
+"desc": "8\" PLUM EURO TAPERED VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"BX-BL": {
+"desc": "LATEX BALLOON BLUE | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"BX-GR": {
+"desc": "LATEX BALLOON GREEN | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"BX-PK": {
+"desc": "LATEX BALLOON PINK | 100-Piece per BAG",
+"unit": "Bag",
+"qty_per_unit": 100,
+"first_cost": 5.01,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"C010": {
+"desc": "GLASS SPHERE 4.5\"H | 6 Piece per Pack / 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 65.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0212": {
+"desc": "2X812H CYLINDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 39.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0304": {
+"desc": "3X4H CYCLINDER CLR | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 38.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0406": {
+"desc": "4\" X 6\" HT CYLINDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0408": {
+"desc": "4\" X 8\" HT CYLINDER - PACKED 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 38.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0410": {
+"desc": "4 X 10 CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 46.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0505": {
+"desc": "5\"X5\" CYLINDER PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 34.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0605": {
+"desc": "6\"X5\" CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 27.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0616": {
+"desc": "CYLINDER 6\"OPEN,16\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 30,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0636": {
+"desc": "CLEAR CY 6\"X36\"H | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 68.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0805": {
+"desc": "8\" X 5\"H CYLINDER | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 27.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0824": {
+"desc": "8X24 CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 73.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C0832": {
+"desc": "8 X 32\" CYLINDER PK 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 101.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C1006": {
+"desc": "10 OPEN X 6 HT CYLINDER | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 45.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C1008": {
+"desc": "10\"X 8\"H CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 36.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C1012": {
+"desc": "10\" OPEN X 12\" H CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 46.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C1020": {
+"desc": "10\" X 20\" H CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 98.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C220": {
+"desc": "9\" MULTI STEM BUD VASE PK 24 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 21.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C3922": {
+"desc": "7.5\" CERAMIC BALL BLACK | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 17,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"C7614": {
+"desc": "HANGING GLASS HOLDER TEAR DROP 5.5 X 3\" | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 76.18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"C922": {
+"desc": "5 1/2\" FLUTED IVY BOWL - CRYSTAL | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 34.53,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C951": {
+"desc": "6 1/4\" X 3 3/8: GINGER JAR | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C974": {
+"desc": "3 1/2\" X 6\" CYLINDER VASE CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"C999": {
+"desc": "8\" ROSE VASE - CRYSTAL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 13.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-HEB2": {
+"desc": "HEBREW2 - SHABBOS [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARD-SPR": {
+"desc": "SPEEDY RECOVERY [Pack] | 50-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 50,
+"first_cost": 0.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-GPL": {
+"desc": "GREEN PLANT CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-NOTICE": {
+"desc": "PLEASE NOTICE CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 1.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CBLOSS-PK-48": {
+"desc": "48\" CHERRY BLOSSOM BRANCH PINK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 20.52,
+"cbm": 0.0384,
+"max_container": 1770,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"CBLOSS-PK-55": {
+"desc": "55\" CHERRY BLOSSOM BRANCH PINK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"CCB404": {
+"desc": "4X4 BLACK CERAMIC CYLINDER | 24 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 53.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCB505": {
+"desc": "BLACK CERAMIC CYLINDER 5X5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 35.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCB510": {
+"desc": "BLACK, 5\"OPEN,10\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 29.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCB606": {
+"desc": "BLACK CERAMIC CYLINDER 6X6 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 52.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCB707": {
+"desc": "BLACK, 7\"OPEN,7\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCG505": {
+"desc": "GREEN CERAMIC CY 5\" OPEN 5 \"H PK12/CS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 26.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCW404": {
+"desc": "4X4 WHITE CERAMIC CYLINDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 53.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCW505": {
+"desc": "WHITE CERAMIC CYLINDER 5X5 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 38.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCW606": {
+"desc": "WHITE CERAMIC CYLINDER 6X6 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 50.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCW616": {
+"desc": "WHITE CERAMIC CYLINDER 6X6 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 50.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CCW707": {
+"desc": "WHITE CERAMIC CYLINDER 7X7 PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CER-BOAT-GD": {
+"desc": "CERAMIC BOAT - GOLD - 10.85 X4.5 X3.5 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 11.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CH-SPIN52": {
+"desc": "52\" SPINDLE CANDLE HOLDER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 58.55,
+"cbm": 0.42,
+"max_container": 161,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CH-SPIN52-GLSHADESX12": {
+"desc": "52\" SPINDLE GLASS SHADES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 8.04,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CH-SPIN52-GLSHADESX24": {
+"desc": "52\" SPINDLE GLASS SHADES | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 16.08,
+"cbm": 0.06,
+"max_container": 1133,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"CH2512": {
+"desc": "GLASS SHADES 2.5 OPEN X 12\" H | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 62.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CH2515": {
+"desc": "GLASS HURRICANE VASE 15\"x 2.5\"Open | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 50.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CH2520": {
+"desc": "GLASS SHADES 2.5 OPEN X 20\" H | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 66.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CH3514": {
+"desc": "GLASS SHADES 3.5 OPEN X 14\" H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CH75-BLACK": {
+"desc": "2\" BLACK VOTIVES X 75 [Case] (copy)",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 51.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CHOC-2OZ": {
+"desc": "CHOCOLATE 2OZ Per Pack | 18 Packs Per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 17.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"CHOC-6OZ": {
+"desc": "CHOCOLATE 6OZ Per Pack | 12 Packs Per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 11.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"CL10": {
+"desc": "10\" DEEP CLEAR LINERS | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 8.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"CL8": {
+"desc": "8\" DEEP CLEAR LINERS | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"CLB4144": {
+"desc": "4X4X14 BLACK CERAMIC REC | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 97.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CLPINE-COP": {
+"desc": "Copper Cluster Pine Cone Pick |24 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"CLPINE-GD": {
+"desc": "Gold Cluster Pine Cone Pick |24 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"CLPINE-SV": {
+"desc": "Silver Cluster Pine Cone Pick |24 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"CLW4124": {
+"desc": "WHITE, 4\"X12\"OPEN, 4\"H, | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 87.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CLW4144": {
+"desc": "WHITE, 4\"X14\"OPEN,4\"H PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 97.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CLW4164": {
+"desc": "WHITE, 4\"X16\"OPEN, 4\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 47.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CMC-4099": {
+"desc": "CMC EYE BOWL 3.75HX12.25X5 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"CMC-4105": {
+"desc": "CMC EYE BOWL 5HX10.25X3.75 | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 21,
+"cbm": 0,
+"max_container": 0,
+"vendor": "D & D INTERNATIONAL INC",
+"email": null,
+"country": "United States",
+"city": "Los Angeles",
+"street": "2770 LEONIS BLVD",
+"port": null,
+"lead": 50
+},
+"CP047": {
+"desc": "ROMAN PLASTIC COLUMNS 36 1/4\" X 13 3/4\" | 4-Piece per Pack / 4 Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 27.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"CRAN-PICK": {
+"desc": "Cranberry Pick | 12 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"CS4": {
+"desc": "4\" CLEAR SAUCER | 25-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 25,
+"first_cost": 1.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"CSB666": {
+"desc": "BLACK, 6X6 \"OPEN,5\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 63.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CSW444": {
+"desc": "WHITE, 4\"X4\"OPEN,4\"H | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 43.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CSW666": {
+"desc": "CERAMIC SQ WHITE, 6X6X6 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CURL-BLA": {
+"desc": "3/16\" CURLING RIBBON BLACK | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-EME": {
+"desc": "3/16\" CURLING RIBBON EMERALD | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-FUS": {
+"desc": "3/16\" CURLING RIBBON FUSCIA | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-HUN": {
+"desc": "3/16\" CURLING RIBBON HUNTER X 500 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-MEL": {
+"desc": "3/16\" CURLING RIBBON MELON X 500 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-PEA": {
+"desc": "3/16\" CURLING RIBBON PEACH X 500 YARDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-PK": {
+"desc": "3/16\" CURLING RIBBON PINK | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-RED": {
+"desc": "3/16\" CURLING RIBBON RED | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-ROY": {
+"desc": "3/16\" CURLING RIBBON ROYAL BLUE | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CURL-YELL": {
+"desc": "3/16\" CURLING RIBBON YELLOW | 500-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CW0412": {
+"desc": "4\" X 12\" WHITE CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 51.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CW0512": {
+"desc": "WHITE CY 5X12 H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 36.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CW0620": {
+"desc": "6 x 20 WHITE CYLINDER | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 46,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CW505": {
+"desc": "WHITE 5\" OPEN, 5\" H PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 36.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CWIRE12": {
+"desc": "12\" CHICKEN WIRE X 150FT | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8.38,
+"cbm": 0.006,
+"max_container": 11333,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"CYL-88": {
+"desc": "8 X 8 CYLINDER PK 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 14.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL208": {
+"desc": "2\"X8\" CLEAR CLYLINDER | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 22.8,
+"cbm": 0.012,
+"max_container": 5666,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL608": {
+"desc": "6\" X 8\" CYLINDER CLEAR | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 8.16,
+"cbm": 0.073,
+"max_container": 931,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"CYL66-ETCH-GD": {
+"desc": "6X6X6 CYLINDER ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.2,
+"cbm": 0.122,
+"max_container": 557,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CYL66-ETCH-SV": {
+"desc": "6X6X6 CYLINDER ETCH- SILVER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"CYL66-PK24": {
+"desc": "6X6X6 CYLINDER | 24-Piece per Pack",
+"unit": "Units",
+"qty_per_unit": 24,
+"first_cost": 25.44,
+"cbm": 0.106,
+"max_container": 641,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"D5616": {
+"desc": "CLEAR TAPER SQ 5X5\" BASE 6\" OPEN 16\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 51.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"DGR606": {
+"desc": "SHINY GOLD CERAMIC CY, 6\"X6\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 53.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"DGS444": {
+"desc": "GOLD CERAMIC CUBE 4x4 PK 24 (case)",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 55.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"DIP-DBLU": {
+"desc": "DIP DYE DEEP BLUE | 4-Oz. per Bottle / 6-Bottle per Case",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 6.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"DPOD": {
+"desc": "DESIGNER PODS ASSORTED [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"DS-901-02GS": {
+"desc": "RED PEARL SPRAY WITH GLITTER - 35 PEARLS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"DS-901-101": {
+"desc": "METALLIC GOLD SPRAY - 35 PEARLS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"Delivery_007": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"Delivery_008": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"Delivery_011": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"E33-09-04": {
+"desc": "8\" X 15\" COOLER BUCKET - BLACK - PACKED 9 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 66.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"E999": {
+"desc": "8\" ROSE VASE - PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.73,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"EFB12": {
+"desc": "12\" BLACK EIFFEL TOWER VASE | 12 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 31.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"EFC16": {
+"desc": "16\"X 1.5\" OPEN CLEAR EIFFLE TOWER | 12 PIECE PER PACK",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 38.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"EFC20": {
+"desc": "20\"X 1.5\" OPEN CLEAR EIFFLE TOWER VASE PK 12",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 55.08,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"EG10": {
+"desc": "10\" X 7\" OCTOGON VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WATRA SP. Z. O. O.",
+"email": null,
+"country": "POLAND",
+"city": null,
+"street": "33-103 TARNOW, UL SPOKOJNA 14A",
+"port": null,
+"lead": 50
+},
+"EQI": {
+"desc": "EQUAL INSTANT FOAM | 48-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 48,
+"first_cost": 22.22,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"ER1107": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"ESTX4-BK": {
+"desc": "TUBE VASE X 4 BLACK | 1 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"ESTX4-WH": {
+"desc": "TUBE VASE X 4 WHITE | 1 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"EUC-CHAR": {
+"desc": "EUCALYPTUS - CHARTREUSE | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"EUC-CON": {
+"desc": "EUCALYPTUS - CONCORD | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"EUC-KIW": {
+"desc": "EUCALYPTUS - KIWI | 1-Bunch per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"EUC-YEL": {
+"desc": "EUCALYPTUS - YELLOW | 1-Bunch per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 9.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"F036-BG": {
+"desc": "BURGANDY MEDIUM GRAPE CLUSTER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"F036-DGR": {
+"desc": "DARK GREEN MEDIUM GRAPE CLUSTER | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"FBIRD-PK": {
+"desc": "Fancy Bird- Pink |16 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"FCAND2-IV": {
+"desc": "2\" FLOATING CANDLE-IVORY [PK 144]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 17.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PARAMOLD MANUFACTURING",
+"email": null,
+"country": "United States",
+"city": "Sayville",
+"street": "90 Bourne Street",
+"port": null,
+"lead": 50
+},
+"FERNBALL10-GR": {
+"desc": "10\" FERNBALL GREEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 14.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"FKCH": {
+"desc": "KOTCH STANDS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"FLOWERWALL-IV": {
+"desc": "16\" X 24\" HYDRANGEA FLOWER WALL IVORY PK 24 [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"FLWALL-LONG": {
+"desc": "4FT FLOWER GARLAND [Piece] | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.8,
+"cbm": 0.0113,
+"max_container": 6017,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"FTUBEX1": {
+"desc": "FROSTED TUBE GLASS VASE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"FV12C-12": {
+"desc": "12\" FLARED CLEAR VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 22.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"FV8529": {
+"desc": "29\"H 8.25\" OPEN GLASS VASE CTN | 1-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ABC GLASS INC",
+"email": "mark168178@gmail.com",
+"country": "United States",
+"city": "NORCROSS",
+"street": "6900 PEACHTREE INDUSTRIAL BLVD",
+"port": null,
+"lead": 50
+},
+"FWALL-IV": {
+"desc": "16\"X24\" HYDRANGEA/ROSES FLOWER WALL IVORY | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 94.08,
+"cbm": 0.0188,
+"max_container": 3617,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"FWALL-PK": {
+"desc": "16\"X24\" HYDRANGEA/ROSES FLOWER WALL PINK | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 187.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"FWB-IR": {
+"desc": "IRRIDECENT BALLOON WEIGHTS [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"GAR-IVY": {
+"desc": "98\" IVY GARLAND | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 49.68,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANTAI SUNSHINE HANDICRAFTS CO.,LTD",
+"email": "julia_sunshine@vip.126.com",
+"country": "China",
+"city": "LaiShan,Yantai",
+"street": "RM2703,Building 3,No 277",
+"port": null,
+"lead": 150
+},
+"GEM1-PU": {
+"desc": "GEMS PURPLE | 1-Pounds per BAG / 12-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.15,
+"cbm": 0.00111,
+"max_container": 61261,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GEMS": {
+"desc": "GEMS 30LB BOX - 6 5LB BAGS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.33,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"GL60402-BK": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"GLAN-20": {
+"desc": "20\" GREEN CANDLE HOLDER",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"GLAN-24": {
+"desc": "24\" GREEN CANDLE HOLDER",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 64.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"GLAN-28": {
+"desc": "28\" GREEN CANDLE HOLDER",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 79.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"GLITI": {
+"desc": "IRIDESCENT GLITTER | 12-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 8.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LEO UHLFELDER INC.",
+"email": null,
+"country": "United States",
+"city": "MOUNT VERNON",
+"street": "420 S. FULTON AVE",
+"port": null,
+"lead": 50
+},
+"GLITRED": {
+"desc": "RED FINE GLITTER 12OZ | 12-Oz. per Bottle",
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 6.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LEO UHLFELDER INC.",
+"email": null,
+"country": "United States",
+"city": "MOUNT VERNON",
+"street": "420 S. FULTON AVE",
+"port": null,
+"lead": 50
+},
+"GREETCARD-MOM": {
+"desc": "8\" MUSICAL MOTHERS DAY CARD | 24 -Piece per Pack / 6 Packs per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"GSPKL-12": {
+"desc": "12\" X 5\" GOLD ANTIQUE PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 30.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"GTL-2": {
+"desc": "GLASS TEA LIGHT HOLDER X 2 - PACKED 24 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 54,
+"cbm": 0.041,
+"max_container": 1658,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"H0505": {
+"desc": "CYL 5X5H BLACK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 46.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"H0612": {
+"desc": "6X12H, BLACK | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 26.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"H0616": {
+"desc": "CYL 6X16H BLACK | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 38,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"H444": {
+"desc": "BLACK CUBE 4\"x4\"x4\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"HANGFL-RD": {
+"desc": "11\" ROUND RING WITH FLOWERS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.94,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"HANGFL-SQ": {
+"desc": "11\" SQUARE WITH FLOWERS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.94,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"HANGFL-TRI": {
+"desc": "11\" TRIANGLE WITH FLOWERS [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.94,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"HBALL-FLOWER": {
+"desc": "8\" FLOWER BALL - ASST FLOWERS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.8,
+"cbm": 0.0051,
+"max_container": 13333,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"HRT1-RD": {
+"desc": "HEART SHAPE ACRYLIC - RED | 1-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 1.1,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"HRT3-RD": {
+"desc": "HEART SHAPE ACRYLIC - RED | 1-Pounds per BAG / 4-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 3.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"Holiday Gift": {
+"desc": null,
+"unit": "Bottle",
+"qty_per_unit": null,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"JAR14": {
+"desc": "14\" X 10\" BUBBLE BALL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 47.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"JAR16": {
+"desc": "CLEAR BUBBLE BOWL 16\" X 10\" X 12\" | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 72.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"JAR8": {
+"desc": "8\" BUBBLE BALL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 44.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"JARSET3": {
+"desc": "CLEAR GLASS BOTTLE SET | 4-SET per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 19.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"KWX-BK": {
+"desc": "KOREAN WAX PAPER BLACK | 20 Sheets per pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"KWX-PK": {
+"desc": "KOREAN WAX PAPER PINK | 20 Sheets per pack",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 2.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"KWX-RD": {
+"desc": "KOREAN WAX PAPER RED/GD TRIM | 20 Sheets per pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"KWX-WH": {
+"desc": "KOREAN WAX PAPER WHITE | 20 Sheets per pack",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"LANT-10": {
+"desc": "5\"X5\"X10\" H GLASS CANDLE HOLDER PK 8 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 38.8,
+"cbm": 0.048,
+"max_container": 1416,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"LET-AZ": {
+"desc": "LETTERS- ENTIRE ALPHABET A-Z",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"LMADJ": {
+"desc": "LARGE ADJUSTABLE PACKER PK 100",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 60.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FREEDMAN PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "BROOKLYN",
+"street": "454 LIVONIA AVENUE",
+"port": null,
+"lead": 50
+},
+"LOBCONE-325": {
+"desc": "LOBLOLLY PINE CONE 3-4\" PK 325",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 35,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"LOBCONE-675": {
+"desc": "LOBOLLY PINE CONE 3-4\" PK 675",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 57.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"LOBCONE-FR": {
+"desc": "LOBOLLY PINE CONE 3-4\" FROSTED NAT/WHITE TIP | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 15.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"LOBCONE-NATW": {
+"desc": "LOBOLLY PINE CONE 3-4\" NAT/WHITE TIP | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 15.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"LOBCONE-OP": {
+"desc": "LOBOLLY PINE CONE 3-4\" FROSTED OPAL | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"LOBCONE-SV": {
+"desc": "LOBOLLY PINE CONE 3-4\" SILVER | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 21.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"MB-NEST": {
+"desc": "MEDIUM HANGING GLASS W/ BIRD | 1-Piece per Pack / 48-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.57,
+"cbm": 0.0016,
+"max_container": 42500,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"MBR907": {
+"desc": "8 3/4\" SPRING GARDEN VASE -MATTE BLUSH ROSE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"MESH-BL": {
+"desc": "MESH - BLUE | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.55,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MESH-RG": {
+"desc": "MESH - ROSE GOLD | 10-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MIXPRL-IV": {
+"desc": "PEARLS MIX - SM,MED,LG | 1-Pounds per BAG",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 2.39,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"MM74-SPRINGMX": {
+"desc": "SPRING COLORED GLASS VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 6.72,
+"cbm": 0.035,
+"max_container": 1942,
+"vendor": "ZIBO WALCROWN CO LTD",
+"email": "david@walcrown.com",
+"country": "China",
+"city": "SHANDONG",
+"street": "ROM 231 BUILDING NO 3 ORIENTAL",
+"port": "QINGDAO",
+"lead": 150
+},
+"MPBRANCH-GD": {
+"desc": "PLASTIC BRANCHES GOLD | 1-Piece per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.29,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"MR02-WT": {
+"desc": "MESH - WHITE | 5-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 1.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"MTLG4144": {
+"desc": "GOLD, 14\"X4\"OPEN,4\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 85.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"MTLG4164": {
+"desc": "GOLD CERAMIC REC 4\"X16\"OPEN,4\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 68.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"MTLS4124": {
+"desc": "SILVER, 12\" X 4\" OPEN X 4\"H | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 91.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"ORG940": {
+"desc": "8\" GATHERING VASE TRANSLUCENT ORANGE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 14.87,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"OVL4X8-ETCH-GD": {
+"desc": "4HX8L OVAL ETCH- GOLD | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 9,
+"cbm": 0.053,
+"max_container": 1283,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"PC303-IV": {
+"desc": "3\"X3\" IVORY PILLAR CANDLE, 48/CS",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 65.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PCF": {
+"desc": "PEACOCK FEATHERS | 100-Piece per BUNDLE",
+"unit": "Bundle",
+"qty_per_unit": 100,
+"first_cost": 40.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PEW": {
+"desc": "LARGE PEW HOLDER CLIPS | 12-Piece per BOX / 8-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 22.51,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"PF-10X6": {
+"desc": "10X10X6 MIRROR PLATFORM - PACKED 4 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 32.92,
+"cbm": 0.05,
+"max_container": 1360,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PF-12X12": {
+"desc": "12X12X12 MIRROR PLATFORM | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 16.29,
+"cbm": 0.043,
+"max_container": 1581,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PF-12X4": {
+"desc": "12X12X4 MIRROR PLATFORM | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 32.8,
+"cbm": 0.049,
+"max_container": 1387,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"PICK-DBHT": {
+"desc": "DOUBLE HEART PICK | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"PICK-EAST": {
+"desc": "HAPPY EASTER PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"PICK-HAVEANICEDAY": {
+"desc": "HAVE A NICE DAY PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 0.58,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"PICK-HOL": {
+"desc": "HAPPY HOLIDAYS PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"PICK-THAN": {
+"desc": "THANK YOU PICKS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 3.14,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"PICK-THGX24": {
+"desc": "HAPPY THANKSGIVING PICKS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 5.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"PINK-BBRIB": {
+"desc": "2 3/4\" X 100 YARD POLY RIBBON - PINK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NATURALSTAR INC.",
+"email": "SERVICE@NATURALSTARINC.COM",
+"country": "United States",
+"city": "VERNON",
+"street": "2226 E. 52ND STREET",
+"port": null,
+"lead": 50
+},
+"PK4-HV12": {
+"desc": "12\" HURRICANE VASE PACKED 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"PL-SQ5510W": {
+"desc": "5X5X10 PLASTIC TALL SQUARE WHITE | 6-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 11.1,
+"cbm": 0.033,
+"max_container": 2060,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PL-TOWHOLDER-18": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "JAYI ACRYLIC LTD",
+"email": null,
+"country": "China",
+"city": "CENTRAL HONG KONG",
+"street": "RM 301 7A 3F HONGKONG TRADE CTR",
+"port": "YANTIAN",
+"lead": 150
+},
+"PL510CYL": {
+"desc": "5X5X10 PLASTIC CYLINDER PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PLPOT-GR": {
+"desc": "8\" GREEN PLASTIC PLANTER [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"PLPOT-GREY": {
+"desc": "8\" GREY PLASTIC PLANTER [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"POMPAS": {
+"desc": "POMPAS GRASS -4-5 feet tall each stem | 5-Stems per BUNCH / 12-BUNCH per Case",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 7.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"PX20-S": {
+"desc": "SILVER MARKER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"PY10-BR": {
+"desc": "10\" BROWN PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY10-MOM": {
+"desc": "10\" MOTHERS DAY PLUSH [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY10-WH": {
+"desc": "10\" WHITE PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY10-WH-GRAD": {
+"desc": "10\" GRADUATION BEAR W/ SWEATER [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY12-BR": {
+"desc": "12\" BROWN PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY12-HRT-BR": {
+"desc": "12\" BROWN PLUSH TEDDY BEAR W/HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"PY12-HRT-WH": {
+"desc": "12\" WHITE PLUSH TEDDY BEAR W/HEART [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"PY12-WH-GRAD": {
+"desc": "12\" GRADUATION BEAR W/ SWEATER [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY24-BR": {
+"desc": "24\" PLUSH TEDDY BEAR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY24-TAN": {
+"desc": "24\" CECIL BEAR W/ LOVE HEART- TAN COLOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY30-BEI": {
+"desc": "30\" BEIGE BEAR - | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 15,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY447P": {
+"desc": "10\" PINK TEDDY BEAR | 1-Piece per Pack / 36-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY6-WH": {
+"desc": "6\" SMITTY BEAR W/ HEART NECKLACE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY8-TAN": {
+"desc": "8\" TAN COLOR PLUSH TEDDY BEAR [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"R3410": {
+"desc": "3\" X4\" OPEN X 10\"H RECTANGLE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 51.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"R4104": {
+"desc": "4 X 10 X 4 RECTANGLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 52.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"R6014": {
+"desc": "16\"X7\" REVERSIBLE TRUMPET VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 15.96,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"R6015": {
+"desc": "20\"X8\" REVERSIBLE TRUMPET VASE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 19.64,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"R6265-SV": {
+"desc": "IRON CANDLEABRA 24\" TALL - SILVER | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HANGZHOU LIGHT INDUSTRIAL ARTS & CRAFTS",
+"email": null,
+"country": "China",
+"city": "HANGZHOU",
+"street": "NO 6 1ST XIYUAN ROAD WEST LAKE",
+"port": "NINGBO",
+"lead": 150
+},
+"R67B-ETCH-GD": {
+"desc": "6X6X5 ROUND BUBBLE BALL SHAPE ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 20.4,
+"cbm": 0.049,
+"max_container": 1387,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"R691L": {
+"desc": "OVAL WILLOW BASKET W/MOVABLE HANDLES | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RAF-NAT-RL": {
+"desc": "RAFFIA - NATURAL ON ROLL | 1-Roll per Pack / 100-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.68,
+"cbm": 0.0091,
+"max_container": 7472,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"RAFFIA": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"RAPID-STPLG": {
+"desc": "RAPID BRAND STAPLE GUN | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 18,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"RB516": {
+"desc": "5/16\" RED RUBBER BANDS | 1-Pounds per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 3.42,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ALLIANCE RUBBER COMPANY",
+"email": null,
+"country": "United States",
+"city": "HOT SPRINGS NATIONAL PARK",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RBFLY-2": {
+"desc": "COLORED BUTTERFLY 2\" | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JILIN XIECHENG IMP & EXP TRADE CO",
+"email": null,
+"country": "China",
+"city": "CHANG CHUN",
+"street": "707 NO 6-2 HAIKOU ROAD",
+"port": null,
+"lead": 0
+},
+"RCS16": {
+"desc": "16\"X5.5\" URN PEDESTAL VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 17.1,
+"cbm": 0.0875,
+"max_container": 777,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"RCURL-PU": {
+"desc": "3/16\" PURPLE CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RCURL-SV": {
+"desc": "3/16\" SILVER CURLING RIBBON | 500-Yards per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 1.25,
+"cbm": 0.001,
+"max_container": 68000,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"REC4412-MGD": {
+"desc": "4X4X12 MIRROR GOLD RECTANGLE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 27.9,
+"cbm": 0.03,
+"max_container": 2266,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"REC4412-WH-12": {
+"desc": "RECTANGLE WHITE VASE 4X4X12 | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 48.36,
+"cbm": 0.065,
+"max_container": 1046,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"REC4418-WH-12": {
+"desc": "RECTANGLE WHITE VASE 4X4X18 PACKED 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 77.04,
+"cbm": 0.088,
+"max_container": 772,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"REINMOSS-CH": {
+"desc": "REIDEER MOSS-CH | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 3.91,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SUPERMOSS",
+"email": null,
+"country": "United States",
+"city": "SANTA BARBARA",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RK1-BK": {
+"desc": "STRAIGHT BLADE FOLDING KNIFE- BLACK HANDLE | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"RKH4-BK": {
+"desc": "HOOK BLADE FOLDING KNIFE BLACK | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 0.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"RKNF": {
+"desc": "SWISS ARMY KNIFE STRAIGHT BLADE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 7.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "VICTORINOX SWISS ARMY INC.",
+"email": null,
+"country": "United States",
+"city": "BOSTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"RLIGHT": {
+"desc": "SUBMERSIBLE LED LIGHTS | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NINGBO YINZHOU GREEN LIGHT INT'L TRADE CO., LTD",
+"email": "KEN.WANG@NB-GREENLIGHT.COM",
+"country": "China",
+"city": "NINGBO",
+"street": "1905 HAORU BUILDING, NO.468 TAI KAN",
+"port": "NINGBO",
+"lead": 150
+},
+"RNCONE-FR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": null,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"RNCONE-FRO": {
+"desc": "AUSTRICA PICKED FROSTED PINE CONE 2-3\" | 100-Piece per Pack | 500-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 21.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"RNCONE-GD": {
+"desc": "AUSTRICA GOLD PINE CONE 2-3\" | 100-Piece per Pack / 5 Pack per case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 26.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"RNCONE-GDGLIT": {
+"desc": "AUSTRICA GOLD GLITTER TIP PINE CONE 2-3\" | 100-Piece per Pack / 5 Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 22.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"RNCONE-SV": {
+"desc": "AUSTRICA SILVER PINE CONE 2-3\" | 100-Piece per Pack | 5 Pack per case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 26.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"ROCK-LRG-WH": {
+"desc": "LARGE WHITE ROCKS 15-25MM [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"ROCK-SML-NT": {
+"desc": "SMALL NATURAL COLORED ROCKS 8-15MM | 5-Pounds per BAG / 6-BAG per Case",
+"unit": "Bag",
+"qty_per_unit": null,
+"first_cost": 0.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"RPAT40": {
+"desc": "2 3/4\" PATRIOT PATTERN POLY RIBBON | 50-Yards per ROLL / 12-ROLL per Case / 36-ROLL per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 2.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RPAT9": {
+"desc": "1 3/8\" PATRIOT PATTERN POLY RIBBON | 50-Yards per ROLL / 12-ROLL per Case / 36-ROLL per Master",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 4.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RPBOW9-PU": {
+"desc": "1 3/8\" PURPLE PULL BOW [Master]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BOLIS RIBBON COMPANY",
+"email": "INFO@E-BOLIS.COM",
+"country": "ITALY",
+"city": null,
+"street": "CAPITALE SOCIALE EURO 1.228.500",
+"port": null,
+"lead": 50
+},
+"RTANG64S3": {
+"desc": "RECTANGLE CHIPWOOD BASKET SET OF 3 | 12 sets per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"RTUL54-IV": {
+"desc": "TULLE BOLT 54\" IVORY | 40-Yards per ROLL / 10-ROLL per Case",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CHANGLE FOREIGN TRADE CORPORATION",
+"email": null,
+"country": "China",
+"city": "CHANGLE CITY",
+"street": "XIANGAO VILLAGE, JINFENG TOWN, CHAN",
+"port": null,
+"lead": 150
+},
+"RWAX-BOLD": {
+"desc": "WAX TISSUE BOLD 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 12.88,
+"cbm": 0.00836,
+"max_container": 8133,
+"vendor": "CHANGSHA HONE ARTS CO., LTD.",
+"email": "SALES07@hnarts.com",
+"country": "China",
+"city": "CHANGSHA",
+"street": "ROOM 8033 FL 8 TOWER B WANFUHUI",
+"port": "NINGBO",
+"lead": 150
+},
+"S107G5": {
+"desc": "CORSAGE STEMS GREEN | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 6.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S1720": {
+"desc": "STRAIGHT HANDLE BOUQUET HOLDER | 6-Piece per BOX / 4-BOX per Case",
+"unit": "Box",
+"qty_per_unit": 6,
+"first_cost": 7.57,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S17533PK": {
+"desc": "16\" PINK ROSE SPRAY W/7F | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.77,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"S21242CP": {
+"desc": "25\" GERBERA DAISY | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"S3001-WHT": {
+"desc": "CARNATION HEADS WHITE | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 9.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"S3320RD": {
+"desc": "21\" ROSE SPRAY W/9F, 5B | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"S4410": {
+"desc": "4\" X 4\" OPEN, 10\"H PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 59.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S4412": {
+"desc": "SQ 4X4 OPEN, 12'H PK 12 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 66.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S5516": {
+"desc": "CLEAR SQ 5X5 OPEN16\"H, PK 6/CS [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 48.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S5518": {
+"desc": "5\" X 5\" OPEN, 18\"H | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 76.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S664": {
+"desc": "SQ 6X6 OPEN, 4\"H PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 35.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S7197PK": {
+"desc": "32\" DOGWOOD SPRAY | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2.45,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"S888": {
+"desc": "CLEAR SQ 8X8 X8 | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 51.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SAH": {
+"desc": "SAHARA DRY FOAM | 20-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 20,
+"first_cost": 17.89,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"SB12": {
+"desc": "12\" STYRO BALLS - PK 6",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 22.62,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"SBALLF-GR": {
+"desc": "BALL FLOWER GREEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SBALLF-WH": {
+"desc": "BALL FLOWER WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 15.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SC10-PINK": {
+"desc": "10\" SPEED COVER METTALIC PINK | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 4.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC6-PINK": {
+"desc": "6\" SPEED COVER METTALIC PINK | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 2.1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SC8-MOSS": {
+"desc": "8\" SPEED COVER METTALIC MOSS | 10-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 10,
+"first_cost": 4.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SCISSOR": {
+"desc": "SCISSOR | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"SDEC-13": {
+"desc": "WALL HANGING CLEAR GLASS FLOWER PANEL | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 26.8,
+"cbm": 0.038,
+"max_container": 1789,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SF0066": {
+"desc": "TUK N RUFFLE WHITE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 15.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"SFR-WH": {
+"desc": "SMALL WHITE ROSARY SILK FLOWER FILLED - 53 BEAD | 1-Piece per Pack / 10-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 10.64,
+"cbm": 0.00632,
+"max_container": 10759,
+"vendor": "RISE ENTERPRISE CO.",
+"email": "STEPHEN.RISEHK@GMAIL.COM",
+"country": "China",
+"city": "HONG KONG",
+"street": "RM C, 2/F, FU HOP FACTORY BLDG, 209",
+"port": "YANTIAN",
+"lead": 150
+},
+"SGV01F-PK36-IV": {
+"desc": "PREFILLED SHOT GLASS VOTIVE IVORY COLOR | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"SGV01F-PK36-YEL": {
+"desc": "PREFILLED SHOT GLASS VOTIVE YELLOW COLOR | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 10.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"SGV01FGD-72": {
+"desc": "GOLD INNER & OUTER WAX FILLED VOTIVE | 72-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 72,
+"first_cost": 25.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"SHEET": {
+"desc": "SHEET MOSS | 3-Pounds per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 33.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "LEO UHLFELDER INC.",
+"email": null,
+"country": "United States",
+"city": "MOUNT VERNON",
+"street": "420 S. FULTON AVE",
+"port": null,
+"lead": 50
+},
+"SHOWROOM": {
+"desc": "SHOWROOM ITEM",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"SIL416": {
+"desc": "4x16 SILVER CYLINDERS PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 65.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SLV-20": {
+"desc": "20\" X 5\" SILVER PILSNER VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 21.48,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SP-HEATHERISH": {
+"desc": "SPRAY DYE HEATHERISH | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-HERBAL": {
+"desc": "SPRAY DYE HERBAL | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Can",
+"qty_per_unit": null,
+"first_cost": 5.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SP-VAN": {
+"desc": "SPRAY DYE VANILLA | 12-Oz. per CAN / 4-CAN per Case",
+"unit": "Units",
+"qty_per_unit": null,
+"first_cost": 5.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"SPAN-10": {
+"desc": "SPANISH MOSS- 10LB BOX [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 28.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEMEX",
+"email": null,
+"country": "Mexico",
+"city": null,
+"street": null,
+"port": null,
+"lead": 50
+},
+"SPAN-GRN": {
+"desc": "GREEN SPANISH MOSS PR BULK GS | 3-Pounds per BOX",
+"unit": "Box",
+"qty_per_unit": null,
+"first_cost": 11.54,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEMEX",
+"email": null,
+"country": "Mexico",
+"city": null,
+"street": null,
+"port": null,
+"lead": 50
+},
+"SPLUG": {
+"desc": "4X3X2 INSERT GREEN STYRO PLUG | 36-Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "FLORACRAFT CORPORATION MICHIGAN",
+"email": null,
+"country": "United States",
+"city": "DETROIT",
+"street": "PO BOX 772177",
+"port": null,
+"lead": 50
+},
+"SQ-12": {
+"desc": "12X12 GLASS PLATE SQUARE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 23.88,
+"cbm": 0.042,
+"max_container": 1619,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"SQ10-ETCH-SV-8": {
+"desc": "10X10X4H SQUARE ETCH- SILVER | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 8,
+"first_cost": 33.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "RC DECO CO LIMITED",
+"email": null,
+"country": "China",
+"city": "Xiamen",
+"street": "Room404 Taiwei Bldg",
+"port": "XIAMEN",
+"lead": 150
+},
+"SQ64S3": {
+"desc": "S/3 SQUARE CHIPWOOD BASKET | 3-Piece per SET / 12-SET per Case",
+"unit": "Set",
+"qty_per_unit": 3,
+"first_cost": 4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "TANCHENG COUNTY TENGYUAN HANDICRAFT FACTORY, SAM GUO",
+"email": null,
+"country": "China",
+"city": "SHANDONG PROVINCE",
+"street": "ZHUBAI VILLAGE LIZHUANG TOWN",
+"port": "SHENZHEN",
+"lead": 150
+},
+"SROSE-PK": {
+"desc": "SINGLE PINK ROSE | 12-Piece per Pack / 20-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 9.12,
+"cbm": 0.019,
+"max_container": 3578,
+"vendor": "PUJIANG LABELLE CRYSTAL CO LTD",
+"email": null,
+"country": "China",
+"city": "PUJIANG",
+"street": "NO 175 XISHAN NORTH ROAD",
+"port": "NINGBO",
+"lead": 150
+},
+"SSPKL-12": {
+"desc": "12\" X 5\" SILVER ANTIQUE PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 26.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BAOBEI INT'L CO.,LTD",
+"email": null,
+"country": "China",
+"city": "HEBEI",
+"street": "BLDG D101, JINXIA VILLA,",
+"port": "XINGANG",
+"lead": 150
+},
+"STEM-EUC-GR": {
+"desc": "STEM EUCALYPTUS GREEN | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 7.44,
+"cbm": 0.0079,
+"max_container": 8607,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"STEMROSE-IV": {
+"desc": "STEM ROSES IVORY | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 2.12,
+"cbm": 0.00295,
+"max_container": 23050,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"SV01F": {
+"desc": "PREFILLED SQUARE VOTIVE GLASS | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 36,
+"first_cost": 9,
+"cbm": 0.009,
+"max_container": 7555,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"SW666": {
+"desc": "6\"X6\"X6\", WHITE SQ | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 34.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SWFP-USED": {
+"desc": "24\" USED SAY IT WITH FLOWER PAPER | 1500-Feet per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRINTWRAP CORP",
+"email": "INFO@PRINTWRAP.COM",
+"country": "United States",
+"city": "Cedar Grove",
+"street": "95 Sand Park Road",
+"port": null,
+"lead": 50
+},
+"T2000": {
+"desc": "TACK 2000 SPRAY ADHESIVE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN MASTER",
+"email": null,
+"country": "United States",
+"city": "Kent",
+"street": "P.O. Box 745",
+"port": null,
+"lead": 50
+},
+"T2894-CH": {
+"desc": "GOLD LARK W CLIP PK 12",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"T3111-GR": {
+"desc": "GREEN BIRD FLOCKED W/ CLIP | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 12.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"T32": {
+"desc": "CLEAR TRUMPET VASE TOP 6.8 x 10.6 x 32\" | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 2,
+"first_cost": 40.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"TOAK8OZ": {
+"desc": "TRANS OAK LEAVES YELLOW/ORANGE | 8-Oz. per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "KNUD NIELSEN COMPANY, INC",
+"email": null,
+"country": "United States",
+"city": "Evergreen",
+"street": "P.O. BOX 746-217 PARK STREET",
+"port": null,
+"lead": 50
+},
+"TS108-PK": {
+"desc": "TABLE SKIRT 108\" X 30\" - PINK | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 4.65,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"TS168-WH": {
+"desc": "TABLE SKIRT 168\" X 30\" - WHITE | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 6.77,
+"cbm": 0.008,
+"max_container": 8500,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"TUL-WH": {
+"desc": "TULLE 6\" WHITE | 25-Yards per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 0.65,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"TUL18-IV": {
+"desc": "18\" TULLE-IVORY | 25-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"TUL18-WH": {
+"desc": "18\" TULLE -WHITE | 25-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": null,
+"first_cost": 5.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"USEDEASEL-54": {
+"desc": "USED EASELS 54\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"USEDEASEL-60": {
+"desc": "USED EASELS 60\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"USEDEASEL-66": {
+"desc": "USED EASELS 66\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"USEDEASEL-72": {
+"desc": "USED EASELS 72\" | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"USEDKCH": {
+"desc": "USED KOTCH STANDS | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 1,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"V201SV": {
+"desc": "ROLY POLY VOTIVE SILVER SPECKLE - PACKED 36 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 12.24,
+"cbm": 0.017,
+"max_container": 4000,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"VC75-FROST": {
+"desc": "FROST WHITE CANDLE IN 2\"ROUND CLEAR GLASS PK 75 [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 37.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"VSLANT-GR": {
+"desc": "12\" HT X 3.5\" OPN GREEN SLANT VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 16.92,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"W20X12G": {
+"desc": "20 GAUGE X 12 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 10.61,
+"cbm": 0.0022,
+"max_container": 30909,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"W23X12G": {
+"desc": "23 GAUGE X 12 LENGTH CUT WIRE | 12-Pounds per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 13.72,
+"cbm": 0.0022,
+"max_container": 30909,
+"vendor": "HEBEI JINSHI INDUSTRIAL METAL",
+"email": null,
+"country": "China",
+"city": "Shijiazhuang City",
+"street": "No. 29 Taihua Street",
+"port": "XINGANG",
+"lead": 150
+},
+"WAX-CIT": {
+"desc": "WAX TISSUE CITRUS 24X36 | 400-SHEETS per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 21.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WAX-GRN": {
+"desc": "WAX TISSUE GREEN 24X36 | 400-SHEETS per Ream / 5-Ream per Case",
+"unit": "Ream",
+"qty_per_unit": null,
+"first_cost": 22.94,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WAX-OR": {
+"desc": "WAX TISSUE ORANGE 24X36 | 400-SHEETS per Pack / 5-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25.06,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WD458": {
+"desc": "4.5HX 8W PEDESTAL BOWL | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 70.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"WDCH3": {
+"desc": "CANDLE HOLDER 12H,16H,20H SET OF 3 | 4 SET PER CASE",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 84,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"WG-ORCHID": {
+"desc": "OVAL HANGING GLASS W/ PINK ORCHID | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 72,
+"cbm": 0.069,
+"max_container": 985,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"WHEAT-BR": {
+"desc": "WHEAT BROWN 1/2 LB BUN [Bun] (copy)",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"WHEAT-NAT": {
+"desc": "WHEAT NATURAL | 0.5-Pounds per BUNDLE",
+"unit": "Bundle",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"WHEAT-RUS": {
+"desc": "WHEAT RUST | 0.5-Pounds per BUNDLE",
+"unit": "Bundle",
+"qty_per_unit": null,
+"first_cost": 2.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"WHEAT-YEL": {
+"desc": "WHEAT YELLOW | 0.5-Pounds per BUNDLE",
+"unit": "Bundle",
+"qty_per_unit": null,
+"first_cost": 2.74,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"WOOD4104-BR": {
+"desc": "4X10\" OPEN 4\"H 24 PC/CASE [Case]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 66,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"WOOD4164-BR": {
+"desc": "4X4X16 WOOD BOX | 24-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 24,
+"first_cost": 124.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"WOOD4412-BR": {
+"desc": "4X4X12 WOOD BOX | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 12,
+"first_cost": 21.48,
+"cbm": 0.036,
+"max_container": 1888,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"WXROLL-WH": {
+"desc": "24\" WHITE WAX ON ROLL | 1-Roll per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 66.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"X0079C144": {
+"desc": "CLEAR STANDARD BALLOON CUP | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 4.32,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"X1012-RD": {
+"desc": "6\" DIA POINSETTA RED | PACK 100",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 27.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X1305-WH": {
+"desc": "13\" WHITE RUSCUS PICK X 3 | 144-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 144,
+"first_cost": 15.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X1430": {
+"desc": "HOLLY PICK W/ APPLE PK | 12 Piece per pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 4.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X1454-GD": {
+"desc": "14\" GOLD GLITTER LEATHER FERN PK 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 6.3,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X1980-BUR": {
+"desc": "ASSORTED HOLIDAY PICKS BURGANDY COLOR PK 12 [Dozen]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 8.7,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X2763-GD": {
+"desc": "10\" ASH LEAF SPRAY | 12 Piece Per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 2.76,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"X7012": {
+"desc": "24\" NORTHERN SPRUCE TREE (81TIPS/BURLAP) - GREEN [Piece]",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 5.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"XHUCK": {
+"desc": "SWEET HUCK WHITE TIP BRANCHES | PK 750",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE",
+"email": "SROTH513@GMAIL.COM",
+"country": "United States",
+"city": "Manalapan Township",
+"street": "225 COUNTY RD 522",
+"port": null,
+"lead": 50
+},
+"XLGBERRY-PICK": {
+"desc": "Large Berry Pick | 24 Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"Z20": {
+"desc": "20\" PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 89.16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"Z24": {
+"desc": "24\" PILSNER VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 136.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"Z30": {
+"desc": "30\" PILSNER VASE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 6,
+"first_cost": 69,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"Z83B-BL": {
+"desc": "5HX 10W BLUE PEDESTAL BOWL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 7.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEBEI BAODING ARTS AND CRAFTS IMP EXP CORP",
+"email": null,
+"country": "China",
+"city": "HEBEI PROVINCE",
+"street": "NO 658 CHAOYANG SOUTH STREET",
+"port": "TIANJIN",
+"lead": 150
+},
+"ZB22": {
+"desc": "6\"OPEN,22\"H - BLACK TRUMPET VASE PK 4",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 75.88,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"ZB28": {
+"desc": "BLACK,REVERSIBLE LATOUR,7.5\"OPEN,28\"H | 4 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": null,
+"first_cost": 82.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"ZY30": {
+"desc": "30\" X 7.5\" OPEN REVERSIBLE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 4,
+"first_cost": 86.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"LOBCONE-GD": {
+"desc": "LOBOLLY PINE CONE 3-4\" GOLD PK 100",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 21.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GARDEN STATE FOLIAGE, LLC",
+"email": null,
+"country": "United States",
+"city": "FARMINGDALE",
+"street": "600 CENTRAL AVENUE",
+"port": null,
+"lead": 50
+},
+"PC209W": {
+"desc": "2\"X9\" WHITE PILLAR CANDLE | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 24,
+"first_cost": 47.52,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"TCAND-8-ALUMINUM": {
+"desc": "8 HR TEALIGHTS IN ALUMINUM CUPS | 100-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 7.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "M. ADLER",
+"email": "ALECTADLER@GMAIL.COM",
+"country": "United States",
+"city": "WAKE FOREST",
+"street": "709 PELZER DRIVE",
+"port": null,
+"lead": 50
+},
+"WB-S": {
+"desc": "WIRE BABY STROLLER WHITE 17\"H",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 6.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"WD8": {
+"desc": "8\" PLASTIC DISH | 24 PIECE PER PACK / 12 Pack Per Case",
+"unit": "Pack",
+"qty_per_unit": 12,
+"first_cost": 19.2,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"BROWN666": {
+"desc": "6\" SQUARE WOOD | 36 PC PER BOX",
+"unit": "Box",
+"qty_per_unit": 36,
+"first_cost": 120.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"BX-LAV": {
+"desc": "LATEX BALLOON LAVENDER 100 PER PACK [Bag]",
+"unit": "Pack",
+"qty_per_unit": 100,
+"first_cost": 5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "CTI INDUSTRIES CORPORATION",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": "PO BOX 85117",
+"port": null,
+"lead": 50
+},
+"MROCK-BK-1LB": {
+"desc": "MINI BLACK RIVER ROCKS | 1-Pounds per Bag / 24-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": 0,
+"first_cost": 0.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"MROCK-BK-2LB": {
+"desc": "MINI BLACK RIVER ROCKS | 1-Pounds per Bag / 12-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": 0,
+"first_cost": 0.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"MROCK-NAT-1LB": {
+"desc": "MINI NATUAL RIVER ROCKS | 1-Pounds per Bag / 24-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": 0,
+"first_cost": 0.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"MROCK-NAT-2LB": {
+"desc": "MINI NATUAL RIVER ROCKS | 1-Pounds per Bag / 12-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": 0,
+"first_cost": 0.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"RROCK-BK-2LB": {
+"desc": "BLACK STONE RIVER ROCKS | 2-Pounds per Bag | 12-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": 0,
+"first_cost": 0.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"RROCK-NAT-1LB": {
+"desc": "NATURAL STONE RIVER ROCKS | 1-Pounds per Bag / 24-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": 0,
+"first_cost": 0.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"RROCK-NAT-2LB": {
+"desc": "NATURAL RIVER ROCKS | 1-Pounds per Bag / 12-Bag per Case",
+"unit": "Bag",
+"qty_per_unit": 0,
+"first_cost": 0.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WEIFANG INFUH LIFESTYLE",
+"email": null,
+"country": "China",
+"city": "WIFANG",
+"street": "RM 207-304, BLDG EAST#8",
+"port": "NINGBO",
+"lead": 150
+},
+"SWRAP-5": {
+"desc": "5\" STRECH WRAP CLEAR | 12 ROLLS PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 46.75,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PRIME PACKAGING CORP.",
+"email": null,
+"country": "United States",
+"city": "Brooklyn",
+"street": "1290 METROPOLITAN AVE.",
+"port": null,
+"lead": 50
+},
+"X0013GR": {
+"desc": "16\" WHITE STRAW PK 144 [Bag]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 5.85,
+"cbm": 0,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"266-100-09": {
+"desc": "SINGLE ROSE BOX -CRYSTAL- PACKED 100 [Case]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 33.81,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"S555": {
+"desc": "5X5X5 CLEAR CUBE | 12 Piece Per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 33.36,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"SMINISROSE-PK": {
+"desc": "MINIROSE STEM - PINK [Piece]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HEFEI HAPPY TRADING CO.. LTD",
+"email": "HAPPY@CHINESEFLORA.COM",
+"country": "China",
+"city": null,
+"street": "15F, BAOZUAN MASION NO.1 ZHANQIAN R",
+"port": null,
+"lead": 150
+},
+"T9180M": {
+"desc": "6\" CERAMIC PUMPKIN- ORANGE [Case]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 36.84,
+"cbm": 0,
+"max_container": 0,
+"vendor": "GIFTWARES COMPANY, INC.",
+"email": null,
+"country": "United States",
+"city": "ROYERSFORD",
+"street": "436 FIRST AVENUE",
+"port": null,
+"lead": 50
+},
+"9LAME-GD": {
+"desc": "DWI-SATIN LAME 9 GLD | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": 0,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"9LAME-SIL": {
+"desc": "DWI-SATIN LAME #9 SILVER | 50-Yards per ROLL",
+"unit": "Roll",
+"qty_per_unit": 0,
+"first_cost": 6.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CARE-SPATH": {
+"desc": "SPATHIPHYLLUM CARE TAG | 100-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 1.99,
+"cbm": 0,
+"max_container": 0,
+"vendor": "DESIGN88",
+"email": null,
+"country": "United States",
+"city": "MOULTON",
+"street": null,
+"port": null,
+"lead": 50
+},
+"WHT1204": {
+"desc": "10.5\"H X 2W WHITE CERAMIC BOWL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 57.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"GOLD1204": {
+"desc": "10.5\"H X 12W WHITE CERAMIC BOWL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 57.44,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"PY10-BL": {
+"desc": "10\" BLUE TEDDY BEAR | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY10-PK": {
+"desc": "10\" PINK TEDDY BEAR | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY12-SWEATER-TAN": {
+"desc": "12\" TAN BEAR W/SWEATER | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY12-SWEATER-WH": {
+"desc": "12\" WHITE BEAR W/SWEATER | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 1.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY10-RD-LOVE": {
+"desc": "10\" RED W/ LOVE TEDDY BEAR | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"MUG-VDAY": {
+"desc": "VALENTINES DAY MUGS | 36 PIECES PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"GREETCARD-VDAY-15": {
+"desc": "15\" MUSICAL MOTHERS DAY CARD | 12 -Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"GREETCARD-VDAY-8": {
+"desc": "8\" MUSICAL MOTHERS DAY CARD | 24 -Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 12,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY10-IV": {
+"desc": "10\" IVORY TEDDY BEAR | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 3.5,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY5-WH-GIFT": {
+"desc": "5\" WHITE BEAR IN GIFT BAG | 12 PIECES PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 1,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"22-0537GD": {
+"desc": "8\" GOLD HANGING SPHERE | 4 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"22-0539GD": {
+"desc": "18\" GOLD HANGING SPHERE | 2 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"22-0550GD": {
+"desc": "36\" x 60\" GOLD METAL ARCH BACKDROP STAND | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"22-0551GD": {
+"desc": "36\" x 72\" GOLD METAL ARCH BACKDROP STAND | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": "PORTOFINO INT'L TRADING USA",
+"email": "SALES@PORTOFINOINTL.COM",
+"country": "United States",
+"city": "LOS ANGELES",
+"street": "6541 E. WASHINGTON BLVD.",
+"port": null,
+"lead": 50
+},
+"PY51-BR": {
+"desc": "51\" BROWN PLUSH | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY51-WH": {
+"desc": "51\" WHITE PLUSH | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"PY60-WH": {
+"desc": "60\" WHITE PLUSH | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 20,
+"cbm": 0,
+"max_container": 0,
+"vendor": "ELCO TOY",
+"email": "ELCOTOYS@YAHOO.COM",
+"country": "United States",
+"city": "BROOKLYN",
+"street": "378 CLEVELAND STREET",
+"port": null,
+"lead": 50
+},
+"AMAZON-ADJUSTMENTS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-COST ADVERTISE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-FBA FEES": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-FBA INBOUNDPLACE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-INVENTORY FEE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-PROMO VALUE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-REF FEES": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-REFUNDS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-REVENUE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"AMAZON-SHIPPINGCREDITS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"PICK-HVD-PK24": {
+"desc": "HAPPY VALENTINES DAY PICKS | 24-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 3.6,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"34-12-22": {
+"desc": "JARDINIERE SOLID WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 50.24,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"CH2518": {
+"desc": "GLASS SHADES 2.5 OPEN X 18\" H | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 59.4,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"CH2524": {
+"desc": "GLASS SHADES 2.5 OPEN X 24\" H | 36-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 81,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"S4406": {
+"desc": "SQ 4\" X 4\" OPEN, 6\"H PK 12",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 28.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"4061-06-1618": {
+"desc": "10 5/8\" BELLA VASE - PINK | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 16,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"5110-12-09": {
+"desc": "7 1/2\" SODA VASE | 12 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 34.12,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"5475C": {
+"desc": "3-3/8\" CUBE VOTIVE - 12/cs",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 10,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SMITHERS-OASIS NORTH AMERICA",
+"email": null,
+"country": "United States",
+"city": "KENT",
+"street": null,
+"port": null,
+"lead": 50
+},
+"7282-06-22": {
+"desc": "9.75\" RIDGE VASE | 6 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 23,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"7335-06-4219": {
+"desc": "6.63\" x 6.5\" CYLINDER VASE | 6 PC PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 15.95,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SYNDICATE SALES, INC.",
+"email": null,
+"country": "United States",
+"city": "KOKOMO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"AMZ86PCE-12": {
+"desc": "8.5 x 7\" \" HANDLED WICKER BASKET | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 0,
+"first_cost": 19.8,
+"cbm": 0,
+"max_container": 0,
+"vendor": "JUNAN AISHANGJIA HOME FURNISHING CO. LTD.",
+"email": null,
+"country": "China",
+"city": "JUNAN, LINYI, SHANDONG",
+"street": "YINGSHANG VILLAGE, BANQUAN TOWN",
+"port": "QINGDAO",
+"lead": 150
+},
+"C0620": {
+"desc": "6\" X 20\"H CYLINDER PK 4",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 32.04,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"40SAT-MADAM": {
+"desc": "2&3/4\" SATIN RIBBON MADAM DELBAURD | 50-Yards per Roll",
+"unit": "Roll",
+"qty_per_unit": 0,
+"first_cost": 6.72,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"BCALL-IV": {
+"desc": "CALLA LILY IVORY | 9-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"BTUL-PK": {
+"desc": "TULIP LT PINK | 10-Heads per Pack / 12-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 1.86,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"FL089-PK": {
+"desc": "CALA LILLY 24\" PINK | 1-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "NORBEN IMPORT CORP",
+"email": null,
+"country": "United States",
+"city": "HACKENSACK",
+"street": "99 S. NEWMAN STREET",
+"port": null,
+"lead": 50
+},
+"VC75-BK": {
+"desc": "2\" BLACK VOTIVES | 75-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 29.25,
+"cbm": 0,
+"max_container": 0,
+"vendor": "WD IMPORT INC.",
+"email": "WDIMPORTINC@YAHOO.COM",
+"country": "United States",
+"city": "CLIFTON",
+"street": "1500 Main Ave Building B",
+"port": null,
+"lead": 50
+},
+"0050": {
+"desc": "Missing Description",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 15.02,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"BCALL-PU-IV": {
+"desc": "CALLA LILY PURPLE- IVORY | 6-Heads per BUNCH",
+"unit": "Bunch",
+"qty_per_unit": 0,
+"first_cost": 1.56,
+"cbm": 0,
+"max_container": 0,
+"vendor": "SKL INTERNATIONAL CO",
+"email": null,
+"country": "China",
+"city": "JIANGBEI NINGBO",
+"street": "195# HONGDA ROAD PART A",
+"port": "NINGBO",
+"lead": 150
+},
+"REC4418-MGD-12": {
+"desc": "4X4X18 MIRROR GOLD RECTANGLE | 12-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 0,
+"first_cost": 35.82,
+"cbm": 0.087,
+"max_container": 781,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"AMZTSQ14": {
+"desc": "TALL PLATE GLASS SQUARE 14\" PF | 6-Piece Per Box",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 32,
+"cbm": 0.096,
+"max_container": 708,
+"vendor": "YANGZHOU QUANHUA GLASS ARTS CO",
+"email": null,
+"country": "China",
+"city": "BAOYING COUNTY",
+"street": "NO 6 BAOTAI ROAD ANYI",
+"port": "SHANGHAI",
+"lead": 150
+},
+"BLK1204": {
+"desc": "10.5\"OPEN X 12W BLACK CERAMIC BOWL | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": null,
+"cbm": null,
+"max_container": 0,
+"vendor": "Missing",
+"email": "Missing",
+"country": "Missing",
+"city": "Missing",
+"street": "Missing",
+"port": "Missing",
+"lead": null
+},
+"POLY-SV": {
+"desc": "EMBOSSED FOIL POLY BACKING SILVER 20\" | 30-Feet per ROLL",
+"unit": "Roll",
+"qty_per_unit": 0,
+"first_cost": 5.28,
+"cbm": 0,
+"max_container": 0,
+"vendor": "HAMPSHIRE PAPER",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"40DWI-LAV": {
+"desc": "2&1/2\" DELUXE WIRED SHEER LAVEND RIBBON X 50 YARDS",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 4.9,
+"cbm": 0,
+"max_container": 0,
+"vendor": "BERWICK OFFRAY LLC",
+"email": null,
+"country": "United States",
+"city": "CHICAGO",
+"street": null,
+"port": null,
+"lead": 50
+},
+"11074": {
+"desc": "13.25 X 4.50 X 12H CERAMIC EMBOSSED RECTANGLE VASE MATTE WHITE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"11089": {
+"desc": "12 X 5 X 8H CERAMIC RECTANGLE VASE GINGHAM MATTE WHITE | 2-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15293": {
+"desc": "CERAMIC TAPERED RECTANGLE VASE ELLIPTICAL PATTERN MATTE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15295": {
+"desc": "13.25 x 4.50 x 14.50H CERAMIC TAPERED RECTANGLE VASE ELLIPTICAL PATTERN MATTE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15344": {
+"desc": "6 x 6 x 9.5H CERAMIC ROUND POT FLARED BOTTOM GLOSS WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15598": {
+"desc": "6.75 X 2.25 X 5.25H CERAMIC VASE TREE BRANCH MATTE WHITE | 10-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15750": {
+"desc": "7 X 7 X 12H CERAMIC VASE GLOSSY WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"21006": {
+"desc": "11 X 6.75 X 4.75 CERAMIC POT WHITE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"21416": {
+"desc": "7.5 x 7.5 x 6.75H CERAMIC ROUND VASE RIBBED UNEVEN LIP | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"28400": {
+"desc": "9.5 X 9.5 X 5.25H CERAMIC PLANTER WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"33-28040": {
+"desc": "12\" GREEN FLORIST NETTING, 150FT",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"39800": {
+"desc": "CERAMIC ROUND POT MARBLE FINISH WHITE | 4 SET OF 3 - Piece per pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"40DWI-GLD": {
+"desc": "2&1/2\" DELUXE WIRED SHEER GOLD RIBBON X 50 YARDS [Roll]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"40V-BUR": {
+"desc": "2 1/2\" VELVET BURGANDY RIBBON X 25YD",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"40V-RD": {
+"desc": "2 1/2\" VELVET RED RIBBON X 25YD",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"51416": {
+"desc": "CERAMIC RECTANGLE MATTE WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"51472": {
+"desc": "10.5 X 5.25 X 5.25H CERAMIC PLANTER WHITE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"51473": {
+"desc": "10.75 X 5.25 X 10.25H CERAMIC PLANTER WHITE | 4-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"DC55-PK": {
+"desc": "5X5 DIMPLE PINK-SILVER INSIDE CUBE PK 6 [Case]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"M60067-ESLV": {
+"desc": "5 X 5 X 5H GLASS CUBE VASE FLUTED PATTERN | 12-Piece per pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R66-BK-SMIR": {
+"desc": "6X6X6 DESIGNER BLACK CUBE | 8-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SE353-LAV": {
+"desc": "LILAC BUSHX10 LAVENDER",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0628": {
+"desc": "6\" X 28\"H CYLINDER CLEAR, PK 4 [Case]",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R66-BK-6": {
+"desc": "6X6 BLACK GLASS CUBE | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"127-36-03": {
+"desc": "TRUMPET URN - SILVER - PACKED 36",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0606": {
+"desc": "6\"X6\" CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CYL804-ETCH-GD-12": {
+"desc": "8X8X4 CYLINDER ETCH- GOLD | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"MT16": {
+"desc": "6.4\"BASE, 10.6\"OPEN, 16\"H MARTINI PK 4",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SFLAG": {
+"desc": "SMALL FLAG 4\" x 6\" | 50 Piece per pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SX905": {
+"desc": "11\" ROSE VASE CLEAR | 6-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"WD940": {
+"desc": "8\" GATHERING VASE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CH3516": {
+"desc": "GLASS SHADES 3.5 OPEN X 16\" H | 12-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"DL2515": {
+"desc": "GLASS HURRICANE VASE PLEATED 15\"x 2.5\"Open | 36-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GYP-WH": {
+"desc": "GYP STEMS WHITE - 12 STEMS PER BAG [Bag]",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"S555-SV": {
+"desc": "5X5X5 SILVER CUBE | 12 Piece Per Case",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12PSTN-100": {
+"desc": "12\" PLANT STAKES NATURAL | 100-Piece per BUNDLE / 25-BUNDLE per Case",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-PUMPKIN-OR": {
+"desc": "8\" CERAMIC PUMPKIN- ORANGE | 12-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"48-95-09": {
+"desc": "18\" CARDETTE - CRYSTAL | 1000-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"EMB-SV": {
+"desc": "EMBOSSED FOIL NO BACKING SILVER 20\" | 50-Feet per Pack / 25-Pack per Case",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R55-EBK": {
+"desc": "BLACK LINE GLASS CANDLE HOLDER, 5X5 | 12-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"S3306": {
+"desc": "CLEAR SQ 3X3X6 | 12-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"VCAND10-WH-PK72": {
+"desc": "10 HOUR VOTIVE CANDLE | 72-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"WOOD664-BR-PK48": {
+"desc": "6X6X4 WOOD BOX | 48-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-LTORCHD": {
+"desc": "1-1/2\" 38MM DF SATIN LIGHT ORCHID | 50-Yards per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GBAG": {
+"desc": "22X16X58 SUPER HEAVY BLACK BAGS | 1 Roll Per Case",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SQU555": {
+"desc": "5X5X5 CLEAR CUBE | 12-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SQU555-SL": {
+"desc": "5X5X5 SILVER CUBE | 12-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"01110": {
+"desc": "UNFILLED GLASS VOTIVE, 2.5IN | 144-Piece Per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"61164": {
+"desc": "GOLD SQUARE STAND 24 IN | 1-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"62184": {
+"desc": "GOLD IRON HAMMERED BOWL | 1-Piece per Pack",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"WAX-AZ": {
+"desc": "WAX TISSUE AZALEA 24X36 | 400-SHEETS per Pack / 5-Pack per Case",
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"Delivery_0010": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"10HPC-XMAS": {
+"desc": "12\" BAMBOO BASKET POT W/ LINER XMAS | 12 Piece per Pack / 4 Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"8HPC-XMAS": {
+"desc": "10\" BAMBOO BASKET POT W/ LINER XMAS | 12 Piece per Pack / 4 Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AMZSQ12-4": {
+"desc": "12X12 GLASS PLATE SQUARE | 4-Piece Per Box",
+"unit": "Box",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-CYL55-WH": {
+"desc": "5X5 CERAMIC WHITE CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-CYL66-BK": {
+"desc": "6X6 BLACK CERAMIC CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-CYL66-WH": {
+"desc": "6X6 CERAMIC WHITE CYLINDER | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-PUMPKIN-WH": {
+"desc": "8\" CERAMIC PUMPKIN- WHITE | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-R55-BK": {
+"desc": "5X5 BLACK CERAMIC CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-R55-WH": {
+"desc": "5X5 WHITE CERAMIC CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-R66-BK": {
+"desc": "6X6 BLACK CERAMIC CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CER-R66-WH": {
+"desc": "6X6 WHITE CERAMIC CUBES | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL-HUR-2512": {
+"desc": "GLASS HURRICANE VASE 12\"x 2.5\"Open | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL-HUR-2515": {
+"desc": "GLASS HURRICANE VASE 15\"x 2.5\"Open | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL-HUR-2518": {
+"desc": "GLASS HURRICANE VASE 18\"x 2.5\"Open | 12-Piece per Pack (copy)",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL-HUR-3512": {
+"desc": "GLASS HURRICANE VASE 12\"x 3.5\"Open | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL-HUR-3515": {
+"desc": "GLASS HURRICANE VASE 15\"x 3.5\"Open | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL-HUR-3518": {
+"desc": "GLASS HURRICANE VASE 18\"x 3.5\"Open | 12-Piece per Pack",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R55-ETCH-WH": {
+"desc": "CERAMIC SQUARE POT - 5X5X5 12 PC/CASE",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R66-ETCH-WH": {
+"desc": "CERAMIC SQUARE POT 6X6X6 12PC/CASE",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RC-5ARM": {
+"desc": "30” ACRYLIC CANDLEABRA -5 ARM W/ SHADES | PACKED 1 PER PACK / 6 PACKS PER CASE",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"REC4412-WAVE-GD": {
+"desc": "GOLD GLAZED CERAMIC POT 11.75X4X4 | 12PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RMESH-GDGLIT": {
+"desc": "SISAL MESH 20\" GOLD GLITTER | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RMESH-SVGLIT": {
+"desc": "SISAL MESH 20\" SILVER GLITTER | 10-Yards per Roll / 24-Roll per Case",
+"unit": "Roll",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"STED10-BR": {
+"desc": "10\" BROWN BEAR W/SWEATER | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"STED10-WH": {
+"desc": "10\" WHITE BEAR W/SWEATER | 1 PIECE PER PACK",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"W102-XMAS": {
+"desc": "9\" ROUND HANDLED BASKET W/ LINER XMAS | 12-Piece per Pack / 4-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"W105-XMAS": {
+"desc": "10\" ROUND HANDLED BASKET W/ LINER XMAS | 12-Piece per Pack / 3-Pack per Case",
+"unit": "Pack",
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FISCHFREIGHT": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"LOCAL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12CAND-CHOC": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12CAND-FREGREEN": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12CAND-HOLGREEN": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12CAND-LAV": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12CAND-LTLAV": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12CAND-PUR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AMZCYL66-PK6-PF": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0618": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CH8110": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FBALL-GR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FBALL-IV": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FBALL-PU": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FBALL-WH": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RSWR20": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"V0272-PK4": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"11147": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"45-38332": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"45-38352": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CYL610-PK6": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CH3518": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RTING-FUS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0624": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RSWR18": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"V1830-SM": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"VOT-OVRIB": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"24PSTN-25": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CH-2": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CH-3": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GAR-IVY-PK60": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"KP2440-WH": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R6365G": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RWAX-CHOC": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"VCAND10-IV-PK72": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"Delivery_0011": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"Delivery_0012": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"Delivery_0013": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12CAND-BUR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"5BOW-EME": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-SPI": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-YL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CURL-TURQ": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"MTGR404": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RPBOW40-ORG": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RPBOW9-EME": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SLBOW40-PK": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"B9-ILY-FIREWORKS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-SHPK": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-YEL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CAND10-IV-12-OLD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CAND10-WH-12-OLD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CAND12-BK-12-OLD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"KWX-YL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"PICK-HBD-24": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"S13694RD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"STED12-BR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"STED12-WH": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"X1010-WH": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"10QT": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"50MM-GR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CYL33-SNFK": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FRP01-XMAS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"H0404": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"JAR10": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RNCONE-RD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RNCONE-RDGLIT": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RNCONE-SVGLIT": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SLASH-FRO": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SLASH-GD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SLASH-SV": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"VOT-CYLRIB": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"VOT-DIMP": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"VOT-RIBB-AMB": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"PICK-UP": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"10-20002": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"40MM-AST": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"40V1-RD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"72-0016CLAB": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0612": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CAND12-GR-12": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CAND12-OR-12": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CAND12-YL-12": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FM5-MIX": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GEM25-CL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"R3412": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"W1850": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"X1026-GR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"X1056-WH": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"XT117/4": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"X2971-GD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"28LP-06": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"35LED": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"6LP-06": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"74-0117": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-BUR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-BYB": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-CHAM": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-CHO": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-CIT": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-GRE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-LAV": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-MINT": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-NVBL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-OR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-PEA": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-PUR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-RBL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-SV": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DFS-WINE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9DP": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"9LP-06": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AMZLSQ10X4-6": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CANECONE": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"DC44-GD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"PICK-ILY-24": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RCURL-BAS": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RWAX-AZALEA": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RWAX-BK": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RWAX-PUR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RWAX-TROPICAL": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RWAX-VDAY": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SB10": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"VC75-CLEAR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"X2961-NATLAC": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AMZFCAND3-IV-24-USA": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AMZFCAND3-IV-USA": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"MIRR-RECT-GD-S": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"WD555M": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"WD999": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"EFC12": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"WT3-100": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0840": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"KWX-GD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RBFLY-1": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15PSTN": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"AB2312-PK4": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CS445": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"IND-FCAND3-WH-PK12": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"IND-FCAND3-WH-PK24": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"IND-FCAND3-WH-PK36": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"IND-FCAND3-WH-PK72": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RIBWD032": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"12PSTN": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"3SAT-FOY": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"EUC-CAR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"KWX-SV": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"RNCONE-RW": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"US-FCAND3-WH-12": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"US-FCAND3-WH-72": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"US-FCAND3-WH-PK24": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"US-FCAND3-WH-PK36": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"WT3-25": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"DF348B": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"FCAND3-WH-PK72": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"IND-FCAND3-IV-PK36": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"IND-FCAND3-IV-PK72": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"LOBCONE-500": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"M666": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SGV01FRD": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SPEAR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SQCAND2X2": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SQCAND3X3": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"SQCAND4X4": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"W20X18G-0.75LB": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15711": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15785": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"1666D": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"18505": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"19702": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"22521": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"22530": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"51457": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0816": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CSTND-LIN10": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"CSTND-LRCIR": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"GL514403": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"PLUSH-BUNNY": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"11529": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"11533": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15201": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15288": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15298": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"15636": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"1666D-PK": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"18511": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"2363-6": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"24908": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"25107": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"41621": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+},
+"C0607": {
+"desc": null,
+"unit": null,
+"qty_per_unit": 0,
+"first_cost": 0,
+"cbm": 0,
+"max_container": 0,
+"vendor": null,
+"email": null,
+"country": null,
+"city": null,
+"street": null,
+"port": null,
+"lead": null
+}
+}
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 8105df2005c71e0c6fd606ab6225a23d22c48c65..5bb6f53fcbe74eb7e345c7c3cbaee74af0b6ab06 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,15 +1,26 @@
-# PINNED (2026-07-23): the Space rebuilds from scratch every deploy — an open bound let it pull
-# a newer streamlit than every local verification runs on, and entity drawers (st.dialog) stopped
-# opening live. Pin = the version the QA suite actually proves. Bump deliberately, never by rebuild.
-streamlit==1.58.0
-pandas>=2.0
-altair>=5.0
-plotly>=5.24,<7
-requests>=2.28
-python-dotenv>=1.0
-huggingface_hub>=0.20
-openpyxl>=3.1
-reportlab>=4.0
-jinja2>=3.1
-pyyaml>=6.0
-duckdb>=1.0
+# AIOS web API — the FastAPI backend + the platform data-layer deps it reuses.
+#
+# ⛔ STREAMLIT IS GONE (EXIT-6, 2026-08-04) — do not add it back. The line here read
+# `streamlit==1.58.0` with the comment "included only because the shared modules/core may import
+# it at load; it is never served". That stopped being true when the shared layer was cleaned, and
+# it stayed in THIS file — the one the Dockerfile actually installs — while `api/requirements.txt`
+# had already dropped it and a gate reported the omission "verified". ~250 MB of image for a
+# package nothing imported.
+#
+# The lesson is the file, not the package: the PINNED intent and the SHIPPED manifest are two
+# different documents, and checking only the one you wrote is how the other rots.
+# `api/verify_no_streamlit.py` now checks BOTH, and proves the API imports with streamlit,
+# plotly, altair, openpyxl, reportlab and jinja2 all blocked at sys.meta_path.
+# No altair/plotly/openpyxl/reportlab either — those were Streamlit UI/export only.
+fastapi>=0.139
+uvicorn[standard]>=0.30
+python-dotenv>=1.0
+pandas>=2.0
+requests>=2.28
+huggingface_hub>=0.20
+duckdb>=1.0
+pyyaml>=6.0
+pillow>=10.0
+beautifulsoup4>=4.12
+lxml>=5.0
+cryptography>=42.0
diff --git a/web/.gitignore b/web/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..a547bf36d8d11a4f89c59c144f24795749086dd1
--- /dev/null
+++ b/web/.gitignore
@@ -0,0 +1,24 @@
+# Logs
+logs
+*.log
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+pnpm-debug.log*
+lerna-debug.log*
+
+node_modules
+dist
+dist-ssr
+*.local
+
+# Editor directories and files
+.vscode/*
+!.vscode/extensions.json
+.idea
+.DS_Store
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?
diff --git a/web/.oxlintrc.json b/web/.oxlintrc.json
new file mode 100644
index 0000000000000000000000000000000000000000..6fa991dad24b57eb19c9cefba8ea12fd1870ed07
--- /dev/null
+++ b/web/.oxlintrc.json
@@ -0,0 +1,8 @@
+{
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
+ "plugins": ["react", "typescript", "oxc"],
+ "rules": {
+ "react/rules-of-hooks": "error",
+ "react/only-export-components": ["warn", { "allowConstantExport": true }]
+ }
+}
diff --git a/web/README.md b/web/README.md
new file mode 100644
index 0000000000000000000000000000000000000000..d6af7e39ffac6183b891838d6ab1d6eb7ac70dda
--- /dev/null
+++ b/web/README.md
@@ -0,0 +1,32 @@
+# React + TypeScript + Vite
+
+This template provides a minimal setup to get React working in Vite with HMR and some Oxlint rules.
+
+Currently, two official plugins are available:
+
+- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
+- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
+
+## React Compiler
+
+The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
+
+## Expanding the Oxlint configuration
+
+If you are developing a production application, we recommend enabling type-aware lint rules by installing `oxlint-tsgolint` and editing `.oxlintrc.json`:
+
+```json
+{
+ "$schema": "./node_modules/oxlint/configuration_schema.json",
+ "plugins": ["react", "typescript", "oxc"],
+ "options": {
+ "typeAware": true
+ },
+ "rules": {
+ "react/rules-of-hooks": "error",
+ "react/only-export-components": ["warn", { "allowConstantExport": true }]
+ }
+}
+```
+
+See the [Oxlint rules documentation](https://oxc.rs/docs/guide/usage/linter/rules) for the full list of rules and categories.
diff --git a/web/dist-embed/favicon.svg b/web/dist-embed/favicon.svg
new file mode 100644
index 0000000000000000000000000000000000000000..9a8288bac88e71235e39803425a652f7c548d677
--- /dev/null
+++ b/web/dist-embed/favicon.svg
@@ -0,0 +1,8 @@
+
+
diff --git a/web/dist-embed/index.html b/web/dist-embed/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..1c271ca0d2576d61b3a51c88221b6ddacab49f2b
--- /dev/null
+++ b/web/dist-embed/index.html
@@ -0,0 +1,408 @@
+
+
+
+
+
+ Loopable
+
+
+
+
+
+
+
+
diff --git a/web/dist-embed/sample_customers.json b/web/dist-embed/sample_customers.json
new file mode 100644
index 0000000000000000000000000000000000000000..2fbe6972ae4868b68deae2dc1d35966313ab7560
--- /dev/null
+++ b/web/dist-embed/sample_customers.json
@@ -0,0 +1,511 @@
+{
+ "fields": [
+ {
+ "key": "customer",
+ "label": "Customer",
+ "type": "text",
+ "source": "odoo",
+ "pinned": true,
+ "default": true,
+ "description": "The customer's name in Odoo. One row per customer who ordered in the last 24 months."
+ },
+ {
+ "key": "odoo_status",
+ "label": "Odoo record",
+ "type": "status",
+ "source": "odoo",
+ "default": false,
+ "description": "Whether this customer still exists in Odoo. Archived means deleted there."
+ },
+ {
+ "key": "agent",
+ "label": "Agent",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "The sales agent who owns this account."
+ },
+ {
+ "key": "dba",
+ "label": "DBA",
+ "type": "select",
+ "source": "odoo",
+ "default": false,
+ "options": [
+ "Fisch",
+ "Royal",
+ "Both"
+ ],
+ "description": "The brand this customer buys from - Fisch, Royal, or both. Amazon-channel orders are not a DBA."
+ },
+ {
+ "key": "salesperson",
+ "label": "Salesperson",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Who keyed in most of this customer's orders \u2014 not the Agent, who owns the account."
+ },
+ {
+ "key": "city",
+ "label": "City",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "City on the customer's Odoo address."
+ },
+ {
+ "key": "state",
+ "label": "State",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "State or province on the customer's Odoo address."
+ },
+ {
+ "key": "country",
+ "label": "Country",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Country on the customer's Odoo address."
+ },
+ {
+ "key": "zip",
+ "label": "ZIP",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Postal code on the customer's Odoo address."
+ },
+ {
+ "key": "customer_since",
+ "label": "Customer since",
+ "type": "date",
+ "source": "odoo",
+ "default": false,
+ "description": "When this customer was first set up in Odoo."
+ },
+ {
+ "key": "tags",
+ "label": "Tags",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Odoo labels on this customer, comma-separated."
+ },
+ {
+ "key": "pricelist",
+ "label": "Price list",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The price list this customer buys on."
+ },
+ {
+ "key": "payment_terms",
+ "label": "Payment terms",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Payment terms on this customer's account \u2014 Net 30, for example."
+ },
+ {
+ "key": "last_order",
+ "label": "Last order",
+ "type": "date",
+ "source": "odoo",
+ "default": true,
+ "description": "Date of the most recent confirmed order."
+ },
+ {
+ "key": "overdue_days",
+ "label": "Overdue days",
+ "type": "int",
+ "source": "odoo",
+ "default": true,
+ "description": "How many days late this customer is running against their own usual ordering rhythm."
+ },
+ {
+ "_note": "filterable:false \u2014 DERIVED ANALYTIC: est_missed is min(cycles missed, 3) x AOV, a score we compute rather than an object the business has, so a condition on it would read as a fact about the customer when it is a fact about our arithmetic. It still displays and still sorts. Until wave 6 this flag also covered the frozen-window presets (revenue_ytd / revenue_ly / orders_24m / aov / yoy_pct); those are now DELETED outright under the owner's no-buildable-presets rule \u2014 see _comment. est_missed itself STAYS: no creatable measure or formula reproduces the cadence model behind it.",
+ "key": "est_missed",
+ "label": "Est. missed $",
+ "type": "currency",
+ "source": "odoo",
+ "default": true,
+ "agg": "sum",
+ "filterable": false,
+ "description": "Estimated sales missed while quiet: missed orders (capped at 3) times average order value. An estimate, not money owed."
+ },
+ {
+ "key": "ar_open",
+ "label": "AR open $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Invoiced money owed, not yet overdue."
+ },
+ {
+ "key": "ar_overdue",
+ "label": "AR overdue $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Invoiced money past due \u2014 same basis as the Collections page."
+ },
+ {
+ "key": "ar_exposure",
+ "label": "Credit exposure $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "The most you could be out if they stopped paying today: open, overdue, draft and not-yet-invoiced."
+ },
+ {
+ "key": "ar_aged_1_30",
+ "label": "1-30 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 1 and 30 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_31_60",
+ "label": "31-60 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 31 and 60 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_61_90",
+ "label": "61-90 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 61 and 90 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_90_plus",
+ "label": "90+ days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue by more than 90 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "days_to_pay",
+ "label": "Days to pay",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Average days to pay an invoice in full. Blank means no fully paid invoice yet."
+ },
+ {
+ "key": "top_category",
+ "label": "Top category",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The category this customer spent the most on in the last 12 months."
+ },
+ {
+ "key": "top_category_pct",
+ "label": "Top category %",
+ "type": "pct",
+ "source": "odoo",
+ "default": false,
+ "description": "Share of last-12-months spend that went to the top category."
+ },
+ {
+ "key": "sku_count",
+ "label": "SKUs bought",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Distinct products bought in the last 12 months."
+ },
+ {
+ "key": "top_sku",
+ "label": "Top SKU",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The product this customer spent the most on in the last 12 months."
+ },
+ {
+ "key": "days_since",
+ "label": "Days since order",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Days since the last confirmed order."
+ },
+ {
+ "key": "typical_gap_days",
+ "label": "Typical gap days",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Days this customer usually goes between orders, from their own history."
+ },
+ {
+ "key": "notes",
+ "label": "Notes",
+ "type": "text",
+ "source": "overlay",
+ "default": false,
+ "description": "Your notes on this customer. Saved in this app only, visible only to you."
+ }
+ ],
+ "rows": [
+ {
+ "pid": 101,
+ "customer": "Poppy Flowers",
+ "status": "New",
+ "agent": "Naomi Linnell Rivera",
+ "city": "Charlottesville",
+ "state": "Virginia (US)",
+ "last_order": "2026-07-21",
+ "est_missed": 0,
+ "notes": "",
+ "country": "United States",
+ "zip": "02720",
+ "payment_terms": "30 Days",
+ "pricelist": "Fisch 1 (USD)",
+ "tags": "Royal",
+ "customer_since": "2023-01-10",
+ "salesperson": "Jessica",
+ "ar_open": 0,
+ "ar_overdue": 0,
+ "ar_exposure": 0,
+ "top_category": "Styrofoam",
+ "top_category_pct": 0.47,
+ "sku_count": 93,
+ "top_sku": "AQUAFOAM FLORAL FOAM BRICK | 48-Piece per Pack",
+ "days_to_pay": 34,
+ "_created": "2023-01-15 09:10:00",
+ "lat": 25.7617,
+ "lon": -80.1918,
+ "odoo_status": "Archived",
+ "dba": "Royal"
+ },
+ {
+ "pid": 102,
+ "customer": "Meadow & Vine Wholesale",
+ "status": "Growing",
+ "agent": "Carla Jimenez",
+ "city": "Portland",
+ "state": "Oregon (US)",
+ "last_order": "2026-07-19",
+ "est_missed": 0,
+ "notes": "Expanding to a second storefront.",
+ "country": "United States",
+ "zip": "77041",
+ "payment_terms": "Immediate Payment",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Royal, Key account",
+ "customer_since": "2024-02-11",
+ "salesperson": "Naomi",
+ "ar_open": 1240.5,
+ "ar_overdue": 0,
+ "ar_exposure": 1740.5,
+ "top_category": "Ribbon",
+ "top_category_pct": 0.95,
+ "sku_count": 4,
+ "top_sku": "2\" X 24\" X 36\" GREEN STYROFOAM BOARD",
+ "days_to_pay": null,
+ "_created": "2023-02-15 09:11:00",
+ "lat": 27.9506,
+ "lon": -82.4572,
+ "odoo_status": "Active",
+ "dba": "Fisch"
+ },
+ {
+ "pid": 103,
+ "customer": "Bluestem Floral Supply",
+ "status": "Growing",
+ "agent": "Naomi Linnell Rivera",
+ "city": "Kansas City",
+ "state": "Missouri (US)",
+ "last_order": "2026-07-17",
+ "est_missed": 0,
+ "notes": "",
+ "country": "United States",
+ "zip": "11219",
+ "payment_terms": "60 Days",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Fisch",
+ "customer_since": "2025-03-12",
+ "salesperson": "Karen",
+ "ar_open": 0,
+ "ar_overdue": 5120.25,
+ "ar_exposure": 5120.25,
+ "top_category": "Foams & Finishes",
+ "top_category_pct": 0.31,
+ "sku_count": 27,
+ "top_sku": "SATIN RIBBON 2IN",
+ "days_to_pay": 61,
+ "_created": "2023-03-15 09:12:00",
+ "lat": 28.5384,
+ "lon": -81.3789,
+ "odoo_status": "Active",
+ "dba": "Both"
+ },
+ {
+ "pid": 104,
+ "customer": "Camellia Row Florist",
+ "status": "Declining",
+ "agent": "Devon Marsh",
+ "city": "Savannah",
+ "state": "Georgia (US)",
+ "last_order": "2026-05-30",
+ "est_missed": 41200,
+ "notes": "Switched some volume to a local grower.",
+ "country": "United States",
+ "zip": "07649",
+ "payment_terms": "30 Days",
+ "pricelist": "Fisch 1 (USD)",
+ "tags": "(none)",
+ "customer_since": "2026-04-13",
+ "salesperson": "(none)",
+ "ar_open": 8300,
+ "ar_overdue": 940,
+ "ar_exposure": 11440,
+ "top_category": "All",
+ "top_category_pct": 1.0,
+ "sku_count": 1,
+ "top_sku": "(none)",
+ "days_to_pay": 12,
+ "_created": "2023-04-15 09:13:00",
+ "lat": 30.3322,
+ "lon": -81.6557,
+ "odoo_status": "Active",
+ "dba": "Royal"
+ },
+ {
+ "pid": 105,
+ "customer": "Harborlight Wholesale Blooms",
+ "status": "Growing",
+ "agent": "Carla Jimenez",
+ "city": "Seattle",
+ "state": "Washington (US)",
+ "last_order": "2026-07-22",
+ "est_missed": 0,
+ "notes": "Top-10 account.",
+ "country": "United States",
+ "zip": "33125",
+ "payment_terms": "Immediate Payment",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Royal",
+ "customer_since": "2023-05-14",
+ "salesperson": "Jessica",
+ "ar_open": 0,
+ "ar_overdue": 0,
+ "ar_exposure": 0,
+ "top_category": "Styrofoam",
+ "top_category_pct": 0.47,
+ "sku_count": 93,
+ "top_sku": "AQUAFOAM FLORAL FOAM BRICK | 48-Piece per Pack",
+ "days_to_pay": 34,
+ "_created": "2023-05-15 09:14:00",
+ "lat": 26.1224,
+ "lon": -80.1373,
+ "odoo_status": "Active",
+ "dba": ""
+ },
+ {
+ "pid": 106,
+ "customer": "Dogwood & Fern Co.",
+ "status": "Dormant",
+ "agent": "Devon Marsh",
+ "city": "Asheville",
+ "state": "North Carolina (US)",
+ "last_order": "2026-02-11",
+ "est_missed": 52400,
+ "notes": "No spring order this year.",
+ "country": "United States",
+ "zip": "90210",
+ "payment_terms": "60 Days",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Royal, Key account",
+ "customer_since": "2024-06-15",
+ "salesperson": "Naomi",
+ "ar_open": 1240.5,
+ "ar_overdue": 0,
+ "ar_exposure": 1740.5,
+ "top_category": "Ribbon",
+ "top_category_pct": 0.95,
+ "sku_count": 4,
+ "top_sku": "2\" X 24\" X 36\" GREEN STYROFOAM BOARD",
+ "days_to_pay": null,
+ "_created": "2023-06-15 09:15:00",
+ "lat": 27.3364,
+ "lon": -82.5307,
+ "odoo_status": "Active",
+ "dba": "Fisch"
+ },
+ {
+ "pid": 107,
+ "customer": "Verbena Market Florals",
+ "status": "Lost",
+ "agent": "Naomi Linnell Rivera",
+ "city": "Austin",
+ "state": "Texas (US)",
+ "last_order": "2025-11-04",
+ "est_missed": 78300,
+ "notes": "Went with a competitor on freight terms.",
+ "country": "United States",
+ "zip": "08701",
+ "payment_terms": "30 Days",
+ "pricelist": "Fisch 1 (USD)",
+ "tags": "Fisch",
+ "customer_since": "2025-07-16",
+ "salesperson": "Karen",
+ "ar_open": 0,
+ "ar_overdue": 5120.25,
+ "ar_exposure": 5120.25,
+ "top_category": "Foams & Finishes",
+ "top_category_pct": 0.31,
+ "sku_count": 27,
+ "top_sku": "SATIN RIBBON 2IN",
+ "days_to_pay": 61,
+ "_created": "2023-07-15 09:16:00",
+ "lat": null,
+ "lon": null,
+ "odoo_status": "Active",
+ "dba": "Both"
+ },
+ {
+ "pid": 108,
+ "customer": "Larkspur Lane Supply",
+ "status": "New",
+ "agent": "Carla Jimenez",
+ "city": "Denver",
+ "state": "Colorado (US)",
+ "last_order": "2026-07-14",
+ "est_missed": 0,
+ "notes": "First order in April.",
+ "country": "United States",
+ "zip": "60614",
+ "payment_terms": "Immediate Payment",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "(none)",
+ "customer_since": "2026-08-17",
+ "salesperson": "(none)",
+ "ar_open": 8300,
+ "ar_overdue": 940,
+ "ar_exposure": 11440,
+ "top_category": "All",
+ "top_category_pct": 1.0,
+ "sku_count": 1,
+ "top_sku": "(none)",
+ "days_to_pay": 12,
+ "_created": "2023-08-15 09:17:00",
+ "lat": 33.749,
+ "lon": -84.388,
+ "odoo_status": "Active",
+ "dba": "Royal"
+ }
+ ]
+}
diff --git a/web/index.html b/web/index.html
new file mode 100644
index 0000000000000000000000000000000000000000..af3619ad7cada483ab9b0b64caf178ce69a9abdb
--- /dev/null
+++ b/web/index.html
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+ Loopable
+
+
+
+
+
+
+
diff --git a/web/package.json b/web/package.json
new file mode 100644
index 0000000000000000000000000000000000000000..f19240d9f05e302af0b877b3adfd2c2cc77050b2
--- /dev/null
+++ b/web/package.json
@@ -0,0 +1,33 @@
+{
+ "name": "web",
+ "private": true,
+ "version": "0.0.0",
+ "type": "module",
+ "scripts": {
+ "dev": "vite",
+ "build": "tsc -b && vite build",
+ "build:embed": "vite build --config vite.config.embed.ts",
+ "lint": "oxlint",
+ "preview": "vite preview"
+ },
+ "dependencies": {
+ "@glideapps/glide-data-grid": "^6.0.3",
+ "lodash": "^4.18.1",
+ "marked": "^4.3.0",
+ "react": "^18.3.1",
+ "react-dom": "^18.3.1",
+ "vega": "^6.3.1",
+ "vega-embed": "^7.1.0",
+ "vega-lite": "^6.4.3"
+ },
+ "devDependencies": {
+ "@types/node": "^24.13.2",
+ "@types/react": "^18.3.12",
+ "@types/react-dom": "^18.3.1",
+ "@vitejs/plugin-react": "^6.0.3",
+ "oxlint": "^1.71.0",
+ "typescript": "~6.0.2",
+ "vite": "^8.1.1",
+ "vite-plugin-singlefile": "^2.3.3"
+ }
+}
diff --git a/web/public/favicon.svg b/web/public/favicon.svg
new file mode 100644
index 0000000000000000000000000000000000000000..9a8288bac88e71235e39803425a652f7c548d677
--- /dev/null
+++ b/web/public/favicon.svg
@@ -0,0 +1,8 @@
+
+
diff --git a/web/public/sample_customers.json b/web/public/sample_customers.json
new file mode 100644
index 0000000000000000000000000000000000000000..2fbe6972ae4868b68deae2dc1d35966313ab7560
--- /dev/null
+++ b/web/public/sample_customers.json
@@ -0,0 +1,511 @@
+{
+ "fields": [
+ {
+ "key": "customer",
+ "label": "Customer",
+ "type": "text",
+ "source": "odoo",
+ "pinned": true,
+ "default": true,
+ "description": "The customer's name in Odoo. One row per customer who ordered in the last 24 months."
+ },
+ {
+ "key": "odoo_status",
+ "label": "Odoo record",
+ "type": "status",
+ "source": "odoo",
+ "default": false,
+ "description": "Whether this customer still exists in Odoo. Archived means deleted there."
+ },
+ {
+ "key": "agent",
+ "label": "Agent",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "The sales agent who owns this account."
+ },
+ {
+ "key": "dba",
+ "label": "DBA",
+ "type": "select",
+ "source": "odoo",
+ "default": false,
+ "options": [
+ "Fisch",
+ "Royal",
+ "Both"
+ ],
+ "description": "The brand this customer buys from - Fisch, Royal, or both. Amazon-channel orders are not a DBA."
+ },
+ {
+ "key": "salesperson",
+ "label": "Salesperson",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Who keyed in most of this customer's orders \u2014 not the Agent, who owns the account."
+ },
+ {
+ "key": "city",
+ "label": "City",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "City on the customer's Odoo address."
+ },
+ {
+ "key": "state",
+ "label": "State",
+ "type": "text",
+ "source": "odoo",
+ "default": true,
+ "description": "State or province on the customer's Odoo address."
+ },
+ {
+ "key": "country",
+ "label": "Country",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Country on the customer's Odoo address."
+ },
+ {
+ "key": "zip",
+ "label": "ZIP",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Postal code on the customer's Odoo address."
+ },
+ {
+ "key": "customer_since",
+ "label": "Customer since",
+ "type": "date",
+ "source": "odoo",
+ "default": false,
+ "description": "When this customer was first set up in Odoo."
+ },
+ {
+ "key": "tags",
+ "label": "Tags",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Odoo labels on this customer, comma-separated."
+ },
+ {
+ "key": "pricelist",
+ "label": "Price list",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The price list this customer buys on."
+ },
+ {
+ "key": "payment_terms",
+ "label": "Payment terms",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "Payment terms on this customer's account \u2014 Net 30, for example."
+ },
+ {
+ "key": "last_order",
+ "label": "Last order",
+ "type": "date",
+ "source": "odoo",
+ "default": true,
+ "description": "Date of the most recent confirmed order."
+ },
+ {
+ "key": "overdue_days",
+ "label": "Overdue days",
+ "type": "int",
+ "source": "odoo",
+ "default": true,
+ "description": "How many days late this customer is running against their own usual ordering rhythm."
+ },
+ {
+ "_note": "filterable:false \u2014 DERIVED ANALYTIC: est_missed is min(cycles missed, 3) x AOV, a score we compute rather than an object the business has, so a condition on it would read as a fact about the customer when it is a fact about our arithmetic. It still displays and still sorts. Until wave 6 this flag also covered the frozen-window presets (revenue_ytd / revenue_ly / orders_24m / aov / yoy_pct); those are now DELETED outright under the owner's no-buildable-presets rule \u2014 see _comment. est_missed itself STAYS: no creatable measure or formula reproduces the cadence model behind it.",
+ "key": "est_missed",
+ "label": "Est. missed $",
+ "type": "currency",
+ "source": "odoo",
+ "default": true,
+ "agg": "sum",
+ "filterable": false,
+ "description": "Estimated sales missed while quiet: missed orders (capped at 3) times average order value. An estimate, not money owed."
+ },
+ {
+ "key": "ar_open",
+ "label": "AR open $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Invoiced money owed, not yet overdue."
+ },
+ {
+ "key": "ar_overdue",
+ "label": "AR overdue $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Invoiced money past due \u2014 same basis as the Collections page."
+ },
+ {
+ "key": "ar_exposure",
+ "label": "Credit exposure $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "The most you could be out if they stopped paying today: open, overdue, draft and not-yet-invoiced."
+ },
+ {
+ "key": "ar_aged_1_30",
+ "label": "1-30 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 1 and 30 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_31_60",
+ "label": "31-60 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 31 and 60 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_61_90",
+ "label": "61-90 days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue between 61 and 90 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "ar_aged_90_plus",
+ "label": "90+ days $",
+ "type": "currency",
+ "source": "odoo",
+ "default": false,
+ "description": "Overdue by more than 90 days. The four aging buckets sum to AR overdue $."
+ },
+ {
+ "key": "days_to_pay",
+ "label": "Days to pay",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Average days to pay an invoice in full. Blank means no fully paid invoice yet."
+ },
+ {
+ "key": "top_category",
+ "label": "Top category",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The category this customer spent the most on in the last 12 months."
+ },
+ {
+ "key": "top_category_pct",
+ "label": "Top category %",
+ "type": "pct",
+ "source": "odoo",
+ "default": false,
+ "description": "Share of last-12-months spend that went to the top category."
+ },
+ {
+ "key": "sku_count",
+ "label": "SKUs bought",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Distinct products bought in the last 12 months."
+ },
+ {
+ "key": "top_sku",
+ "label": "Top SKU",
+ "type": "text",
+ "source": "odoo",
+ "default": false,
+ "description": "The product this customer spent the most on in the last 12 months."
+ },
+ {
+ "key": "days_since",
+ "label": "Days since order",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Days since the last confirmed order."
+ },
+ {
+ "key": "typical_gap_days",
+ "label": "Typical gap days",
+ "type": "int",
+ "source": "odoo",
+ "default": false,
+ "description": "Days this customer usually goes between orders, from their own history."
+ },
+ {
+ "key": "notes",
+ "label": "Notes",
+ "type": "text",
+ "source": "overlay",
+ "default": false,
+ "description": "Your notes on this customer. Saved in this app only, visible only to you."
+ }
+ ],
+ "rows": [
+ {
+ "pid": 101,
+ "customer": "Poppy Flowers",
+ "status": "New",
+ "agent": "Naomi Linnell Rivera",
+ "city": "Charlottesville",
+ "state": "Virginia (US)",
+ "last_order": "2026-07-21",
+ "est_missed": 0,
+ "notes": "",
+ "country": "United States",
+ "zip": "02720",
+ "payment_terms": "30 Days",
+ "pricelist": "Fisch 1 (USD)",
+ "tags": "Royal",
+ "customer_since": "2023-01-10",
+ "salesperson": "Jessica",
+ "ar_open": 0,
+ "ar_overdue": 0,
+ "ar_exposure": 0,
+ "top_category": "Styrofoam",
+ "top_category_pct": 0.47,
+ "sku_count": 93,
+ "top_sku": "AQUAFOAM FLORAL FOAM BRICK | 48-Piece per Pack",
+ "days_to_pay": 34,
+ "_created": "2023-01-15 09:10:00",
+ "lat": 25.7617,
+ "lon": -80.1918,
+ "odoo_status": "Archived",
+ "dba": "Royal"
+ },
+ {
+ "pid": 102,
+ "customer": "Meadow & Vine Wholesale",
+ "status": "Growing",
+ "agent": "Carla Jimenez",
+ "city": "Portland",
+ "state": "Oregon (US)",
+ "last_order": "2026-07-19",
+ "est_missed": 0,
+ "notes": "Expanding to a second storefront.",
+ "country": "United States",
+ "zip": "77041",
+ "payment_terms": "Immediate Payment",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Royal, Key account",
+ "customer_since": "2024-02-11",
+ "salesperson": "Naomi",
+ "ar_open": 1240.5,
+ "ar_overdue": 0,
+ "ar_exposure": 1740.5,
+ "top_category": "Ribbon",
+ "top_category_pct": 0.95,
+ "sku_count": 4,
+ "top_sku": "2\" X 24\" X 36\" GREEN STYROFOAM BOARD",
+ "days_to_pay": null,
+ "_created": "2023-02-15 09:11:00",
+ "lat": 27.9506,
+ "lon": -82.4572,
+ "odoo_status": "Active",
+ "dba": "Fisch"
+ },
+ {
+ "pid": 103,
+ "customer": "Bluestem Floral Supply",
+ "status": "Growing",
+ "agent": "Naomi Linnell Rivera",
+ "city": "Kansas City",
+ "state": "Missouri (US)",
+ "last_order": "2026-07-17",
+ "est_missed": 0,
+ "notes": "",
+ "country": "United States",
+ "zip": "11219",
+ "payment_terms": "60 Days",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Fisch",
+ "customer_since": "2025-03-12",
+ "salesperson": "Karen",
+ "ar_open": 0,
+ "ar_overdue": 5120.25,
+ "ar_exposure": 5120.25,
+ "top_category": "Foams & Finishes",
+ "top_category_pct": 0.31,
+ "sku_count": 27,
+ "top_sku": "SATIN RIBBON 2IN",
+ "days_to_pay": 61,
+ "_created": "2023-03-15 09:12:00",
+ "lat": 28.5384,
+ "lon": -81.3789,
+ "odoo_status": "Active",
+ "dba": "Both"
+ },
+ {
+ "pid": 104,
+ "customer": "Camellia Row Florist",
+ "status": "Declining",
+ "agent": "Devon Marsh",
+ "city": "Savannah",
+ "state": "Georgia (US)",
+ "last_order": "2026-05-30",
+ "est_missed": 41200,
+ "notes": "Switched some volume to a local grower.",
+ "country": "United States",
+ "zip": "07649",
+ "payment_terms": "30 Days",
+ "pricelist": "Fisch 1 (USD)",
+ "tags": "(none)",
+ "customer_since": "2026-04-13",
+ "salesperson": "(none)",
+ "ar_open": 8300,
+ "ar_overdue": 940,
+ "ar_exposure": 11440,
+ "top_category": "All",
+ "top_category_pct": 1.0,
+ "sku_count": 1,
+ "top_sku": "(none)",
+ "days_to_pay": 12,
+ "_created": "2023-04-15 09:13:00",
+ "lat": 30.3322,
+ "lon": -81.6557,
+ "odoo_status": "Active",
+ "dba": "Royal"
+ },
+ {
+ "pid": 105,
+ "customer": "Harborlight Wholesale Blooms",
+ "status": "Growing",
+ "agent": "Carla Jimenez",
+ "city": "Seattle",
+ "state": "Washington (US)",
+ "last_order": "2026-07-22",
+ "est_missed": 0,
+ "notes": "Top-10 account.",
+ "country": "United States",
+ "zip": "33125",
+ "payment_terms": "Immediate Payment",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Royal",
+ "customer_since": "2023-05-14",
+ "salesperson": "Jessica",
+ "ar_open": 0,
+ "ar_overdue": 0,
+ "ar_exposure": 0,
+ "top_category": "Styrofoam",
+ "top_category_pct": 0.47,
+ "sku_count": 93,
+ "top_sku": "AQUAFOAM FLORAL FOAM BRICK | 48-Piece per Pack",
+ "days_to_pay": 34,
+ "_created": "2023-05-15 09:14:00",
+ "lat": 26.1224,
+ "lon": -80.1373,
+ "odoo_status": "Active",
+ "dba": ""
+ },
+ {
+ "pid": 106,
+ "customer": "Dogwood & Fern Co.",
+ "status": "Dormant",
+ "agent": "Devon Marsh",
+ "city": "Asheville",
+ "state": "North Carolina (US)",
+ "last_order": "2026-02-11",
+ "est_missed": 52400,
+ "notes": "No spring order this year.",
+ "country": "United States",
+ "zip": "90210",
+ "payment_terms": "60 Days",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "Royal, Key account",
+ "customer_since": "2024-06-15",
+ "salesperson": "Naomi",
+ "ar_open": 1240.5,
+ "ar_overdue": 0,
+ "ar_exposure": 1740.5,
+ "top_category": "Ribbon",
+ "top_category_pct": 0.95,
+ "sku_count": 4,
+ "top_sku": "2\" X 24\" X 36\" GREEN STYROFOAM BOARD",
+ "days_to_pay": null,
+ "_created": "2023-06-15 09:15:00",
+ "lat": 27.3364,
+ "lon": -82.5307,
+ "odoo_status": "Active",
+ "dba": "Fisch"
+ },
+ {
+ "pid": 107,
+ "customer": "Verbena Market Florals",
+ "status": "Lost",
+ "agent": "Naomi Linnell Rivera",
+ "city": "Austin",
+ "state": "Texas (US)",
+ "last_order": "2025-11-04",
+ "est_missed": 78300,
+ "notes": "Went with a competitor on freight terms.",
+ "country": "United States",
+ "zip": "08701",
+ "payment_terms": "30 Days",
+ "pricelist": "Fisch 1 (USD)",
+ "tags": "Fisch",
+ "customer_since": "2025-07-16",
+ "salesperson": "Karen",
+ "ar_open": 0,
+ "ar_overdue": 5120.25,
+ "ar_exposure": 5120.25,
+ "top_category": "Foams & Finishes",
+ "top_category_pct": 0.31,
+ "sku_count": 27,
+ "top_sku": "SATIN RIBBON 2IN",
+ "days_to_pay": 61,
+ "_created": "2023-07-15 09:16:00",
+ "lat": null,
+ "lon": null,
+ "odoo_status": "Active",
+ "dba": "Both"
+ },
+ {
+ "pid": 108,
+ "customer": "Larkspur Lane Supply",
+ "status": "New",
+ "agent": "Carla Jimenez",
+ "city": "Denver",
+ "state": "Colorado (US)",
+ "last_order": "2026-07-14",
+ "est_missed": 0,
+ "notes": "First order in April.",
+ "country": "United States",
+ "zip": "60614",
+ "payment_terms": "Immediate Payment",
+ "pricelist": "Royal 1 (USD)",
+ "tags": "(none)",
+ "customer_since": "2026-08-17",
+ "salesperson": "(none)",
+ "ar_open": 8300,
+ "ar_overdue": 940,
+ "ar_exposure": 11440,
+ "top_category": "All",
+ "top_category_pct": 1.0,
+ "sku_count": 1,
+ "top_sku": "(none)",
+ "days_to_pay": 12,
+ "_created": "2023-08-15 09:17:00",
+ "lat": 33.749,
+ "lon": -84.388,
+ "odoo_status": "Active",
+ "dba": "Royal"
+ }
+ ]
+}
diff --git a/web/src/App.tsx b/web/src/App.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..77fd5fb03fc59405df22b003bfed1a8bb3b539f7
--- /dev/null
+++ b/web/src/App.tsx
@@ -0,0 +1,30 @@
+import CustomerGrid from "./customer-grid/CustomerGrid";
+import { OverlayProvider } from "./customer-grid/OverlaySurface";
+import { isStreamlitComponent } from "./customer-grid/hostBridge";
+import Shell from "./shell/Shell";
+
+// HOSTED = either Streamlit path (the component iframe, or the legacy injected
+// payload). There the surrounding app owns all chrome and this tree renders the
+// BARE grid, byte-for-byte the behavior the embed always had. Only the
+// standalone build gets the shell (wave 4, the strangler frame). Computed once
+// at module level, like useCustomerData's own mode constants — the host mode
+// cannot change within a page lifetime.
+// EXPORTED (EXIT wave 1): main.tsx needs the same answer to decide whether to
+// install the standalone event sink, and two copies of a mode predicate is how
+// the two halves of "standalone-only" end up disagreeing.
+export const HOSTED =
+ isStreamlitComponent() ||
+ typeof (window as unknown as { __AIOS_GRID__?: unknown }).__AIOS_GRID__ !== "undefined";
+
+export default function App() {
+ if (HOSTED) {
+ return (
+
+
+
+
+
+ );
+ }
+ return ;
+}
diff --git a/web/src/apiContract.ts b/web/src/apiContract.ts
new file mode 100644
index 0000000000000000000000000000000000000000..8dab35e12624fae286996b58ab027b12e7fc2b58
--- /dev/null
+++ b/web/src/apiContract.ts
@@ -0,0 +1,88 @@
+// ---------------------------------------------------------------------------
+// apiContract.ts — the handful of constants BOTH trees need, and the two
+// browser-level signals the data layer raises to the frame.
+//
+// WHY A ROOT-LEVEL LEAF. `shell/session.ts` and `customer-grid/apiBridge.ts`
+// both speak X2, so both need the version prefix and the credentials word. The
+// alternatives were worse: a second copy of `"/api/v1"` is a string that drifts
+// (this codebase keeps a lock-step GATE for exactly that class of duplication),
+// and importing shell code from `customer-grid/**` would point the dependency
+// edge the wrong way — the grid is the ASSET, the shell is the disposable
+// frame, and the embed bundle must never grow a reason to pull the frame in.
+// A leaf both import is the only arrangement with no cycle and no drift.
+//
+// It imports nothing, by construction.
+// ---------------------------------------------------------------------------
+
+/** X2: every route lives under this prefix. `/api/health` is the one exception
+ * and is not ours — it is the unauthenticated liveness probe. */
+export const API_V1 = "/api/v1";
+
+/**
+ * ⚠ EXPLICIT, not defaulted. Same-origin is already the browser default, but
+ * this is the one word that decides whether the X3 session cookie rides the
+ * request at all — and the cookie is HttpOnly, so getting it wrong produces no
+ * client-side symptom, just a 401 from a server that never saw a session. An
+ * implicit default is not something a reader (or a gate) can check.
+ */
+export const CREDENTIALS: RequestCredentials = "same-origin";
+
+/**
+ * THE SESSION DIED UNDER US. Raised by any authenticated call that comes back
+ * 401, and handled by the shell (sign out, show the door).
+ *
+ * A DOM CustomEvent rather than an import, deliberately: `customer-grid/**` is
+ * host-neutral and must not know a shell exists — it is the same tree the
+ * Streamlit embed ships. The window is the one channel both sides already
+ * share (`hostBridge` uses it for the host-render signal for the same reason).
+ */
+export const UNAUTHORIZED_EVENT = "aios:unauthorized";
+
+/** The authenticated read FAILED for a reason that is not authentication. The
+ * frame says so plainly; it never substitutes sample data (see apiBridge). */
+export const DATA_ERROR_EVENT = "aios:data-error";
+
+/** The server sent a human-readable confirmation with a write (X2's `toast`).
+ * `detail` is the string. */
+export const TOAST_EVENT = "aios:toast";
+
+/**
+ * owner item 2 (2026-08-03) — the events response carried DERIVED CELLS with it.
+ *
+ * Creating a measure column used to take two sequential round trips before a number appeared:
+ * one to persist the field, one to compute it. The server now computes right after the write
+ * and returns the values on the same response; `detail` is `{[pid: string]: {[key]: value}}`,
+ * exactly the `derived` shape `/workspace` sends.
+ *
+ * ⚠ A SHORTCUT, NEVER A PATH. `WORKSPACE_STALE_EVENT` still fires beside it and the re-read
+ * still delivers the same values — so a browser that misses this, or a server that could not
+ * compute it, behaves exactly as it did before. Nothing may be built on it arriving.
+ */
+export const DERIVED_CELLS_EVENT = "aios:derived-cells";
+
+/** A write CHANGED durable workspace state (a cohort's membership, a list add, a
+ * folder move) and the client's copy is now stale.
+ *
+ * ⛔ WHY THIS EXISTS. `/customers` carries rows; the workspace lives at its own
+ * URL. So in the embed the Streamlit host reruns and the left panel repaints,
+ * while standalone had NOTHING — the server's `toast` was the only evidence a
+ * cohort add had happened, and the panel beside it still showed the old
+ * membership. A toast is a receipt, not a refresh. */
+export const WORKSPACE_STALE_EVENT = "aios:workspace-stale";
+
+/** Owner item 10 (2026-07-31): the user CLICKED INTO THE WORK SURFACE (a saved view, a grid
+ * cell) — the frame should fold its navigation rail down to the slim strip so the table gets
+ * the width. Raised by the grid, handled by the shell; a no-op in the embed (no listener),
+ * which is exactly the host-neutral contract the other signals follow. */
+export const NAV_MINIMIZE_EVENT = "aios:nav-minimize";
+
+/** Wave 18 (C3-UT): rows changed OUTSIDE the grid's own write path — a shell "Add record",
+ * an automation run — and the current topic's rows should be refetched. The grid clears its
+ * rows cache and reloads; senders call `clearCustomersCache()` first so the refetch cannot
+ * be served from the 5-minute memo. */
+export const ROWS_STALE_EVENT = "aios:rows-stale";
+
+export function signal(name: string, detail?: unknown): void {
+ if (typeof window === "undefined") return;
+ window.dispatchEvent(new CustomEvent(name, { detail }));
+}
diff --git a/web/src/automation/AutomationCanvas.tsx b/web/src/automation/AutomationCanvas.tsx
new file mode 100644
index 0000000000000000000000000000000000000000..51b8cc7b50a73eb5d0b10a60ad0c2926e96b5f0f
--- /dev/null
+++ b/web/src/automation/AutomationCanvas.tsx
@@ -0,0 +1,389 @@
+// ---------------------------------------------------------------------------
+// automation/AutomationCanvas.tsx — the flow, drawn (owner ruling R5).
+//
+// Hand-rolled SVG + CSS, no new dependency: the repo already draws its own
+// charts and maps this way (`web/src/viz/`), and a flow of four to six nodes is
+// not worth a graph library's bundle, its theming fight, or its opinion about
+// where state lives.
+//
+// ⚠ BRANCHES RENDER; THEY DO NOT EXECUTE (R5, accepted at grill — DEBT D-7).
+// The capture branch is a real fork in BEHAVIOUR — the paid rung answers or the
+// anonymous ladder does — and the engine still walks it linearly. Nothing here
+// should be read as a general branching runtime.
+//
+// TWO TRAPS THIS FILE IS BUILT AROUND, both from [[ui-invisible-to-assertions]]
+// (a thing can be painted, asserted, and still not usable):
+// 1. THE EDGE LAYER MUST NOT EAT CLICKS. It is a full-bleed