Accounts Receivable (AR)#
AR tracks what customers owe us. Invoices flow from Ship Bills, credit memos from returns / adjustments, cash comes in via Deposits.
Structure#
- AR invoices are the customer-facing side of Ship Bills — one AR row per invoiced ship-bill.
- AR aging snapshots (
ARAging/) — imported / computed for AP-side counterparties too. - Offsets (
ArOffsetHelper) — mutual net-off between AR balance and AP balance for entities that are both customer and supplier. - Credits —
ArCreditHelpercovers customer credit memos and the NSF-view (ArCredit4NSFView).
Flow#
- Ship Bill posts (see Ship Bills).
- AR liability posts to the customer’s default AR account via
ArSetupHelper. - Customer payment lands in a Deposit — see Payments, Deposits & Bank.
- Deposit line is applied to one or more AR invoices; short-pays / discounts / write-offs post to the configured GL accounts.
Offsets#
When a supplier is also a customer, ArOffsetHelper nets the AP balance we owe them against the AR balance they owe us — reduces cash movement and reconciles the two ledgers.
Business rules#
- An AR invoice can be voided only while unpaid; a paid invoice needs a credit memo.
- Discounts taken past the discount date are blocked unless overridden.
- Aging buckets are configurable per tenant (typically Current / 30 / 60 / 90 / 120+).
- NSF (returned payment) reverses the payment application and re-opens the AR balance.
Where it lives#
| Layer | File |
|---|---|
| Controller | AccountReceivableController, ArAgingImportController |
| Helper | ArSetupHelper.cs, ArOffsetHelper.cs, ArCreditHelper (via IArCreditHelper), MnxEFModel/Helper/ARAging/ |
| Related | Ship Bills, Payments, Deposits & Bank, GL |