Map an allowance or charge according to what it changes, where it applies and how it is calculated. A line reduction, document-wide allowance and additional charge are different facts. A prior payment is another role entirely. Reaching the same final total does not make those representations interchangeable.
The mapping preparation workflow records the agreed commercial meaning before target fields. The current creator implements percentage line discounts only. It has no formal document-level allowance or charge model, fixed discount field or prepaid reconciliation.
Identify the adjustment level
A line adjustment relates to a particular billed supply. A document adjustment relates to the invoice under its applicable rules. Preserve the level specified by the agreement instead of assigning the amount wherever the source application has a convenient control.
OpenPeppol’s published billing structure distinguishes line and document adjustment groups. That illustrates why a final mapper needs the level as well as the numeric value. The current app does not implement those formal groups by storing a related explanation in notes.
If a global concession affects several treatments, determine the appropriate allocation under the actual requirements. Do not place the full reduction on an arbitrary line to make the total match. Record the unresolved model requirement for a suitable final system.
Preserve direction and calculation type
An allowance reduces a charge and a charge increases it under the relevant model. Keep that direction explicit. A negative source value is not a universal way to express every adjustment, and the current creator does not support negative invoice rows.
A percentage and a fixed amount also behave differently when the base changes. Preserve the accepted type and any calculation base. Converting a fixed deduction into an approximate percentage can change both later revisions and the target’s structured meaning.
For a fictional base of 200.00, ten percent and a fixed 20.00 reduction initially match. If the base becomes 250.00, they no longer do. A mapping test should expose that difference instead of assuming the first matching example proves equivalence.
Keep source-price and adjustment facts distinct
Determine whether the unit price already includes a negotiated reduction. A separate adjustment applied again can double the effect. Keep the accepted quotation and price basis available to explain which values should be mapped.
Do not reconstruct a fictional original price merely to populate an optional gross-price field. Preserve confirmed source facts and omit or resolve unsupported content according to the actual target rules. A complete-looking calculation is not evidence of an agreed price history.
The current app’s percentage discount is calculated from its rounded initial line amount. A target model may require a different set of relationships or precision. Compare the intermediate values and required rules, not only the final invoice sum.
Record reasons and treatment relationships
A formal profile may need reason text, codes and tax-category association for an adjustment. Confirm the actual requirements and source meanings. A generic note saying commercial discount does not automatically satisfy a typed reason-code field.
Do not infer a tax consequence from the adjustment amount alone. The responsible review determines the treatment; the mapper expresses it. Preserve the affected supplies and any required allocation evidence so the final implementation does not guess.
Use the tax-breakdown mapping review to connect adjustments with the appropriate final group relationships. Keep treatment decisions separate from arithmetic differences caused by rounding or a changed base.
Review effects on totals
A target’s document totals must include adjustments according to its implemented model. Copying a source total without reproducing the underlying relationships can create a mismatch or conceal missing fields. Recompute and validate where the target requires it.
Distinguish a payment from an allowance. A deposit settles part of an obligation; it does not necessarily reduce the value of the supply. The current app cannot represent that settlement relationship by entering a discount or removing a valid line.
If the intended transaction exceeds the current model, finalise in software that implements it. A note describing the missing amount does not change the creator’s numeric result or supply the required formal fields.
Build an adjustment test set
Use fictional examples for a line percentage, fixed deduction and document-wide adjustment, with clearly different source roles. Verify supported cases and require clear reporting of unsupported ones. An adapter should not silently transform every adjustment into one convenient representation.
Change the base in a second test and check the recalculated result. This reveals a fixed-versus-percentage error that one example can hide. Include a missing reason or association where the target rules require it, then inspect the actual validation response.
Retain the source agreement, mapping rule, output and configuration with the test. The creator’s JSON, CSV and printable output do not establish formal allowance/charge mapping or compliance. A suitable final implementation needs both accurate commercial facts and the required representation and validation before delivery.
Keep payment amounts out of the allowance test record unless settlement is the feature being tested. Otherwise a matching net balance can hide the very role distinction the test is intended to establish.