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 toarchive/graveyard/2026-04-28_mom-clone-redundant/. All future Mom-invoicing work iterateszee78900/CM_Invoice_Systemdirectly.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:
- Active folder/repo remains
CM_Invoice_System. - Active Google Sheet is now
CM Invoice System_v2:1nMTEl_eYpAsQ774Qe0MNEcbib8Qgj2X6_9PfeZk32iI. - Active bound Apps Script is
106wdSg6lMTsqBaGBtH93j_D0AbSrjUtKuRM2WzdjKE7tq5Vqbe1ZQPAp. - The live v2 script was cloned on 2026-05-06 and matched local Phase 7.6
Code.js/appsscript.json. CM_Invoice_System_FINALis a March reference/template, not the current active target.- Current Phase 7.6 already includes later tabs such as
Orders_Log,Vendor_Orders,Vendors,Vendor_Payments, andReports.
Newly important implementation gap:
- Old local Excel workbooks show the original wide one-row invoice archive model: 277 columns in
Invoice_Record, with up to 15 item blocks and size quantities. - Sam confirmed this wide model is required:
Invoice_Recordshould be the canonical saved-invoice ledger. - Local
CM_Invoice_System/Code.jsnow patchesInvoice_Recordinto a 277-column one-row archive, moves totals below the 15 line-item rows, and can restore saved rows intoInvoice_Entry. - Optional normalized line-item/reporting tabs may come later, but they are secondary to the wide invoice archive.
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)
- ✅ Customer fields looked up by header name, not column index (
_lookupCustomer,_fillCustomerInfo) - ✅ Settings driven via
_getSetting(ss, key)— no hardcoded business values in code - ✅ Status colors centralized (
SCconstant) — easy to recustomize - ✅ Invoice line range
LINE_START 19→LINE_END 33= 15 line items per invoice (sufficient for wholesale) - ✅
onEdittrigger auto-fills customer info on customer-name entry (saves clicks) - ✅ Auto-recalc due date from net terms
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) andCM_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
- Gitty's Boutique — 1532 46 Street, Brooklyn NY 11219 (customer ID
GIBO) - Fame — 309 Central Ave, Lawrence NY 11559 (customer ID likely
FAME) - Style code prefixes observed:
MIW-(one source),CM-(CM's own line),1420-(Mom's own line per the GIBO invoice — TBC) - "PICKED UP IN ISRAEL" annotation → confirms Israeli pickup workflow for some orders
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)
- Repo name (
mom-wholesale-osrecommended) - Mom's biz name (Sam knows)
- Confirm Styles cols =
Style # | Name | Description | Sizes | Colors | Pricing | Season | Status(Y/N)
Step 2 — Make a new Google Sheet (5 min)
- Name:
<Mom's Biz> — Invoice System - Open Extensions → Apps Script — note the new scriptId
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)
- Opens the live sheet → Extensions → Apps Script → run
setupSheets - Builds all 10 tabs with headers, dropdowns, freeze rows, color rules
- One-time alert: "Setup complete."
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)
- Cell
I12(currently free) → label "Season" + dropdown SS/FW - Modify
saveInvoice()to write season intoInvoice_Logcol Season (already exists inLC.SEASON = 5) - Add
Seasoncol to Styles tab if not already there
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)
- Pick a customer, pick 3 styles, hit Save Invoice → verify Invoice_Log row appears + Print_View renders
- Save PDF → verify it lands in Drive
- Email Invoice → verify Gmail draft appears with PDF attached
- Don't send
Step 11 — Hand off to Mom (5 min)
- Bookmark the live sheet on her phone home screen
- 2-line crib sheet on her desk:
To make an invoice: Open sheet → Customer dropdown → Lines → Save Invoice → Save PDF → Email Invoice. Six clicks. Done.
- That's it. No training documentation. If she calls confused, Sam fixes the UX, doesn't add a doc.
6. What this DOES NOT include (deliberately)
- ❌ Phase 2 chargebacks (Mom doesn't enter chargebacks; Sam handles that meta-layer)
- ❌ Phase 3 vendor multi-currency (separate workflow, doesn't block invoicing)
- ❌ AR_Aging dashboard (Mom doesn't want analytics; Sam reads
Invoice_Logif needed) - ❌ Collections_Dashboard (same)
- ❌ Hebrew/English toggle (in mobile-Claude doc but not in Mom context — defer)
- ❌ Apps Script daily triggers (no overdue auto-emails — Mom would find them stressful, not helpful)
- ❌
MOM_WHOLESALE_OS_CONTEXT.md's 18-tab full architecture (Phase 1+ work, not Phase 0) - ❌ Box → Drive migration (separate project, doesn't block invoicing)
The point: Phase 0 is invoicing-only relief. The full OS becomes Phase 1 once Mom is using Phase 0 happily.
7. Privacy posture
- This doc lives in PRIVATE workspace repo (not committed to public)
- Mom's actual business name, address, bank details, customer list = NEVER committed to git. Lives in the live Sheet's Settings tab + tab data only.
- The CM_Invoice_System repo itself is currently
zee78900/CM_Invoice_System— verify visibility before cloning. Action item: confirm CM repo is private before cloning. If public, reset clone history before push. - Per
feedback_privacy_guardrails.md: defaults to PRIVATE for new repos. Confirm with Sam before push to GitHub.
8. Questions for Sam (when ready, ≤2 minutes to answer)
- Repo name:
mom-wholesale-os✓ / different name? ____ - Mom's biz name: ____
- Mom's basement address (for invoice letterhead): ____
- Bank routing + account # for letterhead (for wires from buyers): ____
- Styles columns: 8-col proposal above ✓ / different? ____
- Phase 0 scope (clone CM + Settings + Season field) acceptable, OR should I expand to Chargebacks now? ____
- Confirm
CM_Invoice_Systemrepo is PRIVATE? Y / N ____ - Hebrew labels needed Phase 0, or English only? ____
9. Source trail
- Template:
C:\Users\ztrei\OneDrive\2. Hook Street\05. 2026 BH\CM_Invoice_System\Code.js(1057 lines, 42KB) - CM repo: zee78900/CM_Invoice_System
- CM live sheet:
1imdgPWUF205M7lEzXvt4Dk8AWKz-h2U4qwmuj-WJjgo - Architecture:
docs/MOM_WHOLESALE_OS_CONTEXT.md(Apr 17, 173 lines) - Real-stakes context:
.claudememoryproject_mom_context.md(private) - Sample output for visual:
CM_Invoice_System/Original CM invoice look.png+INV-251211-GIBO-001 - GITTY'S BOUTIQUE.pdf - Build skill:
/mnt/skills/user/business-os-spreadsheet/SKILL.md(per Mom context doc § Next Session Priorities) - Generated 2026-04-28 12:50 AM EDT · Session 17 overnight
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.