Implement Cost Allocation Engine #114

Closed
opened 2025-10-03 22:37:19 +00:00 by tegwick · 0 comments
Owner

Priority: MEDIUM | Effort: 4 days | Dependencies: Database Schema, Cost Management, Period Management, Activity Tracking

User Story

As a financial system, I want to automatically allocate costs to active issues so that each issue reflects its fair share of operational expenses.

Description

Create the core allocation engine that distributes costs across active issues using the defined algorithm, handles edge cases, and maintains audit trails.

Technical Implementation

  • New Files: markitect/finance/allocation_engine.py, markitect/finance/transaction_manager.py, tests/test_allocation_engine.py

Acceptance Criteria

  • AllocationEngine class with cost distribution logic
  • Equal distribution algorithm implementation
  • Loss carried forward handling
  • Transaction audit trail creation
  • Edge case handling (no active issues, partial periods)
  • Allocation reversal capabilities
  • Performance optimization for large allocations
  • Comprehensive tests for all allocation scenarios

Core functionality for Issue #88 (Cost Tracking for Issues)

**Priority**: MEDIUM | **Effort**: 4 days | **Dependencies**: Database Schema, Cost Management, Period Management, Activity Tracking ## User Story As a financial system, I want to automatically allocate costs to active issues so that each issue reflects its fair share of operational expenses. ## Description Create the core allocation engine that distributes costs across active issues using the defined algorithm, handles edge cases, and maintains audit trails. ## Technical Implementation - **New Files**: markitect/finance/allocation_engine.py, markitect/finance/transaction_manager.py, tests/test_allocation_engine.py ## Acceptance Criteria - [ ] AllocationEngine class with cost distribution logic - [ ] Equal distribution algorithm implementation - [ ] Loss carried forward handling - [ ] Transaction audit trail creation - [ ] Edge case handling (no active issues, partial periods) - [ ] Allocation reversal capabilities - [ ] Performance optimization for large allocations - [ ] Comprehensive tests for all allocation scenarios ## Related Issues Core functionality for Issue #88 (Cost Tracking for Issues)
tegwick added the priority:mediumtype:feature labels 2025-10-03 22:37:19 +00:00
tegwick added this to the Issue Cost Tracking and Estimation project 2025-10-03 22:38:41 +00:00
tegwick moved this to Done in Issue Cost Tracking and Estimation on 2025-10-04 22:57:15 +00:00
Sign in to join this conversation.