Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Embed PDF into XML for invoice, UBL 2.1
Message
De
06/10/2021 10:49:58
 
 
À
06/10/2021 06:27:34
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
01682446
Message ID:
01682452
Vues:
94
J'aime (1)
I need to create invoice as XML file in UBL 2.1 format. Mandatory field is attached PDF invoice. Can you help me how to embed PDF invoice in XML (VFP 6)?
Thanks in advance.

,,,
lcImePdfSaExt="TrtMrtFakktura.PDF"
lcBase64bin = DajBase64bin(lcImePdfSaExt)

...
I created one Ubl Template file and that is my basis for the upgrade.
See the attached picture
<cac:AdditionalDocumentReference>
<cbc:ID><<lcImePdfbezExt>></cbc:ID>
<cac:Attachment>
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="<<lcImePdfSaExt>>"><<lcBase64bin>> </cbc:EmbeddedDocumentBinaryObject>
</cac:Attachment>
</cac:AdditionalDocumentReference>
...
FUNCTION DajBase64bin
LPARAMETERS tcImePdfSaExt
LOCAL sb2binbase64, lcstr
lcstr=FILETOSTR(tcImePdfSaExt)
sb2binbase64=STRCONV(lcstr,13) && konvertuje u base64 binary
_cliptext=sb2binbase64 && base64 bin. stavio u _cliptext

RETURN _cliptext
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform