Page 1 of 1

Bug in Shipment.GetItems()

Posted: Wed Jun 10, 2020 12:21 pm
by sweeperq
We implemented a new ship method today. We split an existing order and went to update the ship method in the /Admin/Orders/Shipments/Default.aspx page by clicking the change link. It keeps displaying and applying a rate that would apply to the whole order, not the shipment. We have the AC 7.0.7 CommerceBuilder source, and it looks like

Code: Select all

Shipment.GetItems()
is bringing back all of the items on the order instead of only the items that apply to the shipment. Unfortunately, the

Code: Select all

ShipMethod.GetShipRateQuote(shipment)
uses the

Code: Select all

Shipment.GetItems()
to perform it's calculations.

Can anyone confirm this bug has been corrected in the newer versions of AC?

Re: Bug in Shipment.GetItems()

Posted: Wed Jun 10, 2020 12:29 pm
by sweeperq
I had the source for Gold R8 and the same bug was present in there as well.

Re: Bug in Shipment.GetItems()

Posted: Thu Jun 11, 2020 11:15 am
by jguengerich
It appears to work fine in R12 SR2, and the code in 9.0.2 looks correct. OrderShipment.GetItems() uses this.OrderItems, which is all the items in the given shipment.