Marko Luther [Sun, 10 Mar 2024 15:47:25 +0000 (16:47 +0100)]
Add xml info to pdf metadata2 (#15)
* Bump to 2.3.0
* PR #7 Include XML information in PDF metadata (cmcproject)
* update mustang validator
* fixes fx:DocumentFileName / fx:DocumentType order
* remove `schemas/ZUGFeRD2p2_extension_schema.xmp` (replaced by `xmp_schema.py` generator)
* removes date and seller from pdf metadata subject to simplify the code and remove hard coded English language
* removes doc type date and seller from pdf metadata subject (incl. the restriction to documents of type 380) to simplify the code and remove hard coded English language
* remove unused (now) unused constant INVOICE_TYPE_CODE and avoid the use of use bare `except`
* removes failing "Invalid doc type! XML value for TypeCode shall be 380 for an invoice." test
* allows to supply explicit profile level and extends profile auto detection to cover XRECHNUNG
* minor code style improvements like lazy % formatting in logging functions (logging-fstring-interpolation)
* fixes style (black)
* tests of auto detecting a XRechnung v2 and v3 profiles
* blacking again
* tests for en16931 auto profile recognition and auto profile recognition failure
* black again
* typo
* allow users to set custom pdf metadata and the PDF language identifier used by PDF readers for blind people
* black
* spelling
* Update drafthorse/pdf.py
* Run black
---------
Co-authored-by: Raphael Michel <michel@rami.io> Co-authored-by: Raphael Michel <mail@raphaelmichel.de>
Marko Luther [Sun, 10 Mar 2024 15:28:48 +0000 (16:28 +0100)]
fixes Issue #20, Issue #22, Issue #26 and Issue #29. It replaces PR #21 and PR #23 and contains alignments to the v2.2 specification (#27)
* - corrects the NS_QDT name according to the zugferd22 specification
- extends elements.py:DateTimeElement to allow the adjustment of the inner DateTimes namespace
- updates references.py:ReferencedDocument to use NS_QDT for its DateTimeElement
- corrects profiles in reference.py for various attributes according to the zugferd22 schemata
- adds test zugferd_2p2_EN16931_ElektronischeAdresse2.xml as a variation of the official zugferd22 sample EN16931_ElektronischeAdresse.xml adding a FormattedIssueDateTime to the BuyerOrderReferencedDocument
- moves SellerOrderReferencedDocument from trade.py to references.py
- fixes DateTimeField namespace of AdvancePayment.received_date
* This commit also adds the class ProductInstance (IndividualTradeProductInstance) to product.py and adds the missing fields "id" (IDField) and "instance" (ProductInstance) to product.py:TradeProduct.
This commit also adds class PayerTradeParty (PayerTradeParty) to party.py and adds the missing field "payer" (PayerTradeParty) to trade.py:TradeSettlement.
This commit also removes the unused (and not needed) party.py:LineApplicableTradeTax class.
This commit also corrects profile and required tags according to the v2.2 specification as follows:
Marko Luther [Fri, 19 Jan 2024 17:12:14 +0000 (18:12 +0100)]
Corrects the attribute order of ApplicableTradeTax (#19)
* aligns the attribute order of the ApplicableTradeTax class to the TradeTaxType in FACTUR-X_EXTENDED_urn_un_unece_uncefact_data_standard_ReusableAggregateBusinessInformationEntity_100.xsd to fix https://github.com/pretix/python-drafthorse/issues/18