Search in sources :

Example 1 with AccountsPayableDocument

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;
}
Also used : CuVendorCreditMemoDocument(edu.cornell.kfs.module.purap.document.CuVendorCreditMemoDocument) VendorCreditMemoDocument(org.kuali.kfs.module.purap.document.VendorCreditMemoDocument) AccountsPayableDocument(org.kuali.kfs.module.purap.document.AccountsPayableDocument)

Aggregations

CuVendorCreditMemoDocument (edu.cornell.kfs.module.purap.document.CuVendorCreditMemoDocument)1 AccountsPayableDocument (org.kuali.kfs.module.purap.document.AccountsPayableDocument)1 VendorCreditMemoDocument (org.kuali.kfs.module.purap.document.VendorCreditMemoDocument)1