Add Client Check for Inventory Receipt and Issue

--HG--
branch : EDII
This commit is contained in:
hodianto 2018-11-30 16:20:18 +07:00
parent 396215082a
commit b12aecbf3a
1 changed files with 2 additions and 2 deletions

View File

@ -69,8 +69,8 @@ public class MID_PPO extends X_ps_ppo implements DocAction, DocOptions{
throw new AdempiereException("Qty Ordered = 0");
}
int receiptDocType = DB.getSQLValueEx(get_TrxName(), " SELECT C_DocType_ID FROM C_DocType WHERE Name = ? ", new Object[] {"Inventory Receipt"});
int issueDocType = DB.getSQLValueEx(get_TrxName(), " SELECT C_DocType_ID FROM C_DocType WHERE Name = ? ", new Object[] {"Inventory Issue"});
int receiptDocType = DB.getSQLValueEx(get_TrxName(), " SELECT C_DocType_ID FROM C_DocType WHERE Name = ? AND AD_Client_ID =?", new Object[] {"Inventory Receipt", getAD_Client_ID()});
int issueDocType = DB.getSQLValueEx(get_TrxName(), " SELECT C_DocType_ID FROM C_DocType WHERE Name = ? AND AD_Client_ID =?", new Object[] {"Inventory Issue", getAD_Client_ID()});
int countReceipt = new Query(getCtx(), MInventory.Table_Name, "DocStatus IN (?) AND C_DocType_ID IN (?) AND ps_ppo_ID =?", get_TrxName())
.setParameters(new Object[] {DocAction.STATUS_Completed, receiptDocType, getps_ppo_ID()})
.count();