Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URIID of an AdditionalDocumentReference is not converted #20

Closed
msccip opened this issue Apr 19, 2023 · 6 comments
Closed

URIID of an AdditionalDocumentReference is not converted #20

msccip opened this issue Apr 19, 2023 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@msccip
Copy link

msccip commented Apr 19, 2023

Hi,

CII:

           <ram:AdditionalReferencedDocument>
               <ram:IssuerAssignedID>2300000013.PDF</ram:IssuerAssignedID>
               <ram:TypeCode>916</ram:TypeCode>
               <ram:Name>PDF</ram:Name>
               <ram:AttachmentBinaryObject mimeCode="application/pdf" filename="2300000013.PDF">JVBER...</ram:AttachmentBinaryObject>
           </ram:AdditionalReferencedDocument>
           <ram:AdditionalReferencedDocument>
               <ram:IssuerAssignedID>test.pdf</ram:IssuerAssignedID>
               <ram:URIID>https://test.xrechnung-bdr.de/attachments/api/v1/File/...</ram:URIID>
               <ram:TypeCode>916</ram:TypeCode>
               <ram:Name>ein Test Link</ram:Name>
           </ram:AdditionalReferencedDocument>

UBL:

  <cac:AdditionalDocumentReference>
    <cbc:ID>2300000013.PDF</cbc:ID>
    <cbc:DocumentDescription>PDF</cbc:DocumentDescription>
    <cac:Attachment>
      <cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="2300000013.PDF">JVBER...</cbc:EmbeddedDocumentBinaryObject>
    </cac:Attachment>
  </cac:AdditionalDocumentReference>
  <cac:AdditionalDocumentReference>
    <cbc:ID>test.pdf</cbc:ID>
    <cbc:DocumentDescription>ein Test Link</cbc:DocumentDescription>
  </cac:AdditionalDocumentReference>

Also the TypeCode is missing. The CII invoice has been successfully validated.

@phax phax self-assigned this Apr 19, 2023
@phax phax added the bug Something isn't working label Apr 19, 2023
@phax
Copy link
Owner

phax commented Apr 19, 2023

According to the EN, the following rules apply:

  • BT-17 maps in CII to /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID with the comment Use for “Tender or lot reference” with TypeCode “50”
  • BT-18 maps in CII (also) to /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:IssuerAssignedID but with the comment Use for “Invoiced object identifier” with TypeCode “130” and ReferenceTypeCode
  • BT-18-1 maps in CII to /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:AdditionalReferencedDocument/ram:ReferenceTypeCode

So if this is your BT, then I would say you should use ReferenceTypeCode with value 916 and TypeCode with value 130 - right?

@msccip
Copy link
Author

msccip commented Apr 19, 2023

@phax
Copy link
Owner

phax commented Apr 19, 2023

Ah okay. Sorry. So it is about

  • BT-122 that uses Use for “ADDITIONAL SUPPORTING DOCUMENTS” with TypeCode “916”

I'll check in more detail

@phax
Copy link
Owner

phax commented Apr 20, 2023

So trying to collect the TypeCode usage (according to EN16931-3, version 2017):

  • BT-17: TypeCode should be 50
  • BT-18: TypeCode should be 130
  • BT-95: TypeCode should be VAT
  • BT-102: TypeCode should be VAT
  • BT-118: TypeCode should be VAT
  • BT-122: TypeCode should be 916
  • BT-128: TypeCode should be 130
  • BT-151: TypeCode should be VAT

phax added a commit that referenced this issue Apr 20, 2023
@phax
Copy link
Owner

phax commented Apr 20, 2023

Thanks for pointing that out - misunderstanding on my side :) Release 2.0.3 building atm

@phax phax closed this as completed Apr 20, 2023
@msccip
Copy link
Author

msccip commented Apr 20, 2023

Thanks a lot !
too bad it doesn't run under java 8 anymore
btw: TypeCode 916 is still missing ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants