BUB-21 Creato importazione Estratti conto Excel di INGDirect
This commit is contained in:
@@ -266,30 +266,25 @@ class MovimentiController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function importEC_ING()
|
||||
public function importEC_ING(Request $request)
|
||||
{
|
||||
$collection = (new FastExcel)->import('file1.xlsx', function ($line){
|
||||
if($line['Data valuta'])
|
||||
{
|
||||
return Movimenti::insEntrata([
|
||||
'mov_data'=>$this->dateFormat(0,$line['Data valuta']),
|
||||
'mov_fk_categoria'=>1,
|
||||
'mov_descrizione'=>$line['Descrizione operazione'],
|
||||
'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',str_replace('€', '', $line['Importo']))))),
|
||||
'mov_fk_tags'=>1,
|
||||
'userid'=>1,
|
||||
]
|
||||
);
|
||||
}
|
||||
/*
|
||||
* "Data contabile" => "29/03/2023"
|
||||
"Data valuta" => "29/03/2023"
|
||||
"Causale" => "PAGAMENTI DIVERSI"
|
||||
"Descrizione operazione" => "Addebito SDD CORE Scad. 29/03/2023 Imp. 5.99 Creditor id. IT46ZZZ0000013970161009 ILIAD Id Mandato ILIAD-FR9HXO-1 Debitore FLAVIO BARACHINO E PAOLA BRENTARI Rif ▶"
|
||||
"Importo" => "€ -5,99"
|
||||
*/
|
||||
//dd($line);
|
||||
});
|
||||
if ($request->hasFile('filename'))
|
||||
{
|
||||
$filename=$request->file('filename')->store('EC');
|
||||
// dd($filename); Documenti/xyz.xls
|
||||
Movimenti::importEstrattoIng($filename);
|
||||
|
||||
return redirect(Route('movimenti'));
|
||||
}
|
||||
else {
|
||||
return 'Nessun File trovato';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function importFile()
|
||||
{
|
||||
return view('conti.import');
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user