This commit is contained in:
2022-10-07 17:41:15 -07:00
17 changed files with 323 additions and 928 deletions

View File

@@ -618,29 +618,7 @@ Public Class ClsCompras
Return Retorno
End Function
Public Function GetRepPromociones(CveProveedor As Integer, CveTipoGasto As Integer, FechaI As Date, FechaF As Date, Tipo As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_PromocionesRepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@Tipo", SqlDbType.Int).Value = Tipo
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el Reporte de Promociones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
'Reporte de Compras
@@ -2130,29 +2108,6 @@ Public Class ClsCompras
#End Region
#Region " REPORTE FACTURAS PENDIENTES POR AUTORIZAR "
Public Function GetFacturasPendientesDeAutorizar(CveEmpresa As Integer, FechaInc As Date, FechaFin As Date) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_FacturasPendientesAu")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al consultar las facturas pendientes de autorizar.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
#End Region
#Region "Reporte Evaluación proveedores "
@@ -2444,31 +2399,6 @@ Public Class ClsCompras
End Function
Public Function GetComplementoTrasladoRep(CveEmpresa As Integer, CveProveedor As Integer, CveTipoProveedor As Integer, FechaI As Date, FechaF As Date, CveUsuario As Integer, CveUsuarioRegistro As Integer, CveSubProyecto As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Comp_ComplementoTrasladoRepGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveUsuarioRegistro", SqlDbType.Int).Value = CveUsuarioRegistro
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error obtener las vinculaciones.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function AddVincularPago(CveFactura As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -4730,7 +4730,6 @@ Public Class ClsPaginas
PaginaDict.Add("/Compras/ReembolsosComprobaciones.aspx".ToUpper(), 350)
PaginaDict.Add("/Compras/RepProductosServicios.aspx".ToUpper(), 97)
PaginaDict.Add("/Compras/PopUpFacturasPendientesAutorizar.aspx".ToUpper(), 559)
PaginaDict.Add("/Compras/RepEvaluacionProveedor.aspx".ToUpper(), 564)
PaginaDict.Add("/Compras/RepRembolsoComprobaciones.aspx".ToUpper(), 591)
PaginaDict.Add("/Compras/ComprasO.aspx".ToUpper(), -1)
@@ -4743,7 +4742,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Compras/RepComprasPersonal.aspx".ToUpper(), 637)
PaginaDict.Add("/Compras/RepComprasPersonalDetalle.aspx".ToUpper(), 637)
PaginaDict.Add("/Compras/RepComplementoPago.aspx".ToUpper(), 657)
PaginaDict.Add("/Compras/RepPromociones.aspx".ToUpper(), 638)
PaginaDict.Add("/Compras/RepProductosServiciosPeriodo.aspx".ToUpper(), 866)
PaginaDict.Add("/Compras/RepGastosFijos.aspx".ToUpper(), 661)
PaginaDict.Add("/Compras/RepPagado.aspx".ToUpper(), 872)
@@ -4768,7 +4767,6 @@ Public Class ClsPaginas
PaginaDict.Add("/OI/CircularDetalleB.aspx".ToUpper(), 757)
PaginaDict.Add("/Compras/CatTipoGasto.aspx".ToUpper(), 759)
PaginaDict.Add("/Compras/RepCartaPorteTraslados.aspx".ToUpper(), 1323)

View File

@@ -5602,6 +5602,36 @@ Public Class ClsVentas
Return Retorno
End Function
Public Function RepLineasAdicionales(Agrupador As Integer, CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, CveMoneda As Integer,
FechaI As Date, FechaF As Date, CveLineaAdicionalEstatus As Integer, CveEmpresa As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Vta_LineasAdicionalesRep")
With SqlAdapter.SelectCommand.Parameters
.Add("@Agrupador", SqlDbType.Int).Value = Agrupador
.Add("@CveLineaAdicional", SqlDbType.Int).Value = CveLineaAdicional
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
.Add("@TipoLinea", SqlDbType.Int).Value = TipoLinea
.Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda
.Add("@FechaI", SqlDbType.Date).Value = FechaI
.Add("@FechaF", SqlDbType.Date).Value = FechaF
.Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error obtener el reporte de lineas adicionales.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function
Public Function GetLineasAdicionalesSaldo(CveLineaAdicional As Integer, CveCliente As Integer, CveProveedor As Integer, CveMoneda As Integer, CveEmpresa As Integer, Optional ConSaldo As Integer = -1, Optional FechaVencimientoConsulta As DateTime = MaxFecha) As Boolean

View File

@@ -744,6 +744,10 @@ Partial Class Compras_Compras
End Property
Private Property CveCompraRefacturacion As Integer
Get
If ViewState("CveCompraRefacturacion") Is Nothing Then
ViewState("CveCompraRefacturacion") = -1
End If
Return ViewState("CveCompraRefacturacion").ToString.ToEntero
End Get
Set(value As Integer)
@@ -4305,10 +4309,18 @@ Partial Class Compras_Compras
x = x + 1
End If
Next
If x = 0 AndAlso GvInv.Rows.Count > 0 Then
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
Exit Sub
If Not (CveCompraRefacturacion > 0 AndAlso ChkRefacturacionConAlmacen.Checked) Then
If x = 0 AndAlso GvInv.Rows.Count > 0 Then
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
End If

View File

@@ -1,145 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="PopUpFacturasPendientesAutorizar.aspx.vb" Inherits="Compras_PopUpFacturasPendientesAutorizar" %>
<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">
Facturas Pendientes de Autorizar
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Panel ID="PnlPrincipal" runat="server" Width="750px">
<table class="Widthall"> <%--border="1" rules="all" style="border-collapse: collapse;"--%>
<%-- <tr>
<td class="Titulos" colspan="5">Filtros para búsqueda</td>
</tr>--%>
<tr style="text-align:left">
<%-- <td class="text-right"><b>Fecha Inicial:</b></td>
<td>
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding:0px;">
<asp:TextBox ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Onblur="Recalculafechapago();" ValidationGroup="GrpGuardar" Width="150px" ClientIDMode="Static"></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="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</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="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</td>
<td class="text-right"><b>Fecha Final:</b></td>
<td >
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding:0px;">
<asp:TextBox ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Onblur="Recalculafechapago();" ValidationGroup="GrpGuardar" Width="150px" ClientIDMode="Static"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton runat="server" ID="imgCalendarioF" class="btn default"> <i class="fa fa-calendar"></i> </asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</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="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
</td>--%>
<%-- <td><asp:Button ID="BtnBuscar" runat="server" Text="Buscar" class="btn btn-primary" /></td>--%>
</tr>
</table>
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<br />
<table id="TblBusqueda" runat="server" border="0" visible="false">
<tr>
<td >
<div class ="row" >
<div class="col-sm-6" style="text-align:left!important">Número de registros encontrados:<b><asp:Literal ID="LtlTotalRegistros" runat="server"></asp:Literal></b></div>
<div class="col-sm-6" style="text-align:right!important">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GV.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GV.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
</td>
</tr>
<tr>
<td>
<asp:GridView ID="GV" Width="735" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Facturas Pendientes de Autorizar"
CssClass="table table-striped table-hover Widthall ScrollAD" data-height="400" Style="text-align: center;" GridLines="None">
<Columns>
<asp:TemplateField HeaderText="Proveedor" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblProveedor" runat="server" Text='<%# Eval("Proveedor") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Factura" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblSerieFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Proyecto" ItemStyle-HorizontalAlign="Left">
<ItemTemplate>
<asp:Label ID="lblProyecto" runat="server" Text='<%# Eval("SubProyecto")%>'> </asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblFecha" runat="server" Text='<%# Eval("Fecha") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Fecha V." ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:Label ID="lblFechav" runat="server" Text='<%# Eval("Fechav") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Saldo" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblSaldo" Width="100" runat="server" Text='<%# Eval("Saldo") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText=" " ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Label ID="lblEspacio" runat="server" Text=' '></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" HorizontalAlign="Left" />
<AlternatingRowStyle CssClass="TextoAlterno" />
</asp:GridView>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript">
function Ir(v) {
gotourl('/Compras/Compras.aspx?CveCompra=' + v);
}
//$(document).ready(function () {
// $("#TxtFolioFiscal").mask("********-****-****-****-************");
//});
</script>
</asp:Content>

View File

@@ -1,85 +0,0 @@
Imports Extensiones
Imports System.Data
Partial Class Compras_PopUpFacturasPendientesAutorizar
Inherits ClsPaginas
Private Sub Compras_PopUpFacturasPendientesAutorizar_Load(sender As Object, e As EventArgs) Handles Me.Load
CType(Me.Master, BaseMasterPage).EsPopup = True
CType(Me.Master, BaseMasterPage).PopupWidth = 750
If Not IsPostBack Then
Dim dTime As Date = Now
' txtFechaF.Text = dTime.ToString("dd/MM/yyyy")
dTime = dTime.AddDays(-30)
' txtFechaI.Text = dTime.ToString("dd/MM/yyyy")
cargadatos()
End If
End Sub
Private Sub cargadatos()
Dim objCompras As New ClsCompras
Dim dTime As Date = Now
Dim FechaInc As Date = dTime
dTime = dTime.AddDays(-30)
Dim FechaFin As Date = dTime
objCompras.GetFacturasPendientesDeAutorizar(UsuarioActual.Empresa.CveEmpresa, FechaInc, FechaFin)
If objCompras.DtResultados.Rows.Count > 0 Then
TblBusqueda.Visible = True
Else
TblBusqueda.Visible = True
End If
LtlTotalRegistros.Text = objCompras.DtResultados.Rows.Count.ToString
GV.DataSource = objCompras.DtResultados
GV.DataBind()
UPDatos.Update()
End Sub
'Protected Sub BtnBuscar_Click(sender As Object, e As EventArgs) Handles BtnBuscar.Click
' cargadatos()
'End Sub
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
Dim saldo As Double = e.Row.DBCampo("Saldo").Trim.ToDecimal
'ostBackUrl =""
' e.Row.FCLinkButton("lnkSerieFolio").PostBackUrl = "" & e.Row.DBCampo("CveCompra")
' e.Row.FCLinkButton("lnkSerieFolio").Text = e.Row.DBCampo("SerieFolio")
Dim Liga As String = String.Empty
Liga = String.Format("<a class='Texto' href='javascript:Ir(""{0}"");'>", e.Row.DBCampo("CveCompra"))
e.Row.FCLabel("lblSerieFolio").Text = String.Format("<div >{0}{1}</a></div>", Liga, e.Row.DBCampo("SerieFolio"))
e.Row.FCLabel("LblSaldo").Font.Bold = True
e.Row.FCLabel("LblSaldo").Text = "$" & saldo.ToString("###,###,###.00") & " " & e.Row.DBCampo("Abreviatura").ToString & " "
e.Row.FCLabel("lblFecha").Text = Date.Parse(e.Row.DBCampo("Fecha").ToString).ToString("dd/MM/yyyy")
e.Row.FCLabel("lblFechav").Text = Date.Parse(e.Row.DBCampo("Fechav").ToString).ToString("dd/MM/yyyy")
End If
End If
End Sub
End Class

View File

@@ -1,142 +0,0 @@
<%@ Page Title="Rep. Carta Porte Traslados" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepCartaPorteTraslados.aspx.vb" Inherits="Compras_RepCartaPorteTraslados" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dataTables_scrollHead {
background-color: #95A5A6;
color: white;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Rep. Carta Porte Traslados
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:UpdatePanel runat="server" ID="UpdatePanel1" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<li>
<asp:LinkButton ID="LnkExcel" OnClick="LnkExcel_Click" runat="server" Visible="false"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="LnkExcel" />
</Triggers>
</asp:UpdatePanel>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultarFiltros" OnClick="BtnConsultarFiltros_Click" runat="server" Text="Consultar" ValidationGroup="GrpFiltros" class="btn btn-primary" />
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="max-width: 120px">Proveedor:</div>
<div class="col-md-2">
<ADS:Dropdownlost ID="DdlProveedores" CssClassDdl="form-control input-sm select2me" Style="min-width: 160px;" CssStyle="width:100%" DataTextField="RazonSocial" DataValueField="CveProveedor" AppendDataBoundItems="true" runat="server"></ADS:Dropdownlost>
</div>
<div class="col-md-1" style="max-width: 90px">Fecha Inicio:</div>
<div class="col-md-2" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LBCalendarFiltrosFechaInicio" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaInicio" runat="server" TargetControlID="TxtFiltrosFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaInicio" TargetControlID="TxtFiltrosFechaInicio" PopupButtonID="LBCalendarFiltrosFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaInicio" runat="server" ControlToValidate="TxtFiltrosFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="max-width: 75px">Fecha Fin:</div>
<div class="col-md-2" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LBCalendarFiltrosFechaFin" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaFin" runat="server" TargetControlID="TxtFiltrosFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaFin" TargetControlID="TxtFiltrosFechaFin" PopupButtonID="LBCalendarFiltrosFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaFin" runat="server" ControlToValidate="TxtFiltrosFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" CssClass="form-control input-sm select2me" Width="120px" runat="server" DataValueField="CveSubProyecto" DataTextField="SubProyecto">
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<label class="col-md-1 truncate">Tipo Proveedor:</label>
<div class="col-md-3">
<asp:DropDownList ID="DdlTipoProveedor" CssClass="form-control input-sm select2me" Width="260px" runat="server">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Proveedor" Value="1"></asp:ListItem>
<asp:ListItem Text="Acreedor" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<label class="col-md-1 truncate">Usuario Registró:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlUsuarioRegistra" CssClass="form-control input-sm select2me" Width="120px" runat="server" DataValueField="CveUsuario" DataTextField="Nombre">
</asp:DropDownList>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<table class="table Widthall ">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 60%; border-right: 3px solid white;">Compra</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 40%; border-right: 3px solid white;">Traslado</td>
</tr>
</table>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD"
DataKeyNames="CveComplementoTraslado,FechaIng,CveCompra,SerieFolioCompra,FechaCompra,FechaFactura,UUID,SerieFolioFactura,CveProveedor,RazonSocial,CveUsuario,Usuario"
GridLines="None" data-sort="true">
<Columns>
<asp:HyperLinkField HeaderText="Proveedor" DataTextField="RazonSocial" DataNavigateUrlFields="CveProveedor" DataNavigateUrlFormatString="/Compras/Proveedores.aspx?CveProveedor={0}" Target="_blank" ItemStyle-Width="40%" />
<asp:HyperLinkField HeaderText="SerieFolio" DataTextField="SerieFolioCompra" DataNavigateUrlFields="CveCompra" DataNavigateUrlFormatString="/Compras/Compras.aspx?CveCompra={0}" Target="_blank" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha" DataField="FechaCompra" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Folio" DataField="SerieFolioFactura" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
<asp:BoundField HeaderText="Folio Fiscal" DataField="UUID" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="20%" />
<asp:BoundField HeaderText="Fecha" DataField="FechaFactura" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,117 +0,0 @@
Option Explicit On
Option Strict On
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class Compras_RepCartaPorteTraslados
Inherits ClsPaginas
'Private Property DTComplemntos As DataTable
' Get
' If ViewState("DTComplemntos") Is Nothing Then
' Return New DataTable
' Else
' Return DirectCast(ViewState("DTComplemntos"), DataTable)
' End If
' End Get
' Set(value As DataTable)
' ViewState("DTComplemntos") = value
' End Set
'End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaValores()
End If
End Sub
#Region " INICIALIZA VALORES "
Private Sub InicializaValores()
TxtFiltrosFechaInicio.Text = Now.FirstDayOfMonth.ToShortDateString
TxtFiltrosFechaFin.Text = Now.ToShortDateString
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
'DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
'DdlProveedores.DataBind()
'DdlProveedores.Items.Insert(0, New ListItem("Todos", "-1"))
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
'DdlSubProyecto.DataBind()
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
CargarCentrosDeCosto(Nothing, DdlSubProyecto, Nothing, LblSubProyecto:=LblSubProyecto)
DdlUsuarioRegistra.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
DdlUsuarioRegistra.DataBind()
DdlUsuarioRegistra.Items.Insert(0, New ListItem("Todos", "-1"))
UpFiltros.Update()
End Sub
#End Region
#Region " CARGA DATOS "
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs)
CargaDatos()
End Sub
Private Sub CargaDatos()
LnkExcel.Visible = False
Dim CveProveedor As Integer = If(DdlProveedores.SelectedValue.ToEntero = 0, -1, DdlProveedores.SelectedValue.ToEntero)
Dim CveTipoProveedor = DdlTipoProveedor.SelectedValue.ToEntero
Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
Dim Count As Integer = 0
Dim ObjCompras As New ClsCompras
If ObjCompras.GetComplementoTrasladoRep(UsuarioActual.CveEmpresa, CveProveedor, CveTipoProveedor, FechaInicio, FechaFin, UsuarioActual.CveUsuario, DdlUsuarioRegistra.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjCompras.DtResultados
If ObjCompras.DtResultados.Rows.Count > 0 Then
LnkExcel.Visible = True
End If
Else
GvDatos.DataSource = Nothing
End If
ObjCompras.Dispose()
GvDatos.DataBind()
UpAcciones.Update()
UpDatos.Update()
End Sub
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
End If
End Sub
#End Region
#Region "IMPRESION"
Protected Sub LnkExcel_Click(sender As Object, e As EventArgs)
GeneraImpresion("Excel")
End Sub
Private Sub GeneraImpresion(Optional Formato As String = "PDF")
GvDatos.ExportToExcel2("RepCartaPorteTraslados.xlsx")
End Sub
#End Region
End Class

View File

@@ -1,115 +0,0 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPromociones.aspx.vb" Inherits="Compras_RepPromociones" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.dataTables_scrollHead {
background-color: #95A5A6;
color: white;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
Reporte de Promociones
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="UpFiltros" UpdateMode="Conditional" runat="server">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle">
<div class="tools">
<asp:Button ID="BtnConsultarFiltros" runat="server" Text="Consultar" ValidationGroup="GrpFiltros" class="btn btn-primary" />
</div>
<div class="titlefiltros caption ">
<div class="row">
<div class="col-md-1" style="max-width: 80px">Proveedor:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlProveedor" Width="120px" DataTextField="RazonSocial" DataValueField="CveProveedor" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="Todos" Value="-1" Selected="True" />
</asp:DropDownList>
</div>
<div class="col-md-1" style="max-width: 80px">Tipo:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipo" Width="150px" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="Todos" Value="-1" Selected="True" />
<asp:ListItem Text="Con Promoción" Value="1" />
<asp:ListItem Text="Sin Promoción" Value="2" />
</asp:DropDownList>
</div>
<%--<div class="col-md-1" style="max-width: 90px">Tipo Gasto:</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlTipoGasto" Width="150px" DataTextField="TipoGasto" DataValueField="CveTipoGasto" AppendDataBoundItems="true" runat="server" CssClass="form-control input-sm select2me">
<asp:ListItem Text="Todos" Value="-1" Selected="True" />
</asp:DropDownList>
</div>--%>
<div class="col-md-1" style="max-width: 90px">Fecha Inicio:</div>
<div class="col-md-2" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaInicio" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaI" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaInicio" runat="server" TargetControlID="TxtFiltrosFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaInicio" TargetControlID="TxtFiltrosFechaInicio" PopupButtonID="LnkFechaI" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaInicio" runat="server" ControlToValidate="TxtFiltrosFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaInicio" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaInicio"></ajax:ValidatorCalloutExtender>
</div>
</div>
<div class="col-md-1" style="max-width: 75px">Fecha Fin:</div>
<div class="col-md-2" style="max-width: 130px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 90px !important; padding: 0px;">
<asp:TextBox ID="TxtFiltrosFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 88px" runat="server"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaF" class="btn default " Text=" <i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MEEFiltrosFechaFin" runat="server" TargetControlID="TxtFiltrosFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CEFiltrosFechaFin" TargetControlID="TxtFiltrosFechaFin" PopupButtonID="LnkFechaF" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="RFVFiltrosFechaFin" runat="server" ControlToValidate="TxtFiltrosFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpFiltros"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCEFiltrosFechaFin" runat="server" HighlightCssClass="vco" TargetControlID="RFVFiltrosFechaFin"></ajax:ValidatorCalloutExtender>
</div>
</div>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div class="row">
<div class="col-md-12">
<table class="table Widthall ">
<tr>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 60%; border-right: 3px solid white;">Factura</td>
<td class="dataTables_scrollHead text-center bold" style="font-size: 14px; width: 40%; border-right: 3px solid white;">OC</td>
</tr>
</table>
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="Sin resultados" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None" data-sort="true">
<Columns>
<asp:BoundField HeaderText="Proveedor" DataField="Proveedor" ItemStyle-Width="30%" />
<asp:BoundField HeaderText="Fecha" DataField="FechaCompra" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Folio" DataField="FolioCompra" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Aplico Promoción" DataField="AplicoPromocionTexto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha" DataField="FechaOC" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Folio" DataField="FolioOC" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Promoción" DataField="Promocion" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
</Columns>
</asp:GridView>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
</asp:Content>

View File

@@ -1,51 +0,0 @@
Option Explicit On
Option Strict On
Imports Extensiones
Partial Class Compras_RepPromociones
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaValores()
End If
End Sub
Private Sub InicializaValores()
TxtFiltrosFechaInicio.Text = $"01/01/{Now.Year}"
TxtFiltrosFechaFin.Text = $"{Now.Day}/{Now.Month}/{Now.Year}"
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
DdlProveedor.DataBind()
'DdlTipoGasto.DataSource = GlobalDTTiposGastos(UsuarioActual.CveEmpresa)
'DdlTipoGasto.DataBind()
UpFiltros.Update()
End Sub
Protected Sub BtnConsultarFiltros_Click(sender As Object, e As EventArgs) Handles BtnConsultarFiltros.Click
CargaDatos()
End Sub
Private Sub CargaDatos()
Dim CveProveedor = DdlProveedor.SelectedValue.ToEntero
Dim CveTipoGasto = -1 'DdlTipoGasto.SelectedValue.ToEntero
Dim Tipo = DdlTipo.SelectedValue.ToEntero
Dim FechaI = TxtFiltrosFechaInicio.Text.ToDate
Dim FechaF = TxtFiltrosFechaFin.Text.ToDate
Dim ObjCompras As New ClsCompras
If ObjCompras.GetRepPromociones(CveProveedor, CveTipoGasto, FechaI, FechaF, Tipo, UsuarioActual.CveEmpresa) Then
GvDatos.DataSource = ObjCompras.DtResultados
End If
ObjCompras.Dispose()
GvDatos.DataBind()
UpDatos.Update()
End Sub
End Class

View File

@@ -119,9 +119,13 @@ Partial Class Sistemas_CatEmpresas
Private Sub CargaGrid(Orden As String)
Dim CveUsaurioConsulta As Integer = If(UsuarioActual.CveRol = 1, -1, UsuarioActual.CveUsuario)
Using ObjEmpresas As New ClsSisEmpresas()
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1", UsuarioActual.CveUsuario) Then
If ObjEmpresas.GetEmpresas(-1, "-1", "-1", "-1", "-1", CveUsaurioConsulta) Then
GvDatos.DataSource = ObjEmpresas.DtResultados
Else
GvDatos.DataSource = Nothing

View File

@@ -178,7 +178,9 @@
</table>
<div style="">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Clientes registrados" ShowHeader="true" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Clientes registrados" ShowHeader="true"
DataKeyNames="FechaLimiteCredito"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" BorderWidth="1" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<asp:TemplateField Visible="true" ItemStyle-Width="100" HeaderText="Código">
<ItemTemplate>
@@ -348,6 +350,14 @@
<asp:Literal ID="LtlOtroTelefono" runat="server" Text='<%# Eval("TelefonoOtros") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField Visible="true" ItemStyle-HorizontalAlign="center" ItemStyle-Width="100px">
<HeaderTemplate>F Limite Crédito</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlFechaLimiteCredito" runat="server" ></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<RowStyle CssClass="Texto" />
<AlternatingRowStyle CssClass="TextoAlterno" />
@@ -374,8 +384,6 @@
<asp:CheckBox ID="ChkNombre" runat="server" Text="Nombre" Checked="true" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkRFC" runat="server" Text="RFC" Checked="true" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkSucursal" runat="server" Text="Sucursal" Checked="true" /></td>
<td style="text-align: left">
@@ -386,8 +394,6 @@
<asp:CheckBox ID="ChkEstadoSis" runat="server" Text="Estado (Sis)" Checked="true" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkFechaIng" runat="server" Text="Fecha Captura (Sis)" Checked="true" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkUsuario" runat="server" Text="Usuario Capturó (Sis)" Checked="true" /></td>
<td style="text-align: left">
@@ -398,8 +404,7 @@
<asp:CheckBox ID="ChkNombreCorto" runat="server" Text="Nombre Corto" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkVendedor" runat="server" Text="Vendedor" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkNoExt" runat="server" Text="No Ext" /></td>
<td style="text-align: left">
@@ -410,8 +415,7 @@
<asp:CheckBox ID="ChkColonia" runat="server" Text="Colonia" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkCiudad" runat="server" Text="Ciudad" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkEstado" runat="server" Text="Estado" /></td>
<td style="text-align: left">
@@ -422,8 +426,7 @@
<asp:CheckBox ID="ChkCP" runat="server" Text="C.P." /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkContacto" runat="server" Text="Contacto" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkMail" runat="server" Text="Correo Envió Facturación" /></td>
<td style="text-align: left">
@@ -434,33 +437,33 @@
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret. IVA" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret. ISR" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkPlazoCobranza" runat="server" Text="Plazo Cobranza" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkLimiteCredito" runat="server" Text="Límite Crédito" /></td>
</tr>
<tr>
<td style="text-align: left">
<%--<asp:CheckBox ID="ChkCIE" runat="server" Text="CIE" /></td>--%>
<td style="text-align: left">
<asp:CheckBox ID="ChkCalle" runat="server" Text="Calle" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkCelular" runat="server" Text="Celular" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkCorreoCotizacion" runat="server" Text="Correo Envió Cotización" /></td>
<td style="text-align: left">
<asp:CheckBox ID="ChkOtroTelefono" runat="server" Text="Otro Telefono" /></td>
</tr>
<tr>
<td style="text-align: left">
<asp:CheckBox ID="ChkOtroTelefono" runat="server" Text="Otro Telefono" /></td>
<asp:CheckBox ID="chkFechaLimiteCredito" runat="server" Checked="true" Text="Fecha Limite Crédito" /></td>
<td style="text-align: left">
</td>
<td style="text-align: left">
</td>
<td style="text-align: left">
</td>
</tr>
</thead>
</table>
</div>

View File

@@ -44,32 +44,37 @@ Partial Class CatClientes
End If
End Sub
Public Sub CargaDatos(Optional Nombre As String = "-1", Optional RFC As String = "-1")
Public Sub CargaDatos()
Dim ObjClientes As New ClsClientes
Dim Nombre, RFC As String
Nombre = "-1"
RFC = "-1"
If ObjClientes.GetClientes(-1, Nombre, "-1", "-1", RFC, "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PermiteCreditoFiltro:=If(ChkPermiteCredito.Checked, 1, -1)) Then
If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim
DTDatos = ObjClientes.DtResultados
ObjClientes.Dispose()
If TxtRFC.Text.Trim <> String.Empty Then RFC = TxtRFC.Text.Trim
'ViewState("DTCliente") = DTDatos
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 77 Then
DTDatos = DTDatos.FiltraParametros("CveCliente IN (10450, 10460, 10458)")
ElseIf UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario = 21 Then
DTDatos = DTDatos.FiltraParametros("CveCliente IN (27448)")
If ObjClientes.GetClientes(-1, Nombre, "-1", "-1", RFC, "-1", "-1", DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificaciones.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PermiteCreditoFiltro:=If(ChkPermiteCredito.Checked, 1, -1)) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
DTDatos = ObjClientes.DtResultados
Else
DTDatos = Nothing
Alert("No se encontraron registros con los parametros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
Else
Me.GvDatos.DataSource = Nothing
End If
ObjClientes.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
UPDatos.Update()
End Sub
@@ -113,34 +118,7 @@ Partial Class CatClientes
Protected Sub LbFiltrar_Click(sender As Object, e As EventArgs) Handles LbFiltrar.Click
Dim ObjClientes As New ClsClientes
Dim Nombre, RFC As String
Nombre = "-1"
RFC = "-1"
If TxtNombre.Text.Trim <> String.Empty Then Nombre = TxtNombre.Text.Trim
If TxtRFC.Text.Trim <> String.Empty Then RFC = TxtRFC.Text.Trim
If ObjClientes.GetClientes(-1, Nombre, "-1", "-1", RFC, "-1", "-1", DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificaciones.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero, PermiteCreditoFiltro:=If(ChkPermiteCredito.Checked, 1, -1)) Then
If ObjClientes.DtResultados.Rows.Count > 0 Then
DTDatos = ObjClientes.DtResultados
Else
DTDatos = Nothing
Alert("No se encontraron registros con los parametros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
End If
End If
ObjClientes.Dispose()
If ViewState("Orden").ToString() <> String.Empty Then
CargaGrid(ViewState("Orden").ToString())
Else
CargaGrid("")
End If
UPDatos.Update()
CargaDatos()
End Sub
@@ -179,6 +157,10 @@ Partial Class CatClientes
GvDatos.Columns(25).Visible = ChkCelular.Checked
GvDatos.Columns(26).Visible = ChkCorreoCotizacion.Checked
GvDatos.Columns(27).Visible = ChkOtroTelefono.Checked
GvDatos.Columns(28).Visible = chkFechaLimiteCredito.Checked
CargaDatos()
@@ -256,6 +238,13 @@ Partial Class CatClientes
e.Row.FCLiteral("LtlSucursal").Text = "<a class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente=" & e.Row.DBCampo("CveCliente") & """>" & e.Row.FCLiteral("LtlSucursal").Text & "</a>"
e.Row.FCLiteral("LtlTelefono").Text = "<a class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente=" & e.Row.DBCampo("CveCliente") & """>" & e.Row.FCLiteral("LtlTelefono").Text & "</a>"
If e.Row.DataKey("FechaLimiteCredito").ToString.ToDate = MinFecha Then
e.Row.FCLiteral("LtlFechaLimiteCredito").Text = ""
Else
e.Row.FCLiteral("LtlFechaLimiteCredito").Text = e.Row.DataKey("FechaLimiteCredito").ToString.ToDate.ToString("dd/MM/yyyy")
End If
End If
End Sub
#End Region
@@ -317,39 +306,6 @@ Partial Class CatClientes
'Protected Sub BtnCorporativo_Click(sender As Object, e As EventArgs)
' Dim ObjClientes As New ClsClientes
' If ObjClientes.AddCorporativo(-1, Nombre, "-1", "-1", RFC, "-1", "-1", DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, Estatus:=DdlEstatus.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClasificaciones.SelectedValue.ToEntero, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero) Then
' If ObjClientes.DtResultados.Rows.Count > 0 Then
' DTDatos = ObjClientes.DtResultados
' Else
' DTDatos = Nothing
' Alert("No se encontraron registros con los parametros solicitados.", Extensiones.TipoMensaje.MsgAdvertencia)
' End If
' End If
' ObjClientes.Dispose()
' If ViewState("Orden").ToString() <> String.Empty Then
' CargaGrid(ViewState("Orden").ToString())
' Else
' CargaGrid("")
' End If
' UPDatos.Update()
'End Sub
'Private Sub CargaCorporativo()
' DdlCorporativo.DataSource = GlobalDTCorporativo(UsuarioActual.CveEmpresa)
' DdlCorporativo.DataBind()
' DdlCorporativo.Items.Insert(0, New ListItem("Selecione", "-1"))
'End Sub

View File

@@ -2032,11 +2032,10 @@
<asp:BoundField HeaderText="Fecha Venta" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Fecha Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Días Vencidos" DataField="DiasVencidos" DataFormatString="{0}" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" DataFormatString="{0}" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField HeaderText="Linea Adicional" DataField="LineaAdicional" ItemStyle-HorizontalAlign="Left" Visible="false" />
<asp:TemplateField HeaderText="Monto Venta" ItemStyle-HorizontalAlign="Right">
<ItemTemplate>
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>&nbsp;
<asp:Literal ID="LtlSaldoOriginal" runat="server" Text='<%# Eval("Original", "{0:N2}") %>'></asp:Literal>&nbsp;
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Abonado" ItemStyle-HorizontalAlign="Right">
@@ -4502,7 +4501,7 @@
<ContentTemplate>
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,DiasVencimiento"
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,Proveedor,DiasVencimiento"
CssClass="table table-striped table-advance table-hover ScrollAD " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
@@ -4513,7 +4512,7 @@
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" ItemStyle-HorizontalAlign="Left" Visible="false" />
<asp:BoundField DataField="TipoLineaSTR" HeaderText="Tipo Linea" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" ItemStyle-HorizontalAlign="Left" />

View File

@@ -1960,6 +1960,10 @@ Partial Class Clientes
DtCxCActivas = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, OrdenVencimiento, FechaVencimiento")
GvCxC.DataSource = DtCxCActivas
'solo tomo los 10 ultimos mas el totalizador general
GvCxC.Columns(6).Visible = If(DtCxCActivas.FiltroPrimeroValor("LineaAdicional", "LEN(TRIM(LineaAdicional)) > 0", "LineaAdicional DESC").Trim.Length > 0, True, False)
Dim dt As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
DtHistorialCxC = dt
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
@@ -2988,8 +2992,8 @@ Partial Class Clientes
End If
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Right
If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(6).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("DiasVencidos").ToDouble > 0 AndAlso CType(sender, GridView).ID = "GvCxC" Then e.Row.Cells(4).ForeColor = Drawing.Color.Red

View File

@@ -50,13 +50,21 @@
</div>
<div class="col-md-1 truncate" >Estatus:</div>
<div class="col-md-2 ">
<div class="col-md-1 ">
<asp:DropDownList runat="server" ID="DdlEstatus" CssClass="select2me" Width="100%">
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Registrado" Value="0" Selected="True"></asp:ListItem>
<%--<asp:ListItem Text="Registrado" Value="0" ></asp:ListItem> --%>
<asp:ListItem Text="Vinculado" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Enviado" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
<div class="col-md-1 truncate" runat="server" id="DVAgrupador1" visible="false">Agrupador:</div>
<div class="col-md-1 " runat="server" id="DVAgrupador2" visible="false">
<asp:DropDownList runat="server" ID="DdlAgrupador" CssClass="select2me" Width="100%">
<asp:ListItem Text="Comercializador" Value="1" Selected="True"></asp:ListItem>
<asp:ListItem Text="Cliente" Value="2"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
@@ -72,63 +80,102 @@
</asp:UpdatePanel>
<div class="row ">
<div class="row">
<div class="col-md-12">
<div class="row ">
<div class=" col-md-12" style="text-align: right!important">
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="row ">
<div class="col-md-12">
<div class="row " runat="server" visible ="false" id="DvLinea">
<div class=" col-md-12" style="text-align: right!important">
<input type="text" id="TxtBuscarLineaAdicional" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionales.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:UpdatePanel ID="UpLineasAdicionales" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<div class="row " runat="server" visible ="false" id="DvLineaPO">
<div class=" col-md-12" style="text-align: right!important">
<input type="text" id="TxtBuscarLineaAdicionalpo" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionalesPO.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBuscarLineaAdicional','{0}')", GvLineasAdicionalesPO.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
</div>
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None"
<div class="row ">
<div class="col-md-12">
<asp:GridView ID="GvLineasAdicionales" Width="100%" runat="server" GridLines="None" Visible="false"
DataKeyNames="CveLineaAdicional,LineaAdicional,CveCliente,CveProveedor,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,Proveedor,LineaAdicionalComprobante,DiasVencimiento,CveVenta"
CssClass="table table-striped table-advance table-hover ScrollAD input-sm " ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
OnRowCommand ="GvLineasAdicionales_RowCommand"
OnRowDataBound="GvLineasAdicionales_RowDataBound">
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
<asp:BoundField DataField="NombreCliente" HeaderText="Cliente" />
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" />
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
<asp:BoundField DataField="NombreCliente" HeaderText="Cliente" />
<asp:BoundField DataField="Proveedor" HeaderText="Comercializador" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Right" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
</Columns>
</asp:GridView>
<asp:GridView ID="GvLineasAdicionalesPO" Width="100%" runat="server" GridLines="None" Visible="false"
DataKeyNames="Agrupador,CveLineaAdicional,LineaAdicional,TipoLinea,Importe,CveMoneda,FechaVencimiento,CveUsuario,CveCategoria,FechaIng,CveLineaAdicionalEstatus,LineaAdicionalComprobante,DiasVencimiento,CveVenta"
CssClass="table table-striped table-advance table-hover ScrollAD input-sm mysmallbtn" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="False"
OnRowCommand="GvLineasAdicionalesPO_RowCommand"
OnRowDataBound="GvLineasAdicionalesPO_RowDataBound">
<Columns>
<asp:BoundField DataField="Agrupador" HeaderText="Agrupador" />
<asp:BoundField DataField="LineaAdicional" HeaderText="Linea Adicional" />
<asp:BoundField DataField="Importe" HeaderText="Importe" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Abreviatura" HeaderText="Moneda" ItemStyle-HorizontalAlign="Right" />
<%--<asp:BoundField DataField="FechaVencimiento" HeaderText="F. Vencimiento" ItemStyle-HorizontalAlign="Center" DataFormatString="{0:d}" Visible="false" />--%>
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString ="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
<asp:HyperLinkField DataTextField="SerieFolio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" HeaderText="Serie Folio" />
<asp:BoundField DataField="Saldo" HeaderText="Saldo" DataFormatString="{0:n}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
<asp:BoundField DataField="DiasVencimiento" HeaderText="Dias de Venc." ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Estatus" HeaderText="Estatus" />
<asp:BoundField DataField="Usuario" HeaderText="Usuario" />
<asp:TemplateField HeaderText="Opciones" Visible="false" ItemStyle-Width="120px">
<asp:TemplateField HeaderText="Opciones" ItemStyle-Width="100px" HeaderStyle-Width="100px">
<ItemTemplate>
<div class="row" style="width:118px" >
<asp:LinkButton ID="LnkCargarComprobante" runat="server" AlternateText="Editar" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload'></i>" OnClick="LnkCargarComprobante_Click" />
<asp:LinkButton ID="LnkDescargaComprobante" runat="server" AlternateText="Descarga" CausesValidation="False" CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click" Visible="false" />
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" AlternateText="CambiarEstatus" CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si" Visible="false" />
</div>
</ItemTemplate>
<ItemStyle Width="10%" />
<div class="row" >
<div class="col-md-4" style="max-width:26px!important">
<asp:LinkButton ID="LnkCargarComprobante" Visible="false" runat="server" AlternateText="Editar" CausesValidation="False"
CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-upload'></i>" OnClick="LnkCargarComprobante_Click"
ToolTip="Cargar Comprobante" />
</div>
<div class="col-md-4" style="max-width:26px!important">
<asp:LinkButton ID="LnkDescargaComprobante" Visible="false" runat="server" AlternateText="Descarga" CausesValidation="False"
CssClass="btn btn-circle btn-sm yellow" Text="<i class='fa fa-download'></i>" OnClick="LnkDescargaComprobante_Click"
ToolTip="Descargar Comprobante" />
</div>
<div class="col-md-4" style="max-width:26px!important" title="Cambiar esatatus a Enviado">
<asp:LinkButton ID="LnkCambiarEstatus" runat="server" Visible="false" AlternateText="CambiarEstatus"
CommandName="Estatus" CommandArgument='<%# Eval("CveLineaAdicionalEstatus") %>' CausesValidation="False"
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-arrow-right'></i>"
data-toggle="confirmation" data-popout="true" data-original-title="¿Cambiar Estado?" data-btn-ok-label="si"
ToolTip="Cambiar esatatus a Enviado" />
</div>
</div>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</div>

View File

@@ -70,10 +70,19 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
private void InicializaValores()
{
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
if (Request["OP"] != null && Request["OP"].ToString() == "PO")
{
DVProveedor1.Visible = true;
DVProveedor2.Visible = true;
TipoLinea = 2;
LtlEncabezado.Text = "Reporte PO";
GvLineasAdicionalesPO.Visible = true;
DvLineaPO.Visible = true;
DVAgrupador1.Visible = true;
DVAgrupador2.Visible = true;
}
else
{
DvLinea.Visible = true;
@@ -97,8 +106,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
}
DdlClientes.setEsWebService(true);
DdlClientes.Attributes.Add("data-metodo", "getcliente");
DdlClientes.SelectedText = "Todos";
DdlClientes.Attributes.Add("data-metodo", "getcliente");
DdlClientes.SelectedText = "Todos";
DdlClientes.SelectedValue = "-1";
@@ -117,24 +125,61 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
DTDatosGvLineasAdicionales = new DataTable();
LnkDescargaExcel.Visible = false;
ClsVentas objVentas = new ClsVentas();
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
ClsVentas objVentas = new ClsVentas();
int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1;
GvLineasAdicionales.DataSource = objVentas.DtResultados;
if( objVentas.DtResultados.Rows.Count > 0)
if(TipoLinea == 1)
{
if (objVentas.RepLineasAdicionales(-1,-1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 1, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
{
GvLineasAdicionales.DataSource = objVentas.DtResultados;
if (objVentas.DtResultados.Rows.Count > 0)
{
DTDatosGvLineasAdicionales = objVentas.DtResultados;
LnkDescargaExcel.Visible = true;
UpAcciones.Update();
}
}
else
{
GvLineasAdicionales.DataSource = null;
}
}
}
else
{
if (DdlAgrupador.SelectedValue.ToEntero()== 1){
GvLineasAdicionalesPO.Columns[0].HeaderText = "Comercializador";
}
else
{
GvLineasAdicionalesPO.Columns[0].HeaderText = "Cliente";
}
if (objVentas.RepLineasAdicionales(DdlAgrupador.SelectedValue.ToEntero(), -1, DdlClientes.SelectedValue.ToEntero(), CveProveedor, 2, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa))
{
GvLineasAdicionalesPO.DataSource = objVentas.DtResultados;
if (objVentas.DtResultados.Rows.Count > 0)
{
DTDatosGvLineasAdicionales = objVentas.DtResultados;
LnkDescargaExcel.Visible = true;
UpAcciones.Update();
}
}
else
{
GvLineasAdicionalesPO.DataSource = null;
}
}
objVentas.Dispose();
GvLineasAdicionales.DataBind();
GvLineasAdicionalesPO.DataBind();
@@ -276,36 +321,60 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
}
objVentas.Dispose();
}
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
protected void LnkDescargaExcel_Click(object sender, EventArgs e)
{
if(TipoLinea == 1)
{
GridView gvTemp = GvLineasAdicionales;
gvTemp.ExportToExcelx("RepLienasAdicionales");
}
else if(TipoLinea == 2)
{
GridView gvTemp = GvLineasAdicionalesPO;
gvTemp.Columns[9].Visible = false;
gvTemp.ExportToExcelx( "RepPO");
}
gvTemp.Columns[8].Visible = false;
}
}
protected void GvLineasAdicionales_RowDataBound(object sender, GridViewRowEventArgs e)
protected void GvLineasAdicionalesPO_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
LinkButton LnkCambiarEstatus = e.Row.FCLinkButton("LnkCambiarEstatus");
LinkButton LnkCargarComprobante = e.Row.FCLinkButton("LnkCargarComprobante");
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
if(e.Row.RowType == DataControlRowType.DataRow)
if (e.Row.DataKey("CveLineaAdicional").ToEntero() == 0)
{
e.Row.CssClass = "SubTotales";
if(e.Row.DataKey("CveVenta").ToEntero() > 0)
{
LnkCambiarEstatus.Visible = false;
LnkCargarComprobante.Visible = false;
}
if (e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 2)
{
e.Row.FCLinkButton("LnkCargarComprobante").Visible = false;
}
if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0 )
{
LnkDescargaComprobante.Visible = false;
}
LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante");
if (fi.Exists)
{
else
{
if (e.Row.DataKey("CveVenta").ToEntero() > 0 && e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero() == 1)
{
LnkCambiarEstatus.Visible = true;
LnkCargarComprobante.Visible = true;
}
if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0)
{
FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}");
if (fi.Exists)
{
LnkDescargaComprobante.Visible = true;
ScriptManager.GetCurrent(this).RegisterPostBackControl(LnkDescargaComprobante);
}
}
@@ -327,30 +396,28 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas
Response.ContentType = "text/octet-stream";
Response.Flush();
Response.TransmitFile(fi.FullName);
Response.End();
Response.End();
}
}
protected void GvLineasAdicionales_RowCommand(object sender, GridViewCommandEventArgs e)
{
GridViewRow GvRow = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
bool errorCambioEstatus = false;
int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
}
ClsVentas objVentas = new ClsVentas();
protected void GvLineasAdicionalesPO_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "Estatus")
{
GridViewRow GvRow = (GridViewRow)((LinkButton)e.CommandSource).NamingContainer;
int CveLineaAdicionalActualzarEstatus = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero();
int CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero();
bool errorCambioEstatus = false;
//int cveestatus = e.CommandArgument.ToEntero() + 2; //pasar al siguiente estatus
ClsVentas objVentas = new ClsVentas();
if (!objVentas.UpdateLineasAdicionales(CveLineaAdicionalActualzarEstatus, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, UsuarioActual.CveEmpresa, CveVenta: CveVenta, CveLineaAdicionalEstatus: 2))
{
errorCambioEstatus = true;
}
objVentas.Dispose();
if (!errorCambioEstatus)
if (!objVentas.UpdateLineasAdicionales(CveLineaAdicionalActualzarEstatus, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, UsuarioActual.CveEmpresa, CveVenta: CveVenta, CveLineaAdicionalEstatus: cveestatus))
{
errorCambioEstatus = true;
}
objVentas.Dispose();
if (!errorCambioEstatus)
{
{
CargaDatos();