[
http://issues.apache.org/jira/browse/OFBIZ-386?page=comments#action_12443515 ]
Ray Barlow commented on OFBIZ-386:
----------------------------------
David,
I've done a little digging and have a question around:
OrderReadHelper.getOrderItemQuantityBd()
Firstly going back a while now this log:
http://svn.ofbiz.org/viewcvs/trunk/components/order/src/org/ofbiz/order/order/OrderReadHelper.java?rev=4367&r1=4281&r2=4367
shows a change to the strings that seems to make the first if statement
redundant?! I presume either that statement can now be removed or the original
intention of the statement needs reimplementing?
Secondly reading this code I can see why this bug is happening, after
completing stage 2 above when adding the new item the code does "ordered -
cancelled = quantity" which equates to "1 - 1 = 0". Keep repeating this and the
problem just gets worse.
> Adding additional items in order entry messes up values for
> quantity/remaining/outstanding on cancelled line items
> ------------------------------------------------------------------------------------------------------------------
>
> Key: OFBIZ-386
> URL: http://issues.apache.org/jira/browse/OFBIZ-386
> Project: OFBiz (The Open for Business Project)
> Issue Type: Bug
> Components: order
> Affects Versions: SVN trunk
> Environment: N/A : Clean SVN Derby Sun JDK 1.4.11 Win2k
> Reporter: Ray Barlow
> Priority: Critical
> Attachments: itemstatus1.png, itemstatus2.png, itemstatus3.png
>
>
> Create an order with two items, for example GZ-1000 and GZ-1001 --
> itemstatus1.png
> Edit the order and cancel one of the line items -- itemstatus2.png shows 1
> item ordered, 1 cancelled, 0 remaining, outstanding and shortfalled.
> Now edit the order again and add a new product such as GZ-1004 --
> itemstatus3.png this shows affect of the change to the order. The cancelled
> line items values have been decremented, you can repeat adding items and it
> keeps decrementing the cancelled line items values!
> This makes a mess of the ordered quantity so you can't rely on knowing what
> was previously ordered.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira