<?php use_helper( 'UrlFunctions' ); ?>
<?php use_helper( 'IncludePartial' ); ?>
<?php use_helper( 'UtilFunctions' ); ?>
<style>
.grid
{
    border: 1px solid #77d5f7;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
}
.grid th 
{
    border-color: #77d5f7;
    background-color: #0a7db1;
    font-weight: normal;
    font-size: 11px;
    font-family: Verdana,Arial,sans-serif;
    height: 24px;
    padding: 0 2px;
}
.grid td 
{
    border-left: 0 none;
    border-right-color: #77d5f7;
    border-right-style: solid;
    border-right-width: 1px;
    border-bottom-color: #77d5f7;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    padding: 0 2px;
    /*white-space: pre;*/
    height: 22px;
    /*border: 1px solid #77d5f7;*/
}
.grid td div
{
    overflow: hidden; white-space: nowrap; width: 150px; font-size: 10px;
}
</style>

<script>
mostrarCargaImg = function(){ $('#s_ImagenLoad')[0].style.display = 'inline'; }
ocultarCargaImg = function(){ $('#s_ImagenLoad')[0].style.display = 'none'; }

mostrarMensajeError = function( s_MensajeError )
{
    $( "#resultContent" ).html( '<div id="mensaje_error_content" class="error">' + s_MensajeError + '</div>' );
    setTimeout( function(){ $( "#mensaje_error_content" ).fadeOut( 800 ).fadeIn( 800 ).fadeOut( 500 ).fadeIn( 500 ).fadeOut( 300 ); }, 8000 );
}
</script>

<div id="resultContent" style=""></div>

<form id="form1" name="form1" method="POST" onsubmit="" enctype="multipart/form-data">
    <input type="hidden" id="control" name="control" value="ok">
    <input type="hidden" id="id_reserva" name="id_reserva" value="">
    <table class="grid" cellspacing="0" cellpadding="0" border="0" align="center" width="99%" style="border-bottom: medium none;">
        <tbody>
            <tr>
                <th width="2%" align="center" style="border-top-left-radius: 5px;" nowrap> No </th>
                
                <th width="5%" align="" nowrap>Cod Item</th>
                <th width="10%" align="" nowrap>Descripcion</th>
                <th width="10%" align="center" nowrap>Almacen</th>
                <th width="5%" align="center" nowrap>Lote</th>
                <th width="10%" align="center" nowrap>Comprobante</th>
                <th width="10%" align="center" nowrap>Cliente</th>
                <th width="10%" align="center" nowrap>Ubicaci&oacute;n</th>
                <th width="10%" align="center" nowrap>Promoci&oacuten</th>
                <th width="5%" align="center" nowrap>Referencia</th>
                <!-- <th width="5%" align="center" nowrap>Secuencia</th> -->
                <th width="5%" align="center" nowrap>Cantidad</th>
                <th width="5%" align="center" nowrap>Usuario</th>
                <th width="10%" align="center" nowrap>Fecha</th>
                <th width="2%" align="center" nowrap>&nbsp;</th>
            </tr>
        </tbody>
        <tbody id="content_all_row">
            <?php foreach ( $a_ALM_ReservaItemStock as $i_Key => $o_ALM_ReservaItemStockBN ){ ?>
                <?php
                $s_NombreUbicacion = "";

                $o_SRV_UbicacionClienteDetBN = $o_ALM_ReservaItemStockBN->getObjectUbicacionClienteDet();
                if( $o_SRV_UbicacionClienteDetBN )
                {
                    $o_MST_UbicacionBN = $o_SRV_UbicacionClienteDetBN->getObjectUbicacion();
                    $s_NombreUbicacion = $o_MST_UbicacionBN->getTipoUbicacionNombre()." - ".$o_MST_UbicacionBN->getNombre();
                }
                ?>
            <tr class="content_row">
                
                <td align="center" class="row"><label class="labelData"><?=$i_Key+1?></label></td>
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getIdItem()?> </label> </td>
                <td align="" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getObjectItem()->getDescripcionCompleta()?> </label> </td>
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getObjectAlmacen()->getDescripcionLocal()?> </label></td>
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getIdLote()?> </label></td>
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getReservaDocNumero()?> </label></td>

                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getDocumentoClienteNombre()?> </label></td>
                <td align="center" class="row"><label class="labelData"> <?=$s_NombreUbicacion?> </label></td>
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getObjectDocumentoDetalle()->getNumeroPromocion()?> </label></td>

                <td align="center" class="row"><label class="labelData"> <b> <?=$o_ALM_ReservaItemStockBN->getReservaRefNumero()?> </b> </label></td>
                <!-- <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getReservaSecuencia()?> </label></td> -->
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getReservaCantidad()?> </label></td>
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getUsuarioCreacion()?> </label></td>
                <td align="center" class="row"><label class="labelData"> <?=$o_ALM_ReservaItemStockBN->getFechaCreacion()?> </label></td>
                <td align="center" >
                    <!--<?=addImgButton( "btnDelete.gif", array( "title"=>"Eliminar", "onclick"=>"eliminarReserva('".$o_ALM_ReservaItemStockBN->getReservaId()."')", "style"=>"cursor:pointer" ) );?>-->
                </td>
                
            </tr>
            <?php } ?>
        </tbody>


        <tbody>
            <tr>
                <th align="center" style="border-bottom-left-radius: 5px; height: 24px; border-bottom-right-radius: 5px;" colspan="14"> &nbsp; </th>
            </tr>
        </tbody>

    </table>

</form>

<script type="text/javascript">
eliminarReserva = function( id_reserva )
{
    $( "#id_reserva" ).val( id_reserva );
    $( "#form1" ).submit();
}

<?php if( $s_MensajeError ) { ?>
mostrarMensajeError( '<?=$s_MensajeError?>' );
<?php } ?>
</script>