[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:
Carlos Ruiz 2010-06-14 01:08:58 +00:00
parent 2b74a0e9ad
commit b4547b97a0
1 changed files with 1 additions and 1 deletions

View File

@ -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="