Search in sources :

Example 1 with MainRowBuilder

use of de.metas.ui.web.material.cockpit.MaterialCockpitRow.MainRowBuilder in project metasfresh-webui-api by metasfresh.

the class MainRowWithSubRows method createMainRowWithSubRows.

public MaterialCockpitRow createMainRowWithSubRows() {
    final MainRowBuilder mainRowBuilder = MaterialCockpitRow.mainRowBuilder().qtyMaterialentnahme(mainRow.getQtyMaterialentnahme()).qtyRequiredForProduction(mainRow.getQtyRequiredForProduction()).qtyOnHandEstimate(mainRow.getQtyOnHandEstimate()).qtyOnHandStock(mainRow.getQtyOnHand()).qtyReservedPurchase(mainRow.getQtyReservedPurchase()).qtyAvailableToPromise(mainRow.getQtyAvailableToPromise()).qtyReservedSale(mainRow.getQtyReservedSale()).pmmQtyPromised(mainRow.getPmmQtyPromised()).allIncludedCockpitRecordIds(mainRow.getCockpitRecordIds()).allIncludedStockRecordIds(mainRow.getStockRecordIds());
    for (final CountingSubRowBucket subRowBucket : countingSubRows.values()) {
        final MaterialCockpitRow subRow = subRowBucket.createIncludedRow(this);
        mainRowBuilder.includedRow(subRow);
    }
    for (final DimensionGroupSubRowBucket subRowBucket : dimensionGroupSubRows.values()) {
        final MaterialCockpitRow subRow = subRowBucket.createIncludedRow(this);
        mainRowBuilder.includedRow(subRow);
    }
    return mainRowBuilder.build();
}
Also used : MainRowBuilder(de.metas.ui.web.material.cockpit.MaterialCockpitRow.MainRowBuilder) MaterialCockpitRow(de.metas.ui.web.material.cockpit.MaterialCockpitRow)

Aggregations

MaterialCockpitRow (de.metas.ui.web.material.cockpit.MaterialCockpitRow)1 MainRowBuilder (de.metas.ui.web.material.cockpit.MaterialCockpitRow.MainRowBuilder)1