Back to Directory
Multizer Logo

MULTIZER

MULTI TECH GOES MULTI TASK

PH: 201-500-5317

WEB: MULTIZER.COM

EMAIL: KENNY@MULTIZER.COM

Pest Control ERP (v7) Architecture & State Machines

1. Overall System Architecture

The ERP consists of multiple layers enforcing strict role-based and schema-driven execution.

flowchart TD User[User Web UI / AI Chat] --> Backend Mobile[Mobile App / Field Technicians] --> Backend subgraph Backend Server LLM[LLM Layer Translator] Validation[Validation Layer Schema & Permissions] CLI[CLI Layer Execute Commands] Engine[Core Business Engine Deterministic Accounting] User -- Actions --> LLM Mobile -- GPS / Photos / Signatures --> Validation LLM -- JSON Command --> Validation Validation -- Validated Command --> CLI CLI -- Command Execution --> Engine end DB[(PostgreSQL Database)] S3[(Object Storage S3/Photos)] Engine -- Persist Changes --> DB Engine -- Save Photos/Sigs --> S3

2. Ticket State Machine

Tickets represent service work. They lock upon customer submission.

stateDiagram-v2 [*] --> DRAFT : Field Tech Creates Ticket DRAFT --> SUBMITTED : Customer Signs & Submits SUBMITTED --> INVOICED : Attached to Invoice SUBMITTED --> EXCLUDED : Excluded from Invoice SUBMITTED --> VOID_PENDING : Void Requested VOID_PENDING --> VOIDED : Void Approved INVOICED --> [*] EXCLUDED --> [*] VOIDED --> [*]
Page 1 of 2
Multizer Logo

MULTIZER

Pest Control ERP Entity-Relationship Diagram (Cont.)

3. Core Accounting Entity-Relationship Diagram (ERD)

Displaying the core relationships of the transactional ledger, invoices, tickets, and clients.

erDiagram COMPANIES ||--o{ ACCOUNTS : "has many" COMPANIES ||--o{ USERS : "employs" ACCOUNTS ||--o{ LOCATIONS : "owns" ACCOUNTS ||--o{ INVOICES : "billed to" ACCOUNTS ||--o{ PAYMENTS : "makes" USERS ||--o{ TECHNICIANS : "is a" LOCATIONS ||--o{ TICKETS : "hosts service" TECHNICIANS ||--o{ TICKETS : "performs" TICKETS ||--o{ INVOICE_TICKET_LINK : "logs included" INVOICES ||--o{ INVOICE_TICKET_LINK : "contains" INVOICES ||--o{ ALLOCATIONS : "receives payment via" PAYMENTS ||--o{ ALLOCATIONS : "applied via" ACCOUNTS ||--o{ AR_LEDGER : "has balance entries" INVOICES ||--|{ AR_LEDGER : "creates INVOICE_ISSUE events" PAYMENTS ||--|{ AR_LEDGER : "creates PAYMENT_POST events" COMPANIES { UUID id PK TEXT name } ACCOUNTS { UUID id PK UUID company_id FK TEXT name TEXT payment_term_days } LOCATIONS { UUID id PK UUID account_id FK TEXT address } TICKETS { UUID id PK UUID location_id FK UUID technician_id FK TEXT status NUMERIC amount } INVOICES { UUID id PK UUID account_id FK TEXT status NUMERIC total_amount } PAYMENTS { UUID id PK UUID account_id FK TEXT status NUMERIC amount } ALLOCATIONS { UUID id PK UUID payment_id FK UUID invoice_id FK NUMERIC amount_applied TEXT status } AR_LEDGER { UUID id PK UUID account_id FK TEXT event_type TEXT source_type NUMERIC debit_amount NUMERIC credit_amount }
Page 2 of 2
Generating Professional PDF...