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));