XML Electronic Invoices

Questions, comments, discussions. Over time certain topics might be moved to their own category.
Post Reply
maxsabba
Posts: 7
Joined: Mon Dec 03, 2018 1:05 pm

XML Electronic Invoices

Post by maxsabba »

In Italy starting 2019, all invoices must be send only as XML file. I'd tried to load in Mayan some sample of these files, but I'm not able to view these documents.

Someone can aid me, to address this problem?

Thanks.

See the example attached.
Attachments
eInvoice.zip
(9.6 KiB) Downloaded 180 times
User avatar
eriggs
Developer
Developer
Posts: 12
Joined: Fri Sep 07, 2018 3:32 am

Re: XML Electronic Invoices

Post by eriggs »

XML is just data, like JSON or a CSV file. We need to find a program that can render the XML into an image or a PDF in order to be able to support the e-invoice format.
User avatar
eriggs
Developer
Developer
Posts: 12
Joined: Fri Sep 07, 2018 3:32 am

Re: XML Electronic Invoices

Post by eriggs »

Is this the expected look of the e-invoice?
e-invoice-724999.png
e-invoice-724999.png (42.71 KiB) Viewed 6814 times
maxsabba
Posts: 7
Joined: Mon Dec 03, 2018 1:05 pm

Re: XML Electronic Invoices

Post by maxsabba »

Ciao eriggs,

no, this is a notification notification, with default style sheet defined for this kind of documents.

The eInvoice can use use a different style sheet.

My question is how can I manage these kinds of documents using Mayan-Edms.
Attachments
IT01234567890_FPR02.xml.html-1.png
IT01234567890_FPR02.xml.html-1.png (155.29 KiB) Viewed 6764 times
maxsabba
Posts: 7
Joined: Mon Dec 03, 2018 1:05 pm

Re: XML Electronic Invoices

Post by maxsabba »

I don't need to use a specific application, i just enough to associate these documents to the correct XLST file; I'm not able to understand how render the invoices on XML format, loaded inside Mayan-edms with a specific XLST file.
Danynad
Posts: 3
Joined: Tue Mar 09, 2021 1:48 pm

Re: XML Electronic Invoices

Post by Danynad »

hello,

I have exactly the same problem when handling electronic invoices as XML files.
But actually it happens with any other XMLs. It seems mayan tryes to read them as an image.

I'm running mayan edms under docker compose and pretty default setup: mayanedms/mayanedms:3, Postgresql 13 and Redis.

This is the output I get in the console:

Code: Select all

app_1         | mayan.apps.converter.backends.python <389> [ERROR] "get_page_count() line 185 Exception determining page count using Pillow; cannot identify image file <File: /var/lib/mayan/document_storage/dc92ba13-5879-442a-9df0-664496574337>"
app_1         | [2021-03-09 14:00:12,968: ERROR/ForkPoolWorker-2] Exception determining page count using Pillow; cannot identify image file <File: /var/lib/mayan/document_storage/dc92ba13-5879-442a-9df0-664496574337>
and this is how it looks like under documents view:
Schermata del 2021-03-09 15-07-51.png
Schermata del 2021-03-09 15-07-51.png (7.64 KiB) Viewed 4029 times
Is there a way to let mayan analize this kind of files, even as plain text?
I just need them processed and text analyzed, I don't care to get a nice view as like transformed to pdf.

Thanks in advance.
Danynad
Posts: 3
Joined: Tue Mar 09, 2021 1:48 pm

Re: XML Electronic Invoices

Post by Danynad »

I'm testing a workaround, appening a "content-type" string on top of my XML files.

This way I get the file preview and OCR result, but "content" page it's still blank.
"File metadata" aswell now gets filled of correct values, and not the actual file content.

Code: Select all

Content-type: text/xml; charset="utf-8"
<?xml version="1.0" encoding="UTF-8"?>
...
lastly, my console output isn't all good. After every file upload I get this, but I'm not sure what it means.

Code: Select all

postgresql_1  | 2021-03-10 02:09:23.154 UTC [5422] ERROR:  duplicate key value violates unique constraint "file_caching_cachepartition_cache_id_name_aa955bb8_uniq"
postgresql_1  | 2021-03-10 02:09:23.154 UTC [5422] DETAIL:  Key (cache_id, name)=(2, version-3620792b-9c3c-44a2-a3bd-71b4ed20ceca-38) already exists.
postgresql_1  | 2021-03-10 02:09:23.154 UTC [5422] STATEMENT:  INSERT INTO "file_caching_cachepartition" ("cache_id", "name") VALUES (2, 'version-3620792b-9c3c-44a2-a3bd-71b4ed20ceca-38') RETURNING "file_caching_cachepartition"."id"
app_1         | mayan.apps.documents.models.document_version_models <383> [ERROR] "get_intermediate_file() line 260 Error creating intermediate file "intermediate_file"; ."
app_1         | [2021-03-10 02:09:23,703: ERROR/ForkPoolWorker-1] Error creating intermediate file "intermediate_file"; .
app_1         | mayan.apps.documents.models.document_page_models <383> [ERROR] "get_image() line 252 Error creating page cache file "base_image"; "
app_1         | [2021-03-10 02:09:23,707: ERROR/ForkPoolWorker-1] Error creating page cache file "base_image"; 
Post Reply