<?php use_helper( 'UtilFunctions' ); ?>

<?php if( $o_DefaultBN->getIdListaPreciCab() ){ $s_Disabled = "disabled"; }else{ $s_Disabled = ""; } ?>
<input type="hidden" name="i_Id" id="i_Id" value="<?=$o_DefaultBN->getIdListaPreciCab()?>">
<div id="resultContent" style=""></div>

<div class="card">
    <div class="container">

        <div class="form-row mx-0">
            <div class="col-md-6 mb-1">
                <label class="col-form-label" for="IdTipoLista">Tipo Lista</label>
                <select class="form-control form-control-sm custom-select my-0 mr-sm-2" name="IdTipoLista" id="IdTipoLista" required>
                    <!--<option value=""> - SELECCIONE - </option>-->
                    <?php foreach( MST_ListaPrecioCabeceraBN::getArrayTipoLista() as $Cod => $Valor ){ ?>
                        <option value="<?=$Cod?>" <?php if( $o_DefaultBN->getIdTipoLista() == $Cod ){ echo "selected"; } ?> > <?=$Valor?> </option>
                    <?php } ?>
                </select>
            </div>
            <div class="col-md-6 mb-1">
                <label class="col-form-label" for="IdSucursal">Sucursal</label>
                <select class="form-control form-control-sm custom-select my-0 mr-sm-2" name="IdSucursal" id="IdSucursal" required>
                    <option value=""> - SELECCIONE - </option>
                    <?php foreach( GSS_SucursalFN::selectActivos() as $o_GSS_SucursalBN ){ ?>
                        <option value="<?=$o_GSS_SucursalBN->getIdSucursal()?>" <?php if( $o_DefaultBN->getIdSucursal() == $o_GSS_SucursalBN->getIdSucursal() ){ echo "selected"; } ?> > <?=$o_GSS_SucursalBN->getDescripcion()?> </option>
                    <?php } ?>
                </select>
            </div>
        </div>
        <div class="form-row mx-0">
            <div class="col-md-6 mb-1">
                <label class="col-form-label" for="Estado">Estado</label>
                <?=crearSelect( array( "Estado", "Llave", "Valor" ), array( array( "Llave" => "A", "Valor" => "ACTIVO" ), array( "Llave" => "I", "Valor" => "INACTIVO" ) ), $o_DefaultBN->getEstado() )?>
            </div>
            <div class="col-md-6 mb-1">
                <label class="col-form-label" for="Estado">Moneda</label>
                <select class="form-control form-control-sm custom-select my-0 mr-sm-2" name="IdMoneda" id="IdMoneda" required>
                    <?php foreach ( $a_GSS_MonedaMast as $i_Key => $o_GSS_MonedaMastBN ){ ?>
                        <option value="<?=$o_GSS_MonedaMastBN->getIdMoneda()?>" <?php if( $o_DefaultBN->getIdMoneda()==$o_GSS_MonedaMastBN->getIdMoneda() ){ echo "selected"; } ?>> <?=$o_GSS_MonedaMastBN->getDescripcion()?> </option>
                    <?php } ?>
                </select>
            </div>

        </div>

        <div class="dropdown-divider"></div>

    </div>
</div>

<div id="dialog" style="display:none;"><iframe id="myIframe" src="" frameborder="0" height="100%" width="100%"></iframe></div>
<script>
    objMainTab.modalUIDialog( "#dialog", { title : "Auditoria", width : 425, height  : 230 } );
</script>
