-
Notifications
You must be signed in to change notification settings - Fork 691
Open
Labels
IntegrationGitHub request for Integration areaGitHub request for Integration areaevent-requestRequest for adding an eventRequest for adding an event
Description
Why do you need this change?
ome recipients and downstream systems require a stable text representation for numeric amounts (for example, always two decimal places such as "58.00" instead of "58"). Although the current internal formatting may be formally correct, customers report interoperability issues.
Describe the request
procedure FormatDecimal(VarDecimal: Decimal): Text[30]
var
FormattedValue: Text[30];
begin
//>Change
//-exit(Format(Round(VarDecimal, 0.01), 0, 9));
FormattedValue := Format(Round(VarDecimal, 0.01), 0, 9);
OnAfterFormatDecimal(VarDecimal, FormattedValue);
exit(FormattedValue);
//>Change
end;
procedure FormatFourDecimal(VarDecimal: Decimal): Text[30]
var
FormattedValue: Text[30];
begin
//>Change
//-exit(Format(Round(VarDecimal, 0.0001), 0, 9));
FormattedValue := Format(Round(VarDecimal, 0.0001), 0, 9);
OnAfterFormatFourDecimal(VarDecimal, FormattedValue);
exit(FormattedValue);
//>Change
end;
procedure FormatFiveDecimal(VarDecimal: Decimal): Text[30]
var
FormattedValue: Text[30];
begin
//>Change
//-exit(Format(Round(VarDecimal, 0.00001), 0, 9));
FormattedValue := Format(Round(VarDecimal, 0.00001), 0, 9);
OnAfterFormatFiveDecimal(VarDecimal, FormattedValue);
exit(FormattedValue);
//>Change
end;[IntegrationEvent(false, false)]
local procedure OnAfterFormatDecimal(Value: Decimal; var FormattedValue: Text)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterFormatFourDecimal(Value: Decimal; var FormattedValue: Text)
begin
end;
[IntegrationEvent(false, false)]
local procedure OnAfterFormatFiveDecimal(Value: Decimal; var FormattedValue: Text)
begin
end;Additional Information
If this issue is approved then I can add the events via Pull Request by myself.
Internal work item: AB#622436
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
IntegrationGitHub request for Integration areaGitHub request for Integration areaevent-requestRequest for adding an eventRequest for adding an event