pyslog 0.1.0.dev11__tar.gz → 0.1.0.dev15__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/PKG-INFO +1 -1
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/pyproject.toml +1 -1
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/generator.py +72 -17
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/invoice.py +3 -3
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/README.md +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/__init__.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/__init__.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/__init__.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/_xml.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/__init__.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/allowance_type.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/business_process_type.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/item_identification_scheme.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/payment_means_code.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/vat_category_code.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/vat_point_date_code.py +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/schemas/eSLOG20_INVOIC_v200.xsd +0 -0
- {pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/validator.py +0 -0
|
@@ -11,10 +11,10 @@ def generate_eslog_invoice(
|
|
|
11
11
|
eslog_buyer = ESLOG_G_SG2(
|
|
12
12
|
S_NAD=ESLOG_S_NAD(
|
|
13
13
|
D_3035="BY",
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
C_C082=ESLOG_C_C082(
|
|
15
|
+
D_3039=invoice.buyer.identifier,
|
|
16
|
+
D_1131=invoice.buyer.identifier_identification_scheme_identifier
|
|
17
|
+
) if invoice.buyer.identifier else None,
|
|
18
18
|
C_C080=ESLOG_C_C080(
|
|
19
19
|
D_3036=invoice.buyer.name,
|
|
20
20
|
D_3036_2=invoice.buyer.trading_name
|
|
@@ -25,9 +25,56 @@ def generate_eslog_invoice(
|
|
|
25
25
|
D_3042_3=invoice.buyer.address_line_3
|
|
26
26
|
),
|
|
27
27
|
D_3207=invoice.buyer.country_code,
|
|
28
|
-
)
|
|
28
|
+
),
|
|
29
|
+
G_SG3=[],
|
|
30
|
+
G_SG5=[]
|
|
29
31
|
)
|
|
30
32
|
|
|
33
|
+
if invoice.buyer.vat_registration_number:
|
|
34
|
+
eslog_buyer.G_SG3.append(
|
|
35
|
+
ESLOG_G_SG3(
|
|
36
|
+
S_RFF=ESLOG_S_RFF(
|
|
37
|
+
C_C506=ESLOG_C_C506(
|
|
38
|
+
D_1153="VA",
|
|
39
|
+
D_1154=invoice.buyer.vat_registration_number
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
)
|
|
43
|
+
)
|
|
44
|
+
eslog_buyer.G_SG3.append(
|
|
45
|
+
ESLOG_G_SG3(
|
|
46
|
+
S_RFF=ESLOG_S_RFF(
|
|
47
|
+
C_C506=ESLOG_C_C506(
|
|
48
|
+
D_1153="AHP",
|
|
49
|
+
D_1154=invoice.buyer.vat_registration_number
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
)
|
|
53
|
+
)
|
|
54
|
+
if invoice.buyer.maticna:
|
|
55
|
+
eslog_buyer.G_SG3.append(
|
|
56
|
+
ESLOG_G_SG3(
|
|
57
|
+
S_RFF=ESLOG_S_RFF(
|
|
58
|
+
C_C506=ESLOG_C_C506(
|
|
59
|
+
D_1153="0199",
|
|
60
|
+
D_1154=invoice.buyer.maticna
|
|
61
|
+
)
|
|
62
|
+
)
|
|
63
|
+
)
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
if invoice.buyer.contact_person_name:
|
|
67
|
+
eslog_buyer.G_SG5 = [
|
|
68
|
+
ESLOG_G_SG5(
|
|
69
|
+
S_CTA=ESLOG_S_CTA(
|
|
70
|
+
D_3139="BU",
|
|
71
|
+
C_C056=ESLOG_C_C056(
|
|
72
|
+
D_3412=invoice.buyer.contact_person_name
|
|
73
|
+
)
|
|
74
|
+
)
|
|
75
|
+
)
|
|
76
|
+
]
|
|
77
|
+
|
|
31
78
|
if invoice.buyer.address_line_2 is not None:
|
|
32
79
|
eslog_buyer.S_NAD.C_C059.D_3042_2 = invoice.buyer.address_line_2
|
|
33
80
|
if invoice.buyer.address_line_3 is not None:
|
|
@@ -44,10 +91,10 @@ def generate_eslog_invoice(
|
|
|
44
91
|
eslog_seller = ESLOG_G_SG2(
|
|
45
92
|
S_NAD=ESLOG_S_NAD(
|
|
46
93
|
D_3035="SE",
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
94
|
+
C_C082=ESLOG_C_C082(
|
|
95
|
+
D_3039=invoice.seller.identifier,
|
|
96
|
+
D_1131=invoice.seller.identifier_identification_scheme_identifier
|
|
97
|
+
) if invoice.seller.identifier else None,
|
|
51
98
|
C_C080=ESLOG_C_C080(
|
|
52
99
|
D_3036=invoice.seller.name,
|
|
53
100
|
D_3036_2=invoice.seller.trading_name
|
|
@@ -68,7 +115,12 @@ def generate_eslog_invoice(
|
|
|
68
115
|
D_3433=invoice.seller.bic
|
|
69
116
|
)
|
|
70
117
|
),
|
|
71
|
-
G_SG3=[
|
|
118
|
+
G_SG3=[],
|
|
119
|
+
G_SG5=[]
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
if invoice.seller.vat_registration_number:
|
|
123
|
+
eslog_seller.G_SG3.append(
|
|
72
124
|
ESLOG_G_SG3(
|
|
73
125
|
S_RFF=ESLOG_S_RFF(
|
|
74
126
|
C_C506=ESLOG_C_C506(
|
|
@@ -76,7 +128,9 @@ def generate_eslog_invoice(
|
|
|
76
128
|
D_1154=invoice.seller.vat_registration_number
|
|
77
129
|
)
|
|
78
130
|
)
|
|
79
|
-
)
|
|
131
|
+
)
|
|
132
|
+
)
|
|
133
|
+
eslog_seller.G_SG3.append(
|
|
80
134
|
ESLOG_G_SG3(
|
|
81
135
|
S_RFF=ESLOG_S_RFF(
|
|
82
136
|
C_C506=ESLOG_C_C506(
|
|
@@ -84,7 +138,10 @@ def generate_eslog_invoice(
|
|
|
84
138
|
D_1154=invoice.seller.vat_registration_number
|
|
85
139
|
)
|
|
86
140
|
)
|
|
87
|
-
)
|
|
141
|
+
)
|
|
142
|
+
)
|
|
143
|
+
if invoice.seller.maticna:
|
|
144
|
+
eslog_seller.G_SG3.append(
|
|
88
145
|
ESLOG_G_SG3(
|
|
89
146
|
S_RFF=ESLOG_S_RFF(
|
|
90
147
|
C_C506=ESLOG_C_C506(
|
|
@@ -92,10 +149,8 @@ def generate_eslog_invoice(
|
|
|
92
149
|
D_1154=invoice.seller.maticna
|
|
93
150
|
)
|
|
94
151
|
)
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
G_SG5=[]
|
|
98
|
-
)
|
|
152
|
+
)
|
|
153
|
+
)
|
|
99
154
|
|
|
100
155
|
if invoice.seller.contact_person_name:
|
|
101
156
|
eslog_seller.G_SG5 = [
|
|
@@ -164,8 +219,8 @@ def generate_eslog_invoice(
|
|
|
164
219
|
FTX=[doc_field],
|
|
165
220
|
SG1=[],
|
|
166
221
|
SG2=[
|
|
222
|
+
eslog_seller,
|
|
167
223
|
eslog_buyer,
|
|
168
|
-
eslog_seller
|
|
169
224
|
],
|
|
170
225
|
SG7=[
|
|
171
226
|
ESLOG_G_SG7(
|
|
@@ -48,9 +48,9 @@ class BusinessEntity(BaseModel):
|
|
|
48
48
|
|
|
49
49
|
|
|
50
50
|
class Item(BaseModel):
|
|
51
|
-
standard_identifier: str = Field(description="Item standard identifier(BT-157) An item identifier based on a registered scheme.")
|
|
52
|
-
standard_identifier_identification_scheme_identifier: ItemIdentificationScheme = Field(description="Item standard identifier identification scheme identifier (BT-157-1). The identification scheme identifier of the Item standard identifier. Use code list ISO/IEC 6523 — Identifier scheme code")
|
|
53
|
-
sellers_item_identifier: str = Field(description="Item sellers item identifier (BT-155). The identifier assigned by the Seller for the item.")
|
|
51
|
+
standard_identifier: str | None = Field(default=None, description="Item standard identifier(BT-157) An item identifier based on a registered scheme.")
|
|
52
|
+
standard_identifier_identification_scheme_identifier: ItemIdentificationScheme | None = Field(default=None, description="Item standard identifier identification scheme identifier (BT-157-1). The identification scheme identifier of the Item standard identifier. Use code list ISO/IEC 6523 — Identifier scheme code")
|
|
53
|
+
sellers_item_identifier: str | None = Field(default=None, description="Item sellers item identifier (BT-155). The identifier assigned by the Seller for the item.")
|
|
54
54
|
name: str = Field(description="Item name (BT-153). The name of the item.")
|
|
55
55
|
quantity: str = Field(description="Invoiced quantity (BT-129). The quantity of items (goods or services) that is charged in the Invoice line.")
|
|
56
56
|
quantity_unit_of_measure: str = Field(description="Invoiced quantity unit of measure (BT-130). The unit of measure that applies to the invoiced quantity. Use code list UN/ECE Recommendation N°20 and UN/ECE Recommendation N°21 — Unit codes") ## TODO Validation, mapping
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/business_process_type.py
RENAMED
|
File without changes
|
|
File without changes
|
{pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/payment_means_code.py
RENAMED
|
File without changes
|
{pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/vat_category_code.py
RENAMED
|
File without changes
|
{pyslog-0.1.0.dev11 → pyslog-0.1.0.dev15}/src/pyslog/eslog2/models/enums/vat_point_date_code.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|