pyslog 0.1.0.dev8__tar.gz → 0.1.0.dev10__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyslog
3
- Version: 0.1.0.dev8
3
+ Version: 0.1.0.dev10
4
4
  Summary: Python e-SLOG library. Simplifies the generation of Slovenian e-SLOG electronic documents.
5
5
  Keywords: eslog,eracun,e-racun,e-invoice
6
6
  Author: Gregor Gabrovšek
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyslog"
3
- version = "0.1.0.dev8"
3
+ version = "0.1.0.dev10"
4
4
  description = "Python e-SLOG library. Simplifies the generation of Slovenian e-SLOG electronic documents."
5
5
  license = "MIT"
6
6
  authors = [
@@ -363,7 +363,10 @@ def generate_eslog_invoice(
363
363
  ESLOG_S_DTM(
364
364
  C_C507=ESLOG_C_C507(D_2005="13", D_2380=invoice.payment_due_date)
365
365
  )
366
- ]
366
+ ],
367
+ S_PAI=ESLOG_S_PAI(
368
+ C_C534=ESLOG_C_C534(D_4461=invoice.payment_means_code.value)
369
+ ) if invoice.payment_means_code else None
367
370
  )
368
371
  )
369
372
 
@@ -122,9 +122,16 @@ class ESLOG_G_SG7(BaseXmlModel, tag="G_SG7"):
122
122
  class ESLOG_S_PAT(BaseXmlModel, tag="S_PAT"):
123
123
  D_4279: str = element(name="D_4279")
124
124
 
125
+ class ESLOG_C_C534(BaseXmlModel, tag="C_C534"):
126
+ D_4461: str = element(name="D_4461")
127
+
128
+ class ESLOG_S_PAI(BaseXmlModel, tag="S_PAI"):
129
+ C_C534: ESLOG_C_C534 = element(tag="C_C534")
130
+
125
131
  class ESLOG_G_SG8(BaseXmlModel, tag="G_SG8"):
126
132
  S_PAT: ESLOG_S_PAT = element(tag="S_PAT")
127
133
  S_DTM: list[ESLOG_S_DTM] = element(tag="S_DTM")
134
+ S_PAI: ESLOG_S_PAI | None = element(tag="S_PAI", default=None)
128
135
 
129
136
  class ESLOG_C_C212(BaseXmlModel, tag="C_C212"):
130
137
  D_7140: str = element(name="D_7140")
@@ -2,10 +2,12 @@ from .vat_point_date_code import VATPointDateCode
2
2
  from .business_process_type import BusinessProcessType
3
3
  from .item_identification_scheme import ItemIdentificationScheme
4
4
  from .vat_category_code import VATCategoryCode
5
+ from .payment_means_code import PaymentMeansCode
5
6
 
6
7
  __all__ = [
7
8
  "VATPointDateCode",
8
9
  "BusinessProcessType",
9
10
  "ItemIdentificationScheme",
10
11
  "VATCategoryCode",
12
+ "PaymentMeansCode",
11
13
  ]
@@ -0,0 +1,5 @@
1
+ from enum import Enum
2
+
3
+ class PaymentMeansCode(str, Enum):
4
+ CREDIT_TRANSFER = "30"
5
+ SEPA_CREDIT_TRANSFER = "58"
@@ -4,6 +4,7 @@ from .enums import (
4
4
  BusinessProcessType,
5
5
  ItemIdentificationScheme,
6
6
  VATCategoryCode,
7
+ PaymentMeansCode,
7
8
  )
8
9
 
9
10
 
@@ -62,6 +63,7 @@ class Invoice(BaseModel):
62
63
  invoice_issue_date: str
63
64
  value_added_tax_point_date: str | None = Field(default=None, description="Value added tax point date (BT-7). The date when the VAT becomes accountable for the Seller and for the Buyer in so far as that date can be determined and differs from the date of issue of the invoice, according to the VAT directive.")
64
65
  payment_due_date: str | None = Field(default=None, description="Payment due date (BT-9). The date on which the payment is due.")
66
+ payment_means_code: PaymentMeansCode = Field(default=PaymentMeansCode.SEPA_CREDIT_TRANSFER, description="Payment means type code (BT-81). The means, expressed as code, for how a payment is expected to be or has been settled.")
65
67
  value_added_tax_point_date_code: VATPointDateCode | None = Field(default=None, description="Value added tax point date code (BT-8), DESC:The code of the date when the VAT becomes accountable for the Seller and for the Buyer.")
66
68
  actual_delivery_date: str | None = Field(default=None, description="Actual delivery date (BT-72). The date on which the delivery is made.")
67
69
  invoicing_period_start_date: str | None = Field(default=None, description="Invoicing period start date (BT-73). The date on which the invoicing period starts.")
File without changes