namespace NTP.Application.Refinery.WageClaims; // ------------------------------------------------------------------ wage claim list / view (REFINERY_WAGE_CLAIM_VIEW) public sealed class WageClaimRowDto { public long Id { get; set; } public long? WageClaimNo { get; set; } public DateTime? WageClaimDate { get; set; } public long TripCnt { get; set; } public long? CommissionClaimId { get; set; } public long? CommissionClaimNo { get; set; } /// NEW / CLOSE / COMPLETE. public string StatusCode { get; set; } = ""; } /// Filters of the legacy grid (WAGE_CLAIM_NO, WAGE_CLAIM_DATE, STATUS_CODE, COMMISSION_CLAIM_NO, HAS_COMMISSION_CLAIM). public sealed record WageClaimQuery( string? WageClaimNo, DateOnly? WageClaimDate, IReadOnlyList StatusCodes, string? CommissionClaimNo, bool? HasCommissionClaim); /// A trip as shown inside a claim (legacy searchClaimTrips columns) and in the create preview. public sealed class ClaimTripRowDto { public long Id { get; set; } public string? Pn { get; set; } public DateTime? PaymentedDate { get; set; } public long? LoadingNo { get; set; } public string? DischargeAuthoriztionNo { get; set; } public DateTime? DischargeEntryDate { get; set; } public string? Tn { get; set; } public string? Trn { get; set; } public string? Nnpn { get; set; } public string StatusCode { get; set; } = ""; } /// One row of the log popup (REFINERY_WAGE_CLAIM_LOG_VIEW / REFINERY_COMMISSION_LOG_VIEW). public sealed class ClaimLogRowDto { public long Id { get; set; } public string MethodName { get; set; } = ""; public DateTime? LogDate { get; set; } public string? Login { get; set; } public string? OldData { get; set; } public string? NewData { get; set; } } /// Body of POST wage-claims (legacy create: STATUS_CODE list + LOADING_DATE_FROM / TO). public sealed record CreateWageClaimRequest(IReadOnlyList? StatusCodes, DateOnly? LoadingDateFrom, DateOnly? LoadingDateTo); /// Answer of the write endpoints: the (Arabic) message to toast and the id of the created record. public sealed record ClaimResult(string Message, long? Id = null); // ------------------------------------------------------------------ export /// Raw values of one trip of the claim report (legacy REFINERY_CLAIMS_REPORT_VIEW). public sealed class WageClaimReportRaw { public long Id { get; set; } public string? Drvr { get; set; } public string? Tn { get; set; } public string? DischargeAuthoriztionNo { get; set; } public long? DischargeAuthoriztionYear { get; set; } public DateTime? DischargeEntryDate { get; set; } public string? ClientNo { get; set; } public long? LoadingNo { get; set; } public DateTime? ActualLoadingDate { get; set; } public decimal? NetLoadingWeight { get; set; } public decimal? WaterAmount { get; set; } public decimal? NetDischargeWeight { get; set; } public decimal? CalculatedQuantityTon { get; set; } public decimal? ToleranceQuantity { get; set; } public decimal? PenaltyQuantity { get; set; } public decimal? TonPrice { get; set; } public decimal? PenaltyAmount { get; set; } public decimal? DriverTip { get; set; } public decimal? PermitDispatch { get; set; } public decimal? WaybillFee { get; set; } public decimal? DieselLiterPrice { get; set; } /// sum(REFINERY_CARDS_LOG.AMOUNT) of the trip. public decimal? AdvancePaymentForDiesel { get; set; } public decimal? Commission { get; set; } public decimal? NetWage { get; set; } } /// Values of one report line after the legacy sign changes (deductions are shown negative). public sealed record WageClaimReportLine( string? Drvr, string? Tn, string? DischargeAuthoriztionNo, long? DischargeAuthoriztionYear, DateTime? DischargeEntryDate, string? ClientNo, long? LoadingNo, DateTime? ActualLoadingDate, decimal NetLoadingWeight, decimal WaterAmount, decimal NetDischargeWeight, decimal WeightDifference, decimal CalculatedQuantityTon, decimal ToleranceQuantity, bool WaterExist, decimal PenaltyQuantity, decimal TonPrice, decimal PenaltyAmount, decimal DriverTip, decimal PermitDispatch, decimal WaybillFee, decimal DieselLiterPrice, decimal AdvancePaymentForDiesel, decimal Commission, decimal NetWage);