Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCST-2305: Add ListTotal and IsDiscountAmountRounded to LineItem #442

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading