From 95ab6652f8b5c968bccc576e17399d218c4f314d Mon Sep 17 00:00:00 2001 From: trifonnt Date: Mon, 15 Feb 2010 23:40:20 +0000 Subject: [PATCH] FR [2904144] - Archive button not showing the archived docs for sales order https://sourceforge.net/tracker/?func=detail&atid=879335&aid=2904144&group_id=176962 --- base/src/org/compiere/print/ReportEngine.java | 2 +- client/src/org/compiere/apps/AArchive.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/base/src/org/compiere/print/ReportEngine.java b/base/src/org/compiere/print/ReportEngine.java index a5e720a1b0..b9c793bc58 100644 --- a/base/src/org/compiere/print/ReportEngine.java +++ b/base/src/org/compiere/print/ReportEngine.java @@ -1434,7 +1434,7 @@ queued-job-count = 0 (class javax.print.attribute.standard.QueuedJobCount) * @param C_Order_ID id * @return int Array with [printWhat, ID] */ - private static int[] getDocumentWhat (int C_Order_ID) + public static int[] getDocumentWhat (int C_Order_ID) { int[] what = new int[2]; what[0] = ORDER; diff --git a/client/src/org/compiere/apps/AArchive.java b/client/src/org/compiere/apps/AArchive.java index 5d9605be2d..ccbcc59118 100644 --- a/client/src/org/compiere/apps/AArchive.java +++ b/client/src/org/compiere/apps/AArchive.java @@ -28,6 +28,7 @@ import javax.swing.JPopupMenu; import org.compiere.apps.form.ArchiveViewer; import org.compiere.apps.form.FormFrame; import org.compiere.model.MBPartner; +import org.compiere.print.ReportEngine; import org.compiere.swing.CMenuItem; import org.compiere.util.CLogger; import org.compiere.util.DB; @@ -83,6 +84,12 @@ public class AArchive implements ActionListener { int reportCount = 0; int documentCount = 0; + int[] add = ReportEngine.getDocumentWhat(m_Record_ID); + if (add[0]==2) + { + m_AD_Table_ID=318; + m_Record_ID = add[1]; + } m_where = new StringBuffer(); m_where.append("(AD_Table_ID=").append(m_AD_Table_ID)