use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoice method reasonDisabledDueToApprovalStateIfAny.
String reasonDisabledDueToApprovalStateIfAny(final Object viewContext) {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle("Cannot modify invoice because");
reasonDisabledDueToApprovalStateIfAny(viewContext, buf);
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoice method disableEditInvoiceNumber.
public String disableEditInvoiceNumber() {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle("Cannot edit invoice number because");
final Object viewContext = this;
reasonDisabledDueToApprovalStateIfAny(viewContext, buf);
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoice method disableMergeItems.
public String disableMergeItems() {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle("Cannot merge items because");
final Object viewContext = this;
reasonDisabledDueToApprovalStateIfAny(viewContext, buf);
buf.append(() -> getItems().size() < 2, "merging needs 2 or more items");
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoice method disableChangeDates.
public String disableChangeDates() {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle("Cannot change dates because");
final Object viewContext = this;
reasonDisabledDueToApprovalStateIfAny(viewContext, buf);
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoice method disableEditSeller.
public String disableEditSeller() {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle("Cannot edit seller because");
final Object viewContext = this;
reasonDisabledDueToApprovalStateIfAny(viewContext, buf);
buf.append(this::sellerIsImmutableReason);
return buf.getReason();
}
Aggregations