001/* 002 * Copyright (C) 2014 konik.io 003 * 004 * This file is part of Konik library. 005 * 006 * Konik library is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU Affero General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Konik library is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU Affero General Public License for more details. 015 * 016 * You should have received a copy of the GNU Affero General Public License 017 * along with Konik library. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package io.konik.zugferd.entity.trade.item; 020 021import io.konik.validator.annotation.Comfort; 022import io.konik.validator.annotation.Extended; 023import io.konik.zugferd.entity.CommonTax; 024import io.konik.zugferd.unece.codes.TaxCategory; 025import io.konik.zugferd.unece.codes.TaxCode; 026import io.konik.zugferd.unqualified.Amount; 027 028import java.math.BigDecimal; 029 030/** 031 * = The trade tax on an item basis. 032 */ 033public class SpecifiedTax extends CommonTax { 034 035 @Comfort 036 @Override 037 public TaxCode getType() { 038 return super.getType(); 039 } 040 041 @Override 042 public SpecifiedTax setType(TaxCode taxTypeCode) { 043 super.setType(taxTypeCode); 044 return this; 045 } 046 047 @Comfort 048 @Override 049 public TaxCategory getCategory() { 050 return super.getCategory(); 051 } 052 053 @Override 054 public SpecifiedTax setCategory(TaxCategory value) { 055 super.setCategory(value); 056 return this; 057 } 058 059 /** 060 * Gets the calculated amount. 061 * 062 * @return the calculated amount 063 */ 064 @Extended 065 public Amount getCalculated() { 066 return calculated; 067 } 068 069 /** 070 * Sets the calculated amount. 071 * 072 * Profile:: BASIC 073 * 074 * @param calculatedAmount the new calculated amount 075 * @return the tax 076 */ 077 public SpecifiedTax setCalculated(Amount calculatedAmount) { 078 this.calculated = calculatedAmount; 079 return this; 080 } 081 082 /** 083 * Gets the tax exemption reason. 084 * 085 * Profile:: COMFORT 086 * 087 * @return the exemption reason 088 */ 089 @Comfort 090 public String getExemptionReason() { 091 return exemptionReason; 092 } 093 094 /** 095 * Sets the tax exemption reason. 096 * 097 * Profile:: COMFORT 098 * 099 * @param exemptionReason the new exemption reason 100 * @return the tax 101 */ 102 public SpecifiedTax setExemptionReason(String exemptionReason) { 103 this.exemptionReason = exemptionReason; 104 return this; 105 } 106 107 @Override 108 public SpecifiedTax setPercentage(BigDecimal applicablePercentage) { 109 return (SpecifiedTax) super.setPercentage(applicablePercentage); 110 } 111 112}