בס״ד

Mom's Invoice System — Build Spec (CM IS Mom's tool — iterate, don't clone)

docs/MOM_INVOICE_BUILD_SPEC.md · last changed (pre-VM history) · rendered from GitHub master

Mom's Invoice System — Build Spec (CM IS Mom's tool — iterate, don't clone)

Generated 2026-04-28 12:50 AM EDT · Session 17 overnight · UPDATED 2026-04-28 1:10 PM with confirmation
🟢 CONFIRMED 2026-04-28 1:00 PM EDT (Sam voice note): "the CM Invoice System is the mom wholesale together. Pretty much CM is the name of the company. She's the wholesaler. She doesn't own the company, but she gets percentages of all sales almost like a boss. But her boss is the boss."

Decision: CM IS Mom's tool. Mom is a commissioned wholesaler for C&M Collection Intl LLC. The standalone mom-wholesale-os/ clone has been retired to archive/graveyard/2026-04-28_mom-clone-redundant/. All future Mom-invoicing work iterates zee78900/CM_Invoice_System directly.

Architecture reference: docs/MOM_WHOLESALE_OS_CONTEXT.md (Apr 17, 173 lines). Real-stakes context: .claude/memory/project_mom_context.md (updated Apr 28).


2026-05-07 correction

This spec made the right strategic call: CM is Mom's tool and the standalone clone should stay retired. Some implementation facts below are now stale.

Current execution facts:

Newly important implementation gap:

1. The big reframe

Per project_mom_context.md (memory): Sam's mother is a widow running a women's wholesale clothing business from her basement, hosting people through grief, drained before she opens a spreadsheet. Sam's brief says: "Make her life easier, simpler, friendlier — in EVERY way. Not just a spreadsheet — a genuine reduction of her cognitive load."

Per docs/MOM_WHOLESALE_OS_CONTEXT.md: full architecture for an 18-tab wholesale OS already designed (Config, Styles_Master, Customers, Orders_Log, Invoices_Master, Payments_Log, Chargebacks_Log, Vendors, Vendor_Payments, Samples_Tracker, Invoice_Register, AR_Aging, Collections_Dashboard, Print_Invoice, Order_Confirmation, Price_List, Command_Center, Season/Sales reports). Phase 1 = Core Flow. Phase 2 = AR & Collections. Phase 3 = Vendor & Reporting.

But: an 18-tab build for a drained widow is exactly the wrong move. Per the deeper Mom memory: "Every design choice — would this exhaust a widow who's already drained? If yes, cut it."

Phase 0 (NEW — proposed this session): Mom needs invoicing relief THIS WEEK, not a 3-phase OS build. Clone the working CM_Invoice_System (which already supports customers + styles + invoice + PDF + email + payment + AR + returns), rebrand for Mom's biz, deploy. ~1-2 hour Sam-time.


2. The CM Invoice System template (what already works)

Location: C:\Users\ztrei\OneDrive\2. Hook Street\05. 2026 BH\CM_Invoice_System\
GitHub: zee78900/CM_Invoice_System
Apps Script: 1t4DzAQQvGd9U5phFoQdXzRyperrSZwrICRFFDQjbVi3MKdQ5PEy4xk-V
Live spreadsheet: 1imdgPWUF205M7lEzXvt4Dk8AWKz-h2U4qwmuj-WJjgo (CM_Invoice_System_FINAL)
For: "C&M Collection Intl LLC" — Brooklyn-based women's apparel wholesale (similar shape to Mom's biz)
Sample output: INV-251211-GIBO-001 - GITTY'S BOUTIQUE.pdf (in repo) shows the actual invoice rendering

What CM already does (10 tabs, 1057 LOC of Apps Script)

Tab Role
Invoice_Entry Single-screen invoice form (cell A11 = customer · I10 = invoice # · lines 19-33)
Invoice_Log All invoice history with status auto-color (UNPAID amber · PARTIAL blue · PAID green · OVERDUE red)
Customers Customer directory with IDs · headers looked up by name (NOT hardcoded col indices)
Styles Style/SKU directory with auto-fill on entry
Print_View Printable invoice layout
Invoice_Record Full AR record
Returns_Credit Credits + returns tracking
Settings Config — net days, tax, store info
_SYS_ENGINE Internal system data
_INVOICE_EXPORT_VALUES Export staging area for PDF

Menu (Sheets UI)

C&M Invoices
  ├─ Save Invoice           → saveInvoice()         (creates record + assigns # + colors row)
  ├─ Save PDF to Drive      → savePdf()             (PDF to Drive folder, links back to record)
  ├─ Email Invoice          → emailInvoice()        (Gmail draft with PDF attached)
  ├─ Record Payment         → recordPayment()       (writes to Payments_Log + recalcs AR)
  ├─ Refresh AR Status      → refreshArStatus()     (overdue scan + status colors)
  ├─ New Return / Credit    → newReturn()           (Returns_Credit row + credit memo)
  ├─ Clear Invoice Form     → clearInvoiceForm()
  ├─ Setup All Sheets       → setupSheets()         (one-time bootstrap — builds all 10 tabs)
  └─ Refresh Dropdowns      → applyDropdowns()      (rebuild data validation lists)

Invoice numbering format

INV-YYMMDD-[CUSTOMER_ID]-[SEQ]

Example: INV-251211-GIBO-001 (Dec 11 2025, customer Gitty's Boutique, sequence 1)

Architecture quality (from CM Code.js review)


3. Sam-required inputs (the 3 mobile-Claude blockers — answered with proposals)

Input A — Repo name

Proposal: zee78900/mom-wholesale-os (matches eden-gardens-os pattern). Or, if Sam wants tighter symmetry with CM: zee78900/MomCo_Invoice_System. First option is more accurate to the broader wholesale OS scope. Default to mom-wholesale-os unless Sam objects.

Input B — Mom's business name (for Settings tab + PDF letterhead)

Status: UNKNOWN to me. Privacy-safe default until Sam provides:

Settings:
  Company Name      → <BIZ_NAME — Sam to provide>
  DBA               → <DBA — if applicable>
  Address           → <Mom's basement address — Sam to provide>
  City State Zip    → <provided>
  Mom Cell          → <provided>
  Mom Email         → <provided>
  Israel Phone      → optional (CM has one — useful if mom's manufacturers in Turkey/HK use a number)
  Default Net Days  → 30 (CM default)
  Default Tax Pct   → 0% wholesale (typically 0; flip on per-customer if interstate retail)
  Bank Name         → <Sam to provide>
  Bank Routing      → <Sam to provide>
  Bank Account      → <Sam to provide>
  Current Season    → SS2026

Privacy note: these go in the live Settings tab, NOT in any committed git file.

Input C — Line item columns (for Styles_Master tab)

Already specified in MOM_WHOLESALE_OS_CONTEXT.md line 60:

Style # | Name | Description | Sizes | Colors | Pricing | Season | Status

Plus per CM template, the Styles tab already has: Style ID | Description | Default Price | Default Tax.

Proposal: start with CM's 4 cols, add Sizes + Colors + Season + Status for Mom's wholesale shape. 8 cols total. Confirm with Sam — the only real decision is whether Sizes + Colors are stored as comma-separated strings (simpler) or as a separate Sizes/Colors lookup tab (more robust but more clicks). RECOMMEND comma-strings for Phase 0 (Mom-friendly), upgrade later if needed.


3.5 The actual line-item shape (read from real CM artifacts)

Sam pointed me at CM_Invoice_System/INV-251211-GIBO-001 - GITTY'S BOUTIQUE.pdf (sample invoice) and CM_Invoice_System/Fame page -2026 - 02-12.xlsx (sample order). Both confirm: wholesale women's clothing uses per-size-bucket quantity columns, not generic line items. This is a HARD requirement Mom's system must preserve.

Real invoice line structure (16 columns)

Style | Description | Color | 32 | 34 | 36 | 38 | 40 | 42 | 44 | 46 | 48 | 50 | 52 | Qty | Unit Price | Total
        (= row description)    └─────────── 11 size columns (European sizing) ───────────┘   (sum)   (entered)   (calc)

European sizes 32-52 ≈ US sizes 0-18 (reference row printed under headers — buyers know both).

Buyer enters quantities into each size column for the styles they want. Qty auto-sums. Total = Qty × Unit Price.

Footer aggregates (right side of invoice)

Subtotal               (sum of Total column for all lines)
Discount %             (entered, e.g. 0%)
Discount $             (computed)
Shipping / UPS         (entered, e.g. $40)
Tax %                  (entered, often 0% wholesale)
Tax Amount             (computed)
Previous Balance       (looked up from prior invoices for this customer)
Payments Received      (looked up from Payments_Log for this invoice)
TOTAL DUE              (computed)

Plus on order forms (not invoices): Deposit + Balance fields for partial-pay tracking.

Order vs Invoice — separate documents, separate stages

The Fame xlsx is an ORDER (Order # 1158, dated 2/12/2026), not an invoice. Different lifecycle:
- Order = buyer commits to purchase (signed at show or via emailed form). Fame placed Order 1158 on Feb 12, has NOT been shipped yet.
- Invoice = generated when goods actually ship (later). Gitty's Boutique INV-251211-GIBO-001 = an invoice for goods shipping out 12/11/2025.

Mom's system needs BOTH:
- Order_Entry tab → produces Order_Confirmation PDF (sent to buyer at show, no invoice number assigned yet)
- Invoice_Entry tab → produces invoice PDF (when goods actually ship — references the order)

CM's current code only has Invoice_Entry. Mom's biz handles 2 major shows/year + 50+ orders/season → orders need to live somewhere. Phase 0 update: add basic Order_Log tab (mirrors Invoice_Log structure but no PDF yet); Phase 1 adds Order_Confirmation print view.

Sample customer roster observed

This is exactly Mom's shape. No re-architecture needed.


4. Mom-specific deltas vs CM template

CM is the right template. These are the 5 things Mom's needs that CM doesn't (yet):

# Delta Why Phase 0? Phase later?
1 Order_Entry + Order_Log tabs CM only has Invoice. Mom takes orders at shows months before shipping — orders need a home. YES — Phase 0 must add (else lost orders). Same shape as Invoice_Entry, no PDF yet. Phase 1 adds Order_Confirmation PDF
2 Chargebacks_Log tab Buyers short-pay invoices, deduct without authorization. Without this, AR is always wrong. Per Mom context doc §"Chargebacks (biggest gap)". NO — too complex for Mom directly. Sam handles for her in v1. Phase 2 — Mom enters herself once stable
3 Multi-currency Vendor_Payments Manufacturing in Turkey (TRY) + Hong Kong (HKD) — wires + FX rate + USD equivalent NO — separate from Mom's invoicing flow Phase 3
4 Season tagging (SS / FW) Two major show events per year. Every record season-tagged. CM invoice already has Season: field — Mom uses same. YES — already in CM header (cell I11). Just verify dropdown SS/FW.
5 Partial shipments One order → multiple shipments → multiple invoices NO — Mom's current method is one invoice per shipment, that's fine for now Phase 2
6 Resale certificate tracking NY / interstate compliance for wholesale NO — Mom's accountant currently handles Phase 3 if Mom takes over
7 Per-size columns 32-52 are HARD requirement Real Mom invoices use 11 European-size columns + Qty + Unit Price + Total. CM template already has this layout (LINE_START 19 → LINE_END 33). YES — already in CM, preserve as-is.
8 Order # ≠ Invoice # Fame Order 1158 vs INV-251211-GIBO-001. Two different numbering streams. YES — add Next Order # to Settings + simple counter

Phase 0 deliverable = CM cloned + Settings rebranded + Season field added + Drive folder structure for invoices. Nothing else.


5. Phase 0 — 1-day execution plan (Sam-runnable)

Total Sam-time: ~90 minutes. Mom-time: 0 (Sam delivers it ready-to-use).

Step 1 — Decide the 3 inputs (5 min)

Step 2 — Make a new Google Sheet (5 min)

Step 3 — Make a clone of CM_Invoice_System/ locally (10 min)

cd "C:\Users\ztrei\OneDrive\2. Hook Street\05. 2026 BH"
cp -r CM_Invoice_System mom-wholesale-os
cd mom-wholesale-os
rm -rf .git
git init
# update .clasp.json with new scriptId from Step 2
# update README.md (replace C&M references with Mom's biz)
# in Code.js: update Settings constants (S_INVOICE etc. stay; only the Settings VALUES change at first run)

Step 4 — clasp push (5 min)

clasp login   # if not already
clasp push    # deploys all 10 tabs' worth of code

Step 5 — Run setupSheets from Apps Script editor (2 min)

Step 6 — Settings tab — fill in Mom's actual values (10 min)

The _setupSettings function (Code.js:109) seeds CM's defaults. Sam overwrites with Mom's:

Company Name → <Mom's biz>
Address      → <Mom's basement>
... etc

Step 7 — Add Season field to Invoice_Entry (10 min)

Step 8 — Seed Customers (15 min)

Mom likely has ~20-50 retail buyers. Either:
- Mom dictates → Sam types into Customers tab
- Sam pulls from the existing Excel/Box invoices → bulk import via applyDropdowns after paste

Step 9 — Seed Styles (15 min)

Same — paste from existing line sheet or hand-type. Don't try for completeness; start with current season's lineup.

Step 10 — Test invoice end-to-end (10 min)

Step 11 — Hand off to Mom (5 min)


6. What this DOES NOT include (deliberately)

The point: Phase 0 is invoicing-only relief. The full OS becomes Phase 1 once Mom is using Phase 0 happily.


7. Privacy posture


8. Questions for Sam (when ready, ≤2 minutes to answer)

  1. Repo name: mom-wholesale-os ✓ / different name? ____
  2. Mom's biz name: ____
  3. Mom's basement address (for invoice letterhead): ____
  4. Bank routing + account # for letterhead (for wires from buyers): ____
  5. Styles columns: 8-col proposal above ✓ / different? ____
  6. Phase 0 scope (clone CM + Settings + Season field) acceptable, OR should I expand to Chargebacks now? ____
  7. Confirm CM_Invoice_System repo is PRIVATE? Y / N ____
  8. Hebrew labels needed Phase 0, or English only? ____

9. Source trail


Bottom line for Sam tomorrow morning:

Don't reinvent. CM_Invoice_System already does 90% of what Mom needs. Clone it. Rebrand. Add Season field. Hand to Mom by Friday. Build the rest of the wholesale OS as Phase 1+ over weeks, not days.

Source trail · docs/MOM_INVOICE_BUILD_SPEC.md @ master · rendered 2026-07-02 7:23 PM EDT by scripts/build-docs.py · the .md in the repo is the truth; this page is the phone-readable view