Skip to main content

AR Payment Reversal Dashboard Documentation

Table of Contents

  1. Project Overview
  2. Key Features
  3. Architecture Summary
  4. Technology Stack
  5. Getting Started
  6. Project Structure
  7. Documentation Index
  8. Custom Implementations
  9. Configuration
  10. Development Guidelines
  11. Testing
  12. Deployment
  13. Troubleshooting
  14. Contributing
  15. Version History
  16. Related Projects
  17. 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

  1. SYSPRO Requirements

    • SYSPRO 7 or 8 installed and configured
    • AR module licensed and enabled
    • MepDash framework installed
    • Appropriate operator permissions
  2. Development Environment

    • Visual Studio 2019 or later
    • .NET Framework 4.8 SDK
    • SQL Server Management Studio (for database work)
  3. Database Requirements

    • Access to SYSPRO database
    • Permissions to create custom tables (CG_ prefix)

Setup Instructions

  1. Clone the Repository

    git clone [repository-url]
    cd MepApps.Dash.Ar.Maint.PaymentReversal
  2. Restore NuGet Packages

    nuget restore MepApps.Dash.Ar.Maint.PaymentReversal.sln
  3. Configure Connection Strings

    • Update app.config with SYSPRO database connection
    • Set appropriate SYSPRO company database
  4. Build the Solution

    msbuild MepApps.Dash.Ar.Maint.PaymentReversal.sln /p:Configuration=Release
  5. Deploy to SYSPRO

    • Copy output DLLs to SYSPRO MepDash plugins folder
    • Register the dashboard in SYSPRO menu system

Configuration Requirements

  1. Custom Tables Installation

    • Run SQL scripts from Resources/SQL/ folder:
      • CREATE TABLE CG_ArReversePaymentQueueHeader.sql
      • CREATE TABLE CG_ArReversePaymentHistory.sql
  2. 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

Services Documentation (5 docs)

SYSPRO Documentation (5 docs)

UI Documentation (5 docs)

Implementation Examples (10 docs)

Custom Implementations

Unique Features Developed

  1. Queue-Based Reversal System

    • Custom table CG_ArReversePaymentQueueHeader for staging reversals
    • Prevents accidental duplicate reversals
    • Allows review before posting
  2. Intelligent Period Detection

    • Dynamic SQL query to determine available posting periods
    • Handles current, previous, and before-previous period options
    • Validates against SYSPRO period controls
  3. Comprehensive Validation Framework

    • Pre-posting validation against business rules
    • Database schema validation on startup
    • Real-time validation during data entry
  4. Post Completion Tracking

    • Custom history table for audit trail
    • Detailed logging of all reversal activities
    • Excel export for reporting
  5. 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

  1. Update version in AssemblyInfo.cs
  2. Build in Release configuration
  3. Run unit tests
  4. Package DLLs and resources

Installation Steps

  1. Stop SYSPRO services
  2. Copy DLLs to MepDash plugins folder
  3. Run database scripts for custom tables
  4. Configure SYSPRO menu entry
  5. Restart SYSPRO services
  6. Test dashboard access

Rollback Procedure

  1. Keep backup of previous version
  2. Document database changes
  3. Test rollback in staging environment
  4. 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

  1. Create feature branch from master
  2. Implement changes following guidelines
  3. Add/update documentation
  4. Submit pull request with description
  5. Ensure all tests pass
  6. 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
  • 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.