Re: [Ledger-smb-users] sorting invoice numbers by numerical order

2010-02-16 Thread Chris Travers
On Tue, Feb 16, 2010 at 2:23 PM, Luke wrote: > Does psql have anything along the lines of the MySQL convert builtin? > > If so, running the following probably works: > > select ... order by convert(invnumber as unsigned) asc; > > In MySQL, at least, that properly sorts: > > 2 > 1 > 10 > 9C > > in

Re: [Ledger-smb-users] sorting invoice numbers by numerical order

2010-02-16 Thread Luke
This discussion has reminded me of an annoying quirk. Well, having to compensate for it last night also reminded me of it. 1 as the default, might get me: 2010011 2010012 2010013 2010024 2010025 Whereas I would expect: 2010011 2010012 2010013 2010021 2

Re: [Ledger-smb-users] sorting invoice numbers by numerical order

2010-02-16 Thread Luke
On Tue, 16 Feb 2010, Chris Travers wrote: On Mon, Feb 15, 2010 at 9:58 PM, Bob Miller wrote: There was some chat a while ago with regards to sorting by description, and the two suggestions were to sort the query in the sql statement before producing the html page, and the other was to use java

Re: [Ledger-smb-users] sorting invoice numbers by numerical order

2010-02-16 Thread Stroller
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 > 102 > 103 > 104 > 105 > 106 > 107 > 108 > 109 > 11 > 110 > 111 > > and so on. Is there a way to make it so invoices 11-99 comes *before

Re: [Ledger-smb-users] lsmb department template variable

2010-02-16 Thread Armaghan Saqib
On Tue, Feb 16, 2010 at 9:08 PM, Armaghan Saqib wrote: > $form->{department} = split /--/, $form->{department}; Above is bit incorrect. ($form->{department}) = split /--/, $form->{department}; Regards Armaghan -- - Sql-Ledger hosting, docs and development - http://www.ledger123.com/ --

Re: [Ledger-smb-users] sorting invoice numbers by numerical order

2010-02-16 Thread Chris Travers
On Mon, Feb 15, 2010 at 9:58 PM, Bob Miller wrote: > Hello list, > I hope you are all having a pleasant day... > There was some chat a while ago with regards to sorting by description, > and the two suggestions were to sort the query in the sql statement > before producing the html page, and the o

Re: [Ledger-smb-users] lsmb department template variable

2010-02-16 Thread Armaghan Saqib
On Tue, Feb 16, 2010 at 1:47 PM, Luke wrote: > If I use: > > > > in a template (at least, an HTML template--presumably others as well), I > get the name of the department, two dashes, and a 5 digit number which > looks very much like an ID which the customer should not be seeing. > > Is there a w

[Ledger-smb-users] lsmb department template variable

2010-02-16 Thread Luke
If I use: in a template (at least, an HTML template--presumably others as well), I get the name of the department, two dashes, and a 5 digit number which looks very much like an ID which the customer should not be seeing. Is there a way to pull just the name of a department? Luke --