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
This commit is contained in:
parent
51c6f4122d
commit
56bfa53669
@ -1,5 +1,13 @@
|
|||||||
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
|
# CHANGELOG MODULE DECLARATIONTVA FOR [DOLIBARR ERP CRM](https://www.dolibarr.org)
|
||||||
|
|
||||||
|
## 2.5.28
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
- **Fixed Validation PDF Layout**: Validation now uses the same improved PDF generation as export
|
||||||
|
- **Consistent PDF Layout**: Validation PDF now includes OD and bank journal tables on first page
|
||||||
|
- **Unified PDF Generation**: Both export and validation now use generateBasicPDF() for consistency
|
||||||
|
- **Complete PDF Features**: Validation PDF now has all improvements (footer, filtered accounts, etc.)
|
||||||
|
|
||||||
## 2.5.27
|
## 2.5.27
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@ -201,7 +201,7 @@ class DeclarationTVA_PDF
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generate PDF using FPDI or similar library
|
// Generate PDF using the improved method with all enhancements
|
||||||
$result = $this->fillPDFTemplate($template_file, $filepath, $declaration, $ca3_data, $mysoc);
|
$result = $this->fillPDFTemplate($template_file, $filepath, $declaration, $ca3_data, $mysoc);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
@ -318,13 +318,9 @@ class DeclarationTVA_PDF
|
|||||||
private function fillPDFTemplate($template_path, $output_path, $declaration, $ca3_data, $mysoc)
|
private function fillPDFTemplate($template_path, $output_path, $declaration, $ca3_data, $mysoc)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
// Check if we have a custom fillable PDF template
|
// Always use the improved PDF generation for consistency
|
||||||
if (file_exists($template_path) && $this->isFillablePDF($template_path)) {
|
// This ensures validation uses the same layout as export
|
||||||
return $this->fillFillablePDF($template_path, $output_path, $declaration, $ca3_data, $mysoc);
|
return $this->generateBasicPDF($output_path, $declaration, $ca3_data, $mysoc);
|
||||||
} else {
|
|
||||||
// Fall back to basic PDF generation
|
|
||||||
return $this->generateBasicPDF($output_path, $declaration, $ca3_data, $mysoc);
|
|
||||||
}
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$this->error = 'PDF generation failed: ' . $e->getMessage();
|
$this->error = 'PDF generation failed: ' . $e->getMessage();
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -76,7 +76,7 @@ class modDeclarationTVA extends DolibarrModules
|
|||||||
$this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@declarationtva'
|
$this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@declarationtva'
|
||||||
|
|
||||||
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
|
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
|
||||||
$this->version = '2.5.27';
|
$this->version = '2.5.28';
|
||||||
// Url to the file with your last numberversion of this module
|
// Url to the file with your last numberversion of this module
|
||||||
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
|
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user