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

David Carlson david.carlson.417 at gmail.com
Sat May 11 14:27:06 EDT 2013


On 5/11/2013 8:56 AM, Michael Hendry wrote:
> 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
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
>

Michael,

When you are investigating the + sign issue, check to see if it makes a
difference whether you are in the register for the account where you
really want the number incremented (for me that would be a bank account)
or in another register, say a credit card account when you use the +
key.  For payments to credit cards, you could be in either.  I believe
that is the key and in fact GnuCash does remain consistent if the user
is consistent too.  That trips me up sometimes.

David C


More information about the gnucash-user mailing list