Overview
TheAllowanceCharge class represents either an allowance (discount) or a charge (surcharge) that can be applied at the document level or line level in UBL documents. This component is essential for representing price adjustments, discounts, handling fees, shipping charges, and other modifications to base amounts.
Class Definition
Constructor Parameters
An indicator that this AllowanceCharge describes a charge (true) or a discount/allowance (false)
A mutually agreed code signifying the reason for this allowance or charge
The reason for this allowance or charge, expressed as text
The monetary amount of this allowance or charge to be applied
A tax category applicable to this allowance or charge
An identifier for this allowance or charge
The monetary amount to which the multiplier factor is applied in calculating the amount of this allowance or charge
Common Reason Codes
Allowance (Discount) Codes
41- Bonus for works ahead of schedule42- Other bonus60- Manufacturer’s consumer discount62- Due to military status63- Due to work accident64- Special agreement65- Production error discount66- New outlet discount67- Sample discount68- End-of-range discount95- Discount
Charge (Surcharge) Codes
AA- AdvertisingAAA- TelecommunicationABL- Additional packagingADR- Other servicesAEO- Pick-upFC- Freight serviceFI- FinancingLA- LabellingPC- PackingSH- Shipping and handling
Usage Examples
Important: Set
chargeIndicator to false for discounts/allowances (reduces the total) and true for charges/surcharges (increases the total). This is a common source of errors.Calculation Impact
Allowances and charges affect invoice totals as follows:Document-Level Calculation
Line-Level Calculation
Exported Aliases
TheAllowanceCharge class may also be exported as:
ExtraAllowanceChargeFreightAllowanceChargeServiceAllowanceCharge
Related Components
- TaxTotal - Taxes may apply to allowances/charges
- TaxCategory - Tax treatment of the allowance/charge
- Invoice - Document-level allowances/charges
- InvoiceLine - Line-level allowances/charges
- LegalMonetaryTotal - Reflects impact of allowances/charges
Best Practices
- Indicator Value: Always double-check the
chargeIndicatorvalue (false for discounts, true for charges) - Reason Codes: Use standard UNCL 5189 and UNCL 7161 codes for interoperability
- Base Amount: Include
baseAmountwhen applying percentage-based adjustments - Tax Treatment: Ensure allowances/charges have appropriate tax categories
- Clear Descriptions: Provide clear
allowanceChargeReasontext for transparency - Level Placement: Use document-level for global adjustments, line-level for item-specific adjustments