14026818e2
- CashFlowStatementDto (Operating, Investing, Financing sections; BeginningCash/EndingCash) - CashFlowLineDto for Investing/Financing line items - GetCashFlowStatementAsync on IFinancialReportService + implementation in FinancialReportService - GenerateCashFlowStatementPdfAsync on IPdfService + QuestPDF implementation in PdfService - ReportsController.CashFlowStatement GET + CashFlowStatementPdf GET with inline/download mode - CashFlowStatement.cshtml view with date filter, 3-section cards, summary sidebar, methodology note - Reports Landing page: Cash Flow Statement card added to Accounting section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
53 lines
3.2 KiB
C#
53 lines
3.2 KiB
C#
using PowderCoating.Application.DTOs.Accounting;
|
|
using PowderCoating.Core.Enums;
|
|
|
|
namespace PowderCoating.Application.Interfaces;
|
|
|
|
/// <summary>
|
|
/// 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 <paramref name="method"/> parameter overrides the company's stored preference when
|
|
/// supplied; pass <c>null</c> to fall back to the company's configured accounting method.
|
|
/// </summary>
|
|
public interface IFinancialReportService
|
|
{
|
|
/// <summary>Returns a Profit & Loss report for the given company and date range.</summary>
|
|
Task<ProfitAndLossDto> GetProfitAndLossAsync(int companyId, DateTime from, DateTime to, AccountingMethod? method = null);
|
|
|
|
/// <summary>Returns a Balance Sheet snapshot as of the given date.</summary>
|
|
Task<BalanceSheetDto> GetBalanceSheetAsync(int companyId, DateTime asOf, AccountingMethod? method = null);
|
|
|
|
/// <summary>Returns an AR Aging report bucketed at 0-30, 31-60, 61-90, and 90+ days.</summary>
|
|
Task<ArAgingReportDto> GetArAgingAsync(int companyId, DateTime asOf);
|
|
|
|
/// <summary>Returns a Sales & Income report for the given company and date range.</summary>
|
|
Task<SalesIncomeReportDto> GetSalesAndIncomeAsync(int companyId, DateTime from, DateTime to);
|
|
|
|
/// <summary>Returns an invoice-basis Sales Tax Liability report for the given company and date range.</summary>
|
|
Task<SalesTaxReportDto> GetSalesTaxReportAsync(int companyId, DateTime from, DateTime to);
|
|
|
|
/// <summary>Returns an AP Aging report bucketed at 0-30, 31-60, 61-90, and 90+ days past the bill due date.</summary>
|
|
Task<ApAgingReportDto> GetApAgingAsync(int companyId, DateTime asOf);
|
|
|
|
/// <summary>Returns a Trial Balance using current account balances as of the given date.</summary>
|
|
Task<TrialBalanceDto> GetTrialBalanceAsync(int companyId, DateTime asOf);
|
|
|
|
/// <summary>Looks up the accounting method configured for the given company. Returns Accrual if not found.</summary>
|
|
Task<AccountingMethod> GetCompanyAccountingMethodAsync(int companyId);
|
|
|
|
/// <summary>Returns a dated activity statement for a customer showing opening balance, all transactions in the period, and closing balance.</summary>
|
|
Task<CustomerStatementDto> GetCustomerStatementAsync(int companyId, int customerId, DateTime from, DateTime to);
|
|
|
|
/// <summary>Returns a dated activity statement for a vendor showing opening balance, all transactions in the period, and closing balance.</summary>
|
|
Task<VendorStatementDto> GetVendorStatementAsync(int companyId, int vendorId, DateTime from, DateTime to);
|
|
|
|
/// <summary>
|
|
/// Returns a Cash Flow Statement for the period using the direct (cash-basis) method for
|
|
/// operating activities. Investing and Financing sections are derived from account-level data.
|
|
/// BeginningCash is computed from all cash/bank account credits and debits prior to
|
|
/// <paramref name="from"/>; EndingCash adds the net change during the period.
|
|
/// </summary>
|
|
Task<CashFlowStatementDto> GetCashFlowStatementAsync(int companyId, DateTime from, DateTime to);
|
|
}
|