sales fixers

This commit is contained in:
2026-10-21 10:45:19 +05:30
parent 47479fb4f2
commit a27bdaea64
14 changed files with 12580 additions and 832 deletions
+8 -2
View File
@@ -24,11 +24,11 @@ public sealed record BundleSaleTemplateLineDto(
decimal UnitPrice, bool IncludeInBundle, int SortOrder);
public sealed record BundleSaleTemplateDto(
int BundleSaleTemplateId, string TemplateCode, string TemplateName, string? Description,
int BundleSaleTemplateId, string TemplateCode, string TemplateName, string? Description, decimal BundlePrice,
EntityStatus Status, DateTime CreatedAt, DateTime? UpdatedAt, IReadOnlyList<BundleSaleTemplateLineDto> Lines);
public sealed record BundleSaleTemplateSummaryDto(
int BundleSaleTemplateId, string TemplateCode, string TemplateName, string? Description,
int BundleSaleTemplateId, string TemplateCode, string TemplateName, string? Description, decimal BundlePrice,
EntityStatus Status, int LineCount, DateTime CreatedAt, DateTime? UpdatedAt);
public sealed record BundleSalePostingIssueDto(
@@ -53,6 +53,12 @@ public sealed class CreateBundleSaleTemplateRequest
{
[Required] public string TemplateName { get; set; } = string.Empty;
public string? Description { get; set; }
/// <summary>
/// The whole bundle's selling price. When set, it replaces the lines' UnitPrice: it is split across the
/// included lines in proportion to their UnitPrice × Qty (sent as a weight, e.g. the item's normal price),
/// or by Qty when no weights are given. Omit to keep the per-line prices as sent.
/// </summary>
[Range(0, double.MaxValue)] public decimal? BundlePrice { get; set; }
[Required, MinLength(1)] public List<CreateBundleSaleTemplateLineRequest> Lines { get; set; } = new();
}