1. Conditions and Purpose of the Feature
Why This Feature Is Needed
- It enables you to automatically create a PDF invoice in ZUGFeRD format from an Patricia RTF invoice.
- It simplifies the process of generating electronic invoices that comply with the ZUGFeRD standard.
Availability Condition
- A valid Letterhead for ZUGFeRD must be defined in the DMS settings: .
- If multiple Letterheads are available, the user can choose the required option before creating the invoice.
2. Letterhead and Seller Details
Seller
- Specified in the Letterhead itself.
- Cannot be changed by the user when forming the invoice.
- If you need to change the seller, administrator must do so by creating or editing a new Letterhead.
Choosing a Letterhead
- When several Letterheads are configured in DMS, the user selects from the available list.
- The choice affects the seller’s details and the final PDF layout.
3. Data Sufficiency and Possible Errors
Required Data
- Patricia must contain enough information about the invoice (line items, prices, parties’ details, tax data, etc.).
- The specific list of mandatory fields may vary but typically includes the seller’s information, buyer’s information, and details of goods/services.
Consequences of Insufficient Data
- If some critically important data is missing, the system may:
- Return an error (if generation is impossible without these data), or
- Create an invalid invoice (if the system allows partial completion, but the final document will not conform to the ZUGFeRD standard).
Result of Successful Generation
- Upon successful completion of the operation, a PDF file with the suffix
_ZUGFeRD.pdf
is created in the current case. - This makes it easier to locate and identify ZUGFeRD-compliant invoices within the DMS.
4. Invoice Validation and Verification of Readiness for ZUGFeRD PDF creation
The ValidateZugferd operation retrieves invoices for a given seller within a provided date range, performs validation checks on each invoice, and returns an HTML table summarizing those checks.
Parameters
Parameter | Type | Required? | Description |
---|
sellerId | Long | Yes | Name id of company to be used as seller during validation process. |
---|
from | String | No | Start date in yyyy-MM-dd format. If omitted along with to, the last 7 days are used. |
---|
to | String | No | If only to is provided (without from), an error is thrown. If omitted, the current date is used. |
---|
Date-Handling Logic
If both from and to are missing, the date range defaults to the last seven days (from now - 7 days to now).
If from is provided but to is missing, to defaults to the current date.
If to is provided but from is missing, the operation throws an error (it does not allow a “to-only” date).
The service returns an HTML-formatted string containing:
A heading stating "Invoice Validation Results".
A message showing which date range was used.
A table summarizing validation checks, with these columns:
- Invoice ID
- Scope
- BT Code
- Description
- DB Field
- Value
- Result
How to Invoke
Nuxeo Automation Scripting or Chains: Pass the parameters (from, to, sellerId) into the ValidateZugferd operation.
Use the CaseBrowser administrative endpoint (you need to be logged in as Administrator) - $dmsAddress/casebrowser/admin/operation/ValidateZugferd?sellerId=$sellerId&from=$fromDate&to=$toDate
Avoid using large time periods as it might be time consuming (~0.1-0.5s per invoice)