-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathintf.ZUGFeRDTaxTypes.pas
441 lines (430 loc) · 11 KB
/
intf.ZUGFeRDTaxTypes.pas
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
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
{* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.}
unit intf.ZUGFeRDTaxTypes;
interface
uses
System.SysUtils,System.TypInfo
;
type
/// <summary>
/// Please note that all profiles support VAT.
///
/// Only EXTENDED profile supports tax types other than VAT.
/// http://www.unece.org/trade/untdid/d00a/tred/tred5153.htm
/// </summary>
TZUGFeRDTaxTypes = (
/// <summary>
/// Petroleum tax
///
///A tax levied on the volume of petroleum being
/// transacted.
/// </summary>
AAA,
/// <summary>
/// Provisional countervailing duty cash
///
///Countervailing duty paid in cash prior to a formal
///finding of subsidization by Customs.
/// </summary>
AAB,
/// <summary>
/// Provisional countervailing duty bond
///
///Countervailing duty paid by posting a bond during an
///investigation period prior to a formal decision on
///subsidization by Customs.
/// </summary>
AAC,
/// <summary>
/// Tobacco tax
///
/// A tax levied on tobacco products.
/// </summary>
AAD,
/// <summary>
/// Energy fee
///
/// General fee or tax for the use of energy.
/// </summary>
AAE,
/// <summary>
/// Coffee tax
///
/// A tax levied specifically on coffee products.
/// </summary>
AAF,
/// <summary>
/// Harmonised sales tax, Canadian
///
/// A harmonized sales tax consisting of a goods and service
/// tax, a Canadian provincial sales tax and, as applicable,
/// a Quebec sales tax which is recoverable.
/// </summary>
AAG,
/// <summary>
/// Quebec sales tax
///
/// A sales tax charged within the Canadian province of
/// Quebec which is recoverable.
/// </summary>
AAH,
/// <summary>
/// Canadian provincial sales tax
///
/// A sales tax charged within Canadian provinces which is
/// non-recoverable.
/// </summary>
AAI,
/// <summary>
/// Tax on replacement part
///
/// A tax levied on a replacement part, where the original
/// part is returned.
/// </summary>
AAJ,
/// <summary>
/// Mineral oil tax
///
/// Tax that is levied specifically on products containing
/// mineral oil.
/// </summary>
AAK,
/// <summary>
/// Special tax
///
/// To indicate a special type of tax.
/// </summary>
AAL,
/// <summary>
/// Insurance tax
///
/// A tax levied specifically on insurances.
/// </summary>
AAM,
/// <summary>
/// Anti-dumping duty
///
///Duty applied to goods ruled to have been dumped in an
///import market at a price lower than that in the
///exporter's domestic market.
/// </summary>
ADD,
/// <summary>
///Stamp duty (Imposta di Bollo)
///
///Tax required in Italy, which may be fixed or graduated in
///various circumstances (e.g. VAT exempt documents or bank
///receipts).
/// </summary>
BOL,
/// <summary>
///Agricultural levy
///
///Levy imposed on agricultural products where there is a
///difference between the selling price between trading
///countries.
/// </summary>
CAP,
/// <summary>
///Car tax
///
///A tax that is levied on the value of the automobile.
/// </summary>
CAR,
/// <summary>
///Paper consortium tax (Italy)
///
///Italian Paper consortium tax.
/// </summary>
COC,
/// <summary>
///Commodity specific tax
///
///Tax related to a specified commodity, e.g. illuminants,
///salts.
/// </summary>
CST,
/// <summary>
///Customs duty
///
///Duties laid down in the Customs tariff, to which goods
///are liable on entering or leaving the Customs territory
///(CCC).
/// </summary>
CUD,
/// <summary>
///Countervailing duty
///
///A duty on imported goods applied for compensate for
///subsidies granted to those goods in the exporting
///country.
/// </summary>
CVD,
/// <summary>
///Environmental tax
///
///Tax assessed for funding or assuring environmental
///protection or clean-up.
/// </summary>
ENV,
/// <summary>
///Excise duty
///
///Customs or fiscal authorities code to identify a specific
///or ad valorem levy on a specific commodity, applied
///either domestically or at time of importation.
/// </summary>
EXC,
/// <summary>
///Agricultural export rebate
///
///Monetary rebate given to the seller in certain
///circumstances when agricultural products are exported.
/// </summary>
EXP,
/// <summary>
///Federal excise tax
///
///Tax levied by the federal government on the manufacture
///of specific items.
/// </summary>
FET,
/// <summary>
///Free
///
///No tax levied.
/// </summary>
FRE,
/// <summary>
///General construction tax
///
///General tax for construction.
/// </summary>
GCN,
/// <summary>
///Goods and services tax
///
///Tax levied on the final consumption of goods and services
///throughout the production and distribution chain.
/// </summary>
GST,
/// <summary>
///Illuminants tax
///
///Tax of illuminants.
/// </summary>
ILL,
/// <summary>
///Import tax
///
///Tax assessed on imports.
/// </summary>
IMP,
/// <summary>
///Individual tax
///
///A tax levied based on an individual's ability to pay.
/// </summary>
IND,
/// <summary>
///Business license fee
///
///Government assessed charge for permit to do business.
/// </summary>
LAC,
/// <summary>
///Local construction tax
///
///Local tax for construction.
/// </summary>
LCN,
/// <summary>
///Light dues payable
///
///Fee levied on a vessel to pay for port navigation lights.
/// </summary>
LDP,
/// <summary>
///Local sales taxes
///
///Assessment charges on sale of goods or services by city,
///borough country or other taxing authorities below
///state/provincial level.
/// </summary>
LOC,
/// <summary>
///Lust tax
///
///Tax imposed for clean-up of leaky underground storage
///tanks.
/// </summary>
LST,
/// <summary>
///Monetary compensatory amount
///
///Levy on Common Agricultural Policy (EC) goods used to
///compensate for fluctuating currencies between member
///states.
/// </summary>
MCA,
/// <summary>
///Miscellaneous cash deposit
///
///Duty paid and held on deposit, by Customs, during an
///investigation period prior to a final decision being made
///on any aspect related to imported goods (except
///valuation) by Customs.
/// </summary>
MCD,
/// <summary>
///Other taxes
///
///Unspecified, miscellaneous tax charges.
/// </summary>
OTH,
///Provisional duty bond
///
///Anti-dumping duty paid by posting a bond during an
///investigation period prior to a formal decision on
///dumping by Customs.
PDB,
/// <summary>
///Provisional duty cash
///
///Anti-dumping duty paid in cash prior to a formal finding
///of dumping by Customs.
/// </summary>
PDC,
/// <summary>
///Preference duty
///
///Duties laid down in the Customs tariff, to which goods
///are liable on entering or leaving the Customs territory
///falling under a preferential regime such as Generalised
///System of Preferences (GSP).
/// </summary>
PRF,
/// <summary>
///Special construction tax
///
///Special tax for construction.
/// </summary>
SCN,
/// <summary>
///Shifted social securities
///
///Social securities share of the invoice amount to be paid
///directly to the social securities collector.
/// </summary>
SSS,
/// <summary>
///State/provincial sales tax
///
///All applicable sale taxes by authorities at the state or
///provincial level, below national level.
/// </summary>
SIT,
/// <summary>
///Suspended duty
///
///Duty suspended or deferred from payment.
/// </summary>
SUP,
/// <summary>
///Surtax
///
///A tax or duty applied on and in addition to existing
///duties and taxes.
/// </summary>
SUR,
/// <summary>
///Shifted wage tax
///
///Wage tax share of the invoice amount to be paid directly
///to the tax collector(s office).
/// </summary>
SWT,
/// <summary>
///Alcohol mark tax
///
///A tax levied based on the type of alcohol being
///obtained.
/// </summary>
TAC,
/// <summary>
///Total
///
///The summary amount of all taxes.
/// </summary>
TOT,
/// <summary>
///Turnover tax
///
///Tax levied on the total sales/turnover of a corporation.
/// </summary>
TOX,
/// <summary>
///Tonnage taxes
///
///Tax levied based on the vessel's net tonnage.
/// </summary>
TTA,
/// <summary>
///Valuation deposit
///
///Duty paid and held on deposit, by Customs, during an
///investigation period prior to a formal decision on
///valuation of the goods being made.
/// </summary>
VAD,
/// <summary>
/// Value added tax
///
/// A tax on domestic or imported goods applied to the value
/// added at each stage in the production/distribution
/// cycle.
/// </summary>
VAT,
/// <summary>
/// Invalid tax type
/// </summary>
Unknown
);
TZUGFeRDTaxTypesExtensions = class
public
class function FromString(const s: string): TZUGFeRDTaxTypes;
class function EnumToString(codes: TZUGFeRDTaxTypes): string;
end;
implementation
{ TZUGFeRDTaxTypesExtensions }
class function TZUGFeRDTaxTypesExtensions.EnumToString(
codes: TZUGFeRDTaxTypes): string;
begin
Result := GetEnumName(TypeInfo(TZUGFeRDTaxTypes), Integer(codes));
end;
class function TZUGFeRDTaxTypesExtensions.FromString(
const s: string): TZUGFeRDTaxTypes;
var
enumValue : Integer;
begin
enumValue := GetEnumValue(TypeInfo(TZUGFeRDTaxTypes), s);
if enumValue >= 0 then
Result := TZUGFeRDTaxTypes(enumValue)
else
Result := TZUGFeRDTaxTypes.Unknown;
end;
end.