KamoCRM

[sign-convention] money sign-convention validators + Adjustment model

Featurekamo-shared-library
Shipped
4 ஜூலை, 2026 அன்று 2:09 PM UTC
Author
Kamo
Commit
30a69a4

Per the owner's canonical rules. Core domain money never encodes meaning in a sign: - **************** / requirePositive — assets, receivables, liabilities, payables, fees, costs, credits are POSITIVE magnitudes in their own fields (rules 1-3); a negative value fails fast. - AdjustmentDirection {INCREASE, DECREASE, CREDIT, DEBIT, PREMIUM, DISCOUNT} — rate/ price adjustments (LLPAs, SRPs, pricing adjustments, concessions, rebates) expose an explicit direction, never a signed number (rule 5). - **************** + the self-validating Adjustment record — reject a magnitude whose sign conflicts with the declared direction (rule 6); a signed Adjustment cannot be constructed. Rules 4 (accounting +/- lives only in the GL layer) and 7 (signing only in the adapter layer) are architectural boundaries the guard enforces by living in the CORE and rejecting signed encoding — the sign-bearing conversion for investor/warehouse/ accounting/MISMO feeds stays out of the domain by construction. 4 tests green.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing