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 * Services outside scope of tax 120 * 121 * Code specifying that taxes are not applicable to the 122 * services. 123 **/ 124 O("Services outside scope of tax", "Code specifying that taxes are not applicable to the services."), 125 126 /** 127 * Standard rate 128 * 129 * Code specifying the standard rate. 130 **/ 131 S("Standard rate", "Code specifying the standard rate."), 132 133 /** 134 * Zero rated goods 135 * 136 * Code specifying that the goods are at a zero rate. 137 **/ 138 Z("Zero rated goods", "Code specifying that the goods are at a zero rate."); 139 140 private final String description; 141 142 private final String detailedDescription; 143 144 private TaxCategory(String description, String detailedDescription) { 145 this.description = description; 146 this.detailedDescription = detailedDescription; 147 } 148 149 /** 150 * Gets the code. 151 * 152 * @return the code 153 */ 154 public String getCode() { 155 return name(); 156 } 157 158 /** 159 * Gets the description. 160 * 161 * @return the description 162 */ 163 public String getDescription() { 164 return description; 165 } 166 167 168 /** 169 * Gets the detailed description. 170 * 171 * @return the detailed description 172 */ 173 public String getDetailedDescription() { 174 return detailedDescription; 175 } 176 177 /** 178 * Retrieves a TaxCategoryCode the by the given code. 179 * 180 * @param code the code 181 * @return the by code 182 */ 183 public static TaxCategory getByCode(String code){ 184 return valueOf(code); 185 } 186 187 @Override 188 public String toString() { 189 return new StringBuilder().append("[").append(getCode()).append("] ").append(description).toString(); 190 } 191 192}