From 9186b12bba4cd7c7000f30eafe4a8ec0b7722427 Mon Sep 17 00:00:00 2001 From: usrdno Date: Thu, 26 Feb 2009 07:58:17 +0000 Subject: [PATCH] Use both columns of the primary key to select the product accounting. --- base/src/org/adempiere/process/ExpenseTypesFromAccounts.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java b/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java index f9b7d4b68d..8b6139fc67 100644 --- a/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java +++ b/base/src/org/adempiere/process/ExpenseTypesFromAccounts.java @@ -195,8 +195,8 @@ public class ExpenseTypesFromAccounts extends SvrProcess { // TODO: It might be needed to make the accounting more specific, but the purpose // of the process now is to create general accounts so this is intentional. - productAcct = new Query(getCtx(), X_M_Product_Acct.Table_Name, "M_Product_ID=?", get_TrxName()) - .setParameters(new Object[]{product.get_ID()}) + productAcct = new Query(getCtx(), X_M_Product_Acct.Table_Name, "M_Product_ID=? and C_AcctSchema_ID=?", get_TrxName()) + .setParameters(new Object[]{product.get_ID(), m_acctSchemaId}) .first(); productAcct.setP_Expense_Acct(validComb.get_ID()); productAcct.setP_Revenue_Acct(validComb.get_ID());