Skip to content

Commit

Permalink
Merge pull request #592 from metasfresh/gh591-api
Browse files Browse the repository at this point in the history
Filter by warehouse when selecting HUs to issue #591
  • Loading branch information
metas-ts committed Sep 17, 2017
2 parents b9f1f30 + a77b973 commit 374e9cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ else if (row.isTU())
}

/**
* Action to issue selected HUs to currenty selected manufacturing order BOM line
* Action to issue selected HUs to currently selected manufacturing order BOM line
*
* @param husView
* @param selectedHURowIds
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/de/metas/ui/web/pporder/PPOrderLinesView.java
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,11 @@ public OpenIncludedViewAction actionOpenViewForHUsToIssue(final DocumentIdsSelec
{
throw new IllegalStateException("Row processed");
}

final I_PP_Order_BOMLine ppOrderBomLine = load(selectedRow.getPP_Order_BOMLine_ID(), I_PP_Order_BOMLine.class);

final IHUPPOrderBL huppOrderBL = Services.get(IHUPPOrderBL.class);
final IHUQueryBuilder huIdsToAvailableToIssueQuery = huppOrderBL.createHUsAvailableToIssueQuery(selectedRow.getM_Product_ID());
final IHUQueryBuilder huIdsToAvailableToIssueQuery = huppOrderBL.createHUsAvailableToIssueQuery(ppOrderBomLine);

final IViewsRepository viewsRepo = Adempiere.getSpringApplicationContext().getBean(IViewsRepository.class); // TODO dirty workaround
final IView husToIssueView = viewsRepo.createView(CreateViewRequest.builder(WEBUI_HU_Constants.WEBUI_HU_Window_ID, JSONViewDataType.includedView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@
/** All records (included ones too) indexed by DocumentId */
private final ImmutableMap<DocumentId, PPOrderLineRow> allRecordsById;

PPOrderLinesViewData(@NonNull final ITranslatableString description, @NonNull final String planningStatus, final List<PPOrderLineRow> records)
PPOrderLinesViewData(
@NonNull final ITranslatableString description,
@NonNull final String planningStatus,
@NonNull final List<PPOrderLineRow> records)
{
super();
this.description = description;
this.planningStatus = planningStatus;
this.records = ImmutableList.copyOf(records);

allRecordsById = buildRecordsByIdMap(this.records);
}

Expand Down

0 comments on commit 374e9cc

Please sign in to comment.