price rule and quote

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

price rule and quote

wperng
When a quote item is created, will the system take the price rule into
account ?  
 
Thanks
 
William Perng
[hidden email]
 
 
 
Reply | Threaded
Open this post in threaded view
|

RE: price rule and quote

wperng
I guess the problem is in createQuoteItem method of QuoteServices.xml.  When
the "calculateProductPrice" service is called, the quantity is not passed
in.

Thanks

William

-----Original Message-----
From: William Perng [mailto:[hidden email]]
Sent: Monday, November 26, 2007 11:04 AM
To: [hidden email]
Subject: price rule and quote

When a quote item is created, will the system take the price rule into
account ?  
 
Thanks
 
William Perng
[hidden email]
 
 
 

Reply | Threaded
Open this post in threaded view
|

Re: price rule and quote

Jacques Le Roux
Administrator
De : "William Perng" <[hidden email]>
> I guess the problem is in createQuoteItem method of QuoteServices.xml.  When
> the "calculateProductPrice" service is called, the quantity is not passed
> in.

No, the quantity is optionnal and this snippet is used in PriceServices.calculateProductPrice

        Double quantityDbl = (Double) context.get("quantity");
        if (quantityDbl == null) quantityDbl = new Double(1.0);
        double quantity = quantityDbl.doubleValue();

The only IN mandatory parameter is product (GenericValue)

Sorry I have no time to look furter yet and did not test your case nor know if it's intended to work like you described or not. This
is an interesting case, though. I will look try to look further. Any experiments are welcome

Thanks

Jacques

> Thanks
>
> William
>
> -----Original Message-----
> From: William Perng [mailto:[hidden email]]
> Sent: Monday, November 26, 2007 11:04 AM
> To: [hidden email]
> Subject: price rule and quote
>
> When a quote item is created, will the system take the price rule into
> account ?
>
> Thanks
>
> William Perng
> [hidden email]
>
>
>
>

Reply | Threaded
Open this post in threaded view
|

RE: price rule and quote

wperng
Yes, I understand quantity is an optional parameter for service
"caculateProductPrice".  However, my point is the caller (createQuoteItem
method of QuoteServices.xml) should pass the quantity to the service in this
case. If there is a price rule which will be triggered only when quantity is
larger than 1, the caculateProductPrice has no chance to return the correct
unit price, since the quantity is always 1 in "caculateProductPrice" and no
price rule will be triggered.

Thanks

William

-----Original Message-----
From: Jacques Le Roux [mailto:[hidden email]]
Sent: Tuesday, November 27, 2007 10:02 AM
To: [hidden email]; [hidden email]
Subject: Re: price rule and quote

De : "William Perng" <[hidden email]>
> I guess the problem is in createQuoteItem method of QuoteServices.xml.  
> When the "calculateProductPrice" service is called, the quantity is
> not passed in.

No, the quantity is optionnal and this snippet is used in
PriceServices.calculateProductPrice

        Double quantityDbl = (Double) context.get("quantity");
        if (quantityDbl == null) quantityDbl = new Double(1.0);
        double quantity = quantityDbl.doubleValue();

The only IN mandatory parameter is product (GenericValue)

Sorry I have no time to look furter yet and did not test your case nor know
if it's intended to work like you described or not. This is an interesting
case, though. I will look try to look further. Any experiments are welcome

Thanks

Jacques

> Thanks
>
> William
>
> -----Original Message-----
> From: William Perng [mailto:[hidden email]]
> Sent: Monday, November 26, 2007 11:04 AM
> To: [hidden email]
> Subject: price rule and quote
>
> When a quote item is created, will the system take the price rule into
> account ?
>
> Thanks
>
> William Perng
> [hidden email]
>
>
>
>