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)