1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.kuali.ole.module.purap.businessobject;
21
22 import org.kuali.ole.module.purap.document.ElectronicInvoiceRejectDocument;
23 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
24
25 import java.math.BigDecimal;
26 import java.util.LinkedHashMap;
27
28
29 public class ElectronicInvoiceRejectItem extends PersistableBusinessObjectBase {
30
31
32 private Integer invoiceRejectItemIdentifier;
33 private Integer purapDocumentIdentifier;
34
35 private Integer invoiceItemLineNumber;
36 private BigDecimal invoiceItemQuantity;
37 private String invoiceItemUnitOfMeasureCode;
38 private String invoiceItemCatalogNumber;
39
40 private String invoiceItemUnitPriceCurrencyCode;
41 private String invoiceItemSubTotalCurrencyCode;
42 private String invoiceItemSpecialHandlingCurrencyCode;
43 private String invoiceItemShippingCurrencyCode;
44 private String invoiceItemShippingDescription;
45 private String invoiceItemTaxCurrencyCode;
46 private String invoiceItemTaxDescription;
47 private String invoiceItemGrossCurrencyCode;
48 private String invoiceItemDiscountCurrencyCode;
49 private String invoiceItemNetCurrencyCode;
50
51 private BigDecimal invoiceItemUnitPrice;
52 private BigDecimal invoiceItemSubTotalAmount;
53 private BigDecimal invoiceItemSpecialHandlingAmount;
54 private BigDecimal invoiceItemShippingAmount;
55 private BigDecimal invoiceItemTaxAmount;
56 private BigDecimal invoiceItemGrossAmount;
57 private BigDecimal invoiceItemDiscountAmount;
58 private BigDecimal invoiceItemNetAmount;
59
60 private Integer invoiceReferenceItemLineNumber;
61 private String invoiceReferenceItemSerialNumber;
62 private String invoiceReferenceItemSupplierPartIdentifier;
63 private String invoiceReferenceItemSupplierPartAuxiliaryIdentifier;
64 private String invoiceReferenceItemDescription;
65 private String invoiceReferenceItemManufacturerPartIdentifier;
66 private String invoiceReferenceItemManufacturerName;
67 private String invoiceReferenceItemCountryCode;
68 private String invoiceReferenceItemCountryName;
69
70 private boolean unitOfMeasureAcceptIndicator = false;
71 private boolean catalogNumberAcceptIndicator = false;
72
73 private ElectronicInvoiceRejectDocument electronicInvoiceRejectDocument;
74
75
76
77
78
79 public ElectronicInvoiceRejectItem() {
80 super();
81 }
82
83
84
85
86 public ElectronicInvoiceRejectItem(ElectronicInvoiceRejectDocument electronicInvoiceRejectDocument, ElectronicInvoiceItem eii) {
87 super();
88
89 this.electronicInvoiceRejectDocument = electronicInvoiceRejectDocument;
90 try {
91 this.invoiceItemLineNumber = new Integer(Integer.parseInt(eii.getInvoiceLineNumber()));
92 } catch (NumberFormatException n) {
93 this.invoiceItemLineNumber = null;
94 }
95 this.invoiceItemCatalogNumber = eii.getCatalogNumber();
96 this.invoiceItemQuantity = eii.getInvoiceLineQuantityBigDecimal();
97 this.invoiceItemUnitOfMeasureCode = eii.getUnitOfMeasure();
98 this.invoiceReferenceItemLineNumber = eii.getReferenceLineNumberInteger();
99 this.invoiceReferenceItemSerialNumber = eii.getReferenceSerialNumber();
100 this.invoiceReferenceItemSupplierPartIdentifier = eii.getReferenceItemIDSupplierPartID();
101 this.invoiceReferenceItemSupplierPartAuxiliaryIdentifier = eii.getReferenceItemIDSupplierPartAuxID();
102 this.invoiceReferenceItemDescription = eii.getReferenceDescription();
103 this.invoiceReferenceItemManufacturerPartIdentifier = eii.getReferenceManufacturerPartID();
104 this.invoiceReferenceItemManufacturerName = eii.getReferenceManufacturerName();
105 this.invoiceReferenceItemCountryCode = eii.getReferenceCountryCode();
106 this.invoiceReferenceItemCountryName = eii.getReferenceCountryName();
107
108 this.invoiceItemUnitPriceCurrencyCode = eii.getUnitPriceCurrency();
109 this.invoiceItemSubTotalCurrencyCode = eii.getSubTotalAmountCurrency();
110 this.invoiceItemSpecialHandlingCurrencyCode = eii.getInvoiceLineSpecialHandlingAmountCurrency();
111 this.invoiceItemShippingCurrencyCode = eii.getInvoiceLineShippingAmountCurrency();
112 this.invoiceItemShippingDescription = eii.getInvoiceLineShippingDescription();
113 this.invoiceItemTaxCurrencyCode = eii.getTaxAmountCurrency();
114 this.invoiceItemTaxDescription = eii.getTaxDescription();
115 this.invoiceItemGrossCurrencyCode = eii.getInvoiceLineGrossAmountCurrency();
116 this.invoiceItemDiscountCurrencyCode = eii.getInvoiceLineDiscountAmountCurrency();
117 this.invoiceItemNetCurrencyCode = eii.getInvoiceLineNetAmountCurrency();
118
119 this.invoiceItemUnitPrice = eii.getInvoiceLineUnitCostBigDecimal();
120 this.invoiceItemSubTotalAmount = eii.getInvoiceLineSubTotalAmountBigDecimal();
121 this.invoiceItemSpecialHandlingAmount = eii.getInvoiceLineSpecialHandlingAmountBigDecimal();
122 this.invoiceItemShippingAmount = eii.getInvoiceLineShippingAmountBigDecimal();
123 this.invoiceItemTaxAmount = eii.getInvoiceLineTaxAmountBigDecimal();
124 this.invoiceItemGrossAmount = eii.getInvoiceLineGrossAmountBigDecimal();
125 this.invoiceItemDiscountAmount = eii.getInvoiceLineDiscountAmountBigDecimal();
126 this.invoiceItemNetAmount = eii.getInvoiceLineNetAmountBigDecimal();
127
128
129 if (((eii.getSubTotalAmount() == null) || ("".equals(eii.getSubTotalAmount())))) {
130
131 if (((this.invoiceItemQuantity != null) && ((BigDecimal.ZERO.compareTo(this.invoiceItemQuantity)) != 0)) && ((this.invoiceItemUnitPrice != null) && ((BigDecimal.ZERO.compareTo(this.invoiceItemUnitPrice)) != 0))) {
132
133 this.invoiceItemSubTotalAmount = this.invoiceItemQuantity.multiply(this.invoiceItemUnitPrice);
134 } else if (((this.invoiceItemQuantity == null) || ("".equals(this.invoiceItemQuantity))) && ((this.invoiceItemUnitPrice != null) && ((BigDecimal.ZERO.compareTo(this.invoiceItemUnitPrice)) != 0))) {
135
136 this.invoiceItemSubTotalAmount = this.invoiceItemUnitPrice;
137 } else {
138 this.invoiceItemSubTotalAmount = null;
139 }
140 } else {
141 this.invoiceItemSubTotalAmount = eii.getInvoiceLineSubTotalAmountBigDecimal();
142 }
143 }
144
145
146 public Integer getPurapDocumentIdentifier() {
147 return purapDocumentIdentifier;
148 }
149
150 public void setPurapDocumentIdentifier(Integer purapDocumentIdentifier) {
151 this.purapDocumentIdentifier = purapDocumentIdentifier;
152 }
153
154
155
156
157 public ElectronicInvoiceRejectDocument getElectronicInvoiceRejectDocument() {
158 return electronicInvoiceRejectDocument;
159 }
160
161
162
163
164
165 public void setElectronicInvoiceRejectDocument(ElectronicInvoiceRejectDocument electronicInvoiceRejectDocument) {
166 this.electronicInvoiceRejectDocument = electronicInvoiceRejectDocument;
167 }
168
169
170
171
172 public Integer getInvoiceRejectItemIdentifier() {
173 return invoiceRejectItemIdentifier;
174 }
175
176
177
178
179 public void setInvoiceRejectItemIdentifier(Integer id) {
180 this.invoiceRejectItemIdentifier = id;
181 }
182
183
184
185
186 public String getInvoiceItemCatalogNumber() {
187 return invoiceItemCatalogNumber;
188 }
189
190
191
192
193 public void setInvoiceItemCatalogNumber(String invoiceCatalogNumber) {
194 this.invoiceItemCatalogNumber = invoiceCatalogNumber;
195 }
196
197
198
199
200 public BigDecimal getInvoiceItemDiscountAmount() {
201 return invoiceItemDiscountAmount;
202 }
203
204
205
206
207 public void setInvoiceItemDiscountAmount(BigDecimal invoiceDiscountAmount) {
208 this.invoiceItemDiscountAmount = invoiceDiscountAmount;
209 }
210
211
212
213
214 public String getInvoiceItemDiscountCurrencyCode() {
215 return invoiceItemDiscountCurrencyCode;
216 }
217
218
219
220
221
222 public void setInvoiceItemDiscountCurrencyCode(String invoiceDiscountCurrencyCode) {
223 this.invoiceItemDiscountCurrencyCode = invoiceDiscountCurrencyCode;
224 }
225
226
227
228
229 public BigDecimal getInvoiceItemGrossAmount() {
230 return invoiceItemGrossAmount;
231 }
232
233
234
235
236 public void setInvoiceItemGrossAmount(BigDecimal invoiceGrossAmount) {
237 this.invoiceItemGrossAmount = invoiceGrossAmount;
238 }
239
240
241
242
243 public String getInvoiceItemGrossCurrencyCode() {
244 return invoiceItemGrossCurrencyCode;
245 }
246
247
248
249
250 public void setInvoiceItemGrossCurrencyCode(String invoiceGrossCurrencyCode) {
251 this.invoiceItemGrossCurrencyCode = invoiceGrossCurrencyCode;
252 }
253
254
255
256
257 public BigDecimal getInvoiceItemQuantity() {
258 return invoiceItemQuantity;
259 }
260
261
262
263
264 public void setInvoiceItemQuantity(BigDecimal invoiceItemQuantity) {
265 this.invoiceItemQuantity = invoiceItemQuantity;
266 }
267
268
269
270
271 public String getInvoiceItemUnitOfMeasureCode() {
272 return invoiceItemUnitOfMeasureCode;
273 }
274
275
276
277
278 public void setInvoiceItemUnitOfMeasureCode(String invoiceItemUnitOfMeasureCode) {
279 this.invoiceItemUnitOfMeasureCode = invoiceItemUnitOfMeasureCode;
280 }
281
282
283
284
285 public BigDecimal getInvoiceItemNetAmount() {
286 BigDecimal returnValue = this.getInvoiceItemSubTotalAmount();
287
288 if (returnValue != null) {
289 if (this.getInvoiceItemShippingAmount() != null) {
290 returnValue = returnValue.add(this.getInvoiceItemShippingAmount());
291 }
292
293 if (this.getInvoiceItemSpecialHandlingAmount() != null) {
294 returnValue = returnValue.add(this.getInvoiceItemSpecialHandlingAmount());
295 }
296
297 if (this.getInvoiceItemTaxAmount() != null) {
298 returnValue = returnValue.add(this.getInvoiceItemTaxAmount());
299 }
300
301 this.invoiceItemGrossAmount = returnValue;
302
303 if (this.getInvoiceItemDiscountAmount() != null) {
304 returnValue = returnValue.subtract(this.getInvoiceItemDiscountAmount());
305 }
306 returnValue = returnValue.setScale(4, BigDecimal.ROUND_HALF_UP);
307
308 } else {
309 returnValue = null;
310 }
311
312 this.invoiceItemNetAmount = returnValue;
313
314 return this.invoiceItemNetAmount;
315 }
316
317
318
319
320 public void setInvoiceItemNetAmount(BigDecimal invoiceNetAmount) {
321 this.invoiceItemNetAmount = invoiceNetAmount;
322 }
323
324
325
326
327 public String getInvoiceItemNetCurrencyCode() {
328 return invoiceItemNetCurrencyCode;
329 }
330
331
332
333
334 public void setInvoiceItemNetCurrencyCode(String invoiceNetCurrencyCode) {
335 this.invoiceItemNetCurrencyCode = invoiceNetCurrencyCode;
336 }
337
338
339
340
341 public BigDecimal getInvoiceItemShippingAmount() {
342 return invoiceItemShippingAmount;
343 }
344
345
346
347
348 public void setInvoiceItemShippingAmount(BigDecimal invoiceShippingAmount) {
349 this.invoiceItemShippingAmount = invoiceShippingAmount;
350 }
351
352
353
354
355 public String getInvoiceItemShippingCurrencyCode() {
356 return invoiceItemShippingCurrencyCode;
357 }
358
359
360
361
362
363 public void setInvoiceItemShippingCurrencyCode(String invoiceShippingCurrencyCode) {
364 this.invoiceItemShippingCurrencyCode = invoiceShippingCurrencyCode;
365 }
366
367
368
369
370 public String getInvoiceItemShippingDescription() {
371 return invoiceItemShippingDescription;
372 }
373
374
375
376
377 public void setInvoiceItemShippingDescription(String invoiceShippingDescription) {
378 this.invoiceItemShippingDescription = invoiceShippingDescription;
379 }
380
381
382
383
384 public BigDecimal getInvoiceItemSpecialHandlingAmount() {
385 return invoiceItemSpecialHandlingAmount;
386 }
387
388
389
390
391
392 public void setInvoiceItemSpecialHandlingAmount(BigDecimal invoiceSpecialHandlingAmount) {
393 this.invoiceItemSpecialHandlingAmount = invoiceSpecialHandlingAmount;
394 }
395
396
397
398
399 public String getInvoiceItemSpecialHandlingCurrencyCode() {
400 return invoiceItemSpecialHandlingCurrencyCode;
401 }
402
403
404
405
406
407 public void setInvoiceItemSpecialHandlingCurrencyCode(String invoiceSpecialHandlingCurrencyCode) {
408 this.invoiceItemSpecialHandlingCurrencyCode = invoiceSpecialHandlingCurrencyCode;
409 }
410
411
412
413
414 public BigDecimal getInvoiceItemSubTotalAmount() {
415
416 BigDecimal returnValue;
417 if (((this.invoiceItemQuantity != null) && ((BigDecimal.ZERO.compareTo(this.invoiceItemQuantity)) != 0)) && ((this.invoiceItemUnitPrice != null) && ((BigDecimal.ZERO.compareTo(this.invoiceItemUnitPrice)) != 0))) {
418
419 returnValue = this.invoiceItemQuantity.multiply(this.invoiceItemUnitPrice);
420 } else if (((this.invoiceItemQuantity == null) || ("".equals(this.invoiceItemQuantity))) && ((this.invoiceItemUnitPrice != null) && ((BigDecimal.ZERO.compareTo(this.invoiceItemUnitPrice)) != 0))) {
421
422 returnValue = this.invoiceItemUnitPrice;
423 } else {
424 returnValue = null;
425 }
426
427 if (returnValue != null) {
428 invoiceItemSubTotalAmount = returnValue.setScale(4, BigDecimal.ROUND_HALF_UP);
429 } else {
430 invoiceItemSubTotalAmount = null;
431 }
432
433 return invoiceItemSubTotalAmount;
434 }
435
436
437
438
439 public void setInvoiceItemSubTotalAmount(BigDecimal invoiceSubTotalAmount) {
440 this.invoiceItemSubTotalAmount = invoiceSubTotalAmount;
441 }
442
443
444
445
446 public String getInvoiceItemSubTotalCurrencyCode() {
447 return invoiceItemSubTotalCurrencyCode;
448 }
449
450
451
452
453
454 public void setInvoiceItemSubTotalCurrencyCode(String invoiceSubTotalCurrencyCode) {
455 this.invoiceItemSubTotalCurrencyCode = invoiceSubTotalCurrencyCode;
456 }
457
458
459
460
461 public BigDecimal getInvoiceItemTaxAmount() {
462 return invoiceItemTaxAmount;
463 }
464
465
466
467
468 public void setInvoiceItemTaxAmount(BigDecimal invoiceTaxAmount) {
469 this.invoiceItemTaxAmount = invoiceTaxAmount;
470 }
471
472
473
474
475 public String getInvoiceItemTaxCurrencyCode() {
476 return invoiceItemTaxCurrencyCode;
477 }
478
479
480
481
482 public void setInvoiceItemTaxCurrencyCode(String invoiceTaxCurrencyCode) {
483 this.invoiceItemTaxCurrencyCode = invoiceTaxCurrencyCode;
484 }
485
486
487
488
489 public String getInvoiceItemTaxDescription() {
490 return invoiceItemTaxDescription;
491 }
492
493
494
495
496 public void setInvoiceItemTaxDescription(String invoiceTaxDescription) {
497 this.invoiceItemTaxDescription = invoiceTaxDescription;
498 }
499
500
501
502
503 public BigDecimal getInvoiceItemUnitPrice() {
504 return invoiceItemUnitPrice;
505 }
506
507
508
509
510 public void setInvoiceItemUnitPrice(BigDecimal invoiceUnitPrice) {
511 this.invoiceItemUnitPrice = invoiceUnitPrice;
512 }
513
514
515
516
517 public String getInvoiceItemUnitPriceCurrencyCode() {
518 return invoiceItemUnitPriceCurrencyCode;
519 }
520
521
522
523
524
525 public void setInvoiceItemUnitPriceCurrencyCode(String invoiceUnitPriceCurrency) {
526 this.invoiceItemUnitPriceCurrencyCode = invoiceUnitPriceCurrency;
527 }
528
529
530
531
532 public Integer getInvoiceItemLineNumber() {
533 return invoiceItemLineNumber;
534 }
535
536
537
538
539 public void setInvoiceItemLineNumber(Integer itemLineNumber) {
540 this.invoiceItemLineNumber = itemLineNumber;
541 }
542
543
544
545
546 public String getInvoiceReferenceItemCountryCode() {
547 return invoiceReferenceItemCountryCode;
548 }
549
550
551
552
553
554 public void setInvoiceReferenceItemCountryCode(String itemReferenceCountryCode) {
555 this.invoiceReferenceItemCountryCode = itemReferenceCountryCode;
556 }
557
558
559
560
561 public String getInvoiceReferenceItemCountryName() {
562 return invoiceReferenceItemCountryName;
563 }
564
565
566
567
568
569 public void setInvoiceReferenceItemCountryName(String itemReferenceCountryName) {
570 this.invoiceReferenceItemCountryName = itemReferenceCountryName;
571 }
572
573
574
575
576 public String getInvoiceReferenceItemDescription() {
577 return invoiceReferenceItemDescription;
578 }
579
580
581
582
583
584 public void setInvoiceReferenceItemDescription(String itemReferenceDescription) {
585 this.invoiceReferenceItemDescription = itemReferenceDescription;
586 }
587
588
589
590
591 public Integer getInvoiceReferenceItemLineNumber() {
592 return invoiceReferenceItemLineNumber;
593 }
594
595
596
597
598 public void setInvoiceReferenceItemLineNumber(Integer itemReferenceLineNumber) {
599 this.invoiceReferenceItemLineNumber = itemReferenceLineNumber;
600 }
601
602
603
604
605 public String getInvoiceReferenceItemManufacturerName() {
606 return invoiceReferenceItemManufacturerName;
607 }
608
609
610
611
612
613 public void setInvoiceReferenceItemManufacturerName(String itemReferenceManufacturerName) {
614 this.invoiceReferenceItemManufacturerName = itemReferenceManufacturerName;
615 }
616
617
618
619
620 public String getInvoiceReferenceItemManufacturerPartIdentifier() {
621 return invoiceReferenceItemManufacturerPartIdentifier;
622 }
623
624
625
626
627
628 public void setInvoiceReferenceItemManufacturerPartIdentifier(String itemReferenceManufacturerPartId) {
629 this.invoiceReferenceItemManufacturerPartIdentifier = itemReferenceManufacturerPartId;
630 }
631
632
633
634
635 public String getInvoiceReferenceItemSerialNumber() {
636 return invoiceReferenceItemSerialNumber;
637 }
638
639
640
641
642
643 public void setInvoiceReferenceItemSerialNumber(String itemReferenceSerialNumber) {
644 this.invoiceReferenceItemSerialNumber = itemReferenceSerialNumber;
645 }
646
647
648
649
650 public String getInvoiceReferenceItemSupplierPartAuxiliaryIdentifier() {
651 return invoiceReferenceItemSupplierPartAuxiliaryIdentifier;
652 }
653
654
655
656
657
658 public void setInvoiceReferenceItemSupplierPartAuxiliaryIdentifier(String itemReferenceSupplierPartAuxId) {
659 this.invoiceReferenceItemSupplierPartAuxiliaryIdentifier = itemReferenceSupplierPartAuxId;
660 }
661
662
663
664
665 public String getInvoiceReferenceItemSupplierPartIdentifier() {
666 return invoiceReferenceItemSupplierPartIdentifier;
667 }
668
669
670
671
672
673 public void setInvoiceReferenceItemSupplierPartIdentifier(String itemReferenceSupplierPartId) {
674 this.invoiceReferenceItemSupplierPartIdentifier = itemReferenceSupplierPartId;
675 }
676
677 public boolean isUnitOfMeasureAcceptIndicator() {
678 return unitOfMeasureAcceptIndicator;
679 }
680
681 public void setUnitOfMeasureAcceptIndicator(boolean unitOfMeasureAcceptIndicator) {
682 this.unitOfMeasureAcceptIndicator = unitOfMeasureAcceptIndicator;
683 }
684
685 public boolean isCatalogNumberAcceptIndicator() {
686 return catalogNumberAcceptIndicator;
687 }
688
689 public void setCatalogNumberAcceptIndicator(boolean catalogNumberAcceptIndicator) {
690 this.catalogNumberAcceptIndicator = catalogNumberAcceptIndicator;
691 }
692
693
694
695
696 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
697 LinkedHashMap m = new LinkedHashMap();
698 m.put("invoiceRejectItemIdentifier", this.invoiceRejectItemIdentifier);
699 return m;
700 }
701 }