1 package org.kuali.ole.select.form;
2
3 import java.util.HashMap;
4 import java.util.Map;
5
6 import org.kuali.ole.select.document.OleInvoiceDocument;
7 import org.kuali.rice.krad.web.form.TransactionalDocumentFormBase;
8
9
10
11
12
13
14
15
16 public class OLEInvoiceForm extends TransactionalDocumentFormBase {
17
18 private String sfcFailRouteMsg;
19 private String sfcFailApproveMsg;
20 private String itemLimit;
21
22 private String validationMessage;
23 private String validationFlag;
24 private String subscriptionValidationMessage;
25 private String blanketApproveSubscriptionDateValidationFlag;
26 private String subscriptionDateValidationMessage;
27 private String subscriptionDateValidationFlag;
28
29 private String duplicationMessage;
30 private String duplicationApproveMessage;
31
32 private boolean filterProcessItems = true;
33 private Boolean filterAdditionalCharges;
34
35 private String pageNumber;
36 private String selectRowDetails;
37 private boolean showSelectedRowDetails;
38
39 public String getSubscriptionDateValidationFlag() {
40 return subscriptionDateValidationFlag;
41 }
42
43 public void setSubscriptionDateValidationFlag(String subscriptionDateValidationFlag) {
44 this.subscriptionDateValidationFlag = subscriptionDateValidationFlag;
45 }
46
47 private String amountExceedsMessage;
48 private String amountExceedsMesgForBlankApp;
49
50 public String getSubscriptionDateValidationMessage() {
51 return subscriptionDateValidationMessage;
52 }
53
54 public void setSubscriptionDateValidationMessage(String subscriptionDateValidationMessage) {
55 this.subscriptionDateValidationMessage = subscriptionDateValidationMessage;
56 }
57
58 public String getSubscriptionValidationMessage() {
59 return subscriptionValidationMessage;
60 }
61
62 public void setSubscriptionValidationMessage(String subscriptionValidationMessage) {
63 this.subscriptionValidationMessage = subscriptionValidationMessage;
64 }
65
66 public String getBlanketApproveSubscriptionDateValidationFlag() {
67 return blanketApproveSubscriptionDateValidationFlag;
68 }
69
70 public void setBlanketApproveSubscriptionDateValidationFlag(String blanketApproveSubscriptionDateValidationFlag) {
71 this.blanketApproveSubscriptionDateValidationFlag = blanketApproveSubscriptionDateValidationFlag;
72 }
73
74 public String getAmountExceedsMesgForBlankApp() {
75 return amountExceedsMesgForBlankApp;
76 }
77
78 public void setAmountExceedsMesgForBlankApp(String amountExceedsMesgForBlankApp) {
79 this.amountExceedsMesgForBlankApp = amountExceedsMesgForBlankApp;
80 }
81
82 public String getAmountExceedsMessage() {
83 return amountExceedsMessage;
84 }
85
86 public void setAmountExceedsMessage(String amountExceedsMessage) {
87 this.amountExceedsMessage = amountExceedsMessage;
88 }
89
90 public OLEInvoiceForm() {
91 super();
92 }
93
94 @Override
95 protected String getDefaultDocumentTypeName() {
96 return "OLE_PRQS";
97 }
98
99 public String getSfcFailRouteMsg() {
100 return sfcFailRouteMsg;
101 }
102
103 public void setSfcFailRouteMsg(String sfcFailRouteMsg) {
104 this.sfcFailRouteMsg = sfcFailRouteMsg;
105 }
106
107 public String getSfcFailApproveMsg() {
108 return sfcFailApproveMsg;
109 }
110
111 public void setSfcFailApproveMsg(String sfcFailApproveMsg) {
112 this.sfcFailApproveMsg = sfcFailApproveMsg;
113 }
114
115 public String getItemLimit() {
116 return itemLimit;
117 }
118
119 public void setItemLimit(String itemLimit) {
120 this.itemLimit = itemLimit;
121 }
122
123 public String getValidationMessage() {
124 return validationMessage;
125 }
126
127 public void setValidationMessage(String validationMessage) {
128 this.validationMessage = validationMessage;
129 }
130
131 public String getValidationFlag() {
132 return validationFlag;
133 }
134
135 public void setValidationFlag(String validationFlag) {
136 this.validationFlag = validationFlag;
137 }
138
139
140
141
142
143 public String getDuplicationMessage() {
144 return duplicationMessage;
145 }
146
147
148
149
150
151 public void setDuplicationMessage(String duplicationMessage) {
152 this.duplicationMessage = duplicationMessage;
153 }
154
155 public String getDuplicationApproveMessage() {
156 return duplicationApproveMessage;
157 }
158
159 public void setDuplicationApproveMessage(String duplicationApproveMessage) {
160 this.duplicationApproveMessage = duplicationApproveMessage;
161 }
162
163 public boolean isFilterProcessItems() {
164 return filterProcessItems;
165 }
166
167 public void setFilterProcessItems(boolean filterProcessItems) {
168 this.filterProcessItems = filterProcessItems;
169 }
170
171 public boolean isFilterAdditionalCharges() {
172 if (filterAdditionalCharges == null) {
173 OleInvoiceDocument doc = (OleInvoiceDocument) getDocument();
174 filterAdditionalCharges = doc == null ? true : !doc.isAdditionalChargesFlag();
175 }
176 return filterAdditionalCharges;
177 }
178
179 public void setFilterAdditionalCharges(boolean filterAdditionalCharges) {
180 this.filterAdditionalCharges = filterAdditionalCharges;
181 }
182
183 public boolean isFilterRequisition() {
184 Map<String, Object> ext = getExtensionData();
185 for (String k : ext.keySet())
186 if (k != null && k.startsWith("requisition"))
187 return false;
188 return true;
189 }
190
191 public boolean showRequisition(String id) {
192 return Boolean.TRUE.equals(getExtensionData().get("requisition" + id));
193 }
194
195 public void setShowRequisitionFor(String id) {
196 Map<String, Object> ext = getExtensionData();
197 synchronized (ext) {
198 ext.put("requisition" + id, Boolean.TRUE);
199 }
200 }
201
202 public void setHideRequisitionFor(String id) {
203 Map<String, Object> ext = getExtensionData();
204 synchronized (ext) {
205 ext.remove("requisition" + id);
206 }
207 }
208
209 public boolean isFilterLineItemReceiving() {
210 Map<String, Object> ext = getExtensionData();
211 for (String k : ext.keySet())
212 if (k != null && k.startsWith("LineItemReceiving"))
213 return false;
214 return true;
215 }
216
217 public boolean showLineItemReceiving(String id) {
218 return Boolean.TRUE.equals(getExtensionData().get("LineItemReceiving" + id));
219 }
220
221 public void setShowLineItemReceivingFor(String id) {
222 Map<String, Object> ext = getExtensionData();
223 synchronized (ext) {
224 ext.put("LineItemReceiving" + id, Boolean.TRUE);
225 }
226 }
227
228 public void setHideLineItemReceivingFor(String id) {
229 Map<String, Object> ext = getExtensionData();
230 synchronized (ext) {
231 ext.remove("LineItemReceiving" + id);
232 }
233 }
234
235 public boolean isFilterCorrection() {
236 Map<String, Object> ext = getExtensionData();
237 for (String k : ext.keySet())
238 if (k != null && k.startsWith("Correction"))
239 return false;
240 return true;
241 }
242
243 public boolean showCorrection(String id) {
244 return Boolean.TRUE.equals(getExtensionData().get("Correction" + id));
245 }
246
247 public void setShowCorrectionFor(String id) {
248 Map<String, Object> ext = getExtensionData();
249 synchronized (ext) {
250 ext.put("Correction" + id, Boolean.TRUE);
251 }
252 }
253
254 public void setHideCorrectionFor(String id) {
255 Map<String, Object> ext = getExtensionData();
256 synchronized (ext) {
257 ext.remove("Correction" + id);
258 }
259 }
260
261 public boolean isFilterPaymentRequest() {
262 Map<String, Object> ext = getExtensionData();
263 for (String k : ext.keySet())
264 if (k != null && k.startsWith("PaymentRequest"))
265 return false;
266 return true;
267 }
268
269 public boolean showPaymentRequest(String id) {
270 return Boolean.TRUE.equals(getExtensionData().get("PaymentRequest" + id));
271 }
272
273 public void setShowPaymentRequestFor(String id) {
274 Map<String, Object> ext = getExtensionData();
275 synchronized (ext) {
276 ext.put("PaymentRequest" + id, Boolean.TRUE);
277 }
278 }
279
280 public void setHidePaymentRequestFor(String id) {
281 Map<String, Object> ext = getExtensionData();
282 synchronized (ext) {
283 ext.remove("PaymentRequest" + id);
284 }
285 }
286
287 public boolean isFilterCreditMemo() {
288 Map<String, Object> ext = getExtensionData();
289 for (String k : ext.keySet())
290 if (k != null && k.startsWith("CreditMemo"))
291 return false;
292 return true;
293 }
294
295 public boolean showCreditMemo(String id) {
296 return Boolean.TRUE.equals(getExtensionData().get("CreditMemo" + id));
297 }
298
299 public void setShowCreditMemoFor(String id) {
300 Map<String, Object> ext = getExtensionData();
301 synchronized (ext) {
302 ext.put("CreditMemo" + id, Boolean.TRUE);
303 }
304 }
305
306 public void setHideCreditMemoFor(String id) {
307 Map<String, Object> ext = getExtensionData();
308 synchronized (ext) {
309 ext.remove("CreditMemo" + id);
310 }
311 }
312
313 public String getPageNumber() {
314 return pageNumber;
315 }
316
317 public void setPageNumber(String pageNumber) {
318 this.pageNumber = pageNumber;
319 }
320
321 public String getSelectRowDetails() {
322 return selectRowDetails;
323 }
324
325 public void setSelectRowDetails(String selectRowDetails) {
326 this.selectRowDetails = selectRowDetails;
327 }
328
329 public boolean isShowSelectedRowDetails() {
330 return showSelectedRowDetails;
331 }
332
333 public void setShowSelectedRowDetails(boolean showSelectedRowDetails) {
334 this.showSelectedRowDetails = showSelectedRowDetails;
335 }
336
337 }
338