Search options for Number field treat it as a string, not a number

Michael Hendry hendry.michael at gmail.com
Sat May 11 09:56:18 EDT 2013


On 11 May 2013, at 14:13, Fred Bone <Fred.Bone at dial.pipex.com> wrote:

> On 10 May 2013 at 8:55, Michael Hendry said:
> 
> [...]
>> Can anyone suggest a more reliable way of determining the highest number
>> used in the Number field of any register?
> 
> Why doesn't sorting on the number field do what you need?
> 


Thanks, Fred.

I've found that the answer is to use the General Ledger - as suggested by Derek Atkins.

I should perhaps have made it clear that I wanted to find the highest number which has already been used - in any of the registers, not just the one I'm about to use for an entry.

As I pointed out in my response to Derek's suggestion, this immediately showed up a duplicate transaction number (my error), but also revealed a problem in the use of the + sign to generate the next transaction number.

I'll need to do some experiments on this, but I think that GnuCash must keep track of the last number used in a transaction in any given register - it doesn't check all the numbers and find the largest one each time.

In the screenshot, you'll see that transaction 117923 was a transaction between my bank account and a credit card account. This was done at the end of the last reconciliation of this account, and I suspect the General Ledger is invoked for this transaction.

This would mean that as far as the General Ledger was concerned, the highest transaction number used was 117923, and the + sign would move on to 117924, ignoring subsequent transactions not posted through the General Ledger.

Michael


More information about the gnucash-user mailing list