Account hierarchical numbering
Mike or Penny Novack
stepbystepfarm at mtdata.com
Tue Feb 22 08:18:07 EST 2011
Fiable.biz wrote:
>Mongolia, city of Precious (Эрдэнэт)
>
>Hello.
>
>The Mongolian official accounts numberings is hierarchical, like "1.2.1". If
>we enter such numbers, they are treated alphabetically, i.e. 1.2.11 is
>sorted before 1.2.2, while it should be after. Is there a way to use
>hierarchical numbering except from introducing zeros everywhere, like
>"1.2.02"? This would be a useful feature probably easy to implement.
>
>Moreover, we would like to have these numbers appear in the reports and in
>the account tab (as a separate column). Isn't it possible?
>
>Thank you in advance.
>
>
Meanwhile (workaround for the sorting order)
Are you forbidden to write numbers with lead zeros? If not, the problem
is very easily solved. All you need to do is decide the maximum range of
numerical values you would need in each "field" (what order of
magnitude; aka, the maximum number of digits) and then write your
account numberings accordingly -- with leading zeros.
Example:
Had you decided "two orders enough" and you had written "1.2.2" as
"01.02.02" and "1.2.11" as "01.02.11" it would have collated correctly
Michael D Novack, FLMI
(ROFLOL -- you can't even guess how many times I have had to help
programmers who were mystified by a mis sorting caused by a field being
treated by the compiler as "alphameric" rather than "numeric".)
More information about the gnucash-user
mailing list