Life ConnectLife Connect
Wiki index
Architecture
Services
UI
Concepts
Runbooks
Infra
Swagger Docs
GitHub
Wiki index
Architecture
Services
UI
Concepts
Runbooks
Infra
Swagger Docs
GitHub
  • Cross-cutting concepts

    • EventBridge fanout
    • Atlas Triggers
    • ECS Fargate deploy lifecycle
    • Keycloak hosting
    • Cloudflare Pages auto-deploy
    • Bitbucket Pipelines (legacy)
    • Terraform-managed envs (legacy)
  • Accounting model

    • Accounting model
    • Events catalog
    • Accounting journals
    • Plan of accounts (PCG)
    • Auxiliary accounts
    • FEC fields (Fichier des Écritures Comptables)
    • pieceReference numbering
    • Tenant matrix (payable / receivable)
    • Owner matrix (payable / receivable)
    • Take-over UI display rules
    • Engine functional audit (2026-07) ↗
Last updated 2026-10-13

OUTGOING_AGENCY_INVOICE

AI-generated content

This document was generated by an AI assistant from the 'Event Matrix Accounting' Google Sheet and the AccountingEventType Java enum. The "Code references" section is regenerated by adb-doc/scripts/sync-accounting-events.js. Verify accuracy before relying on the details.

Business case (verbatim from the sheet, French): L'agence émet une facture sortante (honoraires divers).

Outgoing agency-issued invoice (umbrella for fee variants).

At a glance

FieldValue
Familyinvoices
Enum constantAccountingEventType.OUTGOING_AGENCY_INVOICE
PrefixOAI
Settlement priority100
Journal (catalog key)BUY
Journal (label)Achats
Recurrent?no
Manual?yes
StatusDéveloppé
pieceReference chronoINV…

Accounting entry

SideAccount
Debitvaries (auxiliary or 622xxx)
Credit402100 — ADB

See plan-of-accounts.md for account labels and journals.md for the full journal list.

Code references

Definition — adb/adb-model/src/main/java/fr/lifeconnect/adb/model/accounting/AccountingEventType.java:92

Call sites in adb-accounting (9):

  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/factory/InvoicePostingRuleFactory.java:18
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/factory/InvoicePostingRuleFactory.java:34
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/model/events/InvoiceAccountingEvent.java:26
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/model/events/InvoiceAccountingEvent.java:91
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/model/Invoice.java:216
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/model/mapper/AbstractAccountingEventMapper.java:244
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/statemachine/InvoiceStateMachine.java:61
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/statemachine/InvoiceStateMachine.java:469
  • adb-accounting/src/main/java/fr/lifeconnect/adb/accounting/statemachine/InvoiceStateMachine.java:572

Confluence

  • Confluence: not documented

Open questions

  • Paid fee invoice charged to the owner — Cloudflare, owner decision 2026-10-13 (« option C »). Paying an agency fee invoice through the invoice payment (POST /accounting/invoice-payment/…/process) letters the payment's 512101 line against the invoice's OWN owner-fee DEBIT lines (services/accounting/src/posting/invoicePaymentSettlements.mjs invoiceDebitLines; agencyFeeLines.mjs isOwnerFeeLine: a DEBIT line carrying one of the five RENTING_*_OWNER_FEES_WITHOUT_VAT natures, not booked on a tenant's 411100 auxiliary), _id ascending, each for at most what the share has left — never the 402100 line, never a tenant-fee line. The lettered owner-fee line is then charged to the owner by a SUPPLIER_TO_OWNER (see supplier-to-owner.md). Divergence from the JVM, which letters an OUTGOING invoice on its secondary events' lines only (InvoicePaymentSettlementCreationStrategy.java:44-54): the current booking creates none, so a JVM-paid fee invoice was never lettered nor charged.
  • Mixed invoice (an owner fee next to a tenant fee): the payment letters the owner-fee lines only; what the share holds beyond them stays open on the payment's 512101 line, and the owner is charged only what was lettered on his lines. The CRG counts that same amount for such an invoice (packages/data/accounting/crgPeriod/recap.mjs OWNER_CHARGED, PAID_ROW_AMOUNT); an invoice of owner fees only keeps its settled amount. Staging (2026-10-13, read-only): no paid mixed invoice addressed to an owner.
  • Open — the lines carry no descriptor. A Cloudflare booking stamps an item's own descriptor only (invoiceBookingPosting.mjs invoiceBookingRule) and fee items have none, so the transfer takes the mandate from the invoice header found by the line's transactionId (settlementTransferPosting.mjs withInvoiceDescriptor, packages/data/accounting/invoice/queries.mjs headerByTransactionId, a scan: invoices has no {organisationId, transactionId} index). The JVM puts the event's descriptor — the invoice's — on each line (EntryHandler, DescriptorHandler.getInvoiceDescriptor).
Edit this page
Last Updated:
Contributors: Grégory Horion