IDEMPIERE-5652 - Print Format: Format Pattern is not Applied on Grouping/Summary rows (#1762)

This commit is contained in:
Peter Takács 2023-04-02 09:40:10 +02:00 committed by GitHub
parent 022ff3749b
commit 3cb7d395e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -972,7 +972,7 @@ public class DataEngine
{
String valueString = value.toString();
if (value instanceof Timestamp)
valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language).format(value);
valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language, pdc.getFormatPattern()).format(value);
if (format.getTableFormat().isPrintFunctionSymbols()) // Translate Sum, etc.
valueString += PrintDataFunction.getFunctionSymbol(functions[f]);
pd.addNode(new PrintDataElement(pdc.getAD_PrintFormatItem_ID(), pdc.getColumnName(),
@ -1192,7 +1192,7 @@ public class DataEngine
{
String valueString = value.toString();
if (value instanceof Timestamp)
valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language).format(value);
valueString = DisplayType.getDateFormat(pdc.getDisplayType(), m_language, pdc.getFormatPattern()).format(value);
if (format.getTableFormat().isPrintFunctionSymbols()) // Translate Sum, etc.
valueString += PrintDataFunction.getFunctionSymbol(functions[f]);
pd.addNode(new PrintDataElement(pdc.getAD_PrintFormatItem_ID(), pdc.getColumnName(),
@ -1232,6 +1232,8 @@ public class DataEngine
name = Msg.getMsg(format.getLanguage(), PrintDataFunction.getFunctionName(functions[f]));
else
name = PrintDataFunction.getFunctionSymbol(functions[f]); // Symbol
if (m_group.isFunctionColumn(pdc.getAD_PrintFormatItem_ID(), functions[f]))
name += " " + m_group.getValue(PrintDataGroup.TOTAL, pdc.getAD_PrintFormatItem_ID(), functions[f]);
pd.addNode(new PrintDataElement(pdc.getAD_PrintFormatItem_ID(), pdc.getColumnName(), name.trim(),
DisplayType.String, pdc.getFormatPattern()));
}