add Factur-X-EN16931

This commit is contained in:
Frederik Jaeckel 2025-01-22 17:26:58 +01:00
parent 4e03a1022e
commit 037ff9636a
4 changed files with 455 additions and 8 deletions

View file

@ -7,6 +7,120 @@
from decimal import Decimal
from datetime import date
parsed_data_facturx_en16931 = {
'buyer_party': {
'city': 'Potsdam',
'name': 'Our Company',
'postal_code': '23456',
'street': 'Address Line 1\nAddress Line 2'},
'invoice_date': date(2024, 6, 17),
'invoice_number': 'RE2024.01234',
'lines_data': [{
'line_no': '1',
'name': 'Name of Product 1',
'description': 'Description of Product 1',
'unit_net_price': {'amount': Decimal('1350.00')},
'quantity': {
'billed': Decimal('1.0'), 'unit_code': 'KGM'},
'taxes': [{
'type': 'VAT',
'category_code': 'S',
'percent': Decimal('19.00')}],
'total': {'amount': Decimal('1350.00')},
}, {
'line_no': '2',
'line_note': 'Description of Line 2',
'glob_id': '3',
'seller_id': '4',
'buyer_id': '5',
'name': 'Name of Product 2',
'description': 'Description of Product 2',
'trade_country': 'DE',
'attributes': [{
'description': 'Kilogram',
'uom': 'kg'}],
'classification': [{'code': '3c'}],
'unit_net_price': {
'amount': Decimal('800.00'),
'basequantity': Decimal('1.0')},
'unit_gross_price': {
'amount': Decimal('950.00'),
'basequantity': Decimal('1.0')},
'quantity': {
'billed': Decimal('1.5'),
'unit_code': 'KGM'},
'taxes': [{
'type': 'VAT',
'category_code': 'S',
'percent': Decimal('19.00')}],
'total': {
'amount': Decimal('1200.00')},
}, {
'line_no': '3',
'name': 'Name of Product 3',
'description': 'Description of Product 3',
'unit_net_price': {'amount': Decimal('150.00')},
'quantity': {
'billed': Decimal('2.0'),
'unit_code': 'MTR'},
'taxes': [{
'type': 'VAT',
'category_code': 'S',
'percent': Decimal('7.00')}],
'total': {'amount': Decimal('300.00')}}],
'note_list': [{
'Content': 'Description of invoice',
'ContentCode': None,
'SubjectCode': None,
}, {
'Content': 'Some notes to the customer.',
'ContentCode': None,
'SubjectCode': None,
}, {
'Content': 'Goes to field comment.',
'ContentCode': None,
'SubjectCode': '42'}],
'payment': {
'bank': [{
'info': 'Wire transfer',
'type': '30',
'debitor_iban': 'DE02300209000106531065',
'creditor_iban': 'DE02300209000106531065',
'creditor_name': 'mbs',
'card_id': 'DE02300209000106531065',
'card_holder_name': 'Card Holder',
'institution': 'WELADED1PMB'}],
'currency': 'EUR',
'reference': 'RE2024.01234',
'taxes': [{
'amount': Decimal('484.5'),
'type': 'VAT',
'base': Decimal('2550.0'),
'category_code': 'S',
'percent': Decimal('19.00'),
}, {
'amount': Decimal('21.0'),
'type': 'VAT',
'base': Decimal('300.0'),
'category_code': 'S',
'percent': Decimal('7.00')}],
'terms': [{
'description': 'Payment description',
'duedate': date(2024, 7, 1),
'mandat_id': 'mandat id'}]},
'seller_party': {
'city': 'Berlin',
'name': 'Name of the Supplier',
'postal_code': '12345',
'street': 'Street of Supplier No 1'},
'total': {
'amount': Decimal('1350.00'),
'duepayable': Decimal('3355.50'),
'grand': Decimal('3355.50'),
'taxbase': Decimal('2850.00'),
'taxtotal': Decimal('505.5')}}
parsed_data_facturx_basic = {
'buyer_party': {
'city': 'Potsdam',