Skip to content

Commit

Permalink
Make metasfresh more robust in case of unspecified selections (#1342)
Browse files Browse the repository at this point in the history
* change ProcessInfo to force the dev to decide if she/he want's all or nothing in case no query filter is specified.
* fix compile errors by choosing "nothing" in all current cases
IMPORTANT: this is branched from the 5.132_last_christmas branch
  • Loading branch information
metas-ts committed Jan 8, 2020
1 parent c4940d9 commit 6653f38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected void postProcess(final boolean success)
private final IQuery<I_C_Invoice_Candidate> retrieveInvoiceCandidatesToApproveQuery()
{
final IQueryBuilder<I_C_Invoice_Candidate> queryBuilder = Services.get(IQueryBL.class).createQueryBuilder(I_C_Invoice_Candidate.class)
.filter(getProcessInfo().getQueryFilter())
.filter(getProcessInfo().getQueryFilterOrElseFalse())
.addOnlyActiveRecordsFilter()
.addNotEqualsFilter(I_C_Invoice_Candidate.COLUMN_Processed, true) // not processed
.addNotEqualsFilter(I_C_Invoice_Candidate.COLUMN_ApprovalForInvoicing, true) // not already approved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected ProcessPreconditionsResolution checkPreconditionsApplicable()
protected String doIt() throws Exception
{
recordsEnqueued = PMM_GenerateOrders.prepareEnqueuing()
.filter(getProcessInfo().getQueryFilter())
.filter(getProcessInfo().getQueryFilterOrElseFalse())
.enqueue();
return MSG_OK;
}
Expand Down

0 comments on commit 6653f38

Please sign in to comment.