[jira] Created: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

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

[jira] Created: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
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


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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-386?page=all ]

Ray Barlow updated OFBIZ-386:
-----------------------------

    Attachment: itemstatus1.png
                itemstatus2.png
                itemstatus3.png

> 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
>         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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-386?page=comments#action_12443483 ]
           
Ray Barlow commented on OFBIZ-386:
----------------------------------

On reflection I should have raised this bug as critcal rather than major and would suggest to those that can that it's priority gets raised.

Following on from the comments I made originally if two new items are added to the order after the initial item is cancelled then the quantity for the first cancelled item will become -1, as I suggested. The order manager generally handles this OK and prices are left as 0 in the subtotals column, which is why I thought just "major" priority, unfortunately other areas especially customer facing don't handle it!

For example look at the order in the ecommerce order history page and the quantity ordered shows -1, then follow along to the subtotal and it shows (2xUnitPrice) i.e. a discount! Needless to say looking down the order the grand total is just way out now.


> 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
>         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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-386?page=all ]

Jacques Le Roux updated OFBIZ-386:
----------------------------------

    Priority: Critical  (was: Major)

I Agree Ray. It's now critical.

> 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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ 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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-386?page=all ]

Scott Gray updated OFBIZ-386:
-----------------------------

    Attachment: order.patch

This patch fixes the problem Ray has described, I've also removed the redundant code that Ray mentioned in OrderReadHelper.getOrderItemQuantityBd(orderItem)

Regards
Scott

> 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, order.patch
>
>
> 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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-386?page=comments#action_12449102 ]
           
Jacopo Cappellato commented on OFBIZ-386:
-----------------------------------------

Scott,

I have not tested it, but your patch seems very promising.
I'd love to get Ray's feedback about it: Ray can you test it and let us know the results?

Scott, in the meantime, thanks for your excellent work: it's really nice to see critical bugs in complex areas of OFBiz like this one, resolved by simple/clear patches like this (however I perfectly know that the amount of time needed to track the problem down is really big even if the patch to fix it is so simple).





> 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, order.patch
>
>
> 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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Assigned: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-386?page=all ]

Jacopo Cappellato reassigned OFBIZ-386:
---------------------------------------

    Assignee: Jacopo Cappellato

> 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
>         Assigned To: Jacopo Cappellato
>            Priority: Critical
>         Attachments: itemstatus1.png, itemstatus2.png, itemstatus3.png, order.patch
>
>
> 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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-386?page=comments#action_12451613 ]
           
Ray Barlow commented on OFBIZ-386:
----------------------------------

The patch looks good and resolves the problem, thanks.

> 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
>         Assigned To: Jacopo Cappellato
>            Priority: Critical
>         Attachments: itemstatus1.png, itemstatus2.png, itemstatus3.png, order.patch
>
>
> 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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
    [ http://issues.apache.org/jira/browse/OFBIZ-386?page=comments#action_12452385 ]
           
Jacopo Cappellato commented on OFBIZ-386:
-----------------------------------------

I'm now testing the patch; if everything will look good to me I'll commit it soon.


> 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
>         Assigned To: Jacopo Cappellato
>            Priority: Critical
>         Attachments: itemstatus1.png, itemstatus2.png, itemstatus3.png, order.patch
>
>
> 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

       
Reply | Threaded
Open this post in threaded view
|

[jira] Closed: (OFBIZ-386) Adding additional items in order entry messes up values for quantity/remaining/outstanding on cancelled line items

Nicolas Malin (Jira)
In reply to this post by Nicolas Malin (Jira)
     [ http://issues.apache.org/jira/browse/OFBIZ-386?page=all ]

Jacopo Cappellato closed OFBIZ-386.
-----------------------------------

    Resolution: Fixed

Scott,

thanks your patch is in rev. 484961


> 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
>         Assigned To: Jacopo Cappellato
>            Priority: Critical
>         Attachments: itemstatus1.png, itemstatus2.png, itemstatus3.png, order.patch
>
>
> 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