- Add Section A: TVA collectée (Output VAT) - Boxes 01, 02, 03, 05, 08 - Add Section B: TVA déductible (Input VAT) - Boxes 20, 21, 22 - Add Section C: Résultat (Result) - Boxes 25, 26, 28, 29 - Update French translations with complete box descriptions - Update English translations with full CA-3 structure - Add PCG account mappings for all sections - Update task list with complete calculation logic - Include automatic totals and net calculations - Add new task for complete CA-3 form structure implementation
9.0 KiB
DeclarationTVA - Task List
Project: French CA-3 VAT Declaration Module for Dolibarr
Created: 2025-01-27
Status: In Development
Priority: High
Phase 1: Foundation & Database (Week 1-2)
1.1 Database Schema Design
-
Task 1.1.1: Design database schema for PCG account mappings
- Create
llx_declarationtva_configtable structure - Define fields for CA-3 box mappings (01, 02, 03, 05, 08)
- Add support for multiple VAT rates (20%, 10%, 5.5%, 2.1%)
- Estimated: 4 hours
- Dependencies: None
- Create
-
Task 1.1.2: Design declaration storage schema
- Create
llx_declarationtva_declarationstable - Add period management fields
- Include status tracking (draft, submitted, approved)
- Estimated: 3 hours
- Dependencies: Task 1.1.1
- Create
-
Task 1.1.3: Create period management table
- Design
llx_declarationtva_periodstable - Support quarterly and monthly periods
- Add period status and validation
- Estimated: 2 hours
- Dependencies: None
- Design
1.2 Core Class Structure
-
Task 1.2.1: Create DeclarationTVA main class
- File:
core/class/declarationtva.class.php - Basic CRUD operations
- Period management methods
- Estimated: 6 hours
- Dependencies: Task 1.1.1, 1.1.2
- File:
-
Task 1.2.2: Create DeclarationTVA_Config class
- File:
core/class/declarationtva_config.class.php - PCG account mapping management
- Validation methods
- Estimated: 4 hours
- Dependencies: Task 1.1.1
- File:
-
Task 1.2.3: Create DeclarationTVA_Period class
- File:
core/class/declarationtva_period.class.php - Period creation and validation
- Date range management
- Estimated: 3 hours
- Dependencies: Task 1.1.3
- File:
1.3 Database Implementation
-
Task 1.3.1: Update SQL schema file
- File:
sql/dolibarr_allversions.sql - Add all table creation statements
- Include indexes and constraints
- Estimated: 2 hours
- Dependencies: Tasks 1.1.1, 1.1.2, 1.1.3
- File:
-
Task 1.3.2: Create database migration scripts
- Handle version upgrades
- Data migration procedures
- Estimated: 3 hours
- Dependencies: Task 1.3.1
Phase 2: Configuration Interface (Week 3-4)
2.1 Setup Page Enhancement
-
Task 2.1.1: Redesign admin setup page
- File:
admin/setup.php - Replace generic parameters with CA-3 specific configuration
- Add PCG account selection interface
- Estimated: 8 hours
- Dependencies: Task 1.2.2
- File:
-
Task 2.1.2: Create PCG account mapping interface
- Dynamic form for each CA-3 box
- Account code validation
- Rate selection (20%, 10%, 5.5%, 2.1%)
- Estimated: 10 hours
- Dependencies: Task 2.1.1
-
Task 2.1.3: Add period configuration
- Quarterly/monthly period selection
- Default period settings
- Estimated: 4 hours
- Dependencies: Task 1.2.3
2.2 User Interface Components
-
Task 2.2.1: Create main declaration interface
- File:
declarationtvaindex.php - Period selection dropdown
- Declaration status display
- Estimated: 6 hours
- Dependencies: Task 1.2.1
- File:
-
Task 2.2.2: Add declaration creation wizard
- Step-by-step process
- Data validation at each step
- Estimated: 8 hours
- Dependencies: Task 2.2.1
Phase 3: Data Processing (Week 5-6)
3.1 Accounting Data Extraction
-
Task 3.1.1: Create data extraction methods
- Query Dolibarr accounting tables
- Filter by PCG account codes
- Handle different VAT rates
- Estimated: 12 hours
- Dependencies: Task 1.2.1
-
Task 3.1.2: Implement CA-3 calculation logic
- Section A (Output VAT): Boxes 01, 02, 03, 05, 08
- Section B (Input VAT): Boxes 20, 21, 22
- Section C (Result): Boxes 25, 26, 28, 29
- Automatic calculation of totals and net amounts
- Estimated: 20 hours
- Dependencies: Task 3.1.1
-
Task 3.1.3: Add data validation
- Cross-check calculations
- Validate against French tax rules
- Error reporting
- Estimated: 8 hours
- Dependencies: Task 3.1.2
-
Task 3.1.4: Implement complete CA-3 form structure
- Section A: TVA collectée (Output VAT) - Boxes 01, 02, 03, 05, 08
- Section B: TVA déductible (Input VAT) - Boxes 20, 21, 22
- Section C: Résultat (Result) - Boxes 25, 26, 28, 29
- Automatic section totals and net calculations
- Estimated: 10 hours
- Dependencies: Task 3.1.2
3.2 Period Management
-
Task 3.2.1: Implement period calculation
- Automatic period detection
- Date range validation
- Estimated: 4 hours
- Dependencies: Task 1.2.3
-
Task 3.2.2: Add period locking mechanism
- Prevent modifications to submitted periods
- Audit trail
- Estimated: 3 hours
- Dependencies: Task 3.2.1
Phase 4: User Interface (Week 7-8)
4.1 Main Interface Development
-
Task 4.1.1: Create declaration list view
- Show all declarations by period
- Status indicators
- Action buttons (edit, delete, export)
- Estimated: 6 hours
- Dependencies: Task 2.2.1
-
Task 4.1.2: Add declaration detail view
- CA-3 form display
- Editable fields
- Calculation summary
- Estimated: 8 hours
- Dependencies: Task 3.1.2
-
Task 4.1.3: Create period management interface
- Period creation
- Period status management
- Estimated: 4 hours
- Dependencies: Task 3.2.1
4.2 Form Handling
-
Task 4.2.1: Implement form validation
- Client-side validation
- Server-side validation
- Error message display
- Estimated: 6 hours
- Dependencies: Task 4.1.2
-
Task 4.2.2: Add auto-save functionality
- Save draft declarations
- Restore previous sessions
- Estimated: 4 hours
- Dependencies: Task 4.2.1
Phase 5: Export and Reporting (Week 9-10)
5.1 PDF Generation
-
Task 5.1.1: Create PDF template
- File:
templates/declarationtva/ca3_pdf.tpl - Official CA-3 form layout
- Company information header
- Estimated: 8 hours
- Dependencies: Task 4.1.2
- File:
-
Task 5.1.2: Implement PDF generation
- Use Dolibarr PDF engine
- Data population
- Formatting and styling
- Estimated: 6 hours
- Dependencies: Task 5.1.1
5.2 Export Formats
-
Task 5.2.1: Create XML export
- French tax authority format
- Data structure compliance
- Estimated: 6 hours
- Dependencies: Task 3.1.2
-
Task 5.2.2: Create CSV export
- Data analysis format
- Customizable fields
- Estimated: 3 hours
- Dependencies: Task 3.1.2
5.3 Reporting Features
-
Task 5.3.1: Add declaration history
- Previous periods view
- Comparison functionality
- Estimated: 4 hours
- Dependencies: Task 4.1.1
-
Task 5.3.2: Create summary reports
- Annual VAT summary
- Trend analysis
- Estimated: 5 hours
- Dependencies: Task 5.3.1
Phase 6: Testing and Documentation (Week 11-12)
6.1 Unit Testing
-
Task 6.1.1: Create test suite
- File:
test/phpunit/ - Test all core classes
- Test calculation logic
- Estimated: 8 hours
- Dependencies: All previous tasks
- File:
-
Task 6.1.2: Integration testing
- Test with real Dolibarr data
- Performance testing
- Estimated: 6 hours
- Dependencies: Task 6.1.1
6.2 Documentation
-
Task 6.2.1: Create user manual
- Setup instructions
- Usage guide
- Troubleshooting
- Estimated: 6 hours
- Dependencies: All previous tasks
-
Task 6.2.2: Create developer documentation
- API documentation
- Code comments
- Architecture overview
- Estimated: 4 hours
- Dependencies: All previous tasks
6.3 French Compliance
-
Task 6.3.1: Validate tax compliance
- Review with French tax expert
- Format validation
- Estimated: 4 hours
- Dependencies: Task 5.2.1
-
Task 6.3.2: Final testing
- End-to-end testing
- User acceptance testing
- Estimated: 6 hours
- Dependencies: Task 6.3.1
Language Support
6.4 Bilingual Interface
-
Task 6.4.1: Complete French translations
- File:
langs/fr_FR/declarationtva.lang - All interface elements
- Error messages
- Estimated: 4 hours
- Dependencies: All UI tasks
- File:
-
Task 6.4.2: Complete English translations
- File:
langs/en_US/declarationtva.lang - Update existing translations
- Estimated: 2 hours
- Dependencies: Task 6.4.1
- File:
Discovered During Work
Tasks discovered during development will be added here
Notes
- All tasks should include proper error handling
- Code must follow Dolibarr coding standards
- All user-facing text must be translatable
- Database changes must be backward compatible
- Performance optimization for large datasets
- Security considerations for financial data
Total Estimated Time: 200+ hours
Priority Order:
- Database schema and core classes
- Configuration interface
- Data processing and calculations
- User interface
- Export functionality
- Testing and documentation