IDEMPIERE-4542 Cannot report from window _My Unprocessed Documents_ (#376)
This commit is contained in:
parent
57fea708aa
commit
837c04f063
|
@ -0,0 +1,27 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-4542 Cannot report from window _My Unprocessed Documents_
|
||||
-- Nov 12, 2020, 11:05:07 AM CET
|
||||
UPDATE PA_DocumentStatus SET WhereClause='RV_Unprocessed.AD_Client_ID=@#AD_Client_ID@ AND RV_Unprocessed.CreatedBy=@#AD_User_ID@',Updated=TO_DATE('2020-11-12 11:05:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200005
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:36:21 AM CET
|
||||
UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_DATE('2020-11-12 11:36:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200223
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:38:45 AM CET
|
||||
UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_DATE('2020-11-12 11:38:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:40:02 AM CET
|
||||
UPDATE PA_DocumentStatus SET WhereClause='AD_Note.AD_Client_ID=@#AD_Client_ID@ AND AD_Note.AD_User_ID IN (0,@#AD_User_ID@) AND AD_Note.Processed=''N'' AND AD_Note.AD_BroadcastMessage_ID IS NULL',Updated=TO_DATE('2020-11-12 11:40:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200002
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:40:43 AM CET
|
||||
UPDATE PA_DocumentStatus SET WhereClause='(R_Request.SalesRep_ID=@#AD_User_ID@ OR R_Request.AD_Role_ID=@#AD_Role_ID@) AND R_Request.Processed=''N'' AND (R_Request.DateNextAction IS NULL OR TRUNC(R_Request.DateNextAction) <= TRUNC(SysDate)) AND (R_Request.R_Status_ID IS NULL OR R_Request.R_Status_ID IN (SELECT R_Status.R_Status_ID FROM R_Status WHERE R_Status.IsClosed=''N''))',Updated=TO_DATE('2020-11-12 11:40:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200003
|
||||
;
|
||||
|
||||
SELECT register_migration_script('202011121113_IDEMPIERE-4542.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
-- IDEMPIERE-4542 Cannot report from window _My Unprocessed Documents_
|
||||
-- Nov 12, 2020, 11:05:07 AM CET
|
||||
UPDATE PA_DocumentStatus SET WhereClause='RV_Unprocessed.AD_Client_ID=@#AD_Client_ID@ AND RV_Unprocessed.CreatedBy=@#AD_User_ID@',Updated=TO_TIMESTAMP('2020-11-12 11:05:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200005
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:36:21 AM CET
|
||||
UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_TIMESTAMP('2020-11-12 11:36:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200223
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:38:45 AM CET
|
||||
UPDATE AD_Tab SET IsAdvancedTab='Y',Updated=TO_TIMESTAMP('2020-11-12 11:38:45','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=200191
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:40:02 AM CET
|
||||
UPDATE PA_DocumentStatus SET WhereClause='AD_Note.AD_Client_ID=@#AD_Client_ID@ AND AD_Note.AD_User_ID IN (0,@#AD_User_ID@) AND AD_Note.Processed=''N'' AND AD_Note.AD_BroadcastMessage_ID IS NULL',Updated=TO_TIMESTAMP('2020-11-12 11:40:02','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200002
|
||||
;
|
||||
|
||||
-- Nov 12, 2020, 11:40:43 AM CET
|
||||
UPDATE PA_DocumentStatus SET WhereClause='(R_Request.SalesRep_ID=@#AD_User_ID@ OR R_Request.AD_Role_ID=@#AD_Role_ID@) AND R_Request.Processed=''N'' AND (R_Request.DateNextAction IS NULL OR TRUNC(R_Request.DateNextAction) <= TRUNC(SysDate)) AND (R_Request.R_Status_ID IS NULL OR R_Request.R_Status_ID IN (SELECT R_Status.R_Status_ID FROM R_Status WHERE R_Status.IsClosed=''N''))',Updated=TO_TIMESTAMP('2020-11-12 11:40:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200003
|
||||
;
|
||||
|
||||
SELECT register_migration_script('202011121113_IDEMPIERE-4542.sql') FROM dual
|
||||
;
|
||||
|
|
@ -102,14 +102,15 @@ public class MDocumentStatus extends X_PA_DocumentStatus {
|
|||
}
|
||||
|
||||
public static String getWhereClause(MDocumentStatus documentStatus) {
|
||||
StringBuilder where = new StringBuilder(" AD_Client_ID=" + Env.getAD_Client_ID(Env.getCtx()) );
|
||||
String tableName = MTable.getTableName(Env.getCtx(), documentStatus.getAD_Table_ID());
|
||||
StringBuilder where = new StringBuilder(" ").append(tableName).append(".AD_Client_ID=" + Env.getAD_Client_ID(Env.getCtx()) );
|
||||
if (documentStatus.getC_Project_ID() > 0)
|
||||
{
|
||||
where.append(" AND C_Project_ID=").append(documentStatus.getC_Project_ID());
|
||||
where.append(" AND ").append(tableName).append(".C_Project_ID=").append(documentStatus.getC_Project_ID());
|
||||
}
|
||||
if (documentStatus.getAD_Org_ID() > 0)
|
||||
{
|
||||
where.append(" AND AD_Org_ID=").append(documentStatus.getAD_Org_ID());
|
||||
where.append(" AND ").append(tableName).append(".AD_Org_ID=").append(documentStatus.getAD_Org_ID());
|
||||
}
|
||||
String extra = documentStatus.getWhereClause();
|
||||
if (extra != null && extra.trim().length() > 0)
|
||||
|
|
|
@ -162,6 +162,7 @@ public class WDocumentStatusIndicator extends Panel implements EventListener<Eve
|
|||
}
|
||||
|
||||
public void refresh() {
|
||||
m_documentStatus.load(m_documentStatus.get_TrxName());
|
||||
statusCount = MDocumentStatus.evaluate(m_documentStatus);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue