zugferd_code_lists/zugferd_2_3_2/
vatcat.rs

1#![allow(non_camel_case_types)]
2
3#[cfg_attr(feature = "specta", derive(specta::Type))]
4#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
5#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
6pub enum VATCAT {
7    /// Petroleum tax
8    ///
9    /// A tax levied on the volume of petroleum being transacted.
10    PetroleumTax,
11    /// Provisional countervailing duty cash
12    ///
13    /// Countervailing duty paid in cash prior to a formal finding of subsidization by Customs.
14    ProvisionalCountervailingDutyCash,
15    /// Provisional countervailing duty bond
16    ///
17    /// Countervailing duty paid by posting a bond during an investigation period prior to a formal decision on subsidization by Customs.
18    ProvisionalCountervailingDutyBond,
19    /// Tobacco tax
20    ///
21    /// A tax levied on tobacco products.
22    TobaccoTax,
23    /// Energy fee
24    ///
25    /// General fee or tax for the use of energy.
26    EnergyFee,
27    /// Coffee tax
28    ///
29    /// A tax levied specifically on coffee products.
30    CoffeeTax,
31    /// Harmonised sales tax, Canadian
32    ///
33    /// 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.
34    HarmonisedSalesTaxCanadian,
35    /// Quebec sales tax
36    ///
37    /// A sales tax charged within the Canadian province of Quebec which is recoverable.
38    QuebecSalesTax,
39    /// Canadian provincial sales tax
40    ///
41    /// A sales tax charged within Canadian provinces which is non-recoverable.
42    CanadianProvincialSalesTax,
43    /// Tax on replacement part
44    ///
45    /// A tax levied on a replacement part, where the original part is returned.
46    TaxOnReplacementPart,
47    /// Mineral oil tax
48    ///
49    /// Tax that is levied specifically on products containing mineral oil.
50    MineralOilTax,
51    /// Special tax
52    ///
53    /// To indicate a special type of tax.
54    SpecialTax,
55    /// Insurance tax
56    ///
57    /// A tax levied specifically on insurances.
58    InsuranceTax,
59    /// Provincial Cannabis Tax
60    ///
61    /// A tax levied on Cannabis products
62    ProvincialCannabisTax,
63    /// Outstanding duty interest
64    ///
65    /// Fee levied due to outstanding duties to be paid
66    OutstandingDutyInterest,
67    /// Anti-dumping duty
68    ///
69    /// 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.
70    AntiDumpingDuty,
71    /// Stamp duty (Imposta di Bollo)
72    ///
73    /// Tax required in Italy, which may be fixed or graduated in various circumstances (e.g. VAT exempt documents or bank receipts).
74    StampDutyImpostaDiBollo,
75    /// Agricultural levy
76    ///
77    /// Levy imposed on agricultural products where there is a difference between the selling price between trading countries.
78    AgriculturalLevy,
79    /// Car tax
80    ///
81    /// A tax that is levied on the value of the automobile.
82    CarTax,
83    /// Paper consortium tax (Italy)
84    ///
85    /// Italian Paper consortium tax.
86    PaperConsortiumTaxItaly,
87    /// Commodity specific tax
88    ///
89    /// Tax related to a specified commodity, e.g. illuminants, salts.
90    CommoditySpecificTax,
91    /// Customs duty
92    ///
93    /// Duties laid down in the Customs tariff, to which goods are liable on entering or leaving the Customs territory (CCC).
94    CustomsDuty,
95    /// Countervailing duty
96    ///
97    /// A duty on imported goods applied for compensate for subsidies granted to those goods in the exporting country.
98    CountervailingDuty,
99    /// Environmental tax
100    ///
101    /// Tax assessed for funding or assuring environmental protection or clean-up.
102    EnvironmentalTax,
103    /// Excise duty
104    ///
105    /// 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.
106    ExciseDuty,
107    /// Agricultural export rebate
108    ///
109    /// Monetary rebate given to the seller in certain circumstances when agricultural products are exported.
110    AgriculturalExportRebate,
111    /// Federal excise tax
112    ///
113    /// Tax levied by the federal government on the manufacture of specific items.
114    FederalExciseTax,
115    /// Free
116    ///
117    /// No tax levied.
118    Free,
119    /// General construction tax
120    ///
121    /// General tax for construction.
122    GeneralConstructionTax,
123    /// Goods and services tax
124    ///
125    /// Tax levied on the final consumption of goods and services throughout the production and distribution chain.
126    GoodsAndServicesTax,
127    /// Illuminants tax
128    ///
129    /// Tax of illuminants.
130    IlluminantsTax,
131    /// Import tax
132    ///
133    /// Tax assessed on imports.
134    ImportTax,
135    /// Individual tax
136    ///
137    /// A tax levied based on an individual's ability to pay.
138    IndividualTax,
139    /// Business license fee
140    ///
141    /// Government assessed charge for permit to do business.
142    BusinessLicenseFee,
143    /// Local construction tax
144    ///
145    /// Local tax for construction.
146    LocalConstructionTax,
147    /// Light dues payable
148    ///
149    /// Fee levied on a vessel to pay for port navigation lights.
150    LightDuesPayable,
151    /// Local sales tax
152    ///
153    /// Assessment charges on sale of goods or services by city, borough country or other taxing authorities below state or provincial level.
154    LocalSalesTax,
155    /// Lust tax
156    ///
157    /// Tax imposed for clean-up of leaky underground storage tanks.
158    LustTax,
159    /// Monetary compensatory amount
160    ///
161    /// Levy on Common Agricultural Policy (European Union) goods used to compensate for fluctuating currencies between member states.
162    MonetaryCompensatoryAmount,
163    /// Miscellaneous cash deposit
164    ///
165    /// 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.
166    MiscellaneousCashDeposit,
167    /// Other taxes
168    ///
169    /// Unspecified, miscellaneous tax charges.
170    OtherTaxes,
171    /// Provisional duty bond
172    ///
173    /// Anti-dumping duty paid by posting a bond during an investigation period prior to a formal decision on dumping by Customs.
174    ProvisionalDutyBond,
175    /// Provisional duty cash
176    ///
177    /// Anti-dumping duty paid in cash prior to a formal finding of dumping by Customs.
178    ProvisionalDutyCash,
179    /// Preference duty
180    ///
181    /// 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).
182    PreferenceDuty,
183    /// Special construction tax
184    ///
185    /// Special tax for construction.
186    SpecialConstructionTax,
187    /// Shifted social securities
188    ///
189    /// Social securities share of the invoice amount to be paid directly to the social securities collector.
190    ShiftedSocialSecurities,
191    /// State/provincial sales tax
192    ///
193    /// All applicable sale taxes by authorities at the state or provincial level, below national level.
194    StateProvincialSalesTax,
195    /// Suspended duty
196    ///
197    /// Duty suspended or deferred from payment.
198    SuspendedDuty,
199    /// Surtax
200    ///
201    /// A tax or duty applied on and in addition to existing duties and taxes.
202    Surtax,
203    /// Shifted wage tax
204    ///
205    /// Wage tax share of the invoice amount to be paid directly to the tax collector(s office).
206    ShiftedWageTax,
207    /// Alcohol mark tax
208    ///
209    /// A tax levied based on the type of alcohol being obtained.
210    AlcoholMarkTax,
211    /// Total
212    ///
213    /// The summary amount of all taxes.
214    Total,
215    /// Turnover tax
216    ///
217    /// Tax levied on the total sales/turnover of a corporation.
218    TurnoverTax,
219    /// Tonnage taxes
220    ///
221    /// Tax levied based on the vessel's net tonnage.
222    TonnageTaxes,
223    /// Valuation deposit
224    ///
225    /// Duty paid and held on deposit, by Customs, during an investigation period prior to a formal decision on valuation of the goods being made.
226    ValuationDeposit,
227    /// Value added tax
228    ///
229    /// A tax on domestic or imported goods applied to the value added at each stage in the production/distribution cycle.
230    ValueAddedTax,
231}
232
233impl std::fmt::Display for VATCAT {
234    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
235        write!(f, "{}", <Self as crate::Code>::code(*self))
236    }
237}
238
239impl std::str::FromStr for VATCAT {
240    type Err = ();
241    fn from_str(s: &str) -> Result<Self, Self::Err> {
242        <Self as crate::FromCode>::from_code(s).ok_or(())
243    }
244}
245
246impl crate::Code for VATCAT {
247    fn code(self) -> &'static str {
248        match self {
249            VATCAT::PetroleumTax => "AAA",
250            VATCAT::ProvisionalCountervailingDutyCash => "AAB",
251            VATCAT::ProvisionalCountervailingDutyBond => "AAC",
252            VATCAT::TobaccoTax => "AAD",
253            VATCAT::EnergyFee => "AAE",
254            VATCAT::CoffeeTax => "AAF",
255            VATCAT::HarmonisedSalesTaxCanadian => "AAG",
256            VATCAT::QuebecSalesTax => "AAH",
257            VATCAT::CanadianProvincialSalesTax => "AAI",
258            VATCAT::TaxOnReplacementPart => "AAJ",
259            VATCAT::MineralOilTax => "AAK",
260            VATCAT::SpecialTax => "AAL",
261            VATCAT::InsuranceTax => "AAM",
262            VATCAT::ProvincialCannabisTax => "AAO",
263            VATCAT::OutstandingDutyInterest => "AAP",
264            VATCAT::AntiDumpingDuty => "ADD",
265            VATCAT::StampDutyImpostaDiBollo => "BOL",
266            VATCAT::AgriculturalLevy => "CAP",
267            VATCAT::CarTax => "CAR",
268            VATCAT::PaperConsortiumTaxItaly => "COC",
269            VATCAT::CommoditySpecificTax => "CST",
270            VATCAT::CustomsDuty => "CUD",
271            VATCAT::CountervailingDuty => "CVD",
272            VATCAT::EnvironmentalTax => "ENV",
273            VATCAT::ExciseDuty => "EXC",
274            VATCAT::AgriculturalExportRebate => "EXP",
275            VATCAT::FederalExciseTax => "FET",
276            VATCAT::Free => "FRE",
277            VATCAT::GeneralConstructionTax => "GCN",
278            VATCAT::GoodsAndServicesTax => "GST",
279            VATCAT::IlluminantsTax => "ILL",
280            VATCAT::ImportTax => "IMP",
281            VATCAT::IndividualTax => "IND",
282            VATCAT::BusinessLicenseFee => "LAC",
283            VATCAT::LocalConstructionTax => "LCN",
284            VATCAT::LightDuesPayable => "LDP",
285            VATCAT::LocalSalesTax => "LOC",
286            VATCAT::LustTax => "LST",
287            VATCAT::MonetaryCompensatoryAmount => "MCA",
288            VATCAT::MiscellaneousCashDeposit => "MCD",
289            VATCAT::OtherTaxes => "OTH",
290            VATCAT::ProvisionalDutyBond => "PDB",
291            VATCAT::ProvisionalDutyCash => "PDC",
292            VATCAT::PreferenceDuty => "PRF",
293            VATCAT::SpecialConstructionTax => "SCN",
294            VATCAT::ShiftedSocialSecurities => "SSS",
295            VATCAT::StateProvincialSalesTax => "STT",
296            VATCAT::SuspendedDuty => "SUP",
297            VATCAT::Surtax => "SUR",
298            VATCAT::ShiftedWageTax => "SWT",
299            VATCAT::AlcoholMarkTax => "TAC",
300            VATCAT::Total => "TOT",
301            VATCAT::TurnoverTax => "TOX",
302            VATCAT::TonnageTaxes => "TTA",
303            VATCAT::ValuationDeposit => "VAD",
304            VATCAT::ValueAddedTax => "VAT",
305        }
306    }
307}
308
309impl crate::Description for VATCAT {
310    fn description(self) -> &'static str {
311        match self {
312            VATCAT::PetroleumTax => "Petroleum tax",
313            VATCAT::ProvisionalCountervailingDutyCash => "Provisional countervailing duty cash",
314            VATCAT::ProvisionalCountervailingDutyBond => "Provisional countervailing duty bond",
315            VATCAT::TobaccoTax => "Tobacco tax",
316            VATCAT::EnergyFee => "Energy fee",
317            VATCAT::CoffeeTax => "Coffee tax",
318            VATCAT::HarmonisedSalesTaxCanadian => "Harmonised sales tax, Canadian",
319            VATCAT::QuebecSalesTax => "Quebec sales tax",
320            VATCAT::CanadianProvincialSalesTax => "Canadian provincial sales tax",
321            VATCAT::TaxOnReplacementPart => "Tax on replacement part",
322            VATCAT::MineralOilTax => "Mineral oil tax",
323            VATCAT::SpecialTax => "Special tax",
324            VATCAT::InsuranceTax => "Insurance tax",
325            VATCAT::ProvincialCannabisTax => "Provincial Cannabis Tax",
326            VATCAT::OutstandingDutyInterest => "Outstanding duty interest",
327            VATCAT::AntiDumpingDuty => "Anti-dumping duty",
328            VATCAT::StampDutyImpostaDiBollo => "Stamp duty (Imposta di Bollo)",
329            VATCAT::AgriculturalLevy => "Agricultural levy",
330            VATCAT::CarTax => "Car tax",
331            VATCAT::PaperConsortiumTaxItaly => "Paper consortium tax (Italy)",
332            VATCAT::CommoditySpecificTax => "Commodity specific tax",
333            VATCAT::CustomsDuty => "Customs duty",
334            VATCAT::CountervailingDuty => "Countervailing duty",
335            VATCAT::EnvironmentalTax => "Environmental tax",
336            VATCAT::ExciseDuty => "Excise duty",
337            VATCAT::AgriculturalExportRebate => "Agricultural export rebate",
338            VATCAT::FederalExciseTax => "Federal excise tax",
339            VATCAT::Free => "Free",
340            VATCAT::GeneralConstructionTax => "General construction tax",
341            VATCAT::GoodsAndServicesTax => "Goods and services tax",
342            VATCAT::IlluminantsTax => "Illuminants tax",
343            VATCAT::ImportTax => "Import tax",
344            VATCAT::IndividualTax => "Individual tax",
345            VATCAT::BusinessLicenseFee => "Business license fee",
346            VATCAT::LocalConstructionTax => "Local construction tax",
347            VATCAT::LightDuesPayable => "Light dues payable",
348            VATCAT::LocalSalesTax => "Local sales tax",
349            VATCAT::LustTax => "Lust tax",
350            VATCAT::MonetaryCompensatoryAmount => "Monetary compensatory amount",
351            VATCAT::MiscellaneousCashDeposit => "Miscellaneous cash deposit",
352            VATCAT::OtherTaxes => "Other taxes",
353            VATCAT::ProvisionalDutyBond => "Provisional duty bond",
354            VATCAT::ProvisionalDutyCash => "Provisional duty cash",
355            VATCAT::PreferenceDuty => "Preference duty",
356            VATCAT::SpecialConstructionTax => "Special construction tax",
357            VATCAT::ShiftedSocialSecurities => "Shifted social securities",
358            VATCAT::StateProvincialSalesTax => "State/provincial sales tax",
359            VATCAT::SuspendedDuty => "Suspended duty",
360            VATCAT::Surtax => "Surtax",
361            VATCAT::ShiftedWageTax => "Shifted wage tax",
362            VATCAT::AlcoholMarkTax => "Alcohol mark tax",
363            VATCAT::Total => "Total",
364            VATCAT::TurnoverTax => "Turnover tax",
365            VATCAT::TonnageTaxes => "Tonnage taxes",
366            VATCAT::ValuationDeposit => "Valuation deposit",
367            VATCAT::ValueAddedTax => "Value added tax",
368        }
369    }
370}
371
372impl crate::FromCode for VATCAT {
373    fn from_code(code: &str) -> Option<Self>
374    where
375        Self: Sized,
376    {
377        match code {
378            "AAA" => Some(VATCAT::PetroleumTax),
379            "AAB" => Some(VATCAT::ProvisionalCountervailingDutyCash),
380            "AAC" => Some(VATCAT::ProvisionalCountervailingDutyBond),
381            "AAD" => Some(VATCAT::TobaccoTax),
382            "AAE" => Some(VATCAT::EnergyFee),
383            "AAF" => Some(VATCAT::CoffeeTax),
384            "AAG" => Some(VATCAT::HarmonisedSalesTaxCanadian),
385            "AAH" => Some(VATCAT::QuebecSalesTax),
386            "AAI" => Some(VATCAT::CanadianProvincialSalesTax),
387            "AAJ" => Some(VATCAT::TaxOnReplacementPart),
388            "AAK" => Some(VATCAT::MineralOilTax),
389            "AAL" => Some(VATCAT::SpecialTax),
390            "AAM" => Some(VATCAT::InsuranceTax),
391            "AAO" => Some(VATCAT::ProvincialCannabisTax),
392            "AAP" => Some(VATCAT::OutstandingDutyInterest),
393            "ADD" => Some(VATCAT::AntiDumpingDuty),
394            "BOL" => Some(VATCAT::StampDutyImpostaDiBollo),
395            "CAP" => Some(VATCAT::AgriculturalLevy),
396            "CAR" => Some(VATCAT::CarTax),
397            "COC" => Some(VATCAT::PaperConsortiumTaxItaly),
398            "CST" => Some(VATCAT::CommoditySpecificTax),
399            "CUD" => Some(VATCAT::CustomsDuty),
400            "CVD" => Some(VATCAT::CountervailingDuty),
401            "ENV" => Some(VATCAT::EnvironmentalTax),
402            "EXC" => Some(VATCAT::ExciseDuty),
403            "EXP" => Some(VATCAT::AgriculturalExportRebate),
404            "FET" => Some(VATCAT::FederalExciseTax),
405            "FRE" => Some(VATCAT::Free),
406            "GCN" => Some(VATCAT::GeneralConstructionTax),
407            "GST" => Some(VATCAT::GoodsAndServicesTax),
408            "ILL" => Some(VATCAT::IlluminantsTax),
409            "IMP" => Some(VATCAT::ImportTax),
410            "IND" => Some(VATCAT::IndividualTax),
411            "LAC" => Some(VATCAT::BusinessLicenseFee),
412            "LCN" => Some(VATCAT::LocalConstructionTax),
413            "LDP" => Some(VATCAT::LightDuesPayable),
414            "LOC" => Some(VATCAT::LocalSalesTax),
415            "LST" => Some(VATCAT::LustTax),
416            "MCA" => Some(VATCAT::MonetaryCompensatoryAmount),
417            "MCD" => Some(VATCAT::MiscellaneousCashDeposit),
418            "OTH" => Some(VATCAT::OtherTaxes),
419            "PDB" => Some(VATCAT::ProvisionalDutyBond),
420            "PDC" => Some(VATCAT::ProvisionalDutyCash),
421            "PRF" => Some(VATCAT::PreferenceDuty),
422            "SCN" => Some(VATCAT::SpecialConstructionTax),
423            "SSS" => Some(VATCAT::ShiftedSocialSecurities),
424            "STT" => Some(VATCAT::StateProvincialSalesTax),
425            "SUP" => Some(VATCAT::SuspendedDuty),
426            "SUR" => Some(VATCAT::Surtax),
427            "SWT" => Some(VATCAT::ShiftedWageTax),
428            "TAC" => Some(VATCAT::AlcoholMarkTax),
429            "TOT" => Some(VATCAT::Total),
430            "TOX" => Some(VATCAT::TurnoverTax),
431            "TTA" => Some(VATCAT::TonnageTaxes),
432            "VAD" => Some(VATCAT::ValuationDeposit),
433            "VAT" => Some(VATCAT::ValueAddedTax),
434            _ => None,
435        }
436    }
437}