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:
36
app/Models/IsrBracket.php
Normal file
36
app/Models/IsrBracket.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class IsrBracket extends Model
|
||||
{
|
||||
protected $table = 'isr_brackets';
|
||||
|
||||
protected $fillable = ['isr_table_id', 'lower_limit', 'upper_limit', 'fixed_fee', 'rate', 'order'];
|
||||
|
||||
/**
|
||||
* Get the attributes that should be cast.
|
||||
*
|
||||
* @return array<string, string>
|
||||
*/
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'lower_limit' => 'decimal:2',
|
||||
'upper_limit' => 'decimal:2',
|
||||
'fixed_fee' => 'decimal:2',
|
||||
'rate' => 'decimal:2',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Relación con la tabla ISR
|
||||
*/
|
||||
public function isrTable(): BelongsTo
|
||||
{
|
||||
return $this->belongsTo(IsrTable::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user