BF [3014243] - MInvoice.setC_DocTypeTarget_ID(String) ignores AD_Org_ID
https://sourceforge.net/tracker/?func=detail&atid=879332&aid=3014243&group_id=176962
This commit is contained in:
parent
c3ca5d9ee4
commit
c4a4f8fcdd
|
@ -570,10 +570,10 @@ public class MInvoice extends X_C_Invoice implements DocAction
|
|||
public void setC_DocTypeTarget_ID (String DocBaseType)
|
||||
{
|
||||
String sql = "SELECT C_DocType_ID FROM C_DocType "
|
||||
+ "WHERE AD_Client_ID=? AND DocBaseType=?"
|
||||
+ "WHERE AD_Client_ID=? AND AD_Org_ID in (0,?) AND DocBaseType=?"
|
||||
+ " AND IsActive='Y' "
|
||||
+ "ORDER BY IsDefault DESC";
|
||||
int C_DocType_ID = DB.getSQLValueEx(null, sql, getAD_Client_ID(), DocBaseType);
|
||||
+ "ORDER BY IsDefault DESC, AD_Org_ID";
|
||||
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="
|
||||
+ getAD_Client_ID() + " - " + DocBaseType);
|
||||
|
|
Loading…
Reference in New Issue