Skip to content

Cannot generate PDF for old invoices anymore #75

Description

@remi-filament

Hi @alexis-via ,

When trying to generate PDF for an invoice validated before installation of the fr-einvocing modules, we get the following error :

La génération du fichier XML factur-x avec le profil extended a échouée. Erreur: The factur-x extended XML file is not valid against the 2 schematron(s). 1 errors found:

  1. [fr-ctc] BR-FR-12/BT-49 : Le BT-49 est obligatoire.
    Valeur actuelle : BT-49="".
    Error location: /*:CrossIndustryInvoice[namespace-uri()='urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100'][1]

This is because there is no directory line selected on the invoice, which is normal on old invoices since this field did not exist... + the field is readonly when invoice is not in draft so it cannot even be updated manually via the interface.

Maybe we should store somewhere a date stating that invoices after this date need to be compliant with schematron and relax content for invoices posted before that date ?

What do you think ?

I can propose a PR on both v16 and v18 but I would rather agree on the way-forward before !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions