fix(s19): SaleExportRow.Payment — string (enum), не decimal
Some checks are pending
CI / Backend (.NET 8) (push) Waiting to run
CI / Web (React + Vite) (push) Waiting to run
CI / POS (WPF, Windows) (push) Waiting to run
Docker API / Build + push API (push) Waiting to run
Docker API / Deploy API on stage (push) Blocked by required conditions

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
nns 2026-06-07 21:11:43 +05:00
parent 6940aa40df
commit 83793fd6dd

View file

@ -258,7 +258,7 @@ public record SalesStatsResponse(
var rows = await q.OrderByDescending(x => x.s.Date).ThenByDescending(x => x.s.Number) var rows = await q.OrderByDescending(x => x.s.Date).ThenByDescending(x => x.s.Number)
.Select(x => new SaleExportRow( .Select(x => new SaleExportRow(
x.s.Number, x.s.Date, x.s.Status.ToString(), x.st.Name, x.s.Number, x.s.Date, x.s.Status.ToString(), x.st.Name,
x.s.Total, x.s.Payment, x.cu.Code, x.s.IsReturn)) x.s.Total, x.s.Payment.ToString(), x.cu.Code, x.s.IsReturn))
.ToListAsync(ct); .ToListAsync(ct);
var headers = new[] { "Номер", "Дата", "Статус", "Склад", "Сумма", "Оплата", "Валюта", "Возврат" }; var headers = new[] { "Номер", "Дата", "Статус", "Склад", "Сумма", "Оплата", "Валюта", "Возврат" };
return (format ?? "csv").Equals("xlsx", StringComparison.OrdinalIgnoreCase) return (format ?? "csv").Equals("xlsx", StringComparison.OrdinalIgnoreCase)
@ -266,7 +266,7 @@ public record SalesStatsResponse(
: foodmarket.Api.Controllers.Reports.ReportExport.Csv(rows, "retail-sales", headers); : foodmarket.Api.Controllers.Reports.ReportExport.Csv(rows, "retail-sales", headers);
} }
public record SaleExportRow(string Number, DateTime Date, string Status, string Store, public record SaleExportRow(string Number, DateTime Date, string Status, string Store,
decimal Total, decimal Payment, string Currency, bool IsReturn); decimal Total, string Payment, string Currency, bool IsReturn);
[HttpGet("{id:guid}")] [HttpGet("{id:guid}")]
public async Task<ActionResult<RetailSaleDto>> Get(Guid id, CancellationToken ct) public async Task<ActionResult<RetailSaleDto>> Get(Guid id, CancellationToken ct)