You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Venkat Mangudi <ve...@gmail.com> on 2012/05/18 07:18:07 UTC

Order Sequence

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

Re: Order Sequence

Posted by Ankit Jain <an...@gmail.com>.
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 <ve...@gmail.com> wrote:
> On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar <kusumakar.ofbiz@gmail.com
>> 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

Re: Order Sequence

Posted by 李明洋 <cn...@gmail.com>.
my solution is storing the purchase order in another table.

2012/5/18 Venkat Mangudi <ve...@gmail.com>

> On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar <
> kusumakar.ofbiz@gmail.com
> > 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
>

Re: Order Sequence

Posted by Venkat Mangudi <ve...@gmail.com>.
On Fri, May 18, 2012 at 2:00 PM, Adrian Crum <
adrian.crum@sandglass-software.com> 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

Re: Order Sequence

Posted by Adrian Crum <ad...@sandglass-software.com>.
On 5/18/2012 9:27 AM, Venkat Mangudi wrote:
> On Fri, May 18, 2012 at 1:53 PM, varun bhansaly<vb...@gmail.com>  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


Re: Order Sequence

Posted by Venkat Mangudi <ve...@gmail.com>.
On Fri, May 18, 2012 at 1:53 PM, varun bhansaly <vb...@gmail.com> 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

Re: Order Sequence

Posted by varun bhansaly <vb...@gmail.com>.
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 <ve...@gmail.com> wrote:
> On Fri, May 18, 2012 at 1:27 PM, Adrian Crum <
> adrian.crum@sandglass-software.com> 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

Re: Order Sequence

Posted by Venkat Mangudi <ve...@gmail.com>.
On Fri, May 18, 2012 at 1:27 PM, Adrian Crum <
adrian.crum@sandglass-software.com> 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

Re: Order Sequence

Posted by Adrian Crum <ad...@sandglass-software.com>.
On 5/18/2012 7:34 AM, Venkat Mangudi wrote:
> On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar<kusumakar.ofbiz@gmail.com
>> 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


Re: Order Sequence

Posted by Venkat Mangudi <ve...@gmail.com>.
On Fri, May 18, 2012 at 10:52 AM, Surya Kusumakar <kusumakar.ofbiz@gmail.com
> 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

Re: Order Sequence

Posted by Surya Kusumakar <ku...@gmail.com>.
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 <ve...@gmail.com>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
>