Skip to content

Add Settlement Summary Report with net settlement calculation (BlazorServer only)#571

Merged
StuartFerguson merged 5 commits intomainfrom
copilot/add-settlement-summary-report
Jan 9, 2026
Merged

Add Settlement Summary Report with net settlement calculation (BlazorServer only)#571
StuartFerguson merged 5 commits intomainfrom
copilot/add-settlement-summary-report

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 8, 2026

Implements a settlement summary report showing per-merchant settlement outcomes with gross value, fees, and net settlement amounts. The report supports filtering by date range, merchant, and settlement status (pending, settled, failed).

All implementation is contained within the BlazorServer project - no changes to BusinessLogic project.

Data Model

  • SettlementSummaryModel in BlazorServer/Models/Models.cs with settlement period, merchant info, gross/net values, fees, and status
  • Net settlement calculated as gross - fees per acceptance criteria

BlazorServer Implementation

  • GetSettlementSummaryQuery in BlazorServer/Requests/Requests.cs with optional filters for merchant and status
  • Handler in BlazorServer/Services/TestMediatorService.cs generates mock data for testing
  • Self-contained implementation following BlazorServer-only report pattern

UI (SettlementSummary.razor)

  • Filter panel: date range, merchant dropdown, status dropdown
  • KPI cards: merchant count, gross value, fees, net settlement
  • Data grid with color-coded status badges (green/yellow/red)
  • Standard loading/error/empty states

Implementation follows existing BlazorServer report patterns and does not depend on BusinessLogic project.

// Net settlement calculation in TestMediatorService handler
var grossValue = (decimal)(random.NextDouble() * 100000 + 10000);
var totalFees = Math.Round(grossValue * DefaultFeePercentage, 2);
var netAmount = Math.Round(grossValue - totalFees, 2);
Original prompt

This section details on the original issue you should resolve

<issue_title>Settlement Summary Report</issue_title>
<issue_description>Description: Provide a summary of settlement outcomes per merchant.
Business Value: Supports finance operations and merchant payout visibility.

Data Requirements

  • Settlement period
  • Merchant
  • Gross transaction value
  • Total fees
  • Net settlement amount
  • Settlement status (pending, settled, failed)

Acceptance Criteria

  • Net settlement = gross – fees.
  • Settlement status reflects settlement engine state accurately.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Add settlement summary report for merchants Add Settlement Summary Report with net settlement calculation Jan 8, 2026
Copilot AI requested a review from StuartFerguson January 8, 2026 22:36
@StuartFerguson
Copy link
Copy Markdown
Member

@copilot can you do all the changes in the blazor server app and nothing in the business logic project

Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 9, 2026

@copilot can you do all the changes in the blazor server app and nothing in the business logic project

Done! All Settlement Summary changes are now in the BlazorServer project only. I've removed the changes from BusinessLogic, BusinessLogic.Tests, and Testing projects, and added the handler to TestMediatorService.

Changes in commit 34fa458:

  • ❌ Removed: EstateManagementUI.BusinessLogic/Models/SettlementSummaryModel.cs
  • ❌ Removed: Handler from EstateManagementUI.BusinessLogic/RequestHandlers/ReportingRequestHandler.cs
  • ❌ Removed: Query from EstateManagementUI.BusinessLogic/Requests/Queries.cs
  • ❌ Removed: Test data from EstateManagementUI.BusinessLogic.Tests/MediatorTests.cs and EstateManagementUI.Testing/TestData.cs
  • ✅ Kept: All BlazorServer files (Models, Requests, UI page)
  • ✅ Added: Handler in EstateManagementUI.BlazorServer/Services/TestMediatorService.cs

The implementation is now entirely self-contained within the BlazorServer project.

Copilot AI changed the title Add Settlement Summary Report with net settlement calculation Add Settlement Summary Report with net settlement calculation (BlazorServer only) Jan 9, 2026
@StuartFerguson StuartFerguson marked this pull request as ready for review January 9, 2026 07:57
@StuartFerguson StuartFerguson merged commit 0cad124 into main Jan 9, 2026
4 of 5 checks passed
@github-actions github-actions Bot deleted the copilot/add-settlement-summary-report branch March 11, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settlement Summary Report

2 participants