Carga de Historial de ventas, CxC,anticipos y bancos al hacer click en el TAB
This commit is contained in:
@@ -1231,8 +1231,12 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabHis" runat="server" HeaderText="Historial de Ventas">
|
||||
<ajax:TabPanel ID="TabHis" runat="server">
|
||||
<HeaderTemplate>
|
||||
<span>Historial de Ventas</span>
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="portlet light xspadding bordered">
|
||||
@@ -1343,8 +1347,7 @@
|
||||
<asp:PostBackTrigger ControlID="BtnPDFHistorial" />
|
||||
</Triggers>
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
<asp:Button ID="BtnHistorialVentas" runat="server" ClientIDMode="Static" Text="HistorialVentas" Style="display: none;" OnClick="BtnHistorialVentas_Click" />
|
||||
<asp:GridView ID="GVHistorial" runat="server" DataKeyNames="CveVenta, Folio, TipoDocto" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas en el Cliente" ToolTip="Listado de Historial de Ventas" CssClass="table table-striped table-advance table-hover" Style="text-align: center; min-width: 783px; width: 100%;" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" />
|
||||
@@ -1560,12 +1563,14 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabCxC" runat="server" HeaderText="Cuentas x Cobrar">
|
||||
<ajax:TabPanel ID="TabCxC" runat="server">
|
||||
<HeaderTemplate>
|
||||
<span>Cuentas x Cobrar</span>
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpImprimir" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
|
||||
@@ -1582,6 +1587,7 @@
|
||||
<div class="portlet-body">
|
||||
<asp:UpdatePanel ID="UpParametros" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnCargaCxC" runat="server" ClientIDMode="Static" Text="CargaCxC" Style="display: none;" OnClick="BtnCargaCxC_Click" />
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
@@ -2169,7 +2175,7 @@
|
||||
|
||||
<asp:UpdatePanel ID="UpAnticipos" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:Button ID="BtnCargaAnticipos" runat="server" ClientIDMode="Static" Text="CargaAnt" Style="display: none;" OnClick="BtnCargaAnticipos_Click" />
|
||||
<div class="row col-md-12" align="right">
|
||||
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
@@ -2298,7 +2304,10 @@
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
|
||||
<ajax:TabPanel ID="TabBancos" runat="server" HeaderText="Bancos">
|
||||
<ajax:TabPanel ID="TabBancos" runat="server">
|
||||
<HeaderTemplate>
|
||||
<span>Bancos</span>
|
||||
</HeaderTemplate>
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="portlet light xspadding bordered ">
|
||||
@@ -2442,55 +2451,61 @@
|
||||
</div>
|
||||
|
||||
<div class="table-scrollable">
|
||||
<asp:GridView ID="GvBancos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Abonos"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" DataKeyNames="SerieFolioCP">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Factura" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplFactura" CssClass="Texto" runat="server" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Fecha Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Fecha Vencimiento" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cheque" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplCheque" Visible="False" runat="server" CssClass="Texto" Text='<%# Eval("FolioCobro")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink>
|
||||
<asp:UpdatePanel ID="UpBancos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:Button ID="BtnCargaBancos" runat="server" ClientIDMode="Static" Text="CargaBancos" Style="display: none;" OnClick="BtnCargaBancos_Click" />
|
||||
|
||||
<asp:GridView ID="GvBancos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró Historial de Abonos"
|
||||
CssClass="table table-striped table-advance table-hover ScrollAD" data-sort="false" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None" DataKeyNames="SerieFolioCP">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Factura" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplFactura" CssClass="Texto" runat="server" Text='<%# Eval("SerieFolio")%>' NavigateUrl='<%# Eval("CveVenta", "/Ventas/Ventas.aspx?CveVenta={0}")%>'></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Fecha Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:TemplateField HeaderText="Fecha Vencimiento" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaVenci" runat="server" Text='<%# Eval("FechaVencimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Cheque" ItemStyle-HorizontalAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplCheque" Visible="False" runat="server" CssClass="Texto" Text='<%# Eval("FolioCobro")%>' NavigateUrl='<%# Eval("CveIE", "/Bancos/IE.aspx?CveIE={0}") %>'></asp:HyperLink>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonado" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImp" runat="server" Text='<%# Eval("ImporteAbonado", "{0:N2}")%>'></asp:Literal>
|
||||
<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("MonedaVenta")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Archivos</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplXML" runat="server" Visible="false" Target="_blank"><i class='fa fa-file-excel-o' style="font-weight:bold;"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="HplPDF" runat="server" Visible="false" Target="_blank"><i class='fa fa-file-pdf-o' style="font-weight:bold;"></i></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Reenviar Complemento</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<%-- <a id="HLSendMail" runat="server" class="Texto" visible="false">
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Abonado" ItemStyle-HorizontalAlign="Right">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlImp" runat="server" Text='<%# Eval("ImporteAbonado", "{0:N2}")%>'></asp:Literal>
|
||||
<asp:Literal ID="LtlMon" runat="server" Text='<%# Eval("MonedaVenta")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Archivos</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink ID="HplXML" runat="server" Visible="false" Target="_blank"><i class='fa fa-file-excel-o' style="font-weight:bold;"></i></asp:HyperLink>
|
||||
<asp:HyperLink ID="HplPDF" runat="server" Visible="false" Target="_blank"><i class='fa fa-file-pdf-o' style="font-weight:bold;"></i></asp:HyperLink>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Reenviar Complemento</HeaderTemplate>
|
||||
<ItemStyle HorizontalAlign="Center" />
|
||||
<ItemTemplate>
|
||||
<%-- <a id="HLSendMail" runat="server" class="Texto" visible="false">
|
||||
<i class="fa fa-envelope fa-2" aria-hidden="true"></i>
|
||||
</a>--%>
|
||||
<asp:LinkButton ID="LnkSendMail" CssClass="Texto" OnClick="LnkSendMail_Click" runat="server" Visible="false"> <i class="fa fa-envelope fa-2" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
<asp:LinkButton ID="LnkSendMail" CssClass="Texto" OnClick="LnkSendMail_Click" runat="server" Visible="false"> <i class="fa fa-envelope fa-2" aria-hidden="true"></i></asp:LinkButton>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</Columns>
|
||||
<RowStyle CssClass="Texto" />
|
||||
<AlternatingRowStyle CssClass="TextoAlterno" />
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
<div class="text-right ">
|
||||
<asp:LinkButton ID="BtnVerMasBancos" runat="server" Text="Ver Más" OnClick="BtnVerMasBancos_Click" class="btn btn-primary" />
|
||||
@@ -6525,7 +6540,7 @@
|
||||
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||
});
|
||||
|
||||
<%-- $("C_Tab_TabAlta_TxtTelefono").inputmask("mask", {
|
||||
<%-- $("C_Tab_TabAlta_TxtTelefono").inputmask("mask", {
|
||||
"mask": "(999) 999-9999"
|
||||
});
|
||||
|
||||
@@ -6534,6 +6549,18 @@
|
||||
"mask": "(999) 999-9999"
|
||||
});
|
||||
});--%>
|
||||
|
||||
if (<%= Me.CveCliente %> > 0) {
|
||||
//CARGA EL HISTORIAL DE VENTAS
|
||||
$("#C_Tab_TabHis_tab").click(function () { CargaHistorialVentas(); });
|
||||
//CARGA EL CXC
|
||||
$("#C_Tab_TabCxC_tab").click(function () { CargaCxC(); });
|
||||
//CARGA ANTICIPOS
|
||||
$("#C_Tab_TabAnticipos_tab").click(function () { CargaAnticipos(); });
|
||||
//CARGA BANCOS
|
||||
$("#C_Tab_TabBancos_tab").click(function () { CargaBancos(); });
|
||||
}
|
||||
|
||||
}
|
||||
$(document).on('mouseenter', ".truncate", function () {
|
||||
var $this = $(this);
|
||||
@@ -6706,6 +6733,23 @@
|
||||
$get("HdnCuenta").value = op;
|
||||
$("#BtnCargarCuentas").click();
|
||||
}
|
||||
|
||||
function CargaCxC() {
|
||||
$('#BtnCargaCxC').click();
|
||||
}
|
||||
|
||||
function CargaAnticipos() {
|
||||
$('#BtnCargaAnticipos').click();
|
||||
}
|
||||
|
||||
function CargaBancos() {
|
||||
$('#BtnCargaBancos').click();
|
||||
}
|
||||
|
||||
function CargaHistorialVentas() {
|
||||
$('#BtnHistorialVentas').click();
|
||||
}
|
||||
|
||||
function LimpiaModal() {
|
||||
$('#<%= TxtEnvioDireccion.ClientID %>').val('');
|
||||
$('#<%= TxtEnvioNoExt.ClientID %>').val('');
|
||||
|
||||
@@ -25,9 +25,9 @@ Partial Class Clientes
|
||||
Private Opcion As Integer
|
||||
<PersistenceModeAttribute(PersistenceMode.InnerProperty)>
|
||||
Public ReadOnly Property RowStyle As TableItemStyle
|
||||
Private ReadOnly Property CveCliente As Integer
|
||||
Public ReadOnly Property CveCliente As Integer
|
||||
Get
|
||||
Return ViewState("CveCliente").ToString().ToEntero()
|
||||
Return If(IsNothing(ViewState("CveCliente")), "-1", ViewState("CveCliente").ToString()).ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
Private Property DTCuentasBancos As DataTable
|
||||
@@ -1400,6 +1400,7 @@ Partial Class Clientes
|
||||
HeedarContable.Attributes.Remove("onclick")
|
||||
UpFiscalContable.Update()
|
||||
End Sub
|
||||
|
||||
Private Function CargaDatos() As Boolean
|
||||
Dim watch As New Diagnostics.Stopwatch()
|
||||
watch.Start()
|
||||
@@ -1413,15 +1414,11 @@ Partial Class Clientes
|
||||
CargaDdlSucursalCliente()
|
||||
CargaDocumentosVenta(CveCliente)
|
||||
|
||||
Dim RetSC As Boolean = CargaSucursalesCliente()
|
||||
Dim RetCC As Boolean = CargaCotizaciones()
|
||||
CargaHistorial()
|
||||
CargaResumenHistorial()
|
||||
Dim RetCxC As Boolean = CargaCxC()
|
||||
CargaAnticipos()
|
||||
Dim RetSC As Boolean = CargaSucursalesCliente()
|
||||
|
||||
|
||||
CargaPersonalAsignado()
|
||||
CargaUsuariosPortal()
|
||||
CargaBancos()
|
||||
CargaOrdenesServiciosCliente()
|
||||
CargaImpuestosLocales()
|
||||
CargaCuentasContablesDdls()
|
||||
@@ -2059,6 +2056,8 @@ Partial Class Clientes
|
||||
End If
|
||||
ObjMovtos.Dispose()
|
||||
GvBancos.DataBind()
|
||||
|
||||
UpBancos.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub GvBancos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancos.RowDataBound
|
||||
@@ -10627,5 +10626,32 @@ Partial Class Clientes
|
||||
|
||||
CargaDispositivos(DdlEstatusDispositivos.SelectedValue.ToEntero())
|
||||
End Sub
|
||||
Protected Sub BtnCargaCxC_Click(sender As Object, e As EventArgs)
|
||||
If CveCliente > 0 Then
|
||||
CargaCxC()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnHistorialVentas_Click(sender As Object, e As EventArgs)
|
||||
If CveCliente > 0 Then
|
||||
CargaCotizaciones()
|
||||
CargaHistorial()
|
||||
CargaResumenHistorial()
|
||||
|
||||
UpnHistorial.Update()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnCargaAnticipos_Click(sender As Object, e As EventArgs)
|
||||
If CveCliente > 0 Then
|
||||
CargaAnticipos()
|
||||
End If
|
||||
End Sub
|
||||
Protected Sub BtnCargaBancos_Click(sender As Object, e As EventArgs)
|
||||
If CveCliente > 0 Then
|
||||
CargaBancos()
|
||||
UpDatos.Update()
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user