use of org.kuali.kfs.module.purap.document.AccountsPayableDocument in project cu-kfs by CU-CommunityApps.
the class CuCreditMemoDocumentPreRules method doPrompts.
@Override
public boolean doPrompts(Document document) {
boolean preRulesOK = true;
// KFSUPGRADE-779
preRulesOK &= checkWireTransferTabState((VendorCreditMemoDocument) document);
AccountsPayableDocument accountsPayableDocument = (AccountsPayableDocument) document;
// Check if the total does not match the submitted credit if the document hasn't been completed.
if (!SpringContext.getBean(PurapService.class).isFullDocumentEntryCompleted(accountsPayableDocument)) {
preRulesOK = confirmInvoiceNoMatchOverride(accountsPayableDocument);
} else if (SpringContext.getBean(PurapService.class).isFullDocumentEntryCompleted(accountsPayableDocument)) {
// if past full document entry complete, then set override to true to skip validation
accountsPayableDocument.setUnmatchedOverride(true);
}
return preRulesOK;
}
Aggregations