Class AccountingReportsController
- Namespace
- KadicErp.WebApi.Controllers.AdminReporting.Reports
- Assembly
- KadicErp.WebApi.dll
[ApiController]
public class AccountingReportsController : ControllerBase
- Inheritance
-
objectControllerBaseAccountingReportsController
Constructors
AccountingReportsController(IMediator, IReportExportService)
public AccountingReportsController(IMediator mediator, IReportExportService exportService)
Parameters
mediatorIMediatorexportServiceIReportExportService
Methods
Export(ReportExportRequest)
Exports an accounting report as CSV, Excel, or PDF. Pass report=trial-balance|general-ledger|journal-entry-listing|cost-center-pnl. AccountId carries accountId; Search carries the journal status filter.
[HttpPost("api/admin-reporting/reports/accounting/export")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_EXPORT")]
public Task<IActionResult> Export(ReportExportRequest request)
Parameters
requestReportExportRequest
Returns
- Task<IActionResult>
GetBalanceSheet(Guid?, DateOnly?)
Returns the balance sheet as of a specific date using financial statement mappings. asOf defaults to today if not provided.
[HttpGet("api/admin-reporting/reports/accounting/balance-sheet")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_ACCOUNTING_VIEW")]
public Task<IActionResult> GetBalanceSheet(Guid? branchId, DateOnly? asOf)
Parameters
branchIdGuid?asOfDateOnly?
Returns
- Task<IActionResult>
GetCashFlow(Guid?, DateOnly?, DateOnly?)
Returns cash flow statement grouped into Operating, Investing, and Financing sections. Derived from posted journal entry lines on Asset accounts using source module classification.
[HttpGet("api/admin-reporting/reports/accounting/cash-flow")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_ACCOUNTING_VIEW")]
public Task<IActionResult> GetCashFlow(Guid? branchId, DateOnly? dateFrom, DateOnly? dateTo)
Parameters
branchIdGuid?dateFromDateOnly?dateToDateOnly?
Returns
- Task<IActionResult>
GetCostCenterPnL(Guid?, DateOnly?, DateOnly?, int, int)
Returns profit and loss by cost center: revenue, cost, expenses, and net result aggregated from posted journal entry lines tagged with a cost center.
[HttpGet("api/admin-reporting/reports/accounting/cost-center-pnl")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_ACCOUNTING_VIEW")]
public Task<IActionResult> GetCostCenterPnL(Guid? branchId, DateOnly? dateFrom, DateOnly? dateTo, int page = 1, int pageSize = 50)
Parameters
branchIdGuid?dateFromDateOnly?dateToDateOnly?pageintpageSizeint
Returns
- Task<IActionResult>
GetGeneralLedger(Guid?, Guid, DateOnly?, DateOnly?, int, int)
Returns all posted journal entry lines for a specific account with a running balance. accountId is required.
[HttpGet("api/admin-reporting/reports/accounting/general-ledger")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_ACCOUNTING_VIEW")]
public Task<IActionResult> GetGeneralLedger(Guid? branchId, Guid accountId, DateOnly? dateFrom, DateOnly? dateTo, int page = 1, int pageSize = 100)
Parameters
branchIdGuid?accountIdGuiddateFromDateOnly?dateToDateOnly?pageintpageSizeint
Returns
- Task<IActionResult>
GetIncomeStatement(Guid?, DateOnly?, DateOnly?)
[HttpGet("api/admin-reporting/reports/accounting/income-statement")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_ACCOUNTING_VIEW")]
public Task<IActionResult> GetIncomeStatement(Guid? branchId, DateOnly? dateFrom, DateOnly? dateTo)
Parameters
branchIdGuid?dateFromDateOnly?dateToDateOnly?
Returns
- Task<IActionResult>
GetJournalEntryListing(Guid?, DateOnly?, DateOnly?, string?, string?, int, int)
Returns a paginated listing of journal entries with status filter and full-text search on entry number, description, and reference. Pass status=Draft|Posted|Reversed.
[HttpGet("api/admin-reporting/reports/accounting/journal-entry-listing")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_ACCOUNTING_VIEW")]
public Task<IActionResult> GetJournalEntryListing(Guid? branchId, DateOnly? dateFrom, DateOnly? dateTo, string? status, string? search, int page = 1, int pageSize = 50)
Parameters
branchIdGuid?dateFromDateOnly?dateToDateOnly?statusstringsearchstringpageintpageSizeint
Returns
- Task<IActionResult>
GetTrialBalance(Guid?, DateOnly?, DateOnly?, int, int)
Returns the trial balance: account code, name, debit total, credit total, and net balance aggregated across all fiscal periods within the requested date range.
[HttpGet("api/admin-reporting/reports/accounting/trial-balance")]
[Authorize(Policy = "ADMIN_REPORTING_REPORTS_ACCOUNTING_VIEW")]
public Task<IActionResult> GetTrialBalance(Guid? branchId, DateOnly? dateFrom, DateOnly? dateTo, int page = 1, int pageSize = 100)
Parameters
branchIdGuid?dateFromDateOnly?dateToDateOnly?pageintpageSizeint
Returns
- Task<IActionResult>