use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class OrderItem method itemImmutableReasonIfIsImmutable.
private String itemImmutableReasonIfIsImmutable() {
final ReasonBuffer2 buf = ReasonBuffer2.forSingle();
itemImmutableIfLinkedToInvoiceItem(buf);
itemImmutableIfOrderImmutable(buf);
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class OrderItem_createInvoiceItemLink method validate0Act.
public String validate0Act(final IncomingInvoiceItem invoiceItem) {
ReasonBuffer2 buf = ReasonBuffer2.forAll("Cannot link to this invoice item");
buf.append(() -> invoiceItem.getCharge() != mixee.getCharge(), "charge is different");
buf.append(() -> invoiceItem.getProject() != mixee.getProject(), "project is different");
buf.append(() -> invoiceItem.getFixedAsset() != mixee.getProperty(), "property is different");
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class OrderItem_updateInvoiceItemLink method validate0Act.
public String validate0Act(final IncomingInvoiceItem invoiceItem) {
ReasonBuffer2 buf = ReasonBuffer2.forAll("Cannot link to this invoice item");
buf.append(() -> invoiceItem.getCharge() != mixee.getCharge(), "charge is different");
buf.append(() -> invoiceItem.getProject() != mixee.getProject(), "project is different");
buf.append(() -> invoiceItem.getFixedAsset() != mixee.getProperty(), "property is different");
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoiceItem_updateOrderItemLink method disableAct.
public String disableAct() {
ReasonBuffer2 buf = ReasonBuffer2.forSingle();
buf.append(() -> !orderItemIfAny().isPresent(), "Not linked to an order item");
buf.append(() -> mixee.getReportedDate() != null, "Invoice item has been reported");
buf.append(() -> mixee.getReversalOf() != null, "Invoice item is a reversal");
return buf.getReason();
}
use of org.estatio.module.base.platform.applib.ReasonBuffer2 in project estatio by estatio.
the class IncomingInvoice method disableSplitItem.
public String disableSplitItem() {
ReasonBuffer2 buf = ReasonBuffer2.forSingle("Cannot spli items because");
reasonDisabledDueToApprovalStateIfAny(this, buf);
buf.append(() -> choices0SplitItem().isEmpty(), "there are no items");
return buf.getReason();
}
Aggregations