1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-01-07 13:22:15 +01:00

fix: directory importazione fatture di acquisto

This commit is contained in:
valentina 2024-10-25 13:20:52 +02:00
parent e7097bef9b
commit bfc5b5642e

View File

@ -82,17 +82,16 @@ class FatturaElettronica
public static function getImportDirectory()
{
if (!isset(self::$directory)) {
$module = Module::where('name', 'Fatture di vendita')->first();
$module = Module::where('name', 'Fatture di acquisto')->first();
$plugins = $module->plugins;
if (!empty($plugins)) {
$plugin = $plugins->first(fn ($value, $key) => $value->getTranslation('title') == 'Fatturazione Elettronica');
$plugins = $module->plugins;
if (!empty($plugins)) {
$plugin = $plugins->first(fn ($value, $key) => $value->getTranslation('title') == 'Fatturazione Elettronica');
self::$directory = base_dir().'/'.$plugin->upload_directory;
}
self::$directory = base_dir().'/'.$plugin->upload_directory;
}
return self::$directory;
}