# BR-FR-DEC-03_BT-147

Source: https://xmlvalid.com/rules/BR-FR-DEC-03_BT-147

> Le montant « … » est invalide. Il doit : - être un nombre strictement positif (sans signe « - »), - comporter au plus 6 décimales (séparateur « . »), - contenir au maximum 19 caractères (hors séparateur). Veuillez corriger ce montant pour respecter le format requis.

- Level: error
- Rule sets: French e-invoicing rules (UBL) 1.4.0.04
- Context: `ubl:Invoice/cac:InvoiceLine/cac:Price/cac:AllowanceCharge | cn:CreditNote/cac:CreditNoteLine/cac:Price/cac:AllowanceCharge`
- Test: `not($amount) or (custom:isSpecialContractBD(/ubl:Invoice|/cn:CreditNote) and custom:is-valid-decimal-19-6($amount)) or (not(custom:isSpecialContractBD(/ubl:Invoice|/cn:CreditNote)) and custom:is-valid-decimal-19-6-positive($amount))`

> BR-FR-DEC-03/BT-147 : Le montant « … » est invalide. Il doit : - être un nombre strictement positif (sans signe « - »), sauf si Cadre de Facturation (BT-23) est S9, M9 ou B9 (bi-directionnel) - comporter au plus 6 décimales (séparateur « . »), - contenir au maximum 19 caractères (hors séparateur). Veuillez corriger ce montant pour respecter le format requis.

- Level: error
- Rule sets: French e-invoicing rules (CII) 1.4.0.04
- Context: `rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeAgreement/ram:GrossPriceProductTradePrice/ram:AppliedTradeAllowanceCharge/ram:ActualAmount`
- Test: `(custom:isSpecialContractBD(/rsm:CrossIndustryInvoice) and custom:is-valid-decimal-19-6($amount)) or (not(custom:isSpecialContractBD(/rsm:CrossIndustryInvoice)) and custom:is-valid-decimal-19-6-positive($amount))`

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