From bd33b7ab64db130c12d9ff3e991436ab4f4e7b27 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 1 Aug 2019 19:47:34 +0200 Subject: [PATCH] IDEMPIERE-4004 Get CBPartner by TaxID / peer review --- org.adempiere.base/src/org/compiere/model/MBPartner.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MBPartner.java b/org.adempiere.base/src/org/compiere/model/MBPartner.java index 03e294f287..6e0e0293ba 100644 --- a/org.adempiere.base/src/org/compiere/model/MBPartner.java +++ b/org.adempiere.base/src/org/compiere/model/MBPartner.java @@ -47,7 +47,7 @@ public class MBPartner extends X_C_BPartner /** * */ - private static final long serialVersionUID = -3098526308112073395L; + private static final long serialVersionUID = -255154524310324997L; /** * Get Empty Template Business Partner @@ -148,9 +148,10 @@ public class MBPartner extends X_C_BPartner final String whereClause = "TaxID=? AND AD_Client_ID=?"; MBPartner retValue = new Query(ctx, Table_Name, whereClause, trxName) .setParameters(taxID, Env.getAD_Client_ID(ctx)) - .firstOnly(); + .setOrderBy(COLUMNNAME_C_BPartner_ID) + .first(); return retValue; - } // get + } // getFirstWithTaxID /** * Get BPartner with Value