Search in sources :

Example 1 with IncomingInvoiceApprovalState

use of org.estatio.module.capex.dom.invoice.approval.IncomingInvoiceApprovalState in project estatio by estatio.

the class IncomingInvoice method reasonDisabledDueToApprovalStateIfAny.

void reasonDisabledDueToApprovalStateIfAny(final Object viewContext, final ReasonBuffer2 buf) {
    final IncomingInvoiceApprovalState approvalState = getApprovalState();
    buf.append(approvalState == null, "invoice state is unknown (was migrated so assumed to be approved)");
    buf.append(approvalState == IncomingInvoiceApprovalState.COMPLETED && metaModelService3.sortOf(viewContext.getClass()) == MetaModelService2.Sort.VIEW_MODEL, "modification through view not allowed once invoice is " + approvalState);
    buf.append(approvalState != IncomingInvoiceApprovalState.NEW && approvalState != IncomingInvoiceApprovalState.COMPLETED, "invoice is in state of " + getApprovalState());
}
Also used : IncomingInvoiceApprovalState(org.estatio.module.capex.dom.invoice.approval.IncomingInvoiceApprovalState)

Aggregations

IncomingInvoiceApprovalState (org.estatio.module.capex.dom.invoice.approval.IncomingInvoiceApprovalState)1