Search This Blog

Format Amount in Indian Style on Navision - RDLC

Unlike the Arab styling of numbers which places a comma on each thousand (1000’s), the Indian way of styling numbers is different and is used only by India, Nepal, Pakistan, Bangladesh and Sri Lanka.
Currently, NAV does not support the Indian Numbering Style on Reports or must I say that RDLC doesn’t have any provision.
The following piece of code enables you to format Amounts in Indian Style of Numbering.
______________________________________________________________________
Variables
NameDataTypeSubtypeLength
AmtInTextText50
DecPlacesText3
StopBoolean
DummyAmtDecimal
DummAmtInTextText50
iInteger
DivByInteger
_____________________________________________________________________
Code
DecPlaces := ‘.00’;
AmtInText := FORMAT(Amt);
AmtInText := DELCHR(AmtInText,’=’,’,’);
IF STRPOS(AmtInText,’.’) 0 THEN BEGIN
   AmtInText := COPYSTR(AmtInText,1,STRPOS(AmtInText,’.’)-1);
   DecPlaces := COPYSTR(AmtInText,STRPOS(AmtInText,’.’),STRLEN(AmtInText));
END;

RetAmtVal := FORMAT(Amt);
RetAmtVal := DELCHR(RetAmtVal,’=’,’,’);
i := 1;
DivBy := 1000;
REPEAT
   CLEAR(DummAmtInText);
   CLEAR(DummyAmt);
   IF i = 1 THEN BEGIN
      DummyAmt := Amt/DivBy;
       i +=1;
   END ELSE BEGIN
      DivBy := DivBy * 100;
      DummyAmt := Amt/DivBy;
      i +=1;
   END;
   IF DummyAmt < 1 THEN
      Stop := TRUE
   ELSE BEGIN
      DummAmtInText := FORMAT(DummyAmt);
      DummAmtInText := DELCHR(DummAmtInText,’=’,’,’);
      IF STRPOS(DummAmtInText,’.’) 0 THEN
         DummAmtInText := COPYSTR(DummAmtInText,1,STRPOS(DummAmtInText,’.’)-1);
      RetAmtVal := INSSTR(RetAmtVal,’,’,STRLEN(DummAmtInText) + 1);
   END;
UNTIL Stop;
RetAmtVal := RetAmtVal + DecPlaces;

Resolved - Post GST Reconciliation Bug in Dynamics NAV IN Build 9.00.48466

This bug came to us when we posted an GST settlement entry and our General Ledger Setup was deleted.

Yes, that`s really a big problem as General Ledger Setup is the most important part of Navision.

We tried to debug the process & find the code but was not getting anywhere.

But just as we were about to give up, we noticed that there was a field in Table ID - 16433 (GST Reconciliation) -  "GST Recon. Tolerance" in which if a value is validated then only General Ledger Setup was getting deleted.

We checked the code on the - OnValidate() Trigger of the field on the table given below is what we found -


Solution : Remove the code from OnValidate() Trigger of field "GST Recon. Tolerance" from Table ID - 16433 (GST Reconciliation).