Indent chart of accounts (error)

zutzuzutzu Member Posts: 86
Hello.
I am introducing the chart of accounts.
There are heading accounts with 1, 2, 3 and 5 digits.
And there are posting accounts with 9 digits.
Por example:
1
10
100
10000
100000001
110


I run "Indent chart of accounts" and get this error:
"The length of account 10000 cannot be different than the next ones".

This problem is relationed with accounts 10000 and 100000001, because if i delete account 100000001, there is no error with account 10000 .

Any idea?

Thanks

Comments

  • SavatageSavatage Member Posts: 7,142
    whay not make them

    example/
    10001
    10010
    10100
    11000
    20001
    20010
    etc etc

    I've personally never seen such wacky g/l account numbers.
  • Scott_FrappierScott_Frappier Member Posts: 90
    zutzu:

    This may be a country specific localization issue, as the NA database has the following code:
    Window.OPEN(Text004);
    
    WITH GLAcc DO
      IF FIND('-') THEN
        REPEAT
          Window.UPDATE(1,"No.");
    
          IF "Account Type" = "Account Type"::"End-Total" THEN BEGIN
            IF i < 1 THEN
              ERROR(
                Text005,
                "No.");
            Totaling := AccNo[i] + '..' + "No.";
            i := i - 1;
          END;
    
          Indentation := i;
          MODIFY;
    
          IF "Account Type" = "Account Type"::"Begin-Total" THEN BEGIN
            i := i + 1;
            AccNo[i] := "No.";
          END;
        UNTIL NEXT = 0;
    
    Window.CLOSE;
    

    There are no text constants that match the error that you have described. What is the version string on codeunit 3?

    I could see a country adding this as SQL Server sorts data types differently than that of C/SIDE...we have run into this many times with customers that convert to SQL Server.

    - Scott
    Scott Frappier
    Vice President, Deployment Operations

    Symbiant Technologies, Inc.
    http://www.symbiantsolutions.com
  • zutzuzutzu Member Posts: 86
    I show you the localization code:


    IF STRLEN("No.") > 4 THEN
    "Account Type" := "Account Type"::Posting
    ELSE
    "Account Type" := "Account Type"::Heading;

    IF "Account Type" = "Account Type"::Heading THEN BEGIN
    //The length of a heading account cannot be greater than 9
    IF STRLEN("No.") > 8 THEN

    You can see that Navision makes all accounts (heading or posting) with more than 4, posting account. I need heading account with 5.
    But, afterwards, Navision looks if the length of a heading account is greater than 8.
    It has no sense, no?

    I will change IF STRLEN("No.") > 4 THEN
    with
    IF STRLEN("No.") > 8 THEN



    Thanks
  • AlbertvhAlbertvh Member Posts: 516
    Hi zutzu

    I think you willhave to change the code this way
    IF STRLEN("No.") > 5 THEN 
      "Account Type" := "Account Type"::Posting 
    ELSE 
      "Account Type" := "Account Type"::Heading; 
    
    IF "Account Type" = "Account Type"::Heading THEN BEGIN 
    //The length of a heading account cannot be greater than 9 
      IF STRLEN("No.") > 9 THEN 
    
    

    Albert
  • Scott_FrappierScott_Frappier Member Posts: 90
    Zutzu:

    I'd personally rip out that code...as it is not very useful in my mind.

    Mind you, I do not know this as it could be something specific (government regulation). Check with Microsoft on why this code is there....

    - Scott
    Scott Frappier
    Vice President, Deployment Operations

    Symbiant Technologies, Inc.
    http://www.symbiantsolutions.com
Sign In or Register to comment.