use of de.metas.payment.PaymentId in project metasfresh-webui-api by metasfresh.
the class C_BankStatement_ReconcileWithSinglePayment method paymentLookupProvider.
@ProcessParamLookupValuesProvider(parameterName = PARAM_C_Payment_ID, numericKey = true, lookupSource = DocumentLayoutElementFieldDescriptor.LookupSource.lookup, lookupTableName = I_C_Payment.Table_Name)
private LookupValuesList paymentLookupProvider() {
if (bpartnerId == null) {
return LookupValuesList.EMPTY;
}
final I_C_BankStatementLine bankStatementLine = getSingleSelectedBankStatementLine();
final int limit = 20;
final Set<PaymentId> paymentIds = bankStatementPaymentBL.findEligiblePaymentIds(bankStatementLine, bpartnerId, limit);
return LookupDataSourceFactory.instance.searchInTableLookup(I_C_Payment.Table_Name).findByIdsOrdered(paymentIds);
}
use of de.metas.payment.PaymentId in project metasfresh-webui-api by metasfresh.
the class PaymentsViewFactory method createView.
@Override
public PaymentsView createView(final CreateViewRequest request) {
final ViewId viewId = request.getViewId();
viewId.assertWindowId(WINDOW_ID);
final Set<PaymentId> paymentIds = PaymentId.fromIntSet(request.getFilterOnlyIds());
if (paymentIds.isEmpty()) {
throw new AdempiereException("@NoSelection@");
}
final PaymentAndInvoiceRows paymentAndInvoiceRows = rowsRepo.getByPaymentIds(paymentIds);
return PaymentsView.builder().paymentViewId(viewId).rows(paymentAndInvoiceRows).paymentsProcesses(getPaymentRelatedProcessDescriptors()).invoicesProcesses(getInvoiceRelatedProcessDescriptors()).build();
}
Aggregations