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:
parent
dfedb4b512
commit
a864b251b2
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user