CreditNoteHandler (adjustment/credit_note_service.rs)

gears-rust · gears/bss/ledger/ledger/src/infra/adjustment/credit_note_service.rs · rust · Apache-2.0
payments

! `CreditNoteHandler` — the Slice-3 credit-note orchestrator (design §4.2, Group ! C). It posts a credit note's balanced compensating entry through the invariant ! [`PostingService`] and, in the SAME serializable transaction (via a ! [`PostSidecar`]), atomically updates every gua

// Source: https://github.com/constructorfabric/gears-rust | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! `CreditNoteHandler` — the Slice-3 credit-note orchestrator (design §4.2, Group
//! C). It posts a credit note's balanced compensating entry through the invariant
//! [`PostingService`] and, in the SAME serializable transaction (via a
//! [`PostSidecar`]), atomically updates every guarded counter/schedule the note
//! touches:
//!
//! 1. **read state** (out-of-txn, oldest-first like
//!    [`CreditApplicationService`](crate::infra::payment::credit)): the targeted
//!    obligation's ACTIVE per-stream `recognition_schedule` state + the invoice's
//!    posted-AR-incl-tax (h

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key