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