Feat: Implementado cálculo de ISR en nóminas
- Agregado campo isr_table_id en tabla months para seleccionar tabla ISR por mes - Creado servicio IsrCalculator para calcular ISR mensual y quincenal - Modificado CommissionCalculator para descontar ISR del total a pagar - Agregado selector de tabla ISR en formulario de crear/editar mes - Actualizada vista de meses para mostrar tabla ISR asignada - Actualizados reportes mensual y quincenal para mostrar ISR descontado
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?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::table('months', function (Blueprint $table) {
|
||||
$table->foreignId('isr_table_id')->nullable()->constrained('isr_tables')->nullOnDelete();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('months', function (Blueprint $table) {
|
||||
$table->dropForeign(['isr_table_id']);
|
||||
$table->dropColumn('isr_table_id');
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user