Compare commits
2 Commits
652f9a7e76
...
9320ce76a1
Author | SHA1 | Date | |
---|---|---|---|
9320ce76a1 | |||
f82f65a0c5 |
@ -44,7 +44,15 @@ class ImportRuleController extends Controller
|
|||||||
'is_active' => 'boolean',
|
'is_active' => 'boolean',
|
||||||
'created_by' => 'nullable|string|max:255',
|
'created_by' => 'nullable|string|max:255',
|
||||||
]);
|
]);
|
||||||
ImportRule::create($request->all());
|
ImportRule::create(
|
||||||
|
[
|
||||||
|
'category_id'=>$request->category_id,
|
||||||
|
'pattern'=>$request->pattern,
|
||||||
|
'description'=>$request->description,
|
||||||
|
'is_active'=>1,
|
||||||
|
]
|
||||||
|
|
||||||
|
);
|
||||||
return redirect()->route('import_rules.index'); // Redirect to the index after storing the rule
|
return redirect()->route('import_rules.index'); // Redirect to the index after storing the rule
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,44 +358,65 @@ class MovimentiController extends Controller
|
|||||||
|
|
||||||
public function importmappedCsv(Request $request)
|
public function importmappedCsv(Request $request)
|
||||||
{
|
{
|
||||||
//$request->mov_data
|
$this->prepareMapping($request['mapping']);
|
||||||
$mapped=$request['mapping'];
|
$filename = Storage::path($request->filename);
|
||||||
foreach( $mapped as $key => $value)
|
|
||||||
{
|
|
||||||
if($value!=null)
|
|
||||||
{
|
|
||||||
$this->map[$key]=$value;
|
|
||||||
$collection = collect($this->map);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//dd ($this->map,$collection);
|
|
||||||
|
|
||||||
$mappdCvs=(new FastExcel)->configureCsv(';')->import(
|
(new FastExcel)->configureCsv(';')->import($filename, function($line) {
|
||||||
Storage::path($request->filename), function($line){
|
$data = $this->mapCsvLineToDb($line);
|
||||||
if(isset($line[$this->map['mov_data']]))
|
// dd($data);
|
||||||
{
|
if (isset($data['mov_data'])) {
|
||||||
|
Movimenti::create($data);
|
||||||
Movimenti::create (
|
}
|
||||||
['mov_data' => DateTime::createFromFormat(
|
|
||||||
'd/m/Y',$line[$this->map['mov_data']]),
|
|
||||||
'mov_descrizione' => $line[$this->map['mov_descrizione']],
|
|
||||||
'mov_importo_dare' => $line[$this->map['mov_importo_dare']],
|
|
||||||
'mov_importo_avere' => $line[$this->map['mov_importo_avere']],
|
|
||||||
'mov_fk_categoria' => '1',
|
|
||||||
'mov_fk_tags' => 1,
|
|
||||||
'mov_inserito_da' => Auth::id(),
|
|
||||||
'conto_id_da' => 1
|
|
||||||
,'conto_id_a' => 1,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// dd($map,$mapped,$request,$collection);
|
|
||||||
// dd($request);
|
|
||||||
return redirect(Route('movimenti'));
|
return redirect(Route('movimenti'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Prepara la mappatura tra i campi CSV e i campi DB
|
||||||
|
*/
|
||||||
|
private function prepareMapping($mapping)
|
||||||
|
{
|
||||||
|
foreach ($mapping as $key => $value) {
|
||||||
|
if ($value != null) {
|
||||||
|
$this->map[$key] = $value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mappa una riga del CSV ai campi del database
|
||||||
|
*/
|
||||||
|
private function mapCsvLineToDb($line)
|
||||||
|
{
|
||||||
|
if (isset($line[$this->map['mov_data']])) {
|
||||||
|
$data = [
|
||||||
|
'mov_data' => $this->parseDate($line[$this->map['mov_data']]),
|
||||||
|
'mov_descrizione' => $line[$this->map['mov_descrizione']] ?? null,
|
||||||
|
'mov_importo_dare' => Movimenti::cleanImporto($line[$this->map['mov_importo_dare']]?? null) ,
|
||||||
|
'mov_importo_avere' => Movimenti::cleanImporto($line[$this->map['mov_importo_avere']] ?? null),
|
||||||
|
'mov_fk_categoria' => Movimenti::setCategoriesFromCsv($line[$this->map['mov_descrizione']] ?? ''),
|
||||||
|
'mov_fk_tags' => 1,
|
||||||
|
'mov_inserito_da' => Auth::id(),
|
||||||
|
'conto_id_da' => 1,
|
||||||
|
'conto_id_a' => 1,
|
||||||
|
];
|
||||||
|
return $data;
|
||||||
|
}
|
||||||
|
return null; // Se non c'è la data, non importa la riga
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Converte la data dal formato d/m/Y a Y-m-d
|
||||||
|
*/
|
||||||
|
private function parseDate($dateString)
|
||||||
|
{
|
||||||
|
$date = DateTime::createFromFormat('d/m/Y', $dateString);
|
||||||
|
return $date ? $date->format('Y-m-d') : null;
|
||||||
|
}
|
||||||
|
|
||||||
public function importFile()
|
public function importFile()
|
||||||
{
|
{
|
||||||
return view('conti.import');
|
return view('conti.import');
|
||||||
@ -428,4 +449,5 @@ class MovimentiController extends Controller
|
|||||||
$mov=Movimenti::getMovimentoById($id);
|
$mov=Movimenti::getMovimentoById($id);
|
||||||
return json_encode($mov);
|
return json_encode($mov);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||||||
class ImportRule extends Model
|
class ImportRule extends Model
|
||||||
{
|
{
|
||||||
use HasFactory;
|
use HasFactory;
|
||||||
|
protected $fillable = [
|
||||||
|
'category_id',
|
||||||
|
'pattern',
|
||||||
|
'description',
|
||||||
|
'is_active',
|
||||||
|
'created_by',
|
||||||
|
];
|
||||||
|
|
||||||
// In MovimentiController o direttamente nel model Movimenti
|
// In MovimentiController o direttamente nel model Movimenti
|
||||||
|
|
||||||
|
@ -10,7 +10,8 @@ use Rap2hpoutre\FastExcel\FastExcel;
|
|||||||
use App\Models\Categorie;
|
use App\Models\Categorie;
|
||||||
use App\Models\Conto;
|
use App\Models\Conto;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
//use Illuminate\Support\Facades\Schema;
|
use App\Models\ImportRule;
|
||||||
|
|
||||||
|
|
||||||
class Movimenti extends Model
|
class Movimenti extends Model
|
||||||
{
|
{
|
||||||
@ -33,7 +34,8 @@ class Movimenti extends Model
|
|||||||
public static $query= 'SELECT
|
public static $query= 'SELECT
|
||||||
a.id,
|
a.id,
|
||||||
a.mov_data,
|
a.mov_data,
|
||||||
a.mov_importo,
|
a.mov_importo_dare,
|
||||||
|
a.mov_importo_avere,
|
||||||
a.mov_descrizione,
|
a.mov_descrizione,
|
||||||
c.cat_name,
|
c.cat_name,
|
||||||
t.tag_name,
|
t.tag_name,
|
||||||
@ -186,7 +188,8 @@ JOIN categories as c ON a.mov_fk_categoria=c.id';
|
|||||||
'mov_data' => $request['mov_data'],
|
'mov_data' => $request['mov_data'],
|
||||||
'mov_fk_categoria'=>$request['mov_fk_categoria'],
|
'mov_fk_categoria'=>$request['mov_fk_categoria'],
|
||||||
'mov_descrizione'=>$request['mov_descrizione'],
|
'mov_descrizione'=>$request['mov_descrizione'],
|
||||||
'mov_importo'=>$request['mov_importo'],
|
'mov_importo_dare' => $request['mov_importo_dare'],
|
||||||
|
'mov_importo_avere' => $request['mov_importo_avere'],
|
||||||
'mov_fk_tags'=>$request['mov_fk_tags'],
|
'mov_fk_tags'=>$request['mov_fk_tags'],
|
||||||
'mov_inserito_da'=>$request['userid'],
|
'mov_inserito_da'=>$request['userid'],
|
||||||
]);
|
]);
|
||||||
@ -203,7 +206,8 @@ JOIN categories as c ON a.mov_fk_categoria=c.id';
|
|||||||
$expression= DB::raw('SELECT
|
$expression= DB::raw('SELECT
|
||||||
a.id,
|
a.id,
|
||||||
a.mov_data,
|
a.mov_data,
|
||||||
a.mov_importo,
|
a.mov_importo_dare,
|
||||||
|
a.mov_importo_avere,
|
||||||
a.mov_descrizione,
|
a.mov_descrizione,
|
||||||
c.cat_name,
|
c.cat_name,
|
||||||
t.tag_name,
|
t.tag_name,
|
||||||
@ -222,7 +226,8 @@ JOIN categories as c ON a.mov_fk_categoria=c.id';
|
|||||||
|
|
||||||
$expression=DB::raw(' SELECT a.id,
|
$expression=DB::raw(' SELECT a.id,
|
||||||
a.mov_data,
|
a.mov_data,
|
||||||
a.mov_importo,
|
a.mov_importo_dare,
|
||||||
|
a.mov_importo_avere,
|
||||||
a.mov_descrizione,
|
a.mov_descrizione,
|
||||||
c.cat_name,
|
c.cat_name,
|
||||||
t.tag_name,
|
t.tag_name,
|
||||||
@ -241,7 +246,8 @@ JOIN categories as c ON a.mov_fk_categoria=c.id';
|
|||||||
$expression=DB::raw('SELECT
|
$expression=DB::raw('SELECT
|
||||||
a.id,
|
a.id,
|
||||||
a.mov_data,
|
a.mov_data,
|
||||||
a.mov_importo,
|
a.mov_importo_dare,
|
||||||
|
a.mov_importo_avere,
|
||||||
a.mov_descrizione,
|
a.mov_descrizione,
|
||||||
c.cat_name,
|
c.cat_name,
|
||||||
t.tag_name,
|
t.tag_name,
|
||||||
@ -357,41 +363,40 @@ JOIN categories as c ON a.mov_fk_categoria=c.id';
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test applicazione regole
|
|
||||||
public function setCategoriaMovimento($movimento)
|
|
||||||
{
|
|
||||||
$rules= \App\Models\ImportRule::all();
|
|
||||||
|
|
||||||
foreach ($rules as $role)
|
|
||||||
{
|
|
||||||
if (preg_match("/$role->parola/i","$movimento->descrizione"))
|
|
||||||
{
|
|
||||||
$movimento->catemov_fk_categoria=$role->categoria_id;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$movimento->catemov_fk_categoria=1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
// Ritorna la categoria suggerita in base alla descrizione del movimento da utilizzare sul db
|
||||||
public static function getSuggestedCategory($descrizione)
|
public static function getSuggestedCategory($descrizione)
|
||||||
{
|
{
|
||||||
$rule = ImportRule::whereRaw('? LIKE CONCAT("%", pattern, "%")', [$descrizione])->first();
|
$rule = ImportRule::whereRaw('? LIKE CONCAT("%", pattern, "%")', [$descrizione])->first();
|
||||||
return $rule ? $rule->category_id : null;
|
return $rule ? $rule->category_id : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function setCategoriesFromCsv($descrizione)
|
||||||
|
{
|
||||||
|
$rules = ImportRule::all();
|
||||||
|
$categoria = 1; // Default category
|
||||||
|
|
||||||
|
foreach ($rules as $rule) {
|
||||||
|
if (preg_match("/$rule->pattern/i", $descrizione)) {
|
||||||
|
$categoria = $rule->category_id;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $categoria;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Ritorna gli anni presenti nei movimenti
|
||||||
|
|
||||||
public static function getYearsFromMovimenti()
|
public static function getYearsFromMovimenti()
|
||||||
{
|
{
|
||||||
$anni=DB::table('movimentis')->select(DB::raw('DISTINCT YEAR(mov_data) as anno'))->get();
|
return self::selectRaw('YEAR(mov_data) as anno')
|
||||||
// dd($anni); // for test purposes
|
->distinct()
|
||||||
return $anni;
|
->orderBy('anno', 'desc')
|
||||||
|
->get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -410,24 +415,27 @@ JOIN categories as c ON a.mov_fk_categoria=c.id';
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ritorna la somma delle entrate per un anno specifico
|
||||||
public static function getEntrate($year)
|
public static function getEntrate($year)
|
||||||
{
|
{
|
||||||
$entrate_anno=DB::table('movimentis')
|
return self::whereYear('mov_data', $year)
|
||||||
->where('mov_importo','>',0)
|
->sum('mov_importo_avere');
|
||||||
->whereYear('mov_data', '=' , $year)
|
|
||||||
->sum('mov_importo');
|
|
||||||
//->get();
|
|
||||||
return $entrate_anno;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ritorna la somma delle uscite per un anno specifico
|
||||||
public static function getUscite($year)
|
public static function getUscite($year)
|
||||||
{
|
{
|
||||||
$uscite_anno=DB::table('movimentis')
|
return self::whereYear('mov_data', $year)
|
||||||
->where('mov_importo','<',0)
|
->sum('mov_importo_dare');
|
||||||
->whereYear('mov_data', '=' , $year)
|
}
|
||||||
->sum('mov_importo');
|
|
||||||
//->get();
|
public static function cleanImporto($importo){
|
||||||
return ($uscite_anno);
|
// Rimuove i punti e sostituisce la virgola con un punto
|
||||||
|
$importo = str_replace('.', '', $importo);
|
||||||
|
$importo = str_replace(',', '.', $importo);
|
||||||
|
$importo = str_replace('-', '', $importo);
|
||||||
|
$importo = str_replace('+', '', $importo);
|
||||||
|
return $importo;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,14 @@ return [
|
|||||||
'replace_placeholders' => true,
|
'replace_placeholders' => true,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
'app' => [
|
||||||
|
'driver' => 'single',
|
||||||
|
'path' => storage_path('logs/gestionale2025.log'),
|
||||||
|
'level' => env('LOG_LEVEL', 'debug'),
|
||||||
|
'days' => env('LOG_DAILY_DAYS', 14),
|
||||||
|
'replace_placeholders' => true,
|
||||||
|
],
|
||||||
|
|
||||||
'daily' => [
|
'daily' => [
|
||||||
'driver' => 'daily',
|
'driver' => 'daily',
|
||||||
'path' => storage_path('logs/laravel.log'),
|
'path' => storage_path('logs/laravel.log'),
|
||||||
|
@ -20,8 +20,8 @@ class CreateMovimentisTable extends Migration
|
|||||||
$table->unsignedBigInteger('mov_fk_categoria');
|
$table->unsignedBigInteger('mov_fk_categoria');
|
||||||
$table->foreign('mov_fk_categoria')->references('id')->on('categories');
|
$table->foreign('mov_fk_categoria')->references('id')->on('categories');
|
||||||
$table->longText('mov_descrizione');
|
$table->longText('mov_descrizione');
|
||||||
$table->decimal('mov_importo_dare',8,2);
|
$table->decimal('mov_importo_dare',8,2)->nullable();
|
||||||
$table->decimal('mov_importo_avere',8,2);
|
$table->decimal('mov_importo_avere',8,2)->nullable();
|
||||||
$table->unsignedBigInteger('mov_inserito_da');
|
$table->unsignedBigInteger('mov_inserito_da');
|
||||||
$table->foreign('mov_inserito_da')->references('id')->on('users');
|
$table->foreign('mov_inserito_da')->references('id')->on('users');
|
||||||
$table->unsignedBigInteger('mov_fk_tags');
|
$table->unsignedBigInteger('mov_fk_tags');
|
||||||
|
@ -17,9 +17,9 @@ class CategorieSeeder extends Seeder
|
|||||||
// Inserisce le categorie necessarie
|
// Inserisce le categorie necessarie
|
||||||
DB::table('categories')->insert(
|
DB::table('categories')->insert(
|
||||||
[
|
[
|
||||||
'cat_name'=>'Automobili',
|
'cat_name'=>'Da Selezionare',
|
||||||
'cat_uscita'=>1,
|
'cat_uscita'=>1,
|
||||||
'cat_entrata'=>0,
|
'cat_entrata'=>1,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
DB::table('categories')->insert(
|
DB::table('categories')->insert(
|
||||||
@ -30,9 +30,23 @@ class CategorieSeeder extends Seeder
|
|||||||
);
|
);
|
||||||
DB::table('categories')->insert(
|
DB::table('categories')->insert(
|
||||||
[
|
[
|
||||||
'cat_name'=>'Utenze',
|
'cat_name'=>'Automobili',
|
||||||
'cat_uscita'=>1,
|
'cat_uscita'=>1,
|
||||||
'cat_entrata'=>0]
|
'cat_entrata'=>0]
|
||||||
);
|
);
|
||||||
|
DB::table('categories')->insert(
|
||||||
|
[
|
||||||
|
'cat_name'=>'Alimentari',
|
||||||
|
'cat_uscita'=>1,
|
||||||
|
'cat_entrata'=>0,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
DB::table('categories')->insert(
|
||||||
|
[
|
||||||
|
'cat_name'=>'Utenze',
|
||||||
|
'cat_uscita'=>1,
|
||||||
|
'cat_entrata'=>0,
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -91,6 +91,7 @@ $.getJSON("/admin/service/contolist", {}, function(contis) {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Modifica movimento
|
||||||
$(document).on('click', '.open_modal_modifica', function() {
|
$(document).on('click', '.open_modal_modifica', function() {
|
||||||
var url = "/admin/movimenti/modify";
|
var url = "/admin/movimenti/modify";
|
||||||
var riga_id = $(this).val();
|
var riga_id = $(this).val();
|
||||||
@ -135,9 +136,9 @@ $(document).on('click', '.open_modal_modifica', function() {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
$('.modal-title').text('Modifica movimento');
|
$('.modal-title').text('Modifica movimento');
|
||||||
$('#data').val(data[0].mov_data);
|
$('#data').val(data[0].mov_data.substring(0,10));
|
||||||
$('#descrizione').val(data[0].mov_descrizione);
|
$('#descrizione').val(data[0].mov_descrizione);
|
||||||
$('#importo').val(data[0].mov_importo);
|
$('#importo').val(data[0].mov_importo_dare);
|
||||||
|
|
||||||
$('#myModal').modal('show');
|
$('#myModal').modal('show');
|
||||||
// $('.panel-heading').text('Modifica movimento');
|
// $('.panel-heading').text('Modifica movimento');
|
||||||
|
@ -32,7 +32,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Data</th>
|
<th>Data</th>
|
||||||
<th>Categoria</th>
|
<th>Categoria</th>
|
||||||
<th>Conto</th>
|
<th>Conto Dare</th>
|
||||||
|
<th>Conto Avere</th>
|
||||||
<th>Descrizione</th>
|
<th>Descrizione</th>
|
||||||
<th>Importo Dare</th>
|
<th>Importo Dare</th>
|
||||||
<th>Importo Avere</th>
|
<th>Importo Avere</th>
|
||||||
@ -42,13 +43,13 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
@foreach( $movimenti as $movimento )
|
@foreach( $movimenti as $movimento )
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td>{{ $movimento->mov_data}}</td>
|
<td>{{ $movimento->mov_data}}</td>
|
||||||
<td>{{ $movimento->cat_name }}</td>
|
<td>{{ $movimento->cat_name }}</td>
|
||||||
<td>{{ $movimento->nomeConto }}</td>
|
<td>{{ $movimento->nomeContoDare ?? '' }}</td>
|
||||||
|
<td>{{ $movimento->nomeContoAvere ?? '' }}</td>
|
||||||
<td>{{ $movimento->mov_descrizione }}</td>
|
<td>{{ $movimento->mov_descrizione }}</td>
|
||||||
<td>€ {{ $movimento->mov_importo_dare }}</td>
|
<td>{{ $movimento->mov_importo_dare ." €"}}</td>
|
||||||
<td>€ {{ $movimento->mov_importo_avere }}</td>
|
<td>{{ $movimento->mov_importo_avere." €" }}</td>
|
||||||
<td>
|
<td>
|
||||||
<button class="btn btn-warning btn-detail open_modal_modifica" value="{{ $movimento->id }}"><i class="fa-solid fa-pencil"></i></button>
|
<button class="btn btn-warning btn-detail open_modal_modifica" value="{{ $movimento->id }}"><i class="fa-solid fa-pencil"></i></button>
|
||||||
<a class="btn btn-danger" href="/admin/movimenti/delete?id={{ $movimento->id }}"><i class="fa-solid fa-trash-can"></i></a>
|
<a class="btn btn-danger" href="/admin/movimenti/delete?id={{ $movimento->id }}"><i class="fa-solid fa-trash-can"></i></a>
|
||||||
@ -71,6 +72,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- MODAL NEW -->
|
<!-- MODAL NEW -->
|
||||||
<div class="modal fade " id="myModal" tabindex="-1" role="dialog"
|
<div class="modal fade " id="myModal" tabindex="-1" role="dialog"
|
||||||
aria-labelledby="myModalLabel" aria-hidden="true">
|
aria-labelledby="myModalLabel" aria-hidden="true">
|
||||||
@ -110,10 +113,10 @@
|
|||||||
<div class="col-xs-5">
|
<div class="col-xs-5">
|
||||||
<label for="importo" class="form-label">Importo</label>
|
<label for="importo" class="form-label">Importo</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"> <i class="fa fa-eur"></i>
|
<span class="input-group-addon"> <i class="fa fa-eur"></i></span>
|
||||||
</span> <input type="number" step="0.01" min="-999999"
|
<input type="number" step="0.01" min="-999999"
|
||||||
max="999999" class="form-control" id="importo" size="50"
|
max="999999" class="form-control" id="importo" size="50"
|
||||||
name="mov_importo" aria-describedby="importo">
|
name="mov_importo_dare" aria-describedby="importo">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-7">
|
<div class="col-xs-7">
|
||||||
|
@ -98,15 +98,23 @@ Route::middleware([
|
|||||||
Route::get('admin/movimenti/importgen', [MovimentiController::class,'importFileGen'])->name('importGen');
|
Route::get('admin/movimenti/importgen', [MovimentiController::class,'importFileGen'])->name('importGen');
|
||||||
Route::post('admin/movimenti/importgen', [MovimentiController::class,'importGenericCsv']);
|
Route::post('admin/movimenti/importgen', [MovimentiController::class,'importGenericCsv']);
|
||||||
Route::post('admin/movimenti/importmapped', [MovimentiController::class,'importmappedCsv'])->name('conti.map.store');
|
Route::post('admin/movimenti/importmapped', [MovimentiController::class,'importmappedCsv'])->name('conti.map.store');
|
||||||
Route::get('/admin/movimenti/giroconto', [MovimentiController::class,'giroconto'])->name('giroconto');
|
|
||||||
Route::post('/admin/movimenti/giroconto', [MovimentiController::class,'girocontoPost']);
|
|
||||||
|
|
||||||
Route::get('/admin/movimenti/import_rules', [ImportRuleController::class, 'index'])->name('import_rules.index');
|
Route::get('/admin/movimenti/import_rules', [ImportRuleController::class, 'index'])->name('import_rules.index');
|
||||||
Route::get('/admin/movimenti/import_rules/create', [ImportRuleController::class, 'create'])->name('import_rules.create');
|
Route::get('/admin/movimenti/import_rules/create', [ImportRuleController::class, 'create'])->name('import_rules.create');
|
||||||
Route::post('/admin/movimenti/import_rules', [ImportRuleController::class, 'store'])->name('import_rules.store');
|
Route::post('/admin/movimenti/import_rules', [ImportRuleController::class, 'store'])->name('import_rules.store');
|
||||||
|
Route::get('/admin/movimenti/import_rules/{import_rule}', [ImportRuleController::class, 'show'])->name('import_rules.show');
|
||||||
|
Route::get('/admin/movimenti/import_rules/{import_rule}/edit', [ImportRuleController::class, 'edit'])->name('import_rules.edit');
|
||||||
|
Route::put('/admin/movimenti/import_rules/{import_rule}', [ImportRuleController::class, 'update'])->name('import_rules.update');
|
||||||
|
Route::delete('/admin/movimenti/import_rules/{import_rule}', [ImportRuleController::class, 'destroy'])->name('import_rules.destroy');
|
||||||
|
|
||||||
|
|
||||||
Route::resource('admin/conti', ContoController::class);
|
Route::resource('admin/conti', ContoController::class);
|
||||||
|
|
||||||
|
|
||||||
|
Route::get('/admin/movimenti/giroconto', [MovimentiController::class,'giroconto'])->name('giroconto');
|
||||||
|
Route::post('/admin/movimenti/giroconto', [MovimentiController::class,'girocontoPost']);
|
||||||
|
|
||||||
// CATEGORIE
|
// CATEGORIE
|
||||||
Route::get('admin/categorie', [CategorieController::class,'listCategorie'])->name('categorie');
|
Route::get('admin/categorie', [CategorieController::class,'listCategorie'])->name('categorie');
|
||||||
Route::post('admin/categorie', [CategorieController::class,'insCategorie']);
|
Route::post('admin/categorie', [CategorieController::class,'insCategorie']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user