Files
PowderCoatingLogix/src/PowderCoating.Application/DTOs/Import/QuoteImportDto.cs
T
spouliot 82fb48f7a5 Patch export/import for missing fields; add CustomerContacts export
- DataExportController + AccountDataExportController: add ProjectName to
  Jobs, Quotes, Invoices (XLSX + CSV); add LeadSource + ShipTo fields to
  Customers (XLSX + CSV); add CustomerContacts sheet/CSV (new)
- Both export views: add Customer Contacts checkbox (checked by default)
- CustomerImportDto: add LeadSource + ShipTo* fields
- JobImportDto: add ProjectName
- QuoteImportDto: add ProjectName
- InvoiceImportDto: add Project Name (dual-name alias for round-trip)
- CsvImportService: wire all new import fields to entity creation;
  also patch invoice update path for ProjectName
- Add scripts/purge_imported_data.sql (dry-run T-SQL for data cleanup)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 15:14:27 -04:00

59 lines
1.4 KiB
C#

using CsvHelper.Configuration.Attributes;
namespace PowderCoating.Application.DTOs.Import;
/// <summary>
/// DTO for importing quotes from CSV files.
/// </summary>
public class QuoteImportDto
{
[Name("QuoteNumber")]
public string? QuoteNumber { get; set; }
[Name("CustomerEmail")]
public string? CustomerEmail { get; set; }
// Fallback when CustomerEmail is absent; matched against CompanyName then ContactName
[Name("CustomerName")]
public string? CustomerName { get; set; }
[Name("ProspectCompany")]
public string? ProspectCompany { get; set; }
[Name("ProspectContact")]
public string? ProspectContact { get; set; }
[Name("ProspectEmail")]
public string? ProspectEmail { get; set; }
[Name("ProspectPhone")]
public string? ProspectPhone { get; set; }
[Name("Status")]
public string Status { get; set; } = "Draft";
[Name("QuoteDate")]
public DateTime QuoteDate { get; set; }
[Name("ExpirationDate")]
public DateTime? ExpirationDate { get; set; }
[Name("ProjectName")]
public string? ProjectName { get; set; }
[Name("Subtotal")]
public decimal Subtotal { get; set; }
[Name("TaxAmount")]
public decimal TaxAmount { get; set; }
[Name("Total")]
public decimal Total { get; set; }
[Name("Notes")]
public string? Notes { get; set; }
[Name("TermsAndConditions")]
public string? TermsAndConditions { get; set; }
}