horstoeko / zugferd

ZUGFeRD/XRechnung/Factur-X Library
MIT License
216 stars 35 forks source link

How to use addDocumentPositionAdditionalReferencedDocument? #99

Closed chris-sx closed 5 months ago

chris-sx commented 5 months ago

I found addDocumentPositionAdditionalReferencedDocument which might be very usefull for details on a position but I amnot able to use it, it alway is ignored:

$attachdoc1 = "./tmp/Test-PDF.pdf"; $issuerassignedid1= "Dok zu Pos $linexNumber"; $document->addDocumentPositionAdditionalReferencedDocument($issuerassignedid1, "916", $uriid, $lineNumber, "file", 'CAW', $issueddate = null, $attachdoc1);

What am I missing?

Thanks Chris

horstoeko commented 5 months ago

Hi @chris-sx,

can you please tell me which profile you are using? Background to my question: Additional documents at item level are only supported in the EXTENDED profile... See the documentation:

image

Kind regards

chris-sx commented 5 months ago

Ok, thanks,

I tried: PROFILE_XRECHNUNG_3 and PROFILE_EN16931. With PROFILE_EXTENDED it works but I get some errors when validating

Zwischenablage01 Zwischenablage02

chris-sx commented 5 months ago

Ok, that doesn't make sense to use. Extended gives to much other issues. I stay with PROFILE_XRECHNUNG_3, hope that is valid for a few years.

Many many thanks for your great and always quick support.