<%@ Import Namespace="Seven.Front" %>
<%@ Import Namespace="Seven.Front.Globals" %>
<%@ Import Namespace="Seven.Front.Objects" %>

<%@ Page Language="C#" MasterPageFile="Model.Master" AutoEventWireup="true" CodeBehind="SaldosPick.aspx.cs" Inherits="Seven.Front.SaldosPick" %>

<asp:Content ID="Content1" ContentPlaceHolderID="cpHeader" runat="server">

    <% try
       { %>

    <title><%=L.TIT("SaldosPick") %> [1.5]</title>

    <script type="text/javascript">

        function SaldosPick() {
            window.open('Informe.aspx?r=50&sm=' + $('#cbSPResumido:checked').val()
                + '&ff=' + $('#cbSPFecha:checked').val()
                + '&fs=' + $('#cbSPConcepto:checked').val()
                + '&fh=' + $('#cbSPHabitacion:checked').val()
                + '&fm=' + $('#cbSPMoneda:checked').val()
                + '&s=' + $('#txtSPFecIni').val()
                + '&f=' + $('#txtSPFecFin').val()
                + '&si=' + $('#cbServFact').val()
                + '&sf=' + $('#cbServFactRev').val()
                + '&hi=' + $('#cbHabitacion').val()
                + '&hf=' + $('#cbHabitacionRev').val()
                + '&ffe=' + $('#cbSPFolioExt:checked').val()
                + '&fei=' + $('#cbFolioExt').val()
                + '&fef=' + $('#cbFolioExtRev').val(), '_blank')
        }

        function SaldosPickEtiq() {
            window.open('Informe.aspx?r=51&sm=' + $('input[name=rbSPListar]:checked').val()
                + '&m=' + $('#txtSPImporteMin').val()
                + '&d=' + $('#cbSPSoloTariDir:checked').val()
                + '&t=' + $('#cbSPIncluirTarjCred:checked').val(), '_blank')
        }

    </script>

    <script type="text/javascript">

        $(document).ready(function () {

            $("#dlgEliminar").dialog({
                autoOpen: false,
                show: "fade",
                hide: "curtain",
                resizable: false,
                height: 167,
                width: 500,
                modal: true
            });

            $("#dlgInformation").dialog({
                autoOpen: false,
                show: "fade",
                hide: "curtain",
                resizable: false,
                height: 167,
                width: 500,
                modal: true
            });

            $('#SPTabs').tabs();

            $("#SevenMenu").accordion("option", "active", 1);

        });
    </script>

    <% }
       catch { } %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="cpPrincipal" runat="server">

    <% try
       { %>

    <div id="SevenBreadcrumb" class="ui-state-default">
        <table style="width: 100%; white-space: nowrap;">
            <tr>
                <td>
                    <div class="SevenEnlaces" onclick="window.location.href='Menu.aspx#M2';" style="cursor: pointer;">
                        <table>
                            <tr>
                                <td>
                                    <img src="img/application-icon-large.png" />
                                </td>
                                <td>
                                    <%=L.LBL("LblGENMenuTactil") %>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
                <td>&nbsp;</td>
                <td>
                    <a href="Inicio.aspx"><%=L.LBL("LblGENInicio") %></a>
                    <img src="img/arrow.png" alt="" />
                    <a href="SaldosPick.aspx"><%=L.TIT("SaldosPick") %> [1.5]</a>
                </td>
                <td style="width: 100%;"></td>
                <td>
                    <%=L.LBL("LblGENLanguage") %>
                </td>
                <td>
                    <!-- #include file="LanguageCombo.html" -->
                </td>
            </tr>
        </table>
    </div>

    <div id="SevenPrincipal">

        <div id="SevenMedio">

            <div id="SevenInterno" style="width: 500px;">

                <div id="dlgEliminar" title="<%=L.LBL("LblGENDelete") %>" style="text-align: center; padding-top: 25px">
                    <span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>¿Desea eliminar este elemento?
                </div>

                <div id="dlgInformation" title="<%=L.LBL("LblGENInformation") %>" style="text-align: center; padding-top: 25px">
                </div>

                <table>
                    <tr>
                        <td>
                            <span class="SevenTitulo"><%=L.TIT("SaldosPick") %> [1.5]</span>
                        </td>
                        <td>&nbsp;&nbsp;&nbsp;</td>
                        <td>
                            <div class="SevenEnlaces">
                                <table>
                                    <tr>
                                        <td>
                                            <a href="#" onclick="window.open('http://mysevenmanuales.jimdo.com/front-desk/1-5-saldos-en-el-pick/', '_blank');" id="A1">
                                                <img src="img/question.png" />
                                                <%=L.LBL("LblGENHelp") %></a>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </td>
                    </tr>
                </table>

                <% 
           if (CorrectoIns)
           {    
                %>

                <p class="SevenMsgExito"><%=L.LBL("LblGENMSG_SavedData") %></p>

                <%  } %>

                <% 
           if (CorrectoMod)
           {    
                %>

                <p class="SevenMsgExito"><%=L.LBL("LblGENMSG_UpdatedData") %></p>

                <%  } %>

                <% 
           if (CorrectoEli)
           {    
                %>

                <p class="SevenMsgExito"><%=L.LBL("LblGENMSG_DeletedData") %></p>

                <%  } %>

                <% 
           if (!String.IsNullOrEmpty(ErrorMsg))
           {    
                %>

                <p class="SevenMsgError"><%=ErrorMsg %></p>

                <%  } %>

                <br />

                <div id="SPTabs" style="padding: 0px; height: 250px;">
                    <ul>
                        <li>
                            <a href="#Pick">
                                <table>
                                    <tr>
                                        <td>
                                            <img src="img/Seven/FDK/SaldosPick.png" /></td>
                                        <td><span style="font-size: 7pt;"><%=L.TIT("SaldosPick") %></span></td>
                                    </tr>
                                </table>
                            </a>
                        </li>
                        <li>
                            <a href="#Etiquetas">
                                <table>
                                    <tr>
                                        <td>
                                            <img src="img/tags-label.png" /></td>
                                        <td><span style="font-size: 7pt;"><%=L.LBL("LblFDKSPEtiquetas") %></span></td>
                                    </tr>
                                </table>
                            </a>
                        </li>
                    </ul>

                    <div id="Pick">
                        <table>
                            <tr>
                                <td></td>
                                <td></td>
                                <td style="text-align: center;">
                                    <b><%=L.LBL("LblGENStart") %></b>
                                </td>
                                <td style="text-align: center;">
                                    <b><%=L.LBL("LblGENEnd") %></b>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" id="cbSPFecha" name="cbSPFecha" value="1" />
                                </td>
                                <td>
                                    <%=L.LBL("LblGENDate") %>:
                                </td>
                                <td>
                                    <input type="text" id="txtSPFecIni" value="<%=string.Format("{0:d}", gen.fecha_hotelera.AddDays(-1)) %>" 
                                        class="eligeFecha" onchange="$('input[name=cbSPFecha]').prop('checked', true);" />
                                </td>
                                <td>
                                    <input type="text" id="txtSPFecFin" value="<%=string.Format("{0:d}", gen.fecha_hotelera.AddDays(-1)) %>" 
                                        class="eligeFecha" onchange="$('input[name=cbSPFecha]').prop('checked', true);" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" id="cbSPConcepto" name="cbSPConcepto" value="1" />
                                </td>
                                <td>
                                    <%=L.LBL("LblFDKSConcepto") %>:
                                </td>
                                <td>
                                    <%=cbServFact %>
                                </td>
                                <td>
                                    <%=cbServFactRev %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" id="cbSPHabitacion" name="cbSPHabitacion" value="1" />
                                </td>
                                <td>
                                    <%=L.LBL("LblGENRoom") %>:
                                </td>
                                <td>
                                    <%=cbHabitacion %>
                                </td>
                                <td>
                                    <%=cbHabitacionRev %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" id="cbSPFolioExt" name="cbSPFolioExt" value="1" />
                                </td>
                                <td>
                                    <%=L.LBL("LblFDKFolioExterno") %>:
                                </td>
                                <td>
                                    <select name="cbFolioExt" id="cbFolioExt" onchange="$('input[name=cbSPFolioExt]').prop('checked', true);" style="width: 180px;">
                                        <%
                                            foreach (System.Data.DataRow dr in FoliosExt.Rows)
                                            {
                                                Response.Write(Utils.GetSelectOption(dr["id_tarj"].ToString(), dr["num_tarj"].ToString() + " - " + dr["nombre_titular"].ToString().Trim(), false));
                                            }
                                        %>
                                    </select>
                                </td>
                                <td>
                                    <select name="cbFolioExtRev" id="cbFolioExtRev" onchange="$('input[name=cbSPFolioExt]').prop('checked', true);" style="width: 180px;">
                                        <%
                                            foreach (System.Data.DataRow dr in FoliosExtRev.Rows)
                                            {
                                                Response.Write(Utils.GetSelectOption(dr["id_tarj"].ToString(), dr["num_tarj"].ToString() + " - " + dr["nombre_titular"].ToString().Trim(), false));
                                            }
                                        %>
                                    </select>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" id="cbSPMoneda" name="cbSPMoneda" value="1" />
                                </td>
                                <td>
                                    <%=L.LBL("LblGENMoney") %>:
                                </td>
                                <td colspan="2">
                                    <%=cbMoneda %>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <input type="checkbox" id="cbSPResumido" name="cbSPResumido" value="1" />
                                </td>
                                <td colspan="3">
                                    <%=L.LBL("LblFDKSPResumidoHabi") %>
                                </td>
                            </tr>
                        </table>

                        <br />

                        <table style="width: 100%;">
                            <tr>
                                <td colspan="4">
                                    <table style="width: 100%;">
                                        <tr>
                                            <td style="width: 100%;"></td>
                                            <td>
                                                <button type="button" onclick="SaldosPick();">
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <img src="img/magnifier16.png"
                                                                    alt="<%=L.LBL("LblGENVer") %>" />
                                                            </td>
                                                            <td>
                                                                <%=L.LBL("LblGENVer") %>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </button>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </div>

                    <div id="Etiquetas">

                        <br />
                        <br />
                        <br />

                        <%=L.LBL("LblFDKSPImporteMin") %>: 
                        <input type="text" id="txtSPImporteMin" value="<%=string.Format("{0:N2}", 0) %>" style="width: 150px;" />
                        <%=cod_mone_base %>

                        <br />
                        <br />

                        <table>
                            <tr>
                                <td>
                                    <fieldset>
                                        <legend><b><%=L.LBL("LblGENListar") %></b></legend>
                                        <input type="radio" name="rbSPListar" value="0" checked="checked" /><%=L.LBL("LblGENEtiqueta") %>
                                        <input type="radio" name="rbSPListar" value="1" /><%=L.LBL("LblGENResumen") %>
                                    </fieldset>
                                </td>
                                <td>
                                    <table>
                                        <tr>
                                            <td>
                                                <input type="checkbox" id="cbSPSoloTariDir" value="1" />
                                            </td>
                                            <td>
                                                <%=L.LBL("LblFDKSPSoloTariDir") %>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <input type="checkbox" id="cbSPIncluirTarjCred" value="1" />
                                            </td>
                                            <td>
                                                <%=L.LBL("LblFDKSPIncluirTarjCred") %>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>

                        <br />

                        <table style="width: 100%;">
                            <tr>
                                <td colspan="4">
                                    <table style="width: 100%;">
                                        <tr>
                                            <td style="width: 100%;"></td>
                                            <td>
                                                <button type="button" onclick="SaldosPickEtiq();">
                                                    <table>
                                                        <tr>
                                                            <td>
                                                                <img src="img/magnifier16.png"
                                                                    alt="<%=L.LBL("LblGENVer") %>" />
                                                            </td>
                                                            <td>
                                                                <%=L.LBL("LblGENVer") %>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </button>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>

                    </div>

                </div>

            </div>

        </div>

    </div>

    <% }
       catch { } %>
</asp:Content>

