1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.kuali.ole.module.purap.businessobject;
22
23 import org.apache.commons.lang.builder.ToStringBuilder;
24 import org.kuali.ole.module.purap.PurapConstants;
25
26 import java.math.BigDecimal;
27
28 public class ElectronicInvoiceDetailRequestSummary {
29
30 private String subTotalAmount;
31 private String subTotalAmountCurrency;
32 private String taxAmount;
33 private String taxAmountCurrency;
34 private String taxDescription;
35 private String specialHandlingAmount;
36 private String specialHandlingAmountCurrency;
37 private String specialHandlingAmountDescription;
38 private String shippingAmount;
39 private String shippingAmountCurrency;
40
41 private String grossAmount;
42 private String grossAmountCurrency;
43 private String discountAmount;
44 private String discountAmountCurrency;
45
46 private String netAmount;
47 private String netAmountCurrency;
48 private String depositAmount;
49 private String depositAmountCurrency;
50
51 private String dueAmount;
52 private String dueAmountCurrency;
53
54
55
56
57 private String taxCategory;
58 private String taxPurpose;
59 private String taxPercentageRate;
60
61
62
63 public ElectronicInvoiceDetailRequestSummary() {
64 super();
65 }
66
67 public String getShippingDescription() {
68 if (this.shippingAmount != null) {
69 try {
70 if (BigDecimal.ZERO.compareTo(this.getInvoiceShippingAmount()) != 0) {
71 return PurapConstants.ElectronicInvoice.DEFAULT_SHIPPING_DESCRIPTION;
72 } else {
73 return null;
74 }
75 } catch (Throwable t) {
76 return null;
77 }
78 }
79 return null;
80 }
81
82 public BigDecimal getInvoiceSubTotalAmount() {
83 if ((this.subTotalAmount == null) || ("".equals(this.subTotalAmount))) {
84 return BigDecimal.ZERO;
85 } else {
86 return new BigDecimal(this.subTotalAmount);
87 }
88 }
89
90 public BigDecimal getInvoiceTaxAmount() {
91 if ((this.taxAmount == null) || ("".equals(this.taxAmount))) {
92 return BigDecimal.ZERO;
93 } else {
94 return new BigDecimal(this.taxAmount);
95 }
96 }
97
98 public BigDecimal getInvoiceSpecialHandlingAmount() {
99 if ((this.specialHandlingAmount == null) || ("".equals(this.specialHandlingAmount))) {
100 return BigDecimal.ZERO;
101 } else {
102 return new BigDecimal(this.specialHandlingAmount);
103 }
104 }
105
106 public BigDecimal getInvoiceShippingAmount() {
107 if ((this.shippingAmount == null) || ("".equals(this.shippingAmount))) {
108 return BigDecimal.ZERO;
109 } else {
110 return new BigDecimal(this.shippingAmount);
111 }
112 }
113
114 public BigDecimal getInvoiceGrossAmount() {
115 if ((this.grossAmount == null) || ("".equals(this.grossAmount))) {
116 return BigDecimal.ZERO;
117 } else {
118 return new BigDecimal(this.grossAmount);
119 }
120 }
121
122 public BigDecimal getInvoiceDiscountAmount() {
123 if ((this.discountAmount == null) || ("".equals(this.discountAmount))) {
124 return BigDecimal.ZERO;
125 } else {
126 return new BigDecimal(this.discountAmount);
127 }
128 }
129
130 public BigDecimal getInvoiceNetAmount() {
131 if ((this.netAmount == null) || ("".equals(this.netAmount))) {
132 return BigDecimal.ZERO;
133 } else {
134 return new BigDecimal(this.netAmount);
135 }
136 }
137
138 public BigDecimal getInvoiceDepositAmount() {
139 if ((this.depositAmount == null) || ("".equals(this.depositAmount))) {
140 return BigDecimal.ZERO;
141 } else {
142 return new BigDecimal(this.depositAmount);
143 }
144 }
145
146 public BigDecimal getInvoiceDueAmount() {
147 if ((this.dueAmount == null) || ("".equals(this.dueAmount))) {
148 return BigDecimal.ZERO;
149 } else {
150 return new BigDecimal(this.dueAmount);
151 }
152 }
153
154
155
156
157 public String getDepositAmount() {
158 return depositAmount;
159 }
160
161
162
163
164 public void setDepositAmount(String depositAmount) {
165 this.depositAmount = depositAmount;
166 }
167
168
169
170
171 public String getDepositAmountCurrency() {
172 return depositAmountCurrency;
173 }
174
175
176
177
178 public void setDepositAmountCurrency(String depositAmountCurrency) {
179 this.depositAmountCurrency = depositAmountCurrency;
180 }
181
182
183
184
185 public String getDiscountAmount() {
186 return discountAmount;
187 }
188
189
190
191
192 public void setDiscountAmount(String discountAmount) {
193 this.discountAmount = discountAmount;
194 }
195
196
197
198
199 public String getDiscountAmountCurrency() {
200 return discountAmountCurrency;
201 }
202
203
204
205
206 public void setDiscountAmountCurrency(String discountAmountCurrency) {
207 this.discountAmountCurrency = discountAmountCurrency;
208 }
209
210
211
212
213 public String getDueAmount() {
214 return dueAmount;
215 }
216
217
218
219
220 public void setDueAmount(String dueAmount) {
221 this.dueAmount = dueAmount;
222 }
223
224
225
226
227 public String getDueAmountCurrency() {
228 return dueAmountCurrency;
229 }
230
231
232
233
234 public void setDueAmountCurrency(String dueAmountCurrency) {
235 this.dueAmountCurrency = dueAmountCurrency;
236 }
237
238
239
240
241 public String getGrossAmount() {
242 return grossAmount;
243 }
244
245
246
247
248 public void setGrossAmount(String grossAmount) {
249 this.grossAmount = grossAmount;
250 }
251
252
253
254
255 public String getGrossAmountCurrency() {
256 return grossAmountCurrency;
257 }
258
259
260
261
262 public void setGrossAmountCurrency(String grossAmountCurrency) {
263 this.grossAmountCurrency = grossAmountCurrency;
264 }
265
266
267
268
269 public String getNetAmount() {
270 return netAmount;
271 }
272
273
274
275
276 public void setNetAmount(String netAmount) {
277 this.netAmount = netAmount;
278 }
279
280
281
282
283 public String getNetAmountCurrency() {
284 return netAmountCurrency;
285 }
286
287
288
289
290 public void setNetAmountCurrency(String netAmountCurrency) {
291 this.netAmountCurrency = netAmountCurrency;
292 }
293
294
295
296
297 public String getShippingAmount() {
298 return shippingAmount;
299 }
300
301
302
303
304 public void setShippingAmount(String shippingAmount) {
305 this.shippingAmount = shippingAmount;
306 }
307
308
309
310
311 public String getShippingAmountCurrency() {
312 return shippingAmountCurrency;
313 }
314
315
316
317
318 public void setShippingAmountCurrency(String shippingAmountCurrency) {
319 this.shippingAmountCurrency = shippingAmountCurrency;
320 }
321
322
323
324
325 public String getSpecialHandlingAmount() {
326 return specialHandlingAmount;
327 }
328
329
330
331
332 public void setSpecialHandlingAmount(String specialHandlingAmount) {
333 this.specialHandlingAmount = specialHandlingAmount;
334 }
335
336
337
338
339 public String getSpecialHandlingAmountCurrency() {
340 return specialHandlingAmountCurrency;
341 }
342
343
344
345
346 public void setSpecialHandlingAmountCurrency(String specialHandlingAmountCurrency) {
347 this.specialHandlingAmountCurrency = specialHandlingAmountCurrency;
348 }
349
350
351
352
353 public String getSpecialHandlingAmountDescription() {
354 if (this.specialHandlingAmount != null) {
355 try {
356 if (BigDecimal.ZERO.compareTo(this.getInvoiceSpecialHandlingAmount()) != 0) {
357 return PurapConstants.ElectronicInvoice.DEFAULT_SPECIAL_HANDLING_DESCRIPTION;
358 } else {
359 return null;
360 }
361 } catch (Throwable t) {
362 return null;
363 }
364 }
365 return null;
366 }
367
368
369
370
371
372 public void setSpecialHandlingAmountDescription(String specialHandlingAmountDescription) {
373 this.specialHandlingAmountDescription = specialHandlingAmountDescription;
374 }
375
376
377
378
379 public String getSubTotalAmount() {
380 return subTotalAmount;
381 }
382
383
384
385
386 public void setSubTotalAmount(String subTotalAmount) {
387 this.subTotalAmount = subTotalAmount;
388 }
389
390
391
392
393 public String getSubTotalAmountCurrency() {
394 return subTotalAmountCurrency;
395 }
396
397
398
399
400 public void setSubTotalAmountCurrency(String subTotalAmountCurrency) {
401 this.subTotalAmountCurrency = subTotalAmountCurrency;
402 }
403
404
405
406
407 public String getTaxAmount() {
408 return taxAmount;
409 }
410
411
412
413
414 public void setTaxAmount(String taxAmount) {
415 this.taxAmount = taxAmount;
416 }
417
418
419
420
421 public String getTaxAmountCurrency() {
422 return taxAmountCurrency;
423 }
424
425
426
427
428 public void setTaxAmountCurrency(String taxAmountCurrency) {
429 this.taxAmountCurrency = taxAmountCurrency;
430 }
431
432
433
434
435 public String getTaxDescription() {
436 return taxDescription;
437 }
438
439
440
441
442 public void setTaxDescription(String taxDescription) {
443 this.taxDescription = taxDescription;
444 }
445
446 public String getTaxCategory() {
447 return taxCategory;
448 }
449
450 public void setTaxCategory(String taxCategory) {
451 this.taxCategory = taxCategory;
452 }
453
454 public String getTaxPercentageRate() {
455 return taxPercentageRate;
456 }
457
458 public void setTaxPercentageRate(String taxPercentageRate) {
459 this.taxPercentageRate = taxPercentageRate;
460 }
461
462 public String getTaxPurpose() {
463 return taxPurpose;
464 }
465
466 public void setTaxPurpose(String taxPurpose) {
467 this.taxPurpose = taxPurpose;
468 }
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486 public String toString() {
487 ToStringBuilder toString = new ToStringBuilder(this);
488 toString.append("subTotalAmount", getSubTotalAmount());
489 toString.append("subTotalAmountCurrency", getSubTotalAmountCurrency());
490 toString.append("taxAmount", getTaxAmount());
491 toString.append("taxAmountCurrency", getTaxAmountCurrency());
492
493
494 toString.append("taxDescription", getTaxDescription());
495 toString.append("taxPercentageRate", getTaxPercentageRate());
496 toString.append("taxPurpose", getTaxPurpose());
497 toString.append("taxCategory", getTaxCategory());
498 toString.append("specialHandlingAmount", getSpecialHandlingAmount());
499 toString.append("specialHandlingAmountCurrency", getSpecialHandlingAmountCurrency());
500 toString.append("specialHandlingAmountDescription", getSpecialHandlingAmountDescription());
501 toString.append("shippingAmount", getShippingAmount());
502 toString.append("shippingAmountCurrency", getShippingAmountCurrency());
503 toString.append("grossAmount", getGrossAmount());
504 toString.append("grossAmountCurrency", getGrossAmountCurrency());
505 toString.append("discountAmount", getDiscountAmount());
506 toString.append("discountAmountCurrency", getDiscountAmountCurrency());
507 toString.append("netAmount", getNetAmount());
508 toString.append("netAmountCurrency", getNetAmountCurrency());
509 toString.append("depositAmount", getDepositAmount());
510 toString.append("depositAmountCurrency", getDepositAmountCurrency());
511 toString.append("dueAmount", getDueAmount());
512 toString.append("dueAmountCurrency", getDueAmountCurrency());
513
514 return toString.toString();
515 }
516
517 }