<!DOCTYPE html>
<html lang="en" class="light-style layout-menu-fixed" dir="ltr" data-theme="theme-default" data-assets-path="../assets/" data-template="vertical-menu-template-free">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0" />
    <title>Agregar Producto</title>
    <meta name="description" content="" />
    <!-- Favicon -->
    <link rel="icon" type="image/x-icon" href="../assets/img/favicon/favicon.ico" />
    <!-- Fonts -->
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link href="https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap" rel="stylesheet" />

    <!-- Icons. Uncomment required icon fonts -->
    <link rel="stylesheet" href="../assets/vendor/fonts/boxicons.css" />

    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdn.datatables.net/1.10.21/css/dataTables.bootstrap4.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../css/estilosdetablas.css">
    <link rel="stylesheet" href="../css/botonesfiltros.css">
    <link rel="stylesheet" href="../css/botonexportar.css">


    <!-- Core CSS -->
    <link rel="stylesheet" href="../assets/vendor/css/core.css" class="template-customizer-core-css" />
    <link rel="stylesheet" href="../assets/vendor/css/theme-default.css" class="template-customizer-theme-css" />
    <link rel="stylesheet" href="../assets/css/demo.css" />

    <!-- Vendors CSS -->
    <link rel="stylesheet" href="../assets/vendor/libs/perfect-scrollbar/perfect-scrollbar.css" />

    <link rel="stylesheet" href="../assets/vendor/libs/apex-charts/apex-charts.css" />

    <!-- Page CSS -->

    <!-- Helpers -->
    <script src="../assets/vendor/js/helpers.js"></script>
    <script src="../assets/js/config.js"></script>
</head>
<style>
    /* Tabla de linea */
    #pais_table_container {
        background-color: white;
        border: 1px solid #099dff;
        max-height: 200px;
        overflow-y: auto;
    }

    #pais_table_body tr {
        cursor: pointer;
    }

    #pais_table_body tr:hover {
        background-color: #f0f0f0;
    }

    /* Moneda */
    #moneda_table_container {
        background-color: white;
        border: 1px solid #099dff;
        max-height: 200px;
        overflow-y: auto;
    }

    #moneda_table_body tr {
        cursor: pointer;
    }

    #moneda_table_body tr:hover {
        background-color: #f0f0f0;
    }

    body {
        display: flex;
        min-height: 100vh;
        flex-direction: column;
    }

    .sidebar {
        flex: 0 0 250px;
    }

    .banner {
        position: fixed;
        top: 0;
        left: 250px;
        width: calc(100% - 250px);
        background-color: #fff;
        padding: 10px;
        color: white;
        z-index: 1000;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: left 0.3s, width 0.3s;
        border-bottom: 1px solid #cbd0dd;
    }

    .content {
        flex: 1;
        padding: 20px;
        margin-left: 250px;
    }

    /*
        .container {
            max-width: 1000px;
            margin: auto;
        } */
    .collapsed {
        margin-left: 0;
    }

    .user-dropdown {
        display: none;
    }

    .user-dropdown.show {
        display: block;
    }

    /* Contenedor */
    .container {
        padding: 20px;
        width: 100%;

        display: flex;
        align-items: center;
    }

    .row {
        background-color: #fff;
        border-radius: 16px;
    }

    /* General styles for the wizard */
    .vertical-wizard {
        margin: 30px;
    }

    .vertical-wizard .bs-stepper {
        display: flex;
    }

    .vertical-wizard .nav {
        border-right: 1px solid #e4e6ef;
        width: 25%;
        /* Adjust as needed */
        justify-content: center;
    }

    .vertical-wizard .nav-item {
        border-bottom: 1px solid #e4e6ef;
    }

    .vertical-wizard .nav-link {
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        color: #6c757d;
        background: #f8f9fc;
        border-radius: 10px;
        position: relative;
        text-align: center;
        border-left: 4px solid transparent;
        transition: background-color 0.3s, border-color 0.3s;
    }

    .vertical-wizard .nav-link.active {
        background: #fff;
        color: #009dff;
        border-left-color: #009dff;
    }

    .vertical-wizard .nav-link i {
        font-size: 24px;
        margin-bottom: 10px;
        display: inline-block;
        padding: 10px;
        border-radius: 50%;
        background: #e9ecef;
        color: #7367f0;
    }

    .vertical-wizard .nav-link span {
        font-size: 14px;
        font-weight: 600;
        color: #37465A;
    }

    /* Styles for the content area */
    .tab-content {
        background: #fff;
        padding: 30px;
        /* border: 1px solid #e4e6ef; */
        border-left: none;
        border-radius: 0 6px 6px 6px;
        width: 100%;
        /* Adjust as needed */
        height: 92%;
    }

    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .btn-primary:hover {
        background-color: #009DFF;
        border-color: #009DFF;
    }

    .btn-secondary {
        background-color: #009DFF;
        color: #009DFF;
        border-color: #f4f5f7;
    }

    .btn-secondary:hover {
        background-color: #009DFF;
        color: #009DFF;
        border-color: #e9ecef;
    }

    #form-proveedor {
        width: 100%;
    }



    .form-buttons {
        bottom: 0;
        left: 0;
        right: 0;
        background-color: #fff;
        /* Fondo blanco para que los botones sean visibles */
        padding: 10px;
        display: flex;
        justify-content: space-between;
    }

    .nav {
        display: flex;
        width: 100%;
    }

    /* navegación de productos  */
    .nav-link {
        transition: all 0.3s ease-in-out;
    }

    .nav-link:hover {
        background-color: #ccc;
        color: #333;
    }

    .bs-stepper .nav-item {
        flex: 1;
        /* Cada item ocupa un ancho proporcional */
        max-width: 100%;
        /* Asegura que no exceda el 100% del contenedor */
        text-align: center;
        /* Centra el contenido dentro de cada nav-item */
        padding: 10px;
        box-sizing: border-box;
        /* Incluye el padding en el tamaño total */
    }

    /* Estilo de los radios */
    .radio-list {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    .radio-list label {
        margin-right: 20px;
    }

    .a {
        padding: 20px;
        width: 100%;
        display: flex;
        align-items: center;
    }

    /* PRUEBA */
    /* General styles for the wizard */
    .vertical-wizard {
        margin: 30px;
    }

    .vertical-wizard .bs-stepper {
        display: flex;
    }

    .vertical-wizard .nav {
        border-right: 1px solid #e4e6ef;
        width: 25%;
        /* Adjust as needed */
        justify-content: center;
    }

    .vertical-wizard .nav-item {
        border-bottom: 1px solid #e4e6ef;
    }

    .vertical-wizard .nav-link {
        padding: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        color: #6c757d;
        background: #f8f9fc;
        border-radius: 10px;
        position: relative;
        text-align: center;
        border-left: 4px solid transparent;
        transition: background-color 0.3s, border-color 0.3s;
    }

    .vertical-wizard .nav-link.active {
        background: #fff;
        color: #009DFF;
        border-left-color: #009DFF;
    }

    .vertical-wizard .nav-link i {
        font-size: 24px;
        margin-bottom: 10px;
        display: inline-block;
        padding: 10px;
        border-radius: 50%;
        background: #e9ecef;
        color: #009DFF;
    }

    .vertical-wizard .nav-link span {
        font-size: 14px;
        font-weight: 600;
        color: #37465A;
    }

    .registros-label {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 10px;

    }

    .impuestos-label {
        font-size: 18px;
        font-weight: bold;
        margin-bottom: 10px;

    }

    .modal-dialog {
        display: flex;
        align-items: center;
        min-height: calc(100vh - 1rem);
    }

    .checkmark-container {
        width: 80px;
        height: 80px;
        display: inline-block;
        position: relative;
    }

    .checkmark {
        width: 100%;
        height: 100%;
        border-radius: 50%;
        position: relative;
        border: 5px solid #28a745;
        box-sizing: border-box;
    }

    .checkmark::after {
        content: '';
        position: absolute;
        width: 25px;
        height: 50px;
        border: solid #28a745;
        border-width: 0 5px 5px 0;
        top: 5px;
        /* Ajuste para centrar verticalmente */
        left: 25px;
        /* Ajuste para centrar horizontalmente */
        transform: rotate(45deg);
        opacity: 0;
        transition: opacity 0.4s ease-in-out;
        /* Más lento */
    }

    .checkmark.draw::after {
        opacity: 1;
    }

    .checkmark.draw {
        animation: scale 0.6s ease-in-out forwards;
        /* Más lento */
    }

    @keyframes scale {
        0% {
            transform: scale(0);
        }

        100% {
            transform: scale(1);
        }
    }

    /* Esquemas */
    #esquemas_table_container {
        background-color: white;
        border: 1px solid #099DFF;
        max-height: 200px;
        overflow-y: auto;
    }

    #esquemas_table_body tr {
        cursor: pointer;
    }

    #esquemas_table_body tr:hover {
        background-color: #f0f0f0;
    }

    #moneda_table_container {
        background-color: white;
        border: 1px solid #099dff;
        max-height: 200px;
        overflow-y: auto;
        width: 300px;
        left: 297px;
        top: 270px;
        z-index: 1000;

    }

    #moneda_table_body tr {
        cursor: pointer;
    }

    #moneda_table_body tr:hover {
        background-color: #f0f0f0;
    }

    /* Tabla de datos adicionales */
    .table-custom {
        color: #0d6efd;
        /* Color del texto azul */
    }

    .table-custom th {
        background-color: #009DFF;
        /* Color de fondo azul para el encabezado */
        color: white;
        /* Color del texto blanco para el encabezado */
    }

    .col-md-12 .mt-3 {
        box-shadow: none;
        /* Sin sombra para el contenedor */
    }

    .card {
        box-shadow: none;
        /* Sin sombra para la tarjeta */
    }

    .card:hover {
        box-shadow: none;
        /* Sin sombra en hover para la tarjeta */
    }



    .form-buttons .btn {
        background-color: #009DFF;
        /* Color de fondo */
        border: none;
        color: white;
        /* Color del texto */
        padding: 10px 20px;
        border-radius: 5px;
        cursor: pointer;
    }

    .form-buttons .btn:hover {
        background-color: #007BB5;
        /* Color al pasar el ratón */
    }

    h1,
    .mb-4 {
        font-weight: 800;
    }

    h1,
    .mb-4 {
        font-weight: 800;
    }
</style>

<body>
    <!-- Layout wrapper -->
    <div class="layout-wrapper layout-content-navbar">
        <div class="layout-container">
            <!-- Menu -->

            <aside id="layout-menu" class="layout-menu menu-vertical menu bg-menu-theme">
                <div class="app-brand demo">
                    <a href="index.html" class="app-brand-link">
                        <span class="app-brand-logo demo">
                            <svg
                                width="25"
                                viewBox="0 0 25 42"
                                version="1.1"
                                xmlns="http://www.w3.org/2000/svg"
                                xmlns:xlink="http://www.w3.org/1999/xlink">
                                <defs>
                                    <path
                                        d="M13.7918663,0.358365126 L3.39788168,7.44174259 C0.566865006,9.69408886 -0.379795268,12.4788597 0.557900856,15.7960551 C0.68998853,16.2305145 1.09562888,17.7872135 3.12357076,19.2293357 C3.8146334,19.7207684 5.32369333,20.3834223 7.65075054,21.2172976 L7.59773219,21.2525164 L2.63468769,24.5493413 C0.445452254,26.3002124 0.0884951797,28.5083815 1.56381646,31.1738486 C2.83770406,32.8170431 5.20850219,33.2640127 7.09180128,32.5391577 C8.347334,32.0559211 11.4559176,30.0011079 16.4175519,26.3747182 C18.0338572,24.4997857 18.6973423,22.4544883 18.4080071,20.2388261 C17.963753,17.5346866 16.1776345,15.5799961 13.0496516,14.3747546 L10.9194936,13.4715819 L18.6192054,7.984237 L13.7918663,0.358365126 Z"
                                        id="path-1"></path>
                                    <path
                                        d="M5.47320593,6.00457225 C4.05321814,8.216144 4.36334763,10.0722806 6.40359441,11.5729822 C8.61520715,12.571656 10.0999176,13.2171421 10.8577257,13.5094407 L15.5088241,14.433041 L18.6192054,7.984237 C15.5364148,3.11535317 13.9273018,0.573395879 13.7918663,0.358365126 C13.5790555,0.511491653 10.8061687,2.3935607 5.47320593,6.00457225 Z"
                                        id="path-3"></path>
                                    <path
                                        d="M7.50063644,21.2294429 L12.3234468,23.3159332 C14.1688022,24.7579751 14.397098,26.4880487 13.008334,28.506154 C11.6195701,30.5242593 10.3099883,31.790241 9.07958868,32.3040991 C5.78142938,33.4346997 4.13234973,34 4.13234973,34 C4.13234973,34 2.75489982,33.0538207 2.37032616e-14,31.1614621 C-0.55822714,27.8186216 -0.55822714,26.0572515 -4.05231404e-15,25.8773518 C0.83734071,25.6075023 2.77988457,22.8248993 3.3049379,22.52991 C3.65497346,22.3332504 5.05353963,21.8997614 7.50063644,21.2294429 Z"
                                        id="path-4"></path>
                                    <path
                                        d="M20.6,7.13333333 L25.6,13.8 C26.2627417,14.6836556 26.0836556,15.9372583 25.2,16.6 C24.8538077,16.8596443 24.4327404,17 24,17 L14,17 C12.8954305,17 12,16.1045695 12,15 C12,14.5672596 12.1403557,14.1461923 12.4,13.8 L17.4,7.13333333 C18.0627417,6.24967773 19.3163444,6.07059163 20.2,6.73333333 C20.3516113,6.84704183 20.4862915,6.981722 20.6,7.13333333 Z"
                                        id="path-5"></path>
                                </defs>
                                <g id="g-app-brand" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
                                    <g id="Brand-Logo" transform="translate(-27.000000, -15.000000)">
                                        <g id="Icon" transform="translate(27.000000, 15.000000)">
                                            <g id="Mask" transform="translate(0.000000, 8.000000)">
                                                <mask id="mask-2" fill="white">
                                                    <use xlink:href="#path-1"></use>
                                                </mask>
                                                <use fill="#696cff" xlink:href="#path-1"></use>
                                                <g id="Path-3" mask="url(#mask-2)">
                                                    <use fill="#696cff" xlink:href="#path-3"></use>
                                                    <use fill-opacity="0.2" fill="#FFFFFF" xlink:href="#path-3"></use>
                                                </g>
                                                <g id="Path-4" mask="url(#mask-2)">
                                                    <use fill="#696cff" xlink:href="#path-4"></use>
                                                    <use fill-opacity="0.2" fill="#FFFFFF" xlink:href="#path-4"></use>
                                                </g>
                                            </g>
                                            <g
                                                id="Triangle"
                                                transform="translate(19.000000, 11.000000) rotate(-300.000000) translate(-19.000000, -11.000000) ">
                                                <use fill="#696cff" xlink:href="#path-5"></use>
                                                <use fill-opacity="0.2" fill="#FFFFFF" xlink:href="#path-5"></use>
                                            </g>
                                        </g>
                                    </g>
                                </g>
                            </svg>
                        </span>
                        <span class="app-brand-text demo menu-text fw-bolder ms-2">Sneat</span>
                    </a>

                    <a href="javascript:void(0);" class="layout-menu-toggle menu-link text-large ms-auto d-block d-xl-none">
                        <i class="bx bx-chevron-left bx-sm align-middle"></i>
                    </a>
                </div>

                <div class="menu-inner-shadow"></div>

                <ul class="menu-inner py-1">
                    <!-- Dashboard
            <li class="menu-item active">
              <a href="index.html" class="menu-link">
                <i class="menu-icon tf-icons bx bx-home-circle"></i>
                <div data-i18n="Analytics">Dashboard</div>
              </a>
            </li> -->


                    <!-- Layouts -->
                    <li class="menu-item active open ">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-layout"></i>
                            <div data-i18n="Layouts">Inicio</div>
                        </a>

                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="tablero.php" class="menu-link">
                                    <div data-i18n="Without menu">Tablero</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="nuevo_cliente.php" class="menu-link">
                                    <div data-i18n="Without navbar">Agregar Cliente</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="nuevo_proveedor.php" class="menu-link">
                                    <div data-i18n="Container">Agregar Proveedor</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="nueva_cotizacion.php" class="menu-link">
                                    <div data-i18n="Fluid">Agregar Cotizacion</div>
                                </a>
                            </li>
                            <li class="menu-item active">
                                <a href="nuevo_producto.php" class="menu-link">
                                    <div data-i18n="Blank">Agregar Producto</div>
                                </a>
                            </li>

                            <li class="menu-item">
                                <a href="nueva_compra.php" class="menu-link">
                                    <div data-i18n="Blank">Agregar Compra</div>
                                </a>
                            </li>

                            <li class="menu-item">
                                <a href="nueva_factura.php" class="menu-link">
                                    <div data-i18n="Blank">Agregar Factura</div>
                                </a>
                            </li>

                        </ul>
                    </li>

                    <li class="menu-header small text-uppercase">
                        <span class="menu-header-text">Aspel SAE</span>
                    </li>
                    <li class="menu-item">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-dock-top"></i>
                            <div data-i18n="Account Settings">Ventas</div>
                        </a>
                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="facturas.php" class="menu-link">
                                    <div data-i18n="Account">Facturas</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="notasdeventa.php" class="menu-link">
                                    <div data-i18n="Notifications">Notas de Venta</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="trasladoscartaporte.php" class="menu-link">
                                    <div data-i18n="Connections">Carta Porte</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="remisiones.php" class="menu-link">
                                    <div data-i18n="Connections">Remisiones</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="pedidos.php" class="menu-link">
                                    <div data-i18n="Connections">Pedidos</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="cotizaciones.php" class="menu-link">
                                    <div data-i18n="Connections">Cotizaciones</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="devoluciones.php" class="menu-link">
                                    <div data-i18n="Connections">Devoluciones</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="notasdecredito.php" class="menu-link">
                                    <div data-i18n="Connections">Notas de Crédito</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="parcialidades.php" class="menu-link">
                                    <div data-i18n="Connections">Parcialidades</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="comprobantesdepago.php" class="menu-link">
                                    <div data-i18n="Connections">Comprobantes</div>
                                </a>
                            </li>
                        </ul>
                    </li>

                    <li class="menu-item">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-lock-open-alt"></i>
                            <div data-i18n="Authentications">Clientes</div>
                        </a>
                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="clientes.php" class="menu-link" target="_blank">
                                    <div data-i18n="Basic">Clientes</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="cuentasxcobrar.php" class="menu-link" target="_blank">
                                    <div data-i18n="Basic">Cuentas X Cobrar</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="clientespoliza.php" class="menu-link" target="_blank">
                                    <div data-i18n="Basic">Clientes con Póliza</div>
                                </a>
                            </li>
                        </ul>
                    </li>

                    <li class="menu-item">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-cube-alt"></i>
                            <div data-i18n="Misc">Inventarios</div>
                        </a>
                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="productos.php" class="menu-link">
                                    <div data-i18n="Error">Productos</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="existencias.php" class="menu-link">
                                    <div data-i18n="Under Maintenance">Existencias</div>
                                </a>
                            </li>
                        </ul>
                    </li>


                    <li class="menu-item">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-cube-alt"></i>
                            <div data-i18n="Misc">Compras</div>
                        </a>
                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="compras.php" class="menu-link">
                                    <div data-i18n="Error">Compras</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="recepciones.php" class="menu-link">
                                    <div data-i18n="Under Maintenance">Recepciones</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="ordenes.php" class="menu-link">
                                    <div data-i18n="Under Maintenance">Ordenes</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="requisiciones.php" class="menu-link">
                                    <div data-i18n="Under Maintenance">Requisiciones</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="devoluciones.php" class="menu-link">
                                    <div data-i18n="Under Maintenance">Devoluciones</div>
                                </a>
                            </li>
                        </ul>
                    </li>


                    <li class="menu-item">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-cube-alt"></i>
                            <div data-i18n="Misc">Proveedores</div>
                        </a>
                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="proveedores.php" class="menu-link">
                                    <div data-i18n="Error">Proveedores</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="cuentasxpagar.php" class="menu-link">
                                    <div data-i18n="Under Maintenance">Cuentas X Pagar</div>
                                </a>
                            </li>
                        </ul>
                    </li>


                    <!-- Aspel COI -->
                    <li class="menu-header small text-uppercase"><span class="menu-header-text">Aspel COI</span></li>

                    <!-- Extended components -->
                    <li class="menu-item">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-copy"></i>
                            <div data-i18n="Extended UI">Cuentas y Pólizas</div>
                        </a>
                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="cuentas.php" class="menu-link">
                                    <div data-i18n="Perfect Scrollbar">Cuentas</div>
                                </a>
                            </li>
                            <li class="menu-item">
                                <a href="polizas.php" class="menu-link">
                                    <div data-i18n="Text Divider">Pólizas</div>
                                </a>
                            </li>
                        </ul>
                    </li>

                    <!-- Aspel BANCO -->
                    <li class="menu-header small text-uppercase"><span class="menu-header-text">Aspel BANCO</span></li>
                    <!-- Forms -->
                    <li class="menu-item">
                        <a href="#" class="menu-link menu-toggle">
                            <i class="menu-icon tf-icons bx bx-detail"></i>
                            <div data-i18n="Form Elements">Movimientos</div>
                        </a>
                        <ul class="menu-sub">
                            <li class="menu-item">
                                <a href="movimientos.php" class="menu-link">
                                    <div data-i18n="Basic Inputs">Movimientos</div>
                                </a>
                            </li>
                        </ul>
                    </li>
                </ul>
            </aside>
            <!-- / Menu -->

            <!-- Layout container -->
            <div class="layout-page">
                <!-- Navbar -->

                <nav class="layout-navbar container-xxl navbar navbar-expand-xl navbar-detached align-items-center bg-navbar-theme" id="layout-navbar">
                    <div class="layout-menu-toggle navbar-nav align-items-xl-center me-3 me-xl-0 d-xl-none">
                        <a class="nav-item nav-link px-0 me-xl-4" href="javascript:void(0)">
                            <i class="bx bx-menu bx-sm"></i>
                        </a>
                    </div>

                    <div class="navbar-nav-right d-flex align-items-center" id="navbar-collapse">
                        <!-- Search -->
                        <div class="navbar-nav align-items-center">
                            <div class="nav-item d-flex align-items-center">
                                <i class="bx bx-search fs-4 lh-0"></i>
                                <input
                                    type="text"
                                    class="form-control border-0 shadow-none"
                                    placeholder="Search..."
                                    aria-label="Search..." />
                            </div>
                        </div>
                        <!-- /Search -->

                        <ul class="navbar-nav flex-row align-items-center ms-auto">
                            <!-- Place this tag where you want the button to render. -->
                            <li class="nav-item lh-1 me-3">
                                <a
                                    class="github-button"
                                    href="https://github.com/themeselection/sneat-html-admin-template-free"
                                    data-icon="octicon-star"
                                    data-size="large"
                                    data-show-count="true"
                                    aria-label="Star themeselection/sneat-html-admin-template-free on GitHub">Star</a>
                            </li>

                            <!-- User -->
                            <li class="nav-item navbar-dropdown dropdown-user dropdown">
                                <a class="nav-link dropdown-toggle hide-arrow" href="javascript:void(0);" data-bs-toggle="dropdown">
                                    <div class="avatar avatar-online">
                                        <img src="../assets/img/avatars/1.png" alt class="w-px-40 h-auto rounded-circle" />
                                    </div>
                                </a>
                                <ul class="dropdown-menu dropdown-menu-end">
                                    <li>
                                        <a class="dropdown-item" href="#">
                                            <div class="d-flex">
                                                <div class="flex-shrink-0 me-3">
                                                    <div class="avatar avatar-online">
                                                        <img src="../assets/img/avatars/1.png" alt class="w-px-40 h-auto rounded-circle" />
                                                    </div>
                                                </div>
                                                <div class="flex-grow-1">
                                                    <span class="fw-semibold d-block">John Doe</span>
                                                    <small class="text-muted">Admin</small>
                                                </div>
                                            </div>
                                        </a>
                                    </li>
                                    <li>
                                        <div class="dropdown-divider"></div>
                                    </li>



                                    <li>
                                        <a class="dropdown-item" href="auth-login-basic.html">
                                            <i class="bx bx-power-off me-2"></i>
                                            <span class="align-middle">Cerrar Sesión</span>
                                        </a>
                                    </li>
                                </ul>
                            </li>
                            <!--/ User -->
                        </ul>
                    </div>
                </nav>
                <!-- / Navbar -->


                <script>
                    document.addEventListener("DOMContentLoaded", function() {
                        let menuItems = document.querySelectorAll(".menu-item");
                        menuItems.forEach(item => {
                            item.addEventListener("click", function() {
                                // Remueve "active open" de todos los elementos
                                menuItems.forEach(el => el.classList.remove("active", "open"));
                                // Agrega "active open" solo al elemento clickeado
                                this.classList.add("active", "open");
                            });
                        });
                    });
                </script>

                    <h1 class="mb-2 mt-4 text-center">Nuevo Producto</h1>
                    <div class="container mt-5">
                        <div class="row">
                            <div class="col-md-12">
                                <!-- Form Wizard with Vertical Icons -->
                                <section class="vertical-wizard">
                                    <div class="bs-stepper">
                                        <div class="nav">
                                            <!-- Step 1 -->
                                            <div class="nav-item">
                                                <a class="nav-link" href="#datos-generales">
                                                    <i class="bx bx-user"></i>
                                                    <span>Datos Generales</span>
                                                </a>
                                            </div>
                                            <!-- Step 2 -->
                                            <div class="nav-item">
                                                <a class="nav-link" href="#precios-control">
                                                    <i class="bx bx-cart"></i>
                                                    <span>Precios y control</span>
                                                </a>
                                            </div>
                                            <!-- Step 3 -->
                                            <div class="nav-item">
                                                <a class="nav-link" href="#impuestos">
                                                    <i class="bx bx-history"></i>
                                                    <span>Impuestos</span>
                                                </a>
                                            </div>
                                            <!-- Step 4 -->
                                            <div class="nav-item">
                                                <a class="nav-link" href="#registro-acumulados">
                                                    <i class="bx bx-info-circle"></i>
                                                    <span>Registros y acumulados</span>
                                                </a>
                                            </div>
                                            <!-- Step 5 -->
                                            <div class="nav-item">
                                                <a class="nav-link" href="#datos-adicionales">
                                                    <i class="bx bx-file"></i>
                                                    <span>Datos adicionales</span>
                                                </a>
                                            </div>
                                            <!-- Step 6 -->
                                            <div class="nav-item">
                                                <a class="nav-link" href="#fiscales">
                                                    <i class="bx bx-briefcase"></i>
                                                    <span>Fiscales</span>
                                                </a>
                                            </div>
                                        </div>

                                        <!-- Form Content -->
                                        <form id="form-proveedor" action="leer_producto.php" method="POST" enctype="multipart/form-data">
                                            <div class="tab-content ">
                                                <div id="datos-generales" class="tab-pane fade show active">
                                                    <div class="container">
                                                        <div class="form-row">
                                                            <div class="form-group col-md-8">
                                                                <label for="clave">Clave:</label>
                                                                <input type="text" class="form-control" id="clave" name="clave"
                                                                    placeholder="Clave">
                                                            </div>

                                                            <div class="form-group col-md-4 mt-md-4">
                                                                <!-- Boton de DOCTOS tiene el estilo inclido -->
                                                                <button type="button" class="btn btn-info btn-sm"
                                                                    style="background-color: #009DFF; color: #ffff;"
                                                                    onclick="alert('Asociar documentos')">
                                                                    <i class="fas fa-file-alt"></i> Asociar Doctos
                                                                </button>
                                                            </div>

                                                            <div class="col-md-8">
                                                                <div class="form-group">
                                                                    <label for="clave_alterna">Clave Alterna:</label>
                                                                    <input type="text" class="form-control" id="clave_alterna" name="clave_alterna"
                                                                        placeholder="Clave Alterna">
                                                                </div>
                                                            </div>

                                                            <div class="col-md-4 mt-md-4">
                                                                <!-- Boton de CLAVE ALTERNA tiene el estilo inclido -->
                                                                <div class="form-group">
                                                                    <button type="button" class="btn btn-sm"
                                                                        style="background-color: #009DFF; color: #ffff;"
                                                                        onclick="alert('Claves Alternas')">
                                                                        <i class="fas fa-key"></i> Claves Alternas
                                                                    </button>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-6">
                                                                <div class="form-group">
                                                                    <label for="descripcion">Descripción:</label>
                                                                    <textarea id="descripcion" class="form-control"
                                                                        placeholder="Descripción" name="descripcion" rows="1"></textarea>
                                                                </div>
                                                            </div>

                                                            <div class="col-md-6">
                                                                <div class="form-group">
                                                                    <label for="imagen">Imagen:</label>
                                                                    <input type="file" id="imagen" name="imagen">
                                                                </div>
                                                            </div>
                                                            <!-- Segunda parte (datos generales) -->
                                                            <div class="col-md-12">
                                                                <div class="font-bold border-b border-gray-400 pb-2">
                                                                    <h5>Datos Históticos</h5>
                                                                </div>
                                                            </div>
                                                            <div style="background-color: #ffffff; padding: 30px; border-radius: 10px;">
                                                                <label style="margin-right: 80px;">
                                                                    <input type="radio" name="tipo_producto" value="P" checked>
                                                                    Producto
                                                                </label>
                                                                <label style="margin-right: 80px;">
                                                                    <input type="radio" name="tipo_producto" value="S">
                                                                    Servicio
                                                                </label>
                                                                <label style="margin-right: 80px;">
                                                                    <input type="radio" name="tipo_producto" value="K">
                                                                    Kit
                                                                </label>
                                                                <label style="margin-right: 70px;">
                                                                    <input type="radio" name="tipo_producto" value="G">
                                                                    Grupo de producto
                                                                </label>
                                                            </div>
                                                            <!-- Contenedor de la Tabla de Lineas -->
                                                            <div class="row">
                                                                <class="col-md-3">
                                                                    <div class="form-group">
                                                                        <label for="cve_pais">Linea</label>
                                                                        <div class="input-group">
                                                                            <input type="text" class="form-control" id="cve_pais" name="cve_pais" placeholder="Linea" readonly>
                                                                            <div class="input-group-append">
                                                                                <span class="input-group-text" style="background-color: #009dff; color: #fff; cursor: pointer;" id="pais-dropdown">
                                                                                    <i class="fas fa-chevron-down"></i>
                                                                                </span>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                            </div>

                                                            <div id="pais_table_container" class="position-absolute" style="display:none; z-index: 1000; width: 300px;">
                                                                <table class="table table-bordered table-striped">
                                                                    <thead>
                                                                        <tr>
                                                                            <th>Linea</th>
                                                                            <th>Descripción</th>
                                                                            <th>Cuenta Contable</th>
                                                                        </tr>
                                                                    </thead>
                                                                    <tbody id="pais_table_body">
                                                                        <?php
                                                                        // Conexión a la base de datos Firebird
                                                                        session_start();
                                                                        $host = 'localhost';
                                                                        $database = 'C:\Program Files (x86)\Common Files\Aspel\Sistemas Aspel\SAE9.00\Ejemplos\Ejemplos.FDB';
                                                                        $username = 'SYSDBA';
                                                                        $password = 'masterkey';

                                                                        try {
                                                                            $dbh = new PDO("firebird:host=$host;dbname=$database;charset=UTF8", $username, $password);
                                                                            $query = "SELECT CVE_LIN, DESC_LIN, CUENTA_COI FROM CLIN01";
                                                                            $stmt = $dbh->prepare($query);
                                                                            $stmt->execute();

                                                                            while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                                                                                echo "<tr class='pais-row' data-cve-pais='" . $row['CVE_LIN'] . "' data-descr='" . $row['DESC_LIN'] . "'>";
                                                                                echo "<td>" . $row['CVE_LIN'] . "</td>";
                                                                                echo "<td>" . $row['DESC_LIN'] . "</td>";
                                                                                echo "<td>" . $row['CUENTA_COI'] . "</td>";
                                                                                echo "</tr>";
                                                                            }
                                                                        } catch (PDOException $e) {
                                                                            echo "Error: " . $e->getMessage();
                                                                        }
                                                                        ?>
                                                                    </tbody>
                                                                </table>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="tiempo_surt">Tiempo de surtido:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="Tiempo de surtido" id="tiempo_surt"
                                                                        name="tiempo_surt">
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="control_alm">Control de Almacen:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="Control de Almacen" id="control_alm"
                                                                        name="control_alm">
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="volumen">Volumen:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="¿Cual es Volumen?" id="volumen"
                                                                        name="volumen">
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="peso">Peso:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="¿Cual es Peso?" id="peso"
                                                                        name="peso">
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="uni_entrada">Unidad de entrada:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="Unidad de entrad" id="uni_entrada"
                                                                        name="uni_entrada">
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="uni_salida">Unidad de salida:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="Unidad de salida" id="uni_salida"
                                                                        name="uni_salida">
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="fac_unidades">Factor entre unidades:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="Factor" id="fac_unidades" name="fac_unidades">
                                                                </div>
                                                            </div>
                                                            <div class="col-md-4">
                                                                <div class="form-group">
                                                                    <label for="uni_empaque">Unidad de empaque:</label>
                                                                    <input type="text" class="form-control"
                                                                        placeholder="Unidad de empaque" id="uni_empaque"
                                                                        name="uni_empaque">
                                                                </div>
                                                            </div>
                                                            <div style="background-color: #ffffff; padding: 10px; border-radius: 5px;">
                                                                <label style="margin-right: 110px;">
                                                                    <input type="checkbox" name="con_serie" value="S"> Números de serie
                                                                    <span style="color: #666; cursor: help;" title="Más información sobre números de serie">&#x2754;</span>
                                                                </label>
                                                                <label style="margin-right: 140px;">
                                                                    <input type="checkbox" name="con_lote" value="S"> Lotes
                                                                    <span style="color: #666; cursor: help;" title="Más información sobre lotes">&#x2754;</span>
                                                                </label>
                                                                <label style="margin-right: 10px;">
                                                                    <input type="checkbox" name="con_pedimento" value="S"> Pedimentos aduanales
                                                                    <span style="color: #666; cursor: help;" title="Más información sobre pedimentos aduanales">&#x2754;</span>
                                                                </label>
                                                            </div>

                                                        </div>
                                                    </div>
                                                </div>

                                                <!-- Step 2 Content (Datos de Compras) -->
                                                <div id="precios-control" class="tab-pane fade">
                                                    <div class="p-4 rounded-lg  flex space-x-4">
                                                        <!-- Precios Section -->
                                                        <div class="p-4 rounded-lg">
                                                            <div class="mb-4">
                                                                <h2 class="font-bold border-b border-gray-400 pb-2">Precios</h2>
                                                                <div class="form-group flex items-center space-x-2 mt-2">
                                                                    <label class="w-32" style="color: #37465A; font-weight: normal;">Precio público</label>
                                                                    <input type="text" class="form-control border rounded p-1 w-32"
                                                                        value="0.000000" name="precio_pub">
                                                                    <button
                                                                        class="px-2 py-1 rounded border"
                                                                        style="background-color: #009DFF; color: white; display: flex; align-items: center; ">
                                                                        <i class="fas fa-tag"></i>
                                                                        <span>Precios</span>
                                                                    </button>

                                                                </div>
                                                                <div class="form-group flex items-center space-x-2 mt-2">
                                                                    <div class="row">
                                                                        <class="col-md-3">
                                                                            <div class="form-group">
                                                                                <label class="w-32" style="color: #37465A; font-weight: normal;" for="NUMMONED">Moneda</label>
                                                                                <div class="input-group">
                                                                                    <input type="text" class="form-control"
                                                                                        id="NUMMONED" name="NUMMONED"
                                                                                        placeholder="Moneda" readonly>
                                                                                    <div class="input-group-append">
                                                                                        <span class="input-group-text"
                                                                                            style="background-color: #009dff; color: #fff; cursor: pointer;"
                                                                                            id="moneda-dropdown">
                                                                                            <i class="fas fa-chevron-down"></i>
                                                                                        </span>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                    </div>
                                                                    <div id="moneda_table_container" class="position-absolute"
                                                                        style="display:none; z-index: 1000; width: 300px;">
                                                                        <table class="table table-bordered table-striped">
                                                                            <thead>
                                                                                <tr>
                                                                                    <th>Moneda</th>
                                                                                    <th>Descripción</th>
                                                                                </tr>
                                                                            </thead>
                                                                            <tbody id="moneda_table_body">
                                                                                <?php
                                                                                // Conexión a la base de datos Firebird
                                                                                session_start();
                                                                                $host = 'localhost';
                                                                                $database = 'C:\Program Files (x86)\Common Files\Aspel\Sistemas Aspel\SAE9.00\Ejemplos\Ejemplos.FDB';
                                                                                $username = 'SYSDBA';
                                                                                $password = 'masterkey';

                                                                                try {
                                                                                    $dbh = new PDO("firebird:host=$host;dbname=$database;charset=UTF8", $username, $password);
                                                                                    $query = "SELECT CVE_MONED, DESCR FROM MONED01";
                                                                                    $stmt = $dbh->prepare($query);
                                                                                    $stmt->execute();

                                                                                    while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                                                                                        echo "<tr class='moneda-row' data-NUMMONED='" . $row['CVE_MONED'] . "' data-descr='" . $row['DESCR'] . "'>";
                                                                                        echo "<td>" . $row['CVE_MONED'] . "</td>";
                                                                                        echo "<td>" . $row['DESCR'] . "</td>";
                                                                                        echo "</tr>";
                                                                                    }
                                                                                } catch (PDOException $e) {
                                                                                    echo "Error: " . $e->getMessage();
                                                                                }
                                                                                ?>
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                            <div class="form-group mb-4">
                                                                <label style="color: #37465A; font-weight: normal;">Cuenta contable</label>
                                                                <input type="text" placeholder="Cuenta Contable"
                                                                    class="form-control border rounded p-1 w-full mt-2" name="cuen_contable">
                                                            </div>
                                                            <div class="mb-4">
                                                                <h2 class="font-bold border-b border-gray-400 pb-2">Costeo</h2>
                                                                <div class="form-group flex flex-col mt-2">
                                                                    <label class="flex items-center">
                                                                        <input type="radio" name="tipo_costeo" value="U"> UEPS
                                                                    </label>
                                                                    <label class="flex items-center">
                                                                        <input type="radio" name="tipo_costeo" value="E"> PEPS
                                                                    </label>
                                                                    <label class="flex items-center">
                                                                        <input type="radio" name="tipo_costeo" value="P"> Promedio
                                                                    </label>
                                                                    <label class="flex items-center">
                                                                        <input type="radio" name="tipo_costeo" value="S"> Estándar
                                                                    </label>
                                                                    <label class="flex items-center">
                                                                        <input type="radio" name="tipo_costeo" value="I"> Identificado
                                                                    </label>
                                                                </div>
                                                            </div>

                                                            <div>
                                                                <h2 class="font-bold border-b border-gray-400 pb-2">Proveedores
                                                                </h2>
                                                                <div class="form-group flex items-center space-x-2 mt-10">
                                                                    <label class="w-32">Proveedor</label>
                                                                    <input type="text" placeholder="¿Quien es el Proveedor?"
                                                                        class="form-control border rounded p-1 w-full">
                                                                </div>
                                                                <button
                                                                    class="px-2 py-1 rounded border flex items-center mt-2"
                                                                    style="background-color: #009DFF; color: white;">
                                                                    <i class="fas fa-truck"></i>
                                                                    <span>Proveedores</span>
                                                                </button>

                                                            </div>
                                                        </div>


                                                        <!-- Cantidades Section -->
                                                        <div class="p-4 rounded-lg">
                                                            <h2 class="font-bold border-b border-gray-400 pb-2">Cantidades</h2>
                                                            <div class="form-group flex items-center space-x-2 mt-2">
                                                                <label class="w-32">Existencia</label>
                                                                <input type="text" class="form-control border rounded p-2 w-16"
                                                                    placeholder="0" name="existencia">
                                                                <i class="fas fa-calendar-alt"></i>
                                                            </div>
                                                            <div class="form-group flex items-center space-x-2 mt-2">
                                                                <label class="w-32">Stock mín.</label>
                                                                <input type="text" class="form-control border rounded p-2 w-16"
                                                                    placeholder="0" name="stock_min">
                                                                <i class="fas fa-calendar-alt"></i>
                                                            </div>
                                                            <div class="form-group flex items-center space-x-2 mt-2">
                                                                <label class="w-32">Stock máx.</label>
                                                                <input type="text" class="form-control border rounded p-2 w-16"
                                                                    placeholder="0" name="stock_max">
                                                                <i class="fas fa-calendar-alt"></i>
                                                            </div>
                                                            <div class="form-group flex items-center space-x-2 mt-2">
                                                                <label class="w-32">Apartado</label>
                                                                <input type="text" class="form-control border rounded p-2 w-16"
                                                                    placeholder="0" name="apart">
                                                                <i class="fas fa-calendar-alt"></i>
                                                            </div>
                                                            <button class="px-2 py-1 rounded border" style="background-color: #009DFF; color: white;" class="flex items-center space-x-1 mt-2">
                                                                <i class="fas fa-warehouse"></i>
                                                                <span>Almacenes</span>
                                                            </button>
                                                        </div>
                                                    </div>
                                                </div>

                                                <!-- Inicia (Formulario de Impuestos) -->
                                                <div id="datos-historicos" class="tab-pane fade">
                                                    <div class="container-fluid">
                                                        <div class="row mb-3">
                                                            <div class="col-md-12">
                                                                <div class="card-body">
                                                                    <div class="row">
                                                                        <div class="form-group ">
                                                                            <label for="IMPU01" style="color: #37465A; font-weight: normal;">Esquemas</label>
                                                                            <div class="input-group">
                                                                                <input type="text" class="form-control"
                                                                                    id="IMPU01" name="IMPU01"
                                                                                    placeholder="Esquemas" readonly>
                                                                                <div class="input-group-append">
                                                                                    <span class="input-group-text"
                                                                                        style="background-color: #009dff; color: #fff; cursor: pointer;"
                                                                                        id="esquemas-dropdown">
                                                                                        <i class="fas fa-chevron-down"></i>
                                                                                    </span>
                                                                                </div>
                                                                            </div>
                                                                        </div>
                                                                    </div>
                                                                    <div id="esquemas_table_container" class="position-absolute"
                                                                        style="display:none; z-index: 1000; width: 300px;">
                                                                        <table class="table table-bordered table-striped">
                                                                            <thead>
                                                                                <tr>
                                                                                    <th>Esquemas</th>
                                                                                    <th>Descripción</th>
                                                                                </tr>
                                                                            </thead>
                                                                            <tbody id="esquemas_table_body">
                                                                                <?php
                                                                                // Conexión a la base de datos Firebird
                                                                                session_start();
                                                                                $host = 'localhost';
                                                                                $database = 'C:\Program Files (x86)\Common Files\Aspel\Sistemas Aspel\SAE9.00\Ejemplos\Ejemplos.FDB';
                                                                                $username = 'SYSDBA';
                                                                                $password = 'masterkey';

                                                                                try {
                                                                                    $dbh = new PDO("firebird:host=$host;dbname=$database;charset=UTF8", $username, $password);
                                                                                    $query = "SELECT CVE_ESQIMPU, DESCRIPESQ FROM IMPU01";
                                                                                    $stmt = $dbh->prepare($query);
                                                                                    $stmt->execute();

                                                                                    while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                                                                                        echo "<tr class='esquemas-row' data-IMPU01='" . $row['CVE_ESQIMPU'] . "' data-descr='desc" . $row[''] . "'>";
                                                                                        echo "<td>" . $row['CVE_ESQIMPU'] . "</td>";
                                                                                        echo "<td>" . $row['DESCRIPESQ'] . "</td>";
                                                                                        echo "</tr>";
                                                                                    }
                                                                                } catch (PDOException $e) {
                                                                                    echo "Error: " . $e->getMessage();
                                                                                }
                                                                                ?>
                                                                            </tbody>
                                                                        </table>
                                                                    </div>
                                                                    <label class="form-label">16% IVA</label>
                                                                </div>
                                                            </div>
                                                        </div>


                                                        <div class="bg-white p-6 rounded-lg">
                                                            <h1 class="text-center font-semibold mb-12">Configuración adicional para IEPS</h1>
                                                            <div class="flex items-center justify-center mb-9">
                                                                <input type="checkbox" id="numero-serie" name="man_ieps"
                                                                    class="mr-3" style="transform: scale(1.6);" onchange="toggleForm(this)">
                                                                <label for="numero-serie" class="text-gray-800">Activar para este producto</label>
                                                            </div>

                                                            <div class="mt-4">
                                                                <label class="block text-gray-400 font-bold">Aplicar configuración a:</label>
                                                                <select id="configuracion" name="aplicar-configuracion"
                                                                    class="border border-gray-300 rounded p-2 w-full mt-2" disabled>
                                                                    <option value="ieps">I.E.P.S.</option>
                                                                    <option value="ret_isr">RET. ISR</option>
                                                                    <option value="ret_iva">RET. IVA</option>
                                                                    <option value="iva">I.V.A</option>
                                                                </select>
                                                            </div>

                                                            <div class="mt-4">
                                                                <label class="block text-gray-700 font-bold">Tasa de IEPS</label>
                                                                <div class="flex flex-col mt-3">
                                                                    <div class="flex items-center">
                                                                        <input type="radio" id="cuota" name="apl_man_ieps" value="C" class="mr-2" disabled>
                                                                        <label for="cuota" class="text-gray-500">Cuota</label>
                                                                    </div>
                                                                    <div class="flex items-center mt-3">
                                                                        <input type="radio" id="mas_alto" name="apl_man_ieps" value="M" class="mr-2" disabled>
                                                                        <label for="mas_alto" class="text-gray-500">El más alto</label>
                                                                    </div>
                                                                    <div class="flex items-center mt-3">
                                                                        <input type="radio" id="ambos" name="apl_man_ieps" value="A" class="mr-2" disabled>
                                                                        <label for="ambos" class="text-gray-500">Ambos</label>
                                                                    </div>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="mt-4 flex items-center">
                                                            <label class="w-32">Cuota</label>
                                                            <input type="text" id="cuota" name="cuota" class="form-control" placeholder="¿Cual es la Cuota?"
                                                                class="border border-gray-300 rounded p-2 ml-4 w-1/2">
                                                        </div>
                                                    </div>
                                                </div>
                                                <!-- Step 4 Content (Registros acumulados) -->
                                                <div id="registro-acumulados" class="tab-pane fade">

                                                    <div class="row mb-3">
                                                        <div class="row col-lg-12">
                                                            <label class="font-bold border-b border-gray-400 pb-2">Cantidades Pendientes</label>
                                                        </div>
                                                        <div class="col-md-6">
                                                            <label for="pendientes_recibir">Pendientes por recibir:</label>
                                                            <input type="text" class="form-control" id="pendientes_recibir"
                                                                name="pendientes_recibir" placeholder="0">
                                                        </div>
                                                        <div class="col-md-6">
                                                            <label for="pendientes_surtir">Pendientes por surtir:</label>
                                                            <input type="text" class="form-control" id="pendientes_surtir"
                                                                name="pendientes_surtir" placeholder="0">
                                                        </div>
                                                    </div>
                                                    <div class="row mb-3">
                                                        <div class="row col-lg-12">
                                                            <label class="font-bold border-b border-gray-400 pb-2">Costos</label>
                                                        </div>
                                                        <div class="col-md-6">
                                                            <label for="promedio_costo">Promedio:</label>
                                                            <input type="text" class="form-control" id="promedio_costo"
                                                                name="promedio_costo" placeholder="0.00000">
                                                        </div>
                                                        <div class="col-md-6">
                                                            <label for="ultimo_costo">Último:</label>
                                                            <input type="text" class="form-control" id="ultimo_costo"
                                                                name="ultimo_costo" placeholder="0.00000">
                                                        </div>
                                                    </div>

                                                    <div class="row mb-3">
                                                        <div class="row col-lg-12">
                                                            <label class="font-bold border-b border-gray-400 pb-2">Acumulados anuales de ventas</label>
                                                        </div>
                                                        <div class="col-md-6">

                                                            <label for="cantidad_acumulados">Cantidad:</label>
                                                            <input type="text" class="form-control" id="cantidad_acumulados"
                                                                name="cantidad_acumulados" placeholder="0">
                                                        </div>
                                                        <div class="col-md-6">
                                                            <label for="monto_acumulados">Monto:</label>
                                                            <input type="text" class="form-control" id="monto_acumulados"
                                                                name="monto_acumulados" placeholder="0.00">
                                                        </div>
                                                    </div>
                                                    <div class="row mb-3">
                                                        <div class="col-mb-6">
                                                            <label for="fecha_ultima_venta">Fecha de última venta:</label>
                                                            <div style="display: flex; align-items: center;">
                                                                <input type="date" class="form-control" id="fecha_ultima_venta"
                                                                    name="fecha_ultima_venta">
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <div class="row mb-3">
                                                        <div class="row col-lg-12">

                                                            <label class="font-bold border-b border-gray-400 pb-2">Acumulados anuales de compras</label>
                                                        </div>
                                                        <div class="col-md-6">

                                                            <label for="cantidad_compras">Cantidad:</label>
                                                            <input type="text" class="form-control" id="cantidad_compras"
                                                                name="cantidad_compras" placeholder="0">
                                                        </div>
                                                        <div class="col-md-6">
                                                            <label for="monto_compras">Monto:</label>
                                                            <input type="text" class="form-control" id="monto_compras"
                                                                name="monto_compras" placeholder="0.00">
                                                        </div>
                                                    </div>
                                                    <div class="row">
                                                        <div class="col-mb-6">
                                                            <label for="fecha_ultima_compra">Fecha de última compra:</label>
                                                            <div style="display: flex; align-items: center;">
                                                                <input type="date" class="form-control" id="fecha_ultima_compra" name="fecha_ultima_compra">
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <!-- Step 5 Content (Emisión de Documentos) -->
                                                <div id="datos-adicionales" class="tab-pane fade">
                                                    <div class="row">

                                                        <div class="form-group" style="margin-bottom: 20px;">
                                                            <label for="cuenta_correo" style="color: #37465A; font-weight: normal;">Cuenta de Correo
                                                                Electrónico</label>
                                                            <input type="email" class="form-control" id="cuenta_correo"
                                                                placeholder="Cuenta de Correo Electrónico"
                                                                style="border-radius: 4px;">
                                                        </div>

                                                        <div class="form-group" style="margin-bottom: 20px;">
                                                            <label for="descripcion_adicional"
                                                                style="color: #37465A; font-weight: normal;">Descripción Adicional:</label>
                                                            <input type="text" class="form-control" id="descripcion_adicional"
                                                                placeholder="Agrega un descripcion" name="descripcion_adicional"
                                                                style="border-radius: 4px;">
                                                        </div>

                                                        <div class="form-group" style="margin-bottom: 20px;">
                                                            <label for="observaciones"
                                                                style="color: #37465A; font-weight: normal;">Observaciones:</label>
                                                            <textarea class="form-control" id="observaciones" name="observaciones"
                                                                rows="4" style="border-radius: 4px;"></textarea>
                                                        </div>

                                                        <!-- Contenedor de Campos Libres del Usuario -->
                                                        <div class="col-md-12 mt-3">
                                                            <div class="card">
                                                                <div>
                                                                    <h5 class="font-bold border-b border-gray-400 pb-2">Campos Libres del Usuario</h5>
                                                                </div>
                                                                <div class="card-body">
                                                                    <table class="table table-bordered table-custom">
                                                                        <thead>
                                                                            <tr>
                                                                                <th>Campo Libre</th>
                                                                                <th>Valor</th>
                                                                            </tr>
                                                                        </thead>
                                                                        <tbody>
                                                                            <?php

                                                                            $host = 'localhost';
                                                                            $database = 'C:\Program Files (x86)\Common Files\Aspel\Sistemas Aspel\SAE9.00\Ejemplos\Ejemplos.FDB';
                                                                            $username = 'SYSDBA';
                                                                            $password = 'masterkey';

                                                                            try {
                                                                                $dbh = new PDO("firebird:host=$host;dbname=$database;charset=UTF8", $username, $password);
                                                                                $query = "SELECT CAMPO, ETIQUETA FROM PARAM_CAMPOSLIBRES01 WHERE IDTABLA = 'INVE_CLIB'";
                                                                                $stmt = $dbh->prepare($query);
                                                                                $stmt->execute();

                                                                                // Iterar sobre los campos libres y generar inputs
                                                                                while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {
                                                                                    echo "<tr>";
                                                                                    echo "<td>" . htmlspecialchars($row['ETIQUETA']) . "</td>";
                                                                                    echo "<td>";

                                                                                    // Campos que deben ser numéricos (CAMPLIB4, CAMPLIB5, CAMPLIB6)
                                                                                    if (in_array($row['CAMPO'], ['CAMPLIB4', 'CAMPLIB5', 'CAMPLIB6'])) {
                                                                                        echo "<input type='text' class='form-control' name='campo_libre_" . htmlspecialchars($row['CAMPO']) . "' oninput='validarCampoNumerico(this)'>";
                                                                                        echo "<small class='text-danger d-none' id='error_" . htmlspecialchars($row['CAMPO']) . "'>Solo se permiten números.</small>";
                                                                                    } else {
                                                                                        // Campos que pueden tener letras y números
                                                                                        echo "<input type='text' class='form-control' name='campo_libre_" . htmlspecialchars($row['CAMPO']) . "'>";
                                                                                    }

                                                                                    echo "</td>";
                                                                                    echo "</tr>";
                                                                                }
                                                                            } catch (PDOException $e) {
                                                                                echo "Error: " . $e->getMessage();
                                                                            }
                                                                            ?>
                                                                        </tbody>
                                                                    </table>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <!-- Step 6 Content (Datos Fiscales) -->
                                                <div id="fiscales" class="tab-pane fade" style="padding: 20px; border-radius: 4px;">
                                                    <h4 class="font-bold border-b border-gray-400 pb-2 mb-3">Datos Fiscales</h4>
                                                    <div class="row" style="margin-bottom: 15px;">
                                                        <div class="col-md-12">
                                                            <label for="clave-sat" style="color: #37465A; font-weight: normal;">Clave SAT</label>
                                                            <input class="form-control" id="clave-sat" type="text" style="width: 100%; height: 50px; border-radius: 4px; border: 1px solid #ccc;" />
                                                        </div>
                                                    </div>
                                                    <div class="row" style="margin-bottom: 15px;">
                                                        <div class="col-md-12">
                                                            <div class="form-group">
                                                                <label for="clave-unidad" style="color: #37465A; font-weight: normal;">Clave unidad</label>
                                                                <input class="form-control id=" clave-unidad type="text" style="width: 100%; height: 50px; border-radius: 4px; border: 1px solid #ccc;" />
                                                            </div>
                                                        </div>
                                                        <div class="col-md-12">
                                                            <div class>
                                                                <h5 class="font-bold border-b border-gray-400 pb-2 mb-3">Claves catalogos complemento</h5>
                                                            </div>
                                                        </div>
                                                        <div class="row" style="margin-bottom: 15px;">
                                                            <div class="col-md-6">
                                                                <div class="form-group">
                                                                    <label for="fraccion-arancelaria" style="color: #37465A; font-weight: normal;">Fracción arancelaria</label>
                                                                    <input class="form-control" id="fraccion-arancelaria" type="text" style="width: 100%; height: 50px; border-radius: 4px; border: 1px solid #ccc;" />
                                                                </div>
                                                            </div>
                                                            <div class="col-md-6">
                                                                <div class="form-group">
                                                                    <label for="unidad-aduana" style="color: #37465A; font-weight: normal;">Unidad aduana</label>
                                                                    <input class="form-control" id="unidad-aduana" type="text" style="width: 100%; height: 50px; border-radius: 4px; border: 1px solid #ccc;" />
                                                                </div>
                                                            </div>
                                                            <div class="row" style="margin-bottom: 15px;">
                                                                <div class="col-md-6">
                                                                    <div class="form-group">
                                                                        <label for="factor-cce" style="color: #37465A; font-weight: normal;">Factor entre unidades CCE</label>
                                                                        <input class="form-control" id="factor-cce" type="text" style="width: 100%; height: 50px; border-radius: 4px; border: 1px solid #ccc;" />
                                                                    </div>
                                                                </div>

                                                                <div class="col-md-6" style="display: flex; align-items: center;">
                                                                    <button style="padding: 11px 20px; border: none; background-color: #009DFF; color: white; border-radius: 5px; cursor: pointer; margin-right: 10px;">
                                                                        Mercancía CCE
                                                                    </button>

                                                                    <button style="padding: 11px 20px; border: none; background-color: #009DFF; color: white; border-radius: 5px; cursor: pointer; margin-right: 10px;">
                                                                        Mercancía CCP
                                                                    </button>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                            <!-- Fixed Buttons -->
                                            <div class="form-buttons">
                                                <button type="button" class="btn btn-secondary btn-prev" onclick="prevTab()"><i class="fas fa-arrow-left next-icon"></i>Anterior</button>
                                                <button type="submit" class="btn btn-primary">Guardar</button>
                                                <button type="button" class="btn btn-primary btn-next" onclick="nextTab()">Siguiente<i class="fas fa-arrow-right next-icon"></i></button>
                                            </div>
                                        </form>
                                    </div>
                                </section>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Modal -->
                <!-- Modal de confirmación -->
                <div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="confirmModalLabel" aria-hidden="true">
                    <div class="modal-dialog" role="document">
                        <div class="modal-content">
                            <div class="modal-header">
                                <h5 class="modal-title" id="confirmModalLabel">Confirmación</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                    <span aria-hidden="true">&times;</span>
                                </button>
                            </div>
                            <div class="modal-body text-center">
                                <div class="checkmark-container">
                                    <div class="checkmark draw"></div>
                                </div>
                                <p style="margin-top: 10px;">¡El producto se ha agregado correctamente!</p>
                            </div>
                            <div class="modal-footer justify-content-center">
                                <button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
                            </div>
                        </div>
                    </div>
                </div>

                <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
                <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.5.3/dist/umd/popper.min.js"></script>
                <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
                <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>

                <script>
                    function validarCampoNumerico(input) {
                        // Usar una expresión regular para permitir solo números
                        const regex = /^[0-9]*$/;

                        // Obtener el valor del input y el ID del mensaje de error correspondiente
                        const valor = input.value;
                        const errorId = "error_" + input.name.split("_")[2]; // Obtiene el ID del campo

                        if (!regex.test(valor)) {
                            // Si el valor contiene caracteres no numéricos, muestra el mensaje de error
                            document.getElementById(errorId).classList.remove('d-none');
                            input.classList.add('is-invalid');
                        } else {
                            // Si solo hay números, oculta el mensaje de error
                            document.getElementById(errorId).classList.add('d-none');
                            input.classList.remove('is-invalid');
                        }
                    }
                </script>


                <script>
                    function toggleForm(checkbox) {
                        // Habilitar o deshabilitar el select y los radios según el estado del checkbox
                        const configuracionSelect = document.getElementById('configuracion');
                        const radios = document.querySelectorAll('input[name="apl_man_ieps"]');

                        if (checkbox.checked) {
                            configuracionSelect.disabled = false; // Habilitar el select
                            radios.forEach(radio => radio.disabled = false); // Habilitar los radios
                        } else {
                            configuracionSelect.disabled = true; // Deshabilitar el select
                            radios.forEach(radio => radio.disabled = true); // Deshabilitar los radios
                        }
                    }
                </script>
                <script>
                    $('#confirmModal').on('show.bs.modal', function() {
                        var checkmark = $('.checkmark');
                        checkmark.removeClass('draw');
                        setTimeout(function() {
                            checkmark.addClass('draw');
                        }, 10); // Delay para permitir la eliminación de la clase antes de añadirla de nuevo
                    });
                </script>
                <script>
                    document.getElementById("form-proveedor").addEventListener("submit", function(event) {
                        event.preventDefault();

                        // Crea un objeto FormData con los datos del formulario
                        var formData = new FormData(this);

                        // Envía los datos a leer_producto.php utilizando fetch
                        fetch('leer_producto.php', {
                                method: 'POST',
                                body: formData
                            })
                            .then(response => response.json())
                            .then(data => {
                                // Si la respuesta es exitosa, muestra la ventana modal
                                if (data.status === 'success') {
                                    $('#confirmModal').modal('show');
                                    clearForm(); // Limpia el formulario después de mostrar el modal
                                } else {
                                    alert(data.message); // Muestra el mensaje de error
                                }
                            })
                            .catch(error => console.error('Error:', error));
                    });

                    // Función para limpiar el formulario
                    function clearForm() {
                        document.getElementById('form-proveedor').reset(); // Limpia el formulario
                    }
                </script>



                <!-- script de Formulario -->
                <script>
                    // JavaScript for navigating between tabs and updating styles
                    let activeIndex = 0; // Index of the active tab

                    document.addEventListener('DOMContentLoaded', function() {
                        const navLinks = document.querySelectorAll('.bs-stepper .nav-link');
                        const tabs = document.querySelectorAll('.tab-pane');
                        const prevButton = document.querySelector('.btn-prev');
                        const nextButton = document.querySelector('.btn-next');
                        const prevIcon = prevButton.querySelector('.fa-arrow-left');

                        // Function to update styles on the nav links (tab headers)
                        function actualizarEstilos() {
                            navLinks.forEach((link, index) => {
                                const icon = link.querySelector('.bx');
                                if (index === activeIndex) {
                                    // Styles for the active tab
                                    link.classList.add('active');
                                    icon.style.backgroundColor = '#009dff';
                                    icon.style.color = '#fff';
                                    icon.style.borderRadius = '50%';
                                    icon.style.padding = '10px';
                                } else {
                                    // Reset styles for inactive tabs
                                    link.classList.remove('active');
                                    icon.style.backgroundColor = '';
                                    icon.style.color = '';
                                    icon.style.borderRadius = '';
                                    icon.style.padding = '';
                                }
                            });

                            // Update the "Previous" button state
                            if (activeIndex === 0) {
                                prevButton.disabled = true;
                                prevButton.style.backgroundColor = '#f8f9fa';
                                prevButton.style.color = '#37465A';
                                prevIcon.style.color = '#37465A';
                            } else {
                                prevButton.disabled = false;
                                prevButton.style.backgroundColor = '#009dff';
                                prevButton.style.color = '#fff';
                                prevIcon.style.color = '#fff';
                            }
                        }

                        // Function to activate a tab by index
                        function activateTab(index) {
                            if (index >= 0 && index < tabs.length) {
                                document.querySelector('.tab-pane.active').classList.remove('active', 'show');
                                tabs[index].classList.add('active', 'show');

                                document.querySelector('.nav-link.active').classList.remove('active');
                                navLinks[index].classList.add('active');

                                activeIndex = index; // Update the active index
                                actualizarEstilos(); // Update styles based on the active tab
                            }
                        }

                        // Go to the next tab
                        function nextTab() {
                            if (activeIndex < navLinks.length - 1) {
                                activateTab(activeIndex + 1);
                            }
                        }

                        // Go to the previous tab
                        function prevTab() {
                            if (activeIndex > 0) {
                                activateTab(activeIndex - 1);
                            }
                        }

                        // Add event listeners to the nav links for manual tab navigation
                        navLinks.forEach((link, index) => {
                            link.addEventListener('click', function(event) {
                                event.preventDefault();
                                activateTab(index); // Activate the clicked tab
                            });
                        });

                        // Add event listeners to the "Next" and "Previous" buttons
                        nextButton.addEventListener('click', function(event) {
                            event.preventDefault();
                            nextTab(); // Move to the next tab
                        });

                        prevButton.addEventListener('click', function(event) {
                            event.preventDefault();
                            prevTab(); // Move to the previous tab
                        });

                        // Initialize styles and button states
                        activateTab(activeIndex); // Activate the first tab and apply styles
                    });
                </script>
                <script>
                    document.getElementById('sidebarCollapse').addEventListener('click', function() {
                        var sidebar = document.getElementById('sidebar');
                        var content = document.querySelector('.content');
                        var banner = document.querySelector('.banner');
                        sidebar.classList.toggle('collapsed');
                        content.classList.toggle('collapsed');
                        banner.classList.toggle('collapsed');
                    });

                    document.getElementById('userDropdownToggle').addEventListener('click', function() {
                        document.getElementById('userDropdown').classList.toggle('show');
                    });
                </script>
                <script>
                    document.querySelectorAll('[data-toggle="submenu"]').forEach(function(element) {
                        element.addEventListener('click', function(e) {
                            e.preventDefault();
                            var target = document.querySelector(element.getAttribute('data-target'));
                            var isOpen = target.style.maxHeight !== '0px';

                            document.querySelectorAll('.submenu').forEach(function(submenu) {
                                submenu.style.maxHeight = '0px';
                            });

                            document.querySelectorAll('[data-toggle="submenu"]').forEach(function(el) {
                                el.classList.remove('submenu-open');
                            });

                            if (!isOpen) {
                                target.style.maxHeight = target.scrollHeight + 'px';
                                element.classList.add('submenu-open');
                            }
                        });
                    });
                </script>


                <!-- SCRIPT PARA LISTA DE Lista  -->
                <script>
                    // Mostrar/Ocultar la tabla de selección de países
                    document.getElementById('pais-dropdown').addEventListener('click', function() {
                        let paisTable = document.getElementById('pais_table_container');
                        paisTable.style.display = paisTable.style.display === 'none' ? 'block' : 'none';
                    });

                    // Selección del país en la tabla
                    document.querySelectorAll('.pais-row').forEach(function(row) {
                        row.addEventListener('click', function() {
                            let cvePais = this.getAttribute('data-cve-pais');

                            // Llenar el campo con el valor seleccionado
                            document.getElementById('cve_pais').value = cvePais;

                            // Ocultar la tabla después de seleccionar
                            document.getElementById('pais_table_container').style.display = 'none';
                        });
                    });
                </script>

                <script>
                    // esquemas
                    fetch('obtener_esquemas.php')
                        .then(response => response.json())
                        .then(data => {
                            const selectEsquema = document.getElementById('esquema');
                            selectEsquema.innerHTML = '<option value="" disabled selected>Seleccionar esquemas...</option>';
                            data.forEach(esquema => {
                                selectEsquema.innerHTML += `<option value="${esquema.CVE_ESQIMPU}">${esquema.CVE_ESQIMPU}, ${esquema.DESCRIPESQ} </option>`;
                            });

                            // Remove this line if you don't want to set a default value
                            document.getElementById('esquema').value = '1';
                        })
                        .catch(error => console.error('Error al obtener los esquemas:', error));
                </script>

                <!-- SCRIPT de Esquemas -->
                <script>
                    // Mostrar/Ocultar la tabla de selección de esquemas
                    document.getElementById('esquemas-dropdown').addEventListener('click', function() {
                        let paisTable = document.getElementById('esquemas_table_container');
                        paisTable.style.display = paisTable.style.display === 'none' ? 'block' : 'none';
                    });

                    // Selección del esquemas en la tabla
                    document.querySelectorAll('.esquemas-row').forEach(function(row) {
                        row.addEventListener('click', function() {
                            let IMPU01 = this.getAttribute('data-IMPU01');

                            // Llenar el campo con el valor seleccionado
                            document.getElementById('IMPU01').value = IMPU01;

                            // Ocultar la tabla después de seleccionar
                            document.getElementById('esquemas_table_container').style.display = 'none';
                        });
                    });
                </script>

                <!-- SCRIPT PARA LISTA DE Moneda -->
                <script>
                    // Mostrar/Ocultar la tabla de selección de moneda
                    document.getElementById('moneda-dropdown').addEventListener('click', function() {
                        let paisTable = document.getElementById('moneda_table_container');
                        paisTable.style.display = paisTable.style.display === 'none' ? 'block' : 'none';
                    });

                    // Selección del país en la tabla
                    document.querySelectorAll('.moneda-row').forEach(function(row) {
                        row.addEventListener('click', function() {
                            let NUMMONED = this.getAttribute('data-NUMMONED');

                            // Llenar el campo con el valor seleccionado
                            document.getElementById('NUMMONED').value = NUMMONED;

                            // Ocultar la tabla después de seleccionar
                            document.getElementById('moneda_table_container').style.display = 'none';
                        });
                    });
                </script>
</body>