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.trade;
019
020import io.konik.validator.annotation.Basic;
021import io.konik.zugferd.entity.CommonMonetarySummation;
022import io.konik.zugferd.unqualified.Amount;
023
024import javax.validation.Valid;
025import javax.validation.constraints.NotNull;
026import javax.xml.bind.annotation.XmlElement;
027import javax.xml.bind.annotation.XmlType;
028
029/**
030 * = The Monetary Summation
031 * 
032 */
033@XmlType(propOrder = { "lineTotal", "chargeTotal", "allowanceTotal", "taxBasisTotal", "taxTotal", "grandTotal",
034      "totalPrepaid", "duePayable" })
035public class MonetarySummation extends CommonMonetarySummation {
036
037   @Basic
038   @Valid
039   @NotNull
040   @XmlElement(name = "ChargeTotalAmount")
041   private Amount chargeTotal;
042
043   @Basic
044   @Valid
045   @NotNull
046   @XmlElement(name = "AllowanceTotalAmount")
047   private Amount allowanceTotal;
048
049   @Basic
050   @Valid
051   @NotNull
052   @XmlElement(name = "TaxBasisTotalAmount")
053   private Amount taxBasisTotal;
054
055   @Basic
056   @Valid
057   @NotNull
058   @XmlElement(name = "TaxTotalAmount")
059   private Amount taxTotal;
060
061   @Basic
062   @Valid
063   @NotNull
064   @XmlElement(name = "GrandTotalAmount")
065   private Amount grandTotal;
066
067   @Basic
068   @Valid
069   @XmlElement(name = "TotalPrepaidAmount")
070   private Amount totalPrepaid;
071
072   @Basic
073   @Valid
074   @XmlElement(name = "DuePayableAmount")
075   private Amount duePayable;
076
077   /**
078    * Gets the line total amount.
079    * 
080    * @return the line total amount
081    */
082   @Override
083   @Basic
084   @NotNull
085   public Amount getLineTotal() {
086      return lineTotal;
087   }
088
089   /**
090    * Sets the line total amount.
091    * 
092    * @param lineTotal the new line total amount
093    * @return the trade settlement monetary summation
094    */
095   @Override
096   public MonetarySummation setLineTotal(Amount lineTotal) {
097      this.lineTotal = lineTotal;
098      return this;
099   }
100
101   /**
102    * Gets the charge total amount.
103    * 
104    * Profile:: BASIC
105    * 
106    * 
107    * @return the charge total amount
108    */
109   public Amount getChargeTotal() {
110      return chargeTotal;
111   }
112
113   /**
114    * Sets the charge total amount.
115    * 
116    * Profile:: BASIC
117    * 
118    * 
119    * @param chargeTotal the new charge total amount
120    * @return the trade settlement monetary summation
121    */
122   public MonetarySummation setChargeTotal(Amount chargeTotal) {
123      this.chargeTotal = chargeTotal;
124      return this;
125   }
126
127   /**
128    * Gets the allowance total amount.
129    * 
130    * Profile:: BASIC
131    * 
132    * @return the allowance total amount
133    */
134   public Amount getAllowanceTotal() {
135      return allowanceTotal;
136   }
137
138   /**
139    * Sets the allowance total amount.
140    * 
141    * Profile:: BASIC
142    * 
143    * @param allowanceTotal the new allowance total amount
144    * @return the trade settlement monetary summation
145    */
146   public MonetarySummation setAllowanceTotal(Amount allowanceTotal) {
147      this.allowanceTotal = allowanceTotal;
148      return this;
149   }
150
151   /**
152    * Gets the tax basis total amount.
153    * The invoice net sum = netTotal + charges - allowence.
154    * 
155    * Profile:: BASIC
156    * 
157    * @return the tax basis total amount
158    */
159   public Amount getTaxBasisTotal() {
160      return taxBasisTotal;
161   }
162
163   /**
164    * Sets the tax basis total amount.
165    * 
166    * The invoice net sum = netTotal + charges - allowence.
167    * 
168    * Profile:: BASIC
169    * 
170    * @param taxBasisTotal the new tax basis total amount
171    * @return the trade settlement monetary summation
172    */
173   public MonetarySummation setTaxBasisTotal(Amount taxBasisTotal) {
174      this.taxBasisTotal = taxBasisTotal;
175      return this;
176   }
177
178   /**
179    * Gets the total tax amount.
180    * 
181    * Profile:: BASIC
182    * 
183    * @return the tax total amount
184    */
185   public Amount getTaxTotal() {
186      return taxTotal;
187   }
188
189   /**
190    * Sets the total tax amount.
191    * 
192    * Profile:: BASIC
193    * 
194    * @param taxTotal the new tax total amount
195    * @return the trade settlement monetary summation
196    */
197   public MonetarySummation setTaxTotal(Amount taxTotal) {
198      this.taxTotal = taxTotal;
199      return this;
200   }
201
202   /**
203    * Gets the grand total amount.
204    * 
205    * Profile:: BASIC
206    * 
207    * @return the grand total amount
208    */
209   public Amount getGrandTotal() {
210      return grandTotal;
211   }
212
213   /**
214    * Sets the grand total amount.
215    * 
216    * Profile:: BASIC
217    * 
218    * 
219    * @param grandTotal the new grand total amount
220    * @return the trade settlement monetary summation
221    */
222   public MonetarySummation setGrandTotal(Amount grandTotal) {
223      this.grandTotal = grandTotal;
224      return this;
225   }
226
227   /**
228    * Gets the total prepaid amount.
229    * 
230    * Profile:: COMFORT
231    * 
232    * 
233    * @return the total prepaid amount
234    */
235   public Amount getTotalPrepaid() {
236      return totalPrepaid;
237   }
238
239   /**
240    * Sets the total prepaid amount.
241    * 
242    * Profile:: COMFORT
243    * 
244    * 
245    * @param totalPrepaid the new total prepaid amount
246    * @return the trade settlement monetary summation
247    */
248   public MonetarySummation setTotalPrepaid(Amount totalPrepaid) {
249      this.totalPrepaid = totalPrepaid;
250      return this;
251   }
252
253   /**
254    * Gets the due payable amount.
255    * 
256    * Profile:: COMFORT
257    * 
258    * @return the due payable amount
259    */
260   public Amount getDuePayable() {
261      return duePayable;
262   }
263
264   /**
265    * Sets the due payable amount.
266    * 
267    * Profile:: COMFORT
268    * 
269    * @param duePayable the new due payable amount
270    * @return the trade settlement monetary summation
271    */
272   public MonetarySummation setDuePayable(Amount duePayable) {
273      this.duePayable = duePayable;
274      return this;
275   }
276
277}