Release inicial 1.0.0

This commit is contained in:
2025-03-10 18:25:41 -06:00
commit ba2845242d
83 changed files with 309608 additions and 0 deletions

38
Models/Aduana.php Normal file
View File

@ -0,0 +1,38 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Aduana extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_aduana';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_aduana',
'descripcion',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
}

33
Models/Banco.php Normal file
View File

@ -0,0 +1,33 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Banco extends Model
{
// the list of status values that can be stored in table
const STATUS_ENABLED = 10;
const STATUS_DISABLED = 1;
const STATUS_REMOVED = 0;
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_banco';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_banco',
'descripcion',
'razon_social',
'rfc',
'status',
];
}

33
Models/ClaveProdServ.php Normal file
View File

@ -0,0 +1,33 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class ClaveProdServ extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_clave_prod_serv';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_clave_prod_serv',
'descripcion',
'incluir_iva_trasladado',
'incluir_ieps_trasladado',
'complemento_que_debe_incluir',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
'estimulo_franja_fronteriza',
'palabras_similares',
];
}

41
Models/ClaveUnidad.php Normal file
View File

@ -0,0 +1,41 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class ClaveUnidad extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_clave_unidad';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_clave_unidad',
'nombre',
'descripcion',
'nota',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
'simbolo',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
}

View File

@ -0,0 +1,45 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class ClaveUnidadConversion extends Model
{
protected $table = 'sat_clave_unidad_conversiones';
protected $fillable = [
'clave_unidad_origen_id',
'clave_unidad_destino_id',
'conversion_factor',
];
protected $casts = [
'conversion_factor' => 'decimal:8',
];
/**
* Relación con la unidad de medida origen.
*/
public function unidadOrigen(): BelongsTo
{
return $this->belongsTo(ClaveUnidad::class, 'clave_unidad_origen_id');
}
/**
* Relación con la unidad de medida destino.
*/
public function unidadDestino(): BelongsTo
{
return $this->belongsTo(ClaveUnidad::class, 'clave_unidad_destino_id');
}
/**
* Método para calcular la conversión inversa si no existe en la base de datos.
*/
public function getInverseConversionFactorAttribute()
{
return $this->conversion_factor != 0 ? (1 / $this->conversion_factor) : null;
}
}

77
Models/CodigoPostal.php Normal file
View File

@ -0,0 +1,77 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\HasOne;
class CodigoPostal extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_codigo_postal';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_codigo_postal',
'c_estado',
'c_municipio',
'c_localidad',
'estimulo_franja_fronteriza',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
/**
* Get the estado associated with the CodigoPostal.
*/
public function estado(): HasOne
{
return $this->hasOne(Estado::class, 'c_estado', 'c_estado');
}
/**
* Get the municipio associated with the CodigoPostal.
*/
public function municipio(): HasOne
{
return $this->hasOne(Municipio::class, 'c_municipio', 'c_municipio')
->where('c_estado', $this->c_estado);
}
/**
* Get the localidad associated with the CodigoPostal.
*/
public function localidad(): HasOne
{
return $this->hasOne(Localidad::class, 'c_estado', 'c_estado')
->where('c_localidad', $this->c_localidad);
}
/**
* Get the localidad associated with the CodigoPostal.
*/
public function colonias(): HasMany
{
return $this->hasMany(Colonia::class, 'c_codigo_postal', 'c_codigo_postal');
}
}

39
Models/Colonia.php Normal file
View File

@ -0,0 +1,39 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Colonia extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_colonia';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_colonia',
'c_codigo_postal',
'nombre_del_asentamiento',
];
public static function selectList($c_codigo_postal, $c_colonia = false)
{
return self::select('c_colonia', 'nombre_del_asentamiento')
->where('c_codigo_postal', $c_codigo_postal)
->when($c_colonia, function ($query) use ($c_colonia) {
$query->where('c_colonia', $c_colonia);
})
->orderBy('nombre_del_asentamiento')
->pluck('nombre_del_asentamiento', 'c_colonia');
}
}

View File

@ -0,0 +1,33 @@
<?php
namespace Koneko\SatCatalogs\Models;
class ContratoLaboral
{
// Definición de constantes para Tipo de Contrato
const CONTRATO_TIEMPO_INDETERMINADO = '01';
const CONTRATO_OBRA_DETERMINADA = '02';
const CONTRATO_TIEMPO_DETERMINADO = '03';
const CONTRATO_TEMPORADA = '04';
const CONTRATO_PRUEBA = '05';
const CONTRATO_CAPACITACION_INICIAL = '06';
const CONTRATO_PAGO_HORA_LABORADA = '07';
const CONTRATO_COMISION_LABORAL = '08';
const CONTRATO_SIN_RELACION_TRABAJO = '09';
const CONTRATO_JUBILACION_PENSION_RETIRO = '10';
const CONTRATO_OTRO = '99';
public static $tipoContrato = [
self::CONTRATO_TIEMPO_INDETERMINADO => 'Contrato de trabajo por tiempo indeterminado',
self::CONTRATO_OBRA_DETERMINADA => 'Contrato de trabajo para obra determinada',
self::CONTRATO_TIEMPO_DETERMINADO => 'Contrato de trabajo por tiempo determinado',
self::CONTRATO_TEMPORADA => 'Contrato de trabajo por temporada',
self::CONTRATO_PRUEBA => 'Contrato de trabajo sujeto a prueba',
self::CONTRATO_CAPACITACION_INICIAL => 'Contrato de trabajo con capacitación inicial',
self::CONTRATO_PAGO_HORA_LABORADA => 'Modalidad de contratación por pago de hora laborada',
self::CONTRATO_COMISION_LABORAL => 'Modalidad de trabajo por comisión laboral',
self::CONTRATO_SIN_RELACION_TRABAJO => 'Modalidades de contratación donde no existe relación de trabajo',
self::CONTRATO_JUBILACION_PENSION_RETIRO => 'Jubilación, pensión, retiro',
self::CONTRATO_OTRO => 'Otro contrato'
];
}

37
Models/Deduccion.php Normal file
View File

@ -0,0 +1,37 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Deduccion extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_deduccion';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_deduccion',
'descripcion',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
}

47
Models/Estado.php Normal file
View File

@ -0,0 +1,47 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Estado extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_estado';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_estado',
'c_pais',
'nombre_del_estado',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
public static function selectList($pais = 'MEX')
{
return self::select('c_estado', 'nombre_del_estado')
->where('c_pais', $pais)
->orderBy('nombre_del_estado')
->pluck('nombre_del_estado', 'c_estado');
}
}

19
Models/Exportacion.php Normal file
View File

@ -0,0 +1,19 @@
<?php
namespace Koneko\SatCatalogs\Models;
class Exportacion
{
// Definición de constantes para c_exportacion
const EXPORTACION_NO_APLICA = 1;
const EXPORTACION_DEFINITIVA_A1 = 2;
const EXPORTACION_TEMPORAL = 3;
const EXPORTACION_DEFINITIVA_OTRA = 4;
public static $catalogo = [
self::EXPORTACION_NO_APLICA => 'No aplica',
self::EXPORTACION_DEFINITIVA_A1 => 'Definitiva con clave A1',
self::EXPORTACION_TEMPORAL => 'Temporal',
self::EXPORTACION_DEFINITIVA_OTRA => 'Definitiva con clave distinta a A1 o cuando no existe enajenación en términos del CFF',
];
}

53
Models/FormaPago.php Normal file
View File

@ -0,0 +1,53 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class FormaPago extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_forma_pago';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_forma_pago',
'descripcion',
'bancarizado',
'numero_de_operacion',
'rfc_del_emisor_de_la_cuenta_ordenante',
'cuenta_ordenante',
'patron_para_cuenta_ordenante',
'rfc_del_emisor_cuenta_de_beneficiario',
'cuenta_de_benenficiario',
'patron_para_cuenta_beneficiaria',
'tipo_cadena_pago',
'banco_emisor_de_la_cuenta_ordenante',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
public static function selectList()
{
return self::selectRaw('c_forma_pago, CONCAT(c_forma_pago, " - ", descripcion) as value')
->pluck('value', 'c_forma_pago');
}
}

17
Models/Horas.php Normal file
View File

@ -0,0 +1,17 @@
<?php
namespace Koneko\SatCatalogs\Models;
class Horas
{
// Definición de constantes para Tipo de Horas Extra
const HORAS_EXTRA_DOBLES = '01';
const HORAS_EXTRA_TRIPLES = '02';
const HORAS_EXTRA_SIMPLES = '03';
public static $tipoHorasExtra = [
self::HORAS_EXTRA_DOBLES => 'Dobles',
self::HORAS_EXTRA_TRIPLES => 'Triples',
self::HORAS_EXTRA_SIMPLES => 'Simples'
];
}

17
Models/Impuestos.php Normal file
View File

@ -0,0 +1,17 @@
<?php
namespace Koneko\SatCatalogs\Models;
class Impuestos
{
// Definición de constantes para c_impuesto
const IMPUESTOS_ISR = 1;
const IMPUESTOS_IVA = 2;
const IMPUESTOS_IEPS = 3;
public static $catalogo = [
self::IMPUESTOS_ISR => 'ISR',
self::IMPUESTOS_IVA => 'IVA',
self::IMPUESTOS_IEPS => 'IEPS',
];
}

20
Models/Incapacidad.php Normal file
View File

@ -0,0 +1,20 @@
<?php
namespace Koneko\SatCatalogs\Models;
class Incapacidad
{
// Definición de constantes para tipos de incapacidad
const INCAPACIDAD_RIESGO_TRABAJO = 1;
const INCAPACIDAD_ENFERMEDAD_GENERAL = 2;
const INCAPACIDAD_MATERNIDAD = 3;
const INCAPACIDAD_LICENCIA_CUIDADOS_MEDICOS_HIJOS_CON_CANCER = 4;
public static $catalogo = [
self::INCAPACIDAD_RIESGO_TRABAJO => 'Riesgo de trabajo',
self::INCAPACIDAD_ENFERMEDAD_GENERAL => 'Enfermedad en general',
self::INCAPACIDAD_MATERNIDAD => 'Maternidad',
self::INCAPACIDAD_LICENCIA_CUIDADOS_MEDICOS_HIJOS_CON_CANCER => 'Licencia por cuidados médicos de hijos diagnosticados con cáncer.
',
];
}

29
Models/Jornada.php Normal file
View File

@ -0,0 +1,29 @@
<?php
namespace Koneko\SatCatalogs\Models;
class Jornada
{
// Definición de constantes para Tipo de Jornada
const JORNADA_DIURNA = '01';
const JORNADA_NOCTURNA = '02';
const JORNADA_MIXTA = '03';
const JORNADA_POR_HORA = '04';
const JORNADA_REDUCIDA = '05';
const JORNADA_CONTINUADA = '06';
const JORNADA_PARTIDA = '07';
const JORNADA_POR_TURNOS = '08';
const JORNADA_OTRA = '99';
public static $tipoJornada = [
self::JORNADA_DIURNA => 'Diurna',
self::JORNADA_NOCTURNA => 'Nocturna',
self::JORNADA_MIXTA => 'Mixta',
self::JORNADA_POR_HORA => 'Por hora',
self::JORNADA_REDUCIDA => 'Reducida',
self::JORNADA_CONTINUADA => 'Continuada',
self::JORNADA_PARTIDA => 'Partida',
self::JORNADA_POR_TURNOS => 'Por turnos',
self::JORNADA_OTRA => 'Otra Jornada'
];
}

50
Models/Localidad.php Normal file
View File

@ -0,0 +1,50 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Localidad extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_localidad';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_localidad',
'c_estado',
'descripcion',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
public static function selectList($c_estado, $c_localidad = false)
{
return self::select('c_localidad', 'descripcion')
->where('c_estado', $c_estado)
->when($c_localidad, function ($query) use ($c_localidad) {
$query->where('c_localidad', $c_localidad);
})
->orderBy('descripcion')
->pluck('descripcion', 'c_localidad');
}
}

14
Models/MetodoPago.php Normal file
View File

@ -0,0 +1,14 @@
<?php
namespace Koneko\SatCatalogs\Models;
class MetodoPago
{
const METODO_PAGO_PUE = 'PUE';
const METODO_PAGO_PPD = 'PPD';
public static $catalogo = [
self::METODO_PAGO_PUE => 'Pago en una sola exhibición',
self::METODO_PAGO_PPD => 'Pago en parcialidades o diferido',
];
}

46
Models/Moneda.php Normal file
View File

@ -0,0 +1,46 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Moneda extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_moneda';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_moneda',
'descripcion',
'decimales',
'porcentaje_variacion',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
public static function selectList()
{
return self::selectRaw('c_moneda, CONCAT_WS(" ", c_moneda, "-", descripcion) as text')
->pluck('text', 'c_moneda');
}
}

51
Models/Municipio.php Normal file
View File

@ -0,0 +1,51 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Municipio extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_municipio';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_municipio',
'c_estado',
'descripcion',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
public static function selectList($c_estado, $c_municipio = false)
{
return self::select('c_municipio', 'descripcion')
->where('c_estado', $c_estado)
->when($c_municipio, function ($query) use ($c_municipio) {
$query->where('c_municipio', $c_municipio);
})
->orderBy('descripcion')
->pluck('descripcion', 'c_municipio');
}
}

15
Models/Nomina.php Normal file
View File

@ -0,0 +1,15 @@
<?php
namespace Koneko\SatCatalogs\Models;
class Nomina
{
// Definición de constantes para Tipo de Nómina
const NOMINA_ORDINARIA = 'O';
const NOMINA_EXTRAORDINARIA = 'E';
public static $tipoNomina = [
self::NOMINA_ORDINARIA => 'Nómina ordinaria',
self::NOMINA_EXTRAORDINARIA => 'Nómina extraordinaria'
];
}

View File

@ -0,0 +1,40 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class NumPedimentoAduana extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_num_pedimento_aduana';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_aduana',
'patente',
'ejercicio',
'cantidad',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
}

21
Models/ObjetoImp.php Normal file
View File

@ -0,0 +1,21 @@
<?php
namespace Koneko\SatCatalogs\Models;
class ObjetoImp
{
// Definición de constantes para c_objeto_imp
const OBJETO_IMP_NO_OBJETO = 1;
const OBJETO_IMP_SI_OBJETO = 2;
const OBJETO_IMP_SI_OBJETO_NO_DESGLOSE = 3;
const OBJETO_IMP_SI_OBJETO_NO_CAUSA = 4;
const OBJETO_IMP_SI_OBJETO_IVA_CREDITO = 5;
public static $catalogo = [
self::OBJETO_IMP_NO_OBJETO => 'No objeto de impuesto.',
self::OBJETO_IMP_SI_OBJETO => 'Sí objeto de impuesto.',
self::OBJETO_IMP_SI_OBJETO_NO_DESGLOSE => 'Sí objeto del impuesto y no obligado al desglose.',
self::OBJETO_IMP_SI_OBJETO_NO_CAUSA => 'Sí objeto del impuesto y no causa impuesto.',
self::OBJETO_IMP_SI_OBJETO_IVA_CREDITO => 'Sí objeto del impuesto, IVA crédito PODEBI.',
];
}

20
Models/OrigenRecurso.php Normal file
View File

@ -0,0 +1,20 @@
<?php
namespace Koneko\SatCatalogs\Models;
class OrigenRecurso
{
// Definición de constantes para Tipo de Origen de Recurso
const ORIGEN_RECURSO_INGRESOS_PROPIOS = 'IP';
const ORIGEN_RECURSO_INGRESOS_FEDERALES = 'IF';
const ORIGEN_RECURSO_INGRESOS_MIXTOS = 'IM';
public static $tipoOrigenRecurso = [
self::ORIGEN_RECURSO_INGRESOS_PROPIOS => 'Ingresos propios',
self::ORIGEN_RECURSO_INGRESOS_FEDERALES => 'Ingresos federales',
self::ORIGEN_RECURSO_INGRESOS_MIXTOS => 'Ingresos mixtos'
];
}

30
Models/OtroPago.php Normal file
View File

@ -0,0 +1,30 @@
<?php
namespace Koneko\SatCatalogs\Models;
class OtroPago
{
// Definición de constantes para Otro Tipo de Pago en CFDI de Nómina
const OTRO_PAGO_ISR_REINTEGRO_EXCESO = 1;
const OTRO_PAGO_SUBSIDIO_EMPLEO = 2;
const OTRO_PAGO_VIATICOS = 3;
const OTRO_PAGO_COMPENSACION_ANUAL = 4;
const OTRO_PAGO_ISR_REINTEGRO_EJERCICIO_ANTERIOR = 5;
const OTRO_PAGO_ALIMENTOS_BIENES = 6;
const OTRO_PAGO_ISR_AJUSTADO_SUBSIDIO = 7;
const OTRO_PAGO_SUBSIDIO_ENTREGADO_NO_CORRESPONDIA = 8;
const OTRO_PAGO_PAGOS_DISTINTOS = 999;
public static $otroTipoPago = [
self::OTRO_PAGO_ISR_REINTEGRO_EXCESO => 'Reintegro de ISR pagado en exceso (siempre que no haya sido enterado al SAT).',
self::OTRO_PAGO_SUBSIDIO_EMPLEO => 'Subsidio para el empleo (efectivamente entregado al trabajador).',
self::OTRO_PAGO_VIATICOS => 'Viáticos (entregados al trabajador).',
self::OTRO_PAGO_COMPENSACION_ANUAL => 'Aplicación de saldo a favor por compensación anual.',
self::OTRO_PAGO_ISR_REINTEGRO_EJERCICIO_ANTERIOR => 'Reintegro de ISR retenido en exceso de ejercicio anterior (siempre que no haya sido enterado al SAT).',
self::OTRO_PAGO_ALIMENTOS_BIENES => 'Alimentos en bienes (Servicios de comedor y comida) Art 94 último párrafo LISR.',
self::OTRO_PAGO_ISR_AJUSTADO_SUBSIDIO => 'ISR ajustado por subsidio.',
self::OTRO_PAGO_SUBSIDIO_ENTREGADO_NO_CORRESPONDIA => 'Subsidio efectivamente entregado que no correspondía.',
self::OTRO_PAGO_PAGOS_DISTINTOS => 'Pagos distintos a los listados y que no deben considerarse como ingreso por sueldos, salarios o ingresos asimilados.'
];
}

39
Models/Pais.php Normal file
View File

@ -0,0 +1,39 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Pais extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_pais';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_pais',
'descripcion',
'formato_de_codigo_postal',
'formato_de_registro_de_identidad_tributaria',
'validacion_del_registro_de_identidad_tributaria',
'agrupaciones',
];
public static function selectList()
{
return self::select('c_pais', 'descripcion')
->get()
->mapWithKeys(function ($item) {
return [$item->c_pais => $item->c_pais . ' - ' . $item->descripcion];
});
}
}

37
Models/PatenteAduanal.php Normal file
View File

@ -0,0 +1,37 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class PatenteAduanal extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_patente_aduanal';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_patente_aduanal',
'inicio_de_vigencia_de_la_patente',
'fin_de_vigencia_de_la_patente',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'inicio_de_vigencia_de_la_patente' => 'datetime',
'fin_de_vigencia_de_la_patente' => 'datetime',
];
}

37
Models/Percepcion.php Normal file
View File

@ -0,0 +1,37 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class Percepcion extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_percepcion';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_percepcion',
'descripcion',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
}

21
Models/Periodicidad.php Normal file
View File

@ -0,0 +1,21 @@
<?php
namespace Koneko\SatCatalogs\Models;
class Periodicidad
{
// Definición de constantes para c_periodicidad
const PERIODICIDAD_DIARIO = 1;
const PERIODICIDAD_SEMANAL = 2;
const PERIODICIDAD_QUINCENAL = 3;
const PERIODICIDAD_MENSUAL = 4;
const PERIODICIDAD_BIMESTRAL = 5;
public static $catalogo = [
self::PERIODICIDAD_DIARIO => 'Diario',
self::PERIODICIDAD_SEMANAL => 'Semanal',
self::PERIODICIDAD_QUINCENAL => 'Quincenal',
self::PERIODICIDAD_MENSUAL => 'Mensual',
self::PERIODICIDAD_BIMESTRAL => 'Bimestral',
];
}

View File

@ -0,0 +1,33 @@
<?php
namespace Koneko\SatCatalogs\Models;
class PeriodicidadPago
{
// Definición de constantes para Tipos de Periodicidad de Pago
const PERIODICIDAD_DIARIO = 1;
const PERIODICIDAD_SEMANAL = 2;
const PERIODICIDAD_CATORCENAL = 3;
const PERIODICIDAD_QUINCENAL = 4;
const PERIODICIDAD_MENSUAL = 5;
const PERIODICIDAD_BIMESTRAL = 6;
const PERIODICIDAD_UNIDAD_OBRA = 7;
const PERIODICIDAD_COMISION = 8;
const PERIODICIDAD_PRECIO_ALZADO = 9;
const PERIODICIDAD_DECENAL = 10;
const PERIODICIDAD_OTRA = 99;
public static $tipoPeriodicidad = [
self::PERIODICIDAD_DIARIO => 'Diario',
self::PERIODICIDAD_SEMANAL => 'Semanal',
self::PERIODICIDAD_CATORCENAL => 'Catorcenal',
self::PERIODICIDAD_QUINCENAL => 'Quincenal',
self::PERIODICIDAD_MENSUAL => 'Mensual',
self::PERIODICIDAD_BIMESTRAL => 'Bimestral',
self::PERIODICIDAD_UNIDAD_OBRA => 'Unidad obra',
self::PERIODICIDAD_COMISION => 'Comisión',
self::PERIODICIDAD_PRECIO_ALZADO => 'Precio alzado',
self::PERIODICIDAD_DECENAL => 'Decenal',
self::PERIODICIDAD_OTRA => 'Otra Periodicidad'
];
}

View File

@ -0,0 +1,38 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class RegimenContratacion extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_regimen_contratacion';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_tipo_regimen',
'descripcion',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
}

46
Models/RegimenFiscal.php Normal file
View File

@ -0,0 +1,46 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class RegimenFiscal extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_regimen_fiscal';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_regimen_fiscal',
'descripcion',
'fisica',
'moral',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
public static function selectList()
{
return self::selectRaw('c_regimen_fiscal, CONCAT(c_regimen_fiscal, " - ", descripcion) as value')
->pluck('value', 'c_regimen_fiscal');
}
}

22
Models/RiesgoPuesto.php Normal file
View File

@ -0,0 +1,22 @@
<?php
namespace Koneko\SatCatalogs\Models;
class RiesgoPuesto
{
// Definición de constantes para Riesgo de Puesto
const RIESGO_PUESTO_CLASE_I = '1';
const RIESGO_PUESTO_CLASE_II = '2';
const RIESGO_PUESTO_CLASE_III = '3';
const RIESGO_PUESTO_CLASE_IV = '4';
const RIESGO_PUESTO_CLASE_V = '5';
public static $riesgoPuesto = [
self::RIESGO_PUESTO_CLASE_I => 'Clase I',
self::RIESGO_PUESTO_CLASE_II => 'Clase II',
self::RIESGO_PUESTO_CLASE_III => 'Clase III',
self::RIESGO_PUESTO_CLASE_IV => 'Clase IV',
self::RIESGO_PUESTO_CLASE_V => 'Clase V'
];
}

View File

@ -0,0 +1,21 @@
<?php
namespace Koneko\SatCatalogs\Models;
class TipoComprobante
{
// Definición de constantes para c_tipo_de_comprobante
const TIPO_COMPROBANTE_INGRESO = 'I';
const TIPO_COMPROBANTE_EGRESO = 'E';
const TIPO_COMPROBANTE_TRASLADO = 'T';
const TIPO_COMPROBANTE_NOMINA = 'N';
const TIPO_COMPROBANTE_PAGO = 'P';
public static $catalogo = [
self::TIPO_COMPROBANTE_INGRESO => 'Ingreso',
self::TIPO_COMPROBANTE_EGRESO => 'Egreso',
self::TIPO_COMPROBANTE_TRASLADO => 'Traslado',
self::TIPO_COMPROBANTE_NOMINA => 'Nómina',
self::TIPO_COMPROBANTE_PAGO => 'Pago',
];
}

17
Models/TipoFactor.php Normal file
View File

@ -0,0 +1,17 @@
<?php
namespace Koneko\SatCatalogs\Models;
class TipoFactor
{
// Definición de constantes para c_tipo_factor
const TIPO_FACTOR_TASA = 1;
const TIPO_FACTOR_CUOTA = 2;
const TIPO_FACTOR_EXENTO = 3;
public static $catalogo = [
self::TIPO_FACTOR_TASA => 'Tasa',
self::TIPO_FACTOR_CUOTA => 'Cuota',
self::TIPO_FACTOR_EXENTO => 'Exento',
];
}

25
Models/TipoRelacion.php Normal file
View File

@ -0,0 +1,25 @@
<?php
namespace Koneko\SatCatalogs\Models;
class TipoRelacion
{
// Definición de constantes para c_tipo_relacion
const TIPO_RELACION_NOTA_CREDITO = 1;
const TIPO_RELACION_NOTA_DEBITO = 2;
const TIPO_RELACION_DEVOLUCION_MERCANCIA = 3;
const TIPO_RELACION_SUSTITUCION_CFDI = 4;
const TIPO_RELACION_TRASLADOS_FACTURADOS = 5;
const TIPO_RELACION_FACTURA_TRASLADOS = 6;
const TIPO_RELACION_CFDI_ANTICIPO = 7;
public static $catalogo = [
self::TIPO_RELACION_NOTA_CREDITO => 'Nota de crédito de los documentos relacionados',
self::TIPO_RELACION_NOTA_DEBITO => 'Nota de débito de los documentos relacionados',
self::TIPO_RELACION_DEVOLUCION_MERCANCIA => 'Devolución de mercancía sobre facturas o traslados previos',
self::TIPO_RELACION_SUSTITUCION_CFDI => 'Sustitución de los CFDI previos',
self::TIPO_RELACION_TRASLADOS_FACTURADOS => 'Traslados de mercancías facturados previamente',
self::TIPO_RELACION_FACTURA_TRASLADOS => 'Factura generada por los traslados previos',
self::TIPO_RELACION_CFDI_ANTICIPO => 'CFDI por aplicación de anticipo',
];
}

47
Models/UsoCfdi.php Normal file
View File

@ -0,0 +1,47 @@
<?php
namespace Koneko\SatCatalogs\Models;
use Illuminate\Database\Eloquent\Model;
class UsoCfdi extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'sat_uso_cfdi';
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = [
'c_uso_cfdi',
'descripcion',
'aplica_para_tipo_persona_fisica',
'aplica_para_tipo_persona_moral',
'fecha_inicio_vigencia',
'fecha_fin_vigencia',
'regimen_fiscal_receptor',
];
/**
* The attributes that should be cast.
*
* @var array
*/
protected $casts = [
'fecha_inicio_vigencia' => 'datetime',
'fecha_fin_vigencia' => 'datetime',
];
public static function selectList()
{
return self::selectRaw('c_uso_cfdi, CONCAT(c_uso_cfdi, " - ", descripcion) as value')
->pluck('value', 'c_uso_cfdi');
}
}