Payments and Allocations (PMT)
The pmt submodule of acc owns the payment stream — money in or money out — together with the per-invoice allocations that distribute a payment across one or more invoices. A Payment can be linked to a BankStatementLine for bank-reconciled flows or stand on its own (cash). A PaymentAllocation carries the amount allocated to a sales- or purchase-invoice line, plus any discount or write-off amount captured against a write-off ledger account. The submodule depends on acc.bnk for bank account / statement line, acc.jrn for the journal entry created on confirm, acc.sin and acc.pin for the invoices being paid, acc.gld for the write-off account, acc.doc for the matched document line, and com.par / com.org / com.fin / com.log for partner/department/currency.
Concepts
PaymentA single money movement (incoming or outgoing) entered against a partner. Goes through
Draft→Confirmed; on confirm a journal entry is created viaacc.jrnand the allocations are settled against the invoices.Payment TypeWhether the payment is incoming (we receive money) or outgoing (we pay).
Payment MethodWhether the payment moves through a bank account or cash.
Payment AllocationA line of the payment that allocates an amount to a single invoice. Captures the allocated amount in foreign and internal currency, plus any discount taken or write-off booked.
Entities
Payment (Payment)
A single money movement.
| Field | Description |
|---|---|
| Business key — the document code (final). |
| Incoming or outgoing — see Payment Types below (final). |
| Bank or cash — see Payment Methods below (final). |
| Owning department (final). |
| Owning company, derived from the department (operational, internal). |
| The counter-party. |
| Payment date. |
| Free-form description. |
| Payment currency and conversion rate. |
| Optional external reference. |
| Optional bank account (for bank payments). |
| The journal the payment posts to. |
| Optional originating bank-statement line. |
| The journal entry created on confirm. |
| Lifecycle flag. |
| Derived status — see Payment Statuses below. |
| Sum of allocations in foreign / internal currency (operational). |
| The per-invoice allocations. |
A validation rule enforces that the journal entry’s partner equals the payment’s partner.
Payment Types (PaymentType)
| Code | Name | Meaning |
|---|---|---|
| Incoming | Money received from the partner. |
| Outgoing | Money paid to the partner. |
Payment Methods (PaymentMethod)
| Code | Name | Meaning |
|---|---|---|
| Bank | Payment through a bank account. |
| Cash | Cash payment. |
Payment Statuses (PaymentStatus)
| Code | Name | Meaning |
|---|---|---|
| Draft | Editable; not yet confirmed. |
| Confirmed | Locked; journal entry has been created. |
Payment Allocation (PaymentAllocation)
A single allocation of part of a payment to one invoice.
| Field | Description |
|---|---|
| Owning payment (composite business key with |
| Line ordinal within the payment (final). |
| The matched document line (the invoice line). |
| Optional convenience reference to the sales invoice (for queries). |
| Optional convenience reference to the purchase invoice (for queries). |
| Amount allocated in the payment currency. |
| Amount allocated in the internal currency. |
| Optional discount taken on this invoice (foreign currency). |
| Optional write-off booked on this invoice (foreign currency). |
| Optional ledger account the write-off is booked to. |
Functionality
Confirm / unconfirm
The confirm and confirmUndo write actions on Payment flip the payment between Draft and Confirmed. Confirming creates the matching JournalEntry through acc.jrn and settles the allocations against the linked invoices; unconfirming reverses both.
Public API
ACC_PMT_QueryApi and ACC_PMT_CommandApi
This submodule does not provide query- or command-API classes. Other modules read payments and allocations through the standard generated readers and trigger confirm/unconfirm through the entity action handler (PaymentActionWriter).
ViewModel actions
| Action | User-visible effect |
|---|---|
| Locks a draft payment, creates the journal entry, and settles the allocations. |
| Reverts a confirmed payment back to draft and rolls back the journal entry. |