AR Payment Reversal Dashboard Documentation
Table of Contents
- Project Overview
- Key Features
- Architecture Summary
- Technology Stack
- Getting Started
- Project Structure
- Documentation Index
- Custom Implementations
- Configuration
- Development Guidelines
- Testing
- Deployment
- Troubleshooting
- Contributing
- Version History
- Related Projects
- Contact/Support
Project Overview
The AR Payment Reversal Dashboard is a specialized SYSPRO MepDash plugin that streamlines the process of reversing customer payments in the Accounts Receivable module. This dashboard provides a queue-based workflow for selecting, validating, and posting payment reversals while maintaining full integration with SYSPRO's business rules and audit requirements.
Business Purpose
This dashboard addresses the critical business need for controlled payment reversal processing by:
- Providing a staged queue for payment reversals to prevent errors
- Validating all reversals against SYSPRO business rules before posting
- Maintaining complete audit trails of reversal activities
- Supporting batch processing for efficiency
- Enabling Excel export for reporting and reconciliation
Key Features
Core Functionality
- ✅ Queue-Based Processing - Stage multiple payment reversals before posting
- ✅ Customer Payment Search - Query and filter customer payment history
- ✅ Invoice Matching - Automatic matching of payments to invoices
- ✅ Batch Reversal - Process multiple reversals in a single posting
- ✅ SYSPRO Integration - Full integration with AR, GL, and Cash Book modules
- ✅ Validation Framework - Comprehensive pre-posting validation
- ✅ Excel Export - Export reversal details and posting results
Unique Implementations
- 🎯 Custom Queue Tables - CG_ArReversePaymentQueueHeader for staging
- 🎯 Post Completion History - Full audit trail in custom tables
- 🎯 Dynamic Period Selection - Intelligent posting period detection
- 🎯 Multi-Level Validation - Database, business rule, and SYSPRO validation
- 🎯 Resilient Posting - Retry and compensation mechanisms
Architecture Summary
┌─────────────────────────────────────────────────────────────┐
│ SYSPRO Host Application │
│ (MepDash Framework) │
└─────────────────┬───────────────────────────────────────────┘
│
┌─────────────────▼───────────────────────────────────────────┐
│ AR Payment Reversal Dashboard │
├──────────────────────────────────────────────────────────────┤
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Presentation Layer │ │
│ │ MainView → Queue View → Add Payment → Completion │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Business Logic Layer │ │
│ │ ArReversePaymentService → SysproPostService │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Data Access Layer │ │
│ │ Entity Framework → SYSPRO Tables → Custom Tables │ │
│ └──────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────────┘
Technology Stack
Core Technologies
- Framework: .NET Framework 4.8
- UI Framework: WPF (Windows Presentation Foundation)
- MVVM Framework: Custom implementation with INotifyPropertyChanged
- Data Access: Entity Framework 6.4 + Dapper
- SYSPRO Integration: ENet API, MepDash Module Framework
- Logging: Serilog with Seq integration
- UI Components: Telerik UI for WPF
NuGet Packages
- MepApps.Erp.Syspro.Win.Module.Utilities
- MepApps.Erp.Syspro.Sessions
- MepApps.Erp.Syspro.ENet.Api
- FastMember (for reflection-based operations)
- Dapper (for performance-critical queries)
Getting Started
Prerequisites
-
SYSPRO Requirements
- SYSPRO 7 or 8 installed and configured
- AR module licensed and enabled
- MepDash framework installed
- Appropriate operator permissions
-
Development Environment
- Visual Studio 2019 or later
- .NET Framework 4.8 SDK
- SQL Server Management Studio (for database work)
-
Database Requirements
- Access to SYSPRO database
- Permissions to create custom tables (CG_ prefix)
Setup Instructions
-
Clone the Repository
git clone [repository-url]
cd MepApps.Dash.Ar.Maint.PaymentReversal -
Restore NuGet Packages
nuget restore MepApps.Dash.Ar.Maint.PaymentReversal.sln -
Configure Connection Strings
- Update
app.configwith SYSPRO database connection - Set appropriate SYSPRO company database
- Update
-
Build the Solution
msbuild MepApps.Dash.Ar.Maint.PaymentReversal.sln /p:Configuration=Release -
Deploy to SYSPRO
- Copy output DLLs to SYSPRO MepDash plugins folder
- Register the dashboard in SYSPRO menu system
Configuration Requirements
-
Custom Tables Installation
- Run SQL scripts from
Resources/SQL/folder:CREATE TABLE CG_ArReversePaymentQueueHeader.sqlCREATE TABLE CG_ArReversePaymentHistory.sql
- Run SQL scripts from
-
SYSPRO Configuration
- Enable payment reversals in AR Control
- Configure appropriate posting periods
- Set up operator permissions for ARSTPY business object
Project Structure
MepApps.Dash.Ar.Maint.PaymentReversal/
├── Db/ # Entity Framework models
│ ├── PluginSysproDataContext.cs
│ ├── ArCustomer.cs
│ ├── ArInvoice.cs
│ └── CG_ArReversePaymentQueueHeader.cs
├── Models/ # Domain models
│ ├── ArReversePaymentPostCompletion.cs
│ ├── BindingModels/ # MVVM binding models
│ └── EventArgModels/ # Custom event arguments
├── Services/ # Business services
│ ├── ArReversePaymentService.cs
│ ├── SysproPostService.cs
│ └── DatabaseValidationService.cs
├── ViewModels/ # MVVM ViewModels
│ ├── MainViewModel.cs
│ ├── ArReversePaymentQueueViewModel.cs
│ └── Dialog/ # Dialog ViewModels
├── Views/ # WPF Views
│ ├── MainView.xaml
│ ├── ArReversePaymentQueueView.xaml
│ └── Dialog/ # Dialog Views
├── Resources/ # Embedded resources
│ ├── SQL/ # Database scripts
│ ├── CustomForms.xml # Custom form definitions
│ └── MepSettings.json # Application settings
└── Utilities/ # Helper utilities
Documentation Index
Navigation Documentation (5 docs)
- 📄 Navigation Architecture - Overall navigation system, routing patterns, state management
- 📄 Page Routing - Service registration, view discovery, parameter passing
- 📄 Navigation Events - Event-driven navigation, custom EventArgs, event handling
- 📄 Dialog Navigation - Modal dialogs, data contracts, validation
- 📄 Navigation Best Practices - Memory management, performance, testing
Services Documentation (5 docs)
- 📄 Service Architecture - DI container, service lifetimes, composition
- 📄 Data Services - Entity Framework, CRUD operations, transactions
- 📄 Business Logic Services - Payment reversal workflow, validation
- 📄 Integration Services - SYSPRO API, XML generation, posting
- 📄 Utility Services - Configuration, validation, helpers
SYSPRO Documentation (5 docs)
- 📄 SYSPRO Integration Overview - Architecture, version compatibility
- 📄 SYSPRO Data Models - Table relationships, custom extensions
- 📄 SYSPRO Posting Patterns - Transaction posting, validation
- 📄 SYSPRO Business Objects - ARSTPY usage, XML structure
- 📄 SYSPRO Customization - Custom tables, forms, validation
UI Documentation (5 docs)
- 📄 UI Architecture - WPF/MVVM implementation, component hierarchy
- 📄 MVVM Patterns - ViewModels, data binding, commands
- 📄 UI Components - Reusable controls, converters, styles
- 📄 Data Presentation - Grids, paging, filtering, validation UI
- 📄 User Interactions - Input handling, validation, feedback
Implementation Examples (10 docs)
- 📄 Example 01: Payment Reversal Workflow
- 📄 Example 02: Queue Management System
- 📄 Example 03: Batch Processing
- 📄 Example 04: Custom Validation Framework
- 📄 Example 05: Post Completion History
- 📄 Example 06: Dynamic Period Selection
- 📄 Example 07: Excel Export Implementation
- 📄 Example 08: Customer Search Dialog
- 📄 Example 09: Settings Management
- 📄 Example 10: Error Recovery Patterns
Custom Implementations
Unique Features Developed
-
Queue-Based Reversal System
- Custom table
CG_ArReversePaymentQueueHeaderfor staging reversals - Prevents accidental duplicate reversals
- Allows review before posting
- Custom table
-
Intelligent Period Detection
- Dynamic SQL query to determine available posting periods
- Handles current, previous, and before-previous period options
- Validates against SYSPRO period controls
-
Comprehensive Validation Framework
- Pre-posting validation against business rules
- Database schema validation on startup
- Real-time validation during data entry
-
Post Completion Tracking
- Custom history table for audit trail
- Detailed logging of all reversal activities
- Excel export for reporting
-
Resilient Posting Mechanism
- Retry logic for transient failures
- Compensation for partial failures
- Detailed error reporting
Configuration
Application Settings (MepSettings.json)
{
"defaultBank": "MAIN",
"postingBatchSize": 50,
"enableAutoQueue": false,
"validationLevel": "Standard",
"exportPath": "C:\\ArReversals",
"retryAttempts": 3,
"timeoutSeconds": 60
}
Database Validation (DatabaseValidation.json)
[
{
"Name": "CG_ArReversePaymentQueueHeader",
"ObjectType": "Table",
"ResourceFile": "CREATE TABLE CG_ArReversePaymentQueueHeader.sql"
}
]
Development Guidelines
Coding Standards
- Follow C# naming conventions
- Use structured logging with Serilog
- Implement IDisposable for resource cleanup
- Use async/await for all I/O operations
- Document public APIs with XML comments
MVVM Guidelines
- Keep ViewModels testable (no UI dependencies)
- Use commands for all user actions
- Implement INotifyPropertyChanged correctly
- Separate concerns between View and ViewModel
SYSPRO Integration
- Always use business objects for modifications
- Respect SYSPRO transaction boundaries
- Validate against SYSPRO business rules
- Log all SYSPRO interactions
Testing
Unit Testing
dotnet test MepApps.Dash.Ar.Maint.PaymentReversal.Tests
Integration Testing
- Test against SYSPRO test database
- Verify posting to journals
- Validate GL integration
- Test error scenarios
Manual Testing Checklist
- Queue payment for reversal
- Validate payment details display
- Post reversal successfully
- Export to Excel
- Verify in SYSPRO AR module
- Check GL journal entries
Deployment
Build Process
- Update version in AssemblyInfo.cs
- Build in Release configuration
- Run unit tests
- Package DLLs and resources
Installation Steps
- Stop SYSPRO services
- Copy DLLs to MepDash plugins folder
- Run database scripts for custom tables
- Configure SYSPRO menu entry
- Restart SYSPRO services
- Test dashboard access
Rollback Procedure
- Keep backup of previous version
- Document database changes
- Test rollback in staging environment
- Have rollback scripts ready
Troubleshooting
Common Issues
Dashboard Not Loading
- Check MepDash plugin registration
- Verify DLL dependencies are present
- Review SYSPRO operator permissions
- Check log files for initialization errors
Posting Failures
- Verify SYSPRO period is open
- Check operator posting permissions
- Validate customer and invoice data
- Review SYSPRO business object logs
Database Errors
- Confirm custom tables exist
- Check SQL permissions
- Verify connection string
- Review Entity Framework logs
Log Locations
- Application logs:
%AppData%\MepApps\Logs - SYSPRO logs: SYSPRO installation folder
- Seq logs: http://localhost:5341 (if configured)
Contributing
Development Workflow
- Create feature branch from master
- Implement changes following guidelines
- Add/update documentation
- Submit pull request with description
- Ensure all tests pass
- Code review by team lead
Documentation Updates
- Update relevant .md files
- Include code examples
- Explain design decisions
- Update README if needed
Version History
Version 1.0.0 (Initial Release)
- Core payment reversal functionality
- Queue management system
- SYSPRO ARSTPY integration
- Excel export capability
Version 1.1.0 (Planned)
- Enhanced validation rules
- Bulk processing improvements
- Performance optimizations
- Additional reporting options
Related Projects
- MepApps.Dash.Template - Base template for MepDash plugins
- MepApps.Erp.Syspro.Win.Module.Utilities - Shared utilities library
- Other AR Dashboards - Related AR module extensions
Contact/Support
Development Team
- Team Lead: [Contact Information]
- SYSPRO Integration: [Contact Information]
- Database/Backend: [Contact Information]
Support Channels
- Internal Wiki: [URL]
- Issue Tracker: [URL]
- Teams Channel: [Channel Name]
- Email: support@mepapps.com
Resources
- SYSPRO Documentation: [URL]
- MepDash Framework Guide: [URL]
- Internal Coding Standards: [URL]
This documentation is maintained by the MepApps development team. Last updated: [Date]
For the most current information, refer to the source code and inline documentation.