Release inicial 1.0.0
This commit is contained in:
commit
183453f677
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@ -0,0 +1,18 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.{yml,yaml}]
|
||||
indent_size = 2
|
||||
|
||||
[docker-compose.yml]
|
||||
indent_size = 4
|
32
.gitattributes
vendored
Normal file
32
.gitattributes
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
# Normaliza los saltos de línea en diferentes SO
|
||||
* text=auto eol=lf
|
||||
|
||||
# Reglas para archivos específicos
|
||||
*.blade.php diff=html
|
||||
*.css diff=css
|
||||
*.html diff=html
|
||||
*.md diff=markdown
|
||||
*.php diff=php
|
||||
|
||||
# Solo en producción
|
||||
bootstrap.php export-ignore
|
||||
bootstrap export-ignore
|
||||
Bootstrap export-ignore
|
||||
artisan export-ignore
|
||||
storage export-ignore
|
||||
|
||||
# Evitar que estos archivos se exporten con Composer create-project
|
||||
/.github export-ignore
|
||||
/.gitignore export-ignore
|
||||
/.git export-ignore
|
||||
/dev export-ignore
|
||||
.gitattributes export-ignore
|
||||
.editorconfig export-ignore
|
||||
.prettierrc.json export-ignore
|
||||
.prettierignore export-ignore
|
||||
.eslintrc.json export-ignore
|
||||
CHANGELOG.md export-ignore
|
||||
CONTRIBUTING.md export-ignore
|
||||
README.md export-ignore
|
||||
composer.lock export-ignore
|
||||
package-lock.json export-ignore
|
13
.gitignore
vendored
Normal file
13
.gitignore
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
/node_modules
|
||||
/vendor
|
||||
/.vscode
|
||||
/.nova
|
||||
/.fleet
|
||||
/.phpactor.json
|
||||
/.phpunit.cache
|
||||
/.phpunit.result.cache
|
||||
/.zed
|
||||
/.idea
|
||||
/boostrap/cache/*
|
||||
/storage/logs/*
|
||||
database/data/catCFDI_V_4_*.xls
|
16
.prettierignore
Normal file
16
.prettierignore
Normal file
@ -0,0 +1,16 @@
|
||||
# Dependencias de Composer y Node.js
|
||||
/vendor/
|
||||
/node_modules/
|
||||
|
||||
# Caché y logs
|
||||
/storage/
|
||||
*.log
|
||||
*.cache
|
||||
|
||||
# Archivos del sistema
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Configuración de editores
|
||||
.idea/
|
||||
.vscode/
|
29
.prettierrc.json
Normal file
29
.prettierrc.json
Normal file
@ -0,0 +1,29 @@
|
||||
{
|
||||
"arrowParens": "avoid",
|
||||
"bracketSpacing": true,
|
||||
"bracketSameLine": true,
|
||||
"htmlWhitespaceSensitivity": "css",
|
||||
"insertPragma": false,
|
||||
"jsxSingleQuote": true,
|
||||
"printWidth": 120,
|
||||
"proseWrap": "preserve",
|
||||
"quoteProps": "as-needed",
|
||||
"requirePragma": false,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"tabWidth": 4,
|
||||
"trailingComma": "none",
|
||||
"useTabs": false,
|
||||
"endOfLine": "lf",
|
||||
"embeddedLanguageFormatting": "auto",
|
||||
"overrides": [
|
||||
{
|
||||
"files": [
|
||||
"resources/assets/**/*.js"
|
||||
],
|
||||
"options": {
|
||||
"semi": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
16
Bootstrap/CustomApplication.php
Normal file
16
Bootstrap/CustomApplication.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Bootstrap;
|
||||
|
||||
use Illuminate\Foundation\Application;
|
||||
|
||||
class CustomApplication extends Application
|
||||
{
|
||||
/**
|
||||
* Forzar el namespace manualmente para evitar errores.
|
||||
*/
|
||||
public function getNamespace(): string
|
||||
{
|
||||
return 'Koneko\\SatCatalogs\\';
|
||||
}
|
||||
}
|
39
CHANGELOG.md
Normal file
39
CHANGELOG.md
Normal file
@ -0,0 +1,39 @@
|
||||
# 📜 CHANGELOG - Laravel SAT Catalogs
|
||||
|
||||
Este documento sigue el formato [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
|
||||
## [0.1.0] - ALPHA - 2024-03-05
|
||||
|
||||
### ✨ Added (Agregado)
|
||||
- 🚀 Primera versión alpha de la librería.
|
||||
- 🔹 Implementación inicial de [funcionalidad clave 1].
|
||||
- 🔹 Integración con [dependencia o servicio principal].
|
||||
- 🔹 Soporte para [Laravel/Vuexy Admin, si aplica].
|
||||
|
||||
### 🛠 Changed (Modificado)
|
||||
- 🔄 Optimización de [código o estructura interna].
|
||||
|
||||
### 🐛 Fixed (Correcciones)
|
||||
- 🐞 Correcciones iniciales en [migraciones, modelos, servicios, etc.].
|
||||
|
||||
---
|
||||
|
||||
## 📅 Próximos Cambios Planeados
|
||||
- 📊 **Mejoras en [feature futuro]**.
|
||||
- 🏪 **Compatibilidad con [Laravel 11, Vuexy, etc.]**.
|
||||
- 📍 **Integración con [API o funcionalidad esperada]**.
|
||||
|
||||
---
|
||||
|
||||
**📌 Nota:** Esta es una versión **ALPHA**, aún en desarrollo.
|
||||
|
||||
---
|
||||
|
||||
## 🔄 Sincronización de Cambios
|
||||
Este `CHANGELOG.md` se actualiza primero en nuestro repositorio principal en **[Tea - Koneko Git](https://git.koneko.mx/koneko/laravel-sat-catalogs)** y luego se refleja en GitHub.
|
||||
Los cambios recientes pueden verse antes en **Tea** que en **GitHub** debido a la sincronización automática.
|
||||
|
||||
---
|
||||
|
||||
📅 Última actualización: **2024-03-05**.
|
||||
|
9
CONTRIBUTING.md
Normal file
9
CONTRIBUTING.md
Normal file
@ -0,0 +1,9 @@
|
||||
## 🔐 Acceso al Repositorio Privado
|
||||
|
||||
Nuestro servidor Git en **Tea** tiene un registro cerrado. Para contribuir:
|
||||
|
||||
1. Abre un **Issue** en [GitHub](https://github.com/koneko-mx/laravel-sat-catalogs/issues) indicando tu interés en contribuir.
|
||||
2. Alternativamente, envía un correo a **admin@koneko.mx** solicitando acceso.
|
||||
3. Una vez aprobado, recibirás una invitación para registrarte y clonar el repositorio.
|
||||
|
||||
Si solo necesitas acceso de lectura, puedes clonar la versión pública en **GitHub**.
|
123
Console/Commands/GenerateCsvFromXlsx.php
Normal file
123
Console/Commands/GenerateCsvFromXlsx.php
Normal file
@ -0,0 +1,123 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Koneko\SatCatalogs\Services\CsvGeneratorService;
|
||||
|
||||
class GenerateCsvFromXlsx extends Command
|
||||
{
|
||||
protected $signature = 'sat:generate-csv {xlsxFile} {--all} {sheetName?} {csvFile?} {--skipRows=7}';
|
||||
|
||||
protected $description = 'Genera archivos CSV optimizados a partir de un archivo XLSX y actualiza el archivo de versión.';
|
||||
|
||||
private $csvRecordsCount = [];
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$xlsxFile = database_path("data/{$this->argument('xlsxFile')}");
|
||||
|
||||
if (!file_exists($xlsxFile)) {
|
||||
$this->error("⚠️ El archivo XLSX no existe: {$xlsxFile}");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ($this->option('all')) {
|
||||
$this->generateAllCsv($xlsxFile);
|
||||
$this->updateVersionFile($xlsxFile);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$sheetName = $this->argument('sheetName');
|
||||
$csvFile = $this->argument('csvFile');
|
||||
$skipRows = (int) $this->option('skipRows');
|
||||
|
||||
if (!$sheetName || !$csvFile) {
|
||||
$this->error("⚠️ Debes proporcionar sheetName y csvFile o usar --all para procesar todos.");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->generateCsv($xlsxFile, $sheetName, $csvFile, $skipRows);
|
||||
}
|
||||
|
||||
private function generateAllCsv(string $xlsxFile)
|
||||
{
|
||||
$catalogs = [
|
||||
'c_FormaPago' => 6,
|
||||
'c_Moneda' => 5,
|
||||
'c_CodigoPostal' => [['c_CodigoPostal_Parte_1', 'c_CodigoPostal_Parte_2'], 7],
|
||||
'c_RegimenFiscal' => 6,
|
||||
'c_Pais' => 5,
|
||||
'c_UsoCFDI' => 6,
|
||||
'c_ClaveProdServ' => 5,
|
||||
'c_ClaveUnidad' => 6,
|
||||
'c_Aduana' => 5,
|
||||
'C_Colonia' => [['C_Colonia_1', 'C_Colonia_2', 'C_Colonia_3'], 5],
|
||||
'c_Estado' => 5,
|
||||
'C_Localidad' => 5,
|
||||
'C_Municipio' => 5,
|
||||
];
|
||||
|
||||
foreach ($catalogs as $csvFile => $sheetData) {
|
||||
if (is_array($sheetData) && is_array($sheetData[0])) {
|
||||
// Se trata de una combinación de hojas
|
||||
[$sheets, $skipRows] = $sheetData;
|
||||
|
||||
$this->generateCsv($xlsxFile, $sheets, strtolower($csvFile), $skipRows);
|
||||
|
||||
} else {
|
||||
// Proceso normal para una sola hoja
|
||||
$this->generateCsv($xlsxFile, $csvFile, strtolower($csvFile), $sheetData);
|
||||
}
|
||||
}
|
||||
|
||||
echo "\n";
|
||||
}
|
||||
|
||||
private function generateCsv(string $xlsxFile, string|array $sheetName, string $csvFile, int $skipRows)
|
||||
{
|
||||
echo "\n📌 Procesando hojas: " . (is_array($sheetName) ? implode(", ", $sheetName) : $sheetName) . "\n";
|
||||
|
||||
$csvPath = CsvGeneratorService::convertToCsv($xlsxFile, $sheetName, $csvFile, $skipRows);
|
||||
|
||||
if (isset($csvPath['error'])) {
|
||||
$this->error("❌ Error en {$csvFile}: {$csvPath['error']}");
|
||||
|
||||
} else {
|
||||
$rowCount = CsvGeneratorService::countCsvRows($csvPath);
|
||||
|
||||
$this->csvRecordsCount[$csvFile] = $rowCount;
|
||||
$this->info("✅ CSV generado: {$csvPath} ({$rowCount} filas)");
|
||||
}
|
||||
|
||||
// Liberar memoria forzadamente
|
||||
gc_collect_cycles();
|
||||
}
|
||||
|
||||
private function updateVersionFile(string $xlsxFile)
|
||||
{
|
||||
$versionFile = database_path('seeders/sat_cache/version.txt');
|
||||
$versionContent = "📄 Versión de los Catálogos SAT\n";
|
||||
$versionContent .= "-----------------------------------\n";
|
||||
$versionContent .= "📌 Archivo XLSX: " . basename($xlsxFile) . "\n";
|
||||
$versionContent .= "📅 Fecha de generación: " . now()->format('Y-m-d H:i:s') . "\n";
|
||||
$versionContent .= "-----------------------------------\n";
|
||||
$versionContent .= "📂 Archivos CSV generados:\n";
|
||||
|
||||
foreach ($this->csvRecordsCount as $csvFile => $rowCount) {
|
||||
$versionContent .= " - {$csvFile}.csv ({$rowCount} filas)\n";
|
||||
}
|
||||
|
||||
$versionContent .= "-----------------------------------\n";
|
||||
$versionContent .= "🔗 Información del paquete:\n";
|
||||
$versionContent .= " - Packagist: https://packagist.org/packages/koneko/laravel-sat-catalogs\n";
|
||||
$versionContent .= " - Git Repo: https://git.koneko.mx/koneko/laravel-sat-catalogs\n";
|
||||
|
||||
file_put_contents($versionFile, $versionContent);
|
||||
|
||||
$this->info("✅ Archivo de versión actualizado: {$versionFile}");
|
||||
}
|
||||
}
|
70
Console/Commands/ImportCsvToDatabase.php
Normal file
70
Console/Commands/ImportCsvToDatabase.php
Normal file
@ -0,0 +1,70 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Console\Commands;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use Koneko\SatCatalogs\Services\CsvDatabaseService;
|
||||
|
||||
class ImportCsvToDatabase extends Command
|
||||
{
|
||||
protected $signature = 'sat:import-csv {--update}';
|
||||
protected $description = 'Importa todos los archivos CSV de los catálogos SAT a la base de datos';
|
||||
|
||||
private array $csvMappings = [
|
||||
'c_formapago' => ['table' => 'sat_forma_pago', 'columns' => ['c_forma_pago', 'descripcion', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_moneda' => ['table' => 'sat_moneda', 'columns' => ['c_moneda', 'descripcion', 'decimales', 'porcentaje_variacion', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_codigopostal' => ['table' => 'sat_codigo_postal', 'columns' => ['c_codigo_postal', 'c_estado', 'c_municipio', 'c_localidad', 'estimulo_franja_fronteriza', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_pais' => ['table' => 'sat_pais', 'columns' => ['c_pais', 'descripcion', 'formato_de_codigo_postal', 'formato_de_registro_de_identidad_tributaria', 'validacion_del_registro_de_identidad_tributaria', 'agrupaciones']],
|
||||
'c_estado' => ['table' => 'sat_estado', 'columns' => ['c_estado', 'c_pais', 'nombre_del_estado', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_municipio' => ['table' => 'sat_municipio', 'columns' => ['c_municipio', 'c_estado', 'descripcion', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_localidad' => ['table' => 'sat_localidad', 'columns' => ['c_localidad', 'c_estado', 'descripcion', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_colonia' => ['table' => 'sat_colonia', 'columns' => ['c_colonia', 'c_codigo_postal', 'nombre_del_asentamiento']],
|
||||
'c_regimenfiscal' => ['table' => 'sat_regimen_fiscal', 'columns' => ['c_regimen_fiscal', 'descripcion', 'fisica', 'moral', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_usocfdi' => ['table' => 'sat_uso_cfdi', 'columns' => ['c_uso_cfdi', 'descripcion', 'aplica_para_tipo_persona_fisica', 'aplica_para_tipo_persona_moral', 'fecha_inicio_vigencia', 'fecha_fin_vigencia', 'regimen_fiscal_receptor']],
|
||||
'c_claveprodserv' => ['table' => 'sat_clave_prod_serv', 'columns' => ['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']],
|
||||
'c_claveunidad' => ['table' => 'sat_clave_unidad', 'columns' => ['c_clave_unidad', 'nombre', 'descripcion', 'nota', 'fecha_inicio_vigencia', 'fecha_fin_vigencia', 'simbolo']],
|
||||
'c_aduana' => ['table' => 'sat_aduana', 'columns' => ['c_aduana', 'descripcion', 'fecha_inicio_vigencia', 'fecha_fin_vigencia']],
|
||||
'c_banco' => ['table' => 'sat_banco', 'columns' => ['c_banco', 'descripcion', 'razon_social', 'rfc', 'status']],
|
||||
'c_deduccion' => ['table' => 'sat_deduccion', 'columns' => ['c_deduccion', 'descripcion']],
|
||||
'c_percepcion' => ['table' => 'sat_percepcion', 'columns' => ['c_percepcion', 'descripcion', 'gravado_exento']],
|
||||
'c_regimen_contratacion' => ['table' => 'sat_regimen_contratacion', 'columns' => ['c_tipo_regimen', 'descripcion']],
|
||||
];
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$csvPath = database_path('seeders/sat_cache/');
|
||||
$updateExisting = $this->option('update');
|
||||
|
||||
if (!is_dir($csvPath)) {
|
||||
$this->error("⚠️ No se encontró la carpeta: {$csvPath}");
|
||||
return;
|
||||
}
|
||||
|
||||
$totalFiles = count($this->csvMappings);
|
||||
$this->info("📌 Iniciando importación de {$totalFiles} archivos CSV...\n");
|
||||
|
||||
foreach ($this->csvMappings as $csvFile => $mapping) {
|
||||
$fullPath = "{$csvPath}{$csvFile}.csv";
|
||||
|
||||
if (!file_exists($fullPath)) {
|
||||
$this->warn("⚠️ Archivo CSV no encontrado: {$fullPath}");
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->info("📂 Importando: {$csvFile}.csv → {$mapping['table']}");
|
||||
|
||||
$result = CsvDatabaseService::importCsvToTable($fullPath, $mapping['table'], $mapping['columns'], $updateExisting);
|
||||
|
||||
if (isset($result['error'])) {
|
||||
$this->error("❌ Error en {$csvFile}: {$result['error']}");
|
||||
} else {
|
||||
$inserted = $result['inserted'] ?? 0;
|
||||
|
||||
$this->info("✅ Importación completa: {$csvFile} ({$inserted} insertados)\n");
|
||||
}
|
||||
}
|
||||
|
||||
$this->info("✅ Todos los archivos CSV han sido importados correctamente.");
|
||||
}
|
||||
}
|
20
Console/Kernel.php
Normal file
20
Console/Kernel.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Console;
|
||||
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
||||
class Kernel extends ConsoleKernel
|
||||
{
|
||||
protected $commands = [
|
||||
\Koneko\SatCatalogs\Console\Commands\GenerateCsvFromXlsx::class,
|
||||
];
|
||||
|
||||
protected function schedule(Schedule $schedule) {}
|
||||
|
||||
public function commands()
|
||||
{
|
||||
$this->load(__DIR__.'/Commands');
|
||||
}
|
||||
}
|
234
Http/Controllers/SatCatalogController.php
Normal file
234
Http/Controllers/SatCatalogController.php
Normal file
@ -0,0 +1,234 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Http\Controllers;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use Koneko\SatCatalogs\Imports\SatCatalogsImport;
|
||||
use Koneko\SatCatalogs\Services\SatCatalogService;
|
||||
use Maatwebsite\Excel\Facades\Excel;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
|
||||
class SatCatalogController extends Controller
|
||||
{
|
||||
/**
|
||||
* @return \Illuminate\Support\Collection
|
||||
*/
|
||||
public function import(Request $request)
|
||||
{
|
||||
// Si es una solicitud POST, procesa la importación
|
||||
if ($request->isMethod('post')) {
|
||||
$validator = Validator::make($request->all(), [
|
||||
'file' => ['required', 'mimes:xls,xlsx'],
|
||||
]);
|
||||
|
||||
if ($validator->fails())
|
||||
return back()->withInput()->withErrors($validator);
|
||||
|
||||
$time_start = microtime(true);
|
||||
$results = [
|
||||
'details' => [],
|
||||
'total_rows' => 0,
|
||||
'total_created' => 0,
|
||||
'total_updated' => 0,
|
||||
'total_time' => 0,
|
||||
];
|
||||
|
||||
$import = new SatCatalogsImport();
|
||||
$filePath = request()->file('file');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_FormaPago');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Forma de pago',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_Moneda');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Moneda',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_CodigoPostal_Parte_1');
|
||||
Excel::import($import, $filePath);
|
||||
$import->onlySheets('c_CodigoPostal_Parte_2');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Código postal',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_RegimenFiscal');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Regimen fiscal',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_Pais');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'País',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_UsoCFDI');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Uso de CFDI',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_Colonia_1');
|
||||
Excel::import($import, $filePath);
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_Colonia_2');
|
||||
Excel::import($import, $filePath);
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_Colonia_3');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Colonia',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_Estado');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Estado',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_localidad');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Localidad',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$time_sheet_start = microtime(true);
|
||||
$import->onlySheets('c_municipio');
|
||||
Excel::import($import, $filePath);
|
||||
$results['details'][] = [
|
||||
'name' => 'Municipio',
|
||||
'time' => round(microtime(true) - $time_sheet_start, 2),
|
||||
'created' => session('created'),
|
||||
'updated' => session('updated'),
|
||||
];
|
||||
$results['total_rows'] += session('created') + session('updated');
|
||||
$results['total_created'] += session('created');
|
||||
$results['total_updated'] += session('updated');
|
||||
|
||||
|
||||
$results['total_time'] = round(microtime(true) - $time_start, 2);
|
||||
|
||||
return back()->with('results', $results);
|
||||
}
|
||||
|
||||
return view('sat-catalogs::import.sat-catalog');
|
||||
}
|
||||
|
||||
public function catalogAjax(string $catalog, Request $request)
|
||||
{
|
||||
$searchTerm = (string) $request->input('searchTerm', '');
|
||||
|
||||
// Toma solo las llaves necesarias (o las que quieras permitir del request):
|
||||
$rawOptions = $request->only([
|
||||
'order_by',
|
||||
'order_dir',
|
||||
'status',
|
||||
'limit',
|
||||
'c_pais',
|
||||
'c_estado',
|
||||
'c_municipio',
|
||||
'c_localidad',
|
||||
'c_colonia',
|
||||
'c_codigo_postal',
|
||||
'select2Mode',
|
||||
'rawMode',
|
||||
'firstRow',
|
||||
]);
|
||||
|
||||
if($catalog == 'colonia'){
|
||||
$rawOptions['sat_codigo_postal.c_estado'] = $rawOptions['c_estado'] ?? '';
|
||||
$rawOptions['sat_codigo_postal.c_municipio'] = $rawOptions['c_municipio'] ?? '';
|
||||
$rawOptions['sat_codigo_postal.c_codigo_postal'] = $rawOptions['c_codigo_postal'] ?? '';
|
||||
$rawOptions['sat_colonia.c_colonia'] = $rawOptions['c_colonia'] ?? '';
|
||||
}
|
||||
|
||||
// Filtra valores nulos o vacíos, para que no aparezcan esas claves.
|
||||
// (Si consideras '0', null o 'false' como válidos, ajusta la función de filtro)
|
||||
$options = array_filter($rawOptions, function ($value) {
|
||||
return !($value === '');
|
||||
});
|
||||
|
||||
return response()->json(
|
||||
app(SatCatalogService::class)->searchCatalog($catalog, $searchTerm, $options)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
9
LICENSE
Normal file
9
LICENSE
Normal file
@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2025 koneko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
38
Models/Aduana.php
Normal file
38
Models/Aduana.php
Normal 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
33
Models/Banco.php
Normal 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
33
Models/ClaveProdServ.php
Normal 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
41
Models/ClaveUnidad.php
Normal 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',
|
||||
];
|
||||
}
|
45
Models/ClaveUnidadConversion.php
Normal file
45
Models/ClaveUnidadConversion.php
Normal 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
77
Models/CodigoPostal.php
Normal 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
39
Models/Colonia.php
Normal 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');
|
||||
}
|
||||
}
|
33
Models/ContratoLaboral.php
Normal file
33
Models/ContratoLaboral.php
Normal 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
37
Models/Deduccion.php
Normal 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
47
Models/Estado.php
Normal 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
19
Models/Exportacion.php
Normal 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
53
Models/FormaPago.php
Normal 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
17
Models/Horas.php
Normal 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
17
Models/Impuestos.php
Normal 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
20
Models/Incapacidad.php
Normal 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
29
Models/Jornada.php
Normal 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
50
Models/Localidad.php
Normal 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
14
Models/MetodoPago.php
Normal 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
46
Models/Moneda.php
Normal 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
51
Models/Municipio.php
Normal 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
15
Models/Nomina.php
Normal 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'
|
||||
];
|
||||
}
|
40
Models/NumPedimentoAduana.php
Normal file
40
Models/NumPedimentoAduana.php
Normal 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
21
Models/ObjetoImp.php
Normal 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
20
Models/OrigenRecurso.php
Normal 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
30
Models/OtroPago.php
Normal 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
39
Models/Pais.php
Normal 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
37
Models/PatenteAduanal.php
Normal 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
37
Models/Percepcion.php
Normal 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
21
Models/Periodicidad.php
Normal 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',
|
||||
];
|
||||
}
|
33
Models/PeriodicidadPago.php
Normal file
33
Models/PeriodicidadPago.php
Normal 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'
|
||||
];
|
||||
}
|
38
Models/RegimenContratacion.php
Normal file
38
Models/RegimenContratacion.php
Normal 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
46
Models/RegimenFiscal.php
Normal 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
22
Models/RiesgoPuesto.php
Normal 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'
|
||||
];
|
||||
|
||||
}
|
21
Models/TipoComprobante.php
Normal file
21
Models/TipoComprobante.php
Normal 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
17
Models/TipoFactor.php
Normal 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
25
Models/TipoRelacion.php
Normal 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
47
Models/UsoCfdi.php
Normal 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');
|
||||
}
|
||||
}
|
36
Providers/SatCatalogsServiceProvider.php
Normal file
36
Providers/SatCatalogsServiceProvider.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Koneko\SatCatalogs\Console\Commands\GenerateCsvFromXlsx;
|
||||
use Koneko\SatCatalogs\Console\Commands\ImportCsvToDatabase;
|
||||
|
||||
class SatCatalogsServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
// Register the module's routes
|
||||
$this->loadRoutesFrom(__DIR__.'/../routes/admin.php');
|
||||
|
||||
// Register the migrations
|
||||
$this->loadMigrationsFrom(__DIR__ . '/../database/migrations');
|
||||
|
||||
// Registrar comandos de consola
|
||||
if ($this->app->runningInConsole()) {
|
||||
$this->commands([
|
||||
GenerateCsvFromXlsx::class,
|
||||
ImportCsvToDatabase::class,
|
||||
]);
|
||||
}
|
||||
|
||||
// Publicar los archivos necesarios
|
||||
$this->publishes([
|
||||
__DIR__.'/../database/seeders/SatCatalogsSeeder.php' => database_path('seeders/SatCatalogsSeeder.php'),
|
||||
__DIR__.'/../database/seeders/sat_cache' => database_path('seeders/sat_cache'),
|
||||
], 'sat-catalogs-seeders');
|
||||
}
|
||||
}
|
162
README.md
Normal file
162
README.md
Normal file
@ -0,0 +1,162 @@
|
||||
# 📦 Laravel SAT Catalogs
|
||||
|
||||
<p align="center">
|
||||
<a href="https://koneko.mx" target="_blank">
|
||||
<img src="https://git.koneko.mx/Koneko-ST/koneko-st/raw/branch/main/logo-images/horizontal-05.png" width="400" alt="Koneko Soluciones Tecnológicas Logo">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://koneko.mx"><img src="https://img.shields.io/badge/Website-koneko.mx-blue" alt="Sitio Web"></a>
|
||||
<a href="https://packagist.org/packages/koneko/laravel-sat-catalogs"><img src="https://img.shields.io/packagist/v/koneko/laravel-sat-catalogs" alt="Latest Stable Version"></a>
|
||||
<a href="https://packagist.org/packages/koneko/laravel-sat-catalogs"><img src="https://img.shields.io/packagist/l/koneko/laravel-sat-catalogs" alt="License"></a>
|
||||
<a href="https://git.koneko.mx/koneko"><img src="https://img.shields.io/badge/Git%20Server-Koneko%20Git-orange" alt="Servidor Git"></a>
|
||||
<a href="https://github.com/koneko-mx/laravel-sat-catalogs/actions/workflows/tests.yml"><img src="https://github.com/koneko-mx/laravel-sat-catalogs/actions/workflows/tests.yml/badge.svg" alt="Build Status"></a>
|
||||
<a href="https://github.com/koneko-mx/laravel-sat-catalogs/issues"><img src="https://img.shields.io/github/issues/koneko/laravel-sat-catalogs" alt="Issues"></a>
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
## 📌 Descripción
|
||||
|
||||
**Laravel SAT Catalogs** es un paquete diseñado para gestionar catálogos oficiales del **SAT** en Laravel, facilitando su extracción, conversión y consulta.
|
||||
|
||||
### ✨ Características:
|
||||
- 🔹 Migraciones para la estructura de catálogos del SAT.
|
||||
- 🔹 Conversión de archivos **XLS** del SAT a **CSV** mediante `CsvGeneratorService`.
|
||||
- 🔹 Carga de datos en la base de datos desde CSV con `CsvDatabaseService`.
|
||||
- 🔹 Consultas optimizadas mediante `SatCatalogService` con búsqueda flexible.
|
||||
- 🔹 Integración con Select2 para autocompletado.
|
||||
- 🔹 Kernel mínimo de Laravel mediante `bootstrap.php`.
|
||||
|
||||
---
|
||||
|
||||
## 📦 Instalación
|
||||
|
||||
Instalar vía **Composer**:
|
||||
|
||||
```bash
|
||||
composer require koneko/laravel-sat-catalogs
|
||||
```
|
||||
|
||||
Publicar archivos de configuración y migraciones:
|
||||
|
||||
```bash
|
||||
php artisan vendor:publish --tag=sat-catalogs-seeders
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📂 Estructura de archivos
|
||||
|
||||
```
|
||||
laravel-sat-catalogs/
|
||||
│── Console/Commands/ # Comandos Artisan para importar/exportar catálogos
|
||||
│── database/migrations/ # Migraciones para catálogos del SAT
|
||||
│── database/seeders/sat_cache/ # Archivos CSV generados
|
||||
│── Models/ # Modelos de catálogos SAT
|
||||
│── Providers/SatCatalogsServiceProvider.php # Proveedor de servicio
|
||||
│── routes/admin.php # Rutas administrativas
|
||||
│── Services/ # Servicios de conversión y consulta de datos
|
||||
└── README.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔍 Uso de `SatCatalogService`
|
||||
|
||||
### 📌 **Búsqueda de datos**
|
||||
```php
|
||||
use Koneko\SatCatalogs\Services\SatCatalogService;
|
||||
|
||||
// Buscar bancos que coincidan con "Banamex"
|
||||
$bancos = SatCatalogService::searchCatalog('banco', 'Banamex');
|
||||
|
||||
// Obtener una clave de producto/servicio específica
|
||||
$producto = SatCatalogService::searchCatalog('clave_prod_serv', '10101500');
|
||||
```
|
||||
|
||||
### 📌 **Filtrar resultados**
|
||||
```php
|
||||
// Obtener municipios del estado de Jalisco
|
||||
$municipios = SatCatalogService::searchCatalog('municipio', '', ['c_estado' => 'JAL']);
|
||||
|
||||
// Obtener colonias por código postal
|
||||
$colonias = SatCatalogService::searchCatalog('colonia', '', ['c_codigo_postal' => '64000']);
|
||||
```
|
||||
|
||||
### 📌 **Integración con Select2**
|
||||
```php
|
||||
$estados = SatCatalogService::searchCatalog('estado', '', ['select2Mode' => true]);
|
||||
```
|
||||
Salida esperada:
|
||||
```php
|
||||
[
|
||||
['id' => 'JAL', 'text' => 'Jalisco'],
|
||||
['id' => 'CDMX', 'text' => 'Ciudad de México'],
|
||||
...
|
||||
]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 📂 Generación de CSV desde el archivo del SAT
|
||||
|
||||
El archivo **XLS** del SAT no está incluido en este repositorio por su tamaño y cambios frecuentes. Puedes descargarlo desde el sitio oficial:
|
||||
|
||||
🔗 [Descargar archivo XLS del SAT](http://omawww.sat.gob.mx/tramitesyservicios/Paginas/anexo_20.htm)
|
||||
|
||||
Una vez descargado, colócalo en:
|
||||
database/data/catCFDI_V_4_xxxx.xls
|
||||
|
||||
---
|
||||
|
||||
## 🛠 Comandos Artisan disponibles
|
||||
|
||||
### 🔹 **Generar CSV desde XLS**
|
||||
```bash
|
||||
php artisan sat:generate-csv catCFDI_V_4_20250213.xls --all
|
||||
```
|
||||
Convierte el archivo `XLS` del SAT a `CSV` optimizado.
|
||||
|
||||
### 🔹 **Importar catálogos SAT a la base de datos**
|
||||
```bash
|
||||
php artisan sat:import-csv --update
|
||||
```
|
||||
Carga los archivos `CSV` en la base de datos.
|
||||
|
||||
|
||||
## 🚀 Rutas Disponibles
|
||||
|
||||
| Método | Ruta | Controlador | Descripción |
|
||||
|--------|------|------------|-------------|
|
||||
| `POST` | `/catalogos/sat/get/{type}` | `SatCatalogController@catalogAjax` | Obtener datos de un catálogo vía AJAX. |
|
||||
|
||||
Ejemplo de consumo vía AJAX:
|
||||
```js
|
||||
$.post('/catalogos/sat/get/clave_prod_serv', { search: 'software' }, function(response) {
|
||||
console.log(response);
|
||||
});
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🛠 Dependencias
|
||||
|
||||
Este paquete requiere:
|
||||
- Laravel 11+
|
||||
- PHP 8.1+
|
||||
- PhpSpreadsheet para la manipulación de archivos XLS.
|
||||
|
||||
---
|
||||
|
||||
## 🏗 Licencia
|
||||
|
||||
Este paquete es de código abierto bajo la licencia **MIT**.
|
||||
|
||||
---
|
||||
|
||||
<p align="center">
|
||||
Hecho con ❤️ por <a href="https://koneko.mx">Koneko Soluciones Tecnológicas</a>
|
||||
</p>
|
||||
|
178
Services/CsvDatabaseService.php
Normal file
178
Services/CsvDatabaseService.php
Normal file
@ -0,0 +1,178 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Services;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CsvDatabaseService
|
||||
{
|
||||
/**
|
||||
* Carga datos desde CSV a una tabla de la base de datos.
|
||||
*/
|
||||
public static function importCsvToTable(string $csvFilePath, string $tableName, array $columns, bool $updateExisting = false)
|
||||
{
|
||||
if (!file_exists($csvFilePath)) {
|
||||
return ["error" => "Archivo CSV no encontrado: {$csvFilePath}"];
|
||||
}
|
||||
|
||||
$handle = fopen($csvFilePath, 'r');
|
||||
$batchSize = 5000;
|
||||
$data = [];
|
||||
$rowCount = 0;
|
||||
$insertedCount = 0;
|
||||
|
||||
while (($row = fgetcsv($handle, 1000, ";")) !== false) {
|
||||
$record = [];
|
||||
|
||||
foreach ($columns as $index => $column) {
|
||||
$value = $row[$index] ?? null;
|
||||
|
||||
// Aplicar CAST según el tipo de dato
|
||||
if ($value === '') {
|
||||
$record[$column] = null;
|
||||
|
||||
} elseif (self::isDateColumn($column)) {
|
||||
$record[$column] = self::formatDate($value);
|
||||
|
||||
} elseif (is_numeric($value)) {
|
||||
$record[$column] = strpos($value, '.') !== false ? (float) $value : (int) $value;
|
||||
|
||||
} else {
|
||||
$record[$column] = trim($value);
|
||||
}
|
||||
}
|
||||
|
||||
$data[] = $record;
|
||||
$rowCount++;
|
||||
|
||||
if (count($data) >= $batchSize) {
|
||||
self::insertOrUpdate($tableName, $data, $updateExisting);
|
||||
|
||||
$insertedCount += count($data);
|
||||
$data = [];
|
||||
}
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
|
||||
if (!empty($data)) {
|
||||
self::insertOrUpdate($tableName, $data, $updateExisting);
|
||||
|
||||
$insertedCount += count($data);
|
||||
}
|
||||
|
||||
return [
|
||||
"inserted" => $insertedCount,
|
||||
"total_rows" => $rowCount
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Inserta o actualiza datos en la tabla.
|
||||
*/
|
||||
private static function insertOrUpdate(string $tableName, array $data, bool $updateExisting)
|
||||
{
|
||||
if (empty($data)) {
|
||||
echo "⚠️ Datos vacíos para {$tableName}\n";
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($data as &$record) {
|
||||
foreach ($record as $key => $value) {
|
||||
if ($value === '?') { // Si hay un '?', lo convertimos en NULL
|
||||
$record[$key] = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
unset($record);
|
||||
|
||||
try {
|
||||
$primaryKeys = self::getPrimaryKeys($tableName);
|
||||
$updateFields = array_diff(array_keys($data[0]), $primaryKeys);
|
||||
|
||||
if ($updateExisting && !empty($updateFields)) {
|
||||
DB::table($tableName)->upsert($data, $primaryKeys, $updateFields);
|
||||
|
||||
echo "✅ Upsert ejecutado en {$tableName} (" . count($data) . " filas)\n";
|
||||
|
||||
} else {
|
||||
DB::table($tableName)->insert($data);
|
||||
|
||||
echo "✅ Insert ejecutado en {$tableName} (" . count($data) . " filas)\n";
|
||||
}
|
||||
|
||||
} catch (\Exception $e) {
|
||||
Log::error("🚨 Error en {$tableName}: " . $e->getMessage());
|
||||
echo "❌ ERROR en {$tableName}: {$e->getMessage()}\n";
|
||||
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* **Detecta si una columna es de tipo fecha.**
|
||||
*/
|
||||
private static function isDateColumn(string $columnName): bool
|
||||
{
|
||||
$dateFields = ['fecha_inicio_vigencia', 'fecha_fin_vigencia'];
|
||||
|
||||
return in_array($columnName, $dateFields);
|
||||
}
|
||||
|
||||
/**
|
||||
* **Convierte fechas de diferentes formatos a `YYYY-MM-DD`.**
|
||||
*/
|
||||
private static function formatDate($value)
|
||||
{
|
||||
if (!$value || strtolower($value) === 'null') {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
if (is_numeric($value) && $value > 10000) {
|
||||
return Carbon::instance(\PhpOffice\PhpSpreadsheet\Shared\Date::excelToDateTimeObject($value))->format('Y-m-d');
|
||||
}
|
||||
|
||||
if (preg_match('/^\d{2}\/\d{2}\/\d{4}$/', $value)) {
|
||||
return Carbon::createFromFormat('d/m/Y', $value)->format('Y-m-d');
|
||||
}
|
||||
|
||||
return Carbon::parse($value)->format('Y-m-d');
|
||||
|
||||
} catch (\Exception $e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* **Obtiene las claves primarias de la tabla.**
|
||||
*/
|
||||
private static function getPrimaryKeys(string $tableName): array
|
||||
{
|
||||
$primaryKeys = [
|
||||
'sat_forma_pago' => ['c_forma_pago'],
|
||||
'sat_moneda' => ['c_moneda'],
|
||||
'sat_codigo_postal' => ['c_codigo_postal'],
|
||||
'sat_regimen_fiscal' => ['c_regimen_fiscal'],
|
||||
'sat_pais' => ['c_pais'],
|
||||
'sat_uso_cfdi' => ['c_uso_cfdi'],
|
||||
'sat_clave_prod_serv' => ['c_clave_prod_serv'],
|
||||
'sat_clave_unidad' => ['c_clave_unidad'],
|
||||
'sat_aduana' => ['c_aduana'],
|
||||
'sat_colonia' => ['c_colonia', 'c_codigo_postal'],
|
||||
'sat_estado' => ['c_estado', 'c_pais'],
|
||||
'sat_localidad' => ['c_localidad', 'c_estado'],
|
||||
'sat_municipio' => ['c_municipio', 'c_estado'],
|
||||
'sat_banco' => ['c_banco'],
|
||||
'sat_deduccion' => ['c_deduccion'],
|
||||
'sat_percepcion' => ['c_percepcion'],
|
||||
'sat_regimen_contratacion' => ['c_regimen_contratacion'],
|
||||
];
|
||||
|
||||
return $primaryKeys[$tableName] ?? ['id'];
|
||||
}
|
||||
}
|
171
Services/CsvGeneratorService.php
Normal file
171
Services/CsvGeneratorService.php
Normal file
@ -0,0 +1,171 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Services;
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\Reader\Xlsx as XlsxReader;
|
||||
use PhpOffice\PhpSpreadsheet\Reader\Xls as XlsReader;
|
||||
use PhpOffice\PhpSpreadsheet\Shared\Date as ExcelDate;
|
||||
use Carbon\Carbon;
|
||||
|
||||
class CsvGeneratorService
|
||||
{
|
||||
private static array $dateColumnsMap = [
|
||||
'c_formapago' => [12, 13],
|
||||
'c_moneda' => [4, 5],
|
||||
'c_codigopostal' => [5, 6],
|
||||
'c_regimenfiscal' => [4, 5],
|
||||
'c_usocfdi' => [4, 5],
|
||||
'c_claveprodserv' => [5, 6],
|
||||
'c_claveunidad' => [4, 5],
|
||||
'c_aduana' => [2, 3],
|
||||
'c_estado' => [3],
|
||||
'c_localidad' => [3],
|
||||
'c_municipio' => [3],
|
||||
];
|
||||
|
||||
/**
|
||||
* Convierte hojas de un XLSX o XLS a un CSV optimizado.
|
||||
*/
|
||||
public static function convertToCsv(string $filePath, $sheetNames, string $csvName, int $skipRows = 7)
|
||||
{
|
||||
$extension = strtolower(pathinfo($filePath, PATHINFO_EXTENSION));
|
||||
$reader = ($extension === 'xls') ? new XlsReader() : new XlsxReader();
|
||||
|
||||
try {
|
||||
$reader->setReadDataOnly(true);
|
||||
$reader->setLoadSheetsOnly($sheetNames);
|
||||
$spreadsheet = $reader->load($filePath);
|
||||
} catch (\PhpOffice\PhpSpreadsheet\Reader\Exception $e) {
|
||||
die("❌ Error al cargar hojas: " . implode(", ", (array) $sheetNames) . "\n");
|
||||
}
|
||||
|
||||
$csvPath = database_path("seeders/sat_cache/{$csvName}.csv");
|
||||
$handle = fopen($csvPath, 'w');
|
||||
|
||||
if (!$handle) {
|
||||
return ["error" => "No se pudo crear el archivo CSV."];
|
||||
}
|
||||
|
||||
foreach ((array) $sheetNames as $sheetName) {
|
||||
if (!$spreadsheet->sheetNameExists($sheetName)) {
|
||||
echo "⚠️ Hoja no encontrada: {$sheetName}, saltando...\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
$sheet = $spreadsheet->getSheetByName($sheetName);
|
||||
if (!$sheet) continue;
|
||||
|
||||
$dateColumns = self::$dateColumnsMap[$csvName] ?? []; // Índices de columnas de fechas
|
||||
|
||||
foreach ($sheet->getRowIterator($skipRows + 1) as $row) {
|
||||
$cells = [];
|
||||
$colIndex = 0;
|
||||
|
||||
foreach ($row->getCellIterator() as $cell) {
|
||||
$value = trim((string) $cell->getValue());
|
||||
|
||||
// 🛑 Omitir filas con "Continúa en..."
|
||||
if (str_starts_with($value, 'Continúa en ')) {
|
||||
echo "⚠️ Fila omitida: {$value}\n";
|
||||
continue 2; // Salta toda la fila
|
||||
}
|
||||
|
||||
// 🔥 Convertir "?" y valores vacíos a NULL
|
||||
if ($value === '?' || $value === '') {
|
||||
$value = '';
|
||||
}
|
||||
|
||||
// 📅 Si es fecha de Excel, convertir a YYYY-MM-DD
|
||||
if (in_array($colIndex, $dateColumns) && self::isExcelDate($value)) {
|
||||
$value = self::convertExcelDate($value);
|
||||
}
|
||||
|
||||
// 🔹 Escapar valores que contienen punto y coma, saltos de línea o comillas
|
||||
$value = self::escapeCsvValue($value);
|
||||
|
||||
$cells[] = $value;
|
||||
$colIndex++;
|
||||
}
|
||||
|
||||
if (self::isEmptyRow($cells)) {
|
||||
echo "⚠️ Fila vacía detectada y omitida\n";
|
||||
continue;
|
||||
}
|
||||
|
||||
fputcsv($handle, $cells, ';'); // 💡 Asegura que los valores se escapen correctamente
|
||||
}
|
||||
}
|
||||
|
||||
fclose($handle);
|
||||
$spreadsheet->disconnectWorksheets();
|
||||
unset($spreadsheet);
|
||||
|
||||
return $csvPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* **Detecta si el valor es un número de fecha de Excel**
|
||||
*/
|
||||
private static function isExcelDate($value): bool
|
||||
{
|
||||
return is_numeric($value) && $value > 10000;
|
||||
}
|
||||
|
||||
/**
|
||||
* **Convierte un número de fecha de Excel a formato YYYY-MM-DD**
|
||||
*/
|
||||
private static function convertExcelDate($value): string
|
||||
{
|
||||
try {
|
||||
return Carbon::instance(ExcelDate::excelToDateTimeObject($value))->format('Y-m-d');
|
||||
} catch (\Exception $e) {
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* **Escapa valores con punto y coma, comillas o saltos de línea en CSV**
|
||||
*/
|
||||
private static function escapeCsvValue($value): string
|
||||
{
|
||||
// Si el valor contiene punto y coma, salto de línea o comillas dobles, se escapa
|
||||
if (strpbrk($value, ";\"\n")) {
|
||||
$value = '"' . str_replace('"', '""', $value) . '"'; // Duplicar comillas internas
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* **Verifica si una fila está vacía o contiene valores inválidos.**
|
||||
*/
|
||||
private static function isEmptyRow(array $cells): bool
|
||||
{
|
||||
$empty = empty(array_filter($cells, fn($cell) => $cell !== ''));
|
||||
|
||||
if ($empty) {
|
||||
echo "⚠️ Fila detectada como vacía y omitida\n";
|
||||
}
|
||||
|
||||
return $empty;
|
||||
}
|
||||
|
||||
/**
|
||||
* **Cuenta las filas de un archivo CSV.**
|
||||
*/
|
||||
public static function countCsvRows(string $csvPath): int
|
||||
{
|
||||
if (!file_exists($csvPath)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
$file = fopen($csvPath, 'r');
|
||||
$count = 0;
|
||||
|
||||
while (fgetcsv($file, 0, ';') !== false) {
|
||||
$count++;
|
||||
}
|
||||
|
||||
fclose($file);
|
||||
return $count;
|
||||
}
|
||||
}
|
416
Services/SatCatalogsService.php
Normal file
416
Services/SatCatalogsService.php
Normal file
@ -0,0 +1,416 @@
|
||||
<?php
|
||||
|
||||
namespace Koneko\SatCatalogs\Services;
|
||||
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
class SatCatalogService
|
||||
{
|
||||
protected $catalogs = [
|
||||
'banco' => [
|
||||
'table' => 'sat_banco',
|
||||
'key' => 'c_banco',
|
||||
'value' => 'descripcion AS item',
|
||||
'order_by' => 'descripcion',
|
||||
'search_columns' => ['descripcion'],
|
||||
'use_status' => true,
|
||||
'limit' => 10
|
||||
],
|
||||
'clave_prod_serv' => [
|
||||
'table' => 'sat_clave_prod_serv',
|
||||
'key' => 'c_clave_prod_serv',
|
||||
'value' => "CONCAT_WS(' - ', c_clave_prod_serv , descripcion) as item",
|
||||
'search_type' => 'MATCH',
|
||||
'search_columns' => ['c_clave_prod_serv_text', 'descripcion'],
|
||||
],
|
||||
'clave_unidad' => [
|
||||
'table' => 'sat_clave_unidad',
|
||||
'key' => 'c_clave_unidad',
|
||||
'value' => "CONCAT_WS(' - ', c_clave_unidad , nombre) as item",
|
||||
'search_columns' => ['c_clave_unidad', 'nombre'],
|
||||
'limit' => 20
|
||||
],
|
||||
'deduccion' => [
|
||||
'table' => 'sat_deduccion',
|
||||
'key' => 'c_deduccion',
|
||||
'value' => "CONCAT_WS(' - ', c_deduccion , descripcion) as item",
|
||||
'search_columns' => ['c_deduccion', 'descripcion'],
|
||||
'limit' => 20
|
||||
],
|
||||
'forma_pago' => [
|
||||
'table' => 'sat_forma_pago',
|
||||
'key' => 'c_forma_pago',
|
||||
'value' => "CONCAT_WS(' - ', c_forma_pago , descripcion) as item",
|
||||
'search_columns' => ['c_forma_pago', 'descripcion'],
|
||||
'limit' => 10
|
||||
],
|
||||
'moneda' => [
|
||||
'table' => 'sat_moneda',
|
||||
'key' => 'c_moneda',
|
||||
'value' => "CONCAT_WS(' - ', c_moneda , descripcion) as item",
|
||||
'order_by' => 'descripcion',
|
||||
'search_columns' => ['c_moneda', 'descripcion'],
|
||||
'limit' => 10
|
||||
],
|
||||
'pais' => [
|
||||
'table' => 'sat_pais',
|
||||
'key' => 'c_pais',
|
||||
'value' => 'descripcion AS item',
|
||||
'order_by' => 'descripcion',
|
||||
'search_columns' => ['c_pais', 'descripcion'],
|
||||
'limit' => 10
|
||||
],
|
||||
|
||||
'estado' => [
|
||||
'table' => 'sat_estado',
|
||||
'key' => 'c_estado',
|
||||
'value' => 'nombre_del_estado AS item',
|
||||
'order_by' => 'nombre_del_estado',
|
||||
'extra_conditions' => ['c_pais'],
|
||||
'search_columns' => ['nombre_del_estado'],
|
||||
],
|
||||
'municipio' => [
|
||||
'table' => 'sat_municipio',
|
||||
'key' => 'c_municipio',
|
||||
'value' => 'descripcion AS item',
|
||||
'order_by' => 'descripcion',
|
||||
'extra_conditions' => ['c_estado'],
|
||||
'search_columns' => ['descripcion'],
|
||||
],
|
||||
'localidad' => [
|
||||
'table' => 'sat_localidad',
|
||||
'key' => 'c_localidad',
|
||||
'value' => 'descripcion AS item',
|
||||
'order_by' => 'descripcion',
|
||||
'extra_conditions' => ['c_estado'],
|
||||
'search_columns' => ['descripcion'],
|
||||
],
|
||||
'colonia' => [
|
||||
'table' => 'sat_colonia',
|
||||
'joins' => [
|
||||
[
|
||||
'table' => 'sat_codigo_postal',
|
||||
'first' => 'sat_colonia.c_codigo_postal',
|
||||
'second' => 'sat_codigo_postal.c_codigo_postal',
|
||||
],
|
||||
],
|
||||
'key' => 'sat_colonia.c_colonia',
|
||||
'value' => 'sat_colonia.nombre_del_asentamiento AS item',
|
||||
'columns' => [
|
||||
'sat_colonia.c_codigo_postal',
|
||||
],
|
||||
'order_by' => 'sat_colonia.nombre_del_asentamiento',
|
||||
'extra_conditions' => ['sat_codigo_postal.c_codigo_postal', 'sat_codigo_postal.c_estado', 'sat_codigo_postal.c_municipio', 'sat_colonia.c_colonia'],
|
||||
'search_columns' => ['sat_colonia.nombre_del_asentamiento'],
|
||||
],
|
||||
'codigo_postal' => [
|
||||
'table' => 'sat_codigo_postal',
|
||||
'joins' => [
|
||||
[
|
||||
'table' => 'sat_localidad',
|
||||
'first' => 'sat_codigo_postal.c_localidad',
|
||||
'second' => 'sat_localidad.c_localidad',
|
||||
'and' => ['sat_codigo_postal.c_estado = sat_localidad.c_estado'],
|
||||
'type' => 'leftJoin',
|
||||
],
|
||||
[
|
||||
'table' => 'sat_municipio',
|
||||
'first' => 'sat_codigo_postal.c_municipio',
|
||||
'second' => 'sat_municipio.c_municipio',
|
||||
'and' => ['sat_codigo_postal.c_estado = sat_municipio.c_estado'],
|
||||
'type' => 'leftJoin',
|
||||
],
|
||||
[
|
||||
'table' => 'sat_estado',
|
||||
'first' => 'sat_codigo_postal.c_estado',
|
||||
'second' => 'sat_estado.c_estado',
|
||||
'type' => 'leftJoin',
|
||||
],
|
||||
],
|
||||
'key' => 'sat_codigo_postal.c_codigo_postal',
|
||||
'columns' => [
|
||||
'sat_codigo_postal.c_estado',
|
||||
'sat_estado.nombre_del_estado as estado',
|
||||
'sat_codigo_postal.c_localidad',
|
||||
'sat_localidad.descripcion as localidad',
|
||||
'sat_codigo_postal.c_municipio',
|
||||
'sat_municipio.descripcion as municipio',
|
||||
],
|
||||
'search_columns' => ['sat_codigo_postal.c_codigo_postal'],
|
||||
],
|
||||
];
|
||||
|
||||
protected $fixedCatalogs = [
|
||||
'exportacion' => [
|
||||
1 => 'No aplica',
|
||||
2 => 'Definitiva con clave A1',
|
||||
3 => 'Temporal',
|
||||
4 => 'Definitiva con clave distinta a A1 o cuando no existe enajenación en términos del CFF'
|
||||
],
|
||||
'horas_extra' => [
|
||||
'01' => 'Dobles',
|
||||
'02' => 'Triples',
|
||||
'03' => 'Simples'
|
||||
],
|
||||
'impuestos' => [
|
||||
1 => 'ISR',
|
||||
2 => 'IVA',
|
||||
3 => 'IEPS'
|
||||
],
|
||||
'incapacidad' => [
|
||||
1 => 'Riesgo de trabajo',
|
||||
2 => 'Enfermedad en general',
|
||||
3 => 'Maternidad',
|
||||
4 => 'Licencia por cuidados médicos de hijos diagnosticados con cáncer'
|
||||
],
|
||||
'jornada' => [
|
||||
'01' => 'Diurna',
|
||||
'02' => 'Nocturna',
|
||||
'03' => 'Mixta',
|
||||
'04' => 'Por hora',
|
||||
'05' => 'Reducida',
|
||||
'06' => 'Continuada',
|
||||
'07' => 'Partida',
|
||||
'08' => 'Por turnos',
|
||||
'99' => 'Otra Jornada'
|
||||
],
|
||||
'metodo_pago' => [
|
||||
'PUE' => 'Pago en una sola exhibición',
|
||||
'PPD' => 'Pago en parcialidades o diferido'
|
||||
],
|
||||
'nomina' => [
|
||||
'O' => 'Nómina ordinaria',
|
||||
'E' => 'Nómina extraordinaria'
|
||||
],
|
||||
'objeto_imp' => [
|
||||
1 => 'No objeto de impuesto.',
|
||||
2 => 'Sí objeto de impuesto.',
|
||||
3 => 'Sí objeto del impuesto y no obligado al desglose.',
|
||||
4 => 'Sí objeto del impuesto y no causa impuesto.',
|
||||
5 => 'Sí objeto del impuesto, IVA crédito PODEBI.'
|
||||
],
|
||||
'origen_recurso' => [
|
||||
'IP' => 'Ingresos propios',
|
||||
'IF' => 'Ingresos federales',
|
||||
'IM' => 'Ingresos mixtos'
|
||||
],
|
||||
'otro_pago' => [
|
||||
1 => 'Reintegro de ISR pagado en exceso',
|
||||
2 => 'Subsidio para el empleo',
|
||||
3 => 'Viáticos',
|
||||
4 => 'Aplicación de saldo a favor por compensación anual',
|
||||
5 => 'Reintegro de ISR retenido en exceso de ejercicio anterior',
|
||||
6 => 'Alimentos en bienes',
|
||||
7 => 'ISR ajustado por subsidio',
|
||||
8 => 'Subsidio efectivamente entregado que no correspondía',
|
||||
999 => 'Pagos distintos a los listados'
|
||||
],
|
||||
'periodicidad' => [
|
||||
1 => 'Diario',
|
||||
2 => 'Semanal',
|
||||
3 => 'Quincenal',
|
||||
4 => 'Mensual',
|
||||
5 => 'Bimestral'
|
||||
],
|
||||
'periodicidad_pago' => [
|
||||
1 => 'Diario',
|
||||
2 => 'Semanal',
|
||||
3 => 'Catorcenal',
|
||||
4 => 'Quincenal',
|
||||
5 => 'Mensual',
|
||||
6 => 'Bimestral',
|
||||
7 => 'Unidad obra',
|
||||
8 => 'Comisión',
|
||||
9 => 'Precio alzado',
|
||||
10 => 'Decenal',
|
||||
99 => 'Otra Periodicidad'
|
||||
],
|
||||
'riesgo_puesto' => [
|
||||
'1' => 'Clase I',
|
||||
'2' => 'Clase II',
|
||||
'3' => 'Clase III',
|
||||
'4' => 'Clase IV',
|
||||
'5' => 'Clase V'
|
||||
],
|
||||
'tipo_comprobante' => [
|
||||
'I' => 'Ingreso',
|
||||
'E' => 'Egreso',
|
||||
'T' => 'Traslado',
|
||||
'N' => 'Nómina',
|
||||
'P' => 'Pago'
|
||||
],
|
||||
'tipo_factor' => [
|
||||
1 => 'Tasa',
|
||||
2 => 'Cuota',
|
||||
3 => 'Exento'
|
||||
],
|
||||
'tipo_relacion' => [
|
||||
1 => 'Nota de crédito de los documentos relacionados',
|
||||
2 => 'Nota de débito de los documentos relacionados',
|
||||
3 => 'Devolución de mercancía sobre facturas o traslados previos',
|
||||
4 => 'Sustitución de los CFDI previos',
|
||||
5 => 'Traslados de mercancías facturados previamente',
|
||||
6 => 'Factura generada por los traslados previos',
|
||||
7 => 'CFDI por aplicación de anticipo'
|
||||
]
|
||||
];
|
||||
|
||||
|
||||
public function searchCatalog(string $catalog, string $searchTerm = '', array $options = []): array
|
||||
{
|
||||
// 1. Validar si es un catálogo fijo o uno definido en $this->catalogs
|
||||
if (isset($this->fixedCatalogs[$catalog])) {
|
||||
return $this->fixedCatalogs[$catalog];
|
||||
}
|
||||
|
||||
if (!isset($this->catalogs[$catalog])) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$config = $this->catalogs[$catalog];
|
||||
|
||||
// 2. Construye Query Builder base
|
||||
$query = DB::table($config['table']);
|
||||
|
||||
// 3. Aplica joins
|
||||
if (!empty($config['joins'])) {
|
||||
foreach ($config['joins'] as $join) {
|
||||
$type = $join['type'] ?? 'join';
|
||||
$query->{$type}($join['table'], function($joinObj) use ($join) {
|
||||
$joinObj->on($join['first'], '=', $join['second']);
|
||||
// Soporte para AND en ON, si está definidio
|
||||
if (!empty($join['and'])) {
|
||||
foreach ((array) $join['and'] as $andCondition) {
|
||||
// 'sat_codigo_postal.c_estado = sat_localidad.c_estado'
|
||||
$parts = explode('=', $andCondition);
|
||||
if (count($parts) === 2) {
|
||||
$left = trim($parts[0]);
|
||||
$right = trim($parts[1]);
|
||||
$joinObj->whereRaw("$left = $right");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 4. Construir la lista de columnas a seleccionar
|
||||
$selectFields = [];
|
||||
|
||||
// - Si hay "columns", añádelas
|
||||
if (!empty($config['columns'])) {
|
||||
foreach ($config['columns'] as $col) {
|
||||
$selectFields[] = DB::raw($col);
|
||||
}
|
||||
}
|
||||
|
||||
// - Si también tienes "key" y "value" (por ejemplo para select2),
|
||||
// añádelos (si no están ya en columns).
|
||||
if (!empty($config['key'])) {
|
||||
$selectFields[] = DB::raw($config['key']);
|
||||
}
|
||||
|
||||
if (!empty($config['value'])) {
|
||||
$selectFields[] = DB::raw($config['value']);
|
||||
}
|
||||
|
||||
// - Si al final no hay nada, por fallback selecciona todo (o lanza un error)
|
||||
if (empty($selectFields)) {
|
||||
$query->select('*');
|
||||
|
||||
} else {
|
||||
$query->select($selectFields);
|
||||
}
|
||||
|
||||
// 5. Filtrado por status si aplica
|
||||
if (($config['use_status'] ?? false) === true) {
|
||||
$status = isset($options['status'])
|
||||
? $options['status']
|
||||
: (isset($config['status']) ? $config['status']: null);
|
||||
|
||||
if ($status !== null) {
|
||||
$query->where('status', $status);
|
||||
}
|
||||
}
|
||||
|
||||
// 6. Filtrar según extra_conditions (ahora puede incluir columnas de la tabla unida)
|
||||
if (isset($config['extra_conditions'])) {
|
||||
foreach ($config['extra_conditions'] as $field) {
|
||||
if (array_key_exists($field, $options)) {
|
||||
$query->where($field, $options[$field]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 7. Búsqueda
|
||||
if (!empty($searchTerm) && !empty($config['search_columns'])) {
|
||||
if (($config['search_type'] ?? 'LIKE') === 'MATCH') {
|
||||
// Ejemplo: MATCH..AGAINST
|
||||
$cols = implode(',', $config['search_columns']);
|
||||
|
||||
$query->whereRaw("MATCH ($cols) AGAINST (? IN BOOLEAN MODE)", [$searchTerm]);
|
||||
|
||||
} else {
|
||||
// Búsqueda por LIKE
|
||||
$query->where(function ($subQ) use ($config, $searchTerm) {
|
||||
foreach ($config['search_columns'] as $col) {
|
||||
$subQ->orWhere($col, 'LIKE', "%{$searchTerm}%");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 8. Ordenar resultados
|
||||
$orderBy = $options['order_by'] ?? $config['order_by'] ?? $config['key'];
|
||||
$orderDir = $options['order_dir'] ?? $config['order_dir'] ?? 'asc';
|
||||
$query->orderBy($orderBy, $orderDir);
|
||||
|
||||
// 9. Limitar
|
||||
$limit = array_key_exists('limit', $options) ? $options['limit'] : ($config['limit'] ?? 50);
|
||||
|
||||
if ($limit !== null) {
|
||||
$query->limit($limit);
|
||||
}
|
||||
|
||||
|
||||
// Para ver la sentencia SQL (con placeholders ?)
|
||||
// dump($query->toSql()); dd($query->getBindings());
|
||||
|
||||
|
||||
// 10. Revisar modo de respuesta
|
||||
$rawMode = ($config['rawMode'] ?? false) || ($options['rawMode'] ?? false);
|
||||
$firstRow = ($config['firstRow'] ?? false) || ($options['firstRow'] ?? false);
|
||||
$select2Mode = $options['select2Mode'] ?? false;
|
||||
|
||||
// (a) Modo raw -> devolvemos tal cual
|
||||
if ($rawMode) {
|
||||
if($firstRow){
|
||||
return (array) $query->first();
|
||||
}
|
||||
|
||||
return $query->get()->toArray();
|
||||
}
|
||||
|
||||
$shortKey = Str::afterLast($config['key'], '.');
|
||||
|
||||
// (b) Devuelve en formato "select2" o en un array
|
||||
if ($select2Mode) {
|
||||
$response = [];
|
||||
|
||||
foreach ($query->get() as $row) {
|
||||
$response[] = [
|
||||
'id' => $row->{$shortKey},
|
||||
'text' => $row->item,
|
||||
];
|
||||
}
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
// (c) Por defecto, regresa "pluck" id => texto
|
||||
return $query->pluck('item', $shortKey)->toArray();
|
||||
}
|
||||
|
||||
}
|
17
artisan
Executable file
17
artisan
Executable file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
require __DIR__ . '/dev/bootstrap.php';
|
||||
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Console\Output\ConsoleOutput;
|
||||
|
||||
// Cargar Laravel desde bootstrap.php
|
||||
$app = require __DIR__ . '/dev/bootstrap.php';
|
||||
|
||||
// Ejecutar Artisan
|
||||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||
$status = $kernel->handle(new ArgvInput(), new ConsoleOutput());
|
||||
|
||||
$kernel->terminate(new ArgvInput(), $status);
|
||||
exit($status);
|
16
bootstrap/cache/packages.php
vendored
Executable file
16
bootstrap/cache/packages.php
vendored
Executable file
@ -0,0 +1,16 @@
|
||||
<?php return array (
|
||||
'nesbot/carbon' =>
|
||||
array (
|
||||
'providers' =>
|
||||
array (
|
||||
0 => 'Carbon\\Laravel\\ServiceProvider',
|
||||
),
|
||||
),
|
||||
'nunomaduro/termwind' =>
|
||||
array (
|
||||
'providers' =>
|
||||
array (
|
||||
0 => 'Termwind\\Laravel\\TermwindServiceProvider',
|
||||
),
|
||||
),
|
||||
);
|
239
bootstrap/cache/services.php
vendored
Executable file
239
bootstrap/cache/services.php
vendored
Executable file
@ -0,0 +1,239 @@
|
||||
<?php return array (
|
||||
'providers' =>
|
||||
array (
|
||||
0 => 'Illuminate\\Auth\\AuthServiceProvider',
|
||||
1 => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
|
||||
2 => 'Illuminate\\Bus\\BusServiceProvider',
|
||||
3 => 'Illuminate\\Cache\\CacheServiceProvider',
|
||||
4 => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
5 => 'Illuminate\\Concurrency\\ConcurrencyServiceProvider',
|
||||
6 => 'Illuminate\\Cookie\\CookieServiceProvider',
|
||||
7 => 'Illuminate\\Database\\DatabaseServiceProvider',
|
||||
8 => 'Illuminate\\Encryption\\EncryptionServiceProvider',
|
||||
9 => 'Illuminate\\Filesystem\\FilesystemServiceProvider',
|
||||
10 => 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider',
|
||||
11 => 'Illuminate\\Hashing\\HashServiceProvider',
|
||||
12 => 'Illuminate\\Mail\\MailServiceProvider',
|
||||
13 => 'Illuminate\\Notifications\\NotificationServiceProvider',
|
||||
14 => 'Illuminate\\Pagination\\PaginationServiceProvider',
|
||||
15 => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider',
|
||||
16 => 'Illuminate\\Pipeline\\PipelineServiceProvider',
|
||||
17 => 'Illuminate\\Queue\\QueueServiceProvider',
|
||||
18 => 'Illuminate\\Redis\\RedisServiceProvider',
|
||||
19 => 'Illuminate\\Session\\SessionServiceProvider',
|
||||
20 => 'Illuminate\\Translation\\TranslationServiceProvider',
|
||||
21 => 'Illuminate\\Validation\\ValidationServiceProvider',
|
||||
22 => 'Illuminate\\View\\ViewServiceProvider',
|
||||
23 => 'Carbon\\Laravel\\ServiceProvider',
|
||||
24 => 'Termwind\\Laravel\\TermwindServiceProvider',
|
||||
),
|
||||
'eager' =>
|
||||
array (
|
||||
0 => 'Illuminate\\Auth\\AuthServiceProvider',
|
||||
1 => 'Illuminate\\Cookie\\CookieServiceProvider',
|
||||
2 => 'Illuminate\\Database\\DatabaseServiceProvider',
|
||||
3 => 'Illuminate\\Encryption\\EncryptionServiceProvider',
|
||||
4 => 'Illuminate\\Filesystem\\FilesystemServiceProvider',
|
||||
5 => 'Illuminate\\Foundation\\Providers\\FoundationServiceProvider',
|
||||
6 => 'Illuminate\\Notifications\\NotificationServiceProvider',
|
||||
7 => 'Illuminate\\Pagination\\PaginationServiceProvider',
|
||||
8 => 'Illuminate\\Session\\SessionServiceProvider',
|
||||
9 => 'Illuminate\\View\\ViewServiceProvider',
|
||||
10 => 'Carbon\\Laravel\\ServiceProvider',
|
||||
11 => 'Termwind\\Laravel\\TermwindServiceProvider',
|
||||
),
|
||||
'deferred' =>
|
||||
array (
|
||||
'Illuminate\\Broadcasting\\BroadcastManager' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
|
||||
'Illuminate\\Contracts\\Broadcasting\\Factory' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
|
||||
'Illuminate\\Contracts\\Broadcasting\\Broadcaster' => 'Illuminate\\Broadcasting\\BroadcastServiceProvider',
|
||||
'Illuminate\\Bus\\Dispatcher' => 'Illuminate\\Bus\\BusServiceProvider',
|
||||
'Illuminate\\Contracts\\Bus\\Dispatcher' => 'Illuminate\\Bus\\BusServiceProvider',
|
||||
'Illuminate\\Contracts\\Bus\\QueueingDispatcher' => 'Illuminate\\Bus\\BusServiceProvider',
|
||||
'Illuminate\\Bus\\BatchRepository' => 'Illuminate\\Bus\\BusServiceProvider',
|
||||
'Illuminate\\Bus\\DatabaseBatchRepository' => 'Illuminate\\Bus\\BusServiceProvider',
|
||||
'cache' => 'Illuminate\\Cache\\CacheServiceProvider',
|
||||
'cache.store' => 'Illuminate\\Cache\\CacheServiceProvider',
|
||||
'cache.psr6' => 'Illuminate\\Cache\\CacheServiceProvider',
|
||||
'memcached.connector' => 'Illuminate\\Cache\\CacheServiceProvider',
|
||||
'Illuminate\\Cache\\RateLimiter' => 'Illuminate\\Cache\\CacheServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\AboutCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Cache\\Console\\ClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Cache\\Console\\ForgetCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ClearCompiledCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Auth\\Console\\ClearResetsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ConfigCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ConfigClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ConfigShowCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\DbCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\MonitorCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\PruneCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\ShowCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\TableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\WipeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\DownCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EnvironmentCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EnvironmentDecryptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EnvironmentEncryptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EventCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EventClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EventListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Concurrency\\Console\\InvokeSerializedClosureCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\KeyGenerateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\OptimizeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\OptimizeClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\PackageDiscoverCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Cache\\Console\\PruneStaleTagsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\ClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\ListFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\FlushFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\ForgetFailedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\ListenCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\MonitorCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\PruneBatchesCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\PruneFailedJobsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\RestartCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\RetryCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\RetryBatchCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\WorkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\RouteCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\RouteClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\RouteListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\DumpCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Seeds\\SeedCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Console\\Scheduling\\ScheduleListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Console\\Scheduling\\ScheduleClearCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Console\\Scheduling\\ScheduleTestCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Console\\Scheduling\\ScheduleWorkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Console\\Scheduling\\ScheduleInterruptCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\ShowModelCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\StorageLinkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\StorageUnlinkCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\UpCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ViewCacheCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ViewClearCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ApiInstallCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\BroadcastingInstallCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Cache\\Console\\CacheTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\CastMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ChannelListCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ChannelMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ClassMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ComponentMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ConfigPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ConsoleMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Routing\\Console\\ControllerMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\DocsCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EnumMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EventGenerateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\EventMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ExceptionMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Factories\\FactoryMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\InterfaceMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\JobMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\JobMiddlewareMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\LangPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ListenerMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\MailMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Routing\\Console\\MiddlewareMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ModelMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\NotificationMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Notifications\\Console\\NotificationTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ObserverMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\PolicyMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ProviderMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\FailedTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\TableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Queue\\Console\\BatchesTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\RequestMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ResourceMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\RuleMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ScopeMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Seeds\\SeederMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Session\\Console\\SessionTableCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ServeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\StubPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\TestMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\TraitMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\VendorPublishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Foundation\\Console\\ViewMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'migrator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'migration.repository' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'migration.creator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\MigrateCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\FreshCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\InstallCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\RefreshCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\ResetCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\RollbackCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\StatusCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Database\\Console\\Migrations\\MigrateMakeCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'composer' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
|
||||
'Illuminate\\Concurrency\\ConcurrencyManager' => 'Illuminate\\Concurrency\\ConcurrencyServiceProvider',
|
||||
'hash' => 'Illuminate\\Hashing\\HashServiceProvider',
|
||||
'hash.driver' => 'Illuminate\\Hashing\\HashServiceProvider',
|
||||
'mail.manager' => 'Illuminate\\Mail\\MailServiceProvider',
|
||||
'mailer' => 'Illuminate\\Mail\\MailServiceProvider',
|
||||
'Illuminate\\Mail\\Markdown' => 'Illuminate\\Mail\\MailServiceProvider',
|
||||
'auth.password' => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider',
|
||||
'auth.password.broker' => 'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider',
|
||||
'Illuminate\\Contracts\\Pipeline\\Hub' => 'Illuminate\\Pipeline\\PipelineServiceProvider',
|
||||
'pipeline' => 'Illuminate\\Pipeline\\PipelineServiceProvider',
|
||||
'queue' => 'Illuminate\\Queue\\QueueServiceProvider',
|
||||
'queue.connection' => 'Illuminate\\Queue\\QueueServiceProvider',
|
||||
'queue.failer' => 'Illuminate\\Queue\\QueueServiceProvider',
|
||||
'queue.listener' => 'Illuminate\\Queue\\QueueServiceProvider',
|
||||
'queue.worker' => 'Illuminate\\Queue\\QueueServiceProvider',
|
||||
'redis' => 'Illuminate\\Redis\\RedisServiceProvider',
|
||||
'redis.connection' => 'Illuminate\\Redis\\RedisServiceProvider',
|
||||
'translator' => 'Illuminate\\Translation\\TranslationServiceProvider',
|
||||
'translation.loader' => 'Illuminate\\Translation\\TranslationServiceProvider',
|
||||
'validator' => 'Illuminate\\Validation\\ValidationServiceProvider',
|
||||
'validation.presence' => 'Illuminate\\Validation\\ValidationServiceProvider',
|
||||
'Illuminate\\Contracts\\Validation\\UncompromisedVerifier' => 'Illuminate\\Validation\\ValidationServiceProvider',
|
||||
),
|
||||
'when' =>
|
||||
array (
|
||||
'Illuminate\\Broadcasting\\BroadcastServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Bus\\BusServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Cache\\CacheServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Concurrency\\ConcurrencyServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Hashing\\HashServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Mail\\MailServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Auth\\Passwords\\PasswordResetServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Pipeline\\PipelineServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Queue\\QueueServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Redis\\RedisServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Translation\\TranslationServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
'Illuminate\\Validation\\ValidationServiceProvider' =>
|
||||
array (
|
||||
),
|
||||
),
|
||||
);
|
52
composer.json
Normal file
52
composer.json
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
"name": "koneko/laravel-sat-catalogs",
|
||||
"description": "Laravel SAT Catalogs, servicio de catálogos SAT.",
|
||||
"keywords": ["laravel", "koneko", "framework", "sat", "catalogs"],
|
||||
"type": "library",
|
||||
"license": "MIT",
|
||||
"version": "1.0.0",
|
||||
"require": {
|
||||
"php": "^8.2",
|
||||
"laravel/framework": "^11.31",
|
||||
"phpoffice/phpspreadsheet": "^4.1"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Koneko\\SatCatalogs\\": "./"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"Koneko\\SatCatalogs\\": "./"
|
||||
},
|
||||
"files": [
|
||||
"dev/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"bin": [
|
||||
"artisan"
|
||||
],
|
||||
"extra": {
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Koneko\\SatCatalogs\\Providers\\SatCatalogsServiceProvider"
|
||||
],
|
||||
"dont-discover": []
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"bootstrap.php",
|
||||
"dev/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arturo Corro Pacheco",
|
||||
"email": "arturo@koneko.mx"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/koneko-mx/laravel-sat-catalogs",
|
||||
"issues": "https://github.com/koneko-mx/laravel-sat-catalogs/issues"
|
||||
},
|
||||
"prefer-stable": true
|
||||
}
|
5966
composer.lock
generated
Normal file
5966
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,280 @@
|
||||
<?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('sat_aduana', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_aduana')->unique();
|
||||
$table->string('descripcion')->nullable()->index();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_banco', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedSmallInteger('c_banco')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
$table->string('razon_social')->nullable();
|
||||
$table->string('rfc', 13)->nullable();
|
||||
|
||||
$table->unsignedTinyInteger('status')->index();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_clave_prod_serv', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
// Columna numérica original
|
||||
$table->unsignedInteger('c_clave_prod_serv')->unique();
|
||||
|
||||
// Columna de texto con índice fulltext (inicial)
|
||||
$table->string('descripcion')->nullable();
|
||||
|
||||
$table->string('incluir_iva_trasladado')->nullable();
|
||||
$table->string('incluir_ieps_trasladado')->nullable();
|
||||
$table->string('complemento_que_debe_incluir')->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
$table->unsignedTinyInteger('estimulo_franja_fronteriza')->nullable();
|
||||
$table->string('palabras_similares', 1024)->nullable();
|
||||
|
||||
// Columna generada a partir de c_clave_prod_serv
|
||||
// (Convierte el INT a CHAR para poder incluirlo en el MATCH ... AGAINST)
|
||||
$table->string('c_clave_prod_serv_text', 8)
|
||||
->storedAs('CAST(`c_clave_prod_serv` AS CHAR)');
|
||||
|
||||
// Añadir aquí el índice FULLTEXT en la misma migración
|
||||
// Con Laravel 8+ y MySQL 5.7+ / MariaDB 10.2+ se puede usar:
|
||||
$table->fullText(['c_clave_prod_serv_text', 'descripcion'], 'claveprodserv_fulltext_idx');
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_clave_unidad', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->string('c_clave_unidad', 3)->unique();
|
||||
$table->string('nombre')->index();
|
||||
$table->string('descripcion', 1024)->nullable();
|
||||
$table->string('categoria', 1024)->nullable();
|
||||
$table->string('nota', 1024)->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
$table->string('simbolo')->nullable();
|
||||
$table->boolean('is_base')->default(false);
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_codigo_postal', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
$table->unsignedMediumInteger('c_codigo_postal')->index();
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci')->index();
|
||||
$table->unsignedSmallInteger('c_municipio')->nullable()->index();
|
||||
$table->unsignedTinyInteger('c_localidad')->nullable()->index();
|
||||
$table->string('estimulo_franja_fronteriza')->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_colonia', function (Blueprint $table) {
|
||||
$table->mediumIncrements('id');
|
||||
|
||||
$table->unsignedMediumInteger('c_colonia')->index();
|
||||
$table->unsignedMediumInteger('c_codigo_postal')->index();
|
||||
$table->string('nombre_del_asentamiento')->nullable()->index();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique(['c_colonia', 'c_codigo_postal']);
|
||||
});
|
||||
|
||||
Schema::create('sat_deduccion', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_deduccion')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_estado', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci')->index();
|
||||
$table->char('c_pais', 3)->charset('ascii')->collation('ascii_general_ci')->index();
|
||||
$table->string('nombre_del_estado')->index();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique(['c_estado', 'c_pais']);
|
||||
});
|
||||
|
||||
Schema::create('sat_forma_pago', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_forma_pago')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
$table->string('bancarizado')->nullable();
|
||||
$table->string('numero_de_operacion')->nullable();
|
||||
$table->string('rfc_del_emisor_de_la_cuenta_ordenante')->nullable();
|
||||
$table->string('cuenta_ordenante')->nullable();
|
||||
$table->string('patron_para_cuenta_ordenante')->nullable();
|
||||
$table->string('rfc_del_emisor_cuenta_de_beneficiario')->nullable();
|
||||
$table->string('cuenta_de_benenficiario')->nullable();
|
||||
$table->string('patron_para_cuenta_beneficiaria')->nullable();
|
||||
$table->string('tipo_cadena_pago')->nullable();
|
||||
$table->string('banco_emisor_de_la_cuenta_ordenante')->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_localidad', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_localidad')->index();
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci')->index();
|
||||
$table->string('descripcion')->index();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique(['c_localidad', 'c_estado']);
|
||||
});
|
||||
|
||||
Schema::create('sat_municipio', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedSmallInteger('c_municipio')->index();
|
||||
$table->string('c_estado', 3)->charset('ascii')->collation('ascii_general_ci')->index();
|
||||
$table->string('descripcion')->index();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
|
||||
// Indices
|
||||
$table->unique(['c_municipio', 'c_estado']);
|
||||
});
|
||||
|
||||
Schema::create('sat_moneda', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->char('c_moneda', 3)->charset('ascii')->collation('ascii_general_ci')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
$table->string('decimales')->nullable();
|
||||
$table->string('porcentaje_variacion')->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_pais', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->char('c_pais', 3)->charset('ascii')->collation('ascii_general_ci')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
$table->string('formato_de_codigo_postal')->nullable();
|
||||
$table->string('formato_de_registro_de_identidad_tributaria')->nullable();
|
||||
$table->string('validacion_del_registro_de_identidad_tributaria')->nullable();
|
||||
$table->string('agrupaciones')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_percepcion', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_percepcion')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
$table->enum('gravado_exento', ['Gravado', 'Gravado y Exento', 'Exento']);
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_regimen_contratacion', function (Blueprint $table) {
|
||||
$table->tinyIncrements('id');
|
||||
|
||||
$table->unsignedTinyInteger('c_tipo_regimen')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_regimen_fiscal', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->unsignedSmallInteger('c_regimen_fiscal')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
$table->char('fisica', 2)->nullable();
|
||||
$table->char('moral', 2)->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('sat_uso_cfdi', function (Blueprint $table) {
|
||||
$table->smallIncrements('id');
|
||||
|
||||
$table->char('c_uso_cfdi', 4)->charset('ascii')->collation('ascii_general_ci')->unique();
|
||||
$table->string('descripcion')->index();
|
||||
$table->char('aplica_para_tipo_persona_fisica', 2)->nullable();
|
||||
$table->char('aplica_para_tipo_persona_moral', 2)->nullable();
|
||||
$table->date('fecha_inicio_vigencia')->nullable();
|
||||
$table->date('fecha_fin_vigencia')->nullable();
|
||||
$table->string('regimen_fiscal_receptor')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('sat_banco');
|
||||
Schema::dropIfExists('sat_clave_prod_serv');
|
||||
Schema::dropIfExists('sat_clave_unidad');
|
||||
Schema::dropIfExists('sat_codigo_postal');
|
||||
Schema::dropIfExists('sat_colonia');
|
||||
Schema::dropIfExists('sat_deduccion');
|
||||
Schema::dropIfExists('sat_estado');
|
||||
Schema::dropIfExists('sat_forma_pago');
|
||||
Schema::dropIfExists('sat_localidad');
|
||||
Schema::dropIfExists('sat_municipio');
|
||||
Schema::dropIfExists('sat_moneda');
|
||||
Schema::dropIfExists('sat_pais');
|
||||
Schema::dropIfExists('sat_percepcion');
|
||||
Schema::dropIfExists('sat_regimen_contratacion');
|
||||
Schema::dropIfExists('sat_regimen_fiscal');
|
||||
Schema::dropIfExists('sat_uso_cfdi');
|
||||
}
|
||||
};
|
21
database/seeders/SatCatalogsSeeder.php
Normal file
21
database/seeders/SatCatalogsSeeder.php
Normal file
@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
|
||||
class SatCatalogsSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Ejecuta la siembra de datos en la base de datos.
|
||||
*/
|
||||
public function run()
|
||||
{
|
||||
// Llamar al comando para importar los CSV generados
|
||||
$this->command->info('📌 Importando catálogos SAT desde CSV...');
|
||||
Artisan::call('sat:import-csv');
|
||||
|
||||
$this->command->info('✅ Importación completada.');
|
||||
}
|
||||
}
|
50
database/seeders/sat_cache/c_aduana.csv
Normal file
50
database/seeders/sat_cache/c_aduana.csv
Normal file
@ -0,0 +1,50 @@
|
||||
1;"ACAPULCO, ACAPULCO DE JUAREZ, GUERRERO.";2022-01-01;;;
|
||||
2;"AGUA PRIETA, AGUA PRIETA, SONORA.";2022-01-01;;;
|
||||
5;"SUBTENIENTE LOPEZ, SUBTENIENTE LOPEZ, QUINTANA ROO.";2022-01-01;;;
|
||||
6;"CIUDAD DEL CARMEN, CIUDAD DEL CARMEN, CAMPECHE.";2022-01-01;;;
|
||||
7;"CIUDAD JUAREZ, CIUDAD JUAREZ, CHIHUAHUA.";2022-01-01;;;
|
||||
8;"COATZACOALCOS, COATZACOALCOS, VERACRUZ.";2022-01-01;;;
|
||||
11;"ENSENADA, ENSENADA, BAJA CALIFORNIA.";2022-01-01;;;
|
||||
12;"GUAYMAS, GUAYMAS, SONORA.";2022-01-01;;;
|
||||
14;"LA PAZ, LA PAZ, BAJA CALIFORNIA SUR.";2022-01-01;;;
|
||||
16;"MANZANILLO, MANZANILLO, COLIMA.";2022-01-01;;;
|
||||
17;"MATAMOROS, MATAMOROS, TAMAULIPAS.";2022-01-01;;;
|
||||
18;"MAZATLAN, MAZATLAN, SINALOA.";2022-01-01;;;
|
||||
19;"MEXICALI, MEXICALI, BAJA CALIFORNIA.";2022-01-01;;;
|
||||
20;"MEXICO, DISTRITO FEDERAL.";2022-01-01;;;
|
||||
22;"NACO, NACO, SONORA.";2022-01-01;;;
|
||||
23;"NOGALES, NOGALES, SONORA.";2022-01-01;;;
|
||||
24;"NUEVO LAREDO, NUEVO LAREDO, TAMAULIPAS.";2022-01-01;;;
|
||||
25;"OJINAGA, OJINAGA, CHIHUAHUA.";2022-01-01;;;
|
||||
26;"PUERTO PALOMAS, PUERTO PALOMAS, CHIHUAHUA.";2022-01-01;;;
|
||||
27;"PIEDRAS NEGRAS, PIEDRAS NEGRAS, COAHUILA.";2022-01-01;;;
|
||||
28;"PROGRESO, PROGRESO, YUCATAN.";2022-01-01;;;
|
||||
30;"CIUDAD REYNOSA, CIUDAD REYNOSA, TAMAULIPAS.";2022-01-01;;;
|
||||
31;"SALINA CRUZ, SALINA CRUZ, OAXACA.";2022-01-01;;;
|
||||
33;"SAN LUIS RIO COLORADO, SAN LUIS RIO COLORADO, SONORA.";2022-01-01;;;
|
||||
34;"CIUDAD MIGUEL ALEMAN, CIUDAD MIGUEL ALEMAN, TAMAULIPAS.";2022-01-01;;;
|
||||
37;"CIUDAD HIDALGO, CIUDAD HIDALGO, CHIAPAS.";2022-01-01;;;
|
||||
38;"TAMPICO, TAMPICO, TAMAULIPAS.";2022-01-01;;;
|
||||
39;"TECATE, TECATE, BAJA CALIFORNIA.";2022-01-01;;;
|
||||
40;"TIJUANA, TIJUANA, BAJA CALIFORNIA.";2022-01-01;;;
|
||||
42;"TUXPAN, TUXPAN DE RODRIGUEZ CANO, VERACRUZ.";2022-01-01;;;
|
||||
43;"VERACRUZ, VERACRUZ, VERACRUZ.";2022-01-01;;;
|
||||
44;"CIUDAD ACUÑA, CIUDAD ACUÑA, COAHUILA.";2022-01-01;;;
|
||||
46;"TORREON, TORREON, COAHUILA.";2022-01-01;;;
|
||||
47;"AEROPUERTO INTERNACIONAL DE LA CIUDAD DE MEXICO,";2022-01-01;;;
|
||||
48;"GUADALAJARA, TLACOMULCO DE ZUÑIGA, JALISCO.";2022-01-01;;;
|
||||
50;"SONOYTA, SONOYTA, SONORA.";2022-01-01;;;
|
||||
51;"LAZARO CARDENAS, LAZARO CARDENAS, MICHOACAN.";2022-01-01;;;
|
||||
52;"MONTERREY, GENERAL MARIANO ESCOBEDO, NUEVO LEON.";2022-01-01;;;
|
||||
53;"CANCUN, CANCUN, QUINTANA ROO.";2022-01-01;;;
|
||||
64;"QUERÉTARO, EL MARQUÉS Y COLON, QUERÉTARO.";2022-01-01;;;
|
||||
65;"TOLUCA, TOLUCA, ESTADO DE MEXICO.";2022-01-01;;;
|
||||
67;"CHIHUAHUA, CHIHUAHUA, CHIHUAHUA.";2022-01-01;;;
|
||||
73;"AGUASCALIENTES, AGUASCALIENTES, AGUASCALIENTES.";2022-01-01;;;
|
||||
75;"PUEBLA, HEROICA PUEBLA DE ZARAGOZA, PUEBLA.";2022-01-01;;;
|
||||
80;"COLOMBIA, COLOMBIA, NUEVO LEON.";2022-01-01;;;
|
||||
81;"ALTAMIRA, ALTAMIRA, TAMAULIPAS.";2022-01-01;;;
|
||||
82;"CIUDAD CAMARGO, CIUDAD CAMARGO, TAMAULIPAS.";2022-01-01;;;
|
||||
83;"DOS BOCAS, PARAISO, TABASCO.";2022-01-01;;;
|
||||
84;"GUANAJUATO, SILAO, GUANAJUATO.";2022-01-01;;;
|
||||
85;"AEROPUERTO INTERNACIONAL FELIPE ÁNGELES, SANTA LUCÍA, ZUMPANGO, ESTADO DE MÉXICO.";2023-01-13;;;
|
|
93
database/seeders/sat_cache/c_banco.csv
Normal file
93
database/seeders/sat_cache/c_banco.csv
Normal file
@ -0,0 +1,93 @@
|
||||
002;BANAMEX;Banco Nacional de México, S.A., Institución de Banca Múltiple, Grupo Financiero Banamex;;1
|
||||
006;BANCOMEXT;Banco Nacional de Comercio Exterior, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo;;1
|
||||
009;BANOBRAS;Banco Nacional de Obras y Servicios Públicos, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo;;1
|
||||
012;BBVA BANCOMER;BBVA Bancomer, S.A., Institución de Banca Múltiple, Grupo Financiero BBVA Bancomer;;1
|
||||
014;SANTANDER;Banco Santander (México), S.A., Institución de Banca Múltiple, Grupo Financiero Santander;;1
|
||||
019;BANJERCITO;Banco Nacional del Ejército, Fuerza Aérea y Armada, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo;;1
|
||||
021;HSBC;HSBC México, S.A., institución De Banca Múltiple, Grupo Financiero HSBC;;1
|
||||
030;BAJIO;Banco del Bajío, S.A., Institución de Banca Múltiple;;1
|
||||
032;IXE;IXE Banco, S.A., Institución de Banca Múltiple, IXE Grupo Financiero;;1
|
||||
036;INBURSA;Banco Inbursa, S.A., Institución de Banca Múltiple, Grupo Financiero Inbursa;;1
|
||||
037;INTERACCIONES;Banco Interacciones, S.A., Institución de Banca Múltiple;;1
|
||||
042;MIFEL;Banca Mifel, S.A., Institución de Banca Múltiple, Grupo Financiero Mifel;;1
|
||||
044;SCOTIABANK;Scotiabank Inverlat, S.A.;;1
|
||||
058;BANREGIO;Banco Regional de Monterrey, S.A., Institución de Banca Múltiple, Banregio Grupo Financiero;;1
|
||||
059;INVEX;Banco Invex, S.A., Institución de Banca Múltiple, Invex Grupo Financiero;;1
|
||||
060;BANSI;Bansi, S.A., Institución de Banca Múltiple;;1
|
||||
062;AFIRME;Banca Afirme, S.A., Institución de Banca Múltiple;;1
|
||||
072;BANORTE;Banco Mercantil del Norte, S.A., Institución de Banca Múltiple, Grupo Financiero Banorte;;1
|
||||
102;THE ROYAL BANK;The Royal Bank of Scotland México, S.A., Institución de Banca Múltiple;;1
|
||||
103;AMERICAN EXPRESS;American Express Bank (México), S.A., Institución de Banca Múltiple;;1
|
||||
106;BAMSA;Bank of America México, S.A., Institución de Banca Múltiple, Grupo Financiero Bank of America;;1
|
||||
108;TOKYO;Bank of Tokyo-Mitsubishi UFJ (México), S.A.;;1
|
||||
110;JP MORGAN;Banco J.P. Morgan, S.A., Institución de Banca Múltiple, J.P. Morgan Grupo Financiero;;1
|
||||
112;BMONEX;Banco Monex, S.A., Institución de Banca Múltiple;;1
|
||||
113;VE POR MAS;Banco Ve Por Mas, S.A. Institución de Banca Múltiple;;1
|
||||
116;ING;ING Bank (México), S.A., Institución de Banca Múltiple, ING Grupo Financiero;;1
|
||||
124;DEUTSCHE;Deutsche Bank México, S.A., Institución de Banca Múltiple;;1
|
||||
126;CREDIT SUISSE;Banco Credit Suisse (México), S.A. Institución de Banca Múltiple, Grupo Financiero Credit Suisse (México);;1
|
||||
127;AZTECA;Banco Azteca, S.A. Institución de Banca Múltiple.;;1
|
||||
128;AUTOFIN;Banco Autofin México, S.A. Institución de Banca Múltiple;;1
|
||||
129;BARCLAYS;Barclays Bank México, S.A., Institución de Banca Múltiple, Grupo Financiero Barclays México;;1
|
||||
130;COMPARTAMOS;Banco Compartamos, S.A., Institución de Banca Múltiple;;1
|
||||
131;BANCO FAMSA;Banco Ahorro Famsa, S.A., Institución de Banca Múltiple;;1
|
||||
132;BMULTIVA;Banco Multiva, S.A., Institución de Banca Múltiple, Multivalores Grupo Financiero;;1
|
||||
133;ACTINVER;Banco Actinver, S.A. Institución de Banca Múltiple, Grupo Financiero Actinver;;1
|
||||
134;WAL-MART;Banco Wal-Mart de México Adelante, S.A., Institución de Banca Múltiple;;1
|
||||
135;NAFIN;Nacional Financiera, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo;;1
|
||||
136;INTERBANCO;Inter Banco, S.A. Institución de Banca Múltiple;;1
|
||||
137;BANCOPPEL;BanCoppel, S.A., Institución de Banca Múltiple;;1
|
||||
138;ABC CAPITAL;ABC Capital, S.A., Institución de Banca Múltiple;;1
|
||||
139;UBS BANK;UBS Bank México, S.A., Institución de Banca Múltiple, UBS Grupo Financiero;;1
|
||||
140;CONSUBANCO;Consubanco, S.A. Institución de Banca Múltiple;;1
|
||||
141;VOLKSWAGEN;Volkswagen Bank, S.A., Institución de Banca Múltiple;;1
|
||||
143;CIBANCO;CIBanco, S.A.;;1
|
||||
145;BBASE;Banco Base, S.A., Institución de Banca Múltiple;;1
|
||||
166;BANSEFI;Banco del Ahorro Nacional y Servicios Financieros, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo;;1
|
||||
168;HIPOTECARIA FEDERAL;Sociedad Hipotecaria Federal, Sociedad Nacional de Crédito, Institución de Banca de Desarrollo;;1
|
||||
600;MONEXCB;Monex Casa de Bolsa, S.A. de C.V. Monex Grupo Financiero;;1
|
||||
601;GBM;GBM Grupo Bursátil Mexicano, S.A. de C.V. Casa de Bolsa;;1
|
||||
602;MASARI;Masari Casa de Bolsa, S.A.;;1
|
||||
605;VALUE;Value, S.A. de C.V. Casa de Bolsa;;1
|
||||
606;ESTRUCTURADORES;Estructuradores del Mercado de Valores Casa de Bolsa, S.A. de C.V.;;1
|
||||
607;TIBER;Casa de Cambio Tiber, S.A. de C.V.;;1
|
||||
608;VECTOR;Vector Casa de Bolsa, S.A. de C.V.;;1
|
||||
610;B&B;B y B, Casa de Cambio, S.A. de C.V.;;1
|
||||
614;ACCIVAL;Acciones y Valores Banamex, S.A. de C.V., Casa de Bolsa;;1
|
||||
615;MERRILL LYNCH;Merrill Lynch México, S.A. de C.V. Casa de Bolsa;;1
|
||||
616;FINAMEX;Casa de Bolsa Finamex, S.A. de C.V.;;1
|
||||
617;VALMEX;Valores Mexicanos Casa de Bolsa, S.A. de C.V.;;1
|
||||
618;UNICA;Unica Casa de Cambio, S.A. de C.V.;;1
|
||||
619;MAPFRE;MAPFRE Tepeyac, S.A.;;1
|
||||
620;PROFUTURO;Profuturo G.N.P., S.A. de C.V., Afore;;1
|
||||
621;CB ACTINVER;Actinver Casa de Bolsa, S.A. de C.V.;;1
|
||||
622;OACTIN;OPERADORA ACTINVER, S.A. DE C.V.;;1
|
||||
623;SKANDIA;Skandia Vida, S.A. de C.V.;;1
|
||||
626;CBDEUTSCHE;Deutsche Securities, S.A. de C.V. CASA DE BOLSA;;1
|
||||
627;ZURICH;Zurich Compañía de Seguros, S.A.;;1
|
||||
628;ZURICHVI;Zurich Vida, Compañía de Seguros, S.A.;;1
|
||||
629;SU CASITA;Hipotecaria Su Casita, S.A. de C.V. SOFOM ENR;;1
|
||||
630;CB INTERCAM;Intercam Casa de Bolsa, S.A. de C.V.;;1
|
||||
631;CI BOLSA;CI Casa de Bolsa, S.A. de C.V.;;1
|
||||
632;BULLTICK CB;Bulltick Casa de Bolsa, S.A., de C.V.;;1
|
||||
633;STERLING;Sterling Casa de Cambio, S.A. de C.V.;;1
|
||||
634;FINCOMUN;Fincomún, Servicios Financieros Comunitarios, S.A. de C.V.;;1
|
||||
636;HDI SEGUROS;HDI Seguros, S.A. de C.V.;;1
|
||||
637;ORDER;Order Express Casa de Cambio, S.A. de C.V;;1
|
||||
638;AKALA;Akala, S.A. de C.V., Sociedad Financiera Popular;;1
|
||||
640;CB JPMORGAN;J.P. Morgan Casa de Bolsa, S.A. de C.V. J.P. Morgan Grupo Financiero;;1
|
||||
642;REFORMA;Operadora de Recursos Reforma, S.A. de C.V., S.F.P.;;1
|
||||
646;STP;Sistema de Transferencias y Pagos STP, S.A. de C.V.SOFOM ENR;;1
|
||||
647;TELECOMM;Telecomunicaciones de México;;1
|
||||
648;EVERCORE;Evercore Casa de Bolsa, S.A. de C.V.;;1
|
||||
649;SKANDIA;Skandia Operadora de Fondos, S.A. de C.V.;;1
|
||||
651;SEGMTY;Seguros Monterrey New York Life, S.A de C.V;;1
|
||||
652;ASEA;Solución Asea, S.A. de C.V., Sociedad Financiera Popular;;1
|
||||
653;KUSPIT;Kuspit Casa de Bolsa, S.A. de C.V.;;1
|
||||
655;SOFIEXPRESS;J.P. SOFIEXPRESS, S.A. de C.V., S.F.P.;;1
|
||||
656;UNAGRA;UNAGRA, S.A. de C.V., S.F.P.;;1
|
||||
659;OPCIONES EMPRESARIALES DEL NOROESTE;OPCIONES EMPRESARIALES DEL NORESTE, S.A. DE C.V., S.F.P.;;1
|
||||
901;CLS;Cls Bank International;;1
|
||||
902;INDEVAL;SD. Indeval, S.A. de C.V.;;1
|
||||
670;LIBERTAD;Libertad Servicios Financieros, S.A. De C.V.;;1
|
||||
999;N/A;;;1
|
|
52513
database/seeders/sat_cache/c_claveprodserv.csv
Normal file
52513
database/seeders/sat_cache/c_claveprodserv.csv
Normal file
File diff suppressed because it is too large
Load Diff
2442
database/seeders/sat_cache/c_claveunidad.csv
Normal file
2442
database/seeders/sat_cache/c_claveunidad.csv
Normal file
File diff suppressed because it is too large
Load Diff
95748
database/seeders/sat_cache/c_codigopostal.csv
Normal file
95748
database/seeders/sat_cache/c_codigopostal.csv
Normal file
File diff suppressed because it is too large
Load Diff
145366
database/seeders/sat_cache/c_colonia.csv
Normal file
145366
database/seeders/sat_cache/c_colonia.csv
Normal file
File diff suppressed because it is too large
Load Diff
107
database/seeders/sat_cache/c_deduccion.csv
Normal file
107
database/seeders/sat_cache/c_deduccion.csv
Normal file
@ -0,0 +1,107 @@
|
||||
001;Seguridad social
|
||||
002;ISR
|
||||
003;Aportaciones a retiro, cesantía en edad avanzada y vejez.
|
||||
004;Otros
|
||||
005;Aportaciones a Fondo de vivienda
|
||||
006;Descuento por incapacidad
|
||||
007;Pensión alimenticia
|
||||
008;Renta
|
||||
009;Préstamos provenientes del Fondo Nacional de la Vivienda para los Trabajadores
|
||||
010;Pago por crédito de vivienda
|
||||
011;Pago de abonos INFONACOT
|
||||
012;Anticipo de salarios
|
||||
013;Pagos hechos con exceso al trabajador
|
||||
014;Errores
|
||||
015;Pérdidas
|
||||
016;Averías
|
||||
017;Adquisición de artículos producidos por la empresa o establecimiento
|
||||
018;Cuotas para la constitución y fomento de sociedades cooperativas y de cajas de ahorro
|
||||
019;Cuotas sindicales
|
||||
020;Ausencia (Ausentismo)
|
||||
021;Cuotas obrero patronales
|
||||
022;Impuestos Locales
|
||||
023;Aportaciones voluntarias
|
||||
024;Ajuste en Gratificación Anual (Aguinaldo) Exento
|
||||
025;Ajuste en Gratificación Anual (Aguinaldo) Gravado
|
||||
026;Ajuste en Participación de los Trabajadores en las Utilidades PTU Exento
|
||||
027;Ajuste en Participación de los Trabajadores en las Utilidades PTU Gravado
|
||||
028;Ajuste en Reembolso de Gastos Médicos Dentales y Hospitalarios Exento
|
||||
029;Ajuste en Fondo de ahorro Exento
|
||||
030;Ajuste en Caja de ahorro Exento
|
||||
031;Ajuste en Contribuciones a Cargo del Trabajador Pagadas por el Patrón Exento
|
||||
032;Ajuste en Premios por puntualidad Gravado
|
||||
033;Ajuste en Prima de Seguro de vida Exento
|
||||
034;Ajuste en Seguro de Gastos Médicos Mayores Exento
|
||||
035;Ajuste en Cuotas Sindicales Pagadas por el Patrón Exento
|
||||
036;Ajuste en Subsidios por incapacidad Exento
|
||||
037;Ajuste en Becas para trabajadores y/o hijos Exento
|
||||
038;Ajuste en Horas extra Exento
|
||||
039;Ajuste en Horas extra Gravado
|
||||
040;Ajuste en Prima dominical Exento
|
||||
041;Ajuste en Prima dominical Gravado
|
||||
042;Ajuste en Prima vacacional Exento
|
||||
043;Ajuste en Prima vacacional Gravado
|
||||
044;Ajuste en Prima por antigüedad Exento
|
||||
045;Ajuste en Prima por antigüedad Gravado
|
||||
046;Ajuste en Pagos por separación Exento
|
||||
047;Ajuste en Pagos por separación Gravado
|
||||
048;Ajuste en Seguro de retiro Exento
|
||||
049;Ajuste en Indemnizaciones Exento
|
||||
050;Ajuste en Indemnizaciones Gravado
|
||||
051;Ajuste en Reembolso por funeral Exento
|
||||
052;Ajuste en Cuotas de seguridad social pagadas por el patrón Exento
|
||||
053;Ajuste en Comisiones Gravado
|
||||
054;Ajuste en Vales de despensa Exento
|
||||
055;Ajuste en Vales de restaurante Exento
|
||||
056;Ajuste en Vales de gasolina Exento
|
||||
057;Ajuste en Vales de ropa Exento
|
||||
058;Ajuste en Ayuda para renta Exento
|
||||
059;Ajuste en Ayuda para artículos escolares Exento
|
||||
060;Ajuste en Ayuda para anteojos Exento
|
||||
061;Ajuste en Ayuda para transporte Exento
|
||||
062;Ajuste en Ayuda para gastos de funeral Exento
|
||||
063;Ajuste en Otros ingresos por salarios Exento
|
||||
064;Ajuste en Otros ingresos por salarios Gravado
|
||||
065;Ajuste en Jubilaciones, pensiones o haberes de retiro en una sola exhibición Exento
|
||||
066;Ajuste en Jubilaciones, pensiones o haberes de retiro en una sola exhibición Gravado
|
||||
067;Ajuste en Pagos por separación Acumulable
|
||||
068;Ajuste en Pagos por separación No acumulable
|
||||
069;Ajuste en Jubilaciones, pensiones o haberes de retiro en parcialidades Exento
|
||||
070;Ajuste en Jubilaciones, pensiones o haberes de retiro en parcialidades Gravado
|
||||
071;Ajuste en Subsidio para el empleo (efectivamente entregado al trabajador)
|
||||
072;Ajuste en Ingresos en acciones o títulos valor que representan bienes Exento
|
||||
073;Ajuste en Ingresos en acciones o títulos valor que representan bienes Gravado
|
||||
074;Ajuste en Alimentación Exento
|
||||
075;Ajuste en Alimentación Gravado
|
||||
076;Ajuste en Habitación Exento
|
||||
077;Ajuste en Habitación Gravado
|
||||
078;Ajuste en Premios por asistencia
|
||||
079;Ajuste en Pagos distintos a los listados y que no deben considerarse como ingreso por sueldos, salarios o ingresos asimilados.
|
||||
080;Ajuste en Viáticos gravados
|
||||
081;Ajuste en Viáticos (entregados al trabajador)
|
||||
082;Ajuste en Fondo de ahorro Gravado
|
||||
083;Ajuste en Caja de ahorro Gravado
|
||||
084;Ajuste en Prima de Seguro de vida Gravado
|
||||
085;Ajuste en Seguro de Gastos Médicos Mayores Gravado
|
||||
086;Ajuste en Subsidios por incapacidad Gravado
|
||||
087;Ajuste en Becas para trabajadores y/o hijos Gravado
|
||||
088;Ajuste en Seguro de retiro Gravado
|
||||
089;Ajuste en Vales de despensa Gravado
|
||||
090;Ajuste en Vales de restaurante Gravado
|
||||
091;Ajuste en Vales de gasolina Gravado
|
||||
092;Ajuste en Vales de ropa Gravado
|
||||
093;Ajuste en Ayuda para renta Gravado
|
||||
094;Ajuste en Ayuda para artículos escolares Gravado
|
||||
095;Ajuste en Ayuda para anteojos Gravado
|
||||
096;Ajuste en Ayuda para transporte Gravado
|
||||
097;Ajuste en Ayuda para gastos de funeral Gravado
|
||||
098;Ajuste a ingresos asimilados a salarios gravados
|
||||
099;Ajuste a ingresos por sueldos y salarios gravados
|
||||
100;Ajuste en Viáticos exentos
|
||||
101;ISR Retenido de ejercicio anterior
|
||||
102;Ajuste a pagos por gratificaciones, primas, compensaciones, recompensas u otros a extrabajadores derivados de jubilación en parcialidades, gravados
|
||||
103;Ajuste a pagos que se realicen a extrabajadores que obtengan una jubilación en parcialidades derivados de la ejecución de una resolución judicial o de un laudo gravados
|
||||
104;Ajuste a pagos que se realicen a extrabajadores que obtengan una jubilación en parcialidades derivados de la ejecución de una resolución judicial o de un laudo exentos
|
||||
105;Ajuste a pagos que se realicen a extrabajadores que obtengan una jubilación en una sola exhibición derivados de la ejecución de una resolución judicial o de un laudo gravados
|
||||
106;Ajuste a pagos que se realicen a extrabajadores que obtengan una jubilación en una sola exhibición derivados de la ejecución de una resolución judicial o de un laudo exentos
|
||||
107;Ajuste al Subsidio Causado
|
|
95
database/seeders/sat_cache/c_estado.csv
Normal file
95
database/seeders/sat_cache/c_estado.csv
Normal file
@ -0,0 +1,95 @@
|
||||
AGU;MEX;Aguascalientes;2022-01-01;;
|
||||
BCN;MEX;"Baja California";2022-01-01;;
|
||||
BCS;MEX;"Baja California Sur";2022-01-01;;
|
||||
CAM;MEX;Campeche;2022-01-01;;
|
||||
CHP;MEX;Chiapas;2022-01-01;;
|
||||
CHH;MEX;Chihuahua;2022-01-01;;
|
||||
COA;MEX;Coahuila;2022-01-01;;
|
||||
COL;MEX;Colima;2022-01-01;;
|
||||
CMX;MEX;"Ciudad de México";2022-01-01;;
|
||||
DUR;MEX;Durango;2022-01-01;;
|
||||
GUA;MEX;Guanajuato;2022-01-01;;
|
||||
GRO;MEX;Guerrero;2022-01-01;;
|
||||
HID;MEX;Hidalgo;2022-01-01;;
|
||||
JAL;MEX;Jalisco;2022-01-01;;
|
||||
MEX;MEX;"Estado de México";2022-01-01;;
|
||||
MIC;MEX;Michoacán;2022-01-01;;
|
||||
MOR;MEX;Morelos;2022-01-01;;
|
||||
NAY;MEX;Nayarit;2022-01-01;;
|
||||
NLE;MEX;"Nuevo León";2022-01-01;;
|
||||
OAX;MEX;Oaxaca;2022-01-01;;
|
||||
PUE;MEX;Puebla;2022-01-01;;
|
||||
QUE;MEX;Querétaro;2022-01-01;;
|
||||
ROO;MEX;"Quintana Roo";2022-01-01;;
|
||||
SLP;MEX;"San Luis Potosí";2022-01-01;;
|
||||
SIN;MEX;Sinaloa;2022-01-01;;
|
||||
SON;MEX;Sonora;2022-01-01;;
|
||||
TAB;MEX;Tabasco;2022-01-01;;
|
||||
TAM;MEX;Tamaulipas;2022-01-01;;
|
||||
TLA;MEX;Tlaxcala;2022-01-01;;
|
||||
VER;MEX;Veracruz;2022-01-01;;
|
||||
YUC;MEX;Yucatán;2022-01-01;;
|
||||
ZAC;MEX;Zacatecas;2022-01-01;;
|
||||
AL;USA;Alabama;2022-01-01;;
|
||||
AK;USA;Alaska;2022-01-01;;
|
||||
AZ;USA;Arizona;2022-01-01;;
|
||||
AR;USA;Arkansas;2022-01-01;;
|
||||
CA;USA;California;2022-01-01;;
|
||||
NC;USA;"Carolina del Norte";2022-01-01;;
|
||||
SC;USA;"Carolina del Sur";2022-01-01;;
|
||||
CO;USA;Colorado;2022-01-01;;
|
||||
CT;USA;Connecticut;2022-01-01;;
|
||||
ND;USA;"Dakota del Norte";2022-01-01;;
|
||||
SD;USA;"Dakota del Sur";2022-01-01;;
|
||||
DE;USA;Delaware;2022-01-01;;
|
||||
FL;USA;Florida;2022-01-01;;
|
||||
GA;USA;Georgia;2022-01-01;;
|
||||
HI;USA;Hawái;2022-01-01;;
|
||||
ID;USA;Idaho;2022-01-01;;
|
||||
IL;USA;Illinois;2022-01-01;;
|
||||
IN;USA;Indiana;2022-01-01;;
|
||||
IA;USA;Iowa;2022-01-01;;
|
||||
KS;USA;Kansas;2022-01-01;;
|
||||
KY;USA;Kentucky;2022-01-01;;
|
||||
LA;USA;Luisiana;2022-01-01;;
|
||||
ME;USA;Maine;2022-01-01;;
|
||||
MD;USA;Maryland;2022-01-01;;
|
||||
MA;USA;Massachusetts;2022-01-01;;
|
||||
MI;USA;Míchigan;2022-01-01;;
|
||||
MN;USA;Minnesota;2022-01-01;;
|
||||
MS;USA;Misisipi;2022-01-01;;
|
||||
MO;USA;Misuri;2022-01-01;;
|
||||
MT;USA;Montana;2022-01-01;;
|
||||
NE;USA;Nebraska;2022-01-01;;
|
||||
NV;USA;Nevada;2022-01-01;;
|
||||
NJ;USA;"Nueva Jersey";2022-01-01;;
|
||||
NY;USA;"Nueva York";2022-01-01;;
|
||||
NH;USA;"Nuevo Hampshire";2022-01-01;;
|
||||
NM;USA;"Nuevo México";2022-01-01;;
|
||||
OH;USA;Ohio;2022-01-01;;
|
||||
OK;USA;Oklahoma;2022-01-01;;
|
||||
OR;USA;Oregón;2022-01-01;;
|
||||
PA;USA;Pensilvania;2022-01-01;;
|
||||
RI;USA;"Rhode Island";2022-01-01;;
|
||||
TN;USA;Tennessee;2022-01-01;;
|
||||
TX;USA;Texas;2022-01-01;;
|
||||
UT;USA;Utah;2022-01-01;;
|
||||
VT;USA;Vermont;2022-01-01;;
|
||||
VA;USA;Virginia;2022-01-01;;
|
||||
WV;USA;"Virginia Occidental";2022-01-01;;
|
||||
WA;USA;Washington;2022-01-01;;
|
||||
WI;USA;Wisconsin;2022-01-01;;
|
||||
WY;USA;Wyoming;2022-01-01;;
|
||||
ON;CAN;Ontario ;2022-01-01;;
|
||||
QC;CAN; Quebec ;2022-01-01;;
|
||||
NS;CAN;" Nueva Escocia";2022-01-01;;
|
||||
NB;CAN;"Nuevo Brunswick ";2022-01-01;;
|
||||
MB;CAN; Manitoba;2022-01-01;;
|
||||
BC;CAN;" Columbia Británica";2022-01-01;;
|
||||
PE;CAN;" Isla del Príncipe Eduardo";2022-01-01;;
|
||||
SK;CAN; Saskatchewan;2022-01-01;;
|
||||
AB;CAN; Alberta;2022-01-01;;
|
||||
NL;CAN;" Terranova y Labrador";2022-01-01;;
|
||||
NT;CAN;" Territorios del Noroeste";2022-01-01;;
|
||||
YT;CAN; Yukón;2022-01-01;;
|
||||
UN;CAN; Nunavut;2022-01-01;;
|
|
22
database/seeders/sat_cache/c_formapago.csv
Normal file
22
database/seeders/sat_cache/c_formapago.csv
Normal file
@ -0,0 +1,22 @@
|
||||
1;Efectivo;No;Opcional;"""=IF(C7=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C7=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C7=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A7=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C7=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
2;"Cheque nominativo";Sí;Opcional;Opcional;Opcional;[0-9]{11}|[0-9]{18};Opcional;Opcional;[0-9]{10,11}|[0-9]{15,16}|[0-9]{18}|[A-Z0-9_]{10,50};No;"Si el RFC del emisor de la cuenta ordenante es XEXX010101000, este campo es obligatorio.";2022-01-01;
|
||||
3;"Transferencia electrónica de fondos";Sí;Opcional;Opcional;Opcional;[0-9]{10}|[0-9]{16}|[0-9]{18};Opcional;Opcional;[0-9]{10}|[0-9]{18};Opcional;"Si el RFC del emisor de la cuenta ordenante es XEXX010101000, este campo es obligatorio.";2022-01-01;
|
||||
4;"Tarjeta de crédito";Sí;Opcional;Opcional;Opcional;[0-9]{16};Opcional;Opcional;[0-9]{10,11}|[0-9]{15,16}|[0-9]{18}|[A-Z0-9_]{10,50};No;"Si el RFC del emisor de la cuenta ordenante es XEXX010101000, este campo es obligatorio.";2022-01-01;
|
||||
5;"Monedero electrónico";Sí;Opcional;Opcional;Opcional;[0-9]{10,11}|[0-9]{15,16}|[0-9]{18}|[A-Z0-9_]{10,50};Opcional;Opcional;[0-9]{10,11}|[0-9]{15,16}|[0-9]{18}|[A-Z0-9_]{10,50};No;No;2022-01-01;
|
||||
6;"Dinero electrónico";Sí;Opcional;Opcional;Opcional;[0-9]{10};No;No;No;No;No;2022-01-01;
|
||||
8;"Vales de despensa";No;Opcional;"""=IF(C13=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C13=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C13=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A13=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C13=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
12;"Dación en pago";No;Opcional;"""=IF(C14=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C14=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C14=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A14=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C14=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
13;"Pago por subrogación";No;Opcional;"""=IF(C15=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C15=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C15=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A15=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C15=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
14;"Pago por consignación";No;Opcional;"""=IF(C16=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C16=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C16=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A16=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C16=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
15;Condonación;No;Opcional;"""=IF(C17=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C17=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C17=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A17=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C17=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
17;Compensación;No;Opcional;"""=IF(C18=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C18=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C18=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A18=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C18=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
23;Novación;No;Opcional;"""=IF(C19=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C19=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C19=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A19=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C19=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
24;Confusión;No;Opcional;"""=IF(C20=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C20=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C20=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A20=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C20=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
25;"Remisión de deuda";No;Opcional;"""=IF(C21=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C21=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C21=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A21=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C21=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
26;"Prescripción o caducidad";No;Opcional;"""=IF(C22=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C22=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C22=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A22=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C22=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
27;"A satisfacción del acreedor";No;Opcional;"""=IF(C23=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(C23=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C23=""""Sí"""",""""Sí"""",""""No"""")""";"""=IF(A23=""""Sí"""",""""Sí"""",""""No"""")""";No;"""=IF(C23=""""Sí"""",""""Sí"""",""""No"""")""";No;2022-01-01;
|
||||
28;"Tarjeta de débito";Sí;Opcional;Opcional;Opcional;[0-9]{16};Opcional;Opcional;[0-9]{10,11}|[0-9]{15,16}|[0-9]{18}|[A-Z0-9_]{10,50};No;"Si el RFC del emisor de la cuenta ordenante es XEXX010101000, este campo es obligatorio.";2022-01-01;
|
||||
29;"Tarjeta de servicios";Sí;Opcional;Opcional;Opcional;[0-9]{15,16};Opcional;Opcional;[0-9]{10,11}|[0-9]{15,16}|[0-9]{18}|[A-Z0-9_]{10,50};No;"Si el RFC del emisor de la cuenta ordenante es XEXX010101000, este campo es obligatorio.";2022-01-01;
|
||||
30;"Aplicación de anticipos";No;Opcional;No;No;No;No;No;No;No;No;2022-01-01;
|
||||
31;"Intermediario pagos";No;Opcional;No;No;No;No;No;No;No;No;2022-01-01;
|
||||
99;"Por definir";Opcional;Opcional;Opcional;Opcional;Opcional;Opcional;Opcional;Opcional;Opcional;Opcional;2022-01-01;
|
|
664
database/seeders/sat_cache/c_localidad.csv
Normal file
664
database/seeders/sat_cache/c_localidad.csv
Normal file
@ -0,0 +1,664 @@
|
||||
01;AGU;Aguascalientes;2022-01-01;;
|
||||
01;BCN;Ensenada;2022-01-01;;
|
||||
01;BCS;"Ciudad Constitución";2022-01-01;;
|
||||
01;CAM;"San Francisco de Campeche";2022-01-01;;
|
||||
01;COA;"Ciudad Acuña";2022-01-01;;
|
||||
01;COL;Colima;2022-01-01;;
|
||||
01;CHH;"Santa Rosalía de Camargo";2022-01-01;;
|
||||
01;CHP;"Comitán de Domínguez";2022-01-01;;
|
||||
01;CMX;"Ciudad de México";2022-01-01;;
|
||||
01;DUR;"Victoria de Durango";2022-01-01;;
|
||||
01;GRO;"Acapulco de Juárez";2022-01-01;;
|
||||
01;GUA;Acámbaro;2022-01-01;;
|
||||
01;HID;Actopan;2022-01-01;;
|
||||
01;JAL;Ameca;2022-01-01;;
|
||||
01;MEX;"Ciudad Adolfo López Mateos";2022-01-01;;
|
||||
01;MIC;"Apatzingán de la Constitución";2022-01-01;;
|
||||
01;MOR;"Cuautla (Cuautla de Morelos)";2022-01-01;;
|
||||
01;NAY;"Santiago Ixcuintla";2022-01-01;;
|
||||
01;NLE;"Ciudad Apodaca";2022-01-01;;
|
||||
01;OAX;"Juchitán (Juchitán de Zaragoza)";2022-01-01;;
|
||||
01;PUE;Atlixco;2022-01-01;;
|
||||
01;QUE;Querétaro;2022-01-01;;
|
||||
01;ROO;Cancún;2022-01-01;;
|
||||
01;SIN;"Los Mochis";2022-01-01;;
|
||||
01;SLP;"Ciudad Valles";2022-01-01;;
|
||||
01;SON;"San Luis Río Colorado";2022-01-01;;
|
||||
01;TAB;Cárdenas;2022-01-01;;
|
||||
01;TAM;Altamira;2022-01-01;;
|
||||
01;TLA;Apizaco;2022-01-01;;
|
||||
01;VER;Acayucan;2022-01-01;;
|
||||
01;YUC;Mérida;2022-01-01;;
|
||||
01;ZAC;Fresnillo;2022-01-01;;
|
||||
02;AGU;Calvillo;2022-01-01;;
|
||||
02;BCN;Mexicali;2022-01-01;;
|
||||
02;BCS;"La Paz";2022-01-01;;
|
||||
02;CAM;"Ciudad del Carmen";2022-01-01;;
|
||||
02;COA;Frontera;2022-01-01;;
|
||||
02;COL;Manzanillo;2022-01-01;;
|
||||
02;CHH;Chihuahua;2022-01-01;;
|
||||
02;CHP;"San Cristóbal de las Casas";2022-01-01;;
|
||||
02;CMX;"Ciudad de México";2022-01-01;;
|
||||
02;DUR;"Gómez Palacio";2022-01-01;;
|
||||
02;GRO;"Chilpancingo de los Bravo";2022-01-01;;
|
||||
02;GUA;"San miguel de Allende";2022-01-01;;
|
||||
02;HID;Apan;2022-01-01;;
|
||||
02;JAL;"Ciudad Guzmán";2022-01-01;;
|
||||
02;MEX;Chimalhuacán;2022-01-01;;
|
||||
02;MIC;"Los Reyes de Salgado";2022-01-01;;
|
||||
02;MOR;Cuernavaca;2022-01-01;;
|
||||
02;NAY;Tepic;2022-01-01;;
|
||||
02;NLE;"San Pedro Garza García";2022-01-01;;
|
||||
02;OAX;"Oaxaca de Juárez";2022-01-01;;
|
||||
02;PUE;"Izúcar de Matamoros";2022-01-01;;
|
||||
02;QUE;"San Juan del Rio";2022-01-01;;
|
||||
02;ROO;Cozumel;2022-01-01;;
|
||||
02;SIN;"Culiacán Rosales";2022-01-01;;
|
||||
02;SLP;Ébano;2022-01-01;;
|
||||
02;SON;"Agua Prieta";2022-01-01;;
|
||||
02;TAB;Villahermosa;2022-01-01;;
|
||||
02;TAM;"Ciudad Camargo";2022-01-01;;
|
||||
02;TLA;"Villa Vicente Guerrero";2022-01-01;;
|
||||
02;VER;Naranjos;2022-01-01;;
|
||||
02;YUC;Tizimín;2022-01-01;;
|
||||
02;ZAC;"Jerez de García Salinas";2022-01-01;;
|
||||
03;AGU;"San Francisco de los Romo";2022-01-01;;
|
||||
03;BCN;Tecate;2022-01-01;;
|
||||
03;BCS;"Cabo San Lucas";2022-01-01;;
|
||||
03;CAM;Calkiní;2022-01-01;;
|
||||
03;COA;Matamoros;2022-01-01;;
|
||||
03;COL;Tecoman;2022-01-01;;
|
||||
03;CHH;Cuauhtémoc;2022-01-01;;
|
||||
03;CHP;"Tapachula de Córdova y Ordóñez";2022-01-01;;
|
||||
03;CMX;"Ciudad de México";2022-01-01;;
|
||||
03;DUR;"Ciudad Lerdo";2022-01-01;;
|
||||
03;GRO;"Iguala de la Independencia";2022-01-01;;
|
||||
03;GUA;Celaya;2022-01-01;;
|
||||
03;HID;"Pachuca de Soto";2022-01-01;;
|
||||
03;JAL;Guadalajara;2022-01-01;;
|
||||
03;MEX;"Coacalco de Berriozabal";2022-01-01;;
|
||||
03;MIC;"Ciudad Hidalgo";2022-01-01;;
|
||||
03;MOR;Galeana;2022-01-01;;
|
||||
03;NAY;Tuxpan;2022-01-01;;
|
||||
03;NLE;"Ciudad General Escobedo";2022-01-01;;
|
||||
03;OAX;"Salina Cruz";2022-01-01;;
|
||||
03;PUE;"Puebla (Heroica Puebla)";2022-01-01;;
|
||||
03;ROO;"Felipe Carrillo Puerto";2022-01-01;;
|
||||
03;SIN;"Escuinapa de Hidalgo";2022-01-01;;
|
||||
03;SLP;Matehuala;2022-01-01;;
|
||||
03;SON;"Heroica Caborca";2022-01-01;;
|
||||
03;TAB;Comalcalco;2022-01-01;;
|
||||
03;TAM;"Ciudad Madero";2022-01-01;;
|
||||
03;TLA;"Tlaxcala (Tlaxcala de Xicotencatl)";2022-01-01;;
|
||||
03;VER;"Boca del RÍo";2022-01-01;;
|
||||
03;YUC;Ticul;2022-01-01;;
|
||||
03;ZAC;Zacatecas;2022-01-01;;
|
||||
04;AGU;"Jesús María";2022-01-01;;
|
||||
04;BCN;Tijuana;2022-01-01;;
|
||||
04;BCS;"San José del Cabo";2022-01-01;;
|
||||
04;CAM;Candelaria;2022-01-01;;
|
||||
04;COA;Monclova;2022-01-01;;
|
||||
04;COL;"Ciudad de Villa de Álvarez";2022-01-01;;
|
||||
04;CHH;Delicias;2022-01-01;;
|
||||
04;CHP;"Tuxtla Gutiérrez";2022-01-01;;
|
||||
04;CMX;"Ciudad de México";2022-01-01;;
|
||||
04;DUR;"Santiago Papasquiaro";2022-01-01;;
|
||||
04;GRO;"Taxco de Alarcón";2022-01-01;;
|
||||
04;GUA;Cortazar;2022-01-01;;
|
||||
04;HID;"Cd. de Fray Bernardino de Sahagún";2022-01-01;;
|
||||
04;JAL;"Lagos de Moreno";2022-01-01;;
|
||||
04;MEX;"Cuautitlán Izcalli";2022-01-01;;
|
||||
04;MIC;"Jacona de Plancarte";2022-01-01;;
|
||||
04;MOR;Jojutla;2022-01-01;;
|
||||
04;NAY;Acaponeta;2022-01-01;;
|
||||
04;NLE;Guadalupe;2022-01-01;;
|
||||
04;OAX;"San Juan Bautista Tuxtepec";2022-01-01;;
|
||||
04;PUE;"San Martín Texmelucan de Labastida";2022-01-01;;
|
||||
04;QUE;"El Pueblito";2022-01-01;;
|
||||
04;ROO;Chetumal;2022-01-01;;
|
||||
04;SIN;Guasave;2022-01-01;;
|
||||
04;SLP;Rioverde;2022-01-01;;
|
||||
04;SON;"Ciudad Obregón";2022-01-01;;
|
||||
04;TAB;"Emiliano Zapata";2022-01-01;;
|
||||
04;TAM;"Ciudad Mante";2022-01-01;;
|
||||
04;TLA;Huamantla;2022-01-01;;
|
||||
04;VER;Coatepec;2022-01-01;;
|
||||
04;YUC;"Motul de Carrillo Puerto";2022-01-01;;
|
||||
04;ZAC;Guadalupe;2022-01-01;;
|
||||
05;AGU;"Pabellón de Arteaga";2022-01-01;;
|
||||
05;BCN;"Playas de Rosarito";2022-01-01;;
|
||||
05;BCS;Loreto;2022-01-01;;
|
||||
05;CAM;Escárcega;2022-01-01;;
|
||||
05;COA;"Parras de la Fuente";2022-01-01;;
|
||||
05;COL;"Ciudad de Armería";2022-01-01;;
|
||||
05;CHH;"Hidalgo del Parral";2022-01-01;;
|
||||
05;CHP;"Venustiano Carranza";2022-01-01;;
|
||||
05;CMX;"Ciudad de México";2022-01-01;;
|
||||
05;DUR;Canatlán;2022-01-01;;
|
||||
05;GRO;Arcelia;2022-01-01;;
|
||||
05;GUA;Guanajuato;2022-01-01;;
|
||||
05;HID;"Tula de Allende";2022-01-01;;
|
||||
05;JAL;Ocotlán;2022-01-01;;
|
||||
05;MEX;"Ecatepec de Morelos";2022-01-01;;
|
||||
05;MIC;"La piedad de Cabadas";2022-01-01;;
|
||||
05;MOR;"Puente de Ixtla";2022-01-01;;
|
||||
05;NAY;Tecuala;2022-01-01;;
|
||||
05;NLE;Linares;2022-01-01;;
|
||||
05;OAX;"Matías Romero Avendaño";2022-01-01;;
|
||||
05;PUE;Tehuacan;2022-01-01;;
|
||||
05;ROO;"Playa del Carmen";2022-01-01;;
|
||||
05;SIN;Mazatlán;2022-01-01;;
|
||||
05;SLP;"San Luis Potosí";2022-01-01;;
|
||||
05;SON;Empalme;2022-01-01;;
|
||||
05;TAB;"Jalpa de Méndez";2022-01-01;;
|
||||
05;TAM;"Heroica Matamoros";2022-01-01;;
|
||||
05;TLA;Calpulalpan;2022-01-01;;
|
||||
05;VER;"Agua dulce";2022-01-01;;
|
||||
05;YUC;Valladolid;2022-01-01;;
|
||||
05;ZAC;"Río Grande";2022-01-01;;
|
||||
06;AGU;"Rincón de Romos";2022-01-01;;
|
||||
06;BCN;"Rodolfo Sánchez T. (Maneadero)";2022-01-01;;
|
||||
06;BCS;"Puerto Adolfo López Mateos";2022-01-01;;
|
||||
06;CAM;Sabancuy;2022-01-01;;
|
||||
06;COA;"Piedras Negras";2022-01-01;;
|
||||
06;CHH;Juárez;2022-01-01;;
|
||||
06;CHP;Jiquipilas;2022-01-01;;
|
||||
06;CMX;"Ciudad de México";2022-01-01;;
|
||||
06;DUR;"San Juan del Río del Centauro del Norte";2022-01-01;;
|
||||
06;GRO;"Ayutla de los Libres";2022-01-01;;
|
||||
06;GUA;Irapuato;2022-01-01;;
|
||||
06;HID;Tulancingo;2022-01-01;;
|
||||
06;JAL;"Puerto Vallarta";2022-01-01;;
|
||||
06;MEX;"Huixquilucan de Degollado";2022-01-01;;
|
||||
06;MIC;Morelia;2022-01-01;;
|
||||
06;MOR;"Santa Rosa Treinta";2022-01-01;;
|
||||
06;NAY;Compostela;2022-01-01;;
|
||||
06;NLE;Montemorelos;2022-01-01;;
|
||||
06;OAX;"Heroica Ciudad de Huajuapan de León";2022-01-01;;
|
||||
06;PUE;Teziutlan;2022-01-01;;
|
||||
06;ROO;Kantunilkin;2022-01-01;;
|
||||
06;SIN;Guamúchil;2022-01-01;;
|
||||
06;SLP;"Soledad de Graciano Sánchez";2022-01-01;;
|
||||
06;SON;"Heroica Guaymas";2022-01-01;;
|
||||
06;TAM;"Nuevo Laredo";2022-01-01;;
|
||||
06;TLA;Chiautempan;2022-01-01;;
|
||||
06;VER;Coatzacoalcos;2022-01-01;;
|
||||
06;YUC;Kanasín;2022-01-01;;
|
||||
06;ZAC;"Ciudad Cuauhtémoc";2022-01-01;;
|
||||
07;AGU;Asientos;2022-01-01;;
|
||||
07;BCN;"San Felipe";2022-01-01;;
|
||||
07;BCS;"Todos Santos";2022-01-01;;
|
||||
07;CAM;Hopelchén;2022-01-01;;
|
||||
07;COA;Sabinas;2022-01-01;;
|
||||
07;CHH;"Nuevo Casas Grandes";2022-01-01;;
|
||||
07;CHP;Villaflores;2022-01-01;;
|
||||
07;CMX;"Ciudad de México";2022-01-01;;
|
||||
07;DUR;"Peñón Blanco";2022-01-01;;
|
||||
07;GRO;"Atoyac de Álvarez";2022-01-01;;
|
||||
07;GUA;"León de los Aldama";2022-01-01;;
|
||||
07;HID;Zimapan;2022-01-01;;
|
||||
07;JAL;"San Juan de los Lagos";2022-01-01;;
|
||||
07;MEX;"Los Reyes Acaquilpan (La Paz)";2022-01-01;;
|
||||
07;MIC;Pátzcuaro;2022-01-01;;
|
||||
07;MOR;"Zacatepec de Hidalgo";2022-01-01;;
|
||||
07;NAY;"Francisco I. Madero (Puga)";2022-01-01;;
|
||||
07;NLE;Monterrey;2022-01-01;;
|
||||
07;OAX;"Loma Bonita";2022-01-01;;
|
||||
07;PUE;"San Andrés Cholula";2022-01-01;;
|
||||
07;ROO;"Isla Mujeres";2022-01-01;;
|
||||
07;SIN;Navolato;2022-01-01;;
|
||||
07;SLP;Charcas;2022-01-01;;
|
||||
07;SON;Hermosillo;2022-01-01;;
|
||||
07;TAB;Macuspana;2022-01-01;;
|
||||
07;TAM;Reynosa;2022-01-01;;
|
||||
07;VER;Córdoba;2022-01-01;;
|
||||
07;ZAC;Ojocaliente;2022-01-01;;
|
||||
08;AGU;Tepezalá;2022-01-01;;
|
||||
08;BCS;"Heroica Mulegé";2022-01-01;;
|
||||
08;CAM;Champotón;2022-01-01;;
|
||||
08;COA;Saltillo;2022-01-01;;
|
||||
08;CHP;"Las Margaritas";2022-01-01;;
|
||||
08;CMX;"Ciudad de México";2022-01-01;;
|
||||
08;DUR;"Francisco I. Madero";2022-01-01;;
|
||||
08;GUA;Moroleón;2022-01-01;;
|
||||
08;HID;"Huejutla de Reyes";2022-01-01;;
|
||||
08;JAL;"Tepatitlán de Morelos";2022-01-01;;
|
||||
08;MEX;Metepec;2022-01-01;;
|
||||
08;MIC;"Sahuayo de Morelos";2022-01-01;;
|
||||
08;MOR;Tlaquiltenango;2022-01-01;;
|
||||
08;NAY;"Villa Hidalgo (El Nuevo)";2022-01-01;;
|
||||
08;NLE;"Ciudad Sabinas Hidalgo";2022-01-01;;
|
||||
08;OAX;"Puerto Escondido";2022-01-01;;
|
||||
08;PUE;"San Pedro Cholula";2022-01-01;;
|
||||
08;ROO;Bacalar;2022-01-01;;
|
||||
08;SIN;Quila;2022-01-01;;
|
||||
08;SLP;"Salinas de Hidalgo";2022-01-01;;
|
||||
08;SON;Huatabampo;2022-01-01;;
|
||||
08;TAB;"Tenosique de Pino Suárez";2022-01-01;;
|
||||
08;TAM;"Ciudad Río Bravo";2022-01-01;;
|
||||
08;VER;"Tres Valles";2022-01-01;;
|
||||
08;ZAC;"Villa Hidalgo";2022-01-01;;
|
||||
09;AGU;Cosío;2022-01-01;;
|
||||
09;BCS;"Villa Alberto Andrés Alvarado Arámburo";2022-01-01;;
|
||||
09;CAM;Hecelchakán;2022-01-01;;
|
||||
09;COA;"Nueva Rosita";2022-01-01;;
|
||||
09;CHH;Madera;2022-01-01;;
|
||||
09;CHP;Arriaga;2022-01-01;;
|
||||
09;CMX;"Ciudad de México";2022-01-01;;
|
||||
09;DUR;"Nombre de Dios";2022-01-01;;
|
||||
09;GRO;"San Jerónimo de Juárez";2022-01-01;;
|
||||
09;GUA;Salamanca;2022-01-01;;
|
||||
09;HID;Tlaxcoapan;2022-01-01;;
|
||||
09;JAL;Tlaquepaque;2022-01-01;;
|
||||
09;MEX;"Naucalpan de Juárez";2022-01-01;;
|
||||
09;MIC;Uruapan;2022-01-01;;
|
||||
09;NAY;Ruiz;2022-01-01;;
|
||||
09;NLE;"San Nicolás de los Garza";2022-01-01;;
|
||||
09;OAX;"Río Grande o Piedra Parada";2022-01-01;;
|
||||
09;PUE;Huauchinango;2022-01-01;;
|
||||
09;SIN;Ahome;2022-01-01;;
|
||||
09;SLP;Cárdenas;2022-01-01;;
|
||||
09;SON;Navojoa;2022-01-01;;
|
||||
09;TAB;Teapa;2022-01-01;;
|
||||
09;TAM;"San Fernando";2022-01-01;;
|
||||
09;VER;"Jáltipan de Morelos";2022-01-01;;
|
||||
09;ZAC;Villanueva;2022-01-01;;
|
||||
10;BCS;"San Ignacio";2022-01-01;;
|
||||
10;COA;"San Pedro";2022-01-01;;
|
||||
10;CHH;"Colonia Anáhuac";2022-01-01;;
|
||||
10;CHP;Palenque;2022-01-01;;
|
||||
10;CMX;"Ciudad de México";2022-01-01;;
|
||||
10;DUR;"Vicente Guerrero";2022-01-01;;
|
||||
10;GRO;"Ciudad Apaxtla de Castrejón";2022-01-01;;
|
||||
10;GUA;"San Francisco del Rincón";2022-01-01;;
|
||||
10;HID;Tizayuca;2022-01-01;;
|
||||
10;JAL;Zapopan;2022-01-01;;
|
||||
10;MEX;"Ciudad Nezahualcoyotl";2022-01-01;;
|
||||
10;MIC;Zacapu;2022-01-01;;
|
||||
10;NAY;"San Blas";2022-01-01;;
|
||||
10;NLE;"Ciudad Santa Catarina";2022-01-01;;
|
||||
10;PUE;"Acatlán de Osorio";2022-01-01;;
|
||||
10;SIN;"Higuera de Zaragoza";2022-01-01;;
|
||||
10;SLP;Cerritos;2022-01-01;;
|
||||
10;SON;"Heroica Nogales";2022-01-01;;
|
||||
10;TAB;Paraíso;2022-01-01;;
|
||||
10;TAM;Tampico;2022-01-01;;
|
||||
10;VER;Xalapa-Enríquez;2022-01-01;;
|
||||
10;ZAC;"Villa de Cos";2022-01-01;;
|
||||
11;BCS;"Guerrero Negro";2022-01-01;;
|
||||
11;CAM;Pomuch;2022-01-01;;
|
||||
11;COA;Torreón;2022-01-01;;
|
||||
11;CHH;"Juan Aldama";2022-01-01;;
|
||||
11;CHP;Ocosingo;2022-01-01;;
|
||||
11;CMX;"Ciudad de México";2022-01-01;;
|
||||
11;DUR;"El Salto";2022-01-01;;
|
||||
11;GRO;"Ciudad Altamirano";2022-01-01;;
|
||||
11;GUA;Silao;2022-01-01;;
|
||||
11;HID;"Santiago Tulantepec";2022-01-01;;
|
||||
11;JAL;"Tlajomulco de Zúñiga";2022-01-01;;
|
||||
11;MEX;"Villa Nicolás Romero";2022-01-01;;
|
||||
11;MIC;"Zamora de Hidalgo";2022-01-01;;
|
||||
11;NAY;"Ixtlán del Río";2022-01-01;;
|
||||
11;NLE;"Doctor Arroyo";2022-01-01;;
|
||||
11;OAX;"Santiago Suchilquitongo";2022-01-01;;
|
||||
11;PUE;Cuautlancingo;2022-01-01;;
|
||||
11;SIN;Choix;2022-01-01;;
|
||||
11;SLP;Tamuín;2022-01-01;;
|
||||
11;SON;"Puerto Peñasco";2022-01-01;;
|
||||
11;TAB;Frontera;2022-01-01;;
|
||||
11;TAM;"Ciudad Victoria";2022-01-01;;
|
||||
11;VER;Minatitlán;2022-01-01;;
|
||||
11;ZAC;"Nochistlán de Mejía";2022-01-01;;
|
||||
12;BCS;"Santa Rosalía";2022-01-01;;
|
||||
12;COA;Castaños;2022-01-01;;
|
||||
12;CHH;"José Mariano Jiménez";2022-01-01;;
|
||||
12;CHP;Tonalá;2022-01-01;;
|
||||
12;CMX;"Ciudad de México";2022-01-01;;
|
||||
12;DUR;"Santa María del Oro";2022-01-01;;
|
||||
12;GRO;"Buenavista de Cuellar";2022-01-01;;
|
||||
12;GUA;Jerécuaro;2022-01-01;;
|
||||
12;HID;Ixmiquilpan;2022-01-01;;
|
||||
12;JAL;Tonalá;2022-01-01;;
|
||||
12;MEX;"Tecamac de Felipe Villanueva";2022-01-01;;
|
||||
12;MIC;"Heroica Zitácuaro";2022-01-01;;
|
||||
12;NAY;Bucerías;2022-01-01;;
|
||||
12;NLE;"Ciénega de Flores";2022-01-01;;
|
||||
12;OAX;"San Felipe Jalapa de Díaz";2022-01-01;;
|
||||
12;PUE;Tepeaca;2022-01-01;;
|
||||
12;SIN;"Villa Unión";2022-01-01;;
|
||||
12;SLP;Tamasopo;2022-01-01;;
|
||||
12;SON;"Heroica Ciudad de Cananea";2022-01-01;;
|
||||
12;TAB;Cunduacán;2022-01-01;;
|
||||
12;TAM;González;2022-01-01;;
|
||||
12;VER;Orizaba;2022-01-01;;
|
||||
12;ZAC;"Víctor Rosales";2022-01-01;;
|
||||
13;COA;"Francisco I. Madero (Chávez)";2022-01-01;;
|
||||
13;CHH;"Manuel Ojinaga";2022-01-01;;
|
||||
13;CHP;Mapastepec;2022-01-01;;
|
||||
13;CMX;"Ciudad de México";2022-01-01;;
|
||||
13;GRO;"Cutzamala de Pinzón";2022-01-01;;
|
||||
13;GUA;"Santiago Maravatío";2022-01-01;;
|
||||
13;HID;"Tepeji del Rio";2022-01-01;;
|
||||
13;JAL;Tuxpan;2022-01-01;;
|
||||
13;MEX;Tepotzotlán;2022-01-01;;
|
||||
13;MIC;"Paracho de Verduzco";2022-01-01;;
|
||||
13;NAY;"Las Varas";2022-01-01;;
|
||||
13;NLE;Hualahuises;2022-01-01;;
|
||||
13;OAX;"Bahias de Huatulco";2022-01-01;;
|
||||
13;PUE;Tecamachalco;2022-01-01;;
|
||||
13;SIN;"Sinaloa de Leyva";2022-01-01;;
|
||||
13;SLP;"Ciudad del Maíz";2022-01-01;;
|
||||
13;SON;Sonoita;2022-01-01;;
|
||||
13;TAB;Huimanguillo;2022-01-01;;
|
||||
13;TAM;Jaumave;2022-01-01;;
|
||||
13;VER;"Papantla de Olarte";2022-01-01;;
|
||||
13;ZAC;Valparaíso;2022-01-01;;
|
||||
14;COA;"Cuatro Ciénegas de Carranza";2022-01-01;;
|
||||
14;CHH;Bachíniva;2022-01-01;;
|
||||
14;CHP;"Las Rosas";2022-01-01;;
|
||||
14;CMX;"Ciudad de México";2022-01-01;;
|
||||
14;GRO;"Coyuca de Catalán";2022-01-01;;
|
||||
14;GUA;Romita;2022-01-01;;
|
||||
14;HID;"Cruz Azul";2022-01-01;;
|
||||
14;JAL;Tototlán;2022-01-01;;
|
||||
14;MEX;"Tlalnepantla de Baz";2022-01-01;;
|
||||
14;MIC;"Tangancícuaro de Arista";2022-01-01;;
|
||||
14;NAY;Xalisco;2022-01-01;;
|
||||
14;OAX;"Putla Villa de Guerrero";2022-01-01;;
|
||||
14;PUE;Zacatlán;2022-01-01;;
|
||||
14;SIN;Mocorito;2022-01-01;;
|
||||
14;SLP;Cedral;2022-01-01;;
|
||||
14;SON;"Magdalena de Kino";2022-01-01;;
|
||||
14;TAM;"Ciudad Gustavo Díaz Ordaz";2022-01-01;;
|
||||
14;VER;"Poza Rica de Hidalgo";2022-01-01;;
|
||||
14;ZAC;"Luis Moya";2022-01-01;;
|
||||
15;COA;Nadadores;2022-01-01;;
|
||||
15;CHH;Saucillo;2022-01-01;;
|
||||
15;CHP;"Chiapa de Corzo";2022-01-01;;
|
||||
15;CMX;"Ciudad de México";2022-01-01;;
|
||||
15;GRO;"Tierra Colorada";2022-01-01;;
|
||||
15;GUA;Tarandacuao;2022-01-01;;
|
||||
15;HID;Tepeapulco;2022-01-01;;
|
||||
15;JAL;"San Diego de Alejandría";2022-01-01;;
|
||||
15;MEX;"Santa Maria Tultepec";2022-01-01;;
|
||||
15;MIC;"Maravatío de Ocampo";2022-01-01;;
|
||||
15;NAY;"San pedro Lagunillas";2022-01-01;;
|
||||
15;NLE;"Cadereyta Jiménez";2022-01-01;;
|
||||
15;OAX;Cosolapa;2022-01-01;;
|
||||
15;PUE;Xicotepec;2022-01-01;;
|
||||
15;SIN;Angostura;2022-01-01;;
|
||||
15;SLP;"Tierra Nueva";2022-01-01;;
|
||||
15;TAM;"Estación Manuel (Úrsulo Galván)";2022-01-01;;
|
||||
15;VER;"San Andrés Tuxtla";2022-01-01;;
|
||||
15;ZAC;"Moyahua de Estrada";2022-01-01;;
|
||||
16;COA;"Ramos Arizpe";2022-01-01;;
|
||||
16;CHP;Cacahoatán;2022-01-01;;
|
||||
16;CMX;"Ciudad de México";2022-01-01;;
|
||||
16;GRO;"Coyuca de Benítez";2022-01-01;;
|
||||
16;GUA;Huanímaro;2022-01-01;;
|
||||
16;JAL;"La Resolana";2022-01-01;;
|
||||
16;MEX;"Tultitlán de Mariano Escobedo";2022-01-01;;
|
||||
16;MIC;"Zinapécuaro de Figueroa";2022-01-01;;
|
||||
16;NAY;"La peñita de Jaltemba";2022-01-01;;
|
||||
16;OAX;"Tlacolula de Matamoros";2022-01-01;;
|
||||
16;PUE;"Ciudad Serdán";2022-01-01;;
|
||||
16;SIN;"San Blas";2022-01-01;;
|
||||
16;SLP;"Villa de Reyes";2022-01-01;;
|
||||
16;TAM;Xicoténcatl;2022-01-01;;
|
||||
16;VER;"Túxpam de Rodríguez Cano";2022-01-01;;
|
||||
16;ZAC;Sombrerete;2022-01-01;;
|
||||
17;COA;Nava;2022-01-01;;
|
||||
17;CHP;"Ocozocoautla de Espinosa";2022-01-01;;
|
||||
17;GRO;Olinalá;2022-01-01;;
|
||||
17;GUA;Comonfort;2022-01-01;;
|
||||
17;JAL;"Atotonilco el Alto";2022-01-01;;
|
||||
17;MEX;Cuautitlán;2022-01-01;;
|
||||
17;MIC;Puruándiro;2022-01-01;;
|
||||
17;NAY;Jala;2022-01-01;;
|
||||
17;NLE;Santiago;2022-01-01;;
|
||||
17;OAX;"San Pablo Villa de Mitla";2022-01-01;;
|
||||
17;PUE;Amozoc;2022-01-01;;
|
||||
17;SIN;"La Cruz";2022-01-01;;
|
||||
17;SLP;"Fracción el Refugio";2022-01-01;;
|
||||
17;TAM;"Ciudad Miguel Alemán";2022-01-01;;
|
||||
17;VER;Veracruz;2022-01-01;;
|
||||
17;ZAC;Jalpa;2022-01-01;;
|
||||
18;COA;Zaragoza;2022-01-01;;
|
||||
18;CHP;"Cintalapa de Figueroa";2022-01-01;;
|
||||
18;GRO;Marquelia;2022-01-01;;
|
||||
18;GUA;Uriangato;2022-01-01;;
|
||||
18;JAL;Jalostotitlán;2022-01-01;;
|
||||
18;MEX;Ixtapaluca;2022-01-01;;
|
||||
18;MIC;Yurécuaro;2022-01-01;;
|
||||
18;NAY;Ahuacatlán;2022-01-01;;
|
||||
18;NLE;"El cercado";2022-01-01;;
|
||||
18;OAX;Natividad;2022-01-01;;
|
||||
18;SIN;"El rosario";2022-01-01;;
|
||||
18;SLP;Tamazunchale;2022-01-01;;
|
||||
18;TAM;"Soto la Marina";2022-01-01;;
|
||||
18;VER;"Tierra Blanca";2022-01-01;;
|
||||
18;ZAC;Loreto;2022-01-01;;
|
||||
19;COA;"San Buenaventura";2022-01-01;;
|
||||
19;CHP;Pichucalco;2022-01-01;;
|
||||
19;GRO;"Zumpango del Río";2022-01-01;;
|
||||
19;GUA;Pénjamo;2022-01-01;;
|
||||
19;JAL;Poncitlán;2022-01-01;;
|
||||
19;MEX;"Texcoco de Mora";2022-01-01;;
|
||||
19;MIC;"Huetamo de Núñez";2022-01-01;;
|
||||
19;OAX;"Teotitlán de Flores Magón";2022-01-01;;
|
||||
19;SIN;"Estación Naranjo";2022-01-01;;
|
||||
19;SLP;"Santa María del Río";2022-01-01;;
|
||||
19;TAM;"Ciudad Tula";2022-01-01;;
|
||||
19;VER;Cosamaloapan;2022-01-01;;
|
||||
19;ZAC;"Juan Aldama";2022-01-01;;
|
||||
20;COA;"Ciudad Melchor Múzquiz";2022-01-01;;
|
||||
20;CHP;"Puerto Madero (San Benito)";2022-01-01;;
|
||||
20;GRO;"San Luis de la Loma";2022-01-01;;
|
||||
20;GUA;Cuerámaro;2022-01-01;;
|
||||
20;JAL;Arandas;2022-01-01;;
|
||||
20;MEX;"Toluca de Lerdo";2022-01-01;;
|
||||
20;MIC;"Tacámbaro de Codallos";2022-01-01;;
|
||||
20;NLE;Anáhuac;2022-01-01;;
|
||||
20;OAX;"Santa María Huatulco";2022-01-01;;
|
||||
20;SIN;Aguaruto;2022-01-01;;
|
||||
20;SLP;"El Naranjo";2022-01-01;;
|
||||
20;TAM;"Nueva Ciudad Guerrero";2022-01-01;;
|
||||
20;VER;"Carlos A. Carrillo";2022-01-01;;
|
||||
21;COA;Viesca;2022-01-01;;
|
||||
21;CHP;Pijijiapan;2022-01-01;;
|
||||
21;GRO;Petatlán;2022-01-01;;
|
||||
21;GUA;"Empalme Escobedo (Escobedo)";2022-01-01;;
|
||||
21;JAL;"Talpa de Allende";2022-01-01;;
|
||||
21;MEX;"Valle de Chalco Solidaridad";2022-01-01;;
|
||||
21;MIC;"Ciudad Lázaro Cárdenas";2022-01-01;;
|
||||
21;NLE;García;2022-01-01;;
|
||||
21;OAX;"San Juan Bautista Cuicatlán";2022-01-01;;
|
||||
21;SIN;Cosalá;2022-01-01;;
|
||||
21;TAM;"Valle Hermoso";2022-01-01;;
|
||||
21;VER;Pánuco;2022-01-01;;
|
||||
22;COA;Morelos;2022-01-01;;
|
||||
22;CHP;Reforma;2022-01-01;;
|
||||
22;GRO;"La Unión";2022-01-01;;
|
||||
22;GUA;"San Luis de la Paz";2022-01-01;;
|
||||
22;JAL;Etzatlán;2022-01-01;;
|
||||
22;MEX;"Tejupilco de Hidalgo";2022-01-01;;
|
||||
22;MIC;"Las Guacamayas";2022-01-01;;
|
||||
22;NLE;"Ciudad Benito Juárez";2022-01-01;;
|
||||
22;OAX;"Villa Sola de Vega";2022-01-01;;
|
||||
22;SIN;"San Ignacio";2022-01-01;;
|
||||
22;VER;"Tampico Alto";2022-01-01;;
|
||||
23;COA;Arteaga;2022-01-01;;
|
||||
23;CHP;Huixtla;2022-01-01;;
|
||||
23;GRO;"San Luis San Pedro";2022-01-01;;
|
||||
23;GUA;"Valle de Santiago";2022-01-01;;
|
||||
23;JAL;Sayula;2022-01-01;;
|
||||
23;MEX;"Chalco de Díaz Covarrubias";2022-01-01;;
|
||||
23;MIC;"Jiquilpan de Juárez";2022-01-01;;
|
||||
23;OAX;"Ocotlán de Morelos";2022-01-01;;
|
||||
23;SIN;Topolobampo;2022-01-01;;
|
||||
23;VER;"Tempoal de Sánchez";2022-01-01;;
|
||||
24;COA;Allende;2022-01-01;;
|
||||
24;CHP;"Motozintla de Mendoza";2022-01-01;;
|
||||
24;GRO;Teloloapan;2022-01-01;;
|
||||
24;GUA;Abasolo;2022-01-01;;
|
||||
24;JAL;"Ahualulco de Mercado";2022-01-01;;
|
||||
24;MEX;Amatepec;2022-01-01;;
|
||||
24;MIC;Tuxpan;2022-01-01;;
|
||||
24;OAX;"Villa de Zaachila";2022-01-01;;
|
||||
24;SIN;"Lic. Benito Juárez (Campo Gobierno)";2022-01-01;;
|
||||
24;VER;Tantoyuca;2022-01-01;;
|
||||
25;CHP;Acala;2022-01-01;;
|
||||
25;GRO;"Técpan de Galeana";2022-01-01;;
|
||||
25;GUA;"Rincón de Tamayo";2022-01-01;;
|
||||
25;JAL;"Autlán de Navarro";2022-01-01;;
|
||||
25;MIC;"Cotija de la Paz";2022-01-01;;
|
||||
25;OAX;"Miahuatlán de Porfirio Díaz";2022-01-01;;
|
||||
25;VER;"Gutiérrez Zamora";2022-01-01;;
|
||||
26;GRO;Huitzuco;2022-01-01;;
|
||||
26;GUA;Villagrán;2022-01-01;;
|
||||
26;JAL;Magdalena;2022-01-01;;
|
||||
26;MEX;"Melchor Ocampo";2022-01-01;;
|
||||
26;MIC;"Nueva Italia de Ruiz";2022-01-01;;
|
||||
26;OAX;"Unión Hidalgo";2022-01-01;;
|
||||
26;VER;"Platón Sánchez";2022-01-01;;
|
||||
27;GRO;"Tixtla de Guerrero";2022-01-01;;
|
||||
27;GUA;Yuriria;2022-01-01;;
|
||||
27;JAL;"San Julián";2022-01-01;;
|
||||
27;MEX;"San Vicente Chicoloapan de Juárez";2022-01-01;;
|
||||
27;MIC;"Cuitzeo del Porvenir";2022-01-01;;
|
||||
27;OAX;"El Camarón";2022-01-01;;
|
||||
27;VER;"Juan Rodríguez Clara";2022-01-01;;
|
||||
28;GRO;"Tepecoacuilco de Trujano";2022-01-01;;
|
||||
28;GUA;"Apaseo el Grande";2022-01-01;;
|
||||
28;JAL;Cocula;2022-01-01;;
|
||||
28;MEX;Capulhuac;2022-01-01;;
|
||||
28;OAX;"San Pedro Mixtepec -Dto. 22-";2022-01-01;;
|
||||
28;VER;"Huatusco de Chicuellar";2022-01-01;;
|
||||
29;GRO;"San Marcos";2022-01-01;;
|
||||
29;GUA;"Purísima de Bustos";2022-01-01;;
|
||||
29;JAL;"El Grullo";2022-01-01;;
|
||||
29;MEX;"Juchitepec de Mariano Riva Palacio";2022-01-01;;
|
||||
29;OAX;"Santa Cruz Itundujia";2022-01-01;;
|
||||
29;VER;Ixtaczoquitlán;2022-01-01;;
|
||||
30;GRO;Azoyú;2022-01-01;;
|
||||
30;GUA;Salvatierra;2022-01-01;;
|
||||
30;JAL;"San Miguel el Alto";2022-01-01;;
|
||||
30;MEX;Tequixquiac;2022-01-01;;
|
||||
30;OAX;Chahuites;2022-01-01;;
|
||||
30;VER;"Río Blanco";2022-01-01;;
|
||||
31;GRO;Tlapehuala;2022-01-01;;
|
||||
31;GUA;Marfil;2022-01-01;;
|
||||
31;JAL;Tala;2022-01-01;;
|
||||
31;MEX;Xonacatlán;2022-01-01;;
|
||||
31;OAX;"Heroica Ciudad de Ejutla de Crespo";2022-01-01;;
|
||||
31;VER;Isla;2022-01-01;;
|
||||
32;GRO;"San Luis Acatlán";2022-01-01;;
|
||||
32;GUA;"San José Iturbide";2022-01-01;;
|
||||
32;JAL;"La Barca";2022-01-01;;
|
||||
32;MEX;"San Mateo Atenco";2022-01-01;;
|
||||
32;OAX;"San Pedro Tapanatepec";2022-01-01;;
|
||||
32;VER;Cuitláhuac;2022-01-01;;
|
||||
33;GRO;"Chilapa de Álvarez";2022-01-01;;
|
||||
33;GUA;"Apaseo el Alto";2022-01-01;;
|
||||
33;JAL;Jamay;2022-01-01;;
|
||||
33;OAX;"Vicente Camalote";2022-01-01;;
|
||||
33;VER;"Fortín de las Flores";2022-01-01;;
|
||||
34;GRO;"Tlapa de Comonfort";2022-01-01;;
|
||||
34;GUA;"Ciudad Manuel Doblado";2022-01-01;;
|
||||
34;JAL;"Yahualica de González Gallo";2022-01-01;;
|
||||
34;OAX;"Villa de Tamazulápam del Progreso";2022-01-01;;
|
||||
34;VER;Alvarado;2022-01-01;;
|
||||
35;GRO;Tlalixtaquilla;2022-01-01;;
|
||||
35;GUA;"Jaral del Progreso";2022-01-01;;
|
||||
35;JAL;Colotlán;2022-01-01;;
|
||||
35;OAX;"San Juan Bautista lo de Soto";2022-01-01;;
|
||||
35;VER;"José Cardel";2022-01-01;;
|
||||
36;GRO;Cuajinicuilapa;2022-01-01;;
|
||||
36;GUA;"San Diego de la Unión";2022-01-01;;
|
||||
36;JAL;Cihuatlán;2022-01-01;;
|
||||
36;MEX;Chiconcuac;2022-01-01;;
|
||||
36;OAX;"San Juan Cacahuatepec";2022-01-01;;
|
||||
36;VER;Banderilla;2022-01-01;;
|
||||
37;GRO;Huamuxtitlán;2022-01-01;;
|
||||
37;GUA;"Santa Cruz Juventino Rosas";2022-01-01;;
|
||||
37;JAL;Zapotiltic;2022-01-01;;
|
||||
37;OAX;"San Pedro Totolapa";2022-01-01;;
|
||||
37;VER;"Paraje Nuevo";2022-01-01;;
|
||||
38;GRO;"Cruz Grande";2022-01-01;;
|
||||
38;GUA;"Doctor Mora";2022-01-01;;
|
||||
38;JAL;"Villa Corona";2022-01-01;;
|
||||
38;OAX;"San Miguel el Grande";2022-01-01;;
|
||||
38;VER;"Playa Vicente";2022-01-01;;
|
||||
39;GRO;Ocotito;2022-01-01;;
|
||||
39;GUA;"Dolores Hgo. Cuna de la Indep. Nal.";2022-01-01;;
|
||||
39;JAL;Teocaltiche;2022-01-01;;
|
||||
39;MEX;"Almoloya de Juárez";2022-01-01;;
|
||||
39;OAX;"Zimatlán de Álvarez";2022-01-01;;
|
||||
39;VER;Altotonga;2022-01-01;;
|
||||
40;GRO;Copala;2022-01-01;;
|
||||
40;MEX;Ocoyoacac;2022-01-01;;
|
||||
40;OAX;"San Pablo Huitzo";2022-01-01;;
|
||||
40;VER;"Juan Díaz Covarrubias";2022-01-01;;
|
||||
41;GRO;Zihuatanejo;2022-01-01;;
|
||||
41;JAL;Tequila;2022-01-01;;
|
||||
41;MEX;Zumpango;2022-01-01;;
|
||||
41;OAX;"San Francisco Telixtlahuaca";2022-01-01;;
|
||||
41;VER;Cuichapa;2022-01-01;;
|
||||
42;JAL;"El Quince (San José el Quince)";2022-01-01;;
|
||||
42;OAX;"Mariscala de Juárez";2022-01-01;;
|
||||
42;VER;"Santiago Tuxtla";2022-01-01;;
|
||||
43;JAL;"San José el Verde (El Verde)";2022-01-01;;
|
||||
43;OAX;"Santiago Pinotepa Nacional";2022-01-01;;
|
||||
43;VER;Huayacocotla;2022-01-01;;
|
||||
44;JAL;Jocotepec;2022-01-01;;
|
||||
44;OAX;"Santiago Jamiltepec";2022-01-01;;
|
||||
44;VER;"Paso de Ovejas";2022-01-01;;
|
||||
45;JAL;Tecalitlán;2022-01-01;;
|
||||
45;OAX;"San Pedro Pochutla";2022-01-01;;
|
||||
45;VER;Catemaco;2022-01-01;;
|
||||
46;JAL;Chapala;2022-01-01;;
|
||||
46;OAX;"Heroica Ciudad de Tlaxiaco";2022-01-01;;
|
||||
46;VER;Nogales;2022-01-01;;
|
||||
47;JAL;Ajijic;2022-01-01;;
|
||||
47;OAX;"San Juan Bautista Valle Nacional";2022-01-01;;
|
||||
47;VER;"Las Choapas";2022-01-01;;
|
||||
48;JAL;"San Ignacio Cerro Gordo";2022-01-01;;
|
||||
48;OAX;Lagunas;2022-01-01;;
|
||||
48;VER;"General Miguel Alemán (Potrero Nuevo)";2022-01-01;;
|
||||
49;JAL;"Zacoalco de Torres";2022-01-01;;
|
||||
49;OAX;"Ciudad Ixtepec";2022-01-01;;
|
||||
49;VER;Coatzintla;2022-01-01;;
|
||||
50;JAL;"Huejuquilla el Alto";2022-01-01;;
|
||||
50;OAX;"Santiago Juxtlahuaca";2022-01-01;;
|
||||
50;VER;"Ángel R. Cabada";2022-01-01;;
|
||||
51;JAL;"Villa Hidalgo";2022-01-01;;
|
||||
51;OAX;"San Sebastián Tecomaxtlahuaca";2022-01-01;;
|
||||
51;VER;"San Rafael";2022-01-01;;
|
||||
52;JAL;"Unión de San Antonio";2022-01-01;;
|
||||
52;OAX;"Asunción Nochixtlán";2022-01-01;;
|
||||
52;VER;Tlacojalpan;2022-01-01;;
|
||||
53;JAL;"Las Pintitas";2022-01-01;;
|
||||
53;OAX;"San Francisco Ixhuatán";2022-01-01;;
|
||||
53;VER;Cosoleacaque;2022-01-01;;
|
||||
54;JAL;"Tamazula de Gordiano";2022-01-01;;
|
||||
54;OAX;"San Blas Atempa";2022-01-01;;
|
||||
54;VER;"Lerdo de Tejada";2022-01-01;;
|
||||
55;JAL;"Acatlán de Juárez";2022-01-01;;
|
||||
55;OAX;"Santo Domingo Tehuantepec";2022-01-01;;
|
||||
55;VER;Tihuatlán;2022-01-01;;
|
||||
56;JAL;"Valle de Guadalupe";2022-01-01;;
|
||||
56;OAX;"Cuilápam de Guerrero";2022-01-01;;
|
||||
56;VER;Atoyac;2022-01-01;;
|
||||
57;OAX;"El Rosario";2022-01-01;;
|
||||
57;VER;"Huiloapan de Cuauhtémoc";2022-01-01;;
|
||||
58;OAX;"Santa Lucia del Camino";2022-01-01;;
|
||||
58;VER;"Cazones de Herrera";2022-01-01;;
|
||||
59;OAX;"San Antonio de la Cal";2022-01-01;;
|
||||
59;VER;Yecuatla;2022-01-01;;
|
||||
60;VER;"Soledad de Doblado";2022-01-01;;
|
||||
61;VER;"Cerro Azul";2022-01-01;;
|
||||
62;VER;Tezonapa;2022-01-01;;
|
||||
66;VER;Sihuapan;2022-01-01;;
|
||||
67;VER;"El Higo";2022-01-01;;
|
||||
68;VER;"Paso del Macho";2022-01-01;;
|
||||
69;VER;Tlapacoyan;2022-01-01;;
|
|
183
database/seeders/sat_cache/c_moneda.csv
Normal file
183
database/seeders/sat_cache/c_moneda.csv
Normal file
@ -0,0 +1,183 @@
|
||||
AED;"Dirham de EAU";2;5;2022-01-01;
|
||||
AFN;Afghani;2;5;2022-01-01;
|
||||
ALL;Lek;2;5;2022-01-01;
|
||||
AMD;"Dram armenio";2;5;2022-01-01;
|
||||
ANG;"Florín antillano neerlandés";2;5;2022-01-01;
|
||||
AOA;Kwanza;2;5;2022-01-01;
|
||||
ARS;"Peso Argentino";2;5;2022-01-01;
|
||||
AUD;"Dólar Australiano";2;5;2022-01-01;
|
||||
AWG;"Aruba Florin";2;5;2022-01-01;
|
||||
AZN;"Azerbaijanian Manat";2;5;2022-01-01;
|
||||
BAM;"Convertibles marca";2;5;2022-01-01;
|
||||
BBD;"Dólar de Barbados";2;5;2022-01-01;
|
||||
BDT;Taka;2;5;2022-01-01;
|
||||
BGN;"Lev búlgaro";2;5;2022-01-01;
|
||||
BHD;"Dinar de Bahrein";3;5;2022-01-01;
|
||||
BIF;"Burundi Franc";0;5;2022-01-01;
|
||||
BMD;"Dólar de Bermudas";2;5;2022-01-01;
|
||||
BND;"Dólar de Brunei";2;5;2022-01-01;
|
||||
BOB;Boliviano;2;5;2022-01-01;
|
||||
BOV;Mvdol;2;5;2022-01-01;
|
||||
BRL;"Real brasileño";2;5;2022-01-01;
|
||||
BSD;"Dólar de las Bahamas";2;5;2022-01-01;
|
||||
BTN;Ngultrum;2;5;2022-01-01;
|
||||
BWP;Pula;2;5;2022-01-01;
|
||||
BYR;"Rublo bielorruso";0;5;2022-01-01;
|
||||
BZD;"Dólar de Belice";2;5;2022-01-01;
|
||||
CAD;"Dólar Canadiense";2;5;2022-01-01;
|
||||
CDF;"Franco congoleño";2;5;2022-01-01;
|
||||
CHE;"WIR Euro";2;5;2022-01-01;
|
||||
CHF;"Franco Suizo";2;5;2022-01-01;
|
||||
CHW;"Franc WIR";2;5;2022-01-01;
|
||||
CLF;"Unidad de Fomento";4;5;2022-01-01;
|
||||
CLP;"Peso chileno";0;5;2022-01-01;
|
||||
CNH;"Yuan extracontinental (China )";2;5;2023-05-29;
|
||||
CNY;"Yuan Renminbi";2;5;2022-01-01;
|
||||
COP;"Peso Colombiano";2;5;2022-01-01;
|
||||
COU;"Unidad de Valor real";2;5;2022-01-01;
|
||||
CRC;"Colón costarricense";2;5;2022-01-01;
|
||||
CUC;"Peso Convertible";2;5;2022-01-01;
|
||||
CUP;"Peso Cubano";2;5;2022-01-01;
|
||||
CVE;"Cabo Verde Escudo";2;5;2022-01-01;
|
||||
CZK;"Corona checa";2;5;2022-01-01;
|
||||
DJF;"Franco de Djibouti";0;5;2022-01-01;
|
||||
DKK;"Corona danesa";2;5;2022-01-01;
|
||||
DOP;"Peso Dominicano";2;5;2022-01-01;
|
||||
DZD;"Dinar argelino";2;5;2022-01-01;
|
||||
EGP;"Libra egipcia";2;5;2022-01-01;
|
||||
ERN;Nakfa;2;5;2022-01-01;
|
||||
ESD;"Dólar de Ecuador";2;5;2023-05-29;
|
||||
ETB;"Birr etíope";2;5;2022-01-01;
|
||||
EUR;Euro;2;5;2022-01-01;
|
||||
FJD;"Dólar de Fiji";2;5;2022-01-01;
|
||||
FKP;"Libra malvinense";2;5;2022-01-01;
|
||||
GBP;"Libra Esterlina";2;5;2022-01-01;
|
||||
GEL;Lari;2;5;2022-01-01;
|
||||
GHS;"Cedi de Ghana";2;5;2022-01-01;
|
||||
GIP;"Libra de Gibraltar";2;5;2022-01-01;
|
||||
GMD;Dalasi;2;5;2022-01-01;
|
||||
GNF;"Franco guineano";0;5;2022-01-01;
|
||||
GTQ;Quetzal;2;5;2022-01-01;
|
||||
GYD;"Dólar guyanés";2;5;2022-01-01;
|
||||
HKD;"Dólar De Hong Kong";2;5;2022-01-01;
|
||||
HNL;Lempira;2;5;2022-01-01;
|
||||
HRK;Kuna;2;5;2022-01-01;
|
||||
HTG;Gourde;2;5;2022-01-01;
|
||||
HUF;Florín;2;5;2022-01-01;
|
||||
IDR;Rupia;2;5;2022-01-01;
|
||||
ILS;"Nuevo Shekel Israelí";2;5;2022-01-01;
|
||||
INR;"Rupia india";2;5;2022-01-01;
|
||||
IQD;"Dinar iraquí";3;5;2022-01-01;
|
||||
IRR;"Rial iraní";2;5;2022-01-01;
|
||||
ISK;"Corona islandesa";0;5;2022-01-01;
|
||||
JMD;"Dólar Jamaiquino";2;5;2022-01-01;
|
||||
JOD;"Dinar jordano";3;5;2022-01-01;
|
||||
JPY;Yen;0;5;2022-01-01;
|
||||
KES;"Chelín keniano";2;5;2022-01-01;
|
||||
KGS;Som;2;5;2022-01-01;
|
||||
KHR;Riel;2;5;2022-01-01;
|
||||
KMF;"Franco Comoro";0;5;2022-01-01;
|
||||
KPW;"Corea del Norte ganó";2;5;2022-01-01;
|
||||
KRW;Won;0;5;2022-01-01;
|
||||
KWD;"Dinar kuwaití";3;5;2022-01-01;
|
||||
KYD;"Dólar de las Islas Caimán";2;5;2022-01-01;
|
||||
KZT;Tenge;2;5;2022-01-01;
|
||||
LAK;Kip;2;5;2022-01-01;
|
||||
LBP;"Libra libanesa";2;5;2022-01-01;
|
||||
LKR;"Rupia de Sri Lanka";2;5;2022-01-01;
|
||||
LRD;"Dólar liberiano";2;5;2022-01-01;
|
||||
LSL;Loti;2;5;2022-01-01;
|
||||
LYD;"Dinar libio";3;5;2022-01-01;
|
||||
MAD;"Dirham marroquí";2;5;2022-01-01;
|
||||
MDL;"Leu moldavo";2;5;2022-01-01;
|
||||
MGA;"Ariary malgache";2;5;2022-01-01;
|
||||
MKD;Denar;2;5;2022-01-01;
|
||||
MMK;Kyat;2;5;2022-01-01;
|
||||
MNT;Tugrik;2;5;2022-01-01;
|
||||
MOP;Pataca;2;5;2022-01-01;
|
||||
MRO;Ouguiya;2;5;2022-01-01;
|
||||
MUR;"Rupia de Mauricio";2;5;2022-01-01;
|
||||
MVR;Rupia;2;5;2022-01-01;
|
||||
MWK;Kwacha;2;5;2022-01-01;
|
||||
MXN;"Peso Mexicano";2;5;2022-01-01;
|
||||
MXV;"México Unidad de Inversión (UDI)";2;5;2022-01-01;
|
||||
MYR;"Ringgit malayo";2;5;2022-01-01;
|
||||
MZN;"Mozambique Metical";2;5;2022-01-01;
|
||||
NAD;"Dólar de Namibia";2;5;2022-01-01;
|
||||
NGN;Naira;2;5;2022-01-01;
|
||||
NIC;"Córdoba (Nicaragua)";2;5;2023-05-29;
|
||||
NIO;"Córdoba Oro";2;5;2022-01-01;
|
||||
NOK;"Corona noruega";2;5;2022-01-01;
|
||||
NPR;"Rupia nepalí";2;5;2022-01-01;
|
||||
NZD;"Dólar de Nueva Zelanda";2;5;2022-01-01;
|
||||
OMR;"Rial omaní";3;5;2022-01-01;
|
||||
PAB;Balboa;2;5;2022-01-01;
|
||||
PEN;"Nuevo Sol";2;5;2022-01-01;
|
||||
PGK;Kina;2;5;2022-01-01;
|
||||
PHP;"Peso filipino";2;5;2022-01-01;
|
||||
PKR;"Rupia de Pakistán";2;5;2022-01-01;
|
||||
PLN;Zloty;2;5;2022-01-01;
|
||||
PYG;Guaraní;0;5;2022-01-01;
|
||||
QAR;"Qatar Rial";2;5;2022-01-01;
|
||||
RON;"Leu rumano";2;5;2022-01-01;
|
||||
RSD;"Dinar serbio";2;5;2022-01-01;
|
||||
RUB;"Rublo ruso";2;5;2022-01-01;
|
||||
RWF;"Franco ruandés";0;5;2022-01-01;
|
||||
SAR;"Riyal saudí";2;5;2022-01-01;
|
||||
SBD;"Dólar de las Islas Salomón";2;5;2022-01-01;
|
||||
SCR;"Rupia de Seychelles";2;5;2022-01-01;
|
||||
SDG;"Libra sudanesa";2;5;2022-01-01;
|
||||
SEK;"Corona sueca";2;5;2022-01-01;
|
||||
SGD;"Dólar De Singapur";2;5;2022-01-01;
|
||||
SHP;"Libra de Santa Helena";2;5;2022-01-01;
|
||||
SLL;Leona;2;5;2022-01-01;
|
||||
SOS;"Chelín somalí";2;5;2022-01-01;
|
||||
SRD;"Dólar de Suriname";2;5;2022-01-01;
|
||||
SSP;"Libra sudanesa Sur";2;5;2022-01-01;
|
||||
STD;Dobra;2;5;2022-01-01;
|
||||
SVC;"Colon El Salvador";2;5;2022-01-01;
|
||||
SYP;"Libra Siria";2;5;2022-01-01;
|
||||
SZL;Lilangeni;2;5;2022-01-01;
|
||||
THB;Baht;2;5;2022-01-01;
|
||||
TJS;Somoni;2;5;2022-01-01;
|
||||
TMT;"Turkmenistán nuevo manat";2;5;2022-01-01;
|
||||
TND;"Dinar tunecino";3;5;2022-01-01;
|
||||
TOP;Pa'anga;2;5;2022-01-01;
|
||||
TRY;"Lira turca";2;5;2022-01-01;
|
||||
TTD;"Dólar de Trinidad y Tobago";2;5;2022-01-01;
|
||||
TWD;"Nuevo dólar de Taiwán";2;5;2022-01-01;
|
||||
TZS;"Shilling tanzano";2;5;2022-01-01;
|
||||
UAH;Hryvnia;2;5;2022-01-01;
|
||||
UGX;"Shilling de Uganda";0;5;2022-01-01;
|
||||
USD;"Dólar americano";2;5;2022-01-01;
|
||||
USN;"Dólar estadounidense (día siguiente)";2;5;2022-01-01;
|
||||
UYI;"Peso Uruguay en Unidades Indexadas (URUIURUI)";0;5;2022-01-01;
|
||||
UYP;"Uruguay (Peso)";2;5;2023-05-29;
|
||||
UYU;"Peso Uruguayo";2;5;2022-01-01;
|
||||
UZS;"Uzbekistán Sum";2;5;2022-01-01;
|
||||
VEF;Bolívar;2;5;2022-01-01;
|
||||
VES;"Bolívar digital (Venezuela)";2;5;2023-05-29;
|
||||
VND;Dong;0;5;2022-01-01;
|
||||
VUV;Vatu;0;5;2022-01-01;
|
||||
WST;Tala;2;5;2022-01-01;
|
||||
XAF;"Franco CFA BEAC";0;5;2022-01-01;
|
||||
XAG;Plata;0;5;2022-01-01;
|
||||
XAU;Oro;0;5;2022-01-01;
|
||||
XBA;"Unidad de Mercados de Bonos Unidad Europea Composite (EURCO)";0;5;2022-01-01;
|
||||
XBB;"Unidad Monetaria de Bonos de Mercados Unidad Europea (UEM-6)";0;5;2022-01-01;
|
||||
XBC;"Mercados de Bonos Unidad Europea unidad de cuenta a 9 (UCE-9)";0;5;2022-01-01;
|
||||
XBD;"Mercados de Bonos Unidad Europea unidad de cuenta a 17 (UCE-17)";0;5;2022-01-01;
|
||||
XCD;"Dólar del Caribe Oriental";2;5;2022-01-01;
|
||||
XDR;"DEG (Derechos Especiales de Giro)";0;5;2022-01-01;
|
||||
XOF;"Franco CFA BCEAO";0;5;2022-01-01;
|
||||
XPD;Paladio;0;5;2022-01-01;
|
||||
XPF;"Franco CFP";0;5;2022-01-01;
|
||||
XPT;Platino;0;5;2022-01-01;
|
||||
XSU;Sucre;0;5;2022-01-01;
|
||||
XTS;"Códigos reservados específicamente para propósitos de prueba";0;;2022-01-01;
|
||||
XUA;"Unidad ADB de Cuenta";0;5;2022-01-01;
|
||||
XXX;"Los códigos asignados para las transacciones en que intervenga ninguna moneda";0;;2022-01-01;
|
||||
YER;"Rial yemení";2;5;2022-01-01;
|
||||
ZAR;Rand;2;5;2022-01-01;
|
||||
ZMW;"Kwacha zambiano";2;5;2022-01-01;
|
||||
ZWL;"Zimbabwe Dólar";2;5;2022-01-01;
|
|
2463
database/seeders/sat_cache/c_municipio.csv
Normal file
2463
database/seeders/sat_cache/c_municipio.csv
Normal file
File diff suppressed because it is too large
Load Diff
251
database/seeders/sat_cache/c_pais.csv
Normal file
251
database/seeders/sat_cache/c_pais.csv
Normal file
@ -0,0 +1,251 @@
|
||||
AFG;Afganistán;;;;
|
||||
ALA;"Islas Åland";;;;
|
||||
ALB;Albania;;;;
|
||||
DEU;Alemania;;;;"Unión Europea"
|
||||
AND;Andorra;;;;
|
||||
AGO;Angola;;;;
|
||||
AIA;Anguila;;;;
|
||||
ATA;Antártida;;;;
|
||||
ATG;"Antigua y Barbuda";;;;
|
||||
SAU;"Arabia Saudita";;;;
|
||||
DZA;Argelia;;;;
|
||||
ARG;Argentina;;;;
|
||||
ARM;Armenia;;;;
|
||||
ABW;Aruba;;;;
|
||||
AUS;Australia;;;;
|
||||
AUT;Austria;;;;"Unión Europea"
|
||||
AZE;Azerbaiyán;;;;
|
||||
BHS;"Bahamas (las)";;;;
|
||||
BGD;Bangladés;;;;
|
||||
BRB;Barbados;;;;
|
||||
BHR;Baréin;;;;
|
||||
BEL;Bélgica;;;;"Unión Europea"
|
||||
BLZ;Belice;;;;
|
||||
BEN;Benín;;;;
|
||||
BMU;Bermudas;;;;
|
||||
BLR;Bielorrusia;;;;
|
||||
MMR;Myanmar;;;;
|
||||
BOL;"Bolivia, Estado Plurinacional de";;;;
|
||||
BIH;"Bosnia y Herzegovina";;;;
|
||||
BWA;Botsuana;;;;
|
||||
BRA;Brasil;;;;
|
||||
BRN;"Brunéi Darussalam";;;;
|
||||
BGR;Bulgaria;;;;"Unión Europea"
|
||||
BFA;"Burkina Faso";;;;
|
||||
BDI;Burundi;;;;
|
||||
BTN;Bután;;;;
|
||||
CPV;"Cabo Verde";;;;
|
||||
KHM;Camboya;;;;
|
||||
CMR;Camerún;;;;
|
||||
CAN;Canadá;"[A-Z][0-9][A-Z] [0-9][A-Z][0-9]";[0-9]{9};;TLCAN
|
||||
QAT;Catar;;;;
|
||||
BES;"Bonaire, San Eustaquio y Saba";;;;
|
||||
TCD;Chad;;;;
|
||||
CHL;Chile;;;;
|
||||
CHN;China;;;;
|
||||
CYP;Chipre;;;;"Unión Europea"
|
||||
COL;Colombia;;;;
|
||||
COM;Comoras;;;;
|
||||
PRK;"Corea (la República Democrática Popular de)";;;;
|
||||
KOR;"Corea (la República de)";;;;
|
||||
CIV;"Côte d'Ivoire";;;;
|
||||
CRI;"Costa Rica";;;;
|
||||
HRV;Croacia;;;;"Unión Europea"
|
||||
CUB;Cuba;;;;
|
||||
CUW;Curaçao;;;;
|
||||
DNK;Dinamarca;;;;"Unión Europea"
|
||||
DMA;Dominica;;;;
|
||||
ECU;Ecuador;;;;
|
||||
EGY;Egipto;;;;
|
||||
SLV;"El Salvador";;;;
|
||||
ARE;"Emiratos Árabes Unidos (Los)";;;;
|
||||
ERI;Eritrea;;;;
|
||||
SVK;Eslovaquia;;;;"Unión Europea"
|
||||
SVN;Eslovenia;;;;"Unión Europea"
|
||||
ESP;España;;;;"Unión Europea"
|
||||
USA;"Estados Unidos (los)";[0-9]{5}(-[0-9]{4})?;[0-9]{9};;TLCAN
|
||||
EST;Estonia;;;;"Unión Europea"
|
||||
ETH;Etiopía;;;;
|
||||
PHL;"Filipinas (las)";;;;
|
||||
FIN;Finlandia;;;;"Unión Europea"
|
||||
FJI;Fiyi;;;;
|
||||
FRA;Francia;;;;"Unión Europea"
|
||||
GAB;Gabón;;;;
|
||||
GMB;"Gambia (La)";;;;
|
||||
GEO;Georgia;;;;
|
||||
GHA;Ghana;;;;
|
||||
GIB;Gibraltar;;;;
|
||||
GRD;Granada;;;;
|
||||
GRC;Grecia;;;;"Unión Europea"
|
||||
GRL;Groenlandia;;;;
|
||||
GLP;Guadalupe;;;;
|
||||
GUM;Guam;;;;
|
||||
GTM;Guatemala;;;;
|
||||
GUF;"Guayana Francesa";;;;
|
||||
GGY;Guernsey;;;;
|
||||
GIN;Guinea;;;;
|
||||
GNB;Guinea-Bisáu;;;;
|
||||
GNQ;"Guinea Ecuatorial";;;;
|
||||
GUY;Guyana;;;;
|
||||
HTI;Haití;;;;
|
||||
HND;Honduras;;;;
|
||||
HKG;"Hong Kong";;;;
|
||||
HUN;Hungría;;;;"Unión Europea"
|
||||
IND;India;;;;
|
||||
IDN;Indonesia;;;;
|
||||
IRQ;Irak;;;;
|
||||
IRN;"Irán (la República Islámica de)";;;;
|
||||
IRL;Irlanda;;;;"Unión Europea"
|
||||
BVT;"Isla Bouvet";;;;
|
||||
IMN;"Isla de Man";;;;
|
||||
CXR;"Isla de Navidad";;;;
|
||||
NFK;"Isla Norfolk";;;;
|
||||
ISL;Islandia;;;;
|
||||
CYM;"Islas Caimán (las)";;;;
|
||||
CCK;"Islas Cocos (Keeling)";;;;
|
||||
COK;"Islas Cook (las)";;;;
|
||||
FRO;"Islas Feroe (las)";;;;
|
||||
SGS;"Georgia del sur y las islas sandwich del sur";;;;
|
||||
HMD;"Isla Heard e Islas McDonald";;;;
|
||||
FLK;"Islas Malvinas [Falkland] (las)";;;;
|
||||
MNP;"Islas Marianas del Norte (las)";;;;
|
||||
MHL;"Islas Marshall (las)";;;;
|
||||
PCN;Pitcairn;;;;
|
||||
SLB;"Islas Salomón (las)";;;;
|
||||
TCA;"Islas Turcas y Caicos (las)";;;;
|
||||
UMI;"Islas de Ultramar Menores de Estados Unidos (las)";;;;
|
||||
VGB;"Islas Vírgenes (Británicas)";;;;
|
||||
VIR;"Islas Vírgenes (EE.UU.)";;;;
|
||||
ISR;Israel;;;;
|
||||
ITA;Italia;;;;"Unión Europea"
|
||||
JAM;Jamaica;;;;
|
||||
JPN;Japón;;;;
|
||||
JEY;Jersey;;;;
|
||||
JOR;Jordania;;;;
|
||||
KAZ;Kazajistán;;;;
|
||||
KEN;Kenia;;;;
|
||||
KGZ;Kirguistán;;;;
|
||||
KIR;Kiribati;;;;
|
||||
KWT;Kuwait;;;;
|
||||
LAO;"Lao, (la) República Democrática Popular";;;;
|
||||
LSO;Lesoto;;;;
|
||||
LVA;Letonia;;;;"Unión Europea"
|
||||
LBN;Líbano;;;;
|
||||
LBR;Liberia;;;;
|
||||
LBY;Libia;;;;
|
||||
LIE;Liechtenstein;;;;
|
||||
LTU;Lituania;;;;"Unión Europea"
|
||||
LUX;Luxemburgo;;;;"Unión Europea"
|
||||
MAC;Macao;;;;
|
||||
MDG;Madagascar;;;;
|
||||
MYS;Malasia;;;;
|
||||
MWI;Malaui;;;;
|
||||
MDV;Maldivas;;;;
|
||||
MLI;Malí;;;;
|
||||
MLT;Malta;;;;"Unión Europea"
|
||||
MAR;Marruecos;;;;
|
||||
MTQ;Martinica;;;;
|
||||
MUS;Mauricio;;;;
|
||||
MRT;Mauritania;;;;
|
||||
MYT;Mayotte;;;;
|
||||
MEX;México;[0-9]{5};"""[A-Z&Ñ]{3,4}[0-9]{2}(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01])[A-Z0-9]{2}[0
|
||||
-9A]""";"Lista del SAT";TLCAN
|
||||
FSM;"Micronesia (los Estados Federados de)";;;;
|
||||
MDA;"Moldavia (la República de)";;;;
|
||||
MCO;Mónaco;;;;
|
||||
MNG;Mongolia;;;;
|
||||
MNE;Montenegro;;;;
|
||||
MSR;Montserrat;;;;
|
||||
MOZ;Mozambique;;;;
|
||||
NAM;Namibia;;;;
|
||||
NRU;Nauru;;;;
|
||||
NPL;Nepal;;;;
|
||||
NIC;Nicaragua;;;;
|
||||
NER;"Níger (el)";;;;
|
||||
NGA;Nigeria;;;;
|
||||
NIU;Niue;;;;
|
||||
NOR;Noruega;;;;
|
||||
NCL;"Nueva Caledonia";;;;
|
||||
NZL;"Nueva Zelanda";;;;
|
||||
OMN;Omán;;;;
|
||||
NLD;"Países Bajos (los)";;;;"Unión Europea"
|
||||
PAK;Pakistán;;;;
|
||||
PLW;Palaos;;;;
|
||||
PSE;"Palestina, Estado de";;;;
|
||||
PAN;Panamá;;;;
|
||||
PNG;"Papúa Nueva Guinea";;;;
|
||||
PRY;Paraguay;;;;
|
||||
PER;Perú;;;;
|
||||
PYF;"Polinesia Francesa";;;;
|
||||
POL;Polonia;;;;"Unión Europea"
|
||||
PRT;Portugal;;;;"Unión Europea"
|
||||
PRI;"Puerto Rico";;;;
|
||||
GBR;"Reino Unido (el)";;;;"Unión Europea"
|
||||
CAF;"República Centroafricana (la)";;;;
|
||||
CZE;"República Checa (la)";;;;"Unión Europea"
|
||||
MKD;"Macedonia (la antigua República Yugoslava de)";;;;
|
||||
COG;Congo;;;;
|
||||
COD;"Congo (la República Democrática del)";;;;
|
||||
DOM;"República Dominicana (la)";;;;
|
||||
REU;Reunión;;;;
|
||||
RWA;Ruanda;;;;
|
||||
ROU;Rumania;;;;"Unión Europea"
|
||||
RUS;"Rusia, (la) Federación de";;;;
|
||||
ESH;"Sahara Occidental";;;;
|
||||
WSM;Samoa;;;;
|
||||
ASM;"Samoa Americana";;;;
|
||||
BLM;"San Bartolomé";;;;
|
||||
KNA;"San Cristóbal y Nieves";;;;
|
||||
SMR;"San Marino";;;;
|
||||
MAF;"San Martín (parte francesa)";;;;
|
||||
SPM;"San Pedro y Miquelón";;;;
|
||||
VCT;"San Vicente y las Granadinas";;;;
|
||||
SHN;"Santa Helena, Ascensión y Tristán de Acuña";;;;
|
||||
LCA;"Santa Lucía";;;;
|
||||
STP;"Santo Tomé y Príncipe";;;;
|
||||
SEN;Senegal;;;;
|
||||
SRB;Serbia;;;;
|
||||
SYC;Seychelles;;;;
|
||||
SLE;"Sierra leona";;;;
|
||||
SGP;Singapur;;;;
|
||||
SXM;"Sint Maarten (parte holandesa)";;;;
|
||||
SYR;"Siria, (la) República Árabe";;;;
|
||||
SOM;Somalia;;;;
|
||||
LKA;"Sri Lanka";;;;
|
||||
SWZ;Suazilandia;;;;
|
||||
ZAF;Sudáfrica;;;;
|
||||
SDN;"Sudán (el)";;;;
|
||||
SSD;"Sudán del Sur";;;;
|
||||
SWE;Suecia;;;;"Unión Europea"
|
||||
CHE;Suiza;;;;
|
||||
SUR;Surinam;;;;
|
||||
SJM;"Svalbard y Jan Mayen";;;;
|
||||
THA;Tailandia;;;;
|
||||
TWN;"Taiwán (Provincia de China)";;;;
|
||||
TZA;"Tanzania, República Unida de";;;;
|
||||
TJK;Tayikistán;;;;
|
||||
IOT;"Territorio Británico del Océano Índico (el)";;;;
|
||||
ATF;"Territorios Australes Franceses (los)";;;;
|
||||
TLS;Timor-Leste;;;;
|
||||
TGO;Togo;;;;
|
||||
TKL;Tokelau;;;;
|
||||
TON;Tonga;;;;
|
||||
TTO;"Trinidad y Tobago";;;;
|
||||
TUN;Túnez;;;;
|
||||
TKM;Turkmenistán;;;;
|
||||
TUR;Turquía;;;;
|
||||
TUV;Tuvalu;;;;
|
||||
UKR;Ucrania;;;;
|
||||
UGA;Uganda;;;;
|
||||
URY;Uruguay;;;;
|
||||
UZB;Uzbekistán;;;;
|
||||
VUT;Vanuatu;;;;
|
||||
VAT;"Santa Sede[Estado de la Ciudad del Vaticano] (la)";;;;
|
||||
VEN;"Venezuela, República Bolivariana de";;;;
|
||||
VNM;"Viet Nam";;;;
|
||||
WLF;"Wallis y Futuna";;;;
|
||||
YEM;Yemen;;;;
|
||||
DJI;Yibuti;;;;
|
||||
ZMB;Zambia;;;;
|
||||
ZWE;Zimbabue;;;;
|
||||
ZZZ;"Países no declarados";;;;
|
|
44
database/seeders/sat_cache/c_percepcion.csv
Normal file
44
database/seeders/sat_cache/c_percepcion.csv
Normal file
@ -0,0 +1,44 @@
|
||||
001;Sueldos, Salarios Rayas y Jornales;Gravado
|
||||
002;Gratificación Anual (Aguinaldo);Gravado y Exento
|
||||
003;Participación de los Trabajadores en las Utilidades PTU;Gravado y Exento
|
||||
004;Reembolso de Gastos Médicos Dentales y Hospitalarios;Gravado y Exento
|
||||
005;Fondo de Ahorro;Gravado y Exento
|
||||
006;Caja de ahorro;Gravado y Exento
|
||||
009;Contribuciones a Cargo del Trabajador Pagadas por el Patrón;Gravado
|
||||
010;Premios por puntualidad;Gravado
|
||||
011;Prima de Seguro de vida;Gravado y Exento
|
||||
012;Seguro de Gastos Médicos Mayores;Gravado y Exento
|
||||
013;Cuotas Sindicales Pagadas por el Patrón;Gravado
|
||||
014;Subsidios por incapacidad;Gravado y Exento
|
||||
015;Becas para trabajadores y/o hijos;Gravado y Exento
|
||||
019;Horas extra;Gravado y Exento
|
||||
020;Prima dominical;Gravado y Exento
|
||||
021;Prima vacacional;Gravado y Exento
|
||||
022;Prima por antigüedad;Gravado y Exento
|
||||
023;Pagos por separación;Gravado y Exento
|
||||
024;Seguro de retiro;Gravado y Exento
|
||||
025;Indemnizaciones;Gravado y Exento
|
||||
026;Reembolso por funeral;Gravado y Exento
|
||||
027;Cuotas de seguridad social pagadas por el patrón;Exento
|
||||
028;Comisiones;Gravado
|
||||
029;Vales de despensa;Gravado y Exento
|
||||
030;Vales de restaurante;Gravado y Exento
|
||||
031;Vales de gasolina;Gravado y Exento
|
||||
032;Vales de ropa;Gravado y Exento
|
||||
033;Ayuda para renta;Gravado y Exento
|
||||
034;Ayuda para artículos escolares;Gravado y Exento
|
||||
035;Ayuda para anteojos;Gravado y Exento
|
||||
036;Ayuda para transporte;Gravado y Exento
|
||||
037;Ayuda para gastos de funeral;Gravado y Exento
|
||||
038;Otros ingresos por salarios;Gravado y Exento
|
||||
039;Jubilaciones, pensiones o haberes de retiro;Gravado y Exento
|
||||
044;Jubilaciones, pensiones o haberes de retiro en parcialidades;Gravado y Exento
|
||||
045;Ingresos en acciones o títulos valor que representan bienes;Gravado y Exento
|
||||
046;Ingresos asimilados a salarios;Gravado y Exento
|
||||
047;Alimentación diferentes a los establecidos en el Art 94 último párrafo LISR;Gravado y Exento
|
||||
048;Habitación;Gravado y Exento
|
||||
049;Premios por asistencia;Gravado
|
||||
050;Viáticos;Gravado y Exento
|
||||
051;Pagos por gratificaciones, primas, compensaciones, recompensas u otros a extrabajadores derivados de jubilación en parcialidades;Gravado y Exento
|
||||
052;Pagos que se realicen a extrabajadores que obtengan una jubilación en parcialidades derivados de la ejecución de resoluciones judicial o de un laudo;Gravado y Exento
|
||||
053;Pagos que se realicen a extrabajadores que obtengan una jubilación en una sola exhibición derivados de la ejecución de resoluciones judicial o de un laudo;Gravado y Exento
|
|
13
database/seeders/sat_cache/c_regimen_contratacion.csv
Normal file
13
database/seeders/sat_cache/c_regimen_contratacion.csv
Normal file
@ -0,0 +1,13 @@
|
||||
2;Sueldos y salarios
|
||||
3;Jubilados
|
||||
4;Pensionados
|
||||
5;Asimilados a salarios, Miembros de las Sociedades Cooperativas de Producción
|
||||
6;Asimilados a salarios, Integrantes de Sociedades y Asociaciones Civiles
|
||||
7;Asimilados a salarios, Miembros de consejos directivos, de vigilancia, consultivos, honorarios a administradores, comisarios y gerentes generales
|
||||
8;Asimilados a salarios, Actividad empresarial (comisionistas)
|
||||
9;Asimilados a salarios, Honorarios asimilados a salarios
|
||||
10;Asimilados a salarios, Ingresos acciones o títulos valor
|
||||
11;Asimilados otros
|
||||
12;Jubilados o Pensionados
|
||||
13;Indemnización o Separación
|
||||
99;Otro Regimen
|
|
19
database/seeders/sat_cache/c_regimenfiscal.csv
Normal file
19
database/seeders/sat_cache/c_regimenfiscal.csv
Normal file
@ -0,0 +1,19 @@
|
||||
601;"General de Ley Personas Morales";No;Sí;2022-01-01;
|
||||
603;"Personas Morales con Fines no Lucrativos";No;Sí;2022-01-01;
|
||||
605;"Sueldos y Salarios e Ingresos Asimilados a Salarios";Sí;No;2022-01-01;
|
||||
606;Arrendamiento;Sí;No;2022-01-01;
|
||||
607;"Régimen de Enajenación o Adquisición de Bienes";Sí;No;2022-01-01;
|
||||
608;"Demás ingresos";Sí;No;2022-01-01;
|
||||
610;"Residentes en el Extranjero sin Establecimiento Permanente en México";Sí;Sí;2022-01-01;
|
||||
611;"Ingresos por Dividendos (socios y accionistas)";Sí;No;2022-01-01;
|
||||
612;"Personas Físicas con Actividades Empresariales y Profesionales";Sí;No;2022-01-01;
|
||||
614;"Ingresos por intereses";Sí;No;2022-01-01;
|
||||
615;"Régimen de los ingresos por obtención de premios";Sí;No;2022-01-01;
|
||||
616;"Sin obligaciones fiscales";Sí;No;2022-01-01;
|
||||
620;"Sociedades Cooperativas de Producción que optan por diferir sus ingresos";No;Sí;2022-01-01;
|
||||
621;"Incorporación Fiscal";Sí;No;2022-01-01;
|
||||
622;"Actividades Agrícolas, Ganaderas, Silvícolas y Pesqueras";No;Sí;2022-01-01;
|
||||
623;"Opcional para Grupos de Sociedades";No;Sí;2022-01-01;
|
||||
624;Coordinados;No;Sí;2022-01-01;
|
||||
625;"Régimen de las Actividades Empresariales con ingresos a través de Plataformas Tecnológicas";Sí;No;2022-01-01;
|
||||
626;"Régimen Simplificado de Confianza";Sí;Sí;2022-01-01;
|
|
24
database/seeders/sat_cache/c_usocfdi.csv
Normal file
24
database/seeders/sat_cache/c_usocfdi.csv
Normal file
@ -0,0 +1,24 @@
|
||||
G01;"Adquisición de mercancías.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625,626"
|
||||
G02;"Devoluciones, descuentos o bonificaciones.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 616, 620, 621, 622, 623, 624, 625,626"
|
||||
G03;"Gastos en general.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I01;Construcciones.;Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I02;"Mobiliario y equipo de oficina por inversiones.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I03;"Equipo de transporte.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I04;"Equipo de computo y accesorios.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I05;"Dados, troqueles, moldes, matrices y herramental.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I06;"Comunicaciones telefónicas.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I07;"Comunicaciones satelitales.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
I08;"Otra maquinaria y equipo.";Sí;Sí;2022-01-01;;"601, 603, 606, 612, 620, 621, 622, 623, 624, 625, 626"
|
||||
D01;"Honorarios médicos, dentales y gastos hospitalarios.";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D02;"Gastos médicos por incapacidad o discapacidad.";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D03;"Gastos funerales.";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D04;Donativos.;Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D05;"Intereses reales efectivamente pagados por créditos hipotecarios (casa habitación).";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D06;"Aportaciones voluntarias al SAR.";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D07;"Primas por seguros de gastos médicos.";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D08;"Gastos de transportación escolar obligatoria.";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D09;"Depósitos en cuentas para el ahorro, primas que tengan como base planes de pensiones.";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
D10;"Pagos por servicios educativos (colegiaturas).";Sí;No;2022-01-01;;"605, 606, 608, 611, 612, 614, 607, 615, 625"
|
||||
S01;"Sin efectos fiscales.";Sí;Sí;2022-01-01;;"601, 603, 605, 606, 608, 610, 611, 612, 614, 616, 620, 621, 622, 623, 624, 607, 615, 625, 626"
|
||||
CP01;Pagos;Sí;Sí;2022-01-01;;"601, 603, 605, 606, 608, 610, 611, 612, 614, 616, 620, 621, 622, 623, 624, 607, 615, 625, 626"
|
||||
CN01;Nómina;Sí;No;2022-01-01;;605
|
|
23
database/seeders/sat_cache/version.txt
Normal file
23
database/seeders/sat_cache/version.txt
Normal file
@ -0,0 +1,23 @@
|
||||
📄 Versión de los Catálogos SAT
|
||||
-----------------------------------
|
||||
📌 Archivo XLSX: catCFDI_V_4_20250227.xls
|
||||
📅 Fecha de generación: 2025-03-10 23:49:15
|
||||
-----------------------------------
|
||||
📂 Archivos CSV generados:
|
||||
- c_formapago.csv (22 filas)
|
||||
- c_moneda.csv (183 filas)
|
||||
- c_codigopostal.csv (95748 filas)
|
||||
- c_regimenfiscal.csv (19 filas)
|
||||
- c_pais.csv (250 filas)
|
||||
- c_usocfdi.csv (24 filas)
|
||||
- c_claveprodserv.csv (52513 filas)
|
||||
- c_claveunidad.csv (2418 filas)
|
||||
- c_aduana.csv (50 filas)
|
||||
- c_colonia.csv (145366 filas)
|
||||
- c_estado.csv (95 filas)
|
||||
- c_localidad.csv (664 filas)
|
||||
- c_municipio.csv (2463 filas)
|
||||
-----------------------------------
|
||||
🔗 Información del paquete:
|
||||
- Packagist: https://packagist.org/packages/koneko/laravel-sat-catalogs
|
||||
- Git Repo: https://git.koneko.mx/koneko/laravel-sat-catalogs
|
31
dev/bootstrap.php
Executable file
31
dev/bootstrap.php
Executable file
@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
// Cargar el autoload desde el directorio adecuado
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
use Koneko\SatCatalogs\Bootstrap\CustomApplication;
|
||||
use Illuminate\Config\Repository as Config;
|
||||
|
||||
$app = new CustomApplication(
|
||||
dirname(__DIR__) // Directorio raíz del paquete
|
||||
);
|
||||
|
||||
// 🔥 Definir el namespace manualmente para evitar errores
|
||||
$app->instance('config', new Config([
|
||||
'app' => [
|
||||
'name' => 'Koneko SAT Catalogs',
|
||||
'namespace' => 'Koneko\\SatCatalogs\\',
|
||||
],
|
||||
]));
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Console\Kernel::class,
|
||||
Koneko\SatCatalogs\Console\Kernel::class
|
||||
);
|
||||
|
||||
$app->singleton(
|
||||
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||
Illuminate\Foundation\Exceptions\Handler::class
|
||||
);
|
||||
|
||||
return $app;
|
13
dev/storage/logs/laravel.log
Normal file
13
dev/storage/logs/laravel.log
Normal file
@ -0,0 +1,13 @@
|
||||
[2025-03-10 23:42:24] production.ERROR: The /mnt/md0/www/laravel-modules/laravel-sat-catalogs/dev/bootstrap/cache directory must be present and writable. {"exception":"[object] (Exception(code: 0): The /mnt/md0/www/laravel-modules/laravel-sat-catalogs/dev/bootstrap/cache directory must be present and writable. at /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php:179)
|
||||
[stacktrace]
|
||||
#0 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(132): Illuminate\\Foundation\\PackageManifest->write(Array)
|
||||
#1 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(108): Illuminate\\Foundation\\PackageManifest->build()
|
||||
#2 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(91): Illuminate\\Foundation\\PackageManifest->getManifest()
|
||||
#3 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(80): Illuminate\\Foundation\\PackageManifest->config('aliases')
|
||||
#4 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\\Foundation\\PackageManifest->aliases()
|
||||
#5 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(342): Illuminate\\Foundation\\Bootstrap\\RegisterFacades->bootstrap(Object(Koneko\\SatCatalogs\\Bootstrap\\CustomApplication))
|
||||
#6 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(474): Illuminate\\Foundation\\Application->bootstrapWith(Array)
|
||||
#7 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(196): Illuminate\\Foundation\\Console\\Kernel->bootstrap()
|
||||
#8 /mnt/md0/www/laravel-modules/laravel-sat-catalogs/artisan(14): Illuminate\\Foundation\\Console\\Kernel->handle(Object(Symfony\\Component\\Console\\Input\\ArgvInput), Object(Symfony\\Component\\Console\\Output\\ConsoleOutput))
|
||||
#9 {main}
|
||||
"}
|
14
routes/admin.php
Normal file
14
routes/admin.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Koneko\SatCatalogs\Http\Controllers\SatCatalogController;
|
||||
|
||||
// Grupo raíz para admin con middleware y prefijos comunes
|
||||
Route::prefix('admin/catalogos/sat')->name('admin.core.sat')->middleware(['web', 'auth', 'admin'])->group(function () {
|
||||
// Rutas de UserController
|
||||
Route::controller(SatCatalogController::class)->name('import')->group(function () {
|
||||
Route::get('importar-catalogos', 'import')->name('index');
|
||||
});
|
||||
});
|
||||
|
||||
Route::post('catalogos/sat/get/{type}', [SatCatalogController::class, 'catalogAjax'])->name('admin.core.sat.get.ajax');
|
Loading…
x
Reference in New Issue
Block a user