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.entity; 019 020import java.io.Serializable; 021import java.math.BigDecimal; 022 023import io.konik.zugferd.unqualified.Amount; 024import io.konik.zugferd.unqualified.Quantity; 025 026/** 027 * 028 * The common interface for the Allowance Charges. 029 * 030 */ 031public interface CommonAllowanceCharge extends Serializable { 032 033 /** 034 * Checks if is a surcharge. 035 * 036 * @return true if charge 037 */ 038 public abstract boolean isSurcharge(); 039 040 /** 041 * Checks if is discount. 042 * 043 * @return true if is discount 044 */ 045 public abstract boolean isDiscount(); 046 047 /** 048 * Sets amount to be a surcharge. 049 * 050 * @return the allowance charge to be true 051 */ 052 public abstract CommonAllowanceCharge setSurcharge(); 053 054 /** 055 * Sets the amount to be a discount. 056 * 057 * @return the allowance discount to be true 058 */ 059 public abstract CommonAllowanceCharge setDiscount(); 060 061 /** 062 * Gets the sequence number of the allowance charge 063 * 064 * @return the sequence 065 */ 066 public abstract BigDecimal getSequence(); 067 068 /** 069 * Sets the sequence number of the allowance charge. 070 * 071 * @param sequence the new sequence 072 * @return the allowance charge 073 */ 074 public abstract CommonAllowanceCharge setSequence(BigDecimal sequence); 075 076 /** 077 * Gets the calculation percent of the allowance charge 078 * 079 * @return the calculation percent 080 */ 081 public abstract BigDecimal getCalculationPercent(); 082 083 /** 084 * Sets the calculation percent of the allowance charge. 085 * 086 * @param calculationPercent the new calculation percent 087 * @return the allowance charge 088 */ 089 public abstract CommonAllowanceCharge setCalculationPercent(BigDecimal calculationPercent); 090 091 /** 092 * Gets the basis amount of the allowance charge. 093 * 094 * @return the basis amount 095 */ 096 public abstract Amount getBasis(); 097 098 /** 099 * Sets the basis amount of the allowance charge. 100 * 101 * @param basisAmount the new basis amount 102 * @return the allowance charge 103 */ 104 public abstract CommonAllowanceCharge setBasis(Amount basisAmount); 105 106 /** 107 * Gets the basis quantity. 108 * 109 * @return the basis quantity 110 */ 111 public abstract Quantity getBasisQuantity(); 112 113 /** 114 * Sets the basis quantity. 115 * 116 * @param basisQuantity the new basis quantity 117 * @return the allowance charge 118 */ 119 public abstract CommonAllowanceCharge setBasisQuantity(Quantity basisQuantity); 120 121 /** 122 * Gets the actual amount. 123 * 124 * @return the actual amount 125 */ 126 public abstract Amount getActual(); 127 128 /** 129 * Sets the actual amount. 130 * 131 * @param actualAmount the new actual amount 132 * @return the allowance charge 133 */ 134 public abstract CommonAllowanceCharge setActual(Amount actualAmount); 135 136 /** 137 * Gets the reason code for the reason content. 138 * 139 * @return the reason code 140 */ 141 public abstract String getReasonCode(); 142 143 /** 144 * Sets the reason code for the reason content. 145 * 146 * @param reasonCode the new reason code 147 * @return the allowance charge 148 */ 149 public abstract CommonAllowanceCharge setReasonCode(String reasonCode); 150 151 /** 152 * Gets the reason free text 153 * 154 * @return the reason 155 */ 156 public abstract String getReason(); 157 158 /** 159 * Sets the reason free text 160 * 161 * @param reason the new reason 162 * @return the allowance charge 163 */ 164 public abstract CommonAllowanceCharge setReason(String reason); 165 166}