1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.select.document.web.struts;
17
18 import org.kuali.ole.fp.document.service.DisbursementVoucherCoverSheetService;
19 import org.kuali.ole.fp.document.web.struts.DisbursementVoucherForm;
20 import org.kuali.ole.select.businessobject.OleDisbursementVoucherPayeeDetail;
21 import org.kuali.ole.select.document.OleDisbursementVoucherDocument;
22 import org.kuali.ole.sys.context.SpringContext;
23 import org.kuali.rice.kns.service.BusinessObjectDictionaryService;
24
25 import javax.servlet.http.HttpServletRequest;
26
27 public class OleDisbursementVoucherForm extends DisbursementVoucherForm {
28
29
30
31
32 public OleDisbursementVoucherForm() {
33 super();
34 }
35
36
37
38
39 @Override
40 public void populate(HttpServletRequest request) {
41 super.populate(request);
42 OleDisbursementVoucherPayeeDetail payeeDetail = getDisbursementVoucherDocument().getDvPayeeDetail();
43 SpringContext.getBean(BusinessObjectDictionaryService.class).performForceUppercase(payeeDetail);
44
45 }
46
47
48
49
50
51
52 @Override
53 public boolean getCanPrintCoverSheet() {
54 OleDisbursementVoucherDocument oleDisbursementVoucherDocument = (OleDisbursementVoucherDocument) this.getDocument();
55 return SpringContext.getBean(DisbursementVoucherCoverSheetService.class).isCoverSheetPrintable(oleDisbursementVoucherDocument);
56 }
57
58
59
60
61 @Override
62 public OleDisbursementVoucherDocument getDisbursementVoucherDocument() {
63 return (OleDisbursementVoucherDocument) getDocument();
64
65 }
66
67
68
69
70 @Override
71 public boolean isEmployee() {
72 OleDisbursementVoucherDocument oleDisbursementVoucherDocument = (OleDisbursementVoucherDocument) this.getDocument();
73 return oleDisbursementVoucherDocument.getDvPayeeDetail().isEmployee();
74 }
75
76
77
78
79 @Override
80 public boolean isVendor() {
81 OleDisbursementVoucherDocument oleDisbursementVoucherDocument = (OleDisbursementVoucherDocument) this.getDocument();
82 return oleDisbursementVoucherDocument.getDvPayeeDetail().isVendor();
83 }
84 }