use of org.estatio.module.capex.imports.OrderInvoiceLine in project estatio by estatio.
the class OrderInvoiceImportMenu method importOrdersAndInvoices.
@Action(semantics = SemanticsOf.SAFE)
@MemberOrder(sequence = "1")
public OrderInvoiceSheet importOrdersAndInvoices(final String sheetName, final Blob spreadSheet) {
final List<OrderInvoiceLine> lines = orderInvoiceImportService.createLines(sheetName, spreadSheet);
final OrderInvoiceSheet sheet = factoryService.instantiate(OrderInvoiceSheet.class);
sheet.setLines(lines);
return sheet;
}
use of org.estatio.module.capex.imports.OrderInvoiceLine in project estatio by estatio.
the class OrderInvoiceImportForDemoXlsxFixture method execute.
@Override
protected void execute(final ExecutionContext executionContext) {
setExcelResource(Resources.getResource(getClass(), "OrderInvoiceImportForDemo.xlsx"));
setMatcher(sheetName -> {
if (sheetName.startsWith("OXFORD")) {
return new WorksheetSpec(rowFactoryFor(OrderInvoiceImportHandler.class, executionContext), sheetName, Mode.RELAXED);
} else {
return null;
}
});
super.execute(executionContext);
for (FixtureResult result : executionContext.getResults()) {
if (result.getClassName().equals(OrderInvoiceLine.class.getName())) {
OrderInvoiceLine line = (OrderInvoiceLine) result.getObject();
OrderInvoiceLine._apply applyMixin = factoryService.mixin(OrderInvoiceLine._apply.class, line);
if (applyMixin.disableAct() == null) {
applyMixin.act();
}
}
}
}
Aggregations