diff --git a/App_Code/ClsCRM.vb b/App_Code/ClsCRM.vb index a07d2a7d3..2c84fb3e1 100644 --- a/App_Code/ClsCRM.vb +++ b/App_Code/ClsCRM.vb @@ -431,7 +431,8 @@ Public Class ClsCRM Return Retorno End Function - Public Function AddEmpresaCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, CveEncuestaAplicada As Integer, CveVendedor As Integer, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1") As Integer + Public Function AddEmpresaCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, CveEncuestaAplicada As Integer, CveVendedor As Integer, + Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional CveGiroClasificacion As Integer = -1) As Integer Dim CveEmpresaCRM As Integer = -1 DataAdapter("PA_CRM_EmpresaAdd") With SqlAdapter.SelectCommand.Parameters @@ -444,6 +445,7 @@ Public Class ClsCRM .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Correo", SqlDbType.VarChar).Value = Correo + .Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -456,7 +458,8 @@ Public Class ClsCRM Return CveEmpresaCRM End Function - Public Function UpdateEmpresCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresaCRM As Integer, CveVendedor As Integer, CveUsuarioMod As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1") As Boolean + Public Function UpdateEmpresCRM(NombreEmpresa As String, RFC As String, CveMedioCaptacion As Integer, CveEmpresaCRM As Integer, CveVendedor As Integer, CveUsuarioMod As Integer, + Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional Correo As String = "-1", Optional CveGiroClasificacion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_EmpresaUpdate") With SqlAdapter.SelectCommand.Parameters @@ -469,6 +472,7 @@ Public Class ClsCRM .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@Correo", SqlDbType.VarChar).Value = Correo + .Add("@CveGiroClasificaciones", SqlDbType.Int).Value = CveGiroClasificacion End With Try SqlAdapter.Fill(Data) @@ -651,7 +655,8 @@ Public Class ClsCRM Public Function GetAcercamiento(CveEmpresa As Integer, Optional CveEmpresaCRM As Integer = -1, Optional CveAcercamiento As Integer = -1, Optional CveTipoProceso As Integer = -1, Optional CveVendedor As Integer = -1, Optional FechaInicio As String = "-1", Optional FechaFin As String = "-1", Optional NombreAcercamiento As String = "-1", Optional CveMedioCaptacion As Integer = -1, Optional CveRechazoMotivo As Integer = -1, Optional CveProbabilidad As Integer = -1, - Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000) As Boolean + Optional FechaApertura As String = "-1", Optional FechaCierre As String = "-1", Optional TopSelect As Integer = 10000, Optional CvePS As Integer = -1, + Optional CveGiroClasificacion As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_AcercamientoGet") With SqlAdapter.SelectCommand.Parameters @@ -675,6 +680,9 @@ Public Class ClsCRM .Add("@FechaCierre", SqlDbType.VarChar).Value = FechaCierre .Add("@TopSelect", SqlDbType.Int).Value = TopSelect + + .Add("@CvePS", SqlDbType.Int).Value = CvePS + .Add("@CveGiroClasificacion", SqlDbType.Int).Value = CveGiroClasificacion End With Try SqlAdapter.Fill(Data) @@ -688,7 +696,7 @@ Public Class ClsCRM Public Function AddAcercamiento(CveEmpresaCRM As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer, CveRechazoMotivo As Integer, CveProbabilidadAcercamiento As Integer, FechaApertura As DateTime, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double, Prioridad As Integer, CveEmpresa As Integer, CveUsuarioIng As Integer, - Optional FechaCierre As Nullable(Of DateTime) = Nothing) As Integer + Optional FechaCierre As Nullable(Of DateTime) = Nothing, Optional CvePS As Integer = -1) As Integer Dim _CveAcercamiento As Integer = -1 DataAdapter("PA_CRM_AcercamientoAdd") @@ -714,6 +722,7 @@ Public Class ClsCRM .Add("@Prioridad", SqlDbType.Int).Value = Prioridad .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveUsuarioIng", SqlDbType.Int).Value = CveUsuarioIng + .Add("@CvePS", SqlDbType.Int).Value = CvePS .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue End With @@ -729,7 +738,7 @@ Public Class ClsCRM Public Function UpdateAcercamiento(CveAcercamiento As Integer, CveContactoPrincipal As Integer, CveTipoProceso As Integer, CveEtapaProcesoActual As Integer, CveVendedor As Integer, CveMedioCaptacion As Integer, CveProbabilidadAcercamiento As Integer, NombreAcercamiento As String, Descripcion As String, Importe As Double, Comision As Double, Prioridad As Integer, CveUsuarioMod As Integer, Optional CveRechazoMotivo As Integer = -1, Optional CveEncuestaAplicadaProceso As Integer = -1, - Optional FechaApertura As Nullable(Of DateTime) = Nothing, Optional FechaCierre As Nullable(Of DateTime) = Nothing) As Boolean + Optional FechaApertura As Nullable(Of DateTime) = Nothing, Optional FechaCierre As Nullable(Of DateTime) = Nothing, Optional CvePS As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_CRM_AcercamientoUpdate") With SqlAdapter.SelectCommand.Parameters @@ -755,6 +764,7 @@ Public Class ClsCRM .Add("@CveRechazoMotivo", SqlDbType.Int).Value = CveRechazoMotivo .Add("@FechaApertura", SqlDbType.DateTime).Value = IIf(FechaApertura Is Nothing, SqlTypes.SqlDateTime.Null, FechaApertura) .Add("@FechaCierre", SqlDbType.DateTime).Value = IIf(FechaCierre Is Nothing, SqlTypes.SqlDateTime.Null, FechaCierre) + .Add("@CvePS", SqlDbType.Int).Value = CvePS End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index d0648d098..a4b949dfd 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -2719,7 +2719,7 @@ Public Class ClsVentas Return Retorno End Function - Public Function GetRepCotizacionesSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1) As Boolean + Public Function GetRepCotizacionesSinFacturar(FechaI As Date, FechaF As Date, CveSubProyecto As String, CveCliente As Integer, CveEmpresa As Integer, Optional CveUsuarioConsulta As Integer = -1, Optional CveEstatusFactura As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_RepCotizacionesSinFacturarGet") @@ -2729,6 +2729,7 @@ Public Class ClsVentas .Add("@CveSubProyecto", SqlDbType.VarChar).Value = CveSubProyecto .Add("@CveCliente", SqlDbType.Int).Value = CveCliente .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveEstatusFactura", SqlDbType.Int).Value = CveEstatusFactura .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta End With diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index 56fce0da2..42549491e 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -2688,6 +2688,15 @@ Public Class Timbrado #Region "Timbra" If ArchivoGenerado Then + Dim opciones As String() = New String(0) {"CALCULAR_SELLO"} + Dim pade = New PADE33.PadeTimbradoServiceClient + Dim Respuesta As String = pade.timbradoPrueba("72330711-cac6-4106-8051-cbcda1aef495", "rene.molina@adssistemas.mx", "Facturacion2021#", cfdi.Xml, opciones) + ' Aumentamos el timeout de la operación + + Dim FolioFiscal As String + FolioFiscal = obtenerAtributo(Respuesta, "TimbreFiscalDigital", "UUID") 'XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText + + 'cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, UrlServicio, TimbraProduccion) 'sw.Stop() diff --git a/App_WebReferences/PADE33/Reference.svcmap b/App_WebReferences/PADE33/Reference.svcmap new file mode 100644 index 000000000..0bfba4957 --- /dev/null +++ b/App_WebReferences/PADE33/Reference.svcmap @@ -0,0 +1,32 @@ + + + + false + true + true + + false + false + false + + + true + Auto + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/Timbrado3.wsdl b/App_WebReferences/PADE33/Timbrado3.wsdl new file mode 100644 index 000000000..20ff39a6d --- /dev/null +++ b/App_WebReferences/PADE33/Timbrado3.wsdl @@ -0,0 +1,284 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/Timbrado3.xsd b/App_WebReferences/PADE33/Timbrado3.xsd new file mode 100644 index 000000000..a986a6652 --- /dev/null +++ b/App_WebReferences/PADE33/Timbrado3.xsd @@ -0,0 +1,252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/configuration.svcinfo b/App_WebReferences/PADE33/configuration.svcinfo new file mode 100644 index 000000000..34a3fd535 --- /dev/null +++ b/App_WebReferences/PADE33/configuration.svcinfo @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/App_WebReferences/PADE33/configuration91.svcinfo b/App_WebReferences/PADE33/configuration91.svcinfo new file mode 100644 index 000000000..fdf001f3e --- /dev/null +++ b/App_WebReferences/PADE33/configuration91.svcinfo @@ -0,0 +1,201 @@ + + + + + + + PadeTimbradoServicePortBinding + + + + + + + + + + + + + + + + + + + + + StrongWildcard + + + + + + 65536 + + + + + + + + + System.ServiceModel.Configuration.XmlDictionaryReaderQuotasElement + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + System.Text.UTF8Encoding + + + Buffered + + + + + + Text + + + System.ServiceModel.Configuration.BasicHttpSecurityElement + + + None + + + System.ServiceModel.Configuration.HttpTransportSecurityElement + + + None + + + None + + + System.Security.Authentication.ExtendedProtection.Configuration.ExtendedProtectionPolicyElement + + + Never + + + TransportSelected + + + (Collection) + + + + + + System.ServiceModel.Configuration.BasicHttpMessageSecurityElement + + + UserName + + + Default + + + + + + + + + http://timbrado.pade.mx:80/servicio/Timbrado3.3 + + + + + + basicHttpBinding + + + PadeTimbradoServicePortBinding + + + PADE33.PadeTimbradoService + + + System.ServiceModel.Configuration.AddressHeaderCollectionElement + + + <Header /> + + + System.ServiceModel.Configuration.IdentityElement + + + System.ServiceModel.Configuration.UserPrincipalNameElement + + + + + + System.ServiceModel.Configuration.ServicePrincipalNameElement + + + + + + System.ServiceModel.Configuration.DnsElement + + + + + + System.ServiceModel.Configuration.RsaElement + + + + + + System.ServiceModel.Configuration.CertificateElement + + + + + + System.ServiceModel.Configuration.CertificateReferenceElement + + + My + + + LocalMachine + + + FindBySubjectDistinguishedName + + + + + + False + + + PadeTimbradoServicePort + + + + + + + + + + + \ No newline at end of file diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 15833e3e0..7c6dcf10c 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1118,8 +1118,9 @@ Partial Class Bancos_IE End If + 'DATOS DE CANCELACION - If ObjIE.CveEstatusIE = 2 Then + If ObjIE.CveEstatusIE = 2 OrElse (ObjIE.CveEstatusIE = 1 AndAlso ObjIE.CveIECancelacion > 0) Then TabCancelacion.Visible = True LbUsuarioCancelacion.Text = ObjIE.UsuarioCancelacion LbFechaCancelacion.Text = ObjIE.FechaCancelacion.ToShortDateString diff --git a/CRM/Acercamiento.aspx b/CRM/Acercamiento.aspx index ef2aec956..4fac5eeab 100644 --- a/CRM/Acercamiento.aspx +++ b/CRM/Acercamiento.aspx @@ -405,12 +405,15 @@ <%-- style="padding-bottom: 17px;" --%>
- + <%----%>
- +
+ + +
diff --git a/CRM/Acercamiento.aspx.cs b/CRM/Acercamiento.aspx.cs index 3890d6dc8..30c7a064f 100644 --- a/CRM/Acercamiento.aspx.cs +++ b/CRM/Acercamiento.aspx.cs @@ -234,6 +234,18 @@ public partial class CRM_Acercamiento : ClsPaginas ViewState["CveAcercamientoGasto"] = value; } } + private int CvePS + { + get + { + return ViewState["CvePS"] == null ? -1 : ViewState["CvePS"].ToString().ToEntero(); + } + + set + { + ViewState["CvePS"] = value; + } + } #endregion protected void Page_Load(object sender, EventArgs e) @@ -269,6 +281,7 @@ public partial class CRM_Acercamiento : ClsPaginas } } } + CargarPS(); } } @@ -322,6 +335,8 @@ public partial class CRM_Acercamiento : ClsPaginas CveEncuestaAplicadaProceso = (ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() > 0) ? ObjCRM.DtResultados.FiltroPrimeroValor("CveEncuestaAplicadaProceso").ToEntero() : -1; //CveEtapaBitacoraSeleccionada = CveEtapaActual; + CvePS = ObjCRM.DtResultados.FiltroPrimeroValor("CvePS").ToEntero(); + HdfEtapaSeleccionada.Value = CveEtapaActual.ToString(); //INHABILITAMOS CAMPOS QUE NO SE PUEDEN EDITAR DdlEmpresaCRM.Enabled = false; @@ -556,6 +571,17 @@ public partial class CRM_Acercamiento : ClsPaginas if (DTEtapasProceso.FiltroPrimeroValor("CveTipoEtapa", String.Format("CveEtapaProceso = {0}", DdlEtapaProceso.SelectedValue.ToEntero())).Contiene("1", "2", "3")) GuardarCambioEtapa(); } + + private void CargarPS() + { + DdlPS.setEsWebService(true); + if(CvePS > 0) + { + string productoAsignado = get_GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CvePS: CvePS).FiltroPrimeroValor("PSCodigo"); + DdlPS.SelectedValue = CvePS.ToString(); + DdlPS.SelectedText = productoAsignado; + } + } #endregion #region "GUARDAR" @@ -605,7 +631,7 @@ public partial class CRM_Acercamiento : ClsPaginas } if ((CveEncuestaAplicadaProceso != 0) && ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento, - NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre)) + NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre, CvePS:DdlPS.SelectedValue.ToEntero())) { //String MensajeBitacora = (CveEtapaProcesoActualActualizar != CveEtapaActual) ? String.Format("Se actualizó la etapa del acercamiento a {0}.", DTEtapasProceso.FiltroPrimeroValor("EtapaProceso", "CveEtapaProceso = " + CveEtapaProcesoActualActualizar)) : String.Format("Se actualizó el Acercamiento {0} con Vendedor {2} y Contacto Principal {3}.", NombreAcercamiento, DdlTipoProceso.SelectedItem, DdlVendedor.SelectedItem, DdlContactoPrincipal.SelectedValue == "-1" ? "aun no asignado" : DdlContactoPrincipal.SelectedItem.Text); @@ -671,7 +697,7 @@ public partial class CRM_Acercamiento : ClsPaginas int CveUsuarioIng = UsuarioActual.CveUsuario; if (ObjCRM.UpdateAcercamiento(CveAcercamiento, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActualActualizar, CveVendedor, CveMedioCaptacion, CveProbabilidadAcercamiento, - NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre)) + NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveUsuario, CveEncuestaAplicadaProceso: CveEncuestaAplicadaProceso, FechaApertura: FechaApertura, FechaCierre: FechaCierre, CvePS: DdlPS.SelectedValue.ToEntero())) { CveEtapaActual = CveEtapaProcesoActualActualizar; HdfEtapaSeleccionada.Value = CveEtapaProcesoActualActualizar.ToString(); diff --git a/CRM/EmpresaCRM.aspx b/CRM/EmpresaCRM.aspx index 9ff6a1393..24e763256 100644 --- a/CRM/EmpresaCRM.aspx +++ b/CRM/EmpresaCRM.aspx @@ -109,6 +109,11 @@ +
+ + +
+ <%-- DATOS DINAMICOS - TABLA ENCUESTA --%> @@ -676,6 +681,12 @@ +
+
+ + +
+
diff --git a/CRM/EmpresaCRM.aspx.cs b/CRM/EmpresaCRM.aspx.cs index 85ff85b65..93b909e00 100644 --- a/CRM/EmpresaCRM.aspx.cs +++ b/CRM/EmpresaCRM.aspx.cs @@ -217,6 +217,19 @@ public partial class CRM_EmpresaCRM : ClsPaginas ViewState["DtProbabilidadAcercamiento"] = value; } } + + private int CveGiroClasificacion + { + get + { + return ViewState["CveGiroClasificacion"].ToString().ToEntero(); + } + + set + { + ViewState["CveGiroClasificacion"] = value; + } + } #endregion protected void Page_Load(object sender, EventArgs e) @@ -237,6 +250,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargaDatosTecnicos(); } VerificaPermisos(); + CargaClasificaciones(); + DdlPS.setEsWebService(true); } } @@ -274,7 +289,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas { string Mensaje = ""; //DATOS GENERALES - CveEmpresaCRM = ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveEncuestaAplicada, CveVendedorActualizar, CveSubProyecto, Correo); + CveEmpresaCRM = ObjCRM.AddEmpresaCRM(NombreEmpresa, RFC, CveMedioCaptacion, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, CveEncuestaAplicada, CveVendedorActualizar, CveSubProyecto, Correo, DdlGiroClasificacion.SelectedValue.ToEntero()); if (CveEmpresaCRM > 0) { @@ -321,7 +336,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas CveEncuestaAplicada = GuardaDatosTecnicos(ObjDatosTecnicos, CveEncuestaAplicada); } - if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo)) + if ((CveEncuestaAplicada != 0) && ObjCRM.UpdateEmpresCRM(NombreEmpresa, RFC, CveMedioCaptacion, CveEmpresaCRM, CveVendedorActualizar, UsuarioActual.CveUsuario, CveSubProyecto: CveSubProyecto, Correo: Correo,CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero())) { if (!ObjBitacora.AddEventoBitacora(String.Format("Se actualizó la empresa {0} con RFC {1}", NombreEmpresa, RFC), "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEmpresaCRM: CveEmpresaCRM)) { @@ -628,8 +643,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas CveVendedor = ObjCRM.DtResultados.FiltroPrimeroValor("CveVendedorAsignado").ToEntero(); CveSubProyecto = ObjCRM.DtResultados.FiltroPrimeroValor("CveSubProyecto").ToEntero(); CveCliente = ObjCRM.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero(); + CveGiroClasificacion = ObjCRM.DtResultados.FiltroPrimeroValor("CveGiroClasificacion").ToEntero(); - if(!(CveCliente > 0)) + if (!(CveCliente > 0)) { HplCrearCliente.Visible = true; HplCrearCliente.NavigateUrl = String.Format("/Ventas/Clientes.aspx?CveEmpresaCRM={0}", CveEmpresaCRM); @@ -652,6 +668,8 @@ public partial class CRM_EmpresaCRM : ClsPaginas BtnEliminarEmpresa.Enabled = false; DivBitacora.Visible = false; + + CveGiroClasificacion = -1; } ObjCRM.Dispose(); @@ -665,6 +683,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas else { CreaTempDTContactos(); + CveGiroClasificacion = -1; } DdlVendedorAsignado.SelectedValueExist(CveVendedor); @@ -1429,7 +1448,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas if (ObjCRM.DtResultados.Rows.Count > 0) { CveAcercamiento = ObjCRM.AddAcercamiento(CveEmpresaCRM, CveContactoPrincipal, CveTipoProceso, CveEtapaProcesoActual, CveVendedor, CveMedioCaptacion, CveRechazoMotivo, CveProbabilidadAcercamiento, - FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng); + FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng, CvePS:DdlPS.SelectedValue.ToEntero()); }else { Alert("No tiene 'Etapa Proceso' con el 'Proceso' seleccionado al agregar el Acercamiento",ModExtensiones.TipoMensaje.MsgAdvertencia); @@ -1487,7 +1506,9 @@ public partial class CRM_EmpresaCRM : ClsPaginas BtnEliminarEmpresa.Visible = false; if (!UsuarioActual.TienePermisoProceso(251)) + { LnkAgregarAcercamiento.Visible = false; + } if ((UsuarioActual.CveVendedor != CveVendedor)) { @@ -1545,4 +1566,13 @@ public partial class CRM_EmpresaCRM : ClsPaginas CargaMetodosCaptacion(); UpDatos.Update(); } + + private void CargaClasificaciones() + { + DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); + DdlGiroClasificacion.DataSource = dtGiroClasificaciones; + DdlGiroClasificacion.DataBind(); + DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1")); + DdlGiroClasificacion.SelectedValueExist(CveGiroClasificacion); + } } \ No newline at end of file diff --git a/CRM/RepAcercamientos.aspx b/CRM/RepAcercamientos.aspx index 7ae9adb04..7b6db4b54 100644 --- a/CRM/RepAcercamientos.aspx +++ b/CRM/RepAcercamientos.aspx @@ -20,7 +20,7 @@
- <%----%> +
@@ -54,13 +54,24 @@
+ +
+
+ +
+
+
- <%--
diff --git a/CRM/RepAcercamientos.aspx.cs b/CRM/RepAcercamientos.aspx.cs index b9443e390..579b7e035 100644 --- a/CRM/RepAcercamientos.aspx.cs +++ b/CRM/RepAcercamientos.aspx.cs @@ -5,6 +5,7 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using Extensiones; +using System.Data; public partial class CRM_RepAcercamientos : ClsPaginas { @@ -42,13 +43,13 @@ public partial class CRM_RepAcercamientos : ClsPaginas { CveVendedor = DdlVendedor.SelectedValue.ToEntero(); - if (CveVendedor > 0) + if (true) { string FechaInicio = TxtFechaInicio.Text == "" ? "-1" : TxtFechaInicio.Text; string FechaFin = TxtFechaFin.Text == "" ? "-1" : TxtFechaFin.Text; - + int CvePS = DdlPS.SelectedValue.ToEntero() == 0 ? -1 : DdlPS.SelectedValue.ToEntero(); ClsCRM ObjCRM = new ClsCRM(); - if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin)) + if (ObjCRM.GetAcercamiento(UsuarioActual.CveEmpresa, CveVendedor: CveVendedor, FechaInicio: FechaInicio, FechaFin: FechaFin, CvePS: CvePS, CveGiroClasificacion:DdlGiroClasificacion.SelectedValue.ToEntero())) { GVDatos.DataSource = ObjCRM.DtResultados; GVDatos.DataBind(); @@ -84,6 +85,12 @@ public partial class CRM_RepAcercamientos : ClsPaginas //CALCULAMOS EL INTERVALO DE LA SEMANA ACTUAL TxtFechaInicio.Text = DateTime.Now.AddDays(-((int)DateTime.Now.DayOfWeek) + 1).ToShortDateString(); //TxtFechaFin.Text = DateTime.Now.AddDays((7 - (int)DateTime.Now.DayOfWeek)).ToShortDateString(); + DdlPS.setEsWebService(true); + + DataTable dtGiroClasificaciones = get_GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa); + DdlGiroClasificacion.DataSource = dtGiroClasificaciones; + DdlGiroClasificacion.DataBind(); + DdlGiroClasificacion.Items.Insert(0, new ListItem("Seleccione", "-1")); } #endregion } \ No newline at end of file diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 20e4c0d23..28caab902 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -1837,25 +1837,25 @@ Partial Class Compras_Compras 'TmpDT.Columns.Add("IEPSPSPorcentaje") 'TmpDT.Columns.Add("IEPSPSIVAPorcentaje") SubTotalConceptos = Math.Round(TmpDT.SUM("Total"), 2).ToDecimal - AddPS2(False) + AddPS2(False) - 'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101 - Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") - For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows + 'VALIDA QUE EL XML SI VIENE CON EL CODIGO SAT 01010101 + Dim ProductosCodigoSATNoPermitidos As New StringBuilder("") + For Each drr As DataRow In TmpDT.FiltraParametros("ClaveProdServ = '01010101'").Rows - ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", drr("PS")) + ProductosCodigoSATNoPermitidos.AppendFormat("{0}
", drr("PS")) - Next + Next - If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then - Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) - Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) - - End If + If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then + Dim mensajeAdvertencia As String = String.Format("El comprobante contiene productos con código SAT '01010101', revise los productos:

{0}", ProductosCodigoSATNoPermitidos.ToString) + Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia) End If - Else + + End If + Else CargaConceptosXML(XMLDoc) End If @@ -4714,7 +4714,7 @@ Partial Class Compras_Compras ViewState("CveCompra") = ObjCompras.CveCompra If ObjCompras.DtResultados.Rows.Count > 0 Then ViewState("CompraFolio") = ObjCompras.DtResultados.Rows(0)("vFolio").ToString If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then - Devolucion = guardardevolucion(ObjInventario, ObjCompras.CveCompra, TxtSubTotal.Text.ToDouble, TxtFecha.Text.Trim.ToDate) + Devolucion = guardardevolucion(ObjInventario, ObjCompras.CveCompra, TxtSubTotal.Text.ToDecimal, TxtFecha.Text.Trim.ToDate) TieneError = Devolucion.TieneError End If @@ -7143,6 +7143,10 @@ Partial Class Compras_Compras End If End If + If CveCompraRefacturacion > 0 Then + importeMovimiento = 0 + importeMN = 0 + End If Case 59 'Documentos importeMovimiento = importeCreditos @@ -14268,7 +14272,7 @@ Partial Class Compras_Compras '*se envia true si hubo un error*' - Private Function guardardevolucion(ObjInventario As ClsInventarios, CveCompra As Integer, subtotal As Double, Fecha As Date) As MMensajeDevolucion + Private Function guardardevolucion(ObjInventario As ClsInventarios, CveCompra As Integer, subtotal As Decimal, Fecha As Date) As MMensajeDevolucion Dim ErrorMovInv As Boolean = False Dim CveAlmacen As Integer = DdlAlmacenDevolucion.SelectedValue.ToEntero() Dim subtotaldevolucion As Double = 0 @@ -14276,6 +14280,7 @@ Partial Class Compras_Compras Dim CveMovimientoEntrada As Integer = -1 'Calculo los subtotales para comparar con la NC Dim cantidad As Double = 0.0 + Dim TotalAlmacen As Decimal = 0 For Each Dr As GridViewRow In GVDevolucion.Rows 'CveAlmacen = Dr.DataKey("CveAlmacen").ToString.ToEntero @@ -14295,14 +14300,24 @@ Partial Class Compras_Compras If CveMovimientoEntrada <= 0 Then ErrorMovInv = True Else + Dim Acumulado As Decimal = 0 + Dim PU As Decimal = 0 For Each Dr As GridViewRow In GVDevolucion.Rows If Dr.FCTextBox("TxtCantidad").Text.ToDouble > 0 Then - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDouble, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, Dr.DataKey("PU").ToString.ToDecimal, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then + Acumulado += (Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal) + PU = Dr.DataKey("PU").ToString.ToDecimal + If subtotal < Acumulado Then + Dim dif As Decimal = subtotal - Acumulado + PU = (((Dr.FCTextBox("TxtCantidad").Text.ToDecimal * Dr.DataKey("PU").ToString.ToDecimal)) + dif) / Dr.FCTextBox("TxtCantidad").Text.ToDecimal + End If + + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr.FCTextBox("TxtCantidad").Text.ToDouble, Dr.DataKey("CveUM").ToString.ToEntero, Dr.DataKey("CvePS").ToString.ToEntero, PU, -1, CveMovimientoDetalleEntrada:=Dr.DataKey("CveMovimientoDetalle").ToString.ToEntero) Then ErrorMovInv = True Exit For End If End If Next + End If Else ErrorMovInv = True @@ -14364,18 +14379,18 @@ Partial Class Compras_Compras 'End Sub Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs) Try - Dim subtotaldevolucion As Double = 0 + Dim subtotaldevolucion As Decimal = 0 Dim realizadevolucion As Boolean = False 'Calculo los subtotales para comparar con la NC - Dim cantidad As Double = 0.0 + Dim cantidad As Decimal = 0 For Each Dr As GridViewRow In GVDevolucion.Rows - cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble + cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDecimal If cantidad > 0 Then realizadevolucion = True - subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad + subtotaldevolucion += Dr.DataKey("PU").ToString.ToDecimal * cantidad End If Next @@ -14409,6 +14424,7 @@ Partial Class Compras_Compras Dim IEPSCompra As Decimal = TxtIEPS.Text.ToDecimal() Dim RetIVACompra As Decimal = TxtRetIVA.Text.ToDecimal() Dim RetISRCompra As Decimal = TxtRetISR.Text.ToDecimal() + Dim Acumulado As Decimal = 0 'Dim TotalCalculable As Decimal = TotalCompra - IEPSCompra + RetIVACompra + RetISRCompra @@ -14438,6 +14454,15 @@ Partial Class Compras_Compras Dim IVA As Decimal = IVAPorcentajeCompra 'Math.Round(Total * IVAPorcentajeCompra, 2) Dim Descuento As Decimal = 0 + Acumulado += (PU * Cantidad) + + If SubTotalCompra < Acumulado Then + 'ajusta el valor + Dim dif As Decimal = SubTotalCompra - Acumulado + PU = ((PU * Cantidad) + dif) / Cantidad + Total = Cantidad * PU + End If + AddPS(Cantidad, CveUM, UM, CveClasificacion, Clasificacion, CvePS, PS, CveTipoPS, CveSubProyectoContrato, SubProyecto, Proyecto, CveProyecto, Obs, PU, Total, IVA, 0, 0, 0, 0, Descuento, -1, False) End If diff --git a/Inventarios/TraspasoAlmacen.aspx.vb b/Inventarios/TraspasoAlmacen.aspx.vb index 69e440040..28c5f2777 100644 --- a/Inventarios/TraspasoAlmacen.aspx.vb +++ b/Inventarios/TraspasoAlmacen.aspx.vb @@ -1889,10 +1889,14 @@ Partial Class Inventarios_TraspasoAlmacen Exit For End If 'MOV, Alm, Transito - If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then - ErrorMovInv = True - TextoError = "Ocurrió un error al guardar los movimientos de salida" - Exit For + If gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero > 0 Then + If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=gvr.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then + ErrorMovInv = True + TextoError = "Ocurrió un error al guardar los movimientos de salida" + Exit For + End If + Else + CveMovimientoSalidaTransitorio = 0 End If ElseIf cantidadDisponibleValidacion < 0 Then @@ -1910,16 +1914,20 @@ Partial Class Inventarios_TraspasoAlmacen Dim resultado As DataTable = ObjInventario.DtResultados Dim importe As Decimal = resultado.SUMD("Total").RoundSQL Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero + Dim tCveConcepto As Integer = 68 - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalidaTransitorio, ImporteMX:=importe, Contabilizable:=False) Then + If CveMovimientoSalidaTransitorio = 0 Then + tCveConcepto = 289 + End If + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, tCveConcepto, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalidaTransitorio, ImporteMX:=importe, Contabilizable:=False) Then ErrorMovInv = True End If If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then - ErrorMovInv = True + ErrorMovInv = True + End If End If End If - End If End If diff --git a/Ventas/Clientes.aspx b/Ventas/Clientes.aspx index 8cb66d465..3da1f0d6a 100644 --- a/Ventas/Clientes.aspx +++ b/Ventas/Clientes.aspx @@ -577,10 +577,10 @@ -
+ <%--
-
+
--%>
@@ -607,7 +607,7 @@
- +
diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index c45fbd652..981ee8b46 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1465,7 +1465,7 @@ Partial Class Clientes TxtEmailCotizacion.Text = ObjClientes.MailCotizacion TxtNotificar.Text = ObjClientes.NotificarA TxtPagina.Text = ObjClientes.Pagina - TxtGiro.Text = ObjClientes.Giro + 'TxtGiro.Text = ObjClientes.Giro DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString TxtCC.Text = ObjClientes.NotificarA ChkMail.Checked = ObjClientes.EnviarFactura @@ -2520,11 +2520,11 @@ Partial Class Clientes MetodoPago = 1 End If - + Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "") If ObjClientes.AddCliente(TxtNombre.Text.Trim, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, TxtTelefono.Text.Trim.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), - TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, TxtGiro.Text.Trim, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, + TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text.Trim, Giro, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, @@ -2617,9 +2617,9 @@ Partial Class Clientes Else NombreCliente = TxtNombre.Text.Trim() End If - + Dim Giro As String = If(DdlClasificacion.SelectedValue.ToEntero() <> -1, DdlClasificacion.SelectedItem.Text, "") If ObjClientes.UpdateCliente(NombreCliente, TxtNombreComercial.Text.Trim, TxtDireccion.Text.Trim, TxtNoExt.Text.Trim, TxtNoInt.Text.Trim, TxtColonia.Text.Trim, TxtLocalidad.Text.Trim, TxtCiudad.Text.Trim, DdlEstadoSAT.SelectedItem.Text.Trim, DdlSATPais.SelectedItem.Text.Trim, TxtRFC.Text.Trim, TxtCP.Text.Trim, - TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, TxtGiro.Text, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, + TxtTelefono.Text.Trim.Replace(" ", "").Replace("(", "").Replace(")", "").Replace("-", "").Replace("_", ""), TxtContacto.Text.Trim, TxtEmail.Text.Trim, TxtEmailCotizacion.Text.Trim, TxtNotificar.Text.Trim, TxtPagina.Text, Giro, DdlPrecioLista.SelectedValue.ToEntero, ChkMail.Checked, TxtRetIVA.Text.ToDouble, TxtRetISR.Text.ToDouble, ChkRetIVAFletesAcarreos.Checked, ChkEstado.Checked, TxtNombreCorto.Text.Trim, DdlVendedor.SelectedValue.ToEntero, TxtPlazoCobranza.Text.Trim.ToEntero, TxtPlazoCobranzaRemision.Text.Trim.ToEntero, DiasPago, DdlTipoPago.SelectedValue, DdlCtaContableClientes.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableAnticipos.SelectedValue.ToEntero, DdlCtaContableAnticipos.SelectedItem.Text, DdlCtaContableRetIVA.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableRetISR.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableFondoGarantia.SelectedValue.ToEntero, DdlCtaContableClientes.SelectedItem.Text, DdlCtaContableCompClientes.SelectedValue.ToEntero, DdlCtaContableCompClientes.SelectedItem.Text, DdlCtaContableCompAnticipos.SelectedValue.ToEntero, DdlCtaContableCompAnticipos.SelectedItem.Text, diff --git a/Ventas/RepCotizacionesxFacturar.aspx b/Ventas/RepCotizacionesxFacturar.aspx index 0d45cd200..f475fb070 100644 --- a/Ventas/RepCotizacionesxFacturar.aspx +++ b/Ventas/RepCotizacionesxFacturar.aspx @@ -171,7 +171,10 @@
- + +
+ +
<%--
diff --git a/Ventas/RepCotizacionesxFacturar.aspx.vb b/Ventas/RepCotizacionesxFacturar.aspx.vb index 8f4a49951..34059ca2e 100644 --- a/Ventas/RepCotizacionesxFacturar.aspx.vb +++ b/Ventas/RepCotizacionesxFacturar.aspx.vb @@ -74,7 +74,7 @@ Partial Class RepCotizacionesxFacturar Sucursales = IIf(DdlSubProyectos.GetSelectedValuesM = "", "-1", DdlSubProyectos.GetSelectedValuesM).ToString - If ObjVentas.GetRepCotizacionesSinFacturar(FechaI.ToDate, FechaF.ToDate, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario) Then + If ObjVentas.GetRepCotizacionesSinFacturar(FechaI.ToDate, FechaF.ToDate, Sucursales, CveCliente, UsuarioActual.CveEmpresa, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveEstatusFactura:=DdlEstatusFactura.SelectedValue.ToEntero) Then GvDatos.DataSource = ObjVentas.DtResultados DtVentas = ObjVentas.DtResultados GvDatos.DataBind() @@ -139,6 +139,14 @@ Partial Class RepCotizacionesxFacturar DdlSubProyectos.DataSource() = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1) DdlSubProyectos.DataBind() 'DdlSubProyectos.Items.Insert(0, New ListItem("Todos", "-1")) + + 'DdlEstatusFactura.DataSource = GlobalDTEstatusFactura().FiltraParametros("TipoDocto = 'Cot'") + 'DdlEstatusFactura.DataBind() + DdlEstatusFactura.Items.Add(New ListItem("Registrada", "2")) + DdlEstatusFactura.Items.Add(New ListItem("Supervisada", "8")) + DdlEstatusFactura.Items.Add(New ListItem("Cancelada", "10")) + DdlEstatusFactura.Items.Insert(0, New ListItem("Todos", "-1")) + End Sub #End Region