Skip to content

Issue #2684 - Multiple currency symbol Web UI support#2688

Open
homedirectory wants to merge 34 commits intoIssue-#2677from
Issue-#2684
Open

Issue #2684 - Multiple currency symbol Web UI support#2688
homedirectory wants to merge 34 commits intoIssue-#2677from
Issue-#2684

Conversation

@homedirectory
Copy link
Copy Markdown
Member

@homedirectory homedirectory commented Mar 25, 2026

Resolve #2684
Resolve #2682

To be completed by the pull request creator

This section should be completed with reference to section Preparing PR of the Code and PR reviews wiki page.

  • Create the pull request as a draft by tapping the dropdown arrow on the 'Create pull request' button under the pull request description (below the text box where this description is being edited) and changing the default Create pull request to Draft pull request.
    Or, if the pull request has already been created, convert it to draft by tapping the "Convert to draft" link beneath the "Reviewers" section.

  • A self-review of all changes has been completed, and the changes are in sync with the issue requirements.

  • Changes to the requirements have been reflected in the issue description.

  • Any "leftovers" such as sysouts, printing of stack traces, and any other "temporary" code, have been removed.

  • Minor refactorings, such as renamings, extraction of constants, etc., have been addressed.

  • Developer documentation (e.g., comments, Javadoc), have been provided where required.

  • New Java tests have been written or existing tests adjusted, if required, to cover the new functionality.

  • All existing and new Java tests pass successfully by running them with Maven.

  • New Web tests have been written or existing tests adjusted, if required, to cover the new functionality.

  • All existing and new Web tests pass successfully.

  • Established security practices have been followed, including the existence and attribution of security tokens.

  • Changes have been inspected for possible NPE situations, and the changes are sufficiently defensive.

  • The correct base branch has been selected for these changes to be merged into.

  • The latest changes from the base branch have already been merged into this feature branch (and tested).

  • Added a change overview to the issue description or as a wiki page, referenced in the issue description.
    Some issues might be very descriptive and serve in place of a wiki page.
    In such cases consider adding label Wiki like to the issue.

  • Changes subject to performance considerations have been evaluated, and tested against production-size data if applicable.

  • This pull request does contain significant changes, the section "Significant changes" below is completed and at least one Senior Software Engineer with the relevant area of expertise has been selected as reviewer.

  • The In progress label has been removed from the issue.

  • The Pull request label has been added to the issue.

  • The pull request has been made ready for review by tapping the "Ready for review" button below the list of commits on the pull request page.

Significant changes

This pull request changes how money properties are formatted and displayed in money editors and entity editors for entities with a money key member. It also enhances generation of expressions for composite keys to match the client-side entity editor representation.

This pull request contains significant changes as defined in the wiki page.

Details are as follows:

Please carefully review the following classes and elements:

  • tg-money-editor
  • tg-numeric-utils
  • tg-reflector, especially how key members are converted into string values
  • WorkbookExporter, focusing on how money properties are converted into strings, which currency is used, and whether it is consistent throughout the application
  • CompositeKeyEqExpressionGenerator class and its unit tests
  • Pay attention to the logic that loads the configuration of currency codes and symbols, and where it is bound in the BasicWebServerIocModule class

To be completed by the pull request reviewer

This section should be completed with reference to section Performing PR review of the Code and PR reviews wiki page.

  • The In progress label has been added to the pull request in GitHub.

  • The issue requirements have been read and understood (along with any relevant emails and/or Slack messages).

  • The correct base branch is specified, and that base branch is up-to-date in the local source.

  • The issue branch has been checked out locally, and had the base branch merged into it.

  • All automated tests pass successfully.

  • Ensure the implementation satisfies the functional requirements.

  • Ensure that code changes are secure and align with the established coding practices, including code formatting and naming conventions.

  • Ensure that code changes are documented and covered with automated tests as applicable.

  • Ensure that code changes are well-suited for informal reasoning.

  • Ensure that changes are documented for the end-user (a software engineer in the case of TG, or an application user in the case of TG-based applications).

  • If there are significant changes (described above), special attention has been paid to them.
    Marked the task items in section "Significant changes" as completed to indicate that corresponding changes have been reviewed, improved if necessary, and approved.

  • The issue or issues addressed by the pull request are associated with the relevant release milestone.

To be completed by the pull request reviewer once the changes have been reviewed and accepted

  • The changes have been merged into the base branch (unless there is a specific request not to do so, e.g., they are to be released to SIT).

  • The issue branch has been deleted (unless the changes have not been merged - see above, or there is a specific request not to do so).

  • The In progress label has been removed from the pull request.

  • The Pull request label has been removed from the issue.

oleh-maikovych and others added 22 commits March 17, 2026 18:41
…configuration option for TG_APP constant. Enhanced numeric utils to format money with correct currency symbol. Enhanced reflector to properly compare money values. Enhanced money editor to display correct currency symbol in input layer.
…lid values. Minor documentation adjustments.
…t runtime

The JDBC dependencies for PostgreSQL and SQL Server are currently declared with scope "provided".
The official Maven documentation says that "provided" dependencies are not added to the runtime classpath.
And they indeed do not get added when a class from the _main sources_ is launched.
Because of this, launching PopulateDb requires the "provided" scope to be temporarily changed to
"compile" or "runtime" (every single time...).

Although the official Maven documentation is not clear about this, "provided" dependencies get added
to the runtime classpath of _test sources_.
Therefore, having PopulateDb among tests sources enables it to be launched without any extra effort.
Simplification to improve reasoning.

Also, the new implementation better covers a rare case where there are two key members and both are optional
and the first one is null.
Previously, this would result in an SQL query that returns not a string, but the second key member directly.
I.e., it could be any data type.
However, this did not have an effect when fetching entities because property `key` itself is not fetched,
but individual key members are, to be later combined into a DynamicEntityKey instance.
Using unicode strings constrains the use of autocompleters.
E.g., entering "$ 5" will produce no results even if there are records with currency USD and amount 5.

Note that the formatting of standalone Money values remains unchanged.
@homedirectory homedirectory linked an issue Mar 25, 2026 that may be closed by this pull request
4 tasks
…ncy has no mapped symbol

This is to be consistent with the EQL and Web UI Money formatting.
…currency codes to sybmols

This assists with the use of expected EQL expressions in tests.
@oleh-maikovych oleh-maikovych requested review from 01es and jhou-pro April 1, 2026 08:26
@oleh-maikovych oleh-maikovych marked this pull request as ready for review April 1, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple currency symbol Web UI support

2 participants