<div class="window-detalle detalle">
    <div id="detalle">
        <div id="cabezera">
            <div id="asiento">
                <label>Asiento</label>
                <label><?php echo $detalle['ato_o'] ?></label>
            </div>
            <div id="tipo">
                <label class="tipofact"><?php echo $detalle['tip_o'] ?></label>
                <label><?php echo $detalle['tip'] ?></label>
            </div>
            <div id="numero">
                <label><?php echo $detalle['numf'] ?></label>
                <label><?php echo $detalle['fecha'] ?></label>
            </div>
        </div>
        
        
        <div id="dat_cliente">
            <label><?php echo $detalle['lanom'] ?></label>
            <label><?php echo $detalle['ladir'] ?></label>
            <label><?php echo $detalle['lamas'] ?></label>
        </div>
        
        
        <?php if ($detalle["arr_detalle"]): ?>
        <div id="items_cabezera">
            <div class="codi">Codigo</div>
            <div class="cant">Cant</div>
            <div class="det">Detalle</div>
            <div>Precio</div>
            <div>Importe</div>
        </div>
        <div class="content-lista-scroll" id="lista_items">
            <ul class="content">
                <?php foreach($detalle["arr_detalle"] as $rs_det):?>
                <li>
                    <span class="codi"><?php echo $rs_det['cod'] ?></span>
                    <span class="cant"><?php echo $rs_det['can'] ?></span>
                    <span class="det"><?php echo $rs_det['det'] ?></span>
                    <span class=""><?php echo $rs_det['uni'] ?></span>
                    <span class=""><?php echo $rs_det['imp'] ?></span>
                </li>
                <?php endforeach; ?>
            </ul>
        </div>
        <?php endif; ?>
        
        
        
        <div id="items_cabezera" class="pie1">
            <div>Neto</div>
            <div>IVA RI</div>
            <div>IVA Otros</div>
        </div>
        <div class="content-lista-scroll" id="pie1">
            <ul class="content">
                <li class="ul_pie1">
                    <span class=""><?php echo $detalle["arr_pie"]["langr"] ?></span>
                    <span class="">&nbsp;</span>
                    <span class="det"><?php echo $detalle["arr_pie"]["lairi"] ?></span>
                    <span class=""><?php echo $detalle["arr_pie"]["lairs"] ?></span>
                    <span class="">&nbsp;</span>
                </li>
            </ul>
        </div>
        
        
        <div id="items_cabezera" class="pie1">
            <div>Percepción</div>
            <?php 
            $data = new sqldata();
            $imp1 = $data->query("SELECT * from SETTINGS where variable = 'imp_1'");
            $imp2 = $data->query("SELECT * from SETTINGS where variable = 'imp_2'");
            ?>
            <div><?php echo $imp1[0]["valor"] ?></div>
            <div><?php echo $imp2[0]["valor"] ?></div>
            <div>Tasa Vial</div>
            <div>Redondeo</div>
            <div class="total">TOTAL</div>
        </div>
        <div class="content-lista-scroll" id="pie2">
            <ul class="content">
                <li class="ul_pie1">
                    <span class=""><?php echo $detalle["arr_pie"]["lapiv"] ?></span>
                    <span class=""><?php echo $detalle["arr_pie"]["laiitc"] ?></span>
                    <span class=""><?php echo $detalle["arr_pie"]["laiidc"] ?></span>
                    <span class=""><?php echo $detalle["arr_pie"]["laitv"] ?></span>
                    <span class=""><?php echo $detalle["arr_pie"]["ladesc"] ?></span>
                    <span class="total"><?php echo $detalle["arr_pie"]["latot"] ?></span>
                </li>
            </ul>
        </div>
        
        
        <?php if ($detalle["arr_pie"]["lacanc"]): ?>
        <div class="mensajefoo">
            <?php echo $detalle["arr_pie"]["lacanc"] ?>
        </div>
        <?php endif; ?>
        <?php if ($detalle['laanu']=="A"): ?>
        <div id="anulada">
            ANULADA
        </div>
        <?php endif; ?>
        
        
    </div>
    
        <div class="button_form">
            <button onclick="cerrar_detalle();">Cerrar</button>
        </div>

</div>
