[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
This commit is contained in:
parent
2b74a0e9ad
commit
b4547b97a0
|
@ -572,7 +572,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
||||||
String sql = "SELECT C_DocType_ID FROM C_DocType "
|
String sql = "SELECT C_DocType_ID FROM C_DocType "
|
||||||
+ "WHERE AD_Client_ID=? AND AD_Org_ID in (0,?) AND DocBaseType=?"
|
+ "WHERE AD_Client_ID=? AND AD_Org_ID in (0,?) AND DocBaseType=?"
|
||||||
+ " AND IsActive='Y' "
|
+ " 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);
|
int C_DocType_ID = DB.getSQLValueEx(null, sql, getAD_Client_ID(), getAD_Org_ID(), DocBaseType);
|
||||||
if (C_DocType_ID <= 0)
|
if (C_DocType_ID <= 0)
|
||||||
log.log(Level.SEVERE, "Not found for AD_Client_ID="
|
log.log(Level.SEVERE, "Not found for AD_Client_ID="
|
||||||
|
|
Loading…
Reference in New Issue