Skip to content

Commit

Permalink
VCST-2305: Add ListTotal and IsDiscountAmountRounded to LineItem (#442)
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-dudarev authored Dec 19, 2024
1 parent dd123ab commit 4ff67af
Show file tree
Hide file tree
Showing 16 changed files with 6,545 additions and 17 deletions.
10 changes: 10 additions & 0 deletions src/VirtoCommerce.OrdersModule.Core/Model/LineItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ public class LineItem : AuditableEntity, IHasTaxDetalization, ISupportCancellati

public virtual decimal PriceWithTax { get; set; }

public decimal ListTotal { get; set; }
public decimal ListTotalWithTax { get; set; }

/// <summary>
/// Resulting price with discount for one unit
/// </summary>
Expand All @@ -43,6 +46,13 @@ public class LineItem : AuditableEntity, IHasTaxDetalization, ISupportCancellati
/// </summary>
public virtual decimal DiscountAmount { get; set; }

/// <summary>
/// Indicates whether the discount amount per item was rounded according to the currency settings.
/// If false, DiscountAmount and PlacedPrice should not be visible to the customer, as these values may be incorrect;
/// in this case, DiscountTotal and ExtendedPrice should be used.
/// </summary>
public bool IsDiscountAmountRounded { get; set; }

public virtual decimal DiscountAmountWithTax { get; set; }

public decimal DiscountTotal { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />
<PackageReference Include="VirtoCommerce.CartModule.Core" Version="3.820.0" />
<PackageReference Include="VirtoCommerce.CartModule.Core" Version="3.823.0" />
<PackageReference Include="VirtoCommerce.CoreModule.Core" Version="3.813.0" />
<PackageReference Include="VirtoCommerce.CustomerModule.Core" Version="3.817.0" />
<PackageReference Include="VirtoCommerce.NotificationsModule.Core" Version="3.811.0" />
Expand Down
Loading

0 comments on commit 4ff67af

Please sign in to comment.