Commit Graph

329 Commits

Author SHA1 Message Date
be9238e84c Fix accounting entry creation by using direct SQL insert
- Remove dependency on non-existent AccountingBookkeeping class
- Use direct SQL INSERT into accounting_bookkeeping table
- Fixes 'Failed opening required' error for accounting class
- Creates accounting entries directly in database
2025-10-08 21:46:30 +02:00
a03f883f28 Fix declaration object creation in createAccountingEntries
- Fix fetch() method usage - it returns 1/0, not an object
- Create proper declaration object with rowid, name, and dates
- Fixes 'No declaration dates found' error in getCA3LineDetails
2025-10-08 21:45:21 +02:00
cf9e3f76fa Add more debugging to getCA3LineDetails method
- Add debug logs to track method calls and return values
- Help diagnose why account details are not being found
- Track account count returned by getCA3LineDetails
2025-10-08 21:44:04 +02:00
e0e4ff5689 Add debugging logs to accounting entry creation
- Add debug logs to track CA-3 lines found
- Add debug logs to track OD entries creation
- Add debug logs to track line 8, 20, and balancing entries
- Help diagnose why no OD journal entries are being created
2025-10-08 21:43:04 +02:00
308ec34a4a Fix database error: remove non-existent date_submitted column
- Remove date_submitted references from updateDeclarationStatus()
- Remove date_submitted references from resetDeclarationStatus()
- Fixes 'Unknown column date_submitted' database error
2025-10-08 21:41:13 +02:00
1aa471e85e Add testing mode for declaration submission
- Temporarily disable status validation to allow re-submission
- Add resetDeclarationStatus() method for testing
- Add reset button for submitted declarations
- Add French language strings for reset functionality
- Allows multiple submission attempts during testing
2025-10-08 21:38:57 +02:00
e34403d3e4 Add confirmation popup for declaration submission
- Add confirmSubmission() JavaScript function with modal dialog
- Include warning about irreversible accounting entry creation
- Add French language strings for confirmation dialog
- Ensure user gets proper confirmation before submission starts
2025-10-08 21:34:38 +02:00
abddcc1c30 Fix duplicate accounting entries settings
- Remove duplicate 'Create accounting entries' toggle from journal configuration
- Use existing 'Auto-create accounting entries' setting for submission workflow
- Clean up unused language strings
- Consolidate accounting entry control into single, clear setting
2025-10-08 21:32:37 +02:00
e1253999d8 Implement automatic accounting entry creation for declaration submission
- Add comprehensive accounting integration with OD and bank journal entries
- Create configurable accounting entries toggle in setup
- Implement submission workflow with accounting entry creation
- Add proper error handling and validation
- Support VAT refund threshold logic for account selection
- Integrate with Dolibarr's AccountingBookkeeping class
- Add French language strings for new features
2025-10-08 21:30:33 +02:00
b915e95b5e Remove duplicate getJournalConfiguration method declaration in PDF class 2025-10-08 17:23:15 +02:00
d29644738e Fix VAT refund threshold form handling by using direct POST access instead of GETPOST 2025-10-08 16:37:08 +02:00
eeb7ae6948 Add more debugging and fix form field for VAT refund threshold 2025-10-08 16:36:07 +02:00
181e3d7d74 Add debugging for VAT refund threshold configuration saving issue 2025-10-08 16:33:39 +02:00
19b74db330 Rename 'Compte TVA à recevoir' to 'Compte TVA à reporter' for clarity 2025-10-08 16:31:37 +02:00
75aac53fca Add VAT refund threshold configuration to MVP setup page with UI and language strings 2025-10-08 16:29:58 +02:00
e00c6f89f7 Add VAT refund threshold logic with configurable threshold and 445671 account support 2025-10-08 16:28:18 +02:00
ab6dad1561 Version 2.6.0: Fix declaration list display and clean debug code 2025-10-08 15:20:29 +02:00
c08a8bb526 Remove all debug statements and error_log calls from codebase 2025-10-08 15:18:48 +02:00
fea225dc3d Fix declaration list to use CA-3 line values (line 32 for VAT due, lines 26/27 for refund) instead of main table values 2025-10-08 15:16:03 +02:00
5cae470880 Add debug info to show raw database values in declaration list 2025-10-08 15:09:32 +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