Productos Servicios, lentitud productos adicionales
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<li>
|
||||
<%-- <li>
|
||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
@@ -18,17 +18,8 @@
|
||||
</li>
|
||||
<li>
|
||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||
</li>
|
||||
<%-- <asp:UpdatePanel ID="UpLnkAgregar" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkHabilitarSaldar" OnClick="LnkHabilitarSaldar_Click" runat="server">Otros Ingresos</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSaldar" Visible="false" OnClick="LnkSaldar_Click" runat="server">Saldar</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>--%>
|
||||
</li>--%>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
||||
</asp:Content>
|
||||
@@ -44,11 +35,7 @@
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
|
||||
<%--<label class="col-md-1 " id="LblDdlSucursal" runat="server">Sucursal:</label>
|
||||
<div class="col-md-2" id="DivDdlSucursal" runat="server">
|
||||
<asp:DropDownList ID="DdlSucursal" runat="server" DataTextField="SubProyecto" DataValueField="CveSubProyecto" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<div class="col-md-1" style="">Fecha Ini Doc:</div>
|
||||
<div class="col-md-1">
|
||||
@@ -96,57 +83,6 @@
|
||||
</div>
|
||||
<div class="portlet-body" style="display: none;">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
|
||||
<%-- <div class="col-md-1">Tipo:</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlTipo" runat="server" Width="100%" Class="table-group-action-input form-control input-inline input-small input-sm">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Anticipos" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="NC X Aplicar" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Ingresos X Comprobar" Value="3"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-md-1" style="width: 5%">Con Saldo:</div>
|
||||
<div class="col-md-2" style="display:flex; width:20%">
|
||||
<asp:DropDownList CssClass="form-control input-sm select2me" ID="DdlConSaldo" runat="server" Width="15%" Class="table-group-action-input form-control input-inline input-small input-sm">
|
||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Selected="True" Text="Si" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<div style="width:30%;text-align:center">Vendedor:</div>
|
||||
<div id="DivDdlVendedor" runat="server" style="width:55%;display:flex">
|
||||
<asp:DropDownList ID="DdlVendedor" runat="server" DataTextField="Vendedor" DataValueField="CveVendedor" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<%-- <div class="col-md-1">Fecha Ini. Ap:</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaICorte" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaICorte" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaICorte" runat="server" TargetControlID="TxtFechaICorte" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaICorte" TargetControlID="TxtFechaICorte" PopupButtonID="LnkFechaICorte" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaICorte" runat="server" ControlToValidate="TxtFechaICorte" Display="None" ErrorMessage="El campo <b>''Fecha Inicial Corte''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaICorte2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaICorte" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1" style="margin-left: 20px">Fecha Fin Ap:</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 110px !important; padding: 0px;">
|
||||
<asp:TextBox ID="TxtFechaFCorte" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaFCorte" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaFCorte" runat="server" TargetControlID="TxtFechaFCorte" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CEFechaFCorte" TargetControlID="TxtFechaFCorte" PopupButtonID="LnkFechaFCorte" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVFechaFCorte" runat="server" ControlToValidate="TxtFechaFCorte" Display="None" ErrorMessage="El campo <b>''Fecha Final Corte''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCEFechaFCorte2" runat="server" HighlightCssClass="vco" TargetControlID="CVFechaFCorte" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,14 +136,18 @@
|
||||
|
||||
|
||||
<ajax:TabContainer runat="server" ID="Tabs">
|
||||
|
||||
<ajax:TabPanel ID="TabIXC" runat="server" HeaderText="IXC" ClientIDMode="Static">
|
||||
<ContentTemplate>
|
||||
<div class="row">
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<input type="text" id="TxtBusquedaIXC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIXC','{0}')", GvDatosIXC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIXC','{0}')", GvDatosIXC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="TxtBusquedaIXC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIXC','{0}')", GvDatosIXC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIXC','{0}')", GvDatosIXC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -244,6 +184,164 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabNCEXC" runat="server" HeaderText="NC-EXC" ClientIDMode="Static">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="TxtBusquedaNCEXC" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaNCEXC','{0}')", GvDatosNCEXC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaNCEXC','{0}')", GvDatosNCEXC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel ID="UpDatosNCEXC" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvDatosNCEXC" runat="server" OnRowDataBound="GvDatosIXC_RowDataBound" GridLines="None"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" AutoGenerateColumns="False"
|
||||
EmptyDataText="No se encontraron registros" data-sort="true" Width="99%"
|
||||
DataKeyNames="CveCliente,CveMoneda,Saldo,CveVenta,NombreComercial,CveVentaAmortizacion,SerieFolioAmortizacion,SerieFolio,Total,TipoCambio,
|
||||
Fecha,FechaAmortizacion,SubTotal,SubTotalAmortizacion,ImporteAmortizacion,CveIE,Tipo,SaldoAcumulativo,CveSubProyecto">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="chk" Checked="false" Visible="false" runat="server" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="TipoColumna" HeaderText="" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="SerieFolio" HeaderText="Cliente/Folio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Fecha" ItemStyle-Width="10%" HeaderText="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField DataField="SubTotal" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="ImporteAmortizacion" ItemStyle-Width="10%" HeaderText="Aplicado" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" Visible="false" />
|
||||
<asp:BoundField DataField="Saldo" ItemStyle-Width="10%" HeaderText="Saldo" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="right" />
|
||||
<asp:BoundField DataField="Abreviatura" ItemStyle-Width="5%" HeaderText="Moneda" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Center" Visible="false" />
|
||||
<asp:BoundField DataField="Costo" ItemStyle-Width="10%" HeaderText="Costo" DataFormatString="{0:C}" ItemStyle-HorizontalAlign="Center" Visible="false" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabVentas" runat="server" HeaderText="Ventas" ClientIDMode="Static">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 15px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||
<div class="col-md-6">
|
||||
<input type="text" id="TxtBusquedaVentas" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaVentas','{0}')", GvCxC.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaVentas','{0}')", GvCxC.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<asp:UpdatePanel ID="UPVentas" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvCxC" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Cuentas por Cobrar Pendientes"
|
||||
DataKeyNames="TipoDocto,CveVenta,CveCliente,SerieFolio,Original,SubTotal,IVA,IEPS,RetIVA,RetISR,Num3,CveSubProyecto,CveMoneda,Saldo,TipoCambio, RFC,UUID,Fecha,PorcentajeIVA,DescuentoProntoPago,CveTipoRetencion,Descuento,ClaveMetodoPagoSAT"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" Style="text-align: center;" GridLines="None" HeaderStyle-CssClass="ADtr">
|
||||
<Columns>
|
||||
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>
|
||||
<input type="checkbox" id="ChkAll" onclick="CheckAll();" />
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="Chk" CssClass="chkgv" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left">
|
||||
<HeaderTemplate>Venta</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplF" CssClass="Texto" NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>' Text='<%# Eval("SerieFolio")%>' runat="server"></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
Tipo<br>
|
||||
Docto
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlTipoDocto" runat="server" Text='<%# Eval("TipoDocto") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
Fecha<br>
|
||||
Venta
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center">
|
||||
<HeaderTemplate>
|
||||
Moneda
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlMoneda" runat="server" Text='<%# Eval("Moneda" ) %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>
|
||||
Monto
|
||||
<br>
|
||||
Venta
|
||||
</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
|
||||
<HeaderTemplate>Saldo</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlSaldo" runat="server" Text='<%# Eval("Saldo", "{0:N2}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabCompras" runat="server" HeaderText="Compras" ClientIDMode="Static">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
</ajax:TabContainer>
|
||||
|
||||
|
||||
|
||||
@@ -11,10 +11,28 @@ Partial Public Class General_SaldosMenores
|
||||
#Region "PROPIEDADES"
|
||||
Private Property DtDatosIXC As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtDatos"), DataTable)
|
||||
Return DirectCast(ViewState("DtDatosIXC"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatos") = value
|
||||
ViewState("DtDatosIXC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtDatosNCEXC As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtDatosNCEXC"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatosNCEXC") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property DtDatosVentas As DataTable
|
||||
Get
|
||||
Return DirectCast(ViewState("DtDatosVentas"), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtDatosVentas") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -64,6 +82,9 @@ Partial Public Class General_SaldosMenores
|
||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||
|
||||
DvSaldar.Visible = False
|
||||
DtDatosIXC = New DataTable
|
||||
DtDatosNCEXC = New DataTable
|
||||
DtDatosVentas = New DataTable
|
||||
|
||||
If Tabs.ActiveTab Is TabIXC Then
|
||||
CargaDatosIXC()
|
||||
@@ -72,6 +93,15 @@ Partial Public Class General_SaldosMenores
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If Tabs.ActiveTab Is TabVentas Then
|
||||
CargaDatosVentas()
|
||||
If DtDatosVentas.Rows.Count > 0 Then
|
||||
DvSaldar.Visible = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Upsaldar.Update()
|
||||
|
||||
End Sub
|
||||
@@ -165,6 +195,11 @@ Partial Public Class General_SaldosMenores
|
||||
End If
|
||||
|
||||
|
||||
If Tabs.ActiveTab Is TabVentas Then
|
||||
|
||||
End If
|
||||
|
||||
|
||||
TxtFecha.Text = DateTime.Today.ToString()
|
||||
Upsaldar.Update()
|
||||
End Sub
|
||||
@@ -207,25 +242,9 @@ Partial Public Class General_SaldosMenores
|
||||
DdlSubProyectoSaldar.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Protected Sub CargaDatosIXC()
|
||||
|
||||
|
||||
|
||||
|
||||
'If TipoCambio = 3 AndAlso TxtEspecifico.Text <> "" Then
|
||||
' TCEspecifico = TxtEspecifico.Text.ToDouble()
|
||||
'Else
|
||||
' TCEspecifico = -1
|
||||
'End If
|
||||
|
||||
'If TipoCambio <> 1 Then
|
||||
' CveMoneda = -1
|
||||
'End If
|
||||
|
||||
Dim FechaICorte As DateTime = MinFecha
|
||||
Dim FechaFCorte As DateTime = MaxFecha
|
||||
|
||||
@@ -250,17 +269,6 @@ Partial Public Class General_SaldosMenores
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) Handles LnkExcel.Click
|
||||
'GenerarPDF("EXCEL")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
|
||||
'GenerarPDF("PDF")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Protected Sub GvDatosIXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosIXC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Css As String = "Texto"
|
||||
@@ -321,42 +329,147 @@ Partial Public Class General_SaldosMenores
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "SALDAR"
|
||||
|
||||
'Private Sub HabilitarCheckbox()
|
||||
' For Each Gv As GridViewRow In GvDatosIXC.Rows
|
||||
' If (Gv.DataKey("CveVenta").ToEntero() > 0 OrElse Gv.DataKey("CveIE").ToEntero() > 0) AndAlso (Gv.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then
|
||||
' Gv.FCCheckBox("Chk").Visible = True
|
||||
' End If
|
||||
' Next
|
||||
'End Sub
|
||||
|
||||
'Protected Sub LnkHabilitarSaldar_Click(sender As Object, e As EventArgs) Handles LnkHabilitarSaldar.Click
|
||||
' HabilitarCheckbox()
|
||||
' LnkSaldar.Visible = True
|
||||
' LnkHabilitarSaldar.Visible = False
|
||||
' UpLnkAgregar.Update()
|
||||
' UpDatos.Update()
|
||||
'End Sub
|
||||
|
||||
Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs) 'Handles LnkSaldar.Click
|
||||
If Tipo = 1 Then
|
||||
TxtConcepto.Text = "Cancelación de Anticipos"
|
||||
ElseIf Tipo = 2 Then
|
||||
TxtConcepto.Text = "Cancelación de Saldo de Nota de crédito"
|
||||
ElseIf Tipo = 3 Then
|
||||
TxtConcepto.Text = "Cancelación de Ingresos por Comprobar"
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "N C E X C"
|
||||
|
||||
'/Compras/RepAnt-NC-EXCDetalle.aspx
|
||||
|
||||
Protected Sub CargaDatosNCEXC()
|
||||
|
||||
Dim FechaICorte As DateTime = MinFecha
|
||||
Dim FechaFCorte As DateTime = MaxFecha
|
||||
|
||||
Dim ObjVenta As New ClsVentas()
|
||||
Dim CveCliente As Integer = -1
|
||||
|
||||
If ObjVenta.GetRepAnticiposNCIXCDetalle(CveCliente, -1, txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa, 1, -1, CveMoneda, FechaICorte, FechaFCorte, TipoCambio, TCEspecifico,
|
||||
SaldoMayorA:=TxtSaldoMayorA.Text.ToDecimal, SaldoMenorA:=TxtSaldoMenorA.Text.ToDecimal) Then
|
||||
GvDatosNCEXC.DataSource = ObjVenta.DtResultados
|
||||
DtDatosNCEXC = ObjVenta.DtResultados
|
||||
End If
|
||||
Upsaldar.Update()
|
||||
RegistraScript("$('#DivModalSaldar').modal();")
|
||||
|
||||
ObjVenta.Dispose()
|
||||
GvDatosIXC.DataBind()
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvDatosNCEXC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatosNCEXC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim Css As String = "Texto"
|
||||
Dim Liga As String = ""
|
||||
|
||||
If e.Row.DataKey("Tipo").ToEntero() < 1 Then
|
||||
e.Row.CssClass = "SubTotales3"
|
||||
e.Row.Cells(2).Text = e.Row.DBCampo("Moneda").ToString()
|
||||
ElseIf e.Row.DataKey("CveCliente").ToEntero() < 1 Then
|
||||
e.Row.CssClass = "SubTotales2"
|
||||
Select Case e.Row.DataKey("Tipo").ToEntero()
|
||||
Case 1
|
||||
e.Row.Cells(2).Text = "Anticipos"
|
||||
Case 2
|
||||
e.Row.Cells(2).Text = "NC X Aplicar"
|
||||
Case 3
|
||||
e.Row.Cells(2).Text = "Ingresos X Comprobar"
|
||||
End Select
|
||||
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() < 1 AndAlso e.Row.DataKey("CveIE").ToEntero() < 1 Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(2).Text = e.Row.DataKey("NombreComercial")
|
||||
e.Row.Cells(7).Text = ""
|
||||
ElseIf e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 AndAlso e.Row.DataKey("CveVenta").ToEntero() > 0 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
|
||||
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
|
||||
|
||||
|
||||
|
||||
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVenta")}"
|
||||
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
|
||||
ElseIf e.Row.DataKey("CveIE").ToEntero() > 0 AndAlso e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1 Then
|
||||
e.Row.CssClass = "SubTotales"
|
||||
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolio")
|
||||
e.Row.Cells(3).Text = e.Row.DataKey("Fecha").ToDate().ToShortDateString()
|
||||
e.Row.Cells(4).Text = "$" & e.Row.DataKey("Total").FormatoNumero()
|
||||
Liga = $"/Bancos/IE.aspx?&CveIE={e.Row.DataKey("CveIE")}"
|
||||
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
|
||||
Else
|
||||
e.Row.Cells(2).Text = e.Row.DataKey("SerieFolioAmortizacion")
|
||||
e.Row.Cells(3).Text = e.Row.DataKey("FechaAmortizacion").ToDate().ToShortDateString()
|
||||
e.Row.Cells(4).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
|
||||
e.Row.Cells(5).Text = "$" & e.Row.DataKey("ImporteAmortizacion").FormatoNumero()
|
||||
e.Row.Cells(6).Text = "$" & e.Row.DataKey("SaldoAcumulativo").FormatoNumero()
|
||||
Liga = $"/Ventas/Ventas.aspx?&CveVenta={e.Row.DataKey("CveVentaAmortizacion")}"
|
||||
e.Row.Cells(2).Text = $"<a class=""{Css}"" href=""{Liga}"">{e.Row.Cells(2).Text}</a>"
|
||||
End If
|
||||
|
||||
|
||||
If (e.Row.DataKey("CveVenta").ToEntero() > 0 OrElse e.Row.DataKey("CveIE").ToEntero() > 0) AndAlso (e.Row.DataKey("CveVentaAmortizacion").ToEntero() < 1) Then
|
||||
e.Row.FCCheckBox("Chk").Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "V E N T A S"
|
||||
|
||||
|
||||
'/Compras/RepAnt-NC-EXCDetalle.aspx
|
||||
|
||||
Protected Sub CargaDatosVentas()
|
||||
|
||||
Dim Mov As New ClsMovimientos
|
||||
Dim FechaI As String = txtFechaI.Text
|
||||
Dim FechaF As String = txtFechaF.Text
|
||||
|
||||
Dim FechaCorte As Date = NowADS().AddYears(1).ToShortDateString.ToString.ToDate
|
||||
|
||||
Dim SumDescuentoProntoPago As Double = 0.0
|
||||
If Mov.GetCxCClienteDetalle(-1, FechaI, FechaF, -1, -1, UsuarioActual.CveEmpresa, -1, FechaCorte:=FechaCorte) Then
|
||||
DtDatosVentas = Mov.DtResultados.FiltraParametros($"Saldo > {TxtSaldoMayorA.Text.ToDecimal} AND Saldo < {TxtSaldoMenorA.Text.ToDecimal} ", "Fecha,SerieFolio").AsEnumerable().Take(51).CopyToDataTable()
|
||||
|
||||
'Dim TmpCxCAux As DataTable
|
||||
'TmpCxCAux = Mov.DtResultados.FiltraParametros($"Saldo > {TxtSaldoMayorA.Text.ToDecimal} AND Saldo < {TxtSaldoMenorA.Text.ToDecimal} ", "Fecha,SerieFolio").AsEnumerable().Take(51).CopyToDataTable()
|
||||
SumDescuentoProntoPago = DtDatosVentas.SUM("DescuentoProntoPago")
|
||||
|
||||
GvCxC.DataSource = DtDatosVentas
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Mov.Dispose()
|
||||
GvCxC.DataBind()
|
||||
|
||||
If SumDescuentoProntoPago > 0.0 Then
|
||||
GvCxC.Columns(14).Visible = True 'MOSTRAR DESCUENTO PRONTO PAGO
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
GvCxC.Columns(15).Visible = True 'HABILITAR NC
|
||||
End If
|
||||
End If
|
||||
|
||||
UPVentas.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user