Skip to content

UBL Content Check

The purpose of the ubl content check

The content check allows us to control the consistency and the logic for specific data fields as well as verifying if the mandatory data are present in the file. If the controls are not being validated, we are not submitting the invoice for sending.

Document must be standardized in order to be shared to every stakeholder. To standardize the document, we need to follow rules (for example European rules EN16931) . The purpose of the ubl content check is to be able to validate those rules. To be suitable for any customers, this feature is configurable thanks to tables.

Library of methods

Today we have that list :

  • checkOptional : if initialCheck = true, will check if the value isn’t null or empty.

  • displayInWorkflow : set elements to display in workflow.

  • checkNotEmpty : check if the value isn’t null or empty.

  • checkDateIsValid : check if the date follow the right format. The format is set in the MethodParameter.

  • checkOptionalDateIsValid : if the value is present, check if the date follow the right format. The format is set in the MethodParameter.

  • checkLength : check the length value. The length is set in the MethodParameter.

  • checkCode : check if the value is one of the list. The list is set in the table UBL-content-check-codes.

  • checkRegex : check if the value match the regex set in the MethodParameter.

  • checkOr : if the MethodParameter is group do a specific process, else check if the value is not null or empty.

  • checkComplex : this will call a script, the scriptName is the MethodParameter.

  • checkControlKey : check if the value is a valid control key based on standard modulo10. The type of code must be set in the MethodParameter.

  • checkNumericIsValid : check if the value is a positive number.

  • checkNotNegativeNumericIsValid : check if the value is a number.

  • checkCountryCode : check if the value is compliant with the currencies listed in ISO 3166 (alpha-2 standard only).

  • checkCurrencyCode : check if the value is compliant with the ISO 4217 repository.

  • checkUnitAndDecimalNumberIsValid : check if the value has the right numbers of unit and decimal, MethodParameter = Number.Number or . (unit.decimal).

  • checkOptionalUnitAndDecimalNumberIsValid : if the value is present do checkUnitAndDecimalNumberIsValid.

  • checkSumIsValid : check if the value is the sum of the field set in the MethodParameter, MethodParameter = field (must be a multiple element).

  • checkOptionalSumIsValid : if the value is present do checkSumIsValid.

  • checkUntdid1001 : check if the value is from UNTDID 1001 list.

  • checkMandatoryFieldInGroupIsValid : check if the field given in the MethodParameter is present in the Group given in the record, MethodParameter = field (must be a field in a multiple element).

  • checkMandatoryFieldInOptionalGroupIsValid : if the group is present do checkMandatoryFieldInGroupIsValid.

  • checkUomIsValid : check if the value is in the EN16931 code list.

  • checkValueStartWithCountryCode : the value must start with country code (country code must be listed in ISO 3166 (alpha-2 standard only)).

  • checkInvoicePeriodDateIsValid : check if the InvoicePeriod contains a StartDate or/and a EndDate. If both are used check if the StartDate is before the EndDate. For InvoicePeriod and InvoiceLine_InvoicePeriod.

  • checkInvoiceDueDateIsValid : if Invoice_PayableAmount is positive, then this field shall be present.

  • checkInvoiceTaxSubTotalIsValid : Invoice_TaxSubTotal_TaxPercent must not be empty, unless the invoice is not subject to VAT (Invoice_TaxSubTotal_ID == E). And check if Invoice_TaxSubTotal_TaxAmount = Invoice_TaxSubTotal_TaxableAmount x ((Invoice_TaxSubTotal_TaxPercent) / 100), rounded to two decimals.

  • checkDuplicate : check if multiple transactions contain the same invoice number (with a store procedure).

  • checkLegalIdentifierIsValid : check the validity of the legal identifier such as DUNS(0060), SIREN(0002), SIRET(0009), VAT intracommunity number(0223).

  • checkOptionalLegalIdentifierIsValid : if the value is present, check if the value is in the EN16931 code list.