setting next invoice number (mysql system)

Maf. King maf at chilwell.net
Mon Apr 19 03:07:18 EDT 2010


On Saturday 17 April 2010 19:38:35 Bill Neely wrote:
> Maybe the fact that you were converting an existing xml data file?????
> Ours is a totally clean installation of 2.3.11

Maybe some (inadvertent) change in 2.3.9 -> 2.3.11?

TBH, I looked in the slots table and couldn't see it at first.  Figuring that 
it _had_ to be somewhere in the db, I looked in various other tables and 
eventually found the counters by doing a grep on the files in the database 
directory.  ( probably something like grep -i invoice *)

Got a "Binary file slots.MYD matches" result, and looked more closely at that 
table with the MySQL command line.

HTH,
Maf.


>
> One thing I have determined is that there is definitely a counter
> somewhere, since the invoices do auto increment a number starting with
> 0000001. We have two companies that we are setting up. And when I load
> the second company database, I get a new set of numbers, so they have to
> be in the mysql file somewhere, I think.
>
> Hope this info is helpful to someone.
>
>
> Bill
>
> http://business-phones.us A professional phone system for your business.
> Bypass the "phone company'.
>
> On 4/17/2010 1:22 AM, Maf. King wrote:
> > On Saturday 17 April 2010 02:15:00 Phil Longstaff wrote:
> >> To tell you the truth, I don't know how I store it either.  It's
> >> possible that it is being stored in the slots which works fine for XML
> >> because when you write the file, the book and its slots are written. 
> >> For SQL, however, the call writing the slots needs to be surrounded by
> >> gnc_book_begin_edit()/gnc_book_commit_edit() to force an update.  I'll
> >> check it out.
> >>
> >>   Phil
> >
> > Hi,
> >
> > I haven't done much with any 2.3.x releases yet, just a bit of
> > experimenting. I did installed 2.3.9 (I think) and opened an existing
> > 2.2.9 data file, which contained invoices.  The gncInvoice counter exists
> > in the slots table in the MySQL db which resulted.
> >
> > Not sure if the OP is starting from a new db or an XML file.
> >
> > Maf.



More information about the gnucash-user mailing list