Feat: Agregada gestión de tablas ISR en settings
- Nueva tabla isr_tables y isr_brackets en BD - Controlador IsrController para CRUD de tablas ISR - Integración con pestaña ISR en settings - Soporte para importación via CSV - Captura manual de brackets
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('isr_tables', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->year('year')->unique();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('isr_tables');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('isr_brackets', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('isr_table_id')->constrained()->onDelete('cascade');
|
||||
$table->decimal('lower_limit', 15, 2);
|
||||
$table->decimal('upper_limit', 15, 2)->nullable()->comment('null significa "En adelante"');
|
||||
$table->decimal('fixed_fee', 12, 2)->default(0);
|
||||
$table->decimal('rate', 5, 2)->comment('porcentaje');
|
||||
$table->unsignedInteger('order')->default(0);
|
||||
$table->index('isr_table_id');
|
||||
$table->index('order');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('isr_brackets');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('isr_brackets', function (Blueprint $table) {
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('isr_brackets', function (Blueprint $table) {
|
||||
$table->dropTimestamps();
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user