The allowed maximum number of decimals for the Document level charge amount (BT-99) is 2.
/ubl:Invoice/cac:AllowanceCharge[cbc:ChargeIndicator = true()] | /cn:CreditNote/cac:AllowanceCharge[cbc:ChargeIndicator = true()]
string-length(substring-after(cbc:Amount,'.'))<=2