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", 054 "A tax category code indicating the item is tax exempt when the item is bought for future resale."), 055 056 /** 057 * Value Added Tax (VAT) not now due for payment 058 * 059 * A code to indicate that the Value Added Tax (VAT) amount 060 * which is due on the current invoice is to be paid on 061 * receipt of a separate VAT payment request. 062 **/ 063 AC( 064 "Value Added Tax (VAT) not now due for payment", 065 " 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."), 066 067 /** 068 * Value Added Tax (VAT) due from a previous invoice 069 * 070 * A code to indicate that the Value Added Tax (VAT) amount 071 * of a previous invoice is to be paid. 072 **/ 073 AD("Value Added Tax (VAT) due from a previous invoice", 074 "A code to indicate that the Value Added Tax (VAT) amount of a previous invoice is to be paid."), 075 076 /** 077 * VAT Reverse Charge 078 * 079 * Code specifying that the standard VAT rate is levied 080 * from the invoicee. 081 **/ 082 AE("VAT Reverse Charge", "Code specifying that the standard VAT rate is levied from the invoicee."), 083 084 /** 085 * Transferred (VAT) 086 * 087 * VAT not to be paid to the issuer of the invoice but 088 * directly to relevant tax authority. 089 **/ 090 B("Transferred (VAT)", "VAT not to be paid to the issuer of the invoice but directly to relevant tax authority."), 091 092 /** 093 * Duty paid by supplier 094 * 095 * Duty associated with shipment of goods is paid by the 096 * supplier; customer receives goods with duty paid. 097 **/ 098 C("Duty paid by supplier", 099 "Duty associated with shipment of goods is paid by the supplier; customer receives goods with duty paid."), 100 101 /** 102 * Exempt from tax 103 * 104 * Code specifying that taxes are not applicable. 105 **/ 106 E("Exempt from tax", "Code specifying that taxes are not applicable."), 107 108 /** 109 * Free export item, tax not charged 110 * 111 * Code specifying that the item is free export and taxes 112 * are not charged. 113 **/ 114 G("Free export item, tax not charged", "Code specifying that the item is free export and taxes are not charged."), 115 116 /** 117 * Higher rate 118 * 119 * Code specifying a higher rate of duty or tax or fee. 120 **/ 121 H("Higher rate", "Code specifying a higher rate of duty or tax or fee."), 122 123 /** 124 * Services outside scope of tax 125 * 126 * Code specifying that taxes are not applicable to the 127 * services. 128 **/ 129 O("Services outside scope of tax", "Code specifying that taxes are not applicable to the services."), 130 131 /** 132 * Standard rate 133 * 134 * Code specifying the standard rate. 135 **/ 136 S("Standard rate", "Code specifying the standard rate."), 137 138 /** 139 * Zero rated goods 140 * 141 * Code specifying that the goods are at a zero rate. 142 **/ 143 Z("Zero rated goods", "Code specifying that the goods are at a zero rate."); 144 145 private final String description; 146 147 private final String detailedDescription; 148 149 private TaxCategory(String description, String detailedDescription) { 150 this.description = description; 151 this.detailedDescription = detailedDescription; 152 } 153 154 /** 155 * Gets the code. 156 * 157 * @return the code 158 */ 159 public String getCode() { 160 return name(); 161 } 162 163 /** 164 * Gets the description. 165 * 166 * @return the description 167 */ 168 public String getDescription() { 169 return description; 170 } 171 172 /** 173 * Gets the detailed description. 174 * 175 * @return the detailed description 176 */ 177 public String getDetailedDescription() { 178 return detailedDescription; 179 } 180 181 /** 182 * Retrieves a TaxCategoryCode the by the given code. 183 * 184 * @param code the code 185 * @return the by code 186 */ 187 public static TaxCategory getByCode(String code) { 188 return valueOf(code); 189 } 190 191 @Override 192 public String toString() { 193 return new StringBuilder().append("[").append(getCode()).append("] ").append(description).toString(); 194 } 195 196}