diff --git a/.project b/.project index d3da6f5a9d..a32ef031e2 100644 --- a/.project +++ b/.project @@ -1,20 +1,20 @@ - - - Adempiere_stable - - - - - - org.eclipse.jdt.core.javabuilder - - - - - - org.eclipse.jdt.core.javanature - org.eclipse.wst.common.project.facet.core.nature - org.eclipse.wst.common.modulecore.ModuleCoreNature - org.eclipse.jem.workbench.JavaEMFNature - - + + + adempiereStable + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jem.workbench.JavaEMFNature + + diff --git a/base/src/org/compiere/model/I_AD_PrintFormatItem.java b/base/src/org/compiere/model/I_AD_PrintFormatItem.java index 379bf06850..bf19f77a37 100644 --- a/base/src/org/compiere/model/I_AD_PrintFormatItem.java +++ b/base/src/org/compiere/model/I_AD_PrintFormatItem.java @@ -517,6 +517,19 @@ public interface I_AD_PrintFormatItem */ public boolean isSuppressNull(); + /** Column name IsSuppressRepeats */ + public static final String COLUMNNAME_IsSuppressRepeats = "IsSuppressRepeats"; + + /** Set Suppress Repeats. + * Suppress repeated elements in column. + */ + public void setIsSuppressRepeats (boolean IsSuppressRepeats); + + /** Get Suppress Repeats. + * Suppress repeated elements in column. + */ + public boolean isSuppressRepeats(); + /** Column name IsVarianceCalc */ public static final String COLUMNNAME_IsVarianceCalc = "IsVarianceCalc"; diff --git a/base/src/org/compiere/model/X_AD_PrintFormatItem.java b/base/src/org/compiere/model/X_AD_PrintFormatItem.java index 8ae1f51384..00aee1bc6b 100644 --- a/base/src/org/compiere/model/X_AD_PrintFormatItem.java +++ b/base/src/org/compiere/model/X_AD_PrintFormatItem.java @@ -1060,6 +1060,30 @@ public class X_AD_PrintFormatItem extends PO implements I_AD_PrintFormatItem, I_ return false; } + /** Set Suppress Repeats. + @param IsSuppressRepeats + Suppress repeated elements in column. + */ + public void setIsSuppressRepeats (boolean IsSuppressRepeats) + { + set_Value (COLUMNNAME_IsSuppressRepeats, Boolean.valueOf(IsSuppressRepeats)); + } + + /** Get Suppress Repeats. + @return Suppress repeated elements in column. + */ + public boolean isSuppressRepeats () + { + Object oo = get_Value(COLUMNNAME_IsSuppressRepeats); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set Calculate Variance (?�). @param IsVarianceCalc Calculate Variance diff --git a/base/src/org/compiere/print/layout/LayoutEngine.java b/base/src/org/compiere/print/layout/LayoutEngine.java index 97d81c0cf9..4b3a49f79b 100644 --- a/base/src/org/compiere/print/layout/LayoutEngine.java +++ b/base/src/org/compiere/print/layout/LayoutEngine.java @@ -1508,6 +1508,7 @@ public class LayoutEngine implements Pageable, Printable, Doc int[] columnMaxWidth = new int[columnCount]; int[] columnMaxHeight = new int[columnCount]; boolean[] fixedWidth = new boolean [columnCount]; + boolean[] colSuppressRepeats = new boolean[columnCount]; String[] columnJustification = new String[columnCount]; HashMap additionalLines = new HashMap(); @@ -1530,6 +1531,7 @@ public class LayoutEngine implements Pageable, Printable, Doc item.getPrintName(format.getLanguage())); columnMaxWidth[col] = item.getMaxWidth(); fixedWidth[col] = (columnMaxWidth[col] != 0 && item.isFixedWidth()); + colSuppressRepeats[col] = item.isSuppressRepeats(); if (item.isSuppressNull()) { if (columnMaxWidth[col] == 0) @@ -1718,7 +1720,7 @@ public class LayoutEngine implements Pageable, Printable, Doc data, pk, pkColumnName, pageNoStart, firstPage, nextPages, repeatedColumns, additionalLines, rowColFont, rowColColor, rowColBackground, - tf, pageBreak); + tf, pageBreak, colSuppressRepeats); table.layout(0,0,false, MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft); if (m_tableElement == null) m_tableElement = table; diff --git a/base/src/org/compiere/print/layout/TableElement.java b/base/src/org/compiere/print/layout/TableElement.java index 7fdcffd8a5..4fa6496fdd 100644 --- a/base/src/org/compiere/print/layout/TableElement.java +++ b/base/src/org/compiere/print/layout/TableElement.java @@ -32,6 +32,7 @@ import java.awt.geom.Point2D; import java.text.AttributedCharacterIterator; import java.text.AttributedString; import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.Properties; import java.util.logging.Level; @@ -111,10 +112,11 @@ public class TableElement extends PrintElement Object[][] data, KeyNamePair[] pk, String pkColumnName, int pageNoStart, Rectangle firstPage, Rectangle nextPages, int repeatedColumns, HashMap additionalLines, HashMap rowColFont, HashMap rowColColor, HashMap rowColBackground, - MPrintTableFormat tFormat, ArrayList pageBreak) + MPrintTableFormat tFormat, ArrayList pageBreak, boolean[] colSuppressRepeats) { super(); log.fine("Cols=" + columnHeader.length + ", Rows=" + data.length); + m_colSuppressRepeats = colSuppressRepeats; m_columnHeader = columnHeader; m_columnMaxWidth = columnMaxWidth; m_columnMaxHeight = columnMaxHeight; @@ -198,6 +200,8 @@ public class TableElement extends PrintElement private Rectangle m_firstPage; /** Bounds of next Pages */ private Rectangle m_nextPages; + + private boolean[] m_colSuppressRepeats; /** repeat first x columns on - X Axis follow pages */ private int m_repeatedColumns; @@ -1369,131 +1373,146 @@ public class TableElement extends PrintElement // actual data Object[] printItems = getPrintItems(row,col); + float penY = curY; - for (int index = 0; index < printItems.length; index++) + + // suppress repeated values + boolean suppress = false; + if (m_colSuppressRepeats[col] && row > 0 && row != firstRow) { - if (printItems[index] == null) - ; - else if (printItems[index] instanceof ImageElement) + Object[] lastItems = {}; + lastItems = getPrintItems(row-1, col); + if (Arrays.equals(lastItems,printItems) ) + suppress = true; + } + + if ( !suppress ) + { + for (int index = 0; index < printItems.length; index++) { - Image imageToDraw = ((ImageElement)printItems[index]).getImage(); - if (imageToDraw != null) // teo_sarca [ 1674706 ] + if (printItems[index] == null ) + ; + else if (printItems[index] instanceof ImageElement) { - // Draw image using the scale factor - teo_sarca, [ 1673548 ] Image is not scaled in a report table cell - double scale = ((ImageElement)printItems[index]).getScaleFactor(); - if (scale != 1.0) { - AffineTransform transform = new AffineTransform(); - transform.translate(curX, penY); - transform.scale(scale, scale); - g2D.drawImage(imageToDraw, transform, this); - } - else { - g2D.drawImage(imageToDraw, curX, (int)penY, this); - } - } - } - else if (printItems[index] instanceof BarcodeElement) - { - try { - ((BarcodeElement)printItems[index]).getBarcode().draw(g2D, curX, (int)penY); - } catch (OutputException e) { - } - } - else if (printItems[index] instanceof Boolean) - { - int penX = curX + (int)((netWidth-LayoutEngine.IMAGE_SIZE.width)/2); // center - if (((Boolean)printItems[index]).booleanValue()) - g2D.drawImage(LayoutEngine.IMAGE_TRUE, penX, (int)penY, this); - else - g2D.drawImage(LayoutEngine.IMAGE_FALSE, penX, (int)penY, this); - penY += LayoutEngine.IMAGE_SIZE.height; - } - else if (printItems[index] instanceof HTMLRenderer) - { - HTMLRenderer renderer = (HTMLRenderer)printItems[index]; - Rectangle allocation = new Rectangle((int)colWidth, (int)netHeight); - // log.finest( "printColumn HTML - " + allocation); - g2D.translate(curX, penY); - renderer.paint(g2D, allocation); - g2D.translate(-curX, -penY); - penY += allocation.getHeight(); - } - else - { - String str = printItems[index].toString(); - if (DEBUG_PRINT) - log.fine("row=" + row + ",col=" + col + " - " + str + " 8Bit=" + Util.is8Bit(str)); - if (str.length() > 0) - { - usedHeight = 0; - String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(str); - for (int lineNo = 0; lineNo < lines.length; lineNo++) + Image imageToDraw = ((ImageElement)printItems[index]).getImage(); + if (imageToDraw != null) // teo_sarca [ 1674706 ] { - aString = new AttributedString(lines[lineNo]); - aString.addAttribute(TextAttribute.FONT, getFont(row, col)); - if (isView && printItems[index] instanceof NamePair) // ID - { - aString.addAttribute(TextAttribute.FOREGROUND, LINK_COLOR); - aString.addAttribute(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_ONE_PIXEL, 0, str.length()); + // Draw image using the scale factor - teo_sarca, [ 1673548 ] Image is not scaled in a report table cell + double scale = ((ImageElement)printItems[index]).getScaleFactor(); + if (scale != 1.0) { + AffineTransform transform = new AffineTransform(); + transform.translate(curX, penY); + transform.scale(scale, scale); + g2D.drawImage(imageToDraw, transform, this); } - else - aString.addAttribute(TextAttribute.FOREGROUND, getColor(row, col)); - // - iter = aString.getIterator(); - boolean fastDraw = LayoutEngine.s_FASTDRAW; - if (fastDraw && !isView && !Util.is8Bit(lines[lineNo])) - fastDraw = false; - measurer = new LineBreakMeasurer(iter, g2D.getFontRenderContext()); - while (measurer.getPosition() < iter.getEndIndex()) // print element + else { + g2D.drawImage(imageToDraw, curX, (int)penY, this); + } + } + } + else if (printItems[index] instanceof BarcodeElement) + { + try { + ((BarcodeElement)printItems[index]).getBarcode().draw(g2D, curX, (int)penY); + } catch (OutputException e) { + } + } + else if (printItems[index] instanceof Boolean) + { + int penX = curX + (int)((netWidth-LayoutEngine.IMAGE_SIZE.width)/2); // center + if (((Boolean)printItems[index]).booleanValue()) + g2D.drawImage(LayoutEngine.IMAGE_TRUE, penX, (int)penY, this); + else + g2D.drawImage(LayoutEngine.IMAGE_FALSE, penX, (int)penY, this); + penY += LayoutEngine.IMAGE_SIZE.height; + } + else if (printItems[index] instanceof HTMLRenderer) + { + HTMLRenderer renderer = (HTMLRenderer)printItems[index]; + Rectangle allocation = new Rectangle((int)colWidth, (int)netHeight); + // log.finest( "printColumn HTML - " + allocation); + g2D.translate(curX, penY); + renderer.paint(g2D, allocation); + g2D.translate(-curX, -penY); + penY += allocation.getHeight(); + } + else + { + String str = printItems[index].toString(); + if (DEBUG_PRINT) + log.fine("row=" + row + ",col=" + col + " - " + str + " 8Bit=" + Util.is8Bit(str)); + if (str.length() > 0) + { + usedHeight = 0; + String[] lines = Pattern.compile("$", Pattern.MULTILINE).split(str); + for (int lineNo = 0; lineNo < lines.length; lineNo++) { - TextLayout layout = measurer.nextLayout(netWidth + 2); - if (iter.getEndIndex() != measurer.getPosition()) - fastDraw = false; - float lineHeight = layout.getAscent() + layout.getDescent() + layout.getLeading(); - if ((m_columnMaxHeight[col] <= 0 - || (usedHeight + lineHeight) <= m_columnMaxHeight[col]) - && (usedHeight + lineHeight) <= netHeight) + aString = new AttributedString(lines[lineNo]); + aString.addAttribute(TextAttribute.FONT, getFont(row, col)); + if (isView && printItems[index] instanceof NamePair) // ID { - if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Block) && measurer.getPosition() < iter.getEndIndex()) - { - layout = layout.getJustifiedLayout(netWidth + 2); + aString.addAttribute(TextAttribute.FOREGROUND, LINK_COLOR); + aString.addAttribute(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_ONE_PIXEL, 0, str.length()); + } + else + aString.addAttribute(TextAttribute.FOREGROUND, getColor(row, col)); + // + iter = aString.getIterator(); + boolean fastDraw = LayoutEngine.s_FASTDRAW; + if (fastDraw && !isView && !Util.is8Bit(lines[lineNo])) + fastDraw = false; + measurer = new LineBreakMeasurer(iter, g2D.getFontRenderContext()); + while (measurer.getPosition() < iter.getEndIndex()) // print element + { + TextLayout layout = measurer.nextLayout(netWidth + 2); + if (iter.getEndIndex() != measurer.getPosition()) fastDraw = false; - } - penY += layout.getAscent(); - float penX = curX; - if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Center)) - penX += (netWidth-layout.getAdvance())/2; - else if ((alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight) && layout.isLeftToRight()) - || (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft) && !layout.isLeftToRight())) - penX += netWidth-layout.getAdvance(); - // - if (fastDraw) - { // Bug - set Font/Color explicitly - g2D.setFont(getFont(row, col)); - if (isView && printItems[index] instanceof NamePair) // ID + float lineHeight = layout.getAscent() + layout.getDescent() + layout.getLeading(); + if ((m_columnMaxHeight[col] <= 0 + || (usedHeight + lineHeight) <= m_columnMaxHeight[col]) + && (usedHeight + lineHeight) <= netHeight) + { + if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Block) && measurer.getPosition() < iter.getEndIndex()) { - g2D.setColor(LINK_COLOR); - // TextAttribute.UNDERLINE + layout = layout.getJustifiedLayout(netWidth + 2); + fastDraw = false; + } + penY += layout.getAscent(); + float penX = curX; + if (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_Center)) + penX += (netWidth-layout.getAdvance())/2; + else if ((alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_TrailingRight) && layout.isLeftToRight()) + || (alignment.equals(MPrintFormatItem.FIELDALIGNMENTTYPE_LeadingLeft) && !layout.isLeftToRight())) + penX += netWidth-layout.getAdvance(); + // + if (fastDraw) + { // Bug - set Font/Color explicitly + g2D.setFont(getFont(row, col)); + if (isView && printItems[index] instanceof NamePair) // ID + { + g2D.setColor(LINK_COLOR); + // TextAttribute.UNDERLINE + } + else + g2D.setColor(getColor(row, col)); + g2D.drawString(iter, penX, penY); } else - g2D.setColor(getColor(row, col)); - g2D.drawString(iter, penX, penY); + layout.draw(g2D, penX, penY); // -> text + if (DEBUG_PRINT) + log.fine("row=" + row + ",col=" + col + " - " + str + " - x=" + penX + ",y=" + penY); + penY += layout.getDescent() + layout.getLeading(); + usedHeight += lineHeight; + // + if (m_columnMaxHeight[col] == -1) // FirstLineOny + break; } - else - layout.draw(g2D, penX, penY); // -> text - if (DEBUG_PRINT) - log.fine("row=" + row + ",col=" + col + " - " + str + " - x=" + penX + ",y=" + penY); - penY += layout.getDescent() + layout.getLeading(); - usedHeight += lineHeight; - // - if (m_columnMaxHeight[col] == -1) // FirstLineOny - break; - } - } // print element - } // for all lines - } // length > 0 - } // non boolean - } // for all print items + } // print element + } // for all lines + } // length > 0 + } // non boolean + } // for all print items + } // not suppressed curY += netHeight + V_GAP; curX += netWidth + H_GAP; diff --git a/migration/352a-trunk/305_FR2148808_SuppressRepeats.sql b/migration/352a-trunk/305_FR2148808_SuppressRepeats.sql new file mode 100644 index 0000000000..f6d1929ef8 --- /dev/null +++ b/migration/352a-trunk/305_FR2148808_SuppressRepeats.sql @@ -0,0 +1,41 @@ +-- 3/10/2008 16:15:23 +-- Financial reporting improvements +INSERT INTO AD_Element (AD_Org_ID,AD_Client_ID,AD_Element_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,0,53691,'IsSuppressRepeats',TO_DATE('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Suppress Repeats','Suppress Repeats',TO_DATE('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 3/10/2008 16:15:23 +-- Financial reporting improvements +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53691 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 3/10/2008 16:15:52 +-- Financial reporting improvements +INSERT INTO AD_Column (AD_Org_ID,AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,0,56359,53691,20,489,'IsSuppressRepeats',TO_DATE('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D',1,'Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Suppress Repeats',0,TO_DATE('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +-- 3/10/2008 16:15:52 +-- Financial reporting improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56359 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 3/10/2008 16:19:40 +-- Financial reporting improvements +INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Client_ID,AD_Field_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (56359,0,0,56378,426,TO_DATE('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.',1,'@IsForm@=N & @PrintFormatType@=F','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','Y','N','N','N','N','Y','Suppress Repeats',115,TO_DATE('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 3/10/2008 16:19:40 +-- Financial reporting improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56378 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 3/10/2008 16:33:36 +-- Financial reporting improvements +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2008-10-03 16:33:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359 +; + +-- 3/10/2008 16:33:41 +-- Financial reporting improvements +UPDATE AD_Column SET DefaultValue='N',Updated=TO_DATE('2008-10-03 16:33:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359 +; + +alter table ad_printformatitem add column IsSuppressRepeats CHAR(1) DEFAULT 'N' CHECK (IsSuppressRepeats IN ('Y','N')) NOT NULL; diff --git a/migration/352a-trunk/postgresql/305_FR2148808_SuppressRepeats.sql b/migration/352a-trunk/postgresql/305_FR2148808_SuppressRepeats.sql new file mode 100644 index 0000000000..5c2325fd7c --- /dev/null +++ b/migration/352a-trunk/postgresql/305_FR2148808_SuppressRepeats.sql @@ -0,0 +1,41 @@ +-- 3/10/2008 16:15:23 +-- Financial reporting improvements +INSERT INTO AD_Element (AD_Org_ID,AD_Client_ID,AD_Element_ID,ColumnName,Created,CreatedBy,Description,EntityType,Help,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,0,53691,'IsSuppressRepeats',TO_TIMESTAMP('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Suppress Repeats','Suppress Repeats',TO_TIMESTAMP('2008-10-03 16:15:17','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 3/10/2008 16:15:23 +-- Financial reporting improvements +INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Description,Help,Name,PO_Description,PO_Help,PO_Name,PO_PrintName,PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Element_ID, t.Description,t.Help,t.Name,t.PO_Description,t.PO_Help,t.PO_Name,t.PO_PrintName,t.PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=53691 AND EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Element_ID!=t.AD_Element_ID) +; + +-- 3/10/2008 16:15:52 +-- Financial reporting improvements +INSERT INTO AD_Column (AD_Org_ID,AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,Description,EntityType,FieldLength,Help,IsActive,IsAllowLogging,IsAlwaysUpdateable,IsAutocomplete,IsEncrypted,IsIdentifier,IsKey,IsMandatory,IsParent,IsSelectionColumn,IsSyncDatabase,IsTranslated,IsUpdateable,Name,SeqNo,Updated,UpdatedBy,Version) VALUES (0,0,56359,53691,20,489,'IsSuppressRepeats',TO_TIMESTAMP('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.','D',1,'Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','N','N','N','N','N','N','N','N','N','N','Y','Suppress Repeats',0,TO_TIMESTAMP('2008-10-03 16:15:50','YYYY-MM-DD HH24:MI:SS'),100,1) +; + +-- 3/10/2008 16:15:52 +-- Financial reporting improvements +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=56359 AND EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Column_ID!=t.AD_Column_ID) +; + +-- 3/10/2008 16:19:40 +-- Financial reporting improvements +INSERT INTO AD_Field (AD_Column_ID,AD_Org_ID,AD_Client_ID,AD_Field_ID,AD_Tab_ID,Created,CreatedBy,Description,DisplayLength,DisplayLogic,EntityType,Help,IsActive,IsCentrallyMaintained,IsDisplayed,IsEncrypted,IsFieldOnly,IsHeading,IsReadOnly,IsSameLine,Name,SeqNo,Updated,UpdatedBy) VALUES (56359,0,0,56378,426,TO_TIMESTAMP('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100,'Suppress repeated elements in column.',1,'@IsForm@=N & @PrintFormatType@=F','D','Determines whether repeated elements in a column are repeated in a printed table.','Y','Y','Y','N','N','N','N','Y','Suppress Repeats',115,TO_TIMESTAMP('2008-10-03 16:19:39','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- 3/10/2008 16:19:40 +-- Financial reporting improvements +INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Description,Help,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Field_ID, t.Description,t.Help,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=56378 AND EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language!=l.AD_Language OR tt.AD_Field_ID!=t.AD_Field_ID) +; + +-- 3/10/2008 16:33:36 +-- Financial reporting improvements +UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2008-10-03 16:33:36','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359 +; + +-- 3/10/2008 16:33:41 +-- Financial reporting improvements +UPDATE AD_Column SET DefaultValue='N',Updated=TO_TIMESTAMP('2008-10-03 16:33:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56359 +; + +alter table ad_printformatitem add column IsSuppressRepeats CHAR(1) DEFAULT 'N' CHECK (IsSuppressRepeats IN ('Y','N')) NOT NULL;