Adjustments Technical Reference
The Adjustments module manages non-operational financial events (e.g., Bank Interest, Processing Fees) and automated balance corrections. It ensures that the system's Net Income and Net Cash accurately reflect the economic reality of the business beyond standard sales and expenses.
1. Identification Fields
-
Description [Input]: A required label for the transaction (e.g., "Monthly Bank Interest").
-
Adjustment Number [Input/System]: The unique identifier for the record.
- Logic: Defaults to the
A-YYQSSSVformat (Year, Quarter, Sequence, Checksum), but allows manual override for custom numbering schemes. - Exception: Manual overrides are permitted only for non-system records.
- Logic: Defaults to the
- Adjustment Category [Input]: The classification of the event.
- System: The "Write-off" category is reserved for automated underpayment corrections.
- Adjustment Date [Input]: The legal date the adjustment is recognized.
- Ripple: This date determines the inclusion of the adjustment in the Monthly Statement and Performance Trends.
2. Relationship Mapping
Adjustments can exist independently or be anchored to a specific deal to maintain project-level profit accuracy.
- Link to Client (Optional) [Input]: Associates the gain or loss to a specific client account.
- Link to PO (Optional) [Input]: Associates the adjustment to a specific Purchase Order.
- Ripple: Selecting a Purchase Order automatically prefills the Client and Order Registry (CDX) links.
- Link to Invoice (Optional) [System]: Associated primarily with automated write-offs. Links the adjustment to a specific Invoice.
- Order Registry (CDX) [System]: The permanent anchor for the order's history and metrics.
- Logic: Inherited from the linked PO or Invoice. Required for the adjustment to appear in the "Total Linked Adjustments" metric within the Order History.
3. Financial Logic & Reporting
- Amount [Input]: The value of the adjustment, recorded in cents.
- Logic: Supports Positive values (Gains/Income) and Negative values (Losses/Write-offs).
- Perspective Ripple (Accrual): All active adjustments are aggregated into Net Income.
- Perspective Ripple (Cash): Only Manual adjustments are aggregated into Net Cash. System-generated write-offs are excluded from cash reports because they represent a loss of potential revenue, not a movement of actual funds.
4. System Protection & Automation
Codexmetry utilizes a "System Lock" mechanism to protect the integrity of automated accounting actions.
- System Flag (is_system) [System]: A boolean flag identifying records generated by the application.
- Lock logic: If a record is marked as
is_system, the Document Number, Date, and Amount are locked from user editing.
- Lock logic: If a record is marked as
- Write-off Automation:
- Trigger: When an Invoice moves to "Completed" status with a remaining balance within the Invoice Threshold.
- Logic: The system automatically creates a
is_systemadjustment to bridge the gap between the amount billed and the amount received. - Self-Healing: If the Invoice is later reverted to "Open" status or the payment gap is resolved, the system automatically deletes the associated write-off.
5. Metadata & Auditing
- Internal Note [Input]: Private comments for internal use.
- Attachments [Input]: Standard file upload. Commonly used for bank statements or fee disclosures.
- Activity Log [System]: Displays the chronological record of every change made to the adjustment, including user identity and the modified fields.