Files
SIG/Bancos/OtrosIE.aspx
JORGE LUIS CAUDILLO ESPARZA c35cf91883 Commit inicial Ventas Productivo
2019-08-14 16:40:54 -07:00

455 lines
26 KiB
Plaintext

<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="OtrosIE.aspx.vb" Inherits="Bancos_OtrosIE" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
<asp:Literal ID="LtlEncabezado" runat="server" Text="Otros Egresos"></asp:Literal>
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPPDocumento" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="chequesie">
<div class="chequesie1">
<div class="row">
<label class="col-md-2">Tipo Transacción:</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlTipoTransaccion" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="TipoTransaccion" DataValueField="CveTipoTransaccion" Width="156px" ValidationGroup="GrpGuardar"></asp:DropDownList>
<asp:HiddenField ID="HdnTipoTransaccion" runat="server" Value="" />
</div>
</div>
<div class="row">
<label class="col-md-2">Cuenta:</label>
<div class="col-md-6">
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" Width="250px" ValidationGroup="GrpGuardar"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVCuenta" runat="server" ControlToValidate="DdlCuenta" Display="Dynamic" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOCuenta" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuenta" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-4">
<asp:CheckBox ID="ChkAbonoCuenta" runat="server" Text="Abono en Cuenta" />
</div>
</div>
<div class="row">
<label class="col-md-2">Movimiento:</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlPlantilla" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="True" DataTextField="PlantillaPoliza" DataValueField="CvePlantillaPoliza" Width="250px" ValidationGroup="GrpGuardar"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-2"></label>
<div class="col-md-10">
<asp:DropDownList ID="DdlTipoBeneficiario" CssClass="form-control input-sm select2me" runat="server" AutoPostBack="true" ClientIDMode="Static">
<asp:ListItem Text="Proveedores" Value="1"></asp:ListItem>
<asp:ListItem Text="Funcionarios y Empleados" Value="2"></asp:ListItem>
<asp:ListItem Text="Clientes" Value="3"></asp:ListItem>
<asp:ListItem Text="Impuestos y Derechos" Value="4"></asp:ListItem>
<asp:ListItem Text="Deudores" Value="5"></asp:ListItem>
<asp:ListItem Text="Acreedores" Value="6"></asp:ListItem>
<asp:ListItem Text="Documentos" Value="7"></asp:ListItem>
<asp:ListItem Text="Institucionales Financieras" Value="8"></asp:ListItem>
<asp:ListItem Text="Socios" Value="9"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
<div class="chequesie2">
<div class="row">
<div class="col-md-8">
</div>
<label class="col-md-1">Fecha:</label>
<div class="col-md-3">
<div class="input-group input-small date date-picker" data-date-format="dd/mm/yyyy">
<asp:TextBox ID="TxtFechaDocumento" runat="server" CssClass="form-control"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="ImgCalendario" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFecha" runat="server" TargetControlID="TxtFechaDocumento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender ID="Calendario" runat="server" TargetControlID="TxtFechaDocumento" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''FechaDocumento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CVFechaDocumento" runat="server" ControlToValidate="TxtFechaDocumento" Display="None" ErrorMessage="El campo <b>''Fecha''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="VCOFechaDocumento2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaDocumento" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="row">
<label class="col-md-2 control-label">
<asp:Label ID="LblFolio" runat="server" Text="Número:"></asp:Label></label>
<div class="col-md-2">
<asp:TextBox ID="TxtFolio" runat="server" MaxLength="14" class="form-control input-sm"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVFolio" runat="server" ControlToValidate="TxtFolio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Folio''</b> es necesario, por favor seleccione uno." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
</div>
<div class="col-md-4"></div>
<label class="col-md-1 control-label text-right">Importe:</label>
<asp:UpdatePanel ID="UPPImporte" class="col-md-2 input-icon" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<i style="margin: 0px;">$</i>
<asp:TextBox ID="TxtImporte" runat="server" MaxLength="12" CssClass="form-control input-sm" ClientIDMode="Static" Style="text-align: right;" onkeyup="FormatoMoneda(this)"></asp:TextBox>
<asp:HiddenField ID="HdnImporte" runat="server" ClientIDMode="Static" />
<asp:HiddenField ID="HdnCuentaImporte" runat="server" ClientIDMode="Static" />
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div class="row" id="TrPaguese" runat="server" >
<label class="col-md-2 control-label"><asp:Label ID="LblPagueseA" runat="server" Text="Páguese a:"></asp:Label> </label>
<div class="col-md-10">
<asp:HiddenField ID="HdnCveBeneficiario" runat="server" ClientIDMode="Static" Value="-1" />
<asp:HiddenField ID="HdnCveProveedor" runat="server" ClientIDMode="Static" Value="-1" />
<asp:HiddenField ID="HdnCvePersonal" runat="server" ClientIDMode="Static" Value="-1" />
<asp:HiddenField ID="HdnCveCliente" runat="server" ClientIDMode="Static" Value="-1" />
<asp:HiddenField ID="HdnProvPorIVA" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnProvPorRetIVA" runat="server" ClientIDMode="Static" Value="0" />
<asp:HiddenField ID="HdnProvPorRetISR" runat="server" ClientIDMode="Static" Value="0" />
<asp:Button ID="BtnBuscarProveedor" runat="server" ClientIDMode="Static" Text="Buscar Proveedor" Style="display: none;" class="btn btn-primary" />
<asp:Button ID="BtnBuscarPersonal" runat="server" ClientIDMode="Static" Text="Buscar Personal" Style="display: none;" class="btn btn-primary" />
<asp:Button ID="BtnBuscarBeneficiario" runat="server" ClientIDMode="Static" Text="Buscar" Style="display: none;" class="btn btn-primary" />
<asp:Button ID="BtnBuscarCliente" runat="server" ClientIDMode="Static" Text="Buscar" Style="display: none;" class="btn btn-primary" />
<asp:TextBox ID="TxtPagueseA" runat="server" CssClass="form-control input-sm" MaxLength="70" Width="394px" ClientIDMode="Static"></asp:TextBox>&nbsp;
<asp:Image ID="ImgBuscaBeneficiario" runat="server" Visible="false" ImageUrl="/Imagenes/buscar.gif" Width="16px" Style="cursor: pointer;" alt="Buscar" />
<asp:Image ID="ImgBuscaPersonal" runat="server" Visible="false" ImageUrl="/Imagenes/buscar.gif" onclick="javascript:AbrirVentana('/RH/PopUpBuscarPersonal.aspx?Opt=OI/OE',800,600,'PopUpBuscaPersonal');" Width="16px" Style="cursor: pointer;" alt="Buscar" />
<asp:Image ID="ImgBuscaProveedor" runat="server" Visible="true" ImageUrl="/Imagenes/buscar.gif" onclick="javascript:AbrirVentana('/Compras/PopUpBuscarProveedor.aspx?Opt=OI/OE',800,600,'PopUpBuscarProveedor');" Width="16px" Style="cursor: pointer;" alt="Buscar" />
<asp:Image ID="ImgBuscaCliente" runat="server" Visible="false" ImageUrl="/Imagenes/buscar.gif" onclick="javascript:AbrirVentana('/Ventas/PopUpBuscarClientes.aspx',800,600,'PopUpBuscarClientes');" Width="16px" Style="cursor: pointer;" alt="Buscar" />
</div>
</div>
<div class="row">
<label class="col-md-2 control-label">Observaciones:</label>
<div class="col-md-10">
<asp:TextBox ID="TxtObservaciones" runat="server" MaxLength="12" Width="400px" Rows="3" TextMode="MultiLine"></asp:TextBox>
</div>
</div>
<div class="row" id="trCuentaDeposito" runat="server" visible="False">
<label class="col-md-2 control-label">Cuenta Depósito</label>
<div class="col-md-10">
<asp:DropDownList ID="DdlCuentaDeposito" runat="server" CssClass="form-control input-sm" DataTextField="CuentaDeposito" DataValueField="CveCuentaDeposito" Width="400px" AppendDataBoundItems="True"></asp:DropDownList>
<asp:RequiredFieldValidator ID="RFVCuentaDeposito" runat="server" ControlToValidate="DdlCuentaDeposito" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cuenta de Depósito''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCECuentaDeposito" runat="server" HighlightCssClass="vco" TargetControlID="RFVCuentaDeposito" Width="300px"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPMovs" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<input id="HdnCveCuenta" runat="server" type="hidden" value="-1" clientidmode="Static" />
<asp:UpdatePanel ID="UPPPlantilla" runat="server">
<ContentTemplate>
<b>
<asp:CheckBox CssClass="checksd2" ID="ChkContabilizar" runat="server" Text="Contabilizar"></asp:CheckBox></b>
</ContentTemplate>
</asp:UpdatePanel>
<div id="content" style="display: none;">
<table width="990px" border="1" rules="all" cellpadding="0" cellspacing="0">
<tr class="Titulos">
<td style="width: 310px">Cuenta</td>
<td style="width: 150px; display: none;">Proyecto</td>
<td style="width: 150px; display: none;">SubProyecto</td>
<td style="width: 120px">Referencia</td>
<td style="width: 300px">Descripción</td>
<td style="width: 70px">Cargo</td>
<td style="width: 70px">Abono</td>
<td style="display: none;"></td>
</tr>
</table>
<div style="width: 100%; min-height: 100px; overflow-scrolling: auto;" id="DivGvMov" runat="server" clientidmode="Static">
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False" DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto" Width="100%" CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField>
<HeaderTemplate>Código</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCodigo" runat="server" Text='<%# Eval("CodigoCuenta")%>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Cuenta</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlCuenta" runat="server" Text='<%# Eval("Cuenta") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Referencia</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlReferencia" runat="server" Text='<%# Eval("Referencia")%>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Concepto</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtConcepto" runat="server" Width="275px" Text='<%# Eval("Concepto")%>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Cargo</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtCargo" runat="server" Width="65px" Visible="False" onkeyup="FormatoMoneda(this)" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBTxtCargo" runat="server" TargetControlID="TxtCargo" FilterType="Custom, Numbers" ValidChars="+-.," />
<asp:Literal ID="LtlCargo" runat="server" Text='<%# Eval("Cargo", "{0:###,###,###.##}")%>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<HeaderTemplate>Abono</HeaderTemplate>
<ItemTemplate>
<asp:TextBox ID="TxtAbono" runat="server" Width="65px" Visible="False" onkeyup="FormatoMoneda(this)" Style="text-align: right;"></asp:TextBox>
<ajax:FilteredTextBoxExtender ID="FTBTxtAbono" runat="server" TargetControlID="TxtAbono" FilterType="Custom, Numbers" ValidChars="+-.," />
<asp:Literal ID="LtlAbono" runat="server" Text='<%# Eval("Abono", "{0:###,###,###.##}")%>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Eliminar" Visible="False">
<ItemTemplate>
<asp:ImageButton ID="imgD" runat="server" AlternateText="Eliminar" CausesValidation="False" CommandName="Delete" ImageUrl="/Imagenes/Btn_Delete.png" OnClientClick="javascript:return C();" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
<HeaderStyle CssClass="Titulos" />
</asp:GridView>
</div>
</div>
<table rules="all" cellpadding='0' cellspacing="0" width="100%">
<tr>
<td style="text-align: center;">
<asp:UpdatePanel ID="UpGuardar" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript" language="javascript">
function FnSuma(t, txt, importe) {
if (t.checked) {
txt.value = FormatNumber(importe, 2, true, true, true);
} else {
txt.value = "";
}
$get('TxtImporte').value = FormatNumber(SumaValores(), 2, true, true, true);
}
function FncImporte(txt, rowtxt, opcion) {
if (opcion == 1) {
$get(rowtxt).value = $get(txt).value == '' ? '' : FormatNumber($get(txt).value.replace(/,/g, ''), 2, true, true, true);
FormatoMoneda($get(txt));
} else {
$get(txt).value = $get(rowtxt).value == '' ? '' : FormatNumber($get(rowtxt).value.replace(/,/g, ''), 2, true, true, true);
FormatoMoneda($get(rowtxt));
}
}
function SumaValores() {
var Importe = 0;
var topLevelElem = document.getElementById("form1");
var textBoxes = topLevelElem.getElementsByTagName("input");
for (var i = 0; i < textBoxes.length; i++) {
if (textBoxes[i].type == "text") {
if (textBoxes[i].id.indexOf('C_GvCxP_TxtAbonar') >= 0) {
if (textBoxes[i].value != '') {
Importe = parseFloat(Importe) + parseFloat(textBoxes[i].value.split(',').join(''));
}
}
}
}
return Importe;
}
function FnCambia(chk, txt) {
if (txt.value != '') {
chk.checked = true;
} else {
chk.checked = false;
}
$get('TxtImporte').value = FormatNumber(SumaValores(), 2, true, true, true);
}
function getCuenta(pId) {
$get('HdnCveCuenta').value = pId;
PageMethods.wsGetNombreCuenta(pId, OnSucceeded);
}
function OnSucceeded(result, userContext, methodName) {
if (methodName == 'wsGetNombreCuenta') {
$get('TxtCuentaContable').value = result;
}
}
function myItemSelectedHandler(source, eventArgs) {
var CC = $get('HdnCveCuenta');
CC.value = eventArgs.get_value();
var aTargetElement = 'BtnSelCuenta';
__doPostBack(aTargetElement, eventArgs.get_value());
}
function LimpiaImporte(t, txt) {
if (t.value != '' && $get(txt)) {
$get(txt).value = '';
}
}
function CargaProveedor(CveProveedor) {
$get("HdnCveProveedor").value = CveProveedor;
$('#BtnBuscarProveedor').click();
}
function CargaPersonal(CvePersonal) {
debugger;
$get("HdnCvePersonal").value = CvePersonal;
$('#BtnBuscarPersonal').click();
return true;
}
function CargaCliente(CveCliente) {
debugger;
$get("HdnCveCliente").value = CveCliente;
$('#BtnBuscarCliente').click();
return true;
}
function CargaColectiva(CveColectiva, Tipo) {
//debugger;
$get("HdnCveBeneficiario").value = CveColectiva;
//$get("DdlTipoBeneficiario").value = Tipo;
$('#BtnBuscarBeneficiario').click();
return true;
}
</script>
<script type="text/javascript">
//function pageLoad() {
// var isAsyncPostback = Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack();
// if (isAsyncPostback) {
// tb_init('a.thickbox');
// }
//}
function fnc() {
alert($get('rbPagueseAProveedor').checked);
}
function upIE(t) {
PageMethods.wsImporteLetra(t.value, OnSucceeded);
}
function upPagueseA(rb) {
TxtPagueseA.value = "";
switch (rb) {
case 1:
imgBuscarProveedor.style.display = "inline";
imgBuscarFuncionarioEmpleado.style.display = "none";
HdnCvePersonal.value = "-1";
break;
case 2:
imgBuscarProveedor.style.display = "none";
imgBuscarFuncionarioEmpleado.style.display = "inline";
BtnBuscarBeneficiario.value = "-1";
break;
}
}
function OnSucceeded(result, userContext, methodName) {
if (methodName == 'wsImporteLetra') {
$get('TxtImporteLetra').value = result;
}
}
</script>
<%-- <script type="text/javascript">
function showContent() {
element = document.getElementById("DivGvMov");
check = document.getElementById("ChkContabilizar");
if (check.checked) {
element.style.display = 'block';
}
else {
element.style.display = 'none';
}
}
</script>--%>
<script type="text/javascript">
function showContent(t) {
var element = document.getElementById("content");
if (t.checked) {
element.style.display = 'block';
}
else {
element.style.display = 'none';
}
}
</script>
<style type="text/css">
.AutoExtender {
font-family: Verdana, Helvetica, sans-serif;
font-size: .9em;
font-weight: normal;
border: solid 1px #006699;
line-height: 20px;
padding: 2px;
background-color: White;
margin-left: 2px;
overflow: auto;
list-style-type: none;
}
.AutoExtenderList {
cursor: pointer;
color: darkgray;
text-align: left;
}
.AutoExtenderHighlight {
color: White;
background-color: #084784;
cursor: pointer;
}
#divwidth {
width: 150px !important;
}
#divwidth div {
width: 150px !important;
}
</style>
</asp:Content>