Laravel 11, Vuexy Admin 10.3, by admin@koneko.mx
This commit is contained in:
50
modules/Admin/App/Models/Sat/Banco.php
Normal file
50
modules/Admin/App/Models/Sat/Banco.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* List of names for each status.
|
||||
* @var array
|
||||
*/
|
||||
public static $statusList = [
|
||||
self::STATUS_ENABLED => 'Habilitado',
|
||||
self::STATUS_DISABLED => 'Deshabilitado',
|
||||
];
|
||||
|
||||
/**
|
||||
* List of names for each status.
|
||||
* @var array
|
||||
*/
|
||||
public static $statusListClass = [
|
||||
self::STATUS_ENABLED => 'success',
|
||||
self::STATUS_DISABLED => 'warning',
|
||||
];
|
||||
|
||||
/**
|
||||
* 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
modules/Admin/App/Models/Sat/ClaveProdServ.php
Normal file
33
modules/Admin/App/Models/Sat/ClaveProdServ.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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',
|
||||
];
|
||||
}
|
42
modules/Admin/App/Models/Sat/ClaveUnidad.php
Normal file
42
modules/Admin/App/Models/Sat/ClaveUnidad.php
Normal file
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_inicio_de_vigencia',
|
||||
'fecha_de_fin_de_vigencia',
|
||||
'simbolo',
|
||||
'is_base',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_de_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_de_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
}
|
77
modules/Admin/App/Models/Sat/CodigoPostal.php
Normal file
77
modules/Admin/App/Models/Sat/CodigoPostal.php
Normal file
@ -0,0 +1,77 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_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
modules/Admin/App/Models/Sat/Colonia.php
Normal file
39
modules/Admin/App/Models/Sat/Colonia.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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');
|
||||
}
|
||||
}
|
37
modules/Admin/App/Models/Sat/Deduccion.php
Normal file
37
modules/Admin/App/Models/Sat/Deduccion.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
}
|
47
modules/Admin/App/Models/Sat/Estado.php
Normal file
47
modules/Admin/App/Models/Sat/Estado.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_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');
|
||||
}
|
||||
}
|
53
modules/Admin/App/Models/Sat/FormaPago.php
Normal file
53
modules/Admin/App/Models/Sat/FormaPago.php
Normal file
@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_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
modules/Admin/App/Models/Sat/Impuestos.php
Normal file
17
modules/Admin/App/Models/Sat/Impuestos.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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',
|
||||
];
|
||||
}
|
39
modules/Admin/App/Models/Sat/Localidad.php
Normal file
39
modules/Admin/App/Models/Sat/Localidad.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_inicio_de_vigencia',
|
||||
'fecha_de_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_de_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_de_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
}
|
14
modules/Admin/App/Models/Sat/MetodoPago.php
Normal file
14
modules/Admin/App/Models/Sat/MetodoPago.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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
modules/Admin/App/Models/Sat/Moneda.php
Normal file
46
modules/Admin/App/Models/Sat/Moneda.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
|
||||
|
||||
public static function selectList()
|
||||
{
|
||||
return self::selectRaw('c_moneda, CONCAT_WS(" ", c_moneda, "-", descripcion) as text')
|
||||
->pluck('text', 'c_moneda');
|
||||
}
|
||||
}
|
51
modules/Admin/App/Models/Sat/Municipio.php
Normal file
51
modules/Admin/App/Models/Sat/Municipio.php
Normal file
@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_inicio_de_vigencia',
|
||||
'fecha_de_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_de_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_de_fin_de_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');
|
||||
}
|
||||
}
|
21
modules/Admin/App/Models/Sat/ObjetoImp.php
Normal file
21
modules/Admin/App/Models/Sat/ObjetoImp.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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.',
|
||||
];
|
||||
}
|
39
modules/Admin/App/Models/Sat/Pais.php
Normal file
39
modules/Admin/App/Models/Sat/Pais.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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
modules/Admin/App/Models/Sat/Percepcion.php
Normal file
37
modules/Admin/App/Models/Sat/Percepcion.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
}
|
21
modules/Admin/App/Models/Sat/Periodicidad.php
Normal file
21
modules/Admin/App/Models/Sat/Periodicidad.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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',
|
||||
];
|
||||
}
|
33
modules/Admin/App/Models/Sat/PeriodicidadPago.php
Normal file
33
modules/Admin/App/Models/Sat/PeriodicidadPago.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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'
|
||||
];
|
||||
}
|
46
modules/Admin/App/Models/Sat/RegimenFiscal.php
Normal file
46
modules/Admin/App/Models/Sat/RegimenFiscal.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_inicio_de_vigencia',
|
||||
'fecha_de_fin_de_vigencia',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_de_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_de_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
|
||||
public static function selectList()
|
||||
{
|
||||
return self::selectRaw('c_regimen_fiscal, CONCAT(c_regimen_fiscal, " - ", descripcion) as value')
|
||||
->pluck('value', 'c_regimen_fiscal');
|
||||
}
|
||||
}
|
21
modules/Admin/App/Models/Sat/TipoComprobante.php
Normal file
21
modules/Admin/App/Models/Sat/TipoComprobante.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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
modules/Admin/App/Models/Sat/TipoFactor.php
Normal file
17
modules/Admin/App/Models/Sat/TipoFactor.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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
modules/Admin/App/Models/Sat/TipoRelacion.php
Normal file
25
modules/Admin/App/Models/Sat/TipoRelacion.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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
modules/Admin/App/Models/Sat/UsoCfdi.php
Normal file
47
modules/Admin/App/Models/Sat/UsoCfdi.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Admin\App\Models\Sat;
|
||||
|
||||
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_de_vigencia',
|
||||
'fecha_fin_de_vigencia',
|
||||
'regimen_fiscal_receptor',
|
||||
];
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $casts = [
|
||||
'fecha_inicio_de_vigencia' => 'datetime',
|
||||
'fecha_fin_de_vigencia' => 'datetime',
|
||||
];
|
||||
|
||||
public static function selectList()
|
||||
{
|
||||
return self::selectRaw('c_uso_cfdi, CONCAT(c_uso_cfdi, " - ", descripcion) as value')
|
||||
->pluck('value', 'c_uso_cfdi');
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user