Try our conversational search powered by Generative AI!

Warehouses with same address can cause issues when creating a new order from Commerce Manager

Found in

Mediachase.ConsoleManager Version=8.11.1

Created

Apr 21, 2015

Updated

May 25, 2015

Area

Falcon/Commerce

State

Closed, Fixed and Tested


Steps to reproduce

Steps to reproduce

  1. Add 2 warehouses with different codes but same address. The warehouses both have to have the "Is Pickup Location" set to Yes.
  2. Go to Commerce Manager -> Order Management -> Carts, and choose New Order -> Select admin -> Click OK.


Expected: 
Works

Actual:

popup closes and the following error shows:

Server Error in '/' Application.

An item with the same key has already been added.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: An item with the same key has already been added.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: An item with the same key has already been added.]

System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +14493519

Mediachase.Commerce.Manager.Apps_Code.Order.OrderHelper.AddWarehouseToOrderAddresses(OrderGroup orderGroup) +580

Mediachase.Commerce.Manager.Apps.Order.Modules.OrderCreate.BindShipmentBlock() +267

Mediachase.Commerce.Manager.Apps.Order.Modules.OrderCreate.BindData() +1013

Mediachase.Commerce.Manager.Apps.Order.Modules.OrderCreate.Page_Load(Object sender, EventArgs e) +1253

System.Web.UI.Control.LoadRecursive() +71

System.Web.UI.Control.LoadRecursive() +190

System.Web.UI.Control.LoadRecursive() +190

System.Web.UI.Control.LoadRecursive() +190

System.Web.UI.Control.LoadRecursive() +190

System.Web.UI.Control.LoadRecursive() +190

System.Web.UI.Control.LoadRecursive() +190

System.Web.UI.Control.LoadRecursive() +190

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178