FR [ 2391399 ] Create dunning run should allow filtering by org

https://sourceforge.net/tracker/?func=detail&aid=2391399&group_id=176962&atid=879335
This commit is contained in:
phib 2008-12-09 06:10:08 +00:00
parent b920ef6fe2
commit f67087ff37
3 changed files with 27 additions and 0 deletions

View File

@ -46,6 +46,7 @@ public class DunningRunCreate extends SvrProcess
private int p_C_BPartner_ID = 0;
private int p_C_BP_Group_ID = 0;
private int p_C_DunningRun_ID = 0;
private int p_AD_Org_ID = 0;
private MDunningRun m_run = null;
private MDunningLevel m_level = null;
@ -75,6 +76,8 @@ public class DunningRunCreate extends SvrProcess
p_C_BPartner_ID = para[i].getParameterAsInt();
else if (name.equals("C_BP_Group_ID"))
p_C_BP_Group_ID = para[i].getParameterAsInt();
else if (name.equals("AD_Org_ID"))
p_AD_Org_ID = para[i].getParameterAsInt();
else
log.log(Level.SEVERE, "Unknown Parameter: " + name);
}
@ -149,6 +152,8 @@ public class DunningRunCreate extends SvrProcess
sql += " AND i.IsSOTrx='Y'";
if (!p_IsAllCurrencies)
sql += " AND i.C_Currency_ID=" + p_C_Currency_ID;
if ( p_AD_Org_ID != 0 )
sql += " AND i.AD_Org_ID=" + p_AD_Org_ID;
// log.info(sql);
String sql2=null;
@ -326,6 +331,8 @@ public class DunningRunCreate extends SvrProcess
+ "WHERE p.C_BPartner_ID=bp.C_BPartner_ID AND bp.C_BP_Group_ID=?)"; // ##3
if (p_OnlySOTrx)
sql += " AND IsReceipt='Y'";
if ( p_AD_Org_ID != 0 )
sql += " AND i.AD_Org_ID=" + p_AD_Org_ID;
int count = 0;
PreparedStatement pstmt = null;

View File

@ -0,0 +1,10 @@
-- 5/12/2008 11:49:33
-- Dunning run create requires AD_Org
INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,113,0,289,53261,19,104,'AD_Org_ID',TO_DATE('2008-12-05 11:49:31','YYYY-MM-DD HH24:MI:SS'),100,'0',NULL,'D',12,'Y','Y','Y','N','Organization',5,TO_DATE('2008-12-05 11:49:31','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 5/12/2008 11:49:34
-- Dunning run create requires AD_Org
INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53261 AND EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Process_Para_ID!=t.AD_Process_Para_ID)
;

View File

@ -0,0 +1,10 @@
-- 5/12/2008 11:49:34
-- Dunning run create requires AD_Org
INSERT INTO AD_Process_Para (AD_Client_ID,AD_Element_ID,AD_Org_ID,AD_Process_ID,AD_Process_Para_ID,AD_Reference_ID,AD_Val_Rule_ID,ColumnName,Created,CreatedBy,DefaultValue,Description,EntityType,FieldLength,IsActive,IsCentrallyMaintained,IsMandatory,IsRange,Name,SeqNo,Updated,UpdatedBy) VALUES (0,113,0,289,53261,19,104,'AD_Org_ID',TO_TIMESTAMP('2008-12-05 11:49:31','YYYY-MM-DD HH24:MI:SS'),100,'0',NULL,'D',12,'Y','Y','Y','N','Organization',5,TO_TIMESTAMP('2008-12-05 11:49:31','YYYY-MM-DD HH24:MI:SS'),100)
;
-- 5/12/2008 11:49:34
-- Dunning run create requires AD_Org
INSERT INTO AD_Process_Para_Trl (AD_Language,AD_Process_Para_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Process_Para_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Process_Para t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Process_Para_ID=53261 AND EXISTS (SELECT * FROM AD_Process_Para_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Process_Para_ID!=t.AD_Process_Para_ID)
;