diff --git a/Directory.Build.props b/Directory.Build.props index fc993955..1b39958c 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,7 +2,7 @@ - 3.816.0 + 3.817.0 $(VersionSuffix)-$(BuildNumber) diff --git a/src/VirtoCommerce.OrdersModule.Data/Model/CustomerOrderEntity.cs b/src/VirtoCommerce.OrdersModule.Data/Model/CustomerOrderEntity.cs index fc88cde1..bc691dde 100644 --- a/src/VirtoCommerce.OrdersModule.Data/Model/CustomerOrderEntity.cs +++ b/src/VirtoCommerce.OrdersModule.Data/Model/CustomerOrderEntity.cs @@ -283,8 +283,13 @@ public override OperationEntity FromModel(OrderOperation operation, PrimaryKeyRe if (order.Discounts != null) { - Discounts = new ObservableCollection(order.Discounts.Select(x => - AbstractTypeFactory.TryCreateInstance().FromModel(x))); + Discounts = new ObservableCollection(); + foreach (var discount in order.Discounts) + { + var discountEntity = AbstractTypeFactory.TryCreateInstance().FromModel(discount); + Discounts.Add(discountEntity); + pkMap.AddPair(discount, discountEntity); + } } if (order.TaxDetails != null) diff --git a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs index d457791f..fc04cefc 100644 --- a/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs +++ b/src/VirtoCommerce.OrdersModule.Data/Services/CustomerOrderBuilder.cs @@ -383,6 +383,7 @@ protected virtual PaymentIn ToOrderModel(Payment payment) retVal.GatewayCode = payment.PaymentGatewayCode; retVal.Sum = payment.Amount; + retVal.Status = PaymentStatus.New.ToString(); retVal.PaymentStatus = PaymentStatus.New; retVal.VendorId = payment.VendorId; retVal.Comment = payment.Comment; diff --git a/src/VirtoCommerce.OrdersModule.Web/module.manifest b/src/VirtoCommerce.OrdersModule.Web/module.manifest index 7d8c0eda..12a4decb 100644 --- a/src/VirtoCommerce.OrdersModule.Web/module.manifest +++ b/src/VirtoCommerce.OrdersModule.Web/module.manifest @@ -1,7 +1,7 @@ VirtoCommerce.Orders - 3.816.0 + 3.817.0 3.825.0