zugferd_code_lists/zugferd_2_3_3/
enum5305.rs1#![allow(non_camel_case_types)]
2
3#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Hash)]
4pub enum Enum5305 {
5 StandardRate,
7 ZeroRatedGoods,
9 ExemptFromTax,
11 VatReverseCharge,
15 VatExemptForEeaIntraCommunitySupplyGoodsAndServices,
19 FreeExportItemTaxNotCharged,
21 ServiceOutsideScopeTax,
25 CanaryIslandsGeneralIndirectTax,
29 TaxForProductionServicesAndImportationInCeutaAndMelilla,
33}
34
35impl crate::Code for Enum5305 {
36 fn code(&self) -> &str {
37 match self {
38 Enum5305::StandardRate => "S",
39 Enum5305::ZeroRatedGoods => "Z",
40 Enum5305::ExemptFromTax => "E",
41 Enum5305::VatReverseCharge => "AE",
42 Enum5305::VatExemptForEeaIntraCommunitySupplyGoodsAndServices => "K",
43 Enum5305::FreeExportItemTaxNotCharged => "G",
44 Enum5305::ServiceOutsideScopeTax => "O",
45 Enum5305::CanaryIslandsGeneralIndirectTax => "L",
46 Enum5305::TaxForProductionServicesAndImportationInCeutaAndMelilla => "M",
47 }
48 }
49}
50
51impl crate::Description for Enum5305 {
52 fn description(&self) -> &str {
53 match self {
54 Enum5305::StandardRate => "Standard rate",
55 Enum5305::ZeroRatedGoods => "Zero rated goods",
56 Enum5305::ExemptFromTax => "Exempt from tax",
57 Enum5305::VatReverseCharge => "VAT Reverse charge",
58 Enum5305::VatExemptForEeaIntraCommunitySupplyGoodsAndServices => {
59 "VAT exempt for EEA intra-community supply of goods and services"
60 }
61 Enum5305::FreeExportItemTaxNotCharged => "Free export item, tax not charged",
62 Enum5305::ServiceOutsideScopeTax => "Service outside scope of tax",
63 Enum5305::CanaryIslandsGeneralIndirectTax => "Canary Islands general indirect tax",
64 Enum5305::TaxForProductionServicesAndImportationInCeutaAndMelilla => {
65 "Tax for production, services and importation in Ceuta and Melilla"
66 }
67 }
68 }
69}
70
71impl crate::FromCode for Enum5305 {
72 fn from_code(code: &str) -> Option<Self>
73 where
74 Self: Sized,
75 {
76 match code {
77 "S" => Some(Enum5305::StandardRate),
78 "Z" => Some(Enum5305::ZeroRatedGoods),
79 "E" => Some(Enum5305::ExemptFromTax),
80 "AE" => Some(Enum5305::VatReverseCharge),
81 "K" => Some(Enum5305::VatExemptForEeaIntraCommunitySupplyGoodsAndServices),
82 "G" => Some(Enum5305::FreeExportItemTaxNotCharged),
83 "O" => Some(Enum5305::ServiceOutsideScopeTax),
84 "L" => Some(Enum5305::CanaryIslandsGeneralIndirectTax),
85 "M" => Some(Enum5305::TaxForProductionServicesAndImportationInCeutaAndMelilla),
86 _ => None,
87 }
88 }
89}