[jira] [Commented] (OFBIZ-11928) Explode items not handling tax and adjustments properly

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

[jira] [Commented] (OFBIZ-11928) Explode items not handling tax and adjustments properly

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-11928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17186304#comment-17186304 ]

Ankush Upadhyay commented on OFBIZ-11928:
-----------------------------------------

[~surajk], [~rohit.koushal],

Thanks for your thoughts,  I have uploaded patch for #1 solution.

I also verified order level data, and also checked invoicing level as well and all seems as expected to me.

One thing I notice is, I was using OFBiz E-Commerce Store(productStoreId 9000) and was setting explode items flag from catalog. But when I placed order, it didn't reserve the order items. I digged more into it and found that In seed data, allocate inventory flag for this store is null but when when we set explode items flag from catalog, from form default value of allocate inventory is Y then set also. And due to this from order creation process, order's are not getting reserve because of this code block:
{code:java}
if ("SALES_ORDER".equals(orderTypeId) && orderItem != null && productStore != null && "Y".equals(productStore.getString( "allocateInventory"))) { //If the 'autoReserve' flag is not set for the order item, don't reserve the inventory String autoReserve = OrderReadHelper.getOrderItemAttribute(orderItem, "autoReserve"); if (autoReserve == null || !"true".equals(autoReserve)) { continue; } }{code}
As far as I know, this workflow never create OrderItemAttribute for autoReserve attribute.

My assumption is this is only UI issue, UI should not set this flag to Y by default unless user set it intentionally.

 

[~rohit.koushal], Yes I am also afraid for promotion things, we should check and fix this as well.

 

> Explode items not handling tax and adjustments properly
> -------------------------------------------------------
>
>                 Key: OFBIZ-11928
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-11928
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: Release Branch 18.12, Release Branch 17.12, Trunk
>            Reporter: Suraj Khurana
>            Assignee: Ankush Upadhyay
>            Priority: Major
>         Attachments: OFBIZ-11928.patch, image-2020-08-22-14-54-06-042.png
>
>
> Steps to re-generate:
> 1) Create order with 4 qty of purple Gizmo and 3 qty of GZ-1000 - Tiny Gizmo
>  2) Now change explode item to Y
>  3) Again create same order with same products and same quantity
>  4) Notice difference in item subtotal and grand total
> I see two issues here:
>  - item subtotal is 191.93 and 191.94, this should be addressed 191.94 is correct when explode is set to N (default order)
>  Code reference: It should be handled inside ShoppingCartItem.java#explodeItem
>  - Total sales tax is different in both orders:
>  10.72 and -0.03 which can be checked if this is any configuration issue, or taxes are not being handled while exploding items.
> Demo orders on trunk (will not last for long):
>  explode: N
>  [https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderview?orderId=WSCO10001
> ]explode: Y
>  [https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderview?orderId=WSCO10000]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)