using PowderCoating.Application.DTOs.Accounting; using PowderCoating.Core.Enums; namespace PowderCoating.Application.Interfaces; /// /// Read-only service for financial aggregate reports. All methods query the database /// with AsNoTracking and return pre-shaped DTOs — no tracked entities are returned. /// Implemented in Infrastructure; uses ApplicationDbContext directly. /// The parameter overrides the company's stored preference when /// supplied; pass null to fall back to the company's configured accounting method. /// public interface IFinancialReportService { /// Returns a Profit & Loss report for the given company and date range. Task GetProfitAndLossAsync(int companyId, DateTime from, DateTime to, AccountingMethod? method = null); /// Returns a Balance Sheet snapshot as of the given date. Task GetBalanceSheetAsync(int companyId, DateTime asOf, AccountingMethod? method = null); /// Returns an AR Aging report bucketed at 0-30, 31-60, 61-90, and 90+ days. Task GetArAgingAsync(int companyId, DateTime asOf); /// Returns a Sales & Income report for the given company and date range. Task GetSalesAndIncomeAsync(int companyId, DateTime from, DateTime to); /// Returns an invoice-basis Sales Tax Liability report for the given company and date range. Task GetSalesTaxReportAsync(int companyId, DateTime from, DateTime to); /// Returns an AP Aging report bucketed at 0-30, 31-60, 61-90, and 90+ days past the bill due date. Task GetApAgingAsync(int companyId, DateTime asOf); /// Returns a Trial Balance using current account balances as of the given date. Task GetTrialBalanceAsync(int companyId, DateTime asOf); /// Looks up the accounting method configured for the given company. Returns Accrual if not found. Task GetCompanyAccountingMethodAsync(int companyId); }