Skip to content

Commit

Permalink
VCST-1659: Updated ToOrderModel for Discount
Browse files Browse the repository at this point in the history
  • Loading branch information
Ljutyj committed Nov 12, 2024
1 parent 721cb72 commit 4ec8cc0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public CustomerOrderBuilder(ICustomerOrderService customerOrderService, ISetting
public virtual async Task<CustomerOrder> PlaceCustomerOrderFromCartAsync(ShoppingCart cart)
{
var customerOrder = ConvertCartToOrder(cart);
await _customerOrderService.SaveChangesAsync(new[] { customerOrder });
await _customerOrderService.SaveChangesAsync([customerOrder]);
return customerOrder;
}

Expand Down Expand Up @@ -305,6 +305,7 @@ protected virtual Discount ToOrderModel(Discount discount)
retVal.DiscountAmount = discount.DiscountAmount;
retVal.DiscountAmountWithTax = discount.DiscountAmountWithTax;
retVal.PromotionId = discount.PromotionId;
retVal.Name = discount.Name;

return retVal;
}
Expand Down

0 comments on commit 4ec8cc0

Please sign in to comment.