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

Re: recommended default values



On 10/18/07, Pongracz Istvan <..hidden..> wrote:
> Hi,
>
> I modified the Hungarian chart a little bit.
>
> I expected, if I write a number to the 'defaults' table (when I install
> the Hungarian chart) and I add a new customer later (employee, part,
> vendor etc.), the value increments and after it will be assigned to the
> item.
>
> Example:
> I wrote AA10001 into the defaults table (Hungary-chart.sql):
> UPDATE defaults SET value = 'AA10001'    WHERE setting_key = 'sqnumber';
>
> I add a new sales quotation (the first one), it get the AA10002 value.
>
> I did the same, but everywhere where I tried, the default value first
> increments, and after it will be assigned to the entity.

Yes, this is the way it works..  It isn;t that different from the way
nextval() works in PostgreSQL.
>
> If this is the normal method, should I put AA10000 for initial value
> during the install?

Yes

> I assume the answer is yes, I can. So, I modify all initial values as
> you can see here:
> UPDATE defaults SET value = 'VK00000'    WHERE setting_key = 'glnumber';
>  UPDATE defaults SET value = 'VSZ10000'   WHERE setting_key =
> 'sinumber';
>  UPDATE defaults SET value = 'SZSZ10000'  WHERE setting_key =
> 'vinumber';
>  UPDATE defaults SET value = 'BR10000'    WHERE setting_key =
> 'ponumber';
>  UPDATE defaults SET value = 'VR10000'    WHERE setting_key =
> 'sonumber';
>  UPDATE defaults SET value = 'AA10000'    WHERE setting_key =
> 'sqnumber';
>  UPDATE defaults SET value = 'AK10000'    WHERE setting_key =
> 'rfqnumber';
>  UPDATE defaults SET value = 'ALK0000'    WHERE setting_key =
> 'employeenumber';
>  UPDATE defaults SET value = 'VEVO10000'  WHERE setting_key =
> 'customernumber';
>  UPDATE defaults SET value = 'SZALL10000' WHERE setting_key =
> 'vendornumber';
>  UPDATE defaults SET value = 'PROJ10000'  WHERE setting_key =
> 'projectnumber';
>
> I want that, the first number starts from 1, like AA10001, VEVO100001
> etc.
>
> Please confirm, my theory practically working :)
>
> Regards,
> István
> --
> eGroupWare, gLiveCD, gentoo és barátai
> http://www.osbusiness.hu
> „A humor a méltóság támasza, fölényünket hirdeti
> mindazzal szemben, amit a sors ránk mér."
> (Romain Gary)
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> _______________________________________________
> Ledger-smb-devel mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>