Compare commits
3 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f1dded0803 | |||
| 75ef65c0ee | |||
| c7b34b149c |
4 changed files with 23 additions and 4 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -2,6 +2,16 @@
|
|||
|
||||
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
|
||||
|
|
|
|||
|
|
@ -104,7 +104,11 @@ Available in:
|
|||
|
||||
See [CHANGELOG.md](CHANGELOG.md) for detailed version history.
|
||||
|
||||
### 5.5 (Current)
|
||||
### 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
|
||||
- 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
|
||||
|
|
|
|||
|
|
@ -675,12 +675,12 @@ class ZugferdImport extends CommonObject
|
|||
$this->status = self::STATUS_IMPORTED;
|
||||
}
|
||||
|
||||
// Copy PDF to documents
|
||||
$destdir = $conf->importzugferd->dir_output . '/imports';
|
||||
// Copy PDF to documents (in subfolder by import ID)
|
||||
$destdir = $conf->importzugferd->dir_output . '/imports/' . $this->id;
|
||||
if (!is_dir($destdir)) {
|
||||
dol_mkdir($destdir);
|
||||
}
|
||||
$destfile = $destdir . '/' . $this->ref . '_' . basename($file_path);
|
||||
$destfile = $destdir . '/' . $this->pdf_filename;
|
||||
copy($file_path, $destfile);
|
||||
|
||||
// Update status
|
||||
|
|
|
|||
|
|
@ -2146,7 +2146,12 @@ 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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue