Search your query

Thursday, January 26, 2023

Place various No. of Decimal for Unit Price or Purchase price value, Based on the Legal Entity


Here we are taking the example of Purchase order and we required No of decimals into 4 decimal places for Purchase price for particular Legal Entity - "USMF". Other legal entities are based EDT decimals.

Example: X++ code to display only 4 decimals for particular company:

[ExtensionOf(formStr(PurchTable))]

internal final class PurchTableTFPayrollForm_Extension

{

    [Hookable(false)]

    public void init()

    {

        FormRun callerForm;

        FormRealControl purchPriceField;

        next init();

        if (curExt() == "USMF")

        {

            purchPriceField = this.design().controlName("PurchLine_PurchPriceGrid");

            purchPriceField.noOfDecimals(4);

        }

    }

}


No comments:

Post a Comment