001/* Copyright (C) 2014 konik.io 002 * 003 * This file is part of the Konik library. 004 * 005 * The Konik library is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Affero General Public License as 007 * published by the Free Software Foundation, either version 3 of the 008 * License, or (at your option) any later version. 009 * 010 * The Konik library is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Affero General Public License for more details. 014 * 015 * You should have received a copy of the GNU Affero General Public License 016 * along with the Konik library. If not, see <http://www.gnu.org/licenses/>. 017 */ 018package io.konik.zugferd.unece.codes; 019 020import javax.xml.bind.annotation.XmlType; 021 022/** 023 * = The Tax Category Code. 024 * 025 * Based on 5305 Duty or tax or fee category code 026 * 027 * @see http://www.unece.org/trade/untdid/d13b/tred/tred5305.htm[UN/EDIFACT 5305 Duty or tax or fee category code^] 028 * 029 */ 030@XmlType(name = "TaxCategoryCodeType") 031public enum TaxCategory { 032 033 /** 034 * Mixed tax rate 035 * 036 * Code specifying that the rate is based on mixed tax. 037 **/ 038 A("Mixed tax rate", "Code specifying that the rate is based on mixed tax."), 039 040 /** 041 * Lower rate 042 * 043 * Tax rate is lower than standard rate. 044 **/ 045 AA("Lower rate", "Tax rate is lower than standard rate."), 046 047 /** 048 * Exempt for resale 049 * 050 * A tax category code indicating the item is tax exempt 051 * when the item is bought for future resale. 052 **/ 053 AB("Exempt for resale", "A tax category code indicating the item is tax exempt when the item is bought for future resale."), 054 055 /** 056 * Value Added Tax (VAT) not now due for payment 057 * 058 * A code to indicate that the Value Added Tax (VAT) amount 059 * which is due on the current invoice is to be paid on 060 * receipt of a separate VAT payment request. 061 **/ 062 AC("Value Added Tax (VAT) not now due for payment", " A code to indicate that the Value Added Tax (VAT) amount which is due on the current invoice is to be paid on receipt of a separate VAT payment request."), 063 064 /** 065 * Value Added Tax (VAT) due from a previous invoice 066 * 067 * A code to indicate that the Value Added Tax (VAT) amount 068 * of a previous invoice is to be paid. 069 **/ 070 AD("Value Added Tax (VAT) due from a previous invoice", "A code to indicate that the Value Added Tax (VAT) amount of a previous invoice is to be paid."), 071 072 /** 073 * VAT Reverse Charge 074 * 075 * Code specifying that the standard VAT rate is levied 076 * from the invoicee. 077 **/ 078 AE("VAT Reverse Charge", "Code specifying that the standard VAT rate is levied from the invoicee."), 079 080 /** 081 * Transferred (VAT) 082 * 083 * VAT not to be paid to the issuer of the invoice but 084 * directly to relevant tax authority. 085 **/ 086 B("Transferred (VAT)", "VAT not to be paid to the issuer of the invoice but directly to relevant tax authority."), 087 088 /** 089 * Duty paid by supplier 090 * 091 * Duty associated with shipment of goods is paid by the 092 * supplier; customer receives goods with duty paid. 093 **/ 094 C("Duty paid by supplier", "Duty associated with shipment of goods is paid by the supplier; customer receives goods with duty paid."), 095 096 /** 097 * Exempt from tax 098 * 099 * Code specifying that taxes are not applicable. 100 **/ 101 E("Exempt from tax", "Code specifying that taxes are not applicable."), 102 103 /** 104 * Free export item, tax not charged 105 * 106 * Code specifying that the item is free export and taxes 107 * are not charged. 108 **/ 109 G("Free export item, tax not charged", "Code specifying that the item is free export and taxes are not charged."), 110 111 /** 112 * Higher rate 113 * 114 * Code specifying a higher rate of duty or tax or fee. 115 **/ 116 H("Higher rate", "Code specifying a higher rate of duty or tax or fee."), 117 118 /** 119 * Intra-Community Supply 120 * 121 * Code specifying that the VAT rate is levied from the invoicee for Intra-Community supplies. 122 **/ 123 IC("Intra-Community Supply", "Code specifying that the VAT rate is levied from the invoicee for Intra-Community supplies."), 124 125 /** 126 * Services outside scope of tax 127 * 128 * Code specifying that taxes are not applicable to the 129 * services. 130 **/ 131 O("Services outside scope of tax", "Code specifying that taxes are not applicable to the services."), 132 133 /** 134 * Standard rate 135 * 136 * Code specifying the standard rate. 137 **/ 138 S("Standard rate", "Code specifying the standard rate."), 139 140 /** 141 * Zero rated goods 142 * 143 * Code specifying that the goods are at a zero rate. 144 **/ 145 Z("Zero rated goods", "Code specifying that the goods are at a zero rate."); 146 147 private final String description; 148 149 private final String detailedDescription; 150 151 private TaxCategory(String description, String detailedDescription) { 152 this.description = description; 153 this.detailedDescription = detailedDescription; 154 } 155 156 /** 157 * Gets the code. 158 * 159 * @return the code 160 */ 161 public String getCode() { 162 return name(); 163 } 164 165 /** 166 * Gets the description. 167 * 168 * @return the description 169 */ 170 public String getDescription() { 171 return description; 172 } 173 174 /** 175 * Gets the detailed description. 176 * 177 * @return the detailed description 178 */ 179 public String getDetailedDescription() { 180 return detailedDescription; 181 } 182 183 /** 184 * Retrieves a TaxCategoryCode the by the given code. 185 * 186 * @param code the code 187 * @return the by code 188 */ 189 public static TaxCategory getByCode(String code) { 190 return valueOf(code); 191 } 192 193 @Override 194 public String toString() { 195 return new StringBuilder().append("[").append(getCode()).append("] ").append(description).toString(); 196 } 197 198}