using System.Globalization;
using System.Net;
using System.Text;
using NTP.Application.Grains.Orders;
namespace NTP.Application.Refinery.WageClaims;
/// Excel (HTML table opened by Excel, like the other V1 exports) of a claim report: company and report title, filter lines, header, rows, footer.
internal static class ClaimExcel
{
public static string E(object? v) => WebUtility.HtmlEncode(Convert.ToString(v, CultureInfo.InvariantCulture) ?? string.Empty);
public static string N(decimal v) => v.ToString("0.###", CultureInfo.InvariantCulture);
public static string D(DateTime? d) => d is null ? string.Empty : d.Value.ToString("dd/MM/yyyy", CultureInfo.InvariantCulture);
public static ExportFile Build(string title, IEnumerable infoLines, string[] headers, IEnumerable