📋 Reorganización de Comandos Artisan por Tipo de Operación
📊 Comandos Incluidos en Kernel.php
Los siguientes comandos ya están programados en el App\Console\Kernel:
🔄 Mantenimiento del Sistema
word:clear-log- Limpieza de logs (Dom 7:00 AM)maintenance:clean-transactions --days=90- Limpieza transacciones (Dom 3:00 AM)maintenance:clean-archives --days=90- Limpieza archivos (Dom 4:00 AM)queue:prune-batches- Limpieza lotes de cola (Diario)
🔑 Gestión de Tokens
word:create-access-token- Token Invupos (Cada 5 min)word:create-access-token-apc- Token PAC (Cada 5 min)
🏪 Integraciones POS
word:type-payment-lightspeed- Tipos pago Lightspeed (1:00 AM)word:update-invu-pos-module- Lotes Invupos (Cada 30 min)word:update-lightspeed-serie-r- Lightspeed Serie R (Cada 5 min)word:update-lightspeed-module- Lightspeed general (Cada hora)word:update-sql-server-module- SQL Server (6:00 AM)word:update-intuit-orders- QuickBooks (2:00 AM)
⚙️ Configuración Automática
word:extract-organization-configuration-emails- Config emails (Cada 5 min)word:extract-organization-configuration-pac- Config PAC (Cada hora)
📄 Facturación Electrónica
fe:verify-or-issue-faith-from-issuance- Verificar/Emitir FE (Cada 5 min)
📂 Comandos NO Incluidos en Kernel - Organizados por Tipo
🔧 1. COMANDOS DE DIAGNÓSTICO Y DEBUG
🏎️ Kart21 Diagnosis
DiagnoseKartInvoiceCommand.php→kart:diagnose-invoiceEmitKartOrderCommand.php→kart:emit-orderEmitKartWithCashPayment.php→kart:emit-cash-paymentEmitKartWithCreateFastJobCommand.php→kart:emit-with-jobForceKartInvoiceEmissionCommand.php→kart:force-emissionTestKartRealApiCommand.php→kart:test-real-apiTestKartRealDataCommand.php→kart:test-real-dataTestKart21ServiceCommand.php→kart21:test-serviceTestKart21DecimalPrecision.php→kart21:test-precision
🏭 PAC y Facturación Debug
DebugCreateFastJobVuelto.php→debug:createfastjob-vueltoDebugTheFactoryHKARequest.php→debug:thefactoryhka-requestTestTheFactoryHKAPayload.php→test:thefactoryhka-payloadCorrectElectronicInvoicesWithErrors.php→word:correct-electronic-invoices-with-errorsFixACIcloudReceptorIssues.php→fix:acicloud-receptor-issuesTraceInvoiceNumberFlow.php→trace:invoice-number-flowDebugInvoiceNumberMapping.php→debug:invoice-number-mapping
🔍 Testing General
TestACIcloudApiWithEmission.php→test:acicloud-api-emissionTestACIcloudRealData.php→test:acicloud-real-dataTestACIcloudRegistration.php→test:acicloud-registrationTestACIcloudService.php→test:acicloud-serviceTestAlanubeConnection.php→test:alanube-connectionTestAlanubeDomService.php→test:alanube-dom-serviceTestAlanubeService.php→test:alanube-serviceTestApiReceptorProblem.php→test:api-receptor-problem
💼 2. COMANDOS DE INTEGRACIONES EMPRESARIALES
📚 Zoho Books
TestZohoConnection.php→zoho:test-connectionTestKartToZoho.php→kart:send-to-zoho
💰 QuickBooks/Intuit
UploadSalesGeneralDiaryIntuitCommand.php→intuit:upload-sales-diaryUploadSalesIntuitCommand.php→intuit:upload-salesIntuitSyncStatusCommand.php→intuit:sync-status
⚡ Lightspeed
AnalyzeLightspeedCreditNoteCommand.php→lightspeed:analyze-credit-noteTestLightspeedCreditNoteCommand.php→test:lightspeed-credit-noteTestLightspeedPacEmission.php→test:lightspeed-pac-emissionTestLightspeedPacEmissionReal.php→test:lightspeed-pac-realValidateLightspeedCreditNoteFix.php→validate:lightspeed-credit-note-fix
🏪 3. COMANDOS DE SINCRONIZACIÓN POS
📦 Invupos
CategoryInvuposCommand.php→word:category-invuposCustomerInvuposCommand.php→word:customer-invuposProductInvuposCommand.php→word:product-invuposProviderInvuposCommand.php→word:provider-invuposPurchaseCategoryInvupos.php→word:purchase-category-invuposSubCategoryInvuposCommand.php→word:subcategory-invuposTypePaymentInvuposCommand.php→word:type-payment-invupos
🔄 General POS
CreditNotesCommand.php→word:credit-notesItemMenuCommand.php→word:item-menuPurchaseOrdersCommand.php→word:purchase-ordersSalesOrdersCommand.php→word:sales-orders
📊 4. COMANDOS DE ANÁLISIS Y REPORTES
📈 Resúmenes y Análisis
CreateCreditNotesSummaryCommand.php→create:credit-notes-summaryCreateSalesOrderSummary.php→create:sales-order-summaryPanamaDailyEntryCommand.php→panama:daily-entry
🧮 Testing de Cálculos
TestCreateFastJobCalculation.php→test:createfastjob-calculationTestInvoiceQuantityNormalization.php→test:invoice-quantity-normalization
🛠️ 5. COMANDOS DE CONFIGURACIÓN Y MANTENIMIENTO
🏗️ Configuración de Base de Datos
AddColumnToOrganizationsTableCommand.php→config:add-column-organizationsAlterColumnIncrementCommand.php→config:alter-column-incrementCreateTableFromStubCommand.php→config:create-table-from-stubRemoveColumnToOrganizationsTableCommand.php→config:remove-column-organizationsRemoveColumnsGjeHeaderImp.php→config:remove-columns-gje-header
🧹 Limpieza Manual
CleanOldArchivesCommand.php→maintenance:clean-archivesCleanOldTransactionsCommand.php→maintenance:clean-transactionsClearLogFile.php→word:clear-log
📤 Importación/Exportación
ExportData.php→export:dataImportData.php→import:data
🎯 6. COMANDOS ESPECÍFICOS DE TESTING
🧪 Testing de Meypar
DebugMeyparEmission.php→debug:meypar-emissionMeyparTestComplete.php→meypar:test-completeTestMeyparApiNormalization.php→test:meypar-api-normalizationTestMeyparNormalization.php→test:meypar-normalizationTestMeyparOnlyProcessing.php→test:meypar-only-processingTestMeyparPayments.php→test:meypar-paymentsTestMeyparQuantityOnly.php→test:meypar-quantity-onlyTestMeyparRealFlow.php→test:meypar-real-flowTestMeyparSpecificData.php→test:meypar-specific-data
🔬 Testing de Procesos
CreateAlanubeConfigAndTestMeypar.php→create:alanube-config-test-meyparCreateFastJobWrapper.php→create:fastjob-wrapperCreateFastJobWrapperFixed.php→create:fastjob-wrapper-fixedTestOriginalProblem.php→test:original-problemTestTransactionSystem.php→test:transaction-systemTestingIndex.php→testing:index
📅 7. COMANDOS DE PROCESOS PERIÓDICOS
⏰ Actualizaciones de Estado
UpdateAppointmentStatus.php→update:appointment-statusUpdateBooqableModule.php→word:update-booqable-module
🔐 Tokens Específicos
CreateAccessTokenSerieRCommand.php→word:create-access-token-serie-r
🤖 Procesos Ezete
EzeeteCommand.php→ezete:process
📝 Recomendaciones de Reorganización
🚨 Comandos Críticos que Deberían Incluirse en Kernel:
Alta Prioridad - Producción
// Corrección automática de facturas con errores
$schedule->command('word:correct-electronic-invoices-with-errors')->everyThirtyMinutes();
// Verificación de estado de citas
$schedule->command('update:appointment-status')->hourly();
// Token Serie R
$schedule->command('word:create-access-token-serie-r')->everyFiveMinutes();
// Proceso Ezete
$schedule->command('ezete:process')->everyTenMinutes();
Media Prioridad - Sincronización
// Sincronización Zoho para organizaciones que lo requieran
$schedule->command('kart:send-to-zoho')->hourly()->when(function () {
// Solo si hay conexiones Zoho activas
return \App\Models\Connection::where('application', 'zoho-self-client')->where('active', true)->exists();
});
// Módulo Booqable
$schedule->command('word:update-booqable-module')->everyThirtyMinutes();
🧪 Comandos de Testing - Solo para Desarrollo
Los comandos en la carpeta Testing/ y comandos de debug deberían:
- Mantenerse en desarrollo/staging
- Excluirse de producción via environment check
- Documentarse en docs/testing/
🗂️ Comandos Manuales - Administrativos
Los comandos de configuración y análisis deberían:
- Ejecutarse manualmente por administradores
- Documentarse en docs/technical/
- No programarse automáticamente
📋 Estructura Recomendada del Kernel
protected function schedule(Schedule $schedule)
{
// === MANTENIMIENTO CRÍTICO ===
$schedule->command('word:clear-log')->cron('0 7 * * 0');
$schedule->command('maintenance:clean-transactions --days=90')->cron('0 3 * * 0');
$schedule->command('maintenance:clean-archives --days=90')->cron('0 4 * * 0');
$schedule->command('queue:prune-batches')->daily();
// === TOKENS Y AUTENTICACIÓN ===
$schedule->command('word:create-access-token')->everyFiveMinutes();
$schedule->command('word:create-access-token-apc')->everyFiveMinutes();
$schedule->command('word:create-access-token-serie-r')->everyFiveMinutes();
// === INTEGRACIONES POS PRINCIPALES ===
$schedule->command('word:type-payment-lightspeed')->cron('0 1 * * *');
$schedule->command('word:update-invu-pos-module')->everyThirtyMinutes();
$schedule->command('word:update-lightspeed-serie-r')->everyFiveMinutes();
$schedule->command('word:update-lightspeed-module')->hourly();
$schedule->command('word:update-sql-server-module')->cron('0 6 * * *');
$schedule->command('word:update-intuit-orders')->cron('0 2 * * *');
// === CONFIGURACIÓN AUTOMÁTICA ===
$schedule->command('word:extract-organization-configuration-emails')->everyFiveMinutes();
$schedule->command('word:extract-organization-configuration-pac')->hourly();
// === FACTURACIÓN ELECTRÓNICA ===
$schedule->command('fe:verify-or-issue-faith-from-issuance')->everyFiveMinutes();
$schedule->command('word:correct-electronic-invoices-with-errors')->everyThirtyMinutes();
// === PROCESOS DE NEGOCIO ===
$schedule->command('update:appointment-status')->hourly();
$schedule->command('ezete:process')->everyTenMinutes();
// === INTEGRACIONES ESPECÍFICAS (CONDICIONALES) ===
$schedule->command('word:update-booqable-module')->everyThirtyMinutes()->when(function () {
return config('integrations.booqable.enabled', false);
});
}
🎯 Resumen Ejecutivo
- ✅ Incluidos en Kernel: 15 comandos programados
- 📋 Disponibles: ~120 comandos adicionales
- 🚨 Críticos para incluir: 4 comandos
- 🔄 Opcionales para incluir: 2 comandos
- 🧪 Solo testing: ~30 comandos
- 🔧 Solo manuales: ~70 comandos
Total: ~135 comandos artisan en el sistema DocuCenter