You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Rishi Solanki (JIRA)" <ji...@apache.org> on 2010/04/02 15:32:27 UTC

[jira] Created: (OFBIZ-3633) Minimum order quantity

Minimum order quantity
----------------------

                 Key: OFBIZ-3633
                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
             Project: OFBiz
          Issue Type: New Feature
          Components: order, specialpurpose/ecommerce
            Reporter: Rishi Solanki
             Fix For: SVN trunk


It will work as follows;
We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.

To achieve the above ;
write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Issue Comment Edited: (OFBIZ-3633) Minimum order quantity

Posted by Jacques Le Roux <ja...@les7arts.com>.
Bob,

For the sake of history and searches, I think it would be better if you keep the comment in the Jira issue

Thanks

Jacques

From: "Bob Morley" <rm...@emforium.com>
> 
> It seems to me that the restrictions as indicated are already modeled on the
> SupplierProduct entity.  I believe this is the correct location; anyone that
> supplies that particular product would have those restrictions including
> minimumQuantity, quantityIncrement, etc.  And generally speaking, all orders
> have a supplier -- for a sales order the supplier is simply the owner of
> those inventory items; OOB that would be the internal organization party
> named "Company".
> 
> Moreover, I would hope that the ShoppingCart / its related events and
> services would handle application of SupplierProduct to a WiP cart in a
> consistent manner.  That is to say if you setup a sales order and your
> Company had this record, it should properly apply those rules to that
> cartitem line.  I would speculate, however, this application is likely being
> made for orderType = PO.
> 
> This is all from memory (I am not on my development machine) but I could
> envision a facility on the SupplierProduct entity.  That would allow you to
> model the supplier that has multiple facilities with different rules. 
> Consider the 3rd party supplier that has different rules for their Toledeo
> vs. Syracuse facilities.  Similarly, your internal organization may have
> different rules based on one inventory facility vs. another.
> 
> Would using the SupplierProduct for this purpose resolve your issue?  There
> would likely be some business logic changes to ensure that they are being
> applied to OrderType = SO but hopefully no immediate model changes.
> -- 
> View this message in context: http://n4.nabble.com/jira-Created-OFBIZ-3633-Minimum-order-quantity-tp1749165p1750083.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
>


Re: [jira] Issue Comment Edited: (OFBIZ-3633) Minimum order quantity

Posted by Bob Morley <rm...@emforium.com>.
It seems to me that the restrictions as indicated are already modeled on the
SupplierProduct entity.  I believe this is the correct location; anyone that
supplies that particular product would have those restrictions including
minimumQuantity, quantityIncrement, etc.  And generally speaking, all orders
have a supplier -- for a sales order the supplier is simply the owner of
those inventory items; OOB that would be the internal organization party
named "Company".

Moreover, I would hope that the ShoppingCart / its related events and
services would handle application of SupplierProduct to a WiP cart in a
consistent manner.  That is to say if you setup a sales order and your
Company had this record, it should properly apply those rules to that
cartitem line.  I would speculate, however, this application is likely being
made for orderType = PO.

This is all from memory (I am not on my development machine) but I could
envision a facility on the SupplierProduct entity.  That would allow you to
model the supplier that has multiple facilities with different rules. 
Consider the 3rd party supplier that has different rules for their Toledeo
vs. Syracuse facilities.  Similarly, your internal organization may have
different rules based on one inventory facility vs. another.

Would using the SupplierProduct for this purpose resolve your issue?  There
would likely be some business logic changes to ensure that they are being
applied to OrderType = SO but hopefully no immediate model changes.
-- 
View this message in context: http://n4.nabble.com/jira-Created-OFBIZ-3633-Minimum-order-quantity-tp1749165p1750083.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "Bob Morley" <rm...@emforium.com>
> Jacques Le Roux wrote:
>>
>> I don't think that there is anything in ProductFeature that fits and Gift
>> Cards are actually associations between products with
>> predefined prices
>> https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductAssoc?productId=GC-001
>>
>
> Hey JLR -- I am replying here because I don't think this needs to be
> included on the JIRA ticket.
>
> I believe Gift Cards are modeled as a virtual product with a number of
> variants.  To do this there is a ProductAssoc from the virtual to the
> variants to tie them together (as you have indicated).

Right

>However, if you look
> a little further in DemoProducts.xml in the ecommerce component, you will
> see a series of ProductFeatures and how they are applied via
> ProdcutFeatureAppl.
>
> My speculation is that this is what the e-commerce site is using to populate
> a dropdown list when the virtual product (GC-001) is selected for purchase.

Yes, you are right. The application type needs to be a selectable for showing in dropdown

> It is also smart enough to realize that when the feature does not have a
> selected amount, it will render a textbox so the customer can choose the
> amount on their gift card.  (This is with having used the e-commerce site to
> do this but never looking at the code).

This is because the application type is standard (ie not selectable) and the product is defined as requirinq an amount 
(Product.requireAmount field) and this is checked/used by code of course (productdetail.ftl)

> What I do find odd is that the ProductPrice is hanging right off the virtual
> / variants (each of them).  I actually would have thought that the
> ProductFeaturePrice would have been used to define the $10, $25, $50, etc
> prices and since both the CLASSIC and HOLIDAY cards use those same features
> they would not have to double define the pricing.  AKA - you have a gift
> card that has the $10 standard feature which implies the price of the card
> is $10 regardless of the style, type, or whatever other features it may have
> (granted some features could increase the price, say a credit card gift card
> which may charge a $5.95 setup fee).

This is because the virtual/variant mechanim is building all the tree by using the possible combinations defined by Feature Category 
(here "Gift Card Features")

> So where this relates to the original enhancement, I was speculating that a
> ProductFeature that is defined as an "AMOUNT" without a selectable amount
> may have some restrictions on the boundaries of that amount.  Looking at
> productFeatureId 2006 specifically.

There is nothing like that in the data model, this is why it comes down to defining a new field somewhere. Deepak and Rishi tried to 
avoid it. But it seems that we have plenty of ideas now...

You see, maybe this discussion would be worth to be in the Jira ;o)

Jacques

> -- 
> View this message in context: http://n4.nabble.com/jira-Created-OFBIZ-3633-Minimum-order-quantity-tp1749165p1754400.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
> 



Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Bob Morley <rm...@emforium.com>.

Jacques Le Roux wrote:
> 
> I don't think that there is anything in ProductFeature that fits and Gift
> Cards are actually associations between products with 
> predefined prices
> https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductAssoc?productId=GC-001
> 

Hey JLR -- I am replying here because I don't think this needs to be
included on the JIRA ticket.

I believe Gift Cards are modeled as a virtual product with a number of
variants.  To do this there is a ProductAssoc from the virtual to the
variants to tie them together (as you have indicated).  However, if you look
a little further in DemoProducts.xml in the ecommerce component, you will
see a series of ProductFeatures and how they are applied via
ProdcutFeatureAppl.

My speculation is that this is what the e-commerce site is using to populate
a dropdown list when the virtual product (GC-001) is selected for purchase. 
It is also smart enough to realize that when the feature does not have a
selected amount, it will render a textbox so the customer can choose the
amount on their gift card.  (This is with having used the e-commerce site to
do this but never looking at the code).

What I do find odd is that the ProductPrice is hanging right off the virtual
/ variants (each of them).  I actually would have thought that the
ProductFeaturePrice would have been used to define the $10, $25, $50, etc
prices and since both the CLASSIC and HOLIDAY cards use those same features
they would not have to double define the pricing.  AKA - you have a gift
card that has the $10 standard feature which implies the price of the card
is $10 regardless of the style, type, or whatever other features it may have
(granted some features could increase the price, say a credit card gift card
which may charge a $5.95 setup fee).

So where this relates to the original enhancement, I was speculating that a
ProductFeature that is defined as an "AMOUNT" without a selectable amount
may have some restrictions on the boundaries of that amount.  Looking at
productFeatureId 2006 specifically.
-- 
View this message in context: http://n4.nabble.com/jira-Created-OFBIZ-3633-Minimum-order-quantity-tp1749165p1754400.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Bob Morley <rm...@emforium.com>.

Jacques Le Roux wrote:
> 
> Once more, please for the sake of easy history and obvious reasons, put
> rather your comments directly in related Jira issues, thanks
> 

Sorry Jacques, I do a lot of communication direct from my handheld so I
simply typed it up as an email reply to the incoming thread.  Was not
thinking that I would have to logon to JIRA and comment on the issue to
partake in the conversation.  Will not happen again.  :)
-- 
View this message in context: http://n4.nabble.com/jira-Created-OFBIZ-3633-Minimum-order-quantity-tp1749165p1754280.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Jacques Le Roux <ja...@les7arts.com>.
Hi Bob,

Once more, please for the sake of easy history and obvious reasons, put rather your comments directly in related Jira issues, thanks
I think we should maybe think about your suggestion, but like Scott, I prefer to use the simpler and ready way for now, that Deepak 
and Rishy have already coded.
I don't think that there is anything in ProductFeature that fits and Gift Cards are actually associations between products with 
predefined prices
https://demo-trunk.ofbiz.apache.org/catalog/control/EditProductAssoc?productId=GC-001

Jacques

From: "Bob Morley" <rm...@emforium.com>
> JIRA jira@apache.org wrote:
>>
>> Currently ProductPrice is used for selling goods and SupplierProduct is
>> used for purchasing goods, I don't like the idea of blurring the lines
>> between the two unnecessarily.
>>  Using that entity just because it happens to have a minimum quantity
>> field on it seems like a bit of a stretch to me.
>>
>
> You are right this may be a stretch, but how it is currently used should not
> dictate how things should be properly modeled.  From my perspective,
> SupplierProduct was a relationship between a Party (the person supplying
> products) and a product.  From a sales order perspective, the supplier for
> products in that order is generally the inventory item order (the Company).
> It did not seem a massive stretch to suggest that Orders use SupplierProduct
> consistently regardless if they are of type PO or SO.
>
> Having said that, I still do not content it is absolutely the right solution
> -- only it should be considered as one.  Not looking at e-commerce, but how
> would one sell a product that I have to buy a minimum of 100 of in
> quantities of 25.  Once you add your minimum quantity support I am sure
> increment comes next ... :)  Is there something in ProductFeature that fits?
> (Gift Card demo data with selectable amounts just came to mind).
> -- 
> View this message in context: http://n4.nabble.com/jira-Created-OFBIZ-3633-Minimum-order-quantity-tp1749165p1753888.html
> Sent from the OFBiz - Dev mailing list archive at Nabble.com.
> 



Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Bob Morley <rm...@emforium.com>.

JIRA jira@apache.org wrote:
> 
> Currently ProductPrice is used for selling goods and SupplierProduct is
> used for purchasing goods, I don't like the idea of blurring the lines
> between the two unnecessarily.
>  Using that entity just because it happens to have a minimum quantity
> field on it seems like a bit of a stretch to me.
> 

You are right this may be a stretch, but how it is currently used should not
dictate how things should be properly modeled.  From my perspective,
SupplierProduct was a relationship between a Party (the person supplying
products) and a product.  From a sales order perspective, the supplier for
products in that order is generally the inventory item order (the Company). 
It did not seem a massive stretch to suggest that Orders use SupplierProduct
consistently regardless if they are of type PO or SO.

Having said that, I still do not content it is absolutely the right solution
-- only it should be considered as one.  Not looking at e-commerce, but how
would one sell a product that I have to buy a minimum of 100 of in
quantities of 25.  Once you add your minimum quantity support I am sure
increment comes next ... :)  Is there something in ProductFeature that fits? 
(Gift Card demo data with selectable amounts just came to mind).
-- 
View this message in context: http://n4.nabble.com/jira-Created-OFBIZ-3633-Minimum-order-quantity-tp1749165p1753888.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Bob Morley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854504#action_12854504 ] 

Bob Morley commented on OFBIZ-3633:
-----------------------------------

Here was my comment from the thread --

You are right this may be a stretch, but how it is currently used should not dictate how things should be properly modeled.  From my perspective, SupplierProduct was a relationship between a Party (the person supplying products) and a product.  From a sales order perspective, the supplier for products in that order is generally the inventory item order (the Company).  It did not seem a massive stretch to suggest that Orders use SupplierProduct consistently regardless if they are of type PO or SO.

Wish my data modeling resource book was not at the office right now as I find it somewhat hard to believe that in such a comprehensive model they did not have a way for the "seller" of products to dictate non-price base restrictions on purchase.  Thinking of the grocery store that has a sale but limits it to 3 items max, the poker supply store that sells chips in increments of 25, and in this case ...  If there really is nothing then I would _ultimately_ vote for a "ProductStoreProduct" entity that acts much the same was as SupplierProduct. but does not double overload that entity if that is the concern ...

Having said all that, I think #1 is a reasonable short gap solution.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12858847#action_12858847 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

Hi,
Here are the solutions suggested and summary of suggestions ;
- add a field to Product entity (Me, Deepak and Scott are agree here with no objection except the unnecessary addition of field)
- Go with Product Price (Me, Deepak, Scott, Jacques are agree and no objection)
- Supplier Product (I (not exactly) Robert and Bob are agree, but solution is misfit and objected by most like Scott, Jacques, BJ)
- Jacopo have new idea to use Product agreements for the same purpose (BJ is agree and no objection)
- Jeoren suggested to go with new concept to study from Data Model vol 3 till now no suggestion come on this after study.

-- Here We (Deepak and Rishi) would like to get the attached patch commit (Product Price), as there is no objection on this, or we can provide the patch if the way is finalize. Please draw a conclusion so that we can go for it ASAP.

Thanks to all for valuable suggestion and posts, glad to see how the work is finalize by community participation.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Robert Morley <rm...@emforium.com>.
+1 for #3 - I think that follows the intended use from the data model

On Apr 6, 2010, at 12:10 AM, Rishi Solanki (JIRA) wrote:

>
>    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853724 
> #action_12853724 ]
>
> Rishi Solanki commented on OFBIZ-3633:
> --------------------------------------
>
> Hi Team,
> Please let us know whether we need to go as we have following options;
> 1) Achieve this ProductPrice entity patch is attached with Jira.
> 2) Add a field to Product entity and go from that way.
> 3) Achieve this thru SupplierProduct entity.
>
> I personally like all the ways of achieving minimum order quantity,  
> all has some pros and cons. Better if community finalize the way to  
> achieve the functionality so that we can submit the patch. Thanks to  
> all for their valuable suggestion.
>
>> Minimum order quantity
>> ----------------------
>>
>>                Key: OFBIZ-3633
>>                URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>>            Project: OFBiz
>>         Issue Type: New Feature
>>         Components: order, specialpurpose/ecommerce
>>           Reporter: Rishi Solanki
>>            Fix For: SVN trunk
>>
>>        Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>>
>>
>> It will work as follows;
>> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a  
>> Product in ProductPrice entity. On the basis of it we will get the  
>> minimum order quantity of the product on the basis of this price  
>> and sale price.
>> Will get the minimum order quantity for product by division. For  
>> example we have selling price of product P1 is $10.00 and its  
>> MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the  
>> product will be --> 100/10 ==> 10.
>> To achieve the above ;
>> write a getMinimumOrderQuantity() method in ShoppingCart.java which  
>> takes the itemBasePrice and productId as in parameter, and call it  
>> where we add, update the cart items and change the quantity to  
>> minmumOrderQuantity if it is less then minimum.
>
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853724#action_12853724 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

Hi Team,
Please let us know whether we need to go as we have following options;
1) Achieve this ProductPrice entity patch is attached with Jira.
2) Add a field to Product entity and go from that way.
3) Achieve this thru SupplierProduct entity.

I personally like all the ways of achieving minimum order quantity, all has some pros and cons. Better if community finalize the way to achieve the functionality so that we can submit the patch. Thanks to all for their valuable suggestion.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854329#action_12854329 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

Yes Scott, in case of ProductPrice we do not need to change any entity definition. In case of SupplierProduct entity as Bob specified the 'partyId' will be 'company' i.e the party which owns the product store. And we need to add code for the Sales Order as done for Purchase Order. Please add some value to this, will go thru the way which will be finalized.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853078#action_12853078 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

With reference to BJ comment;
- The calculation done is considering that company want a Product to sell for minimum amount say $100.00 for a particular product P1 which has following prices -
Special Promo - $5.00
Default Price - $10.00
List Price - $10.00
- Now the calculation result in this case 100/5 => 20 products, which is exactly pressing the $100.00 constraints.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-3633) Minimum order quantity

Posted by "Deepak Dixit (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepak Dixit updated OFBIZ-3633:
--------------------------------

    Attachment: OFBIZ-3633.patch

No changes , Only remove test variable declaration. { List test = new LinkedList();}

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Jacopo Cappellato (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854515#action_12854515 ] 

Jacopo Cappellato commented on OFBIZ-3633:
------------------------------------------

I don't want to add confusion but I can't resist to throw my 2 cents :-)

Alternative options to consider:
1) enhancing the Agreement* data model (in particular AgreementItemProduct); a default agreement (between the Company and all its customers) could be associated to the ProductStore and define some of the rules for sales; in particular, it could define the minimum order quantity for each product (in the AgreementItemProduct)
2) enhancing ProductPriceRules: the condition (ProductPriceCond) could be "if quantity is less than" and the action could be "then reset the price" (or similar); this is somewhat an hack but if properly modeled could be a nice enhancement



> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854321#action_12854321 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

Me too agree on #3, but like to wait for Scott, Jacques, and other members comments on this.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854320#action_12854320 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

Robert Morley comment on dev ML:
- +1 for #3 - I think that follows the intended use from the data model

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853077#action_12853077 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

With reference to user list discussion here are our (Deepak and mine) thoughts;
- We have posted the both solution on the list and elected to go with price constraints due to following reasons;
1) Here we do not need to change the existing entity definition, which is not a big deal if we add minimumOrderQuantiy field to Product entity.
2) If we want to add minimum order quantity for any product then we set the price which is of special type 'MINIMUM_ORDER_QUANTITY'.
3) In case of adding the field in product entity we need to check whether it will reflect on every UI of product related screens, in the current patch the Product Price screen already have support to add a special type of price.
4) For the ProductStore thing i.e the ProductStore may want different minimum order quantity for different stores, this will handle in the same way it will handle for adding product entity field. Here I mean to say that; it is not available for Product specific configuration as well ProductPrice specific configuration in either case we need to work on that.
Finally we will accept the community decision, and upload the patch in a way which will be finalize by community.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Robert Morley <rm...@emforium.com>.
To be honest, we did not have volume 3 in house so we ordered a few of  
them and I have only browsed through it.  I will read through that  
chapter as soon as I can, but on first glance it did look promising.

On Apr 14, 2010, at 10:52 AM, Jeroen van der Wal wrote:

> Robert, did you manage to read Chapter 8 of Volume 3 of the DMRB? I am
> curious if that pattern could solve your problem.
> -Jeroen
>


Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Jeroen van der Wal <jv...@stromboli.it>.
Robert, did you manage to read Chapter 8 of Volume 3 of the DMRB? I am
curious if that pattern could solve your problem.
-Jeroen

On Wed, Apr 14, 2010 at 4:10 PM, Robert Morley <rm...@emforium.com> wrote:
> BJ - we will have to disagree on the interpretation of those pages.
>
> In principle,  am ok with Jacopo's suggestion.  However, the relationship is
> between two parties, and in this case we are talking about a seller and a
> product.  If there was a unique set of conditions between a seller and a
> buyer then it makes perfect sense to model this as an agreement.  Without
> any changes, I would guess this would end up being an agreement between
> either the "_NA" party or a party group that contains all customers in the
> system.  Neither of these would feel like the right thing to do ...
>
>
> On Apr 13, 2010, at 7:03 PM, BJ Freeman (JIRA) wrote:
>
>>
>>   [
>> https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856675#action_12856675
>> ]
>>
>> BJ Freeman commented on OFBIZ-3633:
>> -----------------------------------
>>
>> Bob
>> the pages you refer to are for company to Manufacture a product then have
>> supplier (distributors) sell that product.
>> this is different than order from a supplier to get raw materials. order
>> and order from a customer
>> covered on page 107 and 109.
>>
>> I like Jacopo's suggestion  to use the Agreements
>> from the datamodel book
>> "An agreement is a set of terms and conditions that govern relationships
>> between two parties."
>> also
>> You can have product agreements where each product can have this
>> relationship both for customers and suppliers.with the company
>
>

Re: [jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by Robert Morley <rm...@emforium.com>.
BJ - we will have to disagree on the interpretation of those pages.

In principle,  am ok with Jacopo's suggestion.  However, the  
relationship is between two parties, and in this case we are talking  
about a seller and a product.  If there was a unique set of conditions  
between a seller and a buyer then it makes perfect sense to model this  
as an agreement.  Without any changes, I would guess this would end up  
being an agreement between either the "_NA" party or a party group  
that contains all customers in the system.  Neither of these would  
feel like the right thing to do ...


On Apr 13, 2010, at 7:03 PM, BJ Freeman (JIRA) wrote:

>
>    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856675 
> #action_12856675 ]
>
> BJ Freeman commented on OFBIZ-3633:
> -----------------------------------
>
> Bob
> the pages you refer to are for company to Manufacture a product then  
> have supplier (distributors) sell that product.
> this is different than order from a supplier to get raw materials.  
> order and order from a customer
> covered on page 107 and 109.
>
> I like Jacopo's suggestion  to use the Agreements
> from the datamodel book
> "An agreement is a set of terms and conditions that govern  
> relationships between two parties."
> also
> You can have product agreements where each product can have this  
> relationship both for customers and suppliers.with the company


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "BJ Freeman (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12856675#action_12856675 ] 

BJ Freeman commented on OFBIZ-3633:
-----------------------------------

Bob
the pages you refer to are for company to Manufacture a product then have supplier (distributors) sell that product.
this is different than order from a supplier to get raw materials. order and order from a customer
covered on page 107 and 109.

I like Jacopo's suggestion  to use the Agreements
from the datamodel book
"An agreement is a set of terms and conditions that govern relationships between two parties."
also
You can have product agreements where each product can have this relationship both for customers and suppliers.with the company

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854372#action_12854372 ] 

Jacques Le Roux commented on OFBIZ-3633:
----------------------------------------

I agree with Scott, and actually with Deepak and Rishi's 1st intent. Only code change, if possible and not convoluted, is always better IMO.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OFBIZ-3633) Minimum order quantity

Posted by "Deepak Dixit (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepak Dixit updated OFBIZ-3633:
--------------------------------

    Attachment: OFBIZ-3633.patch

Here is the patch for describe functionality.
I have added data for product id WG-5569.

Thanks to Rishi Solanki.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Deepak Dixit (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854342#action_12854342 ] 

Deepak Dixit commented on OFBIZ-3633:
-------------------------------------

Thanks Scott,

That means we are fine with #1 (Achieve through ProductPrice).So we can proceed with the attached patch.
Thanks for help in concluding.


> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Scott Gray (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854338#action_12854338 ] 

Scott Gray commented on OFBIZ-3633:
-----------------------------------

Currently ProductPrice is used for selling goods and SupplierProduct is used for purchasing goods, I don't like the idea of blurring the lines between the two unnecessarily.
 Using that entity just because it happens to have a minimum quantity field on it seems like a bit of a stretch to me.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Jacques Le Roux (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853137#action_12853137 ] 

Jacques Le Roux commented on OFBIZ-3633:
----------------------------------------

Here is Bob's comment on dev ML
{quote}
It seems to me that the restrictions as indicated are already modeled on the
SupplierProduct entity.  I believe this is the correct location; anyone that
supplies that particular product would have those restrictions including
minimumQuantity, quantityIncrement, etc.  And generally speaking, all orders
have a supplier -- for a sales order the supplier is simply the owner of
those inventory items; OOB that would be the internal organization party
named "Company".

Moreover, I would hope that the ShoppingCart / its related events and
services would handle application of SupplierProduct to a WiP cart in a
consistent manner.  That is to say if you setup a sales order and your
Company had this record, it should properly apply those rules to that
cartitem line.  I would speculate, however, this application is likely being
made for orderType = PO.

This is all from memory (I am not on my development machine) but I could
envision a facility on the SupplierProduct entity.  That would allow you to
model the supplier that has multiple facilities with different rules. 
Consider the 3rd party supplier that has different rules for their Toledeo
vs. Syracuse facilities.  Similarly, your internal organization may have
different rules based on one inventory facility vs. another.

Would using the SupplierProduct for this purpose resolve your issue?  There
would likely be some business logic changes to ensure that they are being
applied to OrderType = SO but hopefully no immediate model changes.
{quote}

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859213#action_12859213 ] 

Ashish Vijaywargiya commented on OFBIZ-3633:
--------------------------------------------

Thanks Rishi and others for your valuable comments / suggestions.

PS: Rishi very soon I will commit your patch.

--
Ashish Vijaywargiya

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853077#action_12853077 ] 

Rishi Solanki edited comment on OFBIZ-3633 at 4/3/10 5:22 AM:
--------------------------------------------------------------

With reference to user list discussion here are our (Deepak and mine) thoughts;
- We have posted the both solution on the list and elected to go with price constraints due to following reasons;
1) Here we do not need to change the existing entity definition, which is not a big deal if we add minimumOrderQuantiy field to Product entity.
2) If we want to add minimum order quantity for any product then we set the price which is of special type 'MINIMUM_ORDER_QUANTITY'.
3) In case of adding the field in product entity we need to check whether it will reflect on every UI of product related screens, in the current patch the Product Price screen already have support to add a special type of price.
4) For the ProductStore thing i.e the ProductStore may want different minimum order quantity for different stores, this will handle in the same way it will handle for adding product entity field. Here I mean to say that; it is not available for Product specific configuration as well ProductPrice specific configuration in either case we need to work on that.
- Finally we will accept the community decision, and upload the patch in a way which will be finalize by community.

      was (Author: rishisolankii):
    With reference to user list discussion here are our (Deepak and mine) thoughts;
- We have posted the both solution on the list and elected to go with price constraints due to following reasons;
1) Here we do not need to change the existing entity definition, which is not a big deal if we add minimumOrderQuantiy field to Product entity.
2) If we want to add minimum order quantity for any product then we set the price which is of special type 'MINIMUM_ORDER_QUANTITY'.
3) In case of adding the field in product entity we need to check whether it will reflect on every UI of product related screens, in the current patch the Product Price screen already have support to add a special type of price.
4) For the ProductStore thing i.e the ProductStore may want different minimum order quantity for different stores, this will handle in the same way it will handle for adding product entity field. Here I mean to say that; it is not available for Product specific configuration as well ProductPrice specific configuration in either case we need to work on that.
Finally we will accept the community decision, and upload the patch in a way which will be finalize by community.
  
> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Scott Gray (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854324#action_12854324 ] 

Scott Gray commented on OFBIZ-3633:
-----------------------------------

Hi Rishi,

{quote}
1) Achieve this ProductPrice entity patch is attached with Jira.
{quote}
The attached patch doesn't seem to make any changes to the ProductPrice entity?

At this stage I'm in favor of one simply because it doesn't change the entity model and still achieves (in theory) the current requirements.  If we go for a different approach furhter down the track at least we won't have to deal with deprecating any entity fields.

I don't see how SupplierProduct could be used without it being fairly messy.


> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (OFBIZ-3633) Minimum order quantity

Posted by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Vijaywargiya closed OFBIZ-3633.
--------------------------------------

    Resolution: Fixed

Thanks to Deepak & Rishi for the contribution and others for providing valuable comments / suggestions.
The code is committed in trunk at r936228.

If anyone see any issues in the current implementation then please comment, it would be handled accordingly.

--
Ashish

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>            Assignee: Ashish Vijaywargiya
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Jeroen van der Wal (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854569#action_12854569 ] 

Jeroen van der Wal commented on OFBIZ-3633:
-------------------------------------------

Chapter 8 of the Data Model Resource Book Volume 3 is about Business Rules and covers solutions for problems like this. Did anybody take a look at it yet? I think it's very interesting because the Business Rules models described there are an excellent addition to Ofbiz. I'm currently looking into it as an option for workflow.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (OFBIZ-3633) Minimum order quantity

Posted by "Ashish Vijaywargiya (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ashish Vijaywargiya reassigned OFBIZ-3633:
------------------------------------------

    Assignee: Ashish Vijaywargiya

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>            Assignee: Ashish Vijaywargiya
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Rishi Solanki (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12853132#action_12853132 ] 

Rishi Solanki commented on OFBIZ-3633:
--------------------------------------

With respect to Bob's comment on dev list;
Bob, I really like the idea of using the SupplierProduct entity for this functionality. If it looks fine to everyone then will look after it.


> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Bob Morley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12854686#action_12854686 ] 

Bob Morley commented on OFBIZ-3633:
-----------------------------------

Ok I ran to the office with my boy (almost the big 1) and got my "The data Model Resource Book - Volume 1".  I want to quote a few things from page 81 on this book (going back to SupplierProduct).  Starting just in the section titled "Suppliers and Manufacturers of Products" ...

"... the entity SUPPLIER PRODUCT shows which products are offered by which organizations.  The available from date and available thru date state when the product is offered by that supplier.  This information is important because it provides the capability to find out where and when specific products may be purchased, what prodcuts competitors sell, and which products the enterprise sells."

I thought "the enterprise" would refer to the company, and the last paragraph starts "Because there may be many suppliers from which the enterprise can order products ...".  Which would lead me to believe the Enterprise is definitely one of the internal organizations parented by "Company".

Finally on page 83 there is a table (3.4) that shows ABC Corporation being a supplier of the product (along with other suppliers - in this case likely people ABC would order from).  They describe this by "Table 3.4 provides examples of the suppliers that provide "Johnson fine grade 81 1/2 by 11 bond paper."  Notice that the enterprise, ABC Corporation, sells this product; and if the enterprise does not have this product in stock, there are two other sources for obtaining this product."

I have made a few assumptions here -- 1) Ofbiz adheres to this data modeling book pretty religiously and 2) not everyone may have the book so I had to type the quotes as opposed to just referring pages.  Let me know if either of those are incorrect.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OFBIZ-3633) Minimum order quantity

Posted by "Deepak Dixit (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OFBIZ-3633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12859280#action_12859280 ] 

Deepak Dixit commented on OFBIZ-3633:
-------------------------------------

Thanks Ashish for committing patch.
Thanks Rishi and other for their valuable comments.

> Minimum order quantity
> ----------------------
>
>                 Key: OFBIZ-3633
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-3633
>             Project: OFBiz
>          Issue Type: New Feature
>          Components: order, specialpurpose/ecommerce
>            Reporter: Rishi Solanki
>            Assignee: Ashish Vijaywargiya
>             Fix For: SVN trunk
>
>         Attachments: OFBIZ-3633.patch, OFBIZ-3633.patch
>
>
> It will work as follows;
> We will set the special type price as 'MINIMUM_ORDER_PRICE' for a Product in ProductPrice entity. On the basis of it we will get the minimum order quantity of the product on the basis of this price and sale price.
> Will get the minimum order quantity for product by division. For example we have selling price of product P1 is $10.00 and its MINIMUM_ORDER_PRICE is $100.00 then minimum order quantity for the product will be --> 100/10 ==> 10.
> To achieve the above ;
> write a getMinimumOrderQuantity() method in ShoppingCart.java which takes the itemBasePrice and productId as in parameter, and call it where we add, update the cart items and change the quantity to minmumOrderQuantity if it is less then minimum.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.