Fix [2908191] - MOrder. setC_DocTypeTarget_ID () Ignoring isActive

https://sourceforge.net/tracker/?func=detail&atid=879332&aid=2908191&group_id=176962
Thanks to Silvano Trinchero www.freepath.it
This commit is contained in:
Carlos Ruiz 2009-12-07 23:45:22 +00:00
parent 6297988963
commit a251517130
1 changed files with 1 additions and 0 deletions

View File

@ -377,6 +377,7 @@ public class MOrder extends X_C_Order 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," + getAD_Org_ID() + "WHERE AD_Client_ID=? AND AD_Org_ID IN (0," + getAD_Org_ID()
+ ") AND DocSubTypeSO=? " + ") AND DocSubTypeSO=? "
+ " AND IsActive='Y' "
+ "ORDER BY AD_Org_ID DESC, IsDefault DESC"; + "ORDER BY AD_Org_ID DESC, IsDefault DESC";
int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID(), DocSubTypeSO_x); int C_DocType_ID = DB.getSQLValue(null, sql, getAD_Client_ID(), DocSubTypeSO_x);
if (C_DocType_ID <= 0) if (C_DocType_ID <= 0)