From a0e6fcd1aad240fa3e10a74b9f2137a3b86e677c Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 30 Sep 2009 04:03:45 +0000 Subject: [PATCH] Fix [2870450] - 2pack - cannot export a printformat with two print details https://sourceforge.net/tracker/?func=detail&aid=2870450&group_id=176962&atid=879332 --- .../adempiere/pipo/handler/PrintFormatElementHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java b/base/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java index 3e7ee448d4..5a9d8f5218 100644 --- a/base/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java +++ b/base/src/org/adempiere/pipo/handler/PrintFormatElementHandler.java @@ -193,10 +193,10 @@ public class PrintFormatElementHandler extends AbstractElementHandler { String sql = null; sql = "SELECT AD_PrintFormat_ID " + "FROM AD_PrintFormat " - + "WHERE AD_PrintFormat_ID in " - + "(( select AD_PrintFormatChild_ID from AD_PrintFormatItem WHERE AD_PrintFormat_ID = " - + AD_PrintFormat_ID + " AND PrintFormatType = 'P' GROUP BY AD_PrintFormatChild_ID ), " - + AD_PrintFormat_ID + ") "; + + "WHERE (AD_PrintFormat_ID IN " + + "(SELECT AD_PrintFormatChild_ID FROM AD_PrintFormatItem WHERE AD_PrintFormat_ID = " + + AD_PrintFormat_ID + " AND PrintFormatType = 'P' GROUP BY AD_PrintFormatChild_ID) OR AD_PrintFormat_ID = " + + AD_PrintFormat_ID + ")"; PreparedStatement pstmt = null; pstmt = DB.prepareStatement(sql, getTrxName(ctx));