]> git.ipfire.org Git - thirdparty/python-drafthorse.git/commit
fixes Issue #20, Issue #22, Issue #26 and Issue #29. It replaces PR #21 and PR #23...
authorMarko Luther <marko.luther@gmx.net>
Sun, 10 Mar 2024 15:28:48 +0000 (16:28 +0100)
committerGitHub <noreply@github.com>
Sun, 10 Mar 2024 15:28:48 +0000 (16:28 +0100)
commitcdfd45a07ac252452aa128536506b412bb593e53
tree37817f27047865fadca9f6237d02e59bcbf26797
parent4019506f3e086fc078787c45e1ec2fb7c208a32b
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:

- references.py:LineAdditionalReferencedDocument
  .name profile COMFORT => BASIC (was COMFORT)
- tradelines.py:LineSettlement
  .trade_tax profile COMFORT => BASIC
  .period profile COMFORT => BASIC
  .allowance_charge profile COMFORT => BASIC
  .monetary_summation profile COMFORT => BASIC
  .additional_referenced_document profile EXTENDED => COMFORT
  .accounting_account profile EXTENDED => COMFORT
- product.py:ProductCharacteristic
  .type_code  required => optional
  .description profile EXTENDED => COMFORT
  .value profile EXTENDED => COMFORT
- product.py:ProductClassification
  .class_code required => optional; profile EXTENDED => COMFORT
  .value required => optional
- product.py:TradeProduct
  .name profile COMFORT => BASIC
  .characteristics EXTENDED => COMFORT
  .classifications EXTENDED => COMFORT
  .origins EXTENDED => COMFORT
- trade.py:TradeSettlement
  .tax_currency_code profile COMFORT => BASIC
  .invoicer profile COMFORT => EXTENDED
  .invoicee profile COMFORT => EXTENDED
  .payee profile COMFORT => BASIC
  .allowance_charge profile COMFORT => BASIC
  .service_charge profile COMFORT => EXTENDED
  .terms profile COMFORT => BASIC
  .accounting_account EXTENDED => BASIC
- accounting.py:ApplicableTradeTax
  .exemption_reason COMFORT => BASIC
  .category_code COMFORT => BASIC
  .exemption_reason_code EXTENDED => BASIC

* fixes profile annotations in TradeAllowanceCharge

* SpecifiedTradeAllowanceCharge:ReasonCode in COMFORT
14 files changed:
README.rst
drafthorse/models/__init__.py
drafthorse/models/accounting.py
drafthorse/models/elements.py
drafthorse/models/fields.py
drafthorse/models/party.py
drafthorse/models/product.py
drafthorse/models/references.py
drafthorse/models/trade.py
drafthorse/models/tradelines.py
setup.py
tests/samples/zugferd_2p1_EN16931_Einfach-LineObjectIdentifier.xml [new file with mode: 0644]
tests/samples/zugferd_2p2_EN16931_ElektronischeAdresse2.xml [new file with mode: 0644]
tests/test_mininal.py