feat: add FeeCalculationService with family discounts and batch processing (Closes #42) #83

Merged
shahondin1624 merged 1 commits from feature/issue-42-feecalculationservice into main 2026-04-07 12:48:47 +02:00
Owner

Summary

  • Implements FeeCalculationService with position-based family discount DSL, frozen rates for inactive members, and batch year calculation
  • Creates FeeRule and FeeRecord entities with corresponding mappers
  • Adds FeeController with REST endpoints for rule management, batch calculation, payment marking, and manual overrides
  • Registers all fee-related API routes in routes.php

Files Changed

  • lib/Db/FeeRule.php - Fee rule entity with family rules JSON parsing
  • lib/Db/FeeRuleMapper.php - Mapper with findByYear for rule lookup
  • lib/Db/FeeRecord.php - Fee record entity for per-member-year records
  • lib/Db/FeeRecordMapper.php - Mapper with findByMemberAndYear
  • lib/Service/FeeCalculationService.php - Core calculation engine
  • lib/Controller/FeeController.php - REST API controller
  • appinfo/routes.php - New fee routes

Closes #42

## Summary - Implements FeeCalculationService with position-based family discount DSL, frozen rates for inactive members, and batch year calculation - Creates FeeRule and FeeRecord entities with corresponding mappers - Adds FeeController with REST endpoints for rule management, batch calculation, payment marking, and manual overrides - Registers all fee-related API routes in routes.php ## Files Changed - `lib/Db/FeeRule.php` - Fee rule entity with family rules JSON parsing - `lib/Db/FeeRuleMapper.php` - Mapper with findByYear for rule lookup - `lib/Db/FeeRecord.php` - Fee record entity for per-member-year records - `lib/Db/FeeRecordMapper.php` - Mapper with findByMemberAndYear - `lib/Service/FeeCalculationService.php` - Core calculation engine - `lib/Controller/FeeController.php` - REST API controller - `appinfo/routes.php` - New fee routes Closes #42
shahondin1624 added 1 commit 2026-04-07 12:48:43 +02:00
Implements fee calculation engine with position-based family discount DSL,
frozen rates for inactive members, and batch year calculation. Includes
FeeRule/FeeRecord entities, mappers, FeeController REST endpoints, and routes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
shahondin1624 merged commit c903faf6a4 into main 2026-04-07 12:48:47 +02:00
shahondin1624 deleted branch feature/issue-42-feecalculationservice 2026-04-07 12:48:47 +02:00
Sign in to join this conversation.