1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.kuali.ole.fp.businessobject;
18
19 import java.sql.Timestamp;
20 import java.text.ParseException;
21 import java.util.ArrayList;
22 import java.util.Iterator;
23 import java.util.LinkedHashMap;
24 import java.util.List;
25
26 import org.kuali.ole.sys.OLEPropertyConstants;
27 import org.kuali.ole.sys.context.SpringContext;
28 import org.kuali.rice.core.api.datetime.DateTimeService;
29 import org.kuali.rice.core.api.util.type.KualiDecimal;
30 import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
31 import org.kuali.rice.krad.util.ObjectUtils;
32
33
34
35
36 public class DisbursementVoucherNonEmployeeTravel extends PersistableBusinessObjectBase {
37
38 private String documentNumber;
39 private String disbVchrTravelFromCityName;
40 private String disbVchrTravelFromStateCode;
41 private String dvTravelFromCountryCode;
42 private String disbVchrTravelToCityName;
43 private String disbVchrTravelToStateCode;
44 private String disbVchrTravelToCountryCode;
45 private Timestamp dvPerdiemStartDttmStamp;
46 private Timestamp dvPerdiemEndDttmStamp;
47 private KualiDecimal disbVchrPerdiemCalculatedAmt;
48 private KualiDecimal disbVchrPerdiemActualAmount;
49 private String dvPerdiemChangeReasonText;
50 private String disbVchrServicePerformedDesc;
51 private String dvServicePerformedLocName;
52 private String dvServiceRegularEmprName;
53 private String disbVchrAutoFromCityName;
54 private String disbVchrAutoFromStateCode;
55 private String disbVchrAutoToCityName;
56 private String disbVchrAutoToStateCode;
57 private boolean disbVchrAutoRoundTripCode;
58 private Integer dvPersonalCarMileageAmount;
59 private KualiDecimal disbVchrPersonalCarRate;
60 private KualiDecimal disbVchrPersonalCarAmount;
61 private boolean disbVchrExceptionCode;
62 private Integer financialDocumentNextLineNbr;
63 private String disbVchrNonEmpTravelerName;
64 private KualiDecimal disbVchrPerdiemRate;
65 private String disbVchrPerdiemCategoryName;
66 private KualiDecimal disbVchrMileageCalculatedAmt;
67
68 private KualiDecimal totalTravelAmount;
69
70 private List dvNonEmployeeExpenses;
71 private List dvPrePaidEmployeeExpenses;
72
73
74
75
76 public DisbursementVoucherNonEmployeeTravel() {
77 dvNonEmployeeExpenses = new ArrayList<DisbursementVoucherNonEmployeeExpense>();
78 dvPrePaidEmployeeExpenses = new ArrayList<DisbursementVoucherNonEmployeeExpense>();
79 financialDocumentNextLineNbr = new Integer(1);
80 }
81
82
83
84
85
86
87 public String getDocumentNumber() {
88 return documentNumber;
89 }
90
91
92
93
94
95
96
97 public void setDocumentNumber(String documentNumber) {
98 this.documentNumber = documentNumber;
99 }
100
101
102
103
104
105
106 public String getDisbVchrTravelFromCityName() {
107 return disbVchrTravelFromCityName;
108 }
109
110
111
112
113
114
115
116 public void setDisbVchrTravelFromCityName(String disbVchrTravelFromCityName) {
117 this.disbVchrTravelFromCityName = disbVchrTravelFromCityName;
118 }
119
120
121
122
123
124
125 public String getDisbVchrTravelFromStateCode() {
126 return disbVchrTravelFromStateCode;
127 }
128
129
130
131
132
133
134
135 public void setDisbVchrTravelFromStateCode(String disbVchrTravelFromStateCode) {
136 this.disbVchrTravelFromStateCode = disbVchrTravelFromStateCode;
137 }
138
139
140
141
142
143
144 public String getDvTravelFromCountryCode() {
145 return dvTravelFromCountryCode;
146 }
147
148
149
150
151
152
153
154 public void setDvTravelFromCountryCode(String dvTravelFromCountryCode) {
155 this.dvTravelFromCountryCode = dvTravelFromCountryCode;
156 }
157
158
159
160
161
162
163 public String getDisbVchrTravelToCityName() {
164 return disbVchrTravelToCityName;
165 }
166
167
168
169
170
171
172
173 public void setDisbVchrTravelToCityName(String disbVchrTravelToCityName) {
174 this.disbVchrTravelToCityName = disbVchrTravelToCityName;
175 }
176
177
178
179
180
181
182 public String getDisbVchrTravelToStateCode() {
183 return disbVchrTravelToStateCode;
184 }
185
186
187
188
189
190
191
192 public void setDisbVchrTravelToStateCode(String disbVchrTravelToStateCode) {
193 this.disbVchrTravelToStateCode = disbVchrTravelToStateCode;
194 }
195
196
197
198
199
200
201 public String getDisbVchrTravelToCountryCode() {
202 return disbVchrTravelToCountryCode;
203 }
204
205
206
207
208
209
210
211 public void setDisbVchrTravelToCountryCode(String disbVchrTravelToCountryCode) {
212 this.disbVchrTravelToCountryCode = disbVchrTravelToCountryCode;
213 }
214
215
216
217
218
219
220 public Timestamp getDvPerdiemStartDttmStamp() {
221 return dvPerdiemStartDttmStamp;
222 }
223
224
225
226
227
228
229
230 public void setDvPerdiemStartDttmStamp(Timestamp dvPerdiemStartDttmStamp) {
231 this.dvPerdiemStartDttmStamp = dvPerdiemStartDttmStamp;
232 }
233
234
235
236
237
238
239 public Timestamp getDvPerdiemEndDttmStamp() {
240 return dvPerdiemEndDttmStamp;
241 }
242
243
244
245
246
247
248
249 public void setDvPerdiemEndDttmStamp(Timestamp dvPerdiemEndDttmStamp) {
250 this.dvPerdiemEndDttmStamp = dvPerdiemEndDttmStamp;
251 }
252
253
254
255
256
257
258 public KualiDecimal getDisbVchrPerdiemCalculatedAmt() {
259 return disbVchrPerdiemCalculatedAmt;
260 }
261
262
263
264
265
266
267
268 public void setDisbVchrPerdiemCalculatedAmt(KualiDecimal disbVchrPerdiemCalculatedAmt) {
269 this.disbVchrPerdiemCalculatedAmt = disbVchrPerdiemCalculatedAmt;
270 }
271
272
273
274
275
276
277 public KualiDecimal getDisbVchrPerdiemActualAmount() {
278 return disbVchrPerdiemActualAmount;
279 }
280
281
282
283
284
285
286
287 public void setDisbVchrPerdiemActualAmount(KualiDecimal disbVchrPerdiemActualAmount) {
288 this.disbVchrPerdiemActualAmount = disbVchrPerdiemActualAmount;
289 }
290
291
292
293
294
295
296 public String getDvPerdiemChangeReasonText() {
297 return dvPerdiemChangeReasonText;
298 }
299
300
301
302
303
304
305
306 public void setDvPerdiemChangeReasonText(String dvPerdiemChangeReasonText) {
307 this.dvPerdiemChangeReasonText = dvPerdiemChangeReasonText;
308 }
309
310
311
312
313
314
315 public String getDisbVchrServicePerformedDesc() {
316 return disbVchrServicePerformedDesc;
317 }
318
319
320
321
322
323
324
325 public void setDisbVchrServicePerformedDesc(String disbVchrServicePerformedDesc) {
326 this.disbVchrServicePerformedDesc = disbVchrServicePerformedDesc;
327 }
328
329
330
331
332
333
334 public String getDvServicePerformedLocName() {
335 return dvServicePerformedLocName;
336 }
337
338
339
340
341
342
343
344 public void setDvServicePerformedLocName(String dvServicePerformedLocName) {
345 this.dvServicePerformedLocName = dvServicePerformedLocName;
346 }
347
348
349
350
351
352
353 public String getDvServiceRegularEmprName() {
354 return dvServiceRegularEmprName;
355 }
356
357
358
359
360
361
362
363 public void setDvServiceRegularEmprName(String dvServiceRegularEmprName) {
364 this.dvServiceRegularEmprName = dvServiceRegularEmprName;
365 }
366
367
368
369
370
371
372 public String getDisbVchrAutoFromCityName() {
373 return disbVchrAutoFromCityName;
374 }
375
376
377
378
379
380
381
382 public void setDisbVchrAutoFromCityName(String disbVchrAutoFromCityName) {
383 this.disbVchrAutoFromCityName = disbVchrAutoFromCityName;
384 }
385
386
387
388
389
390
391 public String getDisbVchrAutoFromStateCode() {
392 return disbVchrAutoFromStateCode;
393 }
394
395
396
397
398
399
400
401 public void setDisbVchrAutoFromStateCode(String disbVchrAutoFromStateCode) {
402 this.disbVchrAutoFromStateCode = disbVchrAutoFromStateCode;
403 }
404
405
406
407
408
409
410 public String getDisbVchrAutoToCityName() {
411 return disbVchrAutoToCityName;
412 }
413
414
415
416
417
418
419
420 public void setDisbVchrAutoToCityName(String disbVchrAutoToCityName) {
421 this.disbVchrAutoToCityName = disbVchrAutoToCityName;
422 }
423
424
425
426
427
428
429 public String getDisbVchrAutoToStateCode() {
430 return disbVchrAutoToStateCode;
431 }
432
433
434
435
436
437
438
439 public void setDisbVchrAutoToStateCode(String disbVchrAutoToStateCode) {
440 this.disbVchrAutoToStateCode = disbVchrAutoToStateCode;
441 }
442
443
444
445
446
447
448 public boolean getDisbVchrAutoRoundTripCode() {
449 return disbVchrAutoRoundTripCode;
450 }
451
452
453
454
455
456
457
458 public void setDisbVchrAutoRoundTripCode(boolean disbVchrAutoRoundTripCode) {
459 this.disbVchrAutoRoundTripCode = disbVchrAutoRoundTripCode;
460 }
461
462
463
464
465
466
467 public Integer getDvPersonalCarMileageAmount() {
468 return dvPersonalCarMileageAmount;
469 }
470
471
472
473
474
475
476
477 public void setDvPersonalCarMileageAmount(Integer dvPersonalCarMileageAmount) {
478 this.dvPersonalCarMileageAmount = dvPersonalCarMileageAmount;
479 }
480
481
482
483
484
485
486 public KualiDecimal getDisbVchrPersonalCarRate() {
487 return disbVchrPersonalCarRate;
488 }
489
490
491
492
493
494
495
496 public void setDisbVchrPersonalCarRate(KualiDecimal disbVchrPersonalCarRate) {
497 this.disbVchrPersonalCarRate = disbVchrPersonalCarRate;
498 }
499
500
501
502
503
504
505 public KualiDecimal getDisbVchrPersonalCarAmount() {
506 return dvPersonalCarMileageAmount == null ? null : disbVchrPersonalCarAmount;
507 }
508
509
510
511
512
513
514
515 public void setDisbVchrPersonalCarAmount(KualiDecimal disbVchrPersonalCarAmount) {
516 this.disbVchrPersonalCarAmount = disbVchrPersonalCarAmount;
517 }
518
519
520
521
522
523
524 public boolean getDisbVchrExceptionCode() {
525 return disbVchrExceptionCode;
526 }
527
528
529
530
531
532
533
534 public void setDisbVchrExceptionCode(boolean disbVchrExceptionCode) {
535 this.disbVchrExceptionCode = disbVchrExceptionCode;
536 }
537
538
539
540
541
542
543 public Integer getFinancialDocumentNextLineNbr() {
544 return financialDocumentNextLineNbr;
545 }
546
547
548
549
550
551
552
553 public void setFinancialDocumentNextLineNbr(Integer financialDocumentNextLineNbr) {
554 this.financialDocumentNextLineNbr = financialDocumentNextLineNbr;
555 }
556
557
558
559
560
561
562 public String getDisbVchrNonEmpTravelerName() {
563 return disbVchrNonEmpTravelerName;
564 }
565
566
567
568
569
570
571
572 public void setDisbVchrNonEmpTravelerName(String disbVchrNonEmpTravelerName) {
573 this.disbVchrNonEmpTravelerName = disbVchrNonEmpTravelerName;
574 }
575
576
577
578
579
580
581 public KualiDecimal getDisbVchrPerdiemRate() {
582 return disbVchrPerdiemRate;
583 }
584
585
586
587
588
589
590
591 public void setDisbVchrPerdiemRate(KualiDecimal disbVchrPerdiemRate) {
592 this.disbVchrPerdiemRate = disbVchrPerdiemRate;
593 }
594
595
596
597
598
599
600 public String getDisbVchrPerdiemCategoryName() {
601 return disbVchrPerdiemCategoryName;
602 }
603
604
605
606
607
608
609
610 public void setDisbVchrPerdiemCategoryName(String disbVchrPerdiemCategoryName) {
611 this.disbVchrPerdiemCategoryName = disbVchrPerdiemCategoryName;
612 }
613
614
615
616
617
618
619 public KualiDecimal getDisbVchrMileageCalculatedAmt() {
620 return dvPersonalCarMileageAmount == null ? null : disbVchrMileageCalculatedAmt;
621 }
622
623
624
625
626
627
628
629 public void setDisbVchrMileageCalculatedAmt(KualiDecimal disbVchrMileageCalculatedAmt) {
630 this.disbVchrMileageCalculatedAmt = disbVchrMileageCalculatedAmt;
631 }
632
633
634
635
636
637
638 public List getDvNonEmployeeExpenses() {
639 return dvNonEmployeeExpenses;
640 }
641
642
643
644
645
646
647 public void setDvNonEmployeeExpenses(List dvNonEmployeeExpenses) {
648 this.dvNonEmployeeExpenses = dvNonEmployeeExpenses;
649 }
650
651
652
653
654 public List getDvPrePaidEmployeeExpenses() {
655 return dvPrePaidEmployeeExpenses;
656 }
657
658
659
660
661 public void setDvPrePaidEmployeeExpenses(List dvPrePaidEmployeeExpenses) {
662 this.dvPrePaidEmployeeExpenses = dvPrePaidEmployeeExpenses;
663 }
664
665
666
667
668
669
670 public void addDvNonEmployeeExpenseLine(DisbursementVoucherNonEmployeeExpense line) {
671 line.setFinancialDocumentLineNumber(getFinancialDocumentNextLineNbr());
672 this.dvNonEmployeeExpenses.add(line);
673 this.financialDocumentNextLineNbr = new Integer(getFinancialDocumentNextLineNbr().intValue() + 1);
674 }
675
676
677
678
679
680
681 public void addDvPrePaidEmployeeExpenseLine(DisbursementVoucherNonEmployeeExpense line) {
682 line.setFinancialDocumentLineNumber(getFinancialDocumentNextLineNbr());
683 this.dvPrePaidEmployeeExpenses.add(line);
684 this.financialDocumentNextLineNbr = new Integer(getFinancialDocumentNextLineNbr().intValue() + 1);
685 }
686
687
688
689
690
691
692 public String getPerDiemStartDateTime() {
693 return SpringContext.getBean(DateTimeService.class).toDateTimeString(dvPerdiemStartDttmStamp);
694 }
695
696
697
698
699
700
701 public void setPerDiemStartDateTime(String perDiemStartDateTime) {
702 try {
703 this.dvPerdiemStartDttmStamp = SpringContext.getBean(DateTimeService.class).convertToSqlTimestamp(perDiemStartDateTime);
704 }
705 catch (ParseException e) {
706 this.dvPerdiemStartDttmStamp = null;
707 }
708 }
709
710
711
712
713
714
715 public String getPerDiemEndDateTime() {
716 return SpringContext.getBean(DateTimeService.class).toDateTimeString(dvPerdiemEndDttmStamp);
717 }
718
719
720
721
722
723
724 public void setPerDiemEndDateTime(String perDiemEndDateTime) {
725 try {
726 this.dvPerdiemEndDttmStamp = SpringContext.getBean(DateTimeService.class).convertToSqlTimestamp(perDiemEndDateTime);
727 }
728 catch (ParseException e) {
729 this.dvPerdiemEndDttmStamp = null;
730 }
731 }
732
733
734
735
736
737
738 public KualiDecimal getTotalPrePaidAmount() {
739 KualiDecimal totalPrePaidAmount = KualiDecimal.ZERO;
740 if (dvPrePaidEmployeeExpenses != null) {
741 for (Iterator iter = dvPrePaidEmployeeExpenses.iterator(); iter.hasNext();) {
742 DisbursementVoucherNonEmployeeExpense element = (DisbursementVoucherNonEmployeeExpense) iter.next();
743 if (ObjectUtils.isNotNull(element.getDisbVchrExpenseAmount())) {
744 totalPrePaidAmount = totalPrePaidAmount.add(element.getDisbVchrExpenseAmount());
745 }
746 }
747 }
748
749 return totalPrePaidAmount;
750 }
751
752
753
754
755
756
757 public KualiDecimal getTotalExpenseAmount() {
758 KualiDecimal totalExpenseAmount = KualiDecimal.ZERO;
759 if (dvNonEmployeeExpenses != null) {
760 for (Iterator iter = dvNonEmployeeExpenses.iterator(); iter.hasNext();) {
761 DisbursementVoucherNonEmployeeExpense element = (DisbursementVoucherNonEmployeeExpense) iter.next();
762 if (ObjectUtils.isNotNull(element.getDisbVchrExpenseAmount())) {
763 totalExpenseAmount = totalExpenseAmount.add(element.getDisbVchrExpenseAmount());
764 }
765 }
766 }
767 return totalExpenseAmount;
768 }
769
770
771
772
773
774
775 public KualiDecimal getTotalTravelAmount() {
776 KualiDecimal travelAmount = KualiDecimal.ZERO;
777
778
779 travelAmount = travelAmount.add(getTotalExpenseAmount());
780
781
782 if (disbVchrPerdiemActualAmount != null) {
783 travelAmount = travelAmount.add(disbVchrPerdiemActualAmount);
784 }
785
786 if (disbVchrPersonalCarAmount != null) {
787 travelAmount = travelAmount.add(disbVchrPersonalCarAmount);
788 }
789
790 return travelAmount;
791 }
792
793
794
795
796 public void setTotalTravelAmount(KualiDecimal totalTravelAmount) {
797 this.totalTravelAmount = totalTravelAmount;
798 }
799
800
801
802
803
804 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
805 LinkedHashMap m = new LinkedHashMap();
806 m.put(OLEPropertyConstants.DOCUMENT_NUMBER, this.documentNumber);
807 return m;
808 }
809 }