[ 
https://issues.apache.org/jira/browse/OFBIZ-4166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jacques Le Roux updated OFBIZ-4166:
-----------------------------------

    Attachment: ProductDetail.groovy.patch

Hi Pierre,

Thanks for report, but your patch has a problem. Because the service 
calculateProductPrice used for the SALES_ORDER case returns basePrice which is 
slightly different than price when "checkIncludeVat=Y and a VAT amount was 
found". I must say I did not digg further than the comment, and did not test 
the feature.

I have attached another patch which should save the problem in both cases. 
Could you please test and confirm?

Thanks in advance

> Impossible to add a variant product in a purchase order
> -------------------------------------------------------
>
>                 Key: OFBIZ-4166
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4166
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Pierre TALLOTTE
>            Priority: Minor
>              Labels: order, purchase, variant
>         Attachments: ProductDetail.groovy.patch, ProductDetail.groovy.patch, 
> ProductDetail.groovy.patch
>
>
> When we add a variant product in a purchase order, we have got an error :
> {quote}
> org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen 
> [component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#productdetail]:
>  java.lang.IllegalArgumentException: Cannot format given Object as a Number 
> (Cannot format given Object as a Number)
> {quote}
> This error occurs in ProductDetail.groovy because virtualPriceMap.basePrice 
> is null. In PriceServices.java (who create virtualPriceMap), basePrice is not 
> add in virtualPriceMap. In the patch, I replace basePrice by price, and it 
> works well.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to