faturas_4docs/Compliance/DTOs/BillComplianceRequest.cs

124 lines
6.0 KiB
C#

namespace Compliance.DTOs
{
public class BillComplianceRequest
{
public required string SmartCode { get; set; }
public required string DistributorName { get; set; }
public string Month { get; set; } = string.Empty;
public required string ConsumerGroup { get; set; }
public required string Subgroup { get; set; }
public required string SupplyVoltage { get; set; }
public required DateTime PreviousReadingDate { get; set; }
public required DateTime CurrentReadingDate { get; set; }
public required decimal PreviousReading { get; set; }
public required decimal CurrentReading { get; set; }
public decimal ConsumptionAmount { get; set; }
public decimal PeakConsumption { get; set; }
public decimal OffPeakConsumption { get; set; }
public decimal PowerFactor { get; set; }
public decimal TUSDAmount { get; set; }
public decimal TEAmount { get; set; }
public decimal TotalAmount { get; set; }
public decimal PowerFactorAdjustment { get; set; }
public decimal PublicLightingAmount { get; set; }
public decimal FlagAmount { get; set; }
public decimal PISAmount { get; set; }
public decimal COFINSAmount { get; set; }
public decimal ICMSAmount { get; set; }
public decimal ICMSBase { get; set; }
public decimal MeasuredPeakDemand { get; set; }
public decimal MeasuredOffPeakDemand { get; set; }
public decimal PeakDemandTariff { get; set; }
public decimal OffPeakDemandTariff { get; set; }
public decimal PeakDemandCharge { get; set; }
public decimal OffPeakDemandCharge { get; set; }
public decimal PeakDemandExcessCharge { get; set; }
public decimal OffPeakDemandExcessCharge { get; set; }
public decimal PeakActiveEnergy { get; set; }
public decimal OffPeakActiveEnergy { get; set; }
public decimal PeakReactiveEnergy { get; set; }
public decimal OffPeakReactiveEnergy { get; set; }
public decimal PeakReactiveCharge { get; set; }
public decimal OffPeakReactiveCharge { get; set; }
public string Municipality { get; set; } = string.Empty;
public decimal MunicipalTaxBase { get; set; }
public decimal MunicipalTaxAmount { get; set; }
public string AppliedSeason { get; set; } = string.Empty;
public decimal SeasonalTUSDAmount { get; set; }
public decimal SeasonalTEAmount { get; set; }
public string AppliedFlag { get; set; } = "GREEN";
public int BillingDays { get; set; }
public decimal DiscountAmount { get; set; }
public string DiscountType { get; set; } = string.Empty;
public List<AdditionalCharge> AdditionalCharges { get; set; } = [];
public DateTime IssueDate { get; set; }
public DateTime DueDate { get; set; }
public DateTime PaymentDate { get; set; }
public decimal LatePaymentFee { get; set; }
public decimal InterestAmount { get; set; }
public bool IsPartialPayment { get; set; }
public decimal BillTotalBeforeLateCharges =>
TUSDAmount +
TEAmount +
PowerFactorAdjustment +
FlagAmount +
PublicLightingAmount +
ICMSAmount +
MunicipalTaxAmount +
AdditionalCharges.Sum(c => c.Amount) -
DiscountAmount;
// Emergency Situation Properties (Art. 350-354)
public bool IsEmergencySituation { get; set; }
public string? EmergencyDeclarationNumber { get; set; }
public int EmergencyPeriodDays { get; set; }
public decimal EmergencySupplyPercentage { get; set; }
public decimal NormalLoadBillEstimate { get; set; }
// Meter Reading Properties
public bool IsEstimatedReading { get; set; }
public string? EstimationJustification { get; set; }
public bool IsMeterReset { get; set; }
public string? MeterResetJustification { get; set; }
public DateTime? MeterResetDate { get; set; }
// Measurement Properties
public string MeterNumber { get; set; } = string.Empty;
public string MeterType { get; set; } = string.Empty;
public DateTime LastCalibrationDate { get; set; }
public bool IsSmartMeter { get; set; }
// Reading Access Properties
public bool HasReadingImpediment { get; set; }
public string? ImpedimentDescription { get; set; }
public int ConsecutiveEstimations { get; set; }
// Group-Specific Properties (Art. 297-299)
public List<string> ApplicableActivities { get; set; } = []; // Required for activity discount validation
public decimal ActivityDiscountAmount { get; set; } // Required for activity discount validation
public string BillingMonth { get; set; } = string.Empty; // Required for seasonal rules
// Billing Properties
public decimal BillTotalBeforeTaxes { get; set; } // Required for discount calculations
public decimal BillTotalAfterTaxes { get; set; } // Required for final amount validation
// Demand Properties
public decimal ContractedPeakDemand { get; set; } // Required for demand validation
public decimal ContractedOffPeakDemand { get; set; } // Required for demand validation
// Emergency Properties (already present but needs clarification)
public string? EmergencyType { get; set; } // Type of emergency situation
public List<string> EmergencyDocumentation { get; set; } = []; // Supporting documentation
// Subsidy Properties
public List<string> SubsidyTypes { get; set; } = []; // Types of subsidies applied
public Dictionary<string, decimal> SubsidyAmounts { get; set; } = []; // Amount per subsidy type
}
public class AdditionalCharge
{
public string Type { get; set; } = string.Empty;
public decimal Amount { get; set; }
public string Justification { get; set; } = string.Empty;
}
}