From b4547b97a0ffd9fe5a9304daa325c14a685d01ca Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 14 Jun 2010 01:08:58 +0000 Subject: [PATCH] [3014243] MInvoice.setC_DocTypeTarget_ID(String) ignores AD_Org_ID Implement Teo's suggestion about order by Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3014243 --- base/src/org/compiere/model/MInvoice.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/src/org/compiere/model/MInvoice.java b/base/src/org/compiere/model/MInvoice.java index 27b872d4a4..67ff47d717 100644 --- a/base/src/org/compiere/model/MInvoice.java +++ b/base/src/org/compiere/model/MInvoice.java @@ -572,7 +572,7 @@ public class MInvoice extends X_C_Invoice implements DocAction String sql = "SELECT C_DocType_ID FROM C_DocType " + "WHERE AD_Client_ID=? AND AD_Org_ID in (0,?) AND DocBaseType=?" + " AND IsActive='Y' " - + "ORDER BY IsDefault DESC, AD_Org_ID"; + + "ORDER BY IsDefault DESC, AD_Org_ID DESC"; int C_DocType_ID = DB.getSQLValueEx(null, sql, getAD_Client_ID(), getAD_Org_ID(), DocBaseType); if (C_DocType_ID <= 0) log.log(Level.SEVERE, "Not found for AD_Client_ID="