33 lines
957 B
C#
33 lines
957 B
C#
using CsvHelper.Configuration.Attributes;
|
|
|
|
namespace PowderCoating.Application.DTOs.Import;
|
|
|
|
/// <summary>
|
|
/// DTO for importing payment records from CSV. Column names match the native
|
|
/// ExportPaymentsCsv output for round-trip compatibility. Payments are matched
|
|
/// to invoices by InvoiceNumber; duplicates are detected by InvoiceNumber + PaymentDate + Amount.
|
|
/// </summary>
|
|
public class PaymentImportDto
|
|
{
|
|
[Name("InvoiceNumber")]
|
|
public string? InvoiceNumber { get; set; }
|
|
|
|
[Name("Amount")]
|
|
public decimal Amount { get; set; }
|
|
|
|
[Name("PaymentDate")]
|
|
public DateTime PaymentDate { get; set; }
|
|
|
|
/// <summary>
|
|
/// Valid values: Cash, Check, CreditDebitCard, BankTransferACH, DigitalPayment
|
|
/// </summary>
|
|
[Name("PaymentMethod")]
|
|
public string PaymentMethod { get; set; } = "Cash";
|
|
|
|
[Name("Reference")]
|
|
public string? Reference { get; set; }
|
|
|
|
[Name("Notes")]
|
|
public string? Notes { get; set; }
|
|
}
|