Bug in Order View Page of Sales Order

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

Bug in Order View Page of Sales Order

arpit singh pandya
Hello All,

When I Edit items from order view Screen and click on update items link,
it will add "*Shipping and Handling*" and "*Adjustment Sales Tax*" to
the cart every time .

Steps to Generate bug:
-- Create an Approved Sales Order
   Here we can find "*Shipping and Handling*" charges displayed and add
only  one time.
-- Click on "*Edit Items*" Link.
-- Now Click on "*Update Items*" Link.

It will add the one more "*Shipping and Handling*" and "*Adjustment
Sales Tax*"  charge in the list.

My findings regarding this issues are as follows : -

In OrderServices.java at Line 3562, it call the method
saveUpdatedCartToOrder(), which is responsible for creating multiple
records of adjustment.
In saveUpdatedCartToOrder() method on line no. 3832, It calls
makeAllAdjustments on cart object which creates GenericValue for all the
old  adjustments of Order. which add objects to toStore list, which is
finally got saved, afterwards on line no. 3833 makeAllShipGroupInfos
method on cart object is called in which It create objects of shipping
and Handling adjustment according to the drop-down for shipment method
on order view screen.


What I did for this to be resolved is in makeAllAdjustments of
ShoppingCart.java, removed line no. 3505 i.e.
allAdjs.add(orderAdjustment);
and put this line in the else part of
if
("SHIPPING_CHARGES".equals(orderAdjustment.get("orderAdjustmentTypeId")))
in the same method. This helped me not to create records repeatetively
but this resulted in one more bug i.e. the manual shipping and handling
charges added were not get saved in OrderAdjustment entity.

Now as abovesaid about Line. no. 3833. more info about this is
"makeAllShipGroupInfos ()" method calls "makeItemShipGroupAndAssoc()"
Which make GenericValue of  "OrderAdjustment" ,  
"OrderItemShipGroupAssoc"  and  "OrderItemShipGroup" , in line number
4433 it is adding in
the list(values).

Please Let me know if my findings are in wrong direction.

Please suggest me further solution to this problem.

Comments will be highly appreciable and helpful.

Thanks and Regards
--
Arpit Singh Pandya
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Order View Page of Sales Order

Ashish Vijaywargiya
Hello Arpit,

Thanks for raising this issue.
I agree that the code is broken in this area, as I noticed the same thing
before 1 week or so.

Thanks for your research, I will try to find some time very soon and will
see what you have explored then will share my thoughts.
In the meantime if someone else come and help you out to sort out this bug
then it would be of great help.

--
Ashish

On Thu, May 28, 2009 at 11:03 PM, Arpit Singh Pandya <
[hidden email]> wrote:

> Hello All,
>
> When I Edit items from order view Screen and click on update items link, it
> will add "*Shipping and Handling*" and "*Adjustment Sales Tax*" to the cart
> every time .
>
> Steps to Generate bug:
> -- Create an Approved Sales Order
>  Here we can find "*Shipping and Handling*" charges displayed and add only
>  one time. -- Click on "*Edit Items*" Link.
> -- Now Click on "*Update Items*" Link.
>
> It will add the one more "*Shipping and Handling*" and "*Adjustment Sales
> Tax*"  charge in the list.
>
> My findings regarding this issues are as follows : -
>
> In OrderServices.java at Line 3562, it call the method
> saveUpdatedCartToOrder(), which is responsible for creating multiple records
> of adjustment.
> In saveUpdatedCartToOrder() method on line no. 3832, It calls
> makeAllAdjustments on cart object which creates GenericValue for all the old
>  adjustments of Order. which add objects to toStore list, which is finally
> got saved, afterwards on line no. 3833 makeAllShipGroupInfos method on cart
> object is called in which It create objects of shipping and Handling
> adjustment according to the drop-down for shipment method on order view
> screen.
>
>
> What I did for this to be resolved is in makeAllAdjustments of
> ShoppingCart.java, removed line no. 3505 i.e.
> allAdjs.add(orderAdjustment);
> and put this line in the else part of
> if
> ("SHIPPING_CHARGES".equals(orderAdjustment.get("orderAdjustmentTypeId")))
> in the same method. This helped me not to create records repeatetively but
> this resulted in one more bug i.e. the manual shipping and handling charges
> added were not get saved in OrderAdjustment entity.
>
> Now as abovesaid about Line. no. 3833. more info about this is
> "makeAllShipGroupInfos ()" method calls "makeItemShipGroupAndAssoc()"
> Which make GenericValue of  "OrderAdjustment" ,  "OrderItemShipGroupAssoc"
>  and  "OrderItemShipGroup" , in line number 4433 it is adding in
> the list(values).
>
> Please Let me know if my findings are in wrong direction.
>
> Please suggest me further solution to this problem.
>
> Comments will be highly appreciable and helpful.
>
> Thanks and Regards
> --
> Arpit Singh Pandya
>
Reply | Threaded
Open this post in threaded view
|

Re: Bug in Order View Page of Sales Order

Jacques Le Roux
Administrator
Hi Ashish,

Has this been finally fixed (I know we can't test this currently because of another issue related to payment release)

Thanks

Jacques

From: "Ashish Vijaywargiya" <[hidden email]>

> Hello Arpit,
>
> Thanks for raising this issue.
> I agree that the code is broken in this area, as I noticed the same thing
> before 1 week or so.
>
> Thanks for your research, I will try to find some time very soon and will
> see what you have explored then will share my thoughts.
> In the meantime if someone else come and help you out to sort out this bug
> then it would be of great help.
>
> --
> Ashish
>
> On Thu, May 28, 2009 at 11:03 PM, Arpit Singh Pandya <
> [hidden email]> wrote:
>
>> Hello All,
>>
>> When I Edit items from order view Screen and click on update items link, it
>> will add "*Shipping and Handling*" and "*Adjustment Sales Tax*" to the cart
>> every time .
>>
>> Steps to Generate bug:
>> -- Create an Approved Sales Order
>>  Here we can find "*Shipping and Handling*" charges displayed and add only
>>  one time. -- Click on "*Edit Items*" Link.
>> -- Now Click on "*Update Items*" Link.
>>
>> It will add the one more "*Shipping and Handling*" and "*Adjustment Sales
>> Tax*"  charge in the list.
>>
>> My findings regarding this issues are as follows : -
>>
>> In OrderServices.java at Line 3562, it call the method
>> saveUpdatedCartToOrder(), which is responsible for creating multiple records
>> of adjustment.
>> In saveUpdatedCartToOrder() method on line no. 3832, It calls
>> makeAllAdjustments on cart object which creates GenericValue for all the old
>>  adjustments of Order. which add objects to toStore list, which is finally
>> got saved, afterwards on line no. 3833 makeAllShipGroupInfos method on cart
>> object is called in which It create objects of shipping and Handling
>> adjustment according to the drop-down for shipment method on order view
>> screen.
>>
>>
>> What I did for this to be resolved is in makeAllAdjustments of
>> ShoppingCart.java, removed line no. 3505 i.e.
>> allAdjs.add(orderAdjustment);
>> and put this line in the else part of
>> if
>> ("SHIPPING_CHARGES".equals(orderAdjustment.get("orderAdjustmentTypeId")))
>> in the same method. This helped me not to create records repeatetively but
>> this resulted in one more bug i.e. the manual shipping and handling charges
>> added were not get saved in OrderAdjustment entity.
>>
>> Now as abovesaid about Line. no. 3833. more info about this is
>> "makeAllShipGroupInfos ()" method calls "makeItemShipGroupAndAssoc()"
>> Which make GenericValue of  "OrderAdjustment" ,  "OrderItemShipGroupAssoc"
>>  and  "OrderItemShipGroup" , in line number 4433 it is adding in
>> the list(values).
>>
>> Please Let me know if my findings are in wrong direction.
>>
>> Please suggest me further solution to this problem.
>>
>> Comments will be highly appreciable and helpful.
>>
>> Thanks and Regards
>> --
>> Arpit Singh Pandya
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Bug in Order View Page of Sales Order

Jacques Le Roux
Administrator
Hi Ashish,

Forget it : it works (after an ant clean-all run-install), even the problem I reported earlier, not sure why yet for the 2d
though...

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Hi Ashish,
>
> Has this been finally fixed (I know we can't test this currently because of another issue related to payment release)
>
> Thanks
>
> Jacques
>
> From: "Ashish Vijaywargiya" <[hidden email]>
>> Hello Arpit,
>>
>> Thanks for raising this issue.
>> I agree that the code is broken in this area, as I noticed the same thing
>> before 1 week or so.
>>
>> Thanks for your research, I will try to find some time very soon and will
>> see what you have explored then will share my thoughts.
>> In the meantime if someone else come and help you out to sort out this bug
>> then it would be of great help.
>>
>> --
>> Ashish
>>
>> On Thu, May 28, 2009 at 11:03 PM, Arpit Singh Pandya <
>> [hidden email]> wrote:
>>
>>> Hello All,
>>>
>>> When I Edit items from order view Screen and click on update items link, it
>>> will add "*Shipping and Handling*" and "*Adjustment Sales Tax*" to the cart
>>> every time .
>>>
>>> Steps to Generate bug:
>>> -- Create an Approved Sales Order
>>>  Here we can find "*Shipping and Handling*" charges displayed and add only
>>>  one time. -- Click on "*Edit Items*" Link.
>>> -- Now Click on "*Update Items*" Link.
>>>
>>> It will add the one more "*Shipping and Handling*" and "*Adjustment Sales
>>> Tax*"  charge in the list.
>>>
>>> My findings regarding this issues are as follows : -
>>>
>>> In OrderServices.java at Line 3562, it call the method
>>> saveUpdatedCartToOrder(), which is responsible for creating multiple records
>>> of adjustment.
>>> In saveUpdatedCartToOrder() method on line no. 3832, It calls
>>> makeAllAdjustments on cart object which creates GenericValue for all the old
>>>  adjustments of Order. which add objects to toStore list, which is finally
>>> got saved, afterwards on line no. 3833 makeAllShipGroupInfos method on cart
>>> object is called in which It create objects of shipping and Handling
>>> adjustment according to the drop-down for shipment method on order view
>>> screen.
>>>
>>>
>>> What I did for this to be resolved is in makeAllAdjustments of
>>> ShoppingCart.java, removed line no. 3505 i.e.
>>> allAdjs.add(orderAdjustment);
>>> and put this line in the else part of
>>> if
>>> ("SHIPPING_CHARGES".equals(orderAdjustment.get("orderAdjustmentTypeId")))
>>> in the same method. This helped me not to create records repeatetively but
>>> this resulted in one more bug i.e. the manual shipping and handling charges
>>> added were not get saved in OrderAdjustment entity.
>>>
>>> Now as abovesaid about Line. no. 3833. more info about this is
>>> "makeAllShipGroupInfos ()" method calls "makeItemShipGroupAndAssoc()"
>>> Which make GenericValue of  "OrderAdjustment" ,  "OrderItemShipGroupAssoc"
>>>  and  "OrderItemShipGroup" , in line number 4433 it is adding in
>>> the list(values).
>>>
>>> Please Let me know if my findings are in wrong direction.
>>>
>>> Please suggest me further solution to this problem.
>>>
>>> Comments will be highly appreciable and helpful.
>>>
>>> Thanks and Regards
>>> --
>>> Arpit Singh Pandya
>>>
>>
>