fix(s19): SaleExportRow.Payment — string (enum), не decimal
Some checks are pending
Some checks are pending
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
parent
6940aa40df
commit
83793fd6dd
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue