From 9d959afca754f426520d48c5868cf28acf91cd12 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Wed, 16 Jul 2014 15:07:01 -0500 Subject: [PATCH] IDEMPIERE-775 Documents without C_DocType_ID cannot be distributed directly --- org.adempiere.base/src/org/compiere/acct/Doc.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java index 17937087a3..d03ac4aab2 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc.java @@ -129,7 +129,7 @@ public abstract class Doc * M_Requisition POR **************************************************************************/ - private static final String DOC_TYPE_BY_DOC_BASE_TYPE_SQL = "SELECT C_DocType_ID FROM C_DocType WHERE AD_Client_ID=? AND DocBaseType=? AND IsActive='Y'"; + private static final String DOC_TYPE_BY_DOC_BASE_TYPE_SQL = "SELECT C_DocType_ID FROM C_DocType WHERE AD_Client_ID=? AND DocBaseType=? AND IsActive='Y' ORDER BY IsDefault DESC, C_DocType_ID"; /** AR Invoices - ARI */ public static final String DOCTYPE_ARInvoice = MDocType.DOCBASETYPE_ARInvoice;