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
| Field | Value |
|---|---|
| Family | invoices |
| Enum constant | AccountingEventType.OUTGOING_AGENCY_INVOICE |
| Prefix | OAI |
| Settlement priority | 100 |
| Journal (catalog key) | BUY |
| Journal (label) | Achats |
| Recurrent? | no |
| Manual? | yes |
| Status | Développé |
| pieceReference chrono | INV… |
Accounting entry
| Side | Account |
|---|---|
| Debit | varies (auxiliary or 622xxx) |
| Credit | 402100 — 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.mjsinvoiceDebitLines;agencyFeeLines.mjsisOwnerFeeLine: a DEBIT line carrying one of the fiveRENTING_*_OWNER_FEES_WITHOUT_VATnatures, not booked on a tenant's 411100 auxiliary),_idascending, 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.mjsOWNER_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.mjsinvoiceBookingRule) and fee items have none, so the transfer takes the mandate from the invoice header found by the line'stransactionId(settlementTransferPosting.mjswithInvoiceDescriptor,packages/data/accounting/invoice/queries.mjsheaderByTransactionId, a scan:invoiceshas no{organisationId, transactionId}index). The JVM puts the event's descriptor — the invoice's — on each line (EntryHandler,DescriptorHandler.getInvoiceDescriptor).