# PEPPOL-EN16931-R041

Source: https://xmlvalid.com/rules/PEPPOL-EN16931-R041

> Allowance/charge base amount MUST be provided when allowance/charge percentage is provided.

- Level: error
- Rule sets: Peppol BIS Billing 3.0 rules 3.0.21, XRechnung 3.0 rules (UBL) 2.6.0
- Context: `ubl-invoice:Invoice/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-invoice:Invoice/cac:InvoiceLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)] | ubl-creditnote:CreditNote/cac:CreditNoteLine/cac:AllowanceCharge[cbc:MultiplierFactorNumeric and not(cbc:BaseAmount)]`
- Test: `false()`

> Allowance/charge base amount MUST be provided when allowance/charge percentage is provided.

- Level: error
- Rule sets: XRechnung 3.0 rules (CII) 2.6.0
- Context: `ram:SpecifiedTradeAllowanceCharge[ram:CalculationPercent and not(ram:BasisAmount)]`
- Test: `false()`

## Why it fails

- An allowance or charge gives a percentage (`cbc:MultiplierFactorNumeric`) but no base amount (`cbc:BaseAmount`).

## How to fix it

- Add the amount the percentage was applied to. Then `cbc:Amount` must equal the base amount times the percentage divided by 100 (PEPPOL-EN16931-R040).

Validate a document against these rules: https://xmlvalid.com/validate
