forked from OMGStandards/DigitalReceipt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fiscal.yaml
186 lines (183 loc) · 6.7 KB
/
fiscal.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
FiscalData:
description: |
Fiscal specific data
type: object
properties:
fiscalBusinessUnitID:
description: |
Business Unit ID in a country's specific format or an ID issued
by a tax authority.
type: string
fiscalWorkstationID:
description: |
Workstation ID in a country's specific format or an ID issued
by a tax authority.
type: string
fiscalTransactionID:
description: |
A unique ID for the fiscal transaction.
This is typically either provided by a fiscal device or generated
according to a country's specific fiscal rules.
fiscalBusinessDayID:
description: |
A unique ID for a fiscal business date,
usually it's a fiscal end of day (Z-report) number.
type: string
fiscalDocumentNumber:
description: |
An alphanumeric value that is assigned to a fiscal document during the
fiscalization process and is printed on the receipt.
type: string
fiscalBarcode:
description: |
Barcode defined by a tax authority, usually a QR code which is used for fiscal receipt verificataion.
$ref: "common.yaml#/Barcode"
manualDocumentNumber:
description: |
The receipt number which was entered manually in a sales book
while the cash register was not in operation.
type: string
notFiscalizedByDeviceFlag:
description: |
A flag indicating that the transaction was not fisclalized successfuly
by a fiscal device. In some countries it's possible to issue
fiscal receipts which are not fiscalized by the device.
These receipts usually require specific post-processing.
type: boolean
default: false
fiscalTransactionTypeCode:
description: |
A code that identifies grouping of transactions for fiscal purposes.
Typically a group of fiscal transactions has its own sequence number.
Such sequence number and/or fiscal type code might be on a
document associated with the transaction.
type: string
fiscalTransactionSequenceNumber:
description: |
A sequence number associated with fiscal transactions.
type: integer
protectionCode:
description: |
A protection code is a unique identifier calculated by a cash register application
using transaction data and a digital certificate,
which can be generated again only by the invoice issuer.
It is also used for checking authenticity of the fiscal receipt via the web service.
type: string
fiscalBeginDateTime:
description: |
A date and time when the fiscal transaction begun.
type: string
format: date-time
fiscalEndDateTime:
description: |
A date and time when the fiscal transaction ended.
type: string
format: date-time
authorizationCode:
description: |
Authorization code represents the acknowledgement generated by a tax authority or a certified fiscal authorization service and
it indicates whether the fiscal system has approved of a transaction.
type: string
loteryCode:
description: |
Used for a tax receipt lottery organized in some countries by the tax authority.
type: string
fiscalSignature:
$ref: "transaction.yaml#/DigitalSignature"
extensibilityData:
description: |
Data that provides extensibility to the defined data structure.
This property is an array of DataSets where each DataSet is a
named collection of name-value pairs.
$ref: "common.yaml#/ExtensibilityData"
additionalProperties: false
FiscalNameValuePair:
description: |
Fiscal name-value pair property.
type: object
properties:
name:
description: |
Name of the fiscal property.
$ref: "#/FiscalPropertyNameEnum"
customName: |
A custom name of identification that is not covered by FiscalPropertyNameEnum.
This property should only be used if the name is equal to the Custom.
localName:
description: |
Local name of fiscal property.
This name is defined and is understood in the language of a particular country
where the transaction took place. It could be
defined in addition to a generic name. For example, a generic name can be
Secret and a local name can be PUK (PIN Unlock Key) for German TSE.
type: string
value:
description: |
Value of the property.
type: string
typeOfData:
description: |
Type of data inside the value of the fiscal property.
$ref: "common.yaml#/NameValueTypeOfDataEnum"
base64EncodedFlag:
description: |
Flag that indicates if the data is a base64 encoded string
type: boolean
additionalProperties: false
required:
- name
FiscalPropertyNameEnum:
description: |
Names of fiscal name-value properties.
These name imply what kind of data is exchanged with fiscal
device.
ReceiptHeader - Receipt header data. It might contain
the information about the store, such as telephone number,
address and name of the store as plain text
ReceiptFooter - Receipt footer data. It might contain
promotional messages printed usually on bottom of receipt
FiscalReceiptData - Receipt data that contains information to
be inserted in the receipt due to fiscal legislations such as
the fiscal logotype, date, time and serial number
TaxData - Tax related data
DepartmentTaxData - Department tax related data
DeviceDateTime - Device date and time
FiscalCounter - Fiscal device counter
SyncRoundingStatus - roundig synchronization status
RoundingAdjustment - amount adjusted by fiscal device
Timeout - Fiscal device timeout
ClientID - Unique ID of a client connected to fiscal device
UserID - ID of the user required for authentication on fiscal device
Secret - Secret data required for controlled activity on fiscal Device
It could be password, PIN, etc.
DeviceInfo - Fiscal device information
HashCode - Fiscal hash code
FiscalMemorySerialNumber - Fiscal device memory serial number
ExportData - Data exported from fiscal device
type: string
enum:
- ReceiptHeader
- ReceiptFooter
- FiscalReceiptData
- TaxData
- DepartmentTaxData
- DeviceDateTime
- FiscalCounter
- SyncRoundingStatus
- RoundingAdjustment
- Timeout
- ClientID
- UserID
- Secret
- DeviceInfo
- HashCode
- FiscalMemorySerialNumber
- ExportData
- Unknown
- Custom
FiscalNameValuePairCollection:
description: |
Collection of fiscal properties.
type: array
items:
$ref: "#/FiscalNameValuePair"