<?php use_helper( 'UrlFunctions' ); ?>
<?php use_helper( 'IncludePartial' ); ?>
<script>
    findControl = function ()
    {
        concatValueStr();
    }
    concatValueStr = function ()
    {
        strFormSerialize = $( 'form' ).serialize();
        if ( arguments[0] )
        {
            strFormSerialize += '&' + arguments[0];
        }
        executeFind( strFormSerialize );
    }
    executeFind = function ( str )
    {
        url = "<?php echo buildUrl( 'grupoalmacen/grid', "block=001" ) ?>";

        $o_elm = $( "#resultGrtid" );
        $o_elm.load
                (
                        url,
                        str,
                        function ( response, status, xhr )
                        {
                            console.log( response );
                            if ( status == "error" )
                            {
                                var msg = "Sorry but there was an error: ";
                                alert( msg + xhr.status + " " + xhr.statusText );
                            }
                        }
                );
    }
</script> 

<div class="titleBody descripProy">
    <ul>
        <li style="width:100% !important;">
            Maestro de Grupo de Almacenes
            <span style="float:right;">
            <img style="cursor:pointer" onclick="location.href='<?=buildUrl('grupoalmacen/addedit', 'block=001&s_TipoProc=nvo' )?>';" title="Agregar nuevo Grupo de Almacenes" src="<?=Constantes::ROOT_DIR_IMG?>common/buttons/btnAdd.gif" name="add">
            </span>
        </li>
    </ul>
</div>

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

<div class="block">
    <form action="" method="post" name="form1" id="form1">
        <table class="marco" style="background:#E3E9E2" width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>

                    <table width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <td width="25%" nowrap="nowrap">
                                <table  cellspacing="1" cellpadding="0" border="0" class="SubCabecera">
                                	
                                    <tr>
                                    	<!--
                                        <td nowrap="nowrap">
                                            <div class="field-label">
                                                <label for=IdCompania class="label">Empresa :</label>
                                            </div>
                                        </td>
                                        <td nowrap="nowrap">
                                            <select class="combo" name="IdCompania" id="IdCompania" onchange="$('#IdUnidadProduccion')[0].options.length = 1; $('#UnidadCrianza')[0].options.length=1; publicForSelectAjaxJSON('<?php echo buildUrl( 'rutaproduccion/request', 'block=001') ?>', $( 'form' ).serialize() + '&TipoProc=UnidaProd', 'IdUnidadProduccion');">
                                                <option value=""> - Seleccione - </option>
                                                <?php foreach ( $a_GSS_Compania as $i_Key => $o_a_GSS_CompaniaBN ){ ?>
                                                <option value="<?=$o_a_GSS_CompaniaBN->getIdCompania()?>"> <?=$o_a_GSS_CompaniaBN->getDescripcionCorta()?> </option>
                                                <?php } ?>
                                            </select>
                                        </td>
                                        -->
                                        <input type="hidden" name="IdCompania" id="IdCompania" value="<?=myUser::getUser()->getIdBusiness()?>" />

                                        <td  nowrap="nowrap">
                                            <div class="field-label">
                                                <label for=NombreUser class="label">Descripción :</label>
                                            </div>
                                        </td>
                                        <td nowrap="nowrap">
                                            <input type="text" class="text" name="Descripcion" id="Descripcion">
                                        </td>
                                         
                                        <td>
						                    &nbsp;<input type="button" onclick="findControl();" value="Buscar" id="btn_frmFindFeaturesTpl" class="button">
						                </td>
                                    </tr>
                                </table>
                            </td>
                       
                           
                           
                        </tr>
                        
                    </table>

                </td>

                
            </tr>
        </table>


    </form>
</div>
<br>
<?php include_partial( "grid" ); ?>