36 lines
1.8 KiB
C#
36 lines
1.8 KiB
C#
using NTP.Application.Refinery.WageClaims;
|
|
|
|
namespace NTP.Application.Refinery.CommissionClaims;
|
|
|
|
/// <summary>REFINERY_COMMISSION_CLAIM_VIEW row. <see cref="TripCnt"/> is the number of wage claims (the legacy column name and grid caption "عدد مطالبات الاجور").</summary>
|
|
public sealed class CommissionClaimRowDto
|
|
{
|
|
public long Id { get; set; }
|
|
public long? CommissionClaimNo { get; set; }
|
|
public DateTime? CommissionClaimDate { get; set; }
|
|
public long TripCnt { get; set; }
|
|
/// <summary>NEW / COMPLETE (old rows may hold CLOSE).</summary>
|
|
public string StatusCode { get; set; } = "";
|
|
}
|
|
|
|
/// <summary>Filters of the legacy grid (COMMISSION_CLAIM_NO, COMMISSION_CLAIM_DATE, STATUS_CODE).</summary>
|
|
public sealed record CommissionClaimQuery(string? CommissionClaimNo, DateOnly? CommissionClaimDate, IReadOnlyList<string> StatusCodes);
|
|
|
|
/// <summary>Body of POST commission-claims: the wage claims to group (legacy IDS_ARR).</summary>
|
|
public sealed record CreateCommissionClaimRequest(IReadOnlyList<long>? WageClaimIds);
|
|
|
|
/// <summary>Data the invoice report needs (legacy factory.report).</summary>
|
|
public sealed class CommissionInvoiceSource
|
|
{
|
|
public long CommissionClaimNo { get; set; }
|
|
/// <summary>WAGE_CLAIM_DATE of the newest wage claim (ORDER BY ID DESC) of the commission claim; null when it has no wage claim.</summary>
|
|
public DateTime? NewestWageClaimDate { get; set; }
|
|
public long TripsCount { get; set; }
|
|
}
|
|
|
|
public sealed record InvoiceLine(string Label, long Quantity, decimal PriceWithTax, decimal TotalBeforeTax, decimal TotalWithTax);
|
|
|
|
public sealed record CommissionInvoice(
|
|
string InvoiceNumber, DateOnly InvoiceDate, DateOnly PeriodStart, DateOnly PeriodEnd, IReadOnlyList<InvoiceLine> Lines,
|
|
decimal TotalBeforeTax, decimal Tax, decimal GrandTotal);
|