<?php
require_once('Conexion/conexion.php');
session_start();
$compania = $_SESSION['compania'];

        $sqlCinicial ="SELECT
                           tc.id_unico,
                           CONCAT(tc.codigo, ' - ', tc.nombre) AS compp,
                           tc.codigo
                       FROM
                           gf_tipo_comprobante_pptal tc
                       LEFT JOIN gf_clase_pptal cl ON
                           tc.clasepptal = cl.id_unico
                       WHERE
                       tc.clasepptal=".$_REQUEST['id_clase']."  
                           AND tc.compania = $compania
                       ORDER BY
                           tc.codigo DESC";

        $ComIni = $mysqli->query($sqlCinicial);
        while ($row = mysqli_fetch_row($ComIni))
        {
        echo '<option value="'.$row[2].'">'.strtoupper($row[1]).'</option>';
        }

?>
