Fix esportazione xml FE

This commit is contained in:
MatteoPistorello 2021-09-07 15:51:03 +02:00
parent 8e721ae142
commit f62946ddfa
1 changed files with 3 additions and 3 deletions

View File

@ -201,15 +201,15 @@ switch (post('op')) {
$failed[] = $fattura->numero_esterno; $failed[] = $fattura->numero_esterno;
} else { } else {
if ($r['dir'] == 'entrata') { if ($r['dir'] == 'entrata') {
$src = $fe->getFilename(); $dst = $fe->getFilename();
$dst = $src; $src = $dbo->selectOne('zz_files', 'filename', ['original' => $dst])['filename'];
} else { } else {
$src = basename($fattura->uploads()->where('name', 'Fattura Elettronica')->first()->filepath); $src = basename($fattura->uploads()->where('name', 'Fattura Elettronica')->first()->filepath);
$dst = basename($fattura->uploads()->where('name', 'Fattura Elettronica')->first()->original_name); $dst = basename($fattura->uploads()->where('name', 'Fattura Elettronica')->first()->original_name);
} }
$file = slashes($module->upload_directory.'/'.$src); $file = slashes($module->upload_directory.'/'.$src);
$dest = slashes($dir.'/tmp/'.$dst); $dest = slashes($dir.'tmp/'.$dst);
$result = copy($file, $dest); $result = copy($file, $dest);