[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sorting invoice numbers by numerical order



Stroller wrote:
On 16 Feb 2010, at 05:58, Bob Miller wrote:
...
For my installations, when sorting by invoice number, my numbers go like
this:

1
10
100
101
......
109
11
110
111

and so on.  Is there a way to make it so invoices 11-99 comes *before*
100??


I appreciate this may be unhelpful to you at the present time, but this can avoid this by setting the default to "000000" (or is it "000001"?) in defaults when you install LedgerSMB. This causes invoice numbers to be created respecting the leading zeros.

Stroller.


Personally I use this method as Stroller has described.
It should be possible to use an SQL query to pad all Invoice numbers with 0's to achieve this.
If you would like I can look at a small addon for LSMB to let you do this.
Would likely be able to get it done by Friday, as have a fair bit on.

Regards
David G