File tree Expand file tree Collapse file tree 1 file changed +35
-2
lines changed
Expand file tree Collapse file tree 1 file changed +35
-2
lines changed Original file line number Diff line number Diff line change 11"""Models for individual invoice rows/positions."""
22
3- from typing import Sequence
3+ from typing import Literal , Sequence
44
55from pydantic import BaseModel
66
7+ # KSeF tax rate constants for the P_12 field (TStawkaPodatku in FA(3) schema)
8+ TAX_23 = 23
9+ TAX_22 = 22
10+ TAX_8 = 8
11+ TAX_7 = 7
12+ TAX_5 = 5
13+ TAX_4 = 4
14+ TAX_3 = 3
15+ TAX_0_KR = "0 KR" # 0% domestic
16+ TAX_0_WDT = "0 WDT" # 0% intra-Community supply
17+ TAX_0_EX = "0 EX" # 0% export of goods
18+ TAX_ZW = "zw" # exempt from tax
19+ TAX_OO = "oo" # reverse charge
20+ TAX_NP_I = "np I" # not subject to taxation — supply outside country territory
21+ TAX_NP_II = "np II" # not subject to taxation — services per art. 100(1)(4)
22+
23+ TaxRate = Literal [
24+ 23 ,
25+ 22 ,
26+ 8 ,
27+ 7 ,
28+ 5 ,
29+ 4 ,
30+ 3 ,
31+ "0 KR" ,
32+ "0 WDT" ,
33+ "0 EX" ,
34+ "zw" ,
35+ "oo" ,
36+ "np I" ,
37+ "np II" ,
38+ ]
39+
740
841class InvoiceRow (BaseModel ):
942 """Single individual invoice position."""
1043
1144 name : str # P_7, nazwa (rodzaj) towaru lub usługi
12- tax : int # P_12, stawka podatku
45+ tax : TaxRate # P_12, tax rate
1346
1447
1548class InvoiceRows (BaseModel ):
You can’t perform that action at this time.
0 commit comments