1
0
mirror of https://github.com/devcode-it/openstamanager.git synced 2025-02-16 19:40:44 +01:00

Fix upload csv

This commit is contained in:
Pek5892 2024-03-27 10:17:27 +01:00
parent dfedb4b512
commit a864b251b2
2 changed files with 11 additions and 1 deletions

View File

@ -73,7 +73,8 @@ switch (filter('op')) {
$limit = 500; $limit = 500;
// Inizializzazione del lettore CSV // Inizializzazione del lettore CSV
$csv = new $import_manager($record->filepath); $filepath = base_dir().'/files/'.$record->directory.'/'.$record->filename;
$csv = new $import_manager($filepath);
foreach ($fields as $key => $value) { foreach ($fields as $key => $value) {
$csv->setColumnAssociation($key, (int) $value - 1); $csv->setColumnAssociation($key, (int) $value - 1);
} }

View File

@ -31,6 +31,10 @@ class Import extends Model
protected $table = 'zz_imports'; protected $table = 'zz_imports';
protected static $translated_fields = [
'name',
];
// Relazioni Eloquent // Relazioni Eloquent
public function moduloCollegato() public function moduloCollegato()
{ {
@ -41,4 +45,9 @@ class Import extends Model
{ {
return 'Import'; return 'Import';
} }
public static function getTranslatedFields()
{
return self::$translated_fields;
}
} }