Compare commits

..

No commits in common. "main" and "v5.5" have entirely different histories.
main ... v5.5

4 changed files with 4 additions and 23 deletions

View file

@ -2,16 +2,6 @@
Alle wesentlichen Änderungen an diesem Projekt werden in dieser Datei dokumentiert.
## [5.7] - 2026-03-04
### Behoben
- **PDF-Pfad bei Cron/Batch-Import**: PDFs werden jetzt korrekt nach `/imports/{id}/{filename}` gespeichert
- Problem: Cron speicherte nach `/imports/{ref}_{filename}`, aber beim Erstellen der Rechnung wurde nach `/imports/{id}/{filename}` gesucht
- Lösung: Einheitlicher Pfad für manuellen und Cron-Import
- **Fallback für alte PDF-Pfade**: Beim Anhängen an Lieferantenrechnung wird auch im alten Pfadformat gesucht
- Ermöglicht korrekte Verarbeitung von Imports die vor dem Fix erstellt wurden
- Sucht zuerst `/imports/{id}/{filename}`, dann `/imports/{ref}_{filename}`
## [5.5] - 2026-03-03
### Behoben

View file

@ -104,11 +104,7 @@ Available in:
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
### 5.7 (Current)
- Fixed PDF path for Cron/Batch imports - now correctly saved to `/imports/{id}/{filename}`
- Added fallback for old PDF paths when attaching to supplier invoices
### 5.5
### 5.5 (Current)
- Fixed copper surcharge scaling in mass update (different quantities between Dolibarr and Datanorm)
- Fixed VAT rate preservation when updating prices
- New filters for price direction (up/down) in mass update

View file

@ -675,12 +675,12 @@ class ZugferdImport extends CommonObject
$this->status = self::STATUS_IMPORTED;
}
// Copy PDF to documents (in subfolder by import ID)
$destdir = $conf->importzugferd->dir_output . '/imports/' . $this->id;
// Copy PDF to documents
$destdir = $conf->importzugferd->dir_output . '/imports';
if (!is_dir($destdir)) {
dol_mkdir($destdir);
}
$destfile = $destdir . '/' . $this->pdf_filename;
$destfile = $destdir . '/' . $this->ref . '_' . basename($file_path);
copy($file_path, $destfile);
// Update status

View file

@ -2146,12 +2146,7 @@ if ($action == 'createinvoice' && $id > 0) {
// Invoice stays as draft - user can validate manually
// Copy PDF to invoice and register in ECM
// Neuer Pfad: /imports/{id}/{filename}
$source_pdf = $conf->importzugferd->dir_output.'/imports/'.$import->id.'/'.$import->pdf_filename;
// Fallback: Alter Pfad /imports/{ref}_{filename}
if (!file_exists($source_pdf)) {
$source_pdf = $conf->importzugferd->dir_output.'/imports/'.$import->ref.'_'.$import->pdf_filename;
}
if (file_exists($source_pdf)) {
// Relativer Pfad für ECM (ohne DOL_DATA_ROOT Prefix)
$rel_dir = 'fournisseur/facture/'.get_exdir($invoice->id, 2, 0, 0, $invoice, 'invoice_supplier').$invoice->ref;