Commit Graph

174 Commits

Author SHA1 Message Date
348a2ecb1e v2.5.9: Custom footer with company name and page numbering
- Added company name on the left side of footer
- Page number remains on the right side of footer
- Footer uses same font size as summary information (size 7)
- Professional branding with company name on every page
- Enhanced footer layout for complete document identification
- Updated module version to 2.5.9
2025-10-08 12:41:16 +02:00
74875476f2 v2.5.8: Font size consistency for summary information
- Summary information now uses the same font size as tables (size 7)
- All text elements now have consistent typography
- Professional appearance with uniform font sizing throughout the PDF
- Summary text blends seamlessly with table content
- Updated module version to 2.5.8
2025-10-08 12:38:23 +02:00
326c965f45 v2.5.7: Fixed layout - restored summary information
- Restored summary information (period, account count, calculated amount)
- Only the redundant 'Résumé de la ligne' titles were removed
- Summary details are preserved for complete information
- Balanced design with clean titles but complete data
- Updated module version to 2.5.7
2025-10-08 12:36:59 +02:00
c2cfb29aa1 v2.5.6: Cleaner PDF layout by removing redundant titles
- Removed redundant 'Résumé de la ligne' titles from detailed pages
- Eliminated unnecessary summary sections to reduce clutter
- Users can now focus directly on the account details tables
- Cleaner, more professional appearance without redundant information
- Updated module version to 2.5.6
2025-10-08 12:35:32 +02:00
c67fd39fbe v2.5.5: Thin border consistency across all PDF elements
- Set all borders to thin (0.1) throughout the entire PDF
- All table cells, titles, and separators now use consistent thin borders
- Detailed page tables now have the same border thickness as first page tables
- Clean, professional appearance with consistent thin borders
- Updated module version to 2.5.5
2025-10-08 12:33:59 +02:00
3474cebd13 v2.5.4: Perfect table column width consistency across all PDF pages
- Updated detailed page tables to match first page column widths exactly
- All tables now use identical column proportions (20, 60, 40)
- Detailed page tables now have the same width and proportions as journal tables
- Consistent table sizing throughout the entire PDF
- Updated module version to 2.5.4
2025-10-08 12:31:42 +02:00
cc5ab9a062 v2.5.3: Perfect table styling consistency across all PDF pages
- Updated detailed page tables to match first page font sizes exactly
- All tables now use identical styling (font size 7, proper spacing)
- Detailed page tables now look identical to journal tables
- Consistent typography and spacing throughout the entire PDF
- Updated module version to 2.5.3
2025-10-08 12:27:10 +02:00
33897b335e v2.5.2: Professional table styling across all PDF pages
- Applied consistent table styling from journal tables to all tables
- Enhanced visual consistency throughout the entire PDF document
- White backgrounds for data rows, light gray for headers and subtotals
- Unified professional appearance across all pages
- Updated module version to 2.5.2
2025-10-08 12:24:09 +02:00
632c77d335 v2.5.1: Enhanced PDF layout with light gray section backgrounds
- Added light gray backgrounds to all section titles in detailed pages
- Enhanced visual hierarchy for better readability
- Improved professional appearance of PDF exports
- Updated module version to 2.5.1
2025-10-08 12:21:26 +02:00
f5f1169496 Version 2.5.0: Journal Configuration System
- Add complete journal configuration tab with account selection
- Add bank account configuration for VAT payments/receipts
- Add auto-create accounting toggle for submission
- Add configurable amount calculation method (round vs truncate)
- Add automatic database table creation and default values
- Fix configuration persistence and form handling
- Improve account loading with proper ordering
- Add comprehensive error handling and user feedback
- Update module version to 2.5.0
2025-10-08 11:48:33 +02:00
1fe5791e99 Bump module version to 2.4.0
- Update module version from 2.3.0 to 2.4.0
- Add comprehensive changelog for version 2.4.0
- Document template management system features
- Document minor version system implementation
- Document bug fixes and technical improvements
- Document template updates and maintenance manual
2025-10-08 01:41:15 +02:00
fc6e2f6f6a Update template to version 30.2
- Bump template version from 30.1 to 30.2
- Update manifest.json with new version 30.2
- Add release entry for corrected template
- Template now includes proper field positioning
- Other installations will auto-update to version 30.2
2025-10-08 01:39:39 +02:00
c36b9c436b Fix official template recognition for PDF generation
- Update isFillablePDF() to recognize ca3_official_template.pdf
- Ensure official template is used for CA-3 form generation
- Fix missing CA-3 pages in PDF output
- Use official template instead of falling back to basic PDF generation
2025-10-08 01:36:11 +02:00
82a996700e Fix template path resolution for PDF generation
- Use realpath() to get absolute path to templates directory
- Fix template loading for CA-3 PDF generation
- Resolve template path mismatch issue
- Ensure official template is found and used correctly
2025-10-08 01:33:07 +02:00
c471defd25 Implement minor version system for template management
- Add major.minor version format (30.1)
- Keep government version as major number (30)
- Use minor version for fixes and improvements (.1, .2, .3)
- Update manifest.json with minor version system
- Add practical examples to maintenance manual
- Enable automatic updates for template fixes
- Maintain government version compliance
2025-10-08 01:26:12 +02:00
3631b33079 Remove debug code from template management
- Remove debug logging from action handling
- Remove debug logging from template reset method
- Remove debug logging from template info method
- Clean up production code after successful debugging
2025-10-08 01:19:51 +02:00
d48800a849 Add debugging to template reset functionality
- Add debug logging to resetToDefaultTemplate method
- Add debug logging to getTemplateInfo method
- Track template path resolution and file operations
- Debug REVENIR AU MODELE OFFICIEL button issues
2025-10-08 01:16:08 +02:00
5ea9b31a7d Fix template path for reset functionality
- Update template_path to use relative path from class file
- Fix REVENIR AU MODELE OFFICIEL button functionality
- Ensure template detection works correctly
- Resolve template path mismatch issue
2025-10-08 01:13:45 +02:00
a520248a04 Revert to official government version 30
- Keep template version at 30 (official government version)
- Remove version 31 entry from manifest
- Maintain official CA-3 template version 30
- Template version should match government document version
2025-10-08 01:11:10 +02:00
86b3cfe639 Update template version to 31
- Update hardcoded template version in PDF class to 31
- Update manifest.json current_version to 31
- Add new release entry for version 31
- Enable version checking and update notifications
2025-10-08 01:09:52 +02:00
e2cf7bfe9b Improve error messaging for Gitea access issues
- Add more descriptive error messages for Gitea server access problems
- Indicate potential causes: private repository or server configuration
- Help users understand why online template updates may not work
- Maintain functionality with local fallback
2025-10-07 20:26:01 +02:00
abd4156a88 Improve template management with better fallback messaging
- Add informative messages when using local files due to Gitea inaccessibility
- Provide clear feedback about fallback behavior
- Maintain functionality even when Gitea server is not accessible
- Support both online and offline template management scenarios
2025-10-07 20:23:52 +02:00
f10f402073 Fix template management with online/offline fallback
- Try to fetch manifest from Gitea first, fallback to local if not accessible
- Try to download templates from Gitea first, fallback to local if not accessible
- Support both online template updates and offline functionality
- Enable other installations to check for template updates when online
- Provide reliable fallback for offline installations
2025-10-07 20:21:47 +02:00
96dc421177 Fix Gitea manifest fetching error in template management
- Replace Gitea manifest fetching with local manifest file
- Use local template files instead of downloading from Gitea
- Fix 'Failed to fetch manifest from Gitea' error in template management tab
- Use local files for template updates instead of external Gitea server
- Improve reliability by removing external dependencies
2025-10-07 20:20:13 +02:00
62a0b5dba2 Remove D section from configuration page
- Remove D section (calculated lines) from configuration interface
- Remove D section from section headers configuration
- Simplify configuration page by removing unnecessary calculated section
- Clean up interface to show only configurable sections (A and B)
2025-10-07 20:14:31 +02:00
f7e90c59b6 Completely remove all section descriptions and references
- Remove 'HT amounts of all taxable operations' description
- Remove all section descriptions (A, B, D sections)
- Fix 'Référence:' display to only show when notice is not empty
- Clean up configuration page completely by removing all technical text
- Simplify interface to show only section titles
2025-10-07 20:12:22 +02:00
8a498cb3f5 Remove Notice 4722 references from section headers
- Remove 'Notice 4722 (3310-CA3-SD)' from section A description
- Remove 'Notice 4722 - Summary Table CA3 (3310-CA3-SD)' reference
- Remove 'Notice 4722 - VAT Due Calculation' reference
- Remove 'Notice 4722 - Final Result' reference
- Clean up configuration page by removing technical notice references
- Simplify section descriptions for better user experience
2025-10-07 20:11:28 +02:00
6918e92168 v2.3.0: Complete journal table implementation with proper balancing and formatting
- Added journal entry table to detailed PDF with columns: Code compte, Libellé compte, Libellé écriture, Débit, Crédit
- Implemented complex balancing logic for TD > 0 and TD <= 0 cases
- Added account label lookup with proper mapping for 4455100, 4456700, 658000, 758000
- Fixed account label retrieval to use custom uppercase labels from chart of accounts
- Optimized table layout with centered positioning and appropriate column widths
- Reduced font sizes for better page fit while maintaining readability
- Added final balancing entries using 658000 (debit) and 758000 (credit) accounts
- Removed all debug logging for production-ready code
2025-10-07 18:28:10 +02:00
db687bdb77 Fix VAT result entry to use 4455100
- Restored getVATResultEntry call (needed for main journal entries)
- Changed account code from 4456700 to 4455100
- Uses getAccountLabel for proper account name
- Should now show 4455100 with TD amount in journal table
2025-10-07 15:48:35 +02:00
e225a0c35c Remove duplicate VAT result and rounding entries
- Removed getVATResultEntry call (was creating 4456700)
- Removed getRoundingEntry call (was creating duplicate entries)
- All balancing now handled in getBalancingEntries method
- Should now show only 4455100 with TD amount, no 4456700
2025-10-07 15:47:09 +02:00
ff6350890a Fix to use TD amount directly without rounding
- TD amount is already rounded (69.00), so no rounding difference needed
- Only creates single entry with TD amount on 4455100
- No more unnecessary rounding calculations
- Should show 4455100 with 69.00 (exact TD amount)
2025-10-07 15:44:58 +02:00
cf3eb9d359 Fix journal entries to use TD line calculation
- Now uses Line 16 - Line 23 calculation (same as view page)
- Added getLineAmount method to get line amounts from database
- Uses TD amount as main balancing entry instead of journal difference
- Should handle both positive and negative TD amounts correctly
- Main amount on 4455100, rounding difference on 758000
2025-10-07 15:42:32 +02:00
908e4d794c Fix to create correct 2 entries as requested
- Main amount (rounded) on 4455100: 69.00
- Rounding difference on 758000: 0.90
- For difference 69.90: 4455100 credit 70.00 + 758000 credit 0.90
- Should now show correct split between main and rounding accounts
2025-10-07 15:34:08 +02:00
ee0c0c4bdc Change account from 758000 to 4455100
- Changed account code from 758000 to 4455100
- Updated debug message to reflect correct account
- Should now show 4455100 with 0.90 for example 1
- Single entry with correct account as requested
2025-10-07 15:32:15 +02:00
5e254515e1 Fix to create only 1 entry as requested
- Removed main balancing entry (4455100)
- Only creates 758000 entry with real difference (0.90)
- No more split entries, just single entry as user requested
- Should show only 758000 with 0.90, no 4455100 entry
2025-10-07 15:30:45 +02:00
26345aee03 Add debugging to journal entries generation
- Added debug logging to see how many balancing entries are found
- Added logging to show each balancing entry being added
- Added total count of entries after balancing
- Should help identify if entries are being added to the PDF
2025-10-07 15:25:56 +02:00
aa56cf4640 Add debugging to template path resolution
- Added debug logging to see what template path is being used
- This will help identify if the path is correct or if files are missing
- Should show exactly where the system is looking for template files
2025-10-07 15:24:22 +02:00
40fa2b2f73 Add unique identifier to debug messages
- Added *** NEW LOGIC *** to debug messages
- This will help identify if the new code is actually being executed
- Should show if there are multiple code paths or caching issues
2025-10-07 15:21:19 +02:00
0d37fc00aa Add debugging to trace entry creation
- Added debug logging to see what amounts are being created
- Cleared caches and reset OPcache
- Should help identify if the new logic is being executed
- Will show exactly what values are being put in the journal table
2025-10-07 15:18:43 +02:00
00add0de70 Simplify to exactly 2 lines as requested
- Rounded difference on 4455100 (formatAmount)
- Real difference on 758000 (formatAmountReal)
- For difference 69.90: 4455100 credit 70.00 + 758000 credit 0.90
- No more complex logic, just 2 simple lines
- Exactly what user requested: 69.00 on 4455100 and 0.90 on 758000
2025-10-07 15:17:25 +02:00
0aa02d8318 Fix split rounding correctly
- Main amount: rounded value on 4455100/4456700 (formatAmount)
- Rounding difference: real difference on 758000/658000 (formatAmountReal)
- For difference 69.90: 4455100 credit 70.00 + 758000 credit 0.90
- For difference -0.90: 4456700 debit 1.00 + 658000 debit 0.90
- Should now show correct split between main and rounding accounts
2025-10-07 15:13:32 +02:00
95f88537eb Remove ALL rounding completely
- NO round() function anywhere
- Uses real difference values only (formatAmountReal)
- Single entry with real difference on correct account
- For difference 69.90: 4455100 credit 69.90 (real value)
- No more rounding, no more split entries
2025-10-07 14:57:32 +02:00
da6bb79204 Fix to create exactly 2 lines with correct amounts
- Changed difference calculation back to (debits - credits)
- Creates exactly 2 lines: main amount + rounding difference
- For difference 69.90: 4455100 credit 70.00 + 758000 credit 0.90
- Removed complex logic, simplified to 2 entries only
2025-10-07 14:56:44 +02:00
93830f309f Fix split entries for proper balancing
- Main entry: rounded amount on 4455100/4456700 (formatAmount)
- Rounding entry: real difference on 758000/658000 (formatAmountReal)
- For difference -0.90: 4455100 credit 1.00 + 758000 credit 0.90
- Should now show correct split between main and rounding accounts
2025-10-07 14:53:46 +02:00
673a2e4fda Remove ALL rounding from difference calculation
- Completely removed rounding logic
- Now uses real difference values only (formatAmountReal)
- No more rounded amounts or complex rounding logic
- Simple: real difference goes to 4455100/4456700 with real value
- Should show 4455100 with 0.90 instead of 1.00
2025-10-07 14:51:31 +02:00
c00894db2d Fix small difference handling for proper rounding
- Added special handling for differences < 1.0 (like -0.90)
- Small differences now create rounding-only entries (758000/658000)
- No main balancing entry (4455100/4456700) for small differences
- Should show 758000 with 0.90 instead of 4455100 with 1.00
2025-10-07 14:50:59 +02:00
23aa6cccb8 Fix rounding logic for small differences
- Added handling for cases where rounded difference is 0 but real difference is not 0
- Now creates rounding-only entry when difference is small (like -0.90)
- Should show 758000 with 0.90 instead of 1.00
- Handles edge cases where difference rounds to 0 but real value is significant
2025-10-07 14:48:42 +02:00
7b633b99c5 Add debugging to trace account selection logic
- Added debug logging to show which account is being created
- Added logging for difference calculation and condition evaluation
- Should help identify why example 1 shows 4456700 instead of 4455100
- Will help trace the source of duplicate 4455100 entries
2025-10-07 14:46:02 +02:00
6f742bda84 Fix reversed account selection logic
- Debit difference: now uses 4455100 credit (not 4456700)
- Credit difference: now uses 4456700 debit (not 4455100)
- Rounding accounts also corrected: 758000 for debit diff, 658000 for credit diff
- Should now match user examples correctly
2025-10-07 14:43:21 +02:00
43e4072a67 Fix rounding entry side for proper balancing
- Debit difference: 758000 credit (not debit) for rounding
- Credit difference: 658000 debit for rounding
- Now matches user examples where debit difference uses 758000 credit
- Should show correct rounding entries in journal table
2025-10-07 14:16:24 +02:00