From bbb9f23c33c67f10a5fa3eabb9e863b5fd0546d4 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Wed, 5 Oct 2022 09:33:29 -0700 Subject: [PATCH 1/6] Clientes reacomodo, limpieza modulos, rep compras af --- App_Code/ClsClasificaciones.vb | 8 +- App_Code/ClsClientes.vb | 11 +- App_Code/ClsPaginas.vb | 8 +- App_Code/ClsSisUsuarios.vb | 3 +- Bancos/IE.aspx.vb | 14 +- Compras/RepComprasAFDetalle.aspx | 11 +- .../Grales/Formatos/RepComprasAFDetalle.rdlc | 345 +++++++++++++-- General/SaldosIniciales.aspx.vb | 88 ++-- Planeacion/CatSubProyectos.aspx | 154 +++++-- Planeacion/CatSubProyectos.aspx.vb | 52 +++ Sistemas/CatEmpresas.aspx | 2 +- Sistemas/CatEmpresas.aspx.vb | 7 +- Ventas/Clientes.aspx | 304 +++++-------- Ventas/Clientes.aspx.vb | 16 +- Ventas/RepConciliacionSat.aspx | 235 ---------- Ventas/RepConciliacionSat.aspx.cs | 135 ------ Ventas/RepIngresos.aspx | 252 ----------- Ventas/RepIngresos.aspx.vb | 197 --------- Ventas/ReporteDetalle.aspx | 52 --- Ventas/SolicitudesSAT.aspx | 406 ------------------ Ventas/SolicitudesSAT.aspx.cs | 151 ------- 21 files changed, 670 insertions(+), 1781 deletions(-) delete mode 100644 Ventas/RepConciliacionSat.aspx delete mode 100644 Ventas/RepConciliacionSat.aspx.cs delete mode 100644 Ventas/RepIngresos.aspx delete mode 100644 Ventas/RepIngresos.aspx.vb delete mode 100644 Ventas/ReporteDetalle.aspx delete mode 100644 Ventas/SolicitudesSAT.aspx delete mode 100644 Ventas/SolicitudesSAT.aspx.cs diff --git a/App_Code/ClsClasificaciones.vb b/App_Code/ClsClasificaciones.vb index 6d25100b9..acbf3ef8c 100644 --- a/App_Code/ClsClasificaciones.vb +++ b/App_Code/ClsClasificaciones.vb @@ -440,7 +440,11 @@ Public Class ClsClasificaciones End Try Return Retorno - End Function + End Function + + 'Public Function UpdateClasificacionCunetas(CveClasificacion As Integer, CveCuentaContableIngreso As Integer, CveCuentaContableGasto As Integer, CveEmpresa As Object) As Boolean + + 'End Function Public Function RemoveClasificacion(CveClasificacion As Integer) As Boolean Dim OnError As Boolean = False @@ -662,6 +666,8 @@ Public Class ClsClasificaciones Dispose(True) GC.SuppressFinalize(Me) End Sub + + #End Region End Class diff --git a/App_Code/ClsClientes.vb b/App_Code/ClsClientes.vb index 0c3f1856e..2422f98ee 100644 --- a/App_Code/ClsClientes.vb +++ b/App_Code/ClsClientes.vb @@ -589,7 +589,7 @@ Public Class ClsClientes Optional CveMotivoTraslado As Integer = 0, Optional NumRegIdTrib As String = "", Optional ComExtEstado As String = "-1", Optional ComExtMunicipio As String = "-1", Optional ComExtColonia As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, - Optional RepresentanteLegal As String = "") As Boolean + Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha) As Boolean Dim Retorno As Boolean = False @@ -735,11 +735,7 @@ Public Class ClsClientes .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad .Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona .Add("@RepresentanteLegal", SqlDbType.VarChar).Value = RepresentanteLegal - - - - - + .Add("@FechaLimiteCredito", SqlDbType.Date).Value = FechaLimiteCredito End With Try @@ -789,7 +785,7 @@ Public Class ClsClientes Optional ApellidoPaternoPF As String = "-1", Optional ApellidoMaternoPF As String = "-1", Optional NombresPF As String = "-1", Optional RequiereOC As Boolean = False, Optional LT As String = "0", Optional LG As String = "0", Optional EsDistribuidor As Boolean = False, Optional TipoCliente As Integer = 1, Optional CargoUsado As Boolean = False, Optional BonificacionUsado As Boolean = False, Optional CveTipoRetencion As Integer = 0, Optional CorreoEntregaCompras As String = "-1", Optional CorreoEntregaAlmacen As String = "-1", Optional CveSATEstado As Integer = -1, Optional CveAdminTrayecto As Integer = -1, Optional NoDesglosaIVA As Boolean = False, Optional CveRegimenFiscal As Integer = 0, Optional RegimenSociedad As String = "-1", Optional TipoPersona As Boolean = False, - Optional RepresentanteLegal As String = "") As Boolean + Optional RepresentanteLegal As String = "", Optional FechaLimiteCredito As Date = MinFecha) As Boolean Dim Retorno As Boolean = False @@ -951,6 +947,7 @@ Public Class ClsClientes .Add("@RegimenSociedad", SqlDbType.VarChar).Value = RegimenSociedad .Add("@TipoPersona", SqlDbType.Bit).Value = TipoPersona .Add("@RepresentanteLegal", SqlDbType.VarChar).Value = RepresentanteLegal + .Add("@FechaLimiteCredito", SqlDbType.Date).Value = FechaLimiteCredito diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 6d71b3738..8dd0f20c4 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4285,8 +4285,6 @@ Public Class ClsPaginas PaginaDict.Add("/GPS/ReporteUnidadesnoTransmiten.aspx".ToUpper(), 917) PaginaDict.Add("/GPS/RepArrastre.aspx".ToUpper(), 718) - PaginaDict.Add("/Ventas/RepConciliacionSat.aspx".ToUpper(), 716) - PaginaDict.Add("/Ventas/SolicitudesSAT.aspx".ToUpper(), 717) PaginaDict.Add("/Nomina/CatConceptos2.aspx".ToUpper(), -1) PaginaDict.Add("/Nomina/NomTimbrados.aspx".ToUpper(), 920) @@ -5468,8 +5466,8 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/CatImpuestosLocales.aspx".ToUpper(), 394) PaginaDict.Add("/Ventas/ActualizarPrecios.aspx".ToUpper(), 397) PaginaDict.Add("/Ventas/ClientesAbonar.aspx".ToUpper(), 321) - PaginaDict.Add("/Ventas/DiseñadorReportes.aspx".ToUpper(), 569) - PaginaDict.Add("/Ventas/ReporteDetalle.aspx".ToUpper(), 576) + + PaginaDict.Add("/Ventas/PopUpBuscarPs.aspx".ToUpper(), 13) PaginaDict.Add("/Ventas/RepVentasUtilidadPadre.aspx".ToUpper(), 590) PaginaDict.Add("/Ventas/RepVentasUtilidad.aspx".ToUpper(), 590) @@ -5502,7 +5500,7 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepCancelacionesPorAtender.aspx".ToUpper(), 750) PaginaDict.Add("/Ventas/RepCancelacionesPorRespuesta.aspx".ToUpper(), 751) - PaginaDict.Add("/Ventas/RepIngresos.aspx".ToUpper(), 540) + 'Reportes de Anticipos-NC-IXC' PaginaDict.Add("/Ventas/RepAnticipo-NC-IXC.aspx".ToUpper(), 869) PaginaDict.Add("/Ventas/RepAnticipo-NC-IXCDetalle.aspx".ToUpper(), 869) diff --git a/App_Code/ClsSisUsuarios.vb b/App_Code/ClsSisUsuarios.vb index 613bc8b9a..2d74edb22 100644 --- a/App_Code/ClsSisUsuarios.vb +++ b/App_Code/ClsSisUsuarios.vb @@ -1495,13 +1495,14 @@ Public Class ClsSisUsuarios #Region " S U B - P R O Y E C T O S " - Public Function GetSubProyectos(CveUsuario As Integer) As Boolean + Public Function GetSubProyectos(CveUsuario As Integer, Optional CveSubProyecto As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Sis_UsuariosSubProyectosGet") With SqlAdapter.SelectCommand.Parameters .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto End With Try diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 90f5c97d8..a2bd46524 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -6097,7 +6097,17 @@ Partial Class Bancos_IE Dim Cuerpo As String = "Se hace entrega del comprobante de pago" Dim Asunto As String = "Entrega de comprobante de pago" - If IO.File.Exists(RutaPDF) AndAlso IO.File.Exists(RutaXML) Then + Dim ErrorAdjuntas As String = "" + + If Not IO.File.Exists(RutaPDF) Then + ErrorAdjuntas = "No se pudo adjuntar el archivo PDF
" + End If + + If Not IO.File.Exists(RutaXML) Then + ErrorAdjuntas = $"{ErrorAdjuntas} No se pudo adjuntar el XML." + End If + + If ErrorAdjuntas.Length > 0 Then Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail) @@ -6116,7 +6126,7 @@ Partial Class Bancos_IE End If Else - Msg = "No se pudo adjuntar el correo electrónico." + Msg = ErrorAdjuntas End If End If diff --git a/Compras/RepComprasAFDetalle.aspx b/Compras/RepComprasAFDetalle.aspx index 23ec0098d..bb5fbd9fa 100644 --- a/Compras/RepComprasAFDetalle.aspx +++ b/Compras/RepComprasAFDetalle.aspx @@ -329,8 +329,6 @@ - - @@ -341,6 +339,15 @@ + + + Cuenta + + + + + + <%-- --%> diff --git a/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc b/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc index c94cb5d73..cb2f4dd72 100644 --- a/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc +++ b/Empresas/Grales/Formatos/RepComprasAFDetalle.rdlc @@ -65,10 +65,18 @@ AFTipoMantenimientoStr System.String + + Clasificacion2 + System.String + Orden System.String + + CuentaContable + System.String + DataSet @@ -135,36 +143,45 @@ 1.88881cm - 2.69134cm + 2.02988cm - 5.54514cm + 4.99622cm - 6.16934cm + 2.47188cm 2.5cm - 2.02988cm + 1.66017cm - 1.22736cm + 1.79916cm + + + 2.5cm + + + 0.96278cm 1.36229cm - 1.77949cm + 1.09772cm - 1.57396cm + 1.46813cm + + + 2.03058cm - 0.6cm + 0.73231cm @@ -177,12 +194,14 @@ Serie Folio - Textbox4 @@ -211,12 +230,14 @@ Sub Proyecto - Textbox14 @@ -243,14 +264,16 @@ - Descripcion + Activo Fijo - Textbox6 @@ -279,12 +302,14 @@ Producto - Textbox15 @@ -313,12 +338,14 @@ Responsable - Textbox16 @@ -345,26 +372,30 @@ - Horometro/ + Horo./ - - Odometro + Odo. - Textbox18 @@ -382,6 +413,78 @@ + + + + true + true + + + + + Tipo Mant. + + + + + + + Textbox17 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Clasificacion 2 + + + + + + + Textbox21 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + @@ -393,12 +496,14 @@ U.M. - Textbox5 @@ -425,14 +530,16 @@ - Cantidad + Cant. - Textbox19 @@ -461,12 +568,14 @@ PU - Textbox3 @@ -495,12 +604,14 @@ Total - Textbox13 @@ -518,6 +629,42 @@ + + + + true + true + + + + + Cuenta Contable + + + + + + + Textbox20 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + @@ -534,7 +681,7 @@ =Fields!SerieFolio.Value @@ -567,7 +714,7 @@ =Fields!SubProyecto.Value @@ -599,7 +746,7 @@ =Fields!CodigoAF.Value @@ -631,7 +778,7 @@ =Fields!CodigoPS.Value @@ -664,7 +811,7 @@ =Fields!NombreCompleto.Value @@ -697,7 +844,7 @@ =Fields!AFMedida.Value @@ -719,6 +866,76 @@ + + + + true + true + + + + + =Fields!AFTipoMantenimientoStr.Value + + + + + + + AFTipoMantenimientoStr + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Clasificacion2.Value + + + + + + + Clasificacion2 + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + @@ -730,7 +947,7 @@ =Fields!UnidadMedida.Value @@ -763,7 +980,7 @@ =Fields!Cantidad.Value @@ -799,7 +1016,7 @@ =Fields!PU.Value @@ -835,7 +1052,7 @@ =Fields!Total.Value @@ -860,6 +1077,41 @@ + + + + true + true + + + + + =Fields!CuentaContable.Value + + + + + + + CuentaContable + + + =IIF(Fields!Orden.Value.ToString = "0","Silver","White") + 2pt + 2pt + 2pt + 2pt + + + + @@ -876,6 +1128,9 @@ + + + @@ -891,7 +1146,7 @@ DataSet1 0.9482cm 0.09525cm - 1.06771cm + 1.20002cm 26.76762cm 2 - - - Conciliación CFDI SAT - - - - -
  • Solicitudes SAT
  • - -
    - - - - - - -
    -
    -
    - - -
    -
    -
    - - -
    - Fecha Inicio: -
    -
    -
    - - - - -
    - - - - - - -
    -
    - Fecha Fin: -
    -
    -
    - - - - -
    - - - - - - -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - <%# Eval("CFDISIG")%> - - - - - <%# Eval("CFDISAT")%> - - - - - <%# Eval("CFDISIGSinSAT")%> - - - - - <%# Eval("CFDISATSinSIG")%> - - - - - - - - - - - - - - <%----%> - - -
    - - - - diff --git a/Ventas/RepConciliacionSat.aspx.cs b/Ventas/RepConciliacionSat.aspx.cs deleted file mode 100644 index 6d282df49..000000000 --- a/Ventas/RepConciliacionSat.aspx.cs +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using Extensiones; - -public partial class Ventas_RepConciliacionSat : ClsPaginas -{ - const string rqFechaInicio = "FechaInicio"; - const string rqFechaFin = "FechaFin"; - public string RfechaI - { - get - { - return ViewState["RfechaI"].ToString(); - } - set { ViewState["RfechaI"] = value; } - } - public string RfechaF - { - get - { - return ViewState["RfechaF"].ToString(); - } - set { ViewState["RfechaF"] = value; } - } - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - DateTime fecha; - DateTime fechaInicio = DateTime.Now; - DateTime fechaFin = DateTime.Now; - if (fechaInicio.Day < 5) { fechaInicio = fechaInicio.AddMonths(-1); } - fechaInicio = fechaInicio.AddDays(1 - fechaInicio.DayOfYear); - fechaFin = fechaInicio.AddYears(1).AddDays(-1); - if (Request[rqFechaInicio] != null) { DateTime.TryParse(Request[rqFechaInicio], out fecha); fechaInicio = fecha.Year > 1900 ? fecha : fechaInicio; } - if (Request[rqFechaFin] != null) { DateTime.TryParse(Request[rqFechaFin], out fecha); fechaFin = fecha.Year > 1900 ? fecha : fechaFin; } - txtFechaI.Text = string.Format("{0:dd/MM/yyyy}", fechaInicio); - txtFechaF.Text = string.Format("{0:dd/MM/yyyy}", fechaFin); - - - } - CargaRepConciliacionSatGET(); - } - - - protected void CargaRepConciliacionSatGET() - { - string RtipoDocto; - RtipoDocto = "I"; - RfechaI = txtFechaI.Text.Length > 0 ? txtFechaI.Text.ToDateTime().ToString("yyyy/MM/dd") : ""; - RfechaF = txtFechaF.Text.Length > 0 ? txtFechaF.Text.ToDateTime().ToString("yyyy/MM/dd") : ""; - using (ClsGenerales ObjRepC = new ClsGenerales()) - { - ObjRepC.RepConciliacionSATGet(UsuarioActual.CveEmpresa, RtipoDocto, RfechaI, RfechaF); - GVRepConciliacionSatGET.DataSource = ObjRepC.DtResultados; - ObjRepC.Dispose(); - - } - GVRepConciliacionSatGET.DataBind(); - upDatosRepC.Update(); - } - - protected void BtnConsultar_Click(object sender, EventArgs e) - { - CargaRepConciliacionSatGET(); - } - - protected void GVRepConciliacionSatGET_RowDataBound(object sender, GridViewRowEventArgs e) - { - if (e.Row.RowType == DataControlRowType.DataRow) - { - string fechaI = RfechaI; - string fechaF = RfechaF; - DateTime danio; - DateTime danioF; - int GRUPOCve = e.Row.DBCampo("GRUPOCve").ToString().ToEntero(); - e.Row.CssClass = string.Format("Grupo{0}", GRUPOCve); - e.Row.Attributes.Add("ganio", string.Format("{0}", e.Row.DBCampo("anio"))); - e.Row.Attributes.Add("gMes", string.Format("{0}", e.Row.DBCampo("Mes"))); - string navigateurl = ""; - switch (GRUPOCve) - { - case 0: - break; - case 1: - danio = string.Format("{0}/01/01", e.Row.DBCampo("anio")).ToDateTime(); - danioF = danio.AddYears(1).AddSeconds(-1); - if (RfechaI.ToDateTime() < danio) - { - fechaI = danio.ToString("yyyy/MM/dd"); - } - if (RfechaF.ToDateTime() > danioF || RfechaF.Length == 0) - { - fechaF = danioF.ToString("yyyy/MM/dd HH:mm:ss"); - } - break; - case 2: - danio = string.Format("{0}/{1}/01", e.Row.DBCampo("anio"), e.Row.DBCampo("Mes").Substring(4)).ToDateTime(); - danioF = danio.AddMonths(1).AddSeconds(-1); - if (RfechaI.ToDateTime() < danio) - { - fechaI = danio.ToString("yyyy/MM/dd"); - } - if (RfechaF.ToDateTime() > danioF || RfechaF.Length == 0) - { - fechaF = danioF.ToString("yyyy/MM/dd HH:mm:ss"); - } - break; - case 3: - danio = string.Format("{0:yyyy/MM/dd}", e.Row.DBCampo("dia")).ToDateTime(); - danioF = danio.AddDays(1).AddSeconds(-1); - if (RfechaI.ToDateTime() < danio) - { - fechaI = danio.ToString("yyyy/MM/dd"); - } - if (RfechaF.ToDateTime() > danioF || RfechaF.Length == 0) - { - fechaF = danioF.ToString("yyyy/MM/dd HH:mm:ss"); - } - break; - default: - break; - } - navigateurl = string.Format("{0}&{3}={1}&{4}={2}", navigateurl, fechaI, fechaF, rqFechaInicio, rqFechaFin); - e.Row.FCHyperLink("HypSIG").NavigateUrl = string.Format("/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=1{0}", navigateurl); - e.Row.FCHyperLink("HypSAT").NavigateUrl = string.Format("/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=2{0}", navigateurl); - e.Row.FCHyperLink("HypSIGnoSAT").NavigateUrl = string.Format("/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=3{0}", navigateurl); - e.Row.FCHyperLink("HypSatnoSIG").NavigateUrl = string.Format("/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=4{0}", navigateurl); - } - } -} \ No newline at end of file diff --git a/Ventas/RepIngresos.aspx b/Ventas/RepIngresos.aspx deleted file mode 100644 index 59b888063..000000000 --- a/Ventas/RepIngresos.aspx +++ /dev/null @@ -1,252 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepIngresos.aspx.vb" Inherits="Ventas_RepIngresos" %> - - - - - - - - Reporte de Ingresos - - - - - - -
  • - PDF -
  • -
  • - Excel -
  • -
  • - Ver Dlls en pesos -
  • -
    - - - - -
    -
    - - - - - - -
    -
    -
    - - - "> - - -
    -
    -
    -
    - -
    -
    -
    - - - - -
    - - -
    -
    - -
    -
    -
    - - - - -
    - - -
    -
    - -
    - -
    - - - - - - - - - - - - <%-- - - - - - - --%> -
    -
    - -
    -
    - <%-- - - --%> - - - - -
    -
    -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - -
    - - - diff --git a/Ventas/RepIngresos.aspx.vb b/Ventas/RepIngresos.aspx.vb deleted file mode 100644 index 8e5a5f6af..000000000 --- a/Ventas/RepIngresos.aspx.vb +++ /dev/null @@ -1,197 +0,0 @@ - -Imports System.Data -Imports Extensiones -Imports Microsoft.Reporting.WebForms - -Partial Class Ventas_RepIngresos - Inherits ClsPaginas - -#Region "Propiedades" - Protected ReadOnly Property Filtros As String - Get - Dim retorno As New StringBuilder - If RsFechaI <> "-1" Then - retorno.Append("&RsFechaI=") - retorno.Append(RsFechaI) - End If - If RsFechaF <> "-1" Then - retorno.Append("&RsFechaF=") - retorno.Append(RsFechaF) - End If - If TipoDoc <> "-1" Then - retorno.Append("&TipoDoc=") - retorno.Append(TipoDoc) - End If - If CveSubProyecto <> -1 Then - retorno.Append("&CveSubProyecto=") - retorno.Append(CveSubProyecto) - End If - Return retorno.ToString() - End Get - End Property - Private Property RsFechaI() As String - Get - Return If(IsNothing(ViewState("RsFechaI")), "-1", CStr(ViewState("RsFechaI"))) - End Get - Set - ViewState("RsFechaI") = Value - End Set - End Property - Private Property RsFechaF() As String - Get - Return If(IsNothing(ViewState("RsFechaF")), "-1", CStr(ViewState("RsFechaF"))) - End Get - Set - ViewState("RsFechaF") = Value - End Set - End Property - Private Property TipoDoc() As String - Get - Return If(IsNothing(ViewState("TipoDoc")), "-1", CStr(ViewState("TipoDoc"))) - End Get - Set - ViewState("TipoDoc") = Value - End Set - End Property - Private Property CveSubProyecto() As Integer - Get - Return If(IsNothing(ViewState("CveSubProyecto")), -1, ViewState("CveSubProyecto").ToString().ToEntero()) - End Get - Set - ViewState("CveSubProyecto") = Value - End Set - End Property - Private Property DtDatos As DataTable - Get - DtDatos = DirectCast(ViewState("DtDatos"), DataTable) - End Get - - Set(ByVal value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - - Private Property TipoCambio As Integer - Get - Return ViewState("TipoCambio").ToString.ToEntero - End Get - - Set(value As Integer) - ViewState("TipoCambio") = value - End Set - End Property - Private Property TCEspecifico As Decimal - Get - Return ViewState("TCEspecifico").ToString.ToDecimal - End Get - - Set(value As Decimal) - ViewState("TCEspecifico") = value - End Set - End Property -#End Region - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - TCEspecifico = -1 - TipoCambio = 1 - CveSubProyecto = -1 - TxtFechaInicio.Text = String.Format("01/01/{0}", Now.Year) - DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) - DdlSubProyecto.DataBind() - - End If - End Sub - - Protected Sub CargaRepIngresos(Optional tipoReporte As Integer = -1) - Dim Cves_Subprotectos As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM) - Dim TiposDoc As String = If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM) - - 'If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then - ' TCEspecifico = TxtEspecifico.Text.ToDecimal - 'Else - ' TCEspecifico = -1 - 'End If - - Dim ObjRepI As New ClsVentas() - If ObjRepI.RepIngresos(UsuarioActual.CveEmpresa, If(RsFechaI = "-1", MinFecha, RsFechaI.ToDate), If(RsFechaF = "-1", MaxFecha, RsFechaF.ToDate), TiposDoc, Cves_Subprotectos, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico) Then - GVRepIngresos.DataSource = ObjRepI.DtResultados - DtDatos = ObjRepI.DtResultados - End If - ObjRepI.Dispose() - GVRepIngresos.DataBind() - upDatosRepI.Update() - End Sub - Protected Sub LnkFiltrar_Click(sender As Object, e As EventArgs) - RsFechaI = TxtFechaInicio.Text.Replace("__/__/____", "").Trim() - RsFechaI = If(RsFechaI.Length > 6, RsFechaI.ToDate().ToString("yyyy/MM/dd"), "-1") - RsFechaF = TxtFechaFin.Text.Replace("__/__/____", "").Trim() - RsFechaF = If(RsFechaF.Length > 6, RsFechaF.ToDate().ToString("yyyy/MM/dd"), "-1") - TipoDoc = DdlTipoDocto.SelectedValue - CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero() - CargaRepIngresos() - End Sub -#Region "IMPRESION" - Protected Sub LnkPDF_Click(sender As Object, e As EventArgs) - GeneraImpresion() - End Sub - Protected Sub LnkExcel_Click(sender As Object, e As EventArgs) - GeneraImpresion("Excel") - End Sub - - Private Sub GeneraImpresion(Optional Formato As String = "PDF") - - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - - Dim FI As String = If(TxtFechaInicio.Text = "", "", $"Fecha Inicio: {TxtFechaInicio.Text} ") - Dim FF As String = If(TxtFechaFin.Text = "", "", $"Fecha Fin: {TxtFechaFin.Text} ") - Dim Tipo As String = If(DdlTipoDocto.SelectedValue = "", "", $"Tipo Docto: {DdlTipoDocto.GetSelectedText} ") - Dim subProy As String = If(DdlSubProyecto.SelectedValue = "", "", $"SubProyecto: {DdlSubProyecto.GetSelectedText} ") - - If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then - - Dim params As New List(Of ReportParameter) - - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("AgrupadoPor", $"{FI}{FF}{Tipo}{subProy}")) - params.Add(New ReportParameter("FechaImpresion", DateAndTime.Now)) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - - ImprimirPDF("Empresas/Grales/Formatos/RepIngresos.rdlc", DtDatos, params, "RepPUESinPago", Formato) - Else - Alert("No se encontraron datos con los filtros especificados", TipoMensaje.MsgAdvertencia) - End If - - End Sub -#End Region - Protected Sub GVRepIngresos_RowDataBound(sender As Object, e As GridViewRowEventArgs) - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("TipoAmortizacion") = "" Then - e.Row.CssClass = "Totales" - ElseIf e.Row.DBCampo("TipoAmortizacion") <> "" AndAlso e.Row.DBCampo("CveConceptoContable") = "" Then - e.Row.CssClass = "SubTotales" - End If - End If - End Sub - Private Sub RblTipoCambio_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipoCambio.SelectedIndexChanged - TipoCambio = RblTipoCambio.SelectedValue.ToEntero - 'If TipoCambio = 3 Then - ' LiEspecifico.Visible = True - ' TCEspecifico = GlobalTipoCambio(Now).ToDecimal - ' TxtEspecifico.Text = TCEspecifico.ToString - 'Else - ' LiEspecifico.Visible = False - 'End If - UpBodyTipoCambio.Update() - End Sub - Private Sub BtnTipoCambio_Click(sender As Object, e As EventArgs) Handles BtnTipoCambio.Click - RegistraScript(String.Format("$('#{0}').modal('hide');", "DivTipoCambio")) - LnkFiltrar_Click(LnkFiltrar, EventArgs.Empty) - End Sub -End Class diff --git a/Ventas/ReporteDetalle.aspx b/Ventas/ReporteDetalle.aspx deleted file mode 100644 index 8b4f500cf..000000000 --- a/Ventas/ReporteDetalle.aspx +++ /dev/null @@ -1,52 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ReporteDetalle.aspx.cs" Inherits="Ventas_ReporteDetalle" %> - -<%@ Register Assembly="Stimulsoft.Report.MobileDesign, Version=2017.1.10, Culture=neutral, PublicKeyToken=EBE6666CBA19647A" - Namespace="Stimulsoft.Report.MobileDesign" TagPrefix="cc2" %> - - - - - - - - - - -
    - - - - - diff --git a/Ventas/SolicitudesSAT.aspx b/Ventas/SolicitudesSAT.aspx deleted file mode 100644 index 66c61af18..000000000 --- a/Ventas/SolicitudesSAT.aspx +++ /dev/null @@ -1,406 +0,0 @@ -<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="SolicitudesSAT.aspx.cs" Inherits="Ventas_SolicitudesSAT" %> - - - - - - - - Solicitudes CFDI SAT - - - - - - -
  • - Verificar Solicitudes
  • -
  • - Solicitar SAT
  • -
    -
    -
    - - - - - -
    -
    -
    - - <%----%> -
    -
    -
    -
    - Tipo: -
    -
    - - - - - -
    -
    - Fecha Inicio(ing.): -
    -
    -
    - - - - -
    - - - - - - -
    -
    - Fecha Fin(ing.): -
    -
    -
    - - - - -
    - - - - - - -
    -
    - Fecha Inicio(Sol.): -
    -
    -
    - - - - -
    - - - - - - -
    -
    - Fecha Fin(Sol.): -
    -
    -
    - - - - -
    - - - - - - -
    -
    -
    -
    - -
    -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - diff --git a/Ventas/SolicitudesSAT.aspx.cs b/Ventas/SolicitudesSAT.aspx.cs deleted file mode 100644 index 4206749c7..000000000 --- a/Ventas/SolicitudesSAT.aspx.cs +++ /dev/null @@ -1,151 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; -using Extensiones; - -public partial class Ventas_SolicitudesSAT : ClsPaginas -{ - protected void Page_Load(object sender, EventArgs e) - { - - if (!IsPostBack) - { - //this.RegistraScript("$('#ModalSolicitarSat').modal();"); - int rtipo = Request["tipo"] == null ? -1 : Request["tipo"].ToString().ToEntero(); - string rfIngInicio = Request["fIngInicio"] == null ? "" : Request["fIngInicio"].ToString().Trim(); - string rfIngFin = Request["fIngFin"] == null ? "" : Request["fIngFin"].ToString().Trim(); - string rfSolInicio = Request["fSolInicio"] == null ? "" : Request["fSolInicio"].ToString().Trim(); - string rfSolFin = Request["fSolFin"] == null ? "" : Request["fSolFin"].ToString().Trim(); - - if (rfIngInicio == "") - { - rfIngInicio = string.Format("{0:01/MM/yyyy}",DateTime.Now); - } - if (rfIngFin == "") - { - rfIngFin = string.Format("{0:dd/MM/yyyy}",string.Format("{0:01/MM/yyyy}", DateTime.Now).ToDateTime().AddMonths(1).AddDays(-1)); - - } - DateTime dValor = DateTime.Now; - dValor = DateTime.Now; if (DateTime.TryParse(rfIngInicio, out dValor)) { rfIngInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngInicio = ""; } - dValor = DateTime.Now; if (DateTime.TryParse(rfIngFin, out dValor)) { rfIngFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfIngFin = ""; } - dValor = DateTime.Now; if (DateTime.TryParse(rfSolInicio, out dValor)) { rfSolInicio = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfSolInicio = ""; } - dValor = DateTime.Now; if (DateTime.TryParse(rfSolFin, out dValor)) { rfSolFin = string.Format("{0:dd/MM/yyyy}", dValor); } else { rfSolFin = ""; } - - DdlTipo.SelectedValueExist(rtipo); - txtFechaI.Text = rfIngInicio; - txtFechaF.Text = rfIngFin; - txtFechaISol.Text = rfSolInicio; - txtFechaFSol.Text = rfSolFin; - cargarDatos(); - } - } - - - private void cargarDatos() - { - int rtipo = DdlTipo.SelectedValue.ToEntero(); - string rfIngInicio = txtFechaI.Text; - string rfIngFin = txtFechaF.Text; - string rfSolInicio = txtFechaISol.Text; - string rfSolFin = txtFechaFSol.Text; - using (ClsGenerales objgral = new ClsGenerales()) - { - objgral.SAT_DescargaSolicitudesGET(UsuarioActual.CveEmpresa, rtipo, rfIngInicio, rfIngFin, rfSolInicio, rfSolFin); - GVSAT_DescargaSolicitudes.DataSource = objgral.DtResultados; - GVSAT_DescargaSolicitudes.DataBind(); - } - upDatosSAT.Update(); - } - - protected void BtnConsultar_Click(object sender, EventArgs e) - { - cargarDatos(); - } - - protected void LnkVerificarSolicitudes_Click(object sender, EventArgs e) - { - string direxe = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe"); - - String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo=SP'}}", 1, UsuarioActual.CveEmpresa, -1, 0, 1);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); - //this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json)); - try - { - string Mensajes = ""; - System.Diagnostics.Process ObjProcess = null; - { - ObjProcess = new System.Diagnostics.Process(); - ObjProcess.StartInfo.RedirectStandardOutput = true; - ObjProcess.StartInfo.FileName = direxe;//System.Configuration.ConfigurationManager.AppSettings["DirUtilerias"].ToString(); - ObjProcess.StartInfo.Arguments = $"--mod TareaProgramada --Item {json} "; - ObjProcess.StartInfo.UseShellExecute = false; - ObjProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; - ObjProcess.Start(); - } - using (System.IO.StreamReader myStreamReader = ObjProcess.StandardOutput) - { - Mensajes = myStreamReader.ReadLine(); - - } - } - catch (Exception ex) - { - ex.ToString().GuardaLog(); - } - cargarDatos(); - Alert("La solicitud ha sido enviada"); - } - - protected void LnkSolicitarCFDI_Click(object sender, EventArgs e) - { - string FechaI = string.Format("{0:yyyy-MM-dd}T00:00:00", txtFechaIAdd.Text.ToDateTime()); - string FechaF = string.Format("{0:yyyy-MM-dd}T23:59:59", txtFechaFAdd.Text.ToDateTime()); - - string direxe = string.Format("{0}{1}", AppDomain.CurrentDomain.BaseDirectory, "Utilerias\\ADSUtilerias.exe"); - - String json = string.Format("{{cveTareaProgramada:{0},cveEmpresa:{1},CveTareaProgramadaHistorial:{2},recursividad:{3},Resultado:{4},parametros:'Tipo={5}&fechai={6}&fechaf={7}'}}", 1, UsuarioActual.CveEmpresa, -1, 0, 1, DdlTipoAdd.SelectedValue, FechaI, FechaF);//Mod.ToLiteral(new System.Web.Script.Serialization.JavaScriptSerializer().Serialize(tarea)); - //this.Alert(string.Format("json:{0} : --mod TareaProgramada --Item {1}", DateTime.Now, json)); - try - { - string Mensajes = ""; - System.Diagnostics.Process ObjProcess = null; - { - ObjProcess = new System.Diagnostics.Process(); - ObjProcess.StartInfo.RedirectStandardOutput = true; - ObjProcess.StartInfo.FileName = direxe;//System.Configuration.ConfigurationManager.AppSettings["DirUtilerias"].ToString(); - ObjProcess.StartInfo.Arguments = $"--mod TareaProgramada --Item {json} "; - ObjProcess.StartInfo.UseShellExecute = false; - ObjProcess.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal; - ObjProcess.Start(); - } - using (System.IO.StreamReader myStreamReader = ObjProcess.StandardOutput) - { - Mensajes = myStreamReader.ReadLine(); - - } - } - catch (Exception ex) - { - ex.ToString().GuardaLog(); - } - cargarDatos(); - Alert("La solicitud ha sido enviada"); - } - - protected void LnknoCFDI_Click(object sender, EventArgs e) - { - GridViewRow gvrow = (GridViewRow)(((LinkButton)sender).NamingContainer); - int CveSolicitudSat = gvrow.DataKey("CveSolicitudSat").ToEntero(); - using (ClsGenerales objgeneral = new ClsGenerales()) - { - objgeneral.SAT_DescargaSolicitudeUUIDSGET(CveSolicitudSat); - GVFoliosSAT.DataSource = objgeneral.DtResultados; - } - GVFoliosSAT.DataBind(); - RegistraScript("$('#ModalFoliosSolicitud').modal();"); - UpFoliosSAT.Update(); - } -} \ No newline at end of file From 10f86c3f9fba58f8c90b6c969d573890de415d52 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Wed, 5 Oct 2022 10:38:56 -0700 Subject: [PATCH 2/6] Ajsutes Clientes --- Ventas/Clientes.aspx | 78 +++++++++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 33 deletions(-) diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 3ddfef9e4..1726f0ca5 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -177,6 +177,10 @@ color: orange; background-color: orange; } + + .margenChk{ + margin-left:15px!important; + } @@ -1648,13 +1652,11 @@
    - Parametros - - - + Parametros
    +
    - +
    @@ -1802,12 +1804,26 @@ - -
    - - +
    +
    +
    + + +
    +
    +
    +
    + + + +
    +
    + + + +
    @@ -1817,17 +1833,12 @@
    - - - + +
    - -
    - - -
    +
    @@ -1871,53 +1882,54 @@
    - -
    + +
    - + +
    -
    - -
    +
    +
    - + +
    -
    - -
    +
    +
    - + +
    -
    - -
    +
    +
    - + +
    - +
    From c41fd5ddc099c2fa3cca83d0f86efa78a510e4c1 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 5 Oct 2022 13:13:11 -0700 Subject: [PATCH 3/6] -- --- Bancos/DepositosCaja.aspx.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Bancos/DepositosCaja.aspx.vb b/Bancos/DepositosCaja.aspx.vb index 7cbb67f23..3dc18e324 100644 --- a/Bancos/DepositosCaja.aspx.vb +++ b/Bancos/DepositosCaja.aspx.vb @@ -43,8 +43,8 @@ Partial Class Bancos_DepositosCaja DdlCajaChica.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"}) DdlCajaChica.DataBind() - 'código temporal, para claudia y toñita - If UsuarioActual.CveUsuario.Contiene(1937, 2452) Then + 'código temporal, para claudia y toñita, monge, anadelia + If UsuarioActual.CveUsuario.Contiene(1937, 2452, 3358, 3033) Then DdlCajaChica.Items.Add(New ListItem("Todas", "-1")) End If From fbc1cac8d54c0477c59fef41531d9c46f98eb961 Mon Sep 17 00:00:00 2001 From: rrene Date: Wed, 5 Oct 2022 15:50:22 -0700 Subject: [PATCH 4/6] =?UTF-8?q?--=20se=20quitaron=20las=20fechas,=20y=20se?= =?UTF-8?q?=20activ=C3=B3=20el=20cambio=20de=20estatus=20en=20todos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ventas/RepLineasAdicionales.aspx | 100 ++++++++-------------------- Ventas/RepLineasAdicionales.aspx.cs | 40 ++++++++--- 2 files changed, 60 insertions(+), 80 deletions(-) diff --git a/Ventas/RepLineasAdicionales.aspx b/Ventas/RepLineasAdicionales.aspx index 4a65fdc2b..4c38cc00b 100644 --- a/Ventas/RepLineasAdicionales.aspx +++ b/Ventas/RepLineasAdicionales.aspx @@ -3,12 +3,7 @@ - + @@ -16,10 +11,7 @@ - - - - +
  • @@ -57,35 +49,13 @@
  • -
    Fecha Inicio:
    -
    -
    - - - - -
    - - - - - - -
    -
    Fecha Fin:
    -
    -
    - - - - -
    - - - - - - +
    Estatus:
    +
    + + + + +
    @@ -93,24 +63,14 @@
    - - - +
    @@ -130,38 +90,34 @@ + OnRowCommand ="GvLineasAdicionales_RowCommand" + OnRowDataBound="GvLineasAdicionales_RowDataBound"> - - - - - + + + - + <%----%> - + - - - + + +
    -
    + -
    -
    + -
    -
    - -
    + + +
    diff --git a/Ventas/RepLineasAdicionales.aspx.cs b/Ventas/RepLineasAdicionales.aspx.cs index f6266c005..c154e960b 100644 --- a/Ventas/RepLineasAdicionales.aspx.cs +++ b/Ventas/RepLineasAdicionales.aspx.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using System.IO; using ListItem = System.Web.UI.WebControls.ListItem; -using DocumentFormat.OpenXml.Spreadsheet; using System.Web.UI; public partial class Ventas_RepLineasAdicionales : ClsPaginas @@ -91,8 +90,8 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas DdlClientes.SelectedText = "Todos"; DdlClientes.SelectedValue = "-1"; - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); - txtFechaF.Text = DateTime.Now.AddMonths(3).ToString("dd/MM/yyyy"); + //txtFechaI.Text = DateTime.Now.FirstDayOfMonth().ToShortDateString(); + //txtFechaF.Text = DateTime.Now.AddMonths(3).ToString("dd/MM/yyyy"); } @@ -111,7 +110,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas int CveProveedor = DdlProveedor.SelectedValue.ToEntero() > 0 ? DdlProveedor.SelectedValue.ToEntero() : -1; - if(objVentas.GetLineasAdicionales(-1,DdlClientes.SelectedValue.ToEntero(),CveProveedor, TipoLinea, -1,txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)){ + if(objVentas.GetLineasAdicionales(-1,DdlClientes.SelectedValue.ToEntero(),CveProveedor, TipoLinea, -1, MinFecha, MaxFecha, DdlEstatus.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa)){ GvLineasAdicionales.DataSource = objVentas.DtResultados; if( objVentas.DtResultados.Rows.Count > 0) @@ -273,14 +272,12 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas gvTemp.Columns[8].Visible = false; gvTemp.ExportToExcelx( TipoLinea == 1 ? "RepLienasAdicionales":"RepPO"); } - - - + protected void GvLineasAdicionales_RowDataBound(object sender, GridViewRowEventArgs e) { if(e.Row.RowType == DataControlRowType.DataRow) { - if(e.Row.DataKey("CveLineaAdicionalEstatus").ToEntero().Contiene(1) && e.Row.DataKey("CveVenta").ToEntero() > 0) + if(e.Row.DataKey("CveVenta").ToEntero() > 0) { e.Row.FCLinkButton("LnkCambiarEstatus").Visible = true; } @@ -321,4 +318,31 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas 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(); + + 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(); + } + + + } } \ No newline at end of file From 5a49bc984e954a92ff0e00e387b0723075e7be30 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Wed, 5 Oct 2022 15:50:54 -0700 Subject: [PATCH 5/6] Limpieza modulos --- App_Code/ClsCompras.vb | 25 ----- App_Code/ClsPaginas.vb | 3 +- App_Code/ClsVentas.vb | 19 +--- Compras/RepPerioricidad.aspx | 153 ------------------------------- Compras/RepPerioricidad.aspx.vb | 111 ---------------------- Ventas/RepArqueosDetalle.aspx | 117 ----------------------- Ventas/RepArqueosDetalle.aspx.vb | 108 ---------------------- 7 files changed, 2 insertions(+), 534 deletions(-) delete mode 100644 Compras/RepPerioricidad.aspx delete mode 100644 Compras/RepPerioricidad.aspx.vb delete mode 100644 Ventas/RepArqueosDetalle.aspx delete mode 100644 Ventas/RepArqueosDetalle.aspx.vb diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 8768624dd..abb33f395 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -921,31 +921,6 @@ Public Class ClsCompras Return Retorno End Function - 'Reporte de Perioricidad - Public Function GetRepComprasPerioricidad(CveSubProyecto As Integer, CveClasificacion As Integer, CvePS As Integer, - FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean - - Dim Retorno As Boolean = False - DataAdapter("PA_Comp_ComprasPerioricidadRep") - - With SqlAdapter.SelectCommand.Parameters - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion - .Add("@CvePS", SqlDbType.Int).Value = CvePS - .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio - .Add("@FechaFin", SqlDbType.Date).Value = FechaFin - .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 Perioricidad.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - Return Retorno - End Function 'Reporte de Productos y Servicios Public Function GetRepProductosServicios(CveProyecto As Integer, CveSubProyecto As String, CveCategoria As String, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 8dd0f20c4..65ef143b6 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -4729,7 +4729,7 @@ Public Class ClsPaginas PaginaDict.Add("/Compras/RepNotasCredito.aspx".ToUpper(), 337) PaginaDict.Add("/Compras/ReembolsosComprobaciones.aspx".ToUpper(), 350) PaginaDict.Add("/Compras/RepProductosServicios.aspx".ToUpper(), 97) - PaginaDict.Add("/Compras/RepPerioricidad.aspx".ToUpper(), 126) + PaginaDict.Add("/Compras/PopUpFacturasPendientesAutorizar.aspx".ToUpper(), 559) PaginaDict.Add("/Compras/RepEvaluacionProveedor.aspx".ToUpper(), 564) PaginaDict.Add("/Compras/RepRembolsoComprobaciones.aspx".ToUpper(), 591) @@ -5517,7 +5517,6 @@ Public Class ClsPaginas PaginaDict.Add("/Ventas/RepVentasResumen.aspx".ToUpper(), 674) PaginaDict.Add("/Ventas/RepAnticiposEspeciales.aspx".ToUpper(), 678) - PaginaDict.Add("/Ventas/RepArqueosDetalle.aspx".ToUpper(), 680) PaginaDict.Add("/Ventas/RepCotizacionesxFacturar.aspx".ToUpper(), 686) PaginaDict.Add("/Ventas/RepRemisionesNC.aspx".ToUpper(), 687) PaginaDict.Add("/Ventas/CatCobranzaEstatus.aspx".ToUpper(), 7003) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index ebcea89aa..7378428ee 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4806,24 +4806,7 @@ Public Class ClsVentas Return retorno 'compila End Function - Public Function GetRepArqueosDetalle(Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean - Dim retorno As Boolean = False - Dataset = New DataSet() - DataAdapter("PA_Vta_RepArqueosDetalleGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@Fecha", SqlDbType.DateTime).Value = Fecha - .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - Try - SqlAdapter.Fill(Dataset) - retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener el reporte de arqueos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return retorno - 'compila - End Function + Public Function GetRepVentasMensuales(CveEmpresa As Integer, FechaInicio As Date, FechaFin As Date, Optional CveSubProyecto As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveVendedor As Integer = -1, Optional CveMarca As Integer = -1, Optional Modalidad As Integer = 0) As Boolean Dim retorno As Boolean = False diff --git a/Compras/RepPerioricidad.aspx b/Compras/RepPerioricidad.aspx deleted file mode 100644 index 17ad7be7d..000000000 --- a/Compras/RepPerioricidad.aspx +++ /dev/null @@ -1,153 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepPerioricidad.aspx.vb" Inherits="Compras_RepPerioricidad" %> - - - - - - - Reporte Perioricidad de Compra - - - - - - - - -
    -
    -
    - - -
    -
    -
    -
    -
    - - -
    - <%-- - --%> -
    -
    - - -
    - <%--
    -
    --%> -
    -
    - - -
    -
    -
    -
    -
    -
    - -
    - - -
    - -
    -
    - - - - - -
    -
    - -
    -
    - - - - - -
    -
    -
    -
    -
    -
    -
    - - - - - <%----%> - <%--ItemStyle-Width="20px"--%> - - - - - - - - - - - -
    ConceptoFechaUnidad MedidaCantidadImporteOCActivo Fijo
    -
    - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - -
    - - - - - - - - - - - -
    -
    -
    - <%----%> - <%----%> - <%----%> - <%----%> -
    -
    -
    -
    -
    - - - diff --git a/Compras/RepPerioricidad.aspx.vb b/Compras/RepPerioricidad.aspx.vb deleted file mode 100644 index 013bb99b3..000000000 --- a/Compras/RepPerioricidad.aspx.vb +++ /dev/null @@ -1,111 +0,0 @@ -Option Explicit On -Option Strict On - -Imports System.Data -Imports Extensiones - -Partial Class Compras_RepPerioricidad - Inherits ClsPaginas - - Private Property DtDatos As DataTable - Get - Return CType(ViewState("DtDatos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtDatos") = value - End Set - End Property - - - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - 'divfiltros.Attributes.CssStyle.Add("display", "none") - RegistraScript(String.Format("$('#{0}').css({{'display':'none'}});", divfiltros.ClientID)) - - txtFechaI.Text = Now.AddMonths(-6).ToShortDateString - txtFechaF.Text = Now.ToShortDateString - CargaCombos() - End If - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - Dim ObjCompras As New ClsCompras - If ObjCompras.GetRepComprasPerioricidad(DdlSubProyecto.SelectedValue.ToEntero, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa) Then - DtDatos = ObjCompras.DtResultados - Gv.DataSource = DtDatos - Else - Gv.DataSource = Nothing - End If - ObjCompras.Dispose() - Gv.DataBind() - UPPDatos.Update() - End Sub - - Protected Sub Gv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles Gv.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DataKey("TipoRenglon").ToEntero = 1 Then - 'e.Row.FindControl("LblSpace").Visible = False - e.Row.FindControl("tr2").Visible = False - e.Row.CssClass = "Totales" - ElseIf e.Row.DataKey("TipoRenglon").ToEntero = 2 Then - 'e.Row.FCLiteral("LblAgrupador").Text = String.Format("    {0}", e.Row.DBCampo("Agrupador")) - e.Row.FindControl("tr2").Visible = False - e.Row.CssClass = "SubTotales2" - 'e.Row.FindControl("tdConcepto") - e.Row.Cells(0).Style.Add("padding-left", "15px;") - Else - e.Row.FindControl("tr1").Visible = False - 'e.Row.BackColor = Drawing.Color.LightSkyBlue - End If - End If - End Sub - - Private Sub CargaCombos() - DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.CveEmpresa) - DdlProyecto.DataBind() - If DdlProyecto.Items.Count > 0 Then - DdlProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - End If - - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - DdlPS.Items.Insert(0, New ListItem("Todos", "-1")) - - 'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) - 'DdlClasificacion.DataBind() - - If UsuarioActual.Empresa.UsaAC Then - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Codigo = '' OR Codigo IS NULL ", Orderby:="Clasificacion") - Else - DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros("", Orderby:="Clasificacion") - End If - DdlClasificacion.DataBind() - - If DdlClasificacion.Items.Count > 0 Then - DdlClasificacion.Items.Insert(0, New ListItem("Todas", "-1")) - End If - End Sub - - Private Sub CargaPS(CveClasificacion As Integer) - - DdlPS.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion) - DdlPS.DataBind() - - If DdlPS.Items.Count > 0 Then - DdlPS.Items.Insert(0, New ListItem("Todos", "-1")) - End If - - End Sub - - Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlProyecto.SelectedIndexChanged - DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, -1, UsuarioActual.CveEmpresa) - DdlSubProyecto.DataBind() - If DdlSubProyecto.Items.Count > 0 Then - DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) - End If - End Sub - - Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged - CargaPS(DdlClasificacion.SelectedValue.ToEntero) - End Sub -End Class diff --git a/Ventas/RepArqueosDetalle.aspx b/Ventas/RepArqueosDetalle.aspx deleted file mode 100644 index 073de9608..000000000 --- a/Ventas/RepArqueosDetalle.aspx +++ /dev/null @@ -1,117 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepArqueosDetalle.aspx.vb" Inherits="Ventas_RepArqueosDetalle" %> - - - - - - - - - - - -
  • - Generar PDF -
  • -
  • - Generar Excel -
  • -
    - - - - -
    -
    - - - - - - - -
    -
    -
    - Ventas -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - CUENTAS -
    -
    -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    - " style="display: inline-block; margin-right: -20px; width: 150px;" /> - " style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"> -
    -
    - - - - - - - - - -
    -
    -
    -
    -
    -
    -
    - - - diff --git a/Ventas/RepArqueosDetalle.aspx.vb b/Ventas/RepArqueosDetalle.aspx.vb deleted file mode 100644 index a9b726fed..000000000 --- a/Ventas/RepArqueosDetalle.aspx.vb +++ /dev/null @@ -1,108 +0,0 @@ -Option Explicit On -Option Strict On - -Imports Extensiones -Imports Microsoft.Reporting.WebForms -Imports System.Data - -Partial Class Ventas_RepArqueosDetalle - Inherits ClsPaginas -#Region "P R O P I E D A D E S" - Private Property DtVentas As DataTable - Get - Return DirectCast(ViewState("DtVentas"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtVentas") = value - End Set - End Property - Private Property DtCuentas As DataTable - Get - Return DirectCast(ViewState("DtCuentas"), DataTable) - End Get - Set(value As DataTable) - ViewState("DtCuentas") = value - End Set - End Property -#End Region - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not IsPostBack Then - Dim CveSubProyecto As Integer = -1 - Dim Fecha As DateTime = Now - If Request("CveSubProyecto") IsNot Nothing Then - CveSubProyecto = Request("CveSubProyecto").ToString().ToEntero() - End If - If Request("Fecha") IsNot Nothing Then - Fecha = Request("Fecha").ToString().ToDate() - End If - CargaDatos(Fecha, CveSubProyecto) - End If - End Sub - Private Sub CargaDatos(Fecha As DateTime, CveSubProyecto As Integer) - LtlTitulo.Text = String.Format("Reporte de Arqueos Detalle: Fecha {0:dd/MM/yyyy}", Fecha) - - Dim ObjVentas As New ClsVentas() - If ObjVentas.GetRepArqueosDetalle(Fecha, CveSubProyecto, UsuarioActual.CveEmpresa) Then - DtVentas = ObjVentas.DataSetResultados.Tables(0).Copy() - DtCuentas = ObjVentas.DataSetResultados.Tables(1).Copy() - End If - ObjVentas.Dispose() - GvDatos.DataSource = DtVentas - GvCuentas.DataSource = DtCuentas - GvDatos.DataBind() - GvCuentas.DataBind() - - UPDatos.Update() - End Sub - Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("SerieFolio") = "Total" Then - e.Row.CssClass = "Totales" - End If - End If - End Sub - Protected Sub GvCuentas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCuentas.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Folio") = "Total" Then - e.Row.CssClass = "Totales" - End If - End If - End Sub - Protected Sub GeneraPDF(Formato As String) - Dim params As List(Of ReportParameter) = New List(Of ReportParameter)() - Dim Imagen As System.IO.FileInfo = New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) - params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) - params.Add(New ReportParameter("FechaImpresion", DateTime.Now.ToString())) - - params.Add(New ReportParameter("Encabezado", String.Format("Fecha:{0}", Request("Fecha").ToString().ToDate().ToString("dd/MM/yyyy")))) - - - Dim lrds As List(Of ReportDataSource) = New List(Of ReportDataSource)() - Dim rds As ReportDataSource = New ReportDataSource() - rds.Name = "DataSet1" - rds.Value = DtVentas - - Dim rds2 As ReportDataSource = New ReportDataSource() - rds2.Name = "DataSet2" - rds2.Value = DtCuentas - - lrds.Add(rds) - lrds.Add(rds2) - - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) - Else - params.Add(New ReportParameter("LogoPath", "")) - End If - - ImprimirPDF("Empresas/Grales/Formatos/RepArqueosDetalle.rdlc", lrds, params, "Rep Arqueos Detalle", Formato) - End Sub - Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) - GeneraPDF("PDF") - End Sub - Protected Sub LnkExportar_Click(sender As Object, e As EventArgs) - GeneraPDF("EXCEL") - End Sub -End Class From 9636641f6cfe54973df52df843e35211dbd00e06 Mon Sep 17 00:00:00 2001 From: Oscar Irigoyen Date: Wed, 5 Oct 2022 17:02:37 -0700 Subject: [PATCH 6/6] RepLienas carga por venta --- App_Code/ClsVentas.vb | 4 +-- Ventas/RepLineasAdicionales.aspx | 7 ++--- Ventas/RepLineasAdicionales.aspx.cs | 44 +++++++++++++++++------------ 3 files changed, 31 insertions(+), 24 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 7378428ee..9b748d07f 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5667,7 +5667,7 @@ Public Class ClsVentas Public Function UpdateLineasAdicionales(CveLineaAdicional As Integer, LineaAdicional As String, CveCliente As Integer, CveProveedor As Integer, TipoLinea As Integer, Importe As Decimal, CveMoneda As Integer, FechaVencimiento As Date, CveUsuario As Integer, CveCategoria As Integer, CveEmpresa As Integer, - Optional Comprobante As String = "-1", Optional DiasVencimiento As Integer = -1, Optional CveVenta As Integer = -1, Optional CveLineaAdicionalEstatus As Integer = -1) As Boolean + Optional LineaAdicionalComprobante As String = "-1", Optional DiasVencimiento As Integer = -1, Optional CveVenta As Integer = -1, Optional CveLineaAdicionalEstatus As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_LineasAdicionalesUpdate") @@ -5684,7 +5684,7 @@ Public Class ClsVentas .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@Comprobante", SqlDbType.VarChar).Value = Comprobante + .Add("@LineaAdicionalComprobante", SqlDbType.VarChar).Value = LineaAdicionalComprobante .Add("@DiasVencimiento", SqlDbType.VarChar).Value = DiasVencimiento .Add("@CveVenta", SqlDbType.VarChar).Value = CveVenta .Add("@CveLineaAdicionalEstatus", SqlDbType.Int).Value = CveLineaAdicionalEstatus diff --git a/Ventas/RepLineasAdicionales.aspx b/Ventas/RepLineasAdicionales.aspx index 4c38cc00b..bfe5ef7aa 100644 --- a/Ventas/RepLineasAdicionales.aspx +++ b/Ventas/RepLineasAdicionales.aspx @@ -89,10 +89,10 @@ @@ -109,8 +109,7 @@ -
    - +
    diff --git a/Ventas/RepLineasAdicionales.aspx.cs b/Ventas/RepLineasAdicionales.aspx.cs index c154e960b..7340a5449 100644 --- a/Ventas/RepLineasAdicionales.aspx.cs +++ b/Ventas/RepLineasAdicionales.aspx.cs @@ -7,11 +7,18 @@ using System.Web.UI; public partial class Ventas_RepLineasAdicionales : ClsPaginas { #region PROPIEDADES - + + private int CveLineaAdicional { get { return (ViewState["CveLineaAdicional"] == null) ? 0 : int.Parse(ViewState["CveLineaAdicional"].ToString()); } - set { ViewState["CveLineaAdicional"] =(int) value; } + set { ViewState["CveLineaAdicional"] = (int)value; } + } + + private int CveVenta + { + get { return (ViewState["CveVenta"] == null) ? 0 : int.Parse(ViewState["CveVenta"].ToString()); } + set { ViewState["CveVenta"] =(int) value; } } private int TipoLinea @@ -33,18 +40,18 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas set { ViewState["DTDatosGvLineasAdicionales"] = (DataTable)value; } } - private string Comprobante + private string LineaAdicionalComprobante { get { - if(ViewState["Comprobante"] == null) + if(ViewState["LineaAdicionalComprobante"] == null) { - ViewState["Comprobante"] = ""; + ViewState["LineaAdicionalComprobante"] = ""; } - return ViewState["Comprobante"].ToString(); + return ViewState["LineaAdicionalComprobante"].ToString(); } - set { ViewState["Comprobante"] = value; } + set { ViewState["LineaAdicionalComprobante"] = value; } } #endregion @@ -135,9 +142,10 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas protected void LnkCargarComprobante_Click(object sender, EventArgs e) { GridViewRow GvRow = (GridViewRow) ((LinkButton) sender).NamingContainer; - + CveLineaAdicional = GvRow.DataKey("CveLineaAdicional").ToString().ToEntero(); - Comprobante = GvRow.DataKey("Comprobante").ToString(); + CveVenta = GvRow.DataKey("CveVenta").ToString().ToEntero(); + LineaAdicionalComprobante = GvRow.DataKey("LineaAdicionalComprobante").ToString(); RegistraScript("$('#ModalComprobante').modal('show');",""); } @@ -167,9 +175,9 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas } //borrar archivo anterior - if((!errorCargaComprobante) && Comprobante.Length > 0) + if((!errorCargaComprobante) && LineaAdicionalComprobante.Length > 0) { - FileInfo fiAnterior = new FileInfo($@"{df.FullName}{Comprobante}"); + FileInfo fiAnterior = new FileInfo($@"{df.FullName}{LineaAdicionalComprobante}"); if (fiAnterior.Exists) { try @@ -204,12 +212,12 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas try { - if (File.Exists($@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}")) + if (File.Exists($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}")) { - File.Delete($@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}"); + File.Delete($@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"); } - File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveLineaAdicional}{fiNuevo.Extension}"); + File.Move(fiNuevo.FullName, $@"{df.FullName}\{CveVenta}{fiNuevo.Extension}"); errorCargaComprobante = false; } catch @@ -220,7 +228,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas if (!errorCargaComprobante) { ClsVentas objVentas = new ClsVentas(); - if (!objVentas.UpdateLineasAdicionales(CveLineaAdicional, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, UsuarioActual.CveEmpresa, Comprobante: $@"{CveLineaAdicional}{fiNuevo.Extension}")) + if (!objVentas.UpdateLineasAdicionales(CveLineaAdicional, "-1", -1, -1, -1, -1, -1, MinFecha, 100, -1, UsuarioActual.CveEmpresa, LineaAdicionalComprobante: $@"{CveVenta}{fiNuevo.Extension}",CveVenta:CveVenta)) { errorCargaComprobante = true; } @@ -287,9 +295,9 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas e.Row.FCLinkButton("LnkCargarComprobante").Visible = false; } - if (e.Row.DataKey("Comprobante").Length > 0) + if (e.Row.DataKey("LineaAdicionalComprobante").Length > 0 && e.Row.DataKey("CveVenta").ToEntero() > 0 ) { - FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("Comprobante")}"); + FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{e.Row.DataKey("LineaAdicionalComprobante")}"); LinkButton LnkDescargaComprobante = e.Row.FCLinkButton("LnkDescargaComprobante"); if (fi.Exists) @@ -304,7 +312,7 @@ public partial class Ventas_RepLineasAdicionales : ClsPaginas protected void LnkDescargaComprobante_Click(object sender, EventArgs e) { GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer; - string Comprobante = GvRow.DataKey("Comprobante"); + string Comprobante = GvRow.DataKey("LineaAdicionalComprobante"); FileInfo fi = new FileInfo($@"{UsuarioActual.Empresa.Ruta}\LineasAdicionales\{Comprobante}"); if (fi.Exists)