Commit Graph

11 Commits

Author SHA1 Message Date
louispaulb
4a8718f67c feat: subscription reimport, customer/doctype ID rename, zero-padded format
- Switch Ops data source from Subscription to Service Subscription (source of truth)
- Reimport 39,630 native Subscriptions from Service Subscription data
- Rename 15,302 customers to CUST-{legacy_customer_id} (eliminates hex UUIDs)
- Rename all doctypes to zero-padded 10-digit numeric format:
  SINV-0000001234, PE-0000001234, ISS-0000001234, LOC-0000001234,
  EQP-0000001234, SUB-0000001234, ASUB-0000001234
- Fix subscription pricing: LPB4 now correctly shows 0$/month
- Update ASUB- prefix detection in useSubscriptionActions.js
- Add reconciliation, reimport, and rename migration scripts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 17:17:23 -04:00
louispaulb
101faa21f1 feat: inline editing, search, notifications + full repo cleanup
- InlineField component + useInlineEdit composable for Odoo-style dblclick editing
- Client search by name, account ID, and legacy_customer_id (or_filters)
- SMS/Email notification panel on ContactCard via n8n webhooks
- Ticket reply thread via Communication docs
- All migration scripts (51 files) now tracked
- Client portal and field tech app added to monorepo
- README rewritten with full feature list, migration summary, architecture
- CHANGELOG updated with all recent work
- ROADMAP updated with current completion status
- Removed hardcoded tokens from docs (use $ERP_SERVICE_TOKEN)
- .gitignore updated (docker/, .claude/, exports/, .quasar/)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-31 07:34:41 -04:00
louispaulb
08cf1c94e3 feat: 29K customer memos imported as Comments with real dates
- 29,178 account_memo → Comment on Customer
- Timestamps converted from unix to datetime
- Author mapped from staff_id → User email
- Visible in Customer page comment section

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:43:57 -04:00
louispaulb
c6b5aa8f61 feat: 99K payments imported with invoice references
- 99,839 Payment Entries (24 months, excl credits)
- 120,130 Payment-Invoice references (payment_item → Sales Invoice)
- Modes: Bank Draft (PPA/direct), Credit Card, Cheque, Cash
- legacy_payment_id custom field for traceability
- Creation dates set from legacy timestamps
- 0 errors

Full financial chain: Customer → Subscription → Invoice → Payment → Bank ref (PPA)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:33:35 -04:00
louispaulb
5640063bd0 fix: correct creation/modified dates from unix timestamps
- 129,078 Issues: creation = ticket.date_create, modified = ticket.last_update
- 115,721 Invoices: creation = invoice.date_orig
- 15,059 Customers: creation = account.date_orig, modified = account.date_last

All timestamps now show real legacy dates instead of import date.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:20:47 -04:00
louispaulb
4f74376412 feat: complete data mirror — all customers + 115K invoices
- 8,636 terminated customers imported (disabled=1, terminate reason/company/notes preserved)
- Total customers: 15,303 (100% of legacy)
- 33,131 Subscription.party links fixed (CUST-xxx)
- 115,721 Sales Invoices (24 months) + 658K line items
- Custom field: Sales Invoice.legacy_invoice_id
- All invoices as Draft (not submitted, not sent)

Customer lifecycle preserved:
  Active → services, subscriptions, invoices
  Terminated → disabled=1, customer_details has departure reason/competitor

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 16:09:16 -04:00
louispaulb
22377bb381 feat: fix all data relationships + PPA reference numbers
- fix_issue_owners.py: 53K Issues linked to creator (owner) + 55K to assignee (_assign)
- fix_issue_cust2.py: 47K Issues linked to Customer via legacy_account_id
- fix_sub_address.py: 21K Subscriptions linked to service Address
- customer_pos_id set to legacy PPA reference (15-digit bank number) on all 6,667 Customers
- Subscription custom fields: service_address (Link→Address), service_location (Link→Service Location)
- Fiscal Year 2025-2026 created (Jul 1 2025 → Jun 30 2026)

Relationships now complete:
  Customer → Address (N) → Subscription (N) → Item (plan + speeds)
  Customer → Contact (N) → email/phone
  Customer → Issue (N) → parent_incident → child Issues
  Issue → owner (User who created) + _assign (User responsible)
  Subscription → service_address → specific installation address
  Customer.customer_pos_id = PPA bank reference number

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:45:51 -04:00
louispaulb
ac9b367334 feat: Phase 7 — 45 ERPNext Users from legacy staff
- 45 users created with Authentik SSO (no password)
- Roles assigned: System Manager, Support Team, Sales/Accounts
- Service accounts skipped (admin, tech, dev, inventaire, agent)
- Email = Authentik identity link

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:13:31 -04:00
louispaulb
7a15bfd600 feat: Phase 6 — 242K tickets migrated as Issues with parent/child
- 38 Issue Types from ticket_dept
- 242,605 Issues created (open + closed)
- 25,805 parent/child links (incident pattern)
- Custom fields: parent_incident, is_incident, affected_clients, impact_zone, service_location, legacy_ticket_id
- Communications deferred (778K closed ticket messages — import separately)
- 0 staff→user mapped (ERPNext users need to be created/linked)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 15:06:58 -04:00
louispaulb
571f89976d feat: Phase 5 opening balance + AR analysis
- Journal Entry draft created with 1,918 customer balance lines
- AR analysis: $423K monthly billing, $77.96 avg/client, $62K aging 90j+
- Temporary Opening equity account created
- Scheduler remains PAUSED

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 14:47:18 -04:00
louispaulb
93dd7a525f feat: migration legacy → ERPNext phases 1-4 complete
Phase 1: 833 Items + 34 Item Groups + custom fields (ISP speeds, RADIUS, legacy IDs)
Phase 2: 6,667 Customers + Contacts + Addresses via direct PG (~30s)
Phase 3: Tax template QC TPS+TVQ + 92 Subscription Plans
Phase 4: 21,876 Subscriptions with RADIUS data

CRITICAL: ERPNext scheduler is PAUSED — do not reactivate without explicit go.

Includes:
- ARCHITECTURE-COMPARE.md: full schema mapping legacy vs ERPNext
- CHANGELOG.md: detailed migration log
- MIGRATION-PLAN.md: strategy and next steps
- scripts/migration/: idempotent Python scripts (direct PG method)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-28 14:35:02 -04:00