1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.module.purap.document.validation.impl;
17
18
19 import org.kuali.ole.module.purap.PurapConstants;
20 import org.kuali.ole.module.purap.document.PurchasingAccountsPayableDocument;
21 import org.kuali.rice.krad.document.Document;
22
23
24
25
26 public class RequisitionDocumentPreRules extends PurchasingDocumentPreRulesBase {
27
28
29
30
31 @Override
32 public boolean doPrompts(Document document) {
33 boolean preRulesOK = super.doPrompts(document);
34
35 PurchasingAccountsPayableDocument purapDocument = (PurchasingAccountsPayableDocument) document;
36
37 if (!purapDocument.isUseTaxIndicator()) {
38 preRulesOK &= checkForTaxRecalculation(purapDocument);
39 }
40
41 return preRulesOK;
42 }
43
44 @Override
45 protected boolean checkCAMSWarningStatus(PurchasingAccountsPayableDocument purapDocument) {
46 return PurapConstants.CAMSWarningStatuses.REQUISITION_STATUS_WARNING_NO_CAMS_DATA.contains(purapDocument.getApplicationDocumentStatus());
47 }
48
49 }