{
  "target_php": "8.3.36",
  "scope": {
    "roots": [
      "menu.php",
      "menu-new.php",
      "inicio.php"
    ],
    "application_files_reviewed": 480,
    "method": "Static traversal of literal PHP links, forms, includes, and resolvable directory/constant paths. Bundled vendor/archive directories are excluded from menu traversal and covered separately by the PHP migration audit. Runtime-generated links and role-specific navigation still require authenticated functional testing."
  },
  "source_files": [
    "aba-menu.php",
    "abonarNC.php",
    "abonardocumento.php",
    "abonardocumentocompra.php",
    "abonarindent.php",
    "actualiza_slugs.php",
    "actualiza_slugs_sku.php",
    "addons/fedex/fedex.php",
    "arreglaproductoscostoceroendetalle_facvta.php",
    "arreglaproductoscostoceroenproductos.php",
    "asignactactedetalle.php",
    "asignadetallectacte.php",
    "assets_pdf.php",
    "azure-storage-config.php",
    "balance-estadoresultado.php",
    "balance.php",
    "balance_cmp_pdf.php",
    "balance_pdf.php",
    "book-shipments.php",
    "busca-item-nota-transferencia-new.php",
    "cabecera.php",
    "cabeceraconfecciona.php",
    "cabeceraconfeccionaot.php",
    "cambiacodigo.php",
    "cambiacontrasena.php",
    "cambiaprecio2.php",
    "cargadetallepagoprovee.php",
    "cargaitems.php",
    "cargaitems_new.php",
    "columna.php",
    "commissions.php",
    "compound-payment-back.php",
    "compound-payments.php",
    "conexionsolowp.php",
    "confecciona.php",
    "confecciona2.php",
    "confecciona2_new.php",
    "confecciona_new.php",
    "config.php",
    "consulta-producto-v2.php",
    "consulta-producto.php",
    "consultaTB.php",
    "consultacuentasporcobrar.php",
    "consultadoctos-docto-27.php",
    "consultadoctos.php",
    "consultadoctoscompra.php",
    "consultadoctoscompra2.php",
    "conta-menu.php",
    "core/backorder.php",
    "core/json-request.php",
    "core/logger.php",
    "creditnote.php",
    "critical-stock-amazon-fba-back.php",
    "critical-stock-amazon-fba.php",
    "critical-stock-back.php",
    "critical-stock-by-top-sales-amazon.php",
    "critical-stock-by-top-sales.php",
    "critical-stock-menu.php",
    "critical-stock-po-rules.php",
    "critical-stock-v2.php",
    "critical-stock.php",
    "cron-fix-cost-rates.php",
    "cron-page.php",
    "cron_mertranano.php",
    "cronbalance.php",
    "cronbitacora.php",
    "crons_/config.php",
    "crons_/cron-auto-invoice.php",
    "crons_/cron-fix-cost-rates.php",
    "crons_/cron-fix-costs.php",
    "crons_/querys.php",
    "ctacteprov.php",
    "customerQueries.php",
    "delayed.php",
    "detalleccp.php",
    "detalleingresosegresos.php",
    "dispatch-back.php",
    "dispatch-menu.php",
    "dispatch.php",
    "doindent.php",
    "doinvoice-quote-back.php",
    "doinvoice-quote.php",
    "doinvoice-warehouse-transfer-list.php",
    "doinvoice-warehouse-transfer.php",
    "doinvoice.php",
    "doinvoiceof44saleasset.php",
    "doinvoiceofsaleasset.php",
    "duplicaproducto.php",
    "editAddress.php",
    "editComments.php",
    "editContacts.php",
    "editabitacora.php",
    "editacategoria.php",
    "editacc.php",
    "editaccd.php",
    "editacliente.php",
    "editactacte.php",
    "editadepre.php",
    "editaegreso.php",
    "editaevacorre.php",
    "editaevaextra.php",
    "editaevaotros.php",
    "editaevapnc.php",
    "editaevapreve.php",
    "editafamilia.php",
    "editapagina.php",
    "editaprivilegio.php",
    "editaproducto.php",
    "editaproductolight.php",
    "editasupercategoria.php",
    "editatipocliente.php",
    "editatipoingreso.php",
    "editausuario.php",
    "eliminactacte.php",
    "eliminadetalle.php",
    "eliminaitem.php",
    "estadoresultado.php",
    "evaluacapa.php",
    "evaluavta.php",
    "exi-menu.php",
    "exportalibrocompra.php",
    "exportalisdifproddeta.php",
    "facturarot.php",
    "fechador.php",
    "fichabitacora.php",
    "fichacategoria.php",
    "fichacc.php",
    "fichaccd.php",
    "fichacliente.php",
    "fichaconfecciona.php",
    "fichaconfecciona2_new.php",
    "fichactacte.php",
    "fichadepre.php",
    "fichaegreso.php",
    "fichaevacorre.php",
    "fichaevaluacapa.php",
    "fichaevaluaserv.php",
    "fichaevaluavta.php",
    "fichaevaluavtanew.php",
    "fichaevaotros.php",
    "fichaevapnc.php",
    "fichafamilia.php",
    "fichanuevaot.php",
    "fichapagina.php",
    "fichaparametros-new.php",
    "fichaprivilegio.php",
    "fichaproducto-back.php",
    "fichaproducto.php",
    "fichaproductolight.php",
    "fichasupercategoria.php",
    "fichatarea.php",
    "fichatipocliente.php",
    "fichatraspaso.php",
    "fichausuario.php",
    "follow-up-customers.php",
    "formpagacon.php",
    "funciones.php",
    "get-checkout-mistakes.php",
    "global-brand-assessment-preview.php",
    "global-brand-links.php",
    "global-brand-manual-preview-page.php",
    "global-brand-review.php",
    "global-brand-test-preview.php",
    "global-brand/auth.php",
    "global-brand/email-api.php",
    "global-brand/inside-sales-content.php",
    "global-brand/job-description-lib.php",
    "global-brand/start-approval-lib.php",
    "global-brand/test-data/job-description-logistics-es.php",
    "global-brand/test-email.php",
    "global-brand/test-lib.php",
    "global-brand/test-review.php",
    "grababoleta.php",
    "grabafactura.php",
    "grabafacturanv.php",
    "grabanotacredito.php",
    "grabaotrasfacturacompra.php",
    "grabapagoprovee.php",
    "grabaventadesdeindent.php",
    "graficojs.php",
    "historyBlacklist.php",
    "iframepdf.php",
    "import-amazon.php",
    "import-authorize-json.php",
    "import-bank-of-america-data.php",
    "import-bank-of-america-json.php",
    "import-chase-checking-json.php",
    "import-chase-visa-business-json.php",
    "import-ebay.php",
    "import-paypal-json.php",
    "import-queries-back.php",
    "importaproductos.php",
    "importar.php",
    "incoterm.php",
    "index.php",
    "inicio.php",
    "intransit-inventory-reserved.php",
    "invoice-quote.php",
    "invoice.php",
    "iso.php",
    "itemscompraconfecciona.php",
    "itemscompragastoconfecciona.php",
    "itemsconfecciona.php",
    "itemsconfecciona_new.php",
    "itemsncgastoconfecciona.php",
    "itemsotp.php",
    "itemsotped.php",
    "itemsots.php",
    "itemsotsed.php",
    "leedirectorio2.php",
    "libcompra.php",
    "libvta.php",
    "links.php",
    "lisdifdetaprod.php",
    "lisdifproddeta.php",
    "lislisvtaper.php",
    "lisprodtopcanvta.php",
    "lisprodtopmonvta.php",
    "list-tax-exemption-back.php",
    "list-tax-exemption.php",
    "listausuarios.php",
    "lisveristock.php",
    "lisveristockexcesivo.php",
    "lisverivendedor.php",
    "lisversal.php",
    "lisvtaper.php",
    "login-status.php",
    "mailer/exception.php",
    "mailer/mailer.php",
    "mailer/smtp.php",
    "mailer/wrapper.php",
    "mailer2/exception.php",
    "mailer2/mailer.php",
    "mailer2/smtp.php",
    "mailer2/wrapper.php",
    "make_credit_note.php",
    "make_credit_note_v2-back.php",
    "manage-prices-back.php",
    "manage-prices.php",
    "margin-editor.php",
    "marketplaces-back.php",
    "marketplaces-menu.php",
    "marketplaces-orphans.php",
    "marketplaces-products-editor.php",
    "marketplaces-profiles-editor.php",
    "media-ui/index.php",
    "media_ui.php",
    "menu-new.php",
    "menu.php",
    "mergecodigo.php",
    "modifica_precios_venta.php",
    "muestra-categorias.php",
    "muestra-cc.php",
    "muestra-ccd-items-center-cost.php",
    "muestra-ccd.php",
    "muestra-clientes.php",
    "muestra-companies.php",
    "muestra-ctasctes.php",
    "muestra-dashaccount.php",
    "muestra-depre.php",
    "muestra-descartados.php",
    "muestra-evabita.php",
    "muestra-evacapa.php",
    "muestra-evacorre.php",
    "muestra-evaotros.php",
    "muestra-evapnc.php",
    "muestra-evaprov.php",
    "muestra-evaservi.php",
    "muestra-evavta.php",
    "muestra-familias.php",
    "muestra-indent.php",
    "muestra-ingresosegresos.php",
    "muestra-mertransano.php",
    "muestra-notaventas.php",
    "muestra-paginas.php",
    "muestra-parametros.php",
    "muestra-privilegios.php",
    "muestra-productos-sc.php",
    "muestra-productos.php",
    "muestra-productoslight.php",
    "muestra-quotes.php",
    "muestra-supercategorias.php",
    "muestra-tareas.php",
    "muestra-tipoclientes.php",
    "muestra-traspasos.php",
    "muestra-usuarios.php",
    "muestra-vtaporpais.php",
    "muestra_grilla_deuda_a_proveedores.php",
    "muestraaccesos.php",
    "muestrabalanceshistoricos.php",
    "muestracosmerven.php",
    "muestracospromerven.php",
    "muestractacteprod.php",
    "muestractacteprodacumulado.php",
    "muestractacteprodnew.php",
    "muestrainventario-cutdate.php",
    "muestrainventario-warehouse.php",
    "muestrainventario.php",
    "muestrainventarioval.php",
    "muestraots.php",
    "multiconexion.php",
    "nuevaot.php",
    "nuevaot2.php",
    "open-return.php",
    "ordena-categorias.php",
    "ordena-supercategorias.php",
    "outside_plataform.php",
    "overstock.php",
    "packinglist.php",
    "paginador.php",
    "paginador1.php",
    "pagoaprovee.php",
    "pagoprovee3sumario.php",
    "phpqrcode/qrbitstream.php",
    "phpqrcode/qrconfig.php",
    "phpqrcode/qrconst.php",
    "phpqrcode/qrencode.php",
    "phpqrcode/qrimage.php",
    "phpqrcode/qrinput.php",
    "phpqrcode/qrlib.php",
    "phpqrcode/qrmask.php",
    "phpqrcode/qrrscode.php",
    "phpqrcode/qrspec.php",
    "phpqrcode/qrsplit.php",
    "phpqrcode/qrtools.php",
    "pidefechand.php",
    "pidenrocreditnote.php",
    "plpackpdf.php",
    "plqrpdf.php",
    "portal-embed.php",
    "print_serial_get_img.php",
    "print_serial_get_img_new.php",
    "procesa-cabecera-nota-transferencia-new.php",
    "procesa-documentfull-nota-transferencia-new.php",
    "procesa-item-nota-transferencia-new.php",
    "procesa_modifica_precios_venta.php",
    "procesaabonodocumento.php",
    "procesaabonodocumentocompra.php",
    "procesaabonoindent.php",
    "procesaacceso2.php",
    "procesaacciones.php",
    "procesabitacora.php",
    "procesacabecera44saleasset.php",
    "procesacabeceraindent.php",
    "procesacabecerasaleasset.php",
    "procesacambiaprecio2.php",
    "procesacambiocontrasena.php",
    "procesacategoria.php",
    "procesacc.php",
    "procesaccd.php",
    "procesacierreevaluacion.php",
    "procesacliente.php",
    "procesaconfecciona.php",
    "procesactacte.php",
    "procesadepre.php",
    "procesaeditatipoingreso.php",
    "procesaegreso.php",
    "procesaevacorre.php",
    "procesaevaluacapa.php",
    "procesaevaluaserv.php",
    "procesaevaluavta.php",
    "procesaevaotros.php",
    "procesaevapnc.php",
    "procesafacturarot.php",
    "procesafamilia.php",
    "procesainicioot.php",
    "procesaitemotp.php",
    "procesaitemots.php",
    "procesapagina.php",
    "procesapagocompra.php",
    "procesaparametro.php",
    "procesaparametroautomaticoUSA.php",
    "procesaprivilegio.php",
    "procesaproductolight.php",
    "procesasupercategoria.php",
    "procesatarea.php",
    "procesatipocliente.php",
    "procesatipohallazgo.php",
    "procesatraspaso.php",
    "procesausuario.php",
    "procod-barcode-pdf-v2.php",
    "product-comment-azure-issue.php",
    "product-comment-azure.php",
    "product-suppliers.php",
    "product_editor.php",
    "product_ranking.php",
    "products-with-empty-fields.php",
    "profit_and_loss_cmp_pdf.php",
    "profit_and_loss_pdf.php",
    "prowinch-portal-php/app/Auth.php",
    "prowinch-portal-php/app/AzureBlobStorage.php",
    "prowinch-portal-php/app/Database.php",
    "prowinch-portal-php/app/Env.php",
    "prowinch-portal-php/app/Http.php",
    "prowinch-portal-php/app/LegacyQaConfig.php",
    "prowinch-portal-php/app/PortalEmbed.php",
    "prowinch-portal-php/app/PortalTranslation.php",
    "prowinch-portal-php/app/bootstrap.php",
    "prowinch-portal-php/config/embed-tenants.php",
    "qr.php",
    "quality-assurance-comment-idempotency.php",
    "quality-assurance-email.php",
    "quality-assurance-img.php",
    "quality-assurance.php",
    "quality-assurance/access-control.php",
    "querys.php",
    "querysxajax.php",
    "quote_calculations.php",
    "raise-water-level-cl.php",
    "raise-water-level-co.php",
    "raise-water-level.php",
    "receiving-menu.php",
    "receiving-transfer-detail-view.php",
    "receiving-transfer-partially.php",
    "receiving-transfer.php",
    "receiving-warehouse-transfer-back.php",
    "receiving.php",
    "report-customer-account-img.php",
    "report-customer-account.php",
    "resdetegr.php",
    "reseller.php",
    "restotegr.php",
    "restoting.php",
    "returns-form.php",
    "sale-stats.php",
    "sales-advertising-back.php",
    "sales-advertising.php",
    "sales-map2.php",
    "sales-menu.php",
    "savefield.php",
    "serials.php",
    "sgc.php",
    "specs_editor.php",
    "specs_field_bullet_point.php",
    "specs_fields_editor.php",
    "split_lines.php",
    "sumarioconfecciona.php",
    "sumarioconfecciona_new.php",
    "sumarioconfeccionaot.php",
    "supplier_map.php",
    "suppliers-addresses.php",
    "suppliers-api.php",
    "suppliers-blacklist.php",
    "suppliers-comments.php",
    "suppliers-contacts.php",
    "suppliers.php",
    "tablas_basicas.php",
    "tarea.php",
    "traspasos.php",
    "upload_family_manual.php",
    "validausuario.php",
    "verabonos.php",
    "verbalancehistorico.php",
    "vercabeceraconfeccionaot.php",
    "vercartolas.php",
    "verdocto.php",
    "verfichaevaluaserv.php",
    "verfichaproducto.php",
    "verfotosvideos.php",
    "verglosapago.php",
    "verictactedetalle.php",
    "veridetallectacte.php",
    "verisal.php",
    "veristock.php",
    "veristockexcesivo.php",
    "verivendedor.php",
    "verot.php",
    "verpopupclientes.php",
    "verproducto.php",
    "verqr.php",
    "versumarioconfeccionaot.php",
    "view-images-video.php",
    "visor.php",
    "vta-menu.php",
    "vtastransbankexp.php",
    "warehouse-items-new.php",
    "warehouse.php",
    "warranty-claims.php",
    "wms_serials.php",
    "z_lista_backorder.php"
  ],
  "fixed_sources": [
    "compound-payment-back.php",
    "consultadoctos.php",
    "consultadoctoscompra.php",
    "core/json-request.php",
    "critical-stock-back.php",
    "crons_/querys.php",
    "customerQueries.php",
    "detalleccp.php",
    "dispatch-back.php",
    "doinvoice-quote-back.php",
    "doinvoice.php",
    "fichabitacora.php",
    "import-queries-back.php",
    "list-tax-exemption-back.php",
    "mailer/mailer.php",
    "mailer2/mailer.php",
    "manage-prices-back.php",
    "marketplaces-back.php",
    "muestra-categorias.php",
    "muestra-clientes.php",
    "muestra-descartados.php",
    "muestra-evabita.php",
    "muestra-evacapa.php",
    "muestra-evacorre.php",
    "muestra-evaotros.php",
    "muestra-evapnc.php",
    "muestra-evaprov.php",
    "muestra-evaservi.php",
    "muestra-evavta.php",
    "muestra-familias.php",
    "muestra-paginas.php",
    "muestra-privilegios.php",
    "muestra-productoslight.php",
    "muestra-supercategorias.php",
    "muestra-tipoclientes.php",
    "muestra-usuarios.php",
    "muestra-vtaporpais.php",
    "muestrabalanceshistoricos.php",
    "muestrainventarioval.php",
    "muestraots.php",
    "paginador.php",
    "phpqrcode/qrinput.php",
    "querys.php",
    "receiving-warehouse-transfer-back.php",
    "wms_serials.php"
  ],
  "fixes": [
    {
      "area": "Customer list",
      "files": [
        "muestra-clientes.php"
      ],
      "details": "Removed the obsolete query that executed LIMIT ,50; eliminated an undefined count, initialized empty filter merges, normalized pagination/filter selections, and parameterized country/state SQL."
    },
    {
      "area": "Legacy pagination",
      "details": "Normalize navigation, page size, page count and SQL offsets to bounded integers; construct fresh SQL statements with assignment instead of appending to undefined or reused variables."
    },
    {
      "area": "Numeric totals",
      "files": [
        "muestra-vtaporpais.php",
        "querys.php",
        "crons_/querys.php"
      ],
      "details": "Initialize sales, credit-note and incoming-stock accumulators to zero; initialize chart counters for empty result sets."
    },
    {
      "area": "Form arguments",
      "files": [
        "querys.php",
        "crons_/querys.php",
        "fichabitacora.php"
      ],
      "details": "Allow absent initial selections in legacy dropdown helpers, allow the unused optional customer context argument, and supply the bitacora classification argument."
    },
    {
      "area": "Historical balance snapshots",
      "files": [
        "muestrabalanceshistoricos.php"
      ],
      "details": "Use string lengths instead of count(string), fix the regex variable typo, supply strings to stripos, and handle snapshots without header matches."
    },
    {
      "area": "Invoice availability",
      "files": [
        "doinvoice.php"
      ],
      "details": "Supply the warehouse quantity and positions to both sprintf placeholders."
    },
    {
      "area": "Historical serial generator",
      "files": [
        "wms_serials.php"
      ],
      "details": "Route the historical stock initializer through its original SKU-based generator; retain the current PO generator for calls with header and correlative."
    },
    {
      "area": "Kanji QR",
      "files": [
        "phpqrcode/qrinput.php"
      ],
      "details": "Declare the pure bit-count helper static to match its invocation."
    },
    {
      "area": "JSON requests",
      "files": [
        "core/json-request.php"
      ],
      "details": "Guard ten menu API endpoints against empty, malformed, null or scalar JSON before extract(); return HTTP 400 JSON for invalid bodies."
    },
    {
      "area": "S/MIME signatures",
      "files": [
        "mailer/mailer.php",
        "mailer2/mailer.php"
      ],
      "details": "Pass real temporary file paths to OpenSSL and close temporary handles on both success and failure."
    }
  ],
  "validation": {
    "php_version": "8.3.36",
    "syntax": {
      "files": 484,
      "errors": 0,
      "short_open_tag": false
    },
    "php_compatibility": {
      "files": 49,
      "errors": 0,
      "warnings": 0,
      "ruleset": ".phpcs-php83.xml"
    },
    "regressions": [
      {
        "test": "intranet/tests/customers_page_regression_test.php",
        "result": "passed",
        "cases": 12
      },
      {
        "test": "intranet/tests/menu_php83_regression_test.php",
        "result": "passed",
        "coverage": [
          "navigation and SQL offsets",
          "optional form arguments",
          "historical snapshot parsing",
          "numeric database string accumulators in both helper copies",
          "warehouse message formatting",
          "Kanji QR"
        ]
      },
      {
        "test": "intranet/tests/json_request_php83_test.php",
        "result": "passed",
        "cases": 9
      },
      {
        "test": "intranet/tests/mail_signing_php83_test.php",
        "result": "passed",
        "libraries": [
          "mailer",
          "mailer2"
        ],
        "coverage": "Generate and cryptographically verify signed MIME messages without sending email."
      },
      {
        "test": "intranet/tests/invoice_shipping_fields_test.php",
        "result": "passed",
        "cases": 30
      },
      {
        "test": "intranet/tests/quotes_nullable_collections_test.php",
        "result": "passed"
      }
    ],
    "portable_library_patch": {
      "file": "patches/php83-bundled-libraries.patch",
      "files": 328,
      "reverse_dry_run_with_zero_fuzz": "passed"
    },
    "static_analysis": {
      "tool": "PHPStan 2.3.1, level 5, target 80336",
      "analyzed_files": 477,
      "raw_diagnostics": 7952,
      "notes": "Raw diagnostics are not confirmed runtime errors. This legacy application shares globals across includes and duplicates function/class names across independent entry points; these produce many undefined-variable and ambiguous-signature diagnostics. Definite type/argument failures were reviewed and corrected. Remaining diagnostics have not all been resolved."
    },
    "live_customer_page": {
      "authenticated_workflow_verified": false,
      "notes": "An anonymous request reaches the login gate; it does not execute the customer listing. Regression cases exercise the actual listing preparation using database fixtures."
    }
  },
  "pending_functional_review": {
    "legacy_function_references": [
      {
        "file": "crons_/querys.php",
        "line": 2269,
        "diagnostic": "Function ResultadoAnoEnCurso not found."
      },
      {
        "file": "muestra-evaprov.php",
        "line": 235,
        "diagnostic": "Function TraeUsuarioGenera not found."
      },
      {
        "file": "muestra-evaservi.php",
        "line": 177,
        "diagnostic": "Function TraeDatosOT not found."
      },
      {
        "file": "muestra-evaservi.php",
        "line": 199,
        "diagnostic": "Function TraeClienteOT not found."
      },
      {
        "file": "muestra-evavta.php",
        "line": 202,
        "diagnostic": "Function TraeUsuarioQueGeneroDocumento not found."
      },
      {
        "file": "muestra-evavta.php",
        "line": 203,
        "diagnostic": "Function TraeVendedorDocumento not found."
      },
      {
        "file": "querys.php",
        "line": 2292,
        "diagnostic": "Function ResultadoAnoEnCurso not found."
      }
    ],
    "missing_include_references": [
      {
        "file": "doinvoiceof44saleasset.php",
        "line": 2684,
        "diagnostic": "Path in include() \"abonardocumentonew44.php\" is not a file or it does not exist."
      },
      {
        "file": "doinvoiceofsaleasset.php",
        "line": 2683,
        "diagnostic": "Path in include() \"abonardocumentonew44.php\" is not a file or it does not exist."
      },
      {
        "file": "editaevaextra.php",
        "line": 24,
        "diagnostic": "Path in include() \"fichaevaextra.php\" is not a file or it does not exist."
      },
      {
        "file": "editaevapreve.php",
        "line": 25,
        "diagnostic": "Path in include() \"fichaevapreve.php\" is not a file or it does not exist."
      },
      {
        "file": "querys.php",
        "line": 4605,
        "diagnostic": "Path in include() \"modalidad_vta.php\" is not a file or it does not exist."
      },
      {
        "file": "querys.php",
        "line": 4618,
        "diagnostic": "Path in include() \"modalidad_vta.php\" is not a file or it does not exist."
      }
    ],
    "notes": "These older workflows reference helpers/templates absent from their active dependencies. Their replacements and database contracts require functional validation; they are not marked fixed."
  },
  "limits": [
    "No production record writes, invoice postings, stock initialization or email sends were performed for verification.",
    "Menu screens behind authentication still need an end-to-end pass with an authenticated session.",
    "Static traversal cannot guarantee coverage of links or paths assembled from runtime data."
  ]
}
