Order Sequence

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

Order Sequence

Venkat Mangudi
Sales Order and Purchase Order have a common sequence in ofbiz. I am
assuming that this is because there are both stored in the Order table. Is
there anyway of giving them separate sequence numbers?

--
Regards,
Venkat
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Surya Kusumakar-2
Hi Venkat,

For Sales order you can set your preference in Accounting Preferences field
: Order Id Prefix. So all the Sales order numbers will start with your
preferred prefix, like : BMP100001 . Also you can set preference for order
sequence from Accounting preferences.

--
Thanks & Regards
Surya Kusumakar

On Fri, May 18, 2012 at 10:48 AM, Venkat Mangudi <[hidden email]>wrote:

> Sales Order and Purchase Order have a common sequence in ofbiz. I am
> assuming that this is because there are both stored in the Order table. Is
> there anyway of giving them separate sequence numbers?
>
> --
> Regards,
> Venkat
>
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Venkat Mangudi
On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar <[hidden email]
> wrote:

> Hi Venkat,
>
> For Sales order you can set your preference in Accounting Preferences field
> : Order Id Prefix. So all the Sales order numbers will start with your
> preferred prefix, like : BMP100001 . Also you can set preference for order
> sequence from Accounting preferences.
>
>
Thank you, but what I am really looking for is not prefix. I want sales
orders to have their own sequence and purchase orders to have their own
sequence. I suspect that my requirement will be a problem because Orders
(both SO and PO) are stored in Order table. Can the big guns weigh in on
this please?

--
Regards,
Venkat
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

李明洋
my solution is storing the purchase order in another table.

2012/5/18 Venkat Mangudi <[hidden email]>

> On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar <
> [hidden email]
> > wrote:
>
> > Hi Venkat,
> >
> > For Sales order you can set your preference in Accounting Preferences
> field
> > : Order Id Prefix. So all the Sales order numbers will start with your
> > preferred prefix, like : BMP100001 . Also you can set preference for
> order
> > sequence from Accounting preferences.
> >
> >
> Thank you, but what I am really looking for is not prefix. I want sales
> orders to have their own sequence and purchase orders to have their own
> sequence. I suspect that my requirement will be a problem because Orders
> (both SO and PO) are stored in Order table. Can the big guns weigh in on
> this please?
>
> --
> Regards,
> Venkat
>
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Ankit Jain-2
In reply to this post by Venkat Mangudi
SequenceValueItem is the entity where you can set sequence id for an
entity as SO and PO stored in same entity OrderHeader so you can't
change on the basis of OrderType.


Regards,
Ankit Jain



On Fri, May 18, 2012 at 2:34 AM, Venkat Mangudi <[hidden email]> wrote:

> On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar <[hidden email]
>> wrote:
>
>> Hi Venkat,
>>
>> For Sales order you can set your preference in Accounting Preferences field
>> : Order Id Prefix. So all the Sales order numbers will start with your
>> preferred prefix, like : BMP100001 . Also you can set preference for order
>> sequence from Accounting preferences.
>>
>>
> Thank you, but what I am really looking for is not prefix. I want sales
> orders to have their own sequence and purchase orders to have their own
> sequence. I suspect that my requirement will be a problem because Orders
> (both SO and PO) are stored in Order table. Can the big guns weigh in on
> this please?
>
> --
> Regards,
> Venkat
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Adrian Crum-3
In reply to this post by Venkat Mangudi
On 5/18/2012 7:34 AM, Venkat Mangudi wrote:

> On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar<[hidden email]
>> wrote:
>> Hi Venkat,
>>
>> For Sales order you can set your preference in Accounting Preferences field
>> : Order Id Prefix. So all the Sales order numbers will start with your
>> preferred prefix, like : BMP100001 . Also you can set preference for order
>> sequence from Accounting preferences.
>>
>>
> Thank you, but what I am really looking for is not prefix. I want sales
> orders to have their own sequence and purchase orders to have their own
> sequence. I suspect that my requirement will be a problem because Orders
> (both SO and PO) are stored in Order table. Can the big guns weigh in on
> this please?

You can override the createOrderHeader service with your own. Then use
separate sequence names for POs and SOs.

-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Venkat Mangudi
On Fri, May 18, 2012 at 1:27 PM, Adrian Crum <
[hidden email]> wrote:
>
>
> You can override the createOrderHeader service with your own. Then use
> separate sequence names for POs and SOs.
>
>
That is probably what I will be doing. Will create a flag and allow this to
be configured. Once I am done, will send the diff to the dev list.



--
Regards,
Venkat
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Varun Bhansaly
If you are storing orders in the same entity OrderHeader, then you
will have to take measures to prevent PK violations.

On 5/18/12, Venkat Mangudi <[hidden email]> wrote:

> On Fri, May 18, 2012 at 1:27 PM, Adrian Crum <
> [hidden email]> wrote:
>>
>>
>> You can override the createOrderHeader service with your own. Then use
>> separate sequence names for POs and SOs.
>>
>>
> That is probably what I will be doing. Will create a flag and allow this to
> be configured. Once I am done, will send the diff to the dev list.
>
>
>
> --
> Regards,
> Venkat
>


--
Regards,
Varun Bhansaly
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Venkat Mangudi
On Fri, May 18, 2012 at 1:53 PM, varun bhansaly <[hidden email]> wrote:

> If you are storing orders in the same entity OrderHeader, then you
> will have to take measures to prevent PK violations.
>
>
Here's what I had in mind.

A flag will identify if the SO and PO sequences have to be different. A
configuration that must be done. If this flag is true, the admin has to set
seq start values for PO and SO. We can warn the admin to set these
sufficiently apart so that there are no violations. Say 100000 for SO and
500000 for PO.

--
Regards,
Venkat
Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Adrian Crum-3
On 5/18/2012 9:27 AM, Venkat Mangudi wrote:

> On Fri, May 18, 2012 at 1:53 PM, varun bhansaly<[hidden email]>  wrote:
>
>> If you are storing orders in the same entity OrderHeader, then you
>> will have to take measures to prevent PK violations.
>>
>>
> Here's what I had in mind.
>
> A flag will identify if the SO and PO sequences have to be different. A
> configuration that must be done. If this flag is true, the admin has to set
> seq start values for PO and SO. We can warn the admin to set these
> sufficiently apart so that there are no violations. Say 100000 for SO and
> 500000 for PO.

That is not necessary. Just prefix the ID with "PO" or "SO".

Order IDs
---------

SO0001
SO0002
PO0001
PO0002
...


-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Order Sequence

Venkat Mangudi
On Fri, May 18, 2012 at 2:00 PM, Adrian Crum <
[hidden email]> wrote:

> That is not necessary. Just prefix the ID with "PO" or "SO".
>
> Order IDs
> ---------
>
> SO0001
> SO0002
> PO0001
> PO0002
> ...
>
>
>
That would work when you want a prefix. The scenario I had in mind did not
have a prefix to the number. But this would work as well.

--
Regards,
Venkat