Saltar a contenido

📋 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.phpkart:diagnose-invoice
  • EmitKartOrderCommand.phpkart:emit-order
  • EmitKartWithCashPayment.phpkart:emit-cash-payment
  • EmitKartWithCreateFastJobCommand.phpkart:emit-with-job
  • ForceKartInvoiceEmissionCommand.phpkart:force-emission
  • TestKartRealApiCommand.phpkart:test-real-api
  • TestKartRealDataCommand.phpkart:test-real-data
  • TestKart21ServiceCommand.phpkart21:test-service
  • TestKart21DecimalPrecision.phpkart21:test-precision

🏭 PAC y Facturación Debug

  • DebugCreateFastJobVuelto.phpdebug:createfastjob-vuelto
  • DebugTheFactoryHKARequest.phpdebug:thefactoryhka-request
  • TestTheFactoryHKAPayload.phptest:thefactoryhka-payload
  • CorrectElectronicInvoicesWithErrors.phpword:correct-electronic-invoices-with-errors
  • FixACIcloudReceptorIssues.phpfix:acicloud-receptor-issues
  • TraceInvoiceNumberFlow.phptrace:invoice-number-flow
  • DebugInvoiceNumberMapping.phpdebug:invoice-number-mapping

🔍 Testing General

  • TestACIcloudApiWithEmission.phptest:acicloud-api-emission
  • TestACIcloudRealData.phptest:acicloud-real-data
  • TestACIcloudRegistration.phptest:acicloud-registration
  • TestACIcloudService.phptest:acicloud-service
  • TestAlanubeConnection.phptest:alanube-connection
  • TestAlanubeDomService.phptest:alanube-dom-service
  • TestAlanubeService.phptest:alanube-service
  • TestApiReceptorProblem.phptest:api-receptor-problem

💼 2. COMANDOS DE INTEGRACIONES EMPRESARIALES

📚 Zoho Books

  • TestZohoConnection.phpzoho:test-connection
  • TestKartToZoho.phpkart:send-to-zoho

💰 QuickBooks/Intuit

  • UploadSalesGeneralDiaryIntuitCommand.phpintuit:upload-sales-diary
  • UploadSalesIntuitCommand.phpintuit:upload-sales
  • IntuitSyncStatusCommand.phpintuit:sync-status

⚡ Lightspeed

  • AnalyzeLightspeedCreditNoteCommand.phplightspeed:analyze-credit-note
  • TestLightspeedCreditNoteCommand.phptest:lightspeed-credit-note
  • TestLightspeedPacEmission.phptest:lightspeed-pac-emission
  • TestLightspeedPacEmissionReal.phptest:lightspeed-pac-real
  • ValidateLightspeedCreditNoteFix.phpvalidate:lightspeed-credit-note-fix

🏪 3. COMANDOS DE SINCRONIZACIÓN POS

📦 Invupos

  • CategoryInvuposCommand.phpword:category-invupos
  • CustomerInvuposCommand.phpword:customer-invupos
  • ProductInvuposCommand.phpword:product-invupos
  • ProviderInvuposCommand.phpword:provider-invupos
  • PurchaseCategoryInvupos.phpword:purchase-category-invupos
  • SubCategoryInvuposCommand.phpword:subcategory-invupos
  • TypePaymentInvuposCommand.phpword:type-payment-invupos

🔄 General POS

  • CreditNotesCommand.phpword:credit-notes
  • ItemMenuCommand.phpword:item-menu
  • PurchaseOrdersCommand.phpword:purchase-orders
  • SalesOrdersCommand.phpword:sales-orders

📊 4. COMANDOS DE ANÁLISIS Y REPORTES

📈 Resúmenes y Análisis

  • CreateCreditNotesSummaryCommand.phpcreate:credit-notes-summary
  • CreateSalesOrderSummary.phpcreate:sales-order-summary
  • PanamaDailyEntryCommand.phppanama:daily-entry

🧮 Testing de Cálculos

  • TestCreateFastJobCalculation.phptest:createfastjob-calculation
  • TestInvoiceQuantityNormalization.phptest:invoice-quantity-normalization

🛠️ 5. COMANDOS DE CONFIGURACIÓN Y MANTENIMIENTO

🏗️ Configuración de Base de Datos

  • AddColumnToOrganizationsTableCommand.phpconfig:add-column-organizations
  • AlterColumnIncrementCommand.phpconfig:alter-column-increment
  • CreateTableFromStubCommand.phpconfig:create-table-from-stub
  • RemoveColumnToOrganizationsTableCommand.phpconfig:remove-column-organizations
  • RemoveColumnsGjeHeaderImp.phpconfig:remove-columns-gje-header

🧹 Limpieza Manual

  • CleanOldArchivesCommand.phpmaintenance:clean-archives
  • CleanOldTransactionsCommand.phpmaintenance:clean-transactions
  • ClearLogFile.phpword:clear-log

📤 Importación/Exportación

  • ExportData.phpexport:data
  • ImportData.phpimport:data

🎯 6. COMANDOS ESPECÍFICOS DE TESTING

🧪 Testing de Meypar

  • DebugMeyparEmission.phpdebug:meypar-emission
  • MeyparTestComplete.phpmeypar:test-complete
  • TestMeyparApiNormalization.phptest:meypar-api-normalization
  • TestMeyparNormalization.phptest:meypar-normalization
  • TestMeyparOnlyProcessing.phptest:meypar-only-processing
  • TestMeyparPayments.phptest:meypar-payments
  • TestMeyparQuantityOnly.phptest:meypar-quantity-only
  • TestMeyparRealFlow.phptest:meypar-real-flow
  • TestMeyparSpecificData.phptest:meypar-specific-data

🔬 Testing de Procesos

  • CreateAlanubeConfigAndTestMeypar.phpcreate:alanube-config-test-meypar
  • CreateFastJobWrapper.phpcreate:fastjob-wrapper
  • CreateFastJobWrapperFixed.phpcreate:fastjob-wrapper-fixed
  • TestOriginalProblem.phptest:original-problem
  • TestTransactionSystem.phptest:transaction-system
  • TestingIndex.phptesting:index

📅 7. COMANDOS DE PROCESOS PERIÓDICOS

⏰ Actualizaciones de Estado

  • UpdateAppointmentStatus.phpupdate:appointment-status
  • UpdateBooqableModule.phpword:update-booqable-module

🔐 Tokens Específicos

  • CreateAccessTokenSerieRCommand.phpword:create-access-token-serie-r

🤖 Procesos Ezete

  • EzeeteCommand.phpezete: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