Commit Graph

206 Commits

Author SHA1 Message Date
e00c6f89f7 Add VAT refund threshold logic with configurable threshold and 445671 account support 2025-10-08 16:28:18 +02:00
c08a8bb526 Remove all debug statements and error_log calls from codebase 2025-10-08 15:18:48 +02:00
2fefe384b7 Remove debug messages from PDF generation and validation 2025-10-08 14:58:13 +02:00
9aeb09cc5c Fix PDF search to use declaration ID instead of declaration number 2025-10-08 14:56:38 +02:00
3da20373ce Add debugging to hasValidatedDocument method 2025-10-08 14:54:45 +02:00
e82ec53a37 Fix PDF storage to use /declarationtva/validated/ directory 2025-10-08 14:52:51 +02:00
c1d1f122fa Fix PDF path lookup to use correct documents directory 2025-10-08 14:51:05 +02:00
1cb9837ae7 Add debugging to validation PDF generation 2025-10-08 14:48:12 +02:00
4400b83f9c Remove old generateDetailedPDF method that was causing confusion 2025-10-08 14:42:15 +02:00
b8583aacf4 Fix export to use improved detailed pages instead of old method 2025-10-08 14:36:08 +02:00
5a8be79dc8 Restore detailed pages generation for export 2025-10-08 14:32:17 +02:00
237387b911 Simplify PDF generation: use existing export functions or show error 2025-10-08 14:28:06 +02:00
d7103b5e48 Fix generateDetailedPDF by adding proper detailed pages methods 2025-10-08 14:27:31 +02:00
3b5eb02986 Remove bogus PDF generation methods - require fillable template 2025-10-08 14:24:32 +02:00
f7c318f1d6 Make validation use exact same PDF generation as export 2025-10-08 14:20:40 +02:00
7095c8611a Fix validation to use exact same method as export (fillPDFTemplate) 2025-10-08 14:17:35 +02:00
bc0b23441f Simplify: Both export and validation use the exact same PDF generation method 2025-10-08 14:14:05 +02:00
16a6198dff Restore export to use fillable template, validation uses improved layout 2025-10-08 14:10:29 +02:00
57a8017b2e Fix fillable PDF to use improved detailed pages layout 2025-10-08 14:08:49 +02:00
555d688f17 Make validation use same PDF generation as export (fillable template) 2025-10-08 14:06:59 +02:00
5d97dfbad2 Fix validation PDF path to match saveValidatedPDF expectations 2025-10-08 14:06:03 +02:00
79e3a562fa Add debug logging for validation PDF generation 2025-10-08 14:04:13 +02:00
a64b60a412 v2.5.31: Fixed export PDF generation error
- Fixed return value handling in generateCompleteCA3PDF() method
- Export now correctly returns file path instead of boolean
- Improved error handling for PDF generation failures
- Export functionality now works with both fillable and improved layouts
- Updated module version to 2.5.31
2025-10-08 14:01:49 +02:00
e9592d5314 v2.5.30: Unified PDF generation with status-based approach
- Created single method generateCompleteCA3PDF() for both export and validation
- Export uses fillable template when available, validation uses improved layout
- Both export and validation now use the same improved detailed pages
- Cleaner architecture with status parameter (export/validation)
- All PDF improvements centralized in generateImprovedPDF() method
- Better maintainability and consistency across all PDF generation
- Updated module version to 2.5.30
2025-10-08 14:00:47 +02:00
a24bf86ecb v2.5.29: Fixed export functionality and validation PDF layout
- Restored export functionality to use fillable PDF template when available
- Fixed validation PDF to use improved layout with all enhancements
- Separated export and validation: export uses fillable template, validation uses improved layout
- Validation PDF now includes OD and bank journal tables on first page
- Validation PDF now has all improvements (footer, filtered accounts, etc.)
- Updated module version to 2.5.29
2025-10-08 13:53:15 +02:00
56bfa53669 v2.5.28: Fixed validation PDF to use same improved layout as export
- Validation now uses the same improved PDF generation as export
- Validation PDF now includes OD and bank journal tables on first page
- Both export and validation now use generateBasicPDF() for consistency
- Validation PDF now has all improvements (footer, filtered accounts, etc.)
- Fixed issue where validation used different PDF generation method
- Updated module version to 2.5.28
2025-10-08 13:44:52 +02:00
51c6f4122d v2.5.27: Removed debug code for production readiness
- Cleaned up all debug statements and error_log calls from PDF generation
- Removed test data and debugging code for production readiness
- Eliminated unnecessary logging during PDF generation
- Code is now clean and optimized for production use
- Updated module version to 2.5.27
2025-10-08 13:37:44 +02:00
8792b261f7 v2.5.26: Added declaration period to footer
- Footer now displays declaration period centered between company name and page number
- Enhanced footer information with company name, declaration period, and page count
- Professional PDF layout with complete footer information
- Declaration period helps identify the document period
- Updated module version to 2.5.26
2025-10-08 13:23:18 +02:00
f5829444f1 v2.5.25: Fixed footer page count using TCPDF alias system
- Now uses TCPDF's alias system for proper total page count
- Footer now shows proper 'Page X/Y' format with accurate total pages
- Fixed issue where total pages were showing as current page
- Added getAliasNbPages() method override for correct page counting
- Footer now displays correct total page count using TCPDF's alias system
- Updated module version to 2.5.25
2025-10-08 13:16:51 +02:00
5f88a478a2 v2.5.24: Fixed footer page count with proper implementation
- Now properly sets total pages after all pages are generated
- Footer now shows proper 'Page X/Y' format with accurate total pages
- Fixed issue where {nb} placeholder wasn't being processed by TCPDF
- Added setTotalPages method to custom PDF class
- Footer now displays correct total page count using custom implementation
- Updated module version to 2.5.24
2025-10-08 13:13:54 +02:00
7f7aa5a9fc v2.5.23: Fixed footer page count using TCPDF placeholder
- Now uses TCPDF's {nb} placeholder for accurate total page count
- Footer now shows proper 'Page X/Y' format with correct total pages
- Fixed issue where total pages showed same as current page
- Footer now displays correct total page count using TCPDF's built-in mechanism
- Updated module version to 2.5.23
2025-10-08 13:12:12 +02:00
a8b2f19bae v2.5.22: Enhanced footer with total page count
- Footer now displays 'Page X/Y' format (e.g., 'Page 1/7')
- Professional PDF layout with total page count for better document navigation
- Users can now see current page and total pages in footer
- Enhanced footer provides complete page information
- Updated module version to 2.5.22
2025-10-08 13:09:50 +02:00
3da77d0e3f v2.5.21: Filtered zero-value accounts from PDF detailed pages
- Only accounts with non-zero amounts are now displayed in PDF detailed pages
- Eliminated display of accounts with 0.00 amounts to save paper and improve readability
- Resume now shows count of only non-zero accounts
- Detailed pages now contain only relevant accounts with actual values
- Improved PDF efficiency and cleaner output
- Updated module version to 2.5.21
2025-10-08 13:07:20 +02:00
3835d5f304 v2.5.20: Fixed table subtitle positioning for proper alignment
- Added SetX positioning to match table alignment for subtitles
- 'Comptes de base (ventes)' and 'Comptes de TVA' subtitles now properly positioned
- Subtitles use same X positioning as center-aligned table
- Table and subtitles now have consistent positioning and alignment
- Updated module version to 2.5.20
2025-10-08 13:04:52 +02:00
08d60e15df v2.5.19: Fixed table subtitle alignment for line 08 tables
- Table subtitles now center-aligned to match table alignment
- 'Comptes de base (ventes)' and 'Comptes de TVA' subtitles now properly centered
- Better layout alignment with center-aligned table for professional appearance
- Table and subtitles now have consistent center alignment
- Updated module version to 2.5.19
2025-10-08 13:03:00 +02:00
8aabfabd44 v2.5.18: Fixed table subtitle width for line 08 tables
- Table subtitles now use same width as table instead of stretching page-wide
- 'Comptes de base (ventes)' and 'Comptes de TVA' subtitles now properly aligned
- Better visual consistency with table width for professional appearance
- Table subtitles no longer extend beyond table boundaries
- Updated module version to 2.5.18
2025-10-08 13:01:37 +02:00
61b9a7d203 v2.5.17: Fixed line 08 amount display for mixed amount types
- Now shows separate base and VAT amounts for lines 08, 09, 9B
- Resume displays 'Montant de base: X | Montant de TVA: Y' for mixed amount lines
- More accurate amount display in PDF detailed pages
- Clear distinction between base and VAT amounts in line summaries
- Special handling for lines with both base and VAT amounts
- Updated module version to 2.5.17
2025-10-08 12:58:52 +02:00
68767840ac v2.5.16: Fixed line 08 resume display for mixed account types
- Now shows separate counts for base and VAT accounts for lines 08, 09, 9B
- Resume displays 'Comptes de base: X | Comptes de TVA: Y' for mixed account lines
- More accurate account breakdown in PDF detailed pages
- Clear distinction between base and VAT accounts in line summaries
- Special handling for lines with both base and VAT accounts
- Updated module version to 2.5.16
2025-10-08 12:57:15 +02:00
0b66cb4fd4 v2.5.15: Fixed company information source in PDF generation
- Now uses Dolibarr's $mysoc configuration instead of fetching separate company
- PDF footer now uses the same company data as CA-3 form filling
- Uses $mysoc (Dolibarr company config) for all company information
- Company name in PDF footer now matches the company used in CA-3 form
- Updated all method signatures and calls to use $mysoc consistently
- Removed duplicate company fetching and use consistent data source
2025-10-08 12:54:59 +02:00
024bc785f3 v2.5.14: Fixed company information in PDF footer
- Now uses main company entity (1) instead of current entity
- PDF footer now shows the actual Dolibarr company, not first client
- Uses main company entity for consistent company information
- Company name in PDF footer now matches the actual Dolibarr company
- Updated module version to 2.5.14
2025-10-08 12:51:17 +02:00
5edb85872b v2.5.13: Fixed class definition order for TCPDF dependency
- Moved custom PDF class definition after TCPDF include
- Custom class now extends TCPDF after it's properly loaded
- Fixed 'Class TCPDF not found' error by correct class definition order
- Custom PDF class now works with proper dependency loading
- Updated module version to 2.5.13
2025-10-08 12:49:03 +02:00
14427dec13 v2.5.12: Fixed TCPDF path error by removing duplicate include
- Removed incorrect TCPDF include since it's already loaded by Dolibarr
- Fixed 'Failed opening required' error for TCPDF file
- TCPDF is already available through Dolibarr's standard loading at line 69
- Custom PDF class now works without duplicate includes
- Updated module version to 2.5.12
2025-10-08 12:47:50 +02:00
85feea7cf3 v2.5.11: Fixed TCPDF class loading issue
- Added proper TCPDF include statement before custom class definition
- Ensured TCPDF is loaded before extending it with custom PDF class
- Fixed 'Class TCPDF not found' error
- Custom PDF class now works correctly with proper dependencies
- Updated module version to 2.5.11
2025-10-08 12:46:35 +02:00
ca2b6f11a1 v2.5.10: Fixed footer implementation using custom PDF class
- Fixed TCPDF footer implementation using proper Footer() method override
- Created DeclarationTVA_CustomPDF class extending TCPDF
- Removed incorrect setFooterCallback() calls that don't exist in TCPDF
- Company name and page numbering now work correctly on all pages
- Fixed 'Call to undefined method TCPDF::setFooterCallback()' error
- Updated module version to 2.5.10
2025-10-08 12:45:38 +02:00
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