Modifiche all'importazione dei file di ING e visualizzazioni categorie
This commit is contained in:
parent
53c984c315
commit
337504b127
@ -48,6 +48,7 @@ class FullCalenderController extends Controller
|
||||
case 'add':
|
||||
$event = Event::create([
|
||||
'title' => $request->title,
|
||||
'description' => $request->description,
|
||||
'start' => $request->start,
|
||||
'end' => $request->end,
|
||||
]);
|
||||
@ -57,6 +58,7 @@ class FullCalenderController extends Controller
|
||||
case 'update':
|
||||
$event = Event::find($request->id)->update([
|
||||
'title' => $request->title,
|
||||
'description' => $request->description,
|
||||
'start' => $request->start,
|
||||
'end' => $request->end,
|
||||
]);
|
||||
|
@ -21,7 +21,8 @@ class Categorie extends Model
|
||||
}
|
||||
public static function listCategorieAPI()
|
||||
{
|
||||
return self::select('cat_name')->pluck('cat_name');
|
||||
// return self::select('cat_name')->pluck('cat_name');
|
||||
return self::all()->sortBy('cat_name');
|
||||
}
|
||||
public static function listSpesa()
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ class Event extends Model
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'title', 'start', 'end'
|
||||
'title','description', 'start', 'end'
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -188,15 +188,15 @@ JOIN categories as c ON a.mov_fk_categoria=c.id';
|
||||
rename($inputPath,$outputPath);
|
||||
|
||||
$collection = (new FastExcel)->import($outputPath, function ($line){
|
||||
if($line['Data valuta'])
|
||||
if($line['DATA VALUTA'])
|
||||
{
|
||||
list($giorno,$mese,$anno) = explode('/',$line['Data valuta']);
|
||||
list($giorno,$mese,$anno) = explode('/',$line['DATA VALUTA']);
|
||||
$data="$anno-$mese-$giorno";
|
||||
self::insEntrata([
|
||||
'mov_data'=>self::dateFormat(0,$line['Data valuta']),
|
||||
'mov_data'=>self::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_descrizione'=>$line['DESCRIZIONE OPERAZIONE'],
|
||||
'mov_importo'=>trim(str_replace(',','.',(str_replace('.','',str_replace('€', '', $line['IMPORTO IN EURO']))))),
|
||||
'mov_fk_tags'=>1,
|
||||
'userid'=>1,
|
||||
]);
|
||||
|
@ -16,7 +16,8 @@ class tag extends Model
|
||||
|
||||
public static function getApiList()
|
||||
{
|
||||
return self::select('tag_name')->pluck('tag_name');
|
||||
//return self::select('tag_name')->pluck('tag_name');
|
||||
return self::all()->sortBy('tag_name');
|
||||
}
|
||||
|
||||
public static function inserisci($param) {
|
||||
|
@ -27,7 +27,7 @@
|
||||
Titolo:
|
||||
<input type='text' class="form-control" name="title"/>
|
||||
Descrizione:
|
||||
<textarea class="form-control" name="descrizione"></textarea>
|
||||
<textarea class="form-control" name="description"></textarea>
|
||||
<hr>
|
||||
<input type="submit" name="Submit">
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user