Journal Type Matrix

AlayaCare Residential — Billing Domain  ·  18 journal types  ·  23 transaction types (DB)  ·  Source: ProcuraGroup.Services.Billings.Core

Contents

  1. Overview table
  2. Journal type detail (18 entries)
  3. Transaction types — DB reference (23 entries)
  4. Coverage gaps & notes

1. Overview

Dr = debit (positive ItemAmount)  ·  Cr = credit (negative ItemAmount)  ·  All settlements use OverpaymentAR (ID:15, code AR) as the AR credit side — not regular AR (ID:1).
ID Journal Type Transaction Codes (Dr → Cr) Enum Constant
1 New Deposit PM Dr  ←→  DP Cr SystemJournalType.NewDeposit
2 Deposit Refund DP Dr  ←→  PM Cr SystemJournalType.DepositRefund
3 Transaction Reversal Mirrors all items from original journal (signs negated) SystemJournalType.TransactionReversal
4 Over Payment Settlement DP Dr  ←→  AR Cr (ID:15) SystemJournalType.OverPaymentSettlement
5 Reviewed Invoice AR Dr  ←→  RV/TX Cr  ± contra AR/RV/TX adj SystemJournalType.ReviewedInvoice
6 Deposit Settlement DP Dr  ←→  AR Cr (ID:15) SystemJournalType.DepositSettlement
7 Separation Interest EX Dr (IDs 11/14/19/20)  ←→  DP Cr SystemJournalType.SeparationInterest
8 Accommodation Drawdown DP Dr  ←→  AR Cr (ID:15) SystemJournalType.AccommodationDrawdown
9 Fee Drawdown DP Dr  ←→  AR Cr (ID:15) SystemJournalType.FeeDrawdown
10 Finance Adjustments DP/PM adj  ·  AR/RV/TX/WO/CR write-off  ·  DP/PL DMF SystemJournalType.FinanceAdjustments
11 Reviewed Invoice – Fee Statement AR Dr  ←→  RV/TX Cr  ± contra adj SystemJournalType.ReviewedInvoiceFeeStatement
12 Direct Debit Payments PM Dr  ←→  AR Cr  ·  ±SA/WO SystemJournalType.DirectDebitPayments
13 Subsidy Reconciliation Funder-programme transaction types (derived from funder rules) SystemJournalType.SubsidyReconciliation
14 Automatic Settlement DP Dr  ←→  AR Cr (ID:15) SystemJournalType.AutomaticSettlement
15 Credit Settlement CR Dr  ←→  AR Cr (ID:15) SystemJournalType.CreditSettlement
16 Manual Deposit Interest EX Dr (ID:11)  ←→  DP Cr SystemJournalType.ManualDepositInterest
17 Deposit Transfer DP/TR ×2 pairs (4 items total) SystemJournalType.Transfer
RET Accommodation Deposit Retentions DP Dr  ←→  RV Cr  (reversed on reversal path) JournalTypeName.AccommodationDepositRetentions
(no SystemJournalType enum value)

2. Journal Type Detail

Codes: AR Accounts Receivable DP Deposit PM Payment Made RV Revenue TX Sales Tax EX Sep. Interest Expense CR AR Credits TR Transfer SA Sales Adjustment WO Write Off PL P&L Account
1 New Deposit

Trigger: PostDepositAndGenerateJournals — when a resident deposit (accommodation or fee-side) is received and posted.

SystemJournalType.NewDeposit

#DB IDCodeDescriptionDr/CrComment / Purpose
14 or 15DPDeposit (or OverpaymentAR)CrDepositTransactionTypeID from the deposit record. ID:4 for accommodation deposits; ID:15 (OverpaymentAR) for fee-side overpayment deposits. Negative ItemAmount — increases deposit liability.
25 or 6PMPayment Made (or Refund)DrPaymentTransactionTypeID from the deposit. Typically PM=5; RF=6 on some imported deposits. Positive ItemAmount. Carries ReceiptNumber.
2 Deposit Refund DepositService

Trigger: Refund / RefundOnDischarge — when a deposit is refunded to a resident on discharge or manually.

SystemJournalType.DepositRefund

#DB IDCodeDescriptionDr/CrComment / Purpose
14DPDepositDrDepositTransactionTypeID from the deposit. Comment: "Deposit Refund". Positive ItemAmount — reduces deposit liability.
25PMPayment MadeCrUses SystemTransactionType.Payment (ID:5) regardless of the deposit's PaymentTransactionTypeID. Comment: "Deposit Refund". Negative — cash out to resident.
3 Transaction Reversal

Trigger: Reverse / ReverseTransaction — reverses any previously posted journal; each original item gets a sign-flipped mirror item.

SystemJournalType.TransactionReversal

#DB IDCodeDescriptionDr/CrComment / Purpose
1—(orig.)Same codes as original — positive sideDrOriginal Dr items become Cr. Comment: "Reversed {original comment} for {amount} on {date}".
2—(orig.)Same codes as original — negative sideCrOriginal Cr items become Dr. Cross-referenced to originals via JournalItemDetails (SettlementReversal relationship type).
4 Over Payment Settlement

Trigger: SettlePaymentsToInvoice — settles a PM-type (overpayment) deposit against an outstanding invoice.

SystemJournalType.OverPaymentSettlement

#DB IDCodeDescriptionDr/CrComment / Purpose
115AROverpayment AR (ID:15 — not ID:1)CrUses OverpaymentAR (SystemTransactionType=15, code AR). Clears invoice outstanding; linked to InvoiceItem and DepositID. JournalItemSettlementState = SettledToInvoice.
24DPDepositDrDepositTransactionTypeID from the deposit. Reduces the deposit balance. JournalItemSettlementState = SettledToClientOrder. Linked via ReferenceJournalItemID.
5 Reviewed Invoice

Trigger: FinalizeInvoices — Accommodations / Funding order invoices reviewed and finalised (non-fee-statement path).

SystemJournalType.ReviewedInvoice

#DB IDCodeDescriptionDr/CrComment / Purpose
11ARAccounts Receivable (ID:1)DrTotalAmountAccountReceivable — creates the receivable for invoice TotalAmount.
2a7RVRevenue (ID:7)CrTotalAmountOffset when billing rate is non-tax. Revenue recognition.
2b10TXSales Tax (ID:10)CrTotalAmountOffset when invoice item has a tax billing rate. Used instead of RV.
3*16ARInvoice Adjustment AR (ID:16)CrOptional — only when TotalAmount > ExpectedAmount (discount). ContraAccountReceivable. Not in SystemTransactionType enum; found by description lookup.
4*17RVInvoice Adjustment RV (ID:17)DrOptional. ContraOffset (RV) — offset for discount when non-tax item.
5*18TXInvoice Tax Adjustment (ID:18)DrOptional. ContraOffset (TX) — when discount applies to a tax item.

* Rows 3–5 are contra items created only when a discount exists. IDs 16, 17, 18 are not in the SystemTransactionType enum.

6 Deposit Settlement

Trigger: MatchDeposit fallback — settles a Funding-funder deposit to an invoice when Accommodation/Fee Drawdown do not apply.

SystemJournalType.DepositSettlement

#DB IDCodeDescriptionDr/CrComment / Purpose
115AROverpayment AR (ID:15)CrAR credit side (OverpaymentAR ID:15). Clears the invoice outstanding.
24DPDeposit (ID:4)DrReduces the deposit balance.
7 Separation Interest

Trigger: AddSeparationInterest / GenerateSeparationInterest — calculates and posts interest on a resident's refundable deposit. V2 also handles monthly accruals and reversals.

SystemJournalType.SeparationInterest

#DB IDCodeDescriptionDr/CrComment / Purpose
14DPDeposit (ID:4)CrStandard path: creates / increases the sep. interest deposit. V2 accrual path: same DP type.
211EXSep. Interest Expense (ID:11)DrStandard path: records the interest expense. Paired with DP via ReferenceJournalItemID.
3†14EXSep. Interest Adjustment (ID:14)Dr/CrV2 path only. Manual adjustment to interest. Direction depends on adjustment amount.
4†19EXSep. Interest Accrual (ID:19)DrV2 path only. Monthly accrual entry (SeparationInterestAccrual).
5†20EXSep. Interest Accrual Reversal (ID:20)CrV2 path only. Reverses the prior accrual (SeparationInterestAccrualReversal).

† Rows 3–5 are V2-only paths.

8 Accommodation Drawdown

Trigger: Drawdown (DailyAccommodation invoice) or SettlePaymentsToInvoice when a refundable accommodation deposit is settled against an accommodation invoice.

SystemJournalType.AccommodationDrawdown

#DB IDCodeDescriptionDr/CrComment / Purpose
115AROverpayment AR (ID:15)CrComment: "Drawdown Payment of {item description}". AR credit via OverpaymentAR (ID:15). Clears accommodation invoice outstanding.
24DPDeposit (ID:4)DrReduces the accommodation deposit balance. FunderID taken from the invoice item, not the deposit itself.
9 Fee Drawdown

Trigger: Drawdown (Fee invoice) or SettlePaymentsToInvoice when a refundable accommodation deposit is settled against a fees invoice.

SystemJournalType.FeeDrawdown

#DB IDCodeDescriptionDr/CrComment / Purpose
115AROverpayment AR (ID:15)CrComment: "Drawdown Payment of {item description}". Clears fees invoice outstanding.
24DPDeposit (ID:4)DrReduces the accommodation deposit balance.
10 Finance Adjustments

Trigger: Three distinct paths all share this journal type: (a) PostAdjustment for deposit adjustments, (b) WriteOffInvoices for invoice write-offs, (c) DMF Capital Gain deposit creation.

SystemJournalType.FinanceAdjustments

#DB IDCodeDescriptionDr/CrPathComment / Purpose
112DPDeposit Adjustment DP (ID:12)Dr/CrDeposit Adj."Deposit Adjustment". Dr for increase, Cr for decrease of deposit balance.
213PMDeposit Adjustment PM (ID:13)Dr/CrDeposit Adj.Offset pair — always opposite sign to the DP Adjustment item.
31ARAccounts Receivable (ID:1)CrWrite-offEliminates remaining AR on the invoice. Comment: "WRITE OFF".
421CRAR Credits (ID:21)DrWrite-offOverpayment/credit clearing offset for the write-off.
54DPDeposit (ID:4)Dr/CrWrite-offReduces/removes deposit if one exists on the invoice being written off.
67RVRevenue (ID:7)Dr/CrWrite-offRV offset for the written-off revenue amount.
710TXSales Tax (ID:10)Dr/CrWrite-offTX offset for the written-off tax amount.
89WOWrite Off (ID:9)Dr/CrWrite-offWO transaction for the write-off debit entry.
94DPDeposit — DMF Capital Gain (ID:4)Dr/CrDMFDeferredManagementFeeExtensionService — Capital Gain deposit DepositTransactionTypeID.
1023PLP&L Account (ID:23)Dr/CrDMFDeferredManagementFeeExtensionService — Capital Gain deposit PaymentTransactionTypeID (ProfitLossAccount).
11 Reviewed Invoice – Fee Statement

Trigger: FinalizeInvoices — fee-statement invoices (Fees COBRa type) reviewed and finalised. Same item structure as Reviewed Invoice (ID:5) but different journal type name.

SystemJournalType.ReviewedInvoiceFeeStatement

#DB IDCodeDescriptionDr/CrComment / Purpose
11ARAccounts Receivable (ID:1)DrTotalAmountAccountReceivable — creates the receivable for the fee invoice amount.
2a7RVRevenue (ID:7)CrTotalAmountOffset — fee revenue recognition (non-tax items).
2b10TXSales Tax (ID:10)CrTotalAmountOffset (TX) for tax-rated items.
3*16ARInvoice Adjustment AR (ID:16)CrOptional. Contra AR discount.
4*17RVInvoice Adjustment RV (ID:17)DrOptional. Contra RV discount offset.
5*18TXInvoice Tax Adjustment (ID:18)DrOptional. Contra TX discount offset.
12 Direct Debit Payments

Trigger: PostTransactionForDirectDebitPayment — posts a direct debit batch; one journal per business unit, one PM per resident, one AR per settled invoice item.

SystemJournalType.DirectDebitPayments

#DB IDCodeDescriptionDr/CrComment / Purpose
15PMPayment Made (ID:5)Dr"Direct Debit Payment" — one PM per resident per BU. Carries ReceiptNumber.
21ARAccounts Receivable (ID:1)CrOne AR per invoice item settled. SettlementState = SettledToInvoice.
3†8SASales Adjustment (ID:8)Dr/CrVia InvoiceService.SaveSettledInvoices. Adjustment items (confirmed in unit tests alongside PM and WO).
4†9WOWrite Off (ID:9)Dr/CrVia InvoiceService.SaveSettledInvoices. Write-off items (confirmed in unit tests alongside PM and SA).

† Rows 3–4 confirmed via TestSaveSettledInvoicesCreatesJournalItemsWithCorrectTransactionTypes; exact code path from PostTransactionForDirectDebitPayment needs full trace.

13 Subsidy Reconciliation SubsidyReconciliationBatchService

Trigger: CreateJournalItemsSubsidyBatch — when a government subsidy batch is posted and reconciled.

SystemJournalType.SubsidyReconciliation

#DB IDCodeDescriptionDr/CrComment / Purpose
1—variousFunding-programme transaction typesDr/CrTransaction types are derived from funder rules and reconcilable items. JournalDescription = batch description. Not statically defined.
14 Automatic Settlement

Trigger: ProcessAutomaticSettlements — nightly or manual run settling eligible deposits against outstanding fee/accommodation invoices.

SystemJournalType.AutomaticSettlement

#DB IDCodeDescriptionDr/CrComment / Purpose
115AROverpayment AR (ID:15)CrClears the invoice outstanding via InvoiceSettlementService.AutoSettlePaymentsToInvoice.
24DPDeposit (ID:4)DrReduces the deposit balance. Paired with AR via ReferenceJournalItemID.
15 Credit Settlement InvoiceSettlementService

Trigger: SettleCreditDeposits — auto-settles AR-type credit deposits (billing-rate credits) against outstanding invoices.

SystemJournalType.CreditSettlement

#DB IDCodeDescriptionDr/CrComment / Purpose
115AROverpayment AR (ID:15)CrAR credit side. Clears invoice outstanding. SettlementState = SettledToInvoice.
221CRAR Credits (ID:21)DrDP side — used when deposit PaymentTransactionTypeID = AccountReceivable (i.e., credit deposits). Reduces the credit deposit.
16 Manual Deposit Interest

Trigger: AddManualInterestDeposit — manually adds an interest amount on an existing deposit (creates a child deposit for the interest).

SystemJournalType.ManualDepositInterest

#DB IDCodeDescriptionDr/CrComment / Purpose
14DPDeposit (ID:4)CrCreates a child deposit for the interest amount. ItemAmount = −InterestAmount.
211EXSep. Interest Expense (ID:11)DrRecords the expense. ItemAmount = +InterestAmount. Cross-referenced to DP item via ReferenceJournalItemID.
17 Deposit Transfer

Trigger: TransferDeposit — moves a deposit between facilities or client orders. Produces 4 journal items (2 balanced Dr/Cr pairs).

SystemJournalType.Transfer

#DB IDCodeDescriptionDr/CrComment / Purpose
14DPDeposit — source facilityDr"Deposit Transfer to {facility}". Removes from source deposit. ItemAmount = +transferAmount.
222TRTransfer — source offsetCr"Deposit Transfer to {facility}". Balancing offset. ItemAmount = −transferAmount. Cross-references DP(from) via ReferenceJournalItemID.
34DPDeposit — target facilityCr"Deposit Transfer from {facility}". Adds to target deposit. ItemAmount = −transferAmount.
422TRTransfer — target offsetDr"Deposit Transfer from {facility}". Balancing offset. ItemAmount = +transferAmount. Cross-references DP(to) via ReferenceJournalItemID.
RET Accommodation Deposit Retentions

Trigger: PostRetentions — posts daily retention deductions against accommodation deposits. Reversal flag flips Dr/Cr sides.

JournalTypeName.AccommodationDepositRetentions (no SystemJournalType enum value)

#DB IDCodeDescriptionDr/CrComment / Purpose
14DPDeposit (ID:4)Dr/Cr"Accommodation Deposit Retentions for {date}". Normal: Dr (reduces deposit). Reversal: Cr.
27RVRevenue (ID:7)Dr/Cr"Accommodation Deposit Retentions for {date}". Normal: Cr (recognises retention revenue). Reversal: Dr.

3. Transaction Types — DB Reference (23 entries)

2 legacy entries (CA, OP) have no usage in the current service layer.   IDs 16, 17, 18 (Invoice Adjustment) are not in SystemTransactionType enum — found only by description lookup. All other AR-coded settlement items use ID:15 (OverpaymentAR), not ID:1.
Mapped 11 — fully traced to service layer code Partial 10 — confirmed in code, path not fully traced Legacy 2 — no current usage found
DB ID Code Description Custom Description Journal Type(s) Coverage Notes
1 AR Accounts Receivable Resident Debtors Control Reviewed Invoice, Reviewed Invoice–Fee Statement, Direct Debit Payments, Deposit Settlement, Credit Settlement, Automatic Settlement, Accommodation/Fee Drawdown Mapped Primary AR for invoice creation. Settlement credit side uses ID:15 instead.
2 CA Contractual Allowance Contractual Allowance — Legacy Not in SystemTransactionType enum; no usage found in current service layer.
3 OP Overpayment Overpayment — Legacy Not in SystemTransactionType enum. Code uses OverpaymentAR (ID:15, code AR) instead. This entry appears unused.
4 DP Deposit Deposit Liability New Deposit, Deposit Refund, Sep. Interest, Manual Deposit Interest, Dep. Settlement, Acc./Fee Drawdown, Acc. Dep. Retentions, Deposit Transfer, Finance Adj (DMF) Mapped DepositTransactionTypeID for accommodation / refundable deposits. Most widely used transaction type.
5 PM Payment Made Bank/Deposit Clearing New Deposit, Deposit Refund, Direct Debit Payments Mapped Cash receipt or payout item. Carries ReceiptNumber. GenerateRefundJournalItems uses PM (not RF) for refund payout.
6 RF Refund Bank/Refund Clearing Possibly New Deposit (as PaymentTransactionTypeID) Partial In SystemTransactionType.Refund=6 but GenerateRefundJournalItems uses PM (ID:5). RF may appear as PaymentTransactionTypeID on some imported deposits, triggering its use in New Deposit journals.
7 RV Revenue Revenue Reviewed Invoice, Reviewed Invoice–Fee Statement, Finance Adj (write-off), Acc. Dep. Retentions Mapped Revenue recognition; also used as offset in write-off journals.
8 SA Sales Adjustment Sales Adjustment Reviewed Invoice / Direct Debit Payments (settlement adjustment path) Partial Confirmed in InvoiceService.SaveSettledInvoices unit tests alongside PM and WO. Exact journal type code path needs further trace.
9 WO Write Off Write Off Finance Adjustments (WriteOffInvoices) Partial Used in WriteOffInvoices; offsets the remaining AR when writing off an invoice. Also confirmed in SaveSettledInvoices tests.
10 TX Sales Tax Tax Reviewed Invoice, Reviewed Invoice–Fee Statement (tax items) Mapped Used when InvoiceItem has a tax billing rate (TotalAmountOffset for tax line).
11 EX Separation Interest Expense Expense Separation Interest, Manual Deposit Interest Mapped Expense side of the standard separation interest journal item.
12 DP Deposit Adjustment Deposit Liability Finance Adjustments (PostAdjustment) Mapped DepositAdjustmentDP — first journal item of a deposit adjustment pair.
13 PM Deposit Adjustment Bank/Deposit Clearing Finance Adjustments (PostAdjustment) Mapped DepositAdjustmentPM — offset journal item of the deposit adjustment pair.
14 EX Separation Interest Adjustment Expense Separation Interest (V2 adjustments) Partial Used in SeparationInterestService.V2 for manual adjustments to accrued interest.
15 AR Overpayment Resident Debtors Control Over Payment Settlement, Credit Settlement, Accommodation Drawdown, Fee Drawdown, Deposit Settlement, Automatic Settlement, New Deposit (fee-side DepositTransactionTypeID) Mapped OverpaymentAR — the AR credit side in ALL settlement/drawdown journals. Code AR (same as ID:1) but distinct DB record.
16 AR Invoice Adjustment Resident Debtors Control Reviewed Invoice, Reviewed Invoice–Fee Statement (contra AR) Partial Not in SystemTransactionType enum. Contra AR item when TotalAmount > ExpectedAmount (discount). Found by description lookup in InvoiceService.
17 RV Invoice Adjustment Revenue Reviewed Invoice, Reviewed Invoice–Fee Statement (contra RV) Partial Not in SystemTransactionType enum. Contra RV offset for Invoice Adjustment AR (ID:16).
18 TX Invoice Tax Adjustment Tax Reviewed Invoice, Reviewed Invoice–Fee Statement (contra TX) Partial Not in SystemTransactionType enum. Contra TX for tax items when TotalAmount > ExpectedAmount.
19 EX Separation Interest Accrual Expense Accrual Separation Interest (V2 accrual path) Partial Used in SeparationInterestService.V2 for monthly accruals (SeparationInterestAccrual).
20 EX Separation Interest Accrual Reversal Expense Accrual Separation Interest (V2 accrual reversal) Partial Used in SeparationInterestService.V2 to reverse prior accruals (SeparationInterestAccrualReversal).
21 CR Account Receivable Credits Deposit Liability Credit Settlement, Finance Adjustments (write-off overpayment clearance) Mapped Used when deposit PaymentTransactionTypeID = AccountReceivable (credit deposits).
22 TR Transfer Transfer Clearing Account Deposit Transfer Mapped Transfer clearing — offset pair for each DP item in a deposit transfer (4 journal items total).
23 PL P&L Account RV Capital gain/loss account Finance Adjustments (DMF Capital Gain deposit) Partial Used in DeferredManagementFeeExtensionService as PaymentTransactionTypeID on Capital Gain deposits.