Problem with Order No. Generation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with Order No. Generation

Ajey
Hi all, I've truncated all of my previous order data from the database but whenever I'm creating a new Order, an Order No. is being generated after my previous order no. like WS10370 etc. It should start generating the Order No. from WS10000. Also, whenever I close and restarts my server a gap of 10 Order No. appears for my new Order. It means if it was WS10370 earlier and I closed the server and restarted again to create a new Order, a new Order is being generated with an Order No. WS10380, it bunks 10 Order No. which should not. Where I can customize all these settings regarding Order No. Please help me, I need the solution desperately. Thanx in advance, Ajey.
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

hans_bakker
These values are stored in the PartyAcctgPreference entity and can be
updated with webtools.


On Sun, 2008-02-10 at 00:08 -0800, Ajey wrote:

> Hi all,
>
> I've truncated all of my previous order data from the database but whenever
> I'm creating a new Order, an Order No. is being generated after my previous
> order no. like WS10370 etc. It should start generating the Order No. from
> WS10000.
>
> Also, whenever I close and restarts my server a gap of 10 Order No. appears
> for my new Order. It means if it was WS10370 earlier and I closed the server
> and restarted again to create a new Order, a new Order is being generated
> with an Order No. WS10380, it bunks 10 Order No. which should not.
>
> Where I can customize all these settings regarding Order No.
>
> Please help me, I need the solution desperately.
>
> Thanx in advance,
> Ajey.
>
--
AntWebsystems.com: Quality OFBiz services for competitive rates.....

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

Ajey
Thanx Hansbak, I explored that PartyAcctgPreferece entity is responsible for all these which is used in the OrderServices.XML for simple method getNextOrderId. I checked for the value in my database but only one record is there having no last order no. so, where I've to make changes. Sorry, I'm asking the things at raw level as it was confusing to me. Also, where I've to customize that gapping of Order No. on server restart?
hansbak wrote
These values are stored in the PartyAcctgPreference entity and can be updated with webtools. On Sun, 2008-02-10 at 00:08 -0800, Ajey wrote: > Hi all, > > I've truncated all of my previous order data from the database but whenever > I'm creating a new Order, an Order No. is being generated after my previous > order no. like WS10370 etc. It should start generating the Order No. from > WS10000. > > Also, whenever I close and restarts my server a gap of 10 Order No. appears > for my new Order. It means if it was WS10370 earlier and I closed the server > and restarted again to create a new Order, a new Order is being generated > with an Order No. WS10380, it bunks 10 Order No. which should not. > > Where I can customize all these settings regarding Order No. > > Please help me, I need the solution desperately. > > Thanx in advance, > Ajey. > -- AntWebsystems.com: Quality OFBiz services for competitive rates.....
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

Ajey
In reply to this post by hans_bakker
Hi Hansbak, Tried to see inside the PartyAcctgPreference entity, but there is only one record present ans inside that there was a field having name lastOrderNo. This field is containing 0 (zero). Now, please tell me how I can reset the order id generation so that it can again continue from out defined Order No. Please tell me if some other customization is there as I need this in my application urgently. Also a gap of ten (10) order No. occurs when I restart my server. From where we can customize this setting so that Order Id generation can be continuous. Thanx in advance.
hansbak wrote
These values are stored in the PartyAcctgPreference entity and can be updated with webtools. On Sun, 2008-02-10 at 00:08 -0800, Ajey wrote: > Hi all, > > I've truncated all of my previous order data from the database but whenever > I'm creating a new Order, an Order No. is being generated after my previous > order no. like WS10370 etc. It should start generating the Order No. from > WS10000. > > Also, whenever I close and restarts my server a gap of 10 Order No. appears > for my new Order. It means if it was WS10370 earlier and I closed the server > and restarted again to create a new Order, a new Order is being generated > with an Order No. WS10380, it bunks 10 Order No. which should not. > > Where I can customize all these settings regarding Order No. > > Please help me, I need the solution desperately. > > Thanx in advance, > Ajey. > -- AntWebsystems.com: Quality OFBiz services for competitive rates.....
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

hans_bakker
I was in the understanding it was generated from this field. If you
think it is not, feel free to create a Jira issue for it.


On Mon, 2008-02-11 at 21:18 -0800, Ajey wrote:

> Hi Hansbak,
> Tried to see inside the PartyAcctgPreference entity, but there is only one
> record present ans inside that there was a field having name lastOrderNo.
> This field is containing 0 (zero). Now, please tell me how I can reset the
> order id generation so that it can again continue from out defined Order No.
> Please tell me if some other customization is there as I need this in my
> application urgently. Also a gap of ten (10) order No. occurs when I restart
> my server. From where we can customize this setting so that Order Id
> generation can be continuous.
> Thanx in advance.
>
>
>
>
> hansbak wrote:
> >
> > These values are stored in the PartyAcctgPreference entity and can be
> > updated with webtools.
> >
> >
> > On Sun, 2008-02-10 at 00:08 -0800, Ajey wrote:
> >> Hi all,
> >>
> >> I've truncated all of my previous order data from the database but
> >> whenever
> >> I'm creating a new Order, an Order No. is being generated after my
> >> previous
> >> order no. like WS10370 etc. It should start generating the Order No. from
> >> WS10000.
> >>
> >> Also, whenever I close and restarts my server a gap of 10 Order No.
> >> appears
> >> for my new Order. It means if it was WS10370 earlier and I closed the
> >> server
> >> and restarted again to create a new Order, a new Order is being generated
> >> with an Order No. WS10380, it bunks 10 Order No. which should not.
> >>
> >> Where I can customize all these settings regarding Order No.
> >>
> >> Please help me, I need the solution desperately.
> >>
> >> Thanx in advance,
> >> Ajey.
> >>
> > --
> > AntWebsystems.com: Quality OFBiz services for competitive rates.....
> >
> >
> >
>
--
AntWebsystems.com: Quality OFBiz services for competitive rates.....

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

hans_bakker
In reply to this post by Ajey
I looked into the code...(orderservices.xml) and there i found you have
to set this field with an initial value......


On Mon, 2008-02-11 at 21:18 -0800, Ajey wrote:

> Hi Hansbak,
> Tried to see inside the PartyAcctgPreference entity, but there is only one
> record present ans inside that there was a field having name lastOrderNo.
> This field is containing 0 (zero). Now, please tell me how I can reset the
> order id generation so that it can again continue from out defined Order No.
> Please tell me if some other customization is there as I need this in my
> application urgently. Also a gap of ten (10) order No. occurs when I restart
> my server. From where we can customize this setting so that Order Id
> generation can be continuous.
> Thanx in advance.
>
>
>
>
> hansbak wrote:
> >
> > These values are stored in the PartyAcctgPreference entity and can be
> > updated with webtools.
> >
> >
> > On Sun, 2008-02-10 at 00:08 -0800, Ajey wrote:
> >> Hi all,
> >>
> >> I've truncated all of my previous order data from the database but
> >> whenever
> >> I'm creating a new Order, an Order No. is being generated after my
> >> previous
> >> order no. like WS10370 etc. It should start generating the Order No. from
> >> WS10000.
> >>
> >> Also, whenever I close and restarts my server a gap of 10 Order No.
> >> appears
> >> for my new Order. It means if it was WS10370 earlier and I closed the
> >> server
> >> and restarted again to create a new Order, a new Order is being generated
> >> with an Order No. WS10380, it bunks 10 Order No. which should not.
> >>
> >> Where I can customize all these settings regarding Order No.
> >>
> >> Please help me, I need the solution desperately.
> >>
> >> Thanx in advance,
> >> Ajey.
> >>
> > --
> > AntWebsystems.com: Quality OFBiz services for competitive rates.....
> >
> >
> >
>
--
AntWebsystems.com: Quality OFBiz services for competitive rates.....

Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

Ajey
I got that but as per my concepts, the code is fetching values from the PartyAcctgPreference entity and increasing the value of partyAcctgPreference.lastOrderNumber by 1. Now, nowhere I'm able to find out the place where I can put the initial Order No. Also, there is no definition of that gap of 10 record no. which occurs on server startup. If next order no. is being generated from this piece of code, from which variable it is getting the previous retained value.
hansbak wrote
I looked into the code...(orderservices.xml) and there i found you have to set this field with an initial value...... On Mon, 2008-02-11 at 21:18 -0800, Ajey wrote: > Hi Hansbak, > Tried to see inside the PartyAcctgPreference entity, but there is only one > record present ans inside that there was a field having name lastOrderNo. > This field is containing 0 (zero). Now, please tell me how I can reset the > order id generation so that it can again continue from out defined Order No. > Please tell me if some other customization is there as I need this in my > application urgently. Also a gap of ten (10) order No. occurs when I restart > my server. From where we can customize this setting so that Order Id > generation can be continuous. > Thanx in advance. > > > > > hansbak wrote: > > > > These values are stored in the PartyAcctgPreference entity and can be > > updated with webtools. > > > > > > On Sun, 2008-02-10 at 00:08 -0800, Ajey wrote: > >> Hi all, > >> > >> I've truncated all of my previous order data from the database but > >> whenever > >> I'm creating a new Order, an Order No. is being generated after my > >> previous > >> order no. like WS10370 etc. It should start generating the Order No. from > >> WS10000. > >> > >> Also, whenever I close and restarts my server a gap of 10 Order No. > >> appears > >> for my new Order. It means if it was WS10370 earlier and I closed the > >> server > >> and restarted again to create a new Order, a new Order is being generated > >> with an Order No. WS10380, it bunks 10 Order No. which should not. > >> > >> Where I can customize all these settings regarding Order No. > >> > >> Please help me, I need the solution desperately. > >> > >> Thanx in advance, > >> Ajey. > >> > > -- > > AntWebsystems.com: Quality OFBiz services for competitive rates..... > > > > > > > -- AntWebsystems.com: Quality OFBiz services for competitive rates.....
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

Bilgin Ibryam
In reply to this post by Ajey
Hi Ajey,

take a look at SequenceValueItem entity. It keeps the latest Id indexes per entity.

I would advice you not to change any of these entity-engine specific stuff, but you can do it from SequenceUtil.java

        public static final long defaultBankSize = 10;
        public static final long startSeqId = 10000;

Good luck,
Bilgin
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

Ajey
Thanx Bilgin, it seems your suggested solutions are very close to my requirements. But please clear the fact that is this the defaultBankSize which creates a gap of 10 records on every startup? I found that SequenceValueItem entity hold values those are equal to last value+defaultBankSize.
Bilgin Ibryam wrote
Hi Ajey, take a look at SequenceValueItem entity. It keeps the latest Id indexes per entity. I would advice you not to change any of these entity-engine specific stuff, but you can do it from SequenceUtil.java public static final long defaultBankSize = 10; public static final long startSeqId = 10000; Good luck, Bilgin
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Order No. Generation

Bilgin Ibryam
I think it is... but you could check SequenceUtil.java to be sure