RN API

RN API

RN: Round a Number (New)

This API call will allow the programmer to pass a numeric value in SCREEN-NUMERIC-FIELD. This field will be rounded based on the type or number of decimals provided and the results will be passed back in SCREEN-NUMERIC FIELD.

Screen Parameters: RN,t

t = T indicates this input field is a quantity field. The number of decimal places for the entry is determined based on the COMPANY-NO-OF-DECIMALS in the Company file.

t = M indicates this input field is an accumulator field. The number of decimal places for the entry is determined based on the COMPANY-NO-OF-DECIMALS-ACCUM in the Company file.

t = C indicates this input field is a cost field. The number of decimal places is determined based on the COMPANY-NO-OF-DECIMALS-COST in the Company file.

t = $ indicates this input field is a price field. The number of decimal places is determined based on the COMPANY-NO-OF-DECIMALS-PRICE in the Company file.

t = 0 through 5 specifies the number of decimals to be rounded to.

NOTE:  Type C for Cost: In versions 7.5 and 8.x of Elliott, there is not a value for Company-No-of-Decimals-Cost. Therefore, we will default to 4 for the number of decimals for a Cost value.

Type $ for Price: In versions 7.5 and 8.x of Elliott, there is not a value for Company-No-of-Decimals-Price. Therefore, we will default to 4 for the number of decimals for a Price value, unless the value of WS-NS5-UNIT-PRICE-2-DEC is “Y” – in that case we will use 2 for the number of Price decimals.

Examples:

API Call

Number of Decimals

Passed Value

Return Value

RN,P

2

1000.13579

1000.14

RN,C

4

1000.13579

1000.1358


 CLS



    • Related Articles

    • CV API

      Release Date: 10/31/2019 This API allows the programmer to determine whether or not thie current company's .DAT files have been converted to .BTR files. Screen-Parameters: CV Check the converted status for the current company. CV,nn Check the ...
    • AP API

      AP API This API returns various values from the Shared Memory Area. For example: MOVE "AP" TO SCREEN-PARAMETERS MOVE "EDITOR" TO SCREEN-LITERAL PERFORM SCREEN-ROUTINE This returns the user’s preferred Editor in SCREEN-ALPHA-FIELD. The following ...
    • DD API Changes (V9.0)

      DD: Drill Down The Drill Down API allows the developer to drill down to another Elliott application. The information provided in SCREEN-PARAMETERS will give the system the correct information to determine if the user has rights to the application ...
    • Avalara Source Code Integration - AV API Call

      Release Date: 11/16/21 Revised: 05/23/22 Version: 8.6 and Above This article is intended for Elliott Business Software developers. This API call will allow the programmer to pass a value to indicate which Avalara function is to be performed. The ...
    • DM API Changes - Use DM,99 to Display Long Messages

      Release Date: 02/05/2024 Version: 8.2 & Up The DM API call is limited to display a message up to 80 digits. For example, you can use the following message to display a message up to 80 digits: MOVE SHORT-MESSAGE TO SCREEN-LITERAL MOVE "DM" TO ...