use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoiceItem method fixedAssetIsImmutableReason.
String fixedAssetIsImmutableReason() {
// nb: dimensions *are* allowed to change irrespective of state,
// so we don't check IncomingInvoice#isImmutableDueToState()
final ReasonBuffer2 buf = ReasonBuffer2.forAll("Fixed asset cannot be changed because");
appendReasonIfReversalOrReported(buf);
appendReasonIfLinkedToAnOrder(buf);
appendReasonIfLinkedToABudget(buf);
appendReasonIfLinkedToAProject(buf);
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoiceItem method periodIsImmutableReason.
String periodIsImmutableReason() {
// nb: dimensions *are* allowed to change irrespective of state,
// so we don't check IncomingInvoice#isImmutableDueToState()
final ReasonBuffer2 buf = ReasonBuffer2.forAll("Period cannot be changed because");
appendReasonIfReversalOrReported(buf);
appendReasonIfLinkedToABudget(buf);
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoiceItem method neitherReversalNorReported.
boolean neitherReversalNorReported() {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle();
appendReasonIfReversalOrReported(buf);
return buf.getReason() == null;
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoiceItem method budgetItemIsImmutableReason.
String budgetItemIsImmutableReason() {
// nb: dimensions *are* allowed to change irrespective of state,
// so we don't check IncomingInvoice#isImmutableDueToState()
final ReasonBuffer2 buf = ReasonBuffer2.forAll("Budget item cannot be changed because");
appendReasonIfReversalOrReported(buf);
buf.append(!hasType(IncomingInvoiceType.SERVICE_CHARGES), "parent invoice is not for service charges");
appendReasonIfLinkedToAnOrder(buf);
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoiceItem method disableEditDescription.
public String disableEditDescription() {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle("Cannot edit description because");
appendReasonIfReversalOrReportedOrApprovalState(buf);
return buf.getReason();
}
Aggregations