fix: PDF-Pfad bei Cron/Batch-Import korrigiert
PDF wird jetzt korrekt nach /imports/{id}/{filename} gespeichert,
sodass sie beim Erstellen der Lieferantenrechnung gefunden und
angehängt werden kann.
Vorher: /imports/{ref}_{filename}
Jetzt: /imports/{id}/{filename} (konsistent mit manuellem Upload)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
77a1781182
commit
c7b34b149c
1 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue