From 1c0ed51f534519151e3ef9bebadb6eacaafd2e8f Mon Sep 17 00:00:00 2001 From: JORGE LUIS CAUDILLO ESPARZA Date: Wed, 10 Jan 2024 00:07:37 -0700 Subject: [PATCH 1/5] ventas manifiesto --- App_Code/ClsVentas.vb | 19 +++++++++++++++++++ Ventas/Ventas.aspx.vb | 9 +++++++-- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 08e1b50ed..793ee709c 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -217,6 +217,25 @@ Public Class ClsVentas End Try Return retorno End Function + Public Function CGame_ManifiestoUpvta(cveVenta As Int32, cveUsuario As Int32, cveEmpresa As Int32, CveManifiesto As Int32) As Boolean + Dim retorno As Boolean = False + DataAdapter("PA_CGame_ManifiestoUpvta", CommandType.StoredProcedure) + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = cveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = cveEmpresa + .Add("@CveManifiesto", SqlDbType.Int).Value = CveManifiesto + .Add("@CveUsuario", SqlDbType.Int).Value = cveUsuario + End With + + Try + SqlAdapter.Fill(Data) + retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar venta manifiesto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return retorno + End Function + Public Function GetVentaTerminal(CveVentaTerminal As Integer, Fecha As DateTime, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_VentasGetTerminal") diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 5a7f08614..06355686c 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2678,8 +2678,7 @@ Partial Class Ventas Using ObjVentas As New ClsCGame() If ObjVentas.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then - 'DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString()) - DdlSubProyectoDatos.SelectedValueExist("12629") + DdlSubProyectoDatos.SelectedValueExist(ObjVentas.DtResultados.Rows(0)("CveSubProyecto").ToString()) End If If ObjVentas.ManifiestoForVtaGet(UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario, Request("CveManifiesto").ToEntero()) Then @@ -10106,6 +10105,12 @@ Partial Class Ventas If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then + End If + End If + If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then + + If ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then + End If End If Catch ex As Exception From d9837f08bc177d7c53b0365d8f5b3d92a412f667 Mon Sep 17 00:00:00 2001 From: AbrahamCastilloV Date: Wed, 10 Jan 2024 09:45:52 -0700 Subject: [PATCH 2/5] =?UTF-8?q?--Cambios=20para=20adaptar=20a=20la=20nueva?= =?UTF-8?q?=20BD=20RMF.=20Tanto=20m=C3=A9todos,=20PA=20y=20contenidos=20de?= =?UTF-8?q?=20las=20tablas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App_Code/ClsDestinos.vb | 152 ------------------ App_Code/ClsPaginas.vb | 6 +- App_Code/ClsTransportes.vb | 8 +- Transportes/Boletos.aspx | 4 +- Transportes/Boletos.aspx.vb | 2 +- .../{ListadoBoletos.aspx => RepBoletos.aspx} | 8 +- ...tadoBoletos.aspx.vb => RepBoletos.aspx.vb} | 2 +- ...istadoContratos.aspx => RepContratos.aspx} | 10 +- ...Contratos.aspx.vb => RepContratos.aspx.vb} | 0 .../{ListadoViajes.aspx => RepViajes.aspx} | 6 +- ...istadoViajes.aspx.vb => RepViajes.aspx.vb} | 8 +- 11 files changed, 28 insertions(+), 178 deletions(-) delete mode 100644 App_Code/ClsDestinos.vb rename Transportes/{ListadoBoletos.aspx => RepBoletos.aspx} (97%) rename Transportes/{ListadoBoletos.aspx.vb => RepBoletos.aspx.vb} (98%) rename Transportes/{ListadoContratos.aspx => RepContratos.aspx} (99%) rename Transportes/{ListadoContratos.aspx.vb => RepContratos.aspx.vb} (100%) rename Transportes/{ListadoViajes.aspx => RepViajes.aspx} (99%) rename Transportes/{ListadoViajes.aspx.vb => RepViajes.aspx.vb} (97%) diff --git a/App_Code/ClsDestinos.vb b/App_Code/ClsDestinos.vb deleted file mode 100644 index ffca8e5a6..000000000 --- a/App_Code/ClsDestinos.vb +++ /dev/null @@ -1,152 +0,0 @@ -Imports System.Data -Imports System.Data.SqlClient -Imports Extensiones - -Public Class ClsDestinos - Implements IDisposable - -#Region "Campos" - 'SQL - Private SqlConexion As SqlConnection - Private SqlAdapter As SqlDataAdapter - Private SqlCommand As SqlCommand - Private SqlTransacc As SqlTransaction - Private Data As DataTable - Private DSet As New DataSet - - Private disposedValue As Boolean = False ' Para detectar llamadas redundantes - 'REGISTRAR CONEXIÓN - Private CveConexion As Integer = 0 - Public ReadOnly Property DtResultados() As DataTable - Get - DtResultados = Data - End Get - End Property - -#End Region - -#Region "Propiedades" - Public Property CveDestino As Integer - Public Property CveUsuario As Integer - Public Property CveEmpresa As Integer - Public Property Destino As String - Public Property Estatus As Boolean - Public Property EsNacional As Boolean - Public Property FechaIng As DateTime -#End Region - -#Region "Funciones básicas" - Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing) - - If TransaccionCompartida Is Nothing Then - SqlConexion = New SqlConnection - SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString - Try - SqlConexion.Open() - Catch ex As Exception - OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) - End Try - Else - SqlConexion = TransaccionCompartida.Connection - SqlTransacc = TransaccionCompartida - End If - - SqlAdapter = New SqlDataAdapter("", SqlConexion) - ConexionAdd() - End Sub - Private Sub DataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure) - With SqlAdapter.SelectCommand - .Parameters.Clear() - .CommandText = StrSQL - .CommandType = TipoComando - End With - If Not SqlTransacc Is Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc - Data = New DataTable - End Sub -#Region "Conexiones" - - Private Sub ConexionAdd() - If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then - Try - DataAdapter("PA_Sis_RegistrarConexion") - With SqlAdapter.SelectCommand.Parameters - .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name - .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) - .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output - End With - SqlAdapter.Fill(Data) - CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - - End If - End Sub - - Private Sub ConexionClose() - If CveConexion > 0 AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then - - DataAdapter(String.Format("UPDATE Sis_Conexiones SET FechaCierre = GETDATE() WHERE CveConexion = {0}", CveConexion), CommandType.Text) - - Try - SqlAdapter.Fill(Data) - - Catch ex As Exception - OnError("Ocurrió un error registrar la conexión.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - CveConexion = 0 - End If - - End Sub -#End Region - Public Function IniciaTransacSQL() As SqlTransaction - If SqlTransacc Is Nothing Then SqlTransacc = SqlConexion.BeginTransaction() - Return SqlTransacc - End Function - Public Sub RollBack() - SqlTransacc.Rollback() - End Sub - Public Sub Commit() - SqlTransacc.Commit() - End Sub - Protected Overridable Sub Dispose(ByVal disposing As Boolean) - If Not disposedValue Then - If disposing Then - If Not Data Is Nothing Then Data.Dispose() : Data = Nothing - If Not DSet Is Nothing Then DSet.Dispose() : DSet = Nothing - If Not SqlAdapter Is Nothing Then SqlAdapter.Dispose() : SqlAdapter = Nothing - If Not SqlCommand Is Nothing Then SqlCommand.Dispose() : SqlCommand = Nothing - If Not SqlTransacc Is Nothing Then SqlTransacc.Dispose() : SqlTransacc = Nothing - If SqlConexion.State <> ConnectionState.Closed Then SqlConexion.Close() - If Not SqlConexion Is Nothing Then SqlConexion.Dispose() : SqlConexion = Nothing - - End If - End If - disposedValue = True - End Sub - Public Sub Dispose() Implements IDisposable.Dispose - ConexionClose() - Dispose(True) - GC.SuppressFinalize(Me) - End Sub -#End Region - Public Function GetDestinos(Optional CveRuta As Integer = 0) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Trans_DestinosGet") - If CveRuta <> 0 Then - With SqlAdapter.SelectCommand.Parameters - .Add("@CveRuta", SqlDbType.Int).Value = CveRuta - End With - End If - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al obtener los destino.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End Try - - Return Retorno - End Function - -End Class diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 4574ac667..64be87ff7 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -9621,9 +9621,9 @@ Public Class ClsPaginas #End Region #Region "Transportes" - PaginaDict.Add("/Transportes/ListadoContratos.aspx".ToUpper(), 598) - PaginaDict.Add("/Transportes/ListadoViajes.aspx".ToUpper(), 599) - PaginaDict.Add("/Transportes/ListadoBoletos.aspx".ToUpper(), 600) + PaginaDict.Add("/Transportes/RepContratos.aspx".ToUpper(), 598) + PaginaDict.Add("/Transportes/RepViajes.aspx".ToUpper(), 599) + PaginaDict.Add("/Transportes/RepBoletos.aspx".ToUpper(), 600) PaginaDict.Add("/Transportes/Boletos.aspx".ToUpper(), 601) #End Region 'Antes de aquí. diff --git a/App_Code/ClsTransportes.vb b/App_Code/ClsTransportes.vb index 6705d9007..061c528a7 100644 --- a/App_Code/ClsTransportes.vb +++ b/App_Code/ClsTransportes.vb @@ -241,7 +241,7 @@ Public Class ClsTransportes #End Region #Region "Boletos" - Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer) As Integer + Public Function AddViajesPasajeros(CveViaje As Integer, CveDestinoOrigen As Integer, CveDestinoFinal As Integer, Importe As Decimal, Asiento As Integer, Nombre As String, Visa As String, Celular As String, Sexo As Boolean, Observacion As String, CveUsuario As Integer, CveVendedor As Integer) As Integer Dim Retorno As Integer = -1 DataAdapter("PA_Trans_ViajesPasajerosAdd") @@ -259,6 +259,7 @@ Public Class ClsTransportes .Add("@Sexo", SqlDbType.Bit).Value = Sexo .Add("@Observacion", SqlDbType.VarChar).Value = Observacion .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor End With @@ -299,7 +300,7 @@ Public Class ClsTransportes Public Function UpdateViajesPasajeros(CveViajePasajero As Integer, Optional Estatus As Boolean = True, Optional Activar As Boolean = False) As Boolean Dim Retorno As Boolean = False - DataAdapter("PA_Trans_ViajesPasajerosUpdate") + DataAdapter("PA_Trans_ViajesPasajerosUpdate") With SqlAdapter.SelectCommand.Parameters .Add("@CveViajePasajero", SqlDbType.Int).Value = CveViajePasajero .Add("@Estatus", SqlDbType.Int).Value = Estatus @@ -316,6 +317,8 @@ Public Class ClsTransportes End Function #End Region + +#Region "Destinos" Public Function GetDestinos(Optional CveRuta As Integer = 0) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Trans_DestinosGet") @@ -334,6 +337,7 @@ Public Class ClsTransportes Return Retorno End Function +#End Region #Region "Tarifas" Public Function GetDestinosTarifas(CveDestinoOrigen As Integer, CveDestinoFinal As Integer) As Boolean diff --git a/Transportes/Boletos.aspx b/Transportes/Boletos.aspx index 715652dba..a7201422a 100644 --- a/Transportes/Boletos.aspx +++ b/Transportes/Boletos.aspx @@ -67,14 +67,14 @@ - +<%--
  • Viajes
  • -
    +
    --%> diff --git a/Transportes/Boletos.aspx.vb b/Transportes/Boletos.aspx.vb index cb4840b0e..8958a0446 100644 --- a/Transportes/Boletos.aspx.vb +++ b/Transportes/Boletos.aspx.vb @@ -154,7 +154,7 @@ Partial Class Boletos Try AsientoSeleccionado = AsientoSeleccionado.Replace("A", "") - Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario) + Dim retorno As Integer = ObjTransporte.AddViajesPasajeros(CveViaje, DdlPartida.SelectedValue.ToEntero, DdlDestino.SelectedValue.ToEntero, Importe, AsientoSeleccionado.ToEntero, TxtNombre.Text, TxtVisa.Text, TxtCelular.Text, CBool(RblSexo.SelectedValue), TxtObservaciones.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If retorno > 1 Then ObjTransporte.Commit() diff --git a/Transportes/ListadoBoletos.aspx b/Transportes/RepBoletos.aspx similarity index 97% rename from Transportes/ListadoBoletos.aspx rename to Transportes/RepBoletos.aspx index f178089be..a8ad845e8 100644 --- a/Transportes/ListadoBoletos.aspx +++ b/Transportes/RepBoletos.aspx @@ -1,5 +1,5 @@ <%@ Page Language="VB" Title="Transportes V&A - Boletos" AutoEventWireup="false" - MasterPageFile="~/Site.master" CodeFile="ListadoBoletos.aspx.vb" + MasterPageFile="~/Site.master" CodeFile="RepBoletos.aspx.vb" Inherits="ListadoBoletos" EnableEventValidation="true" %> @@ -14,9 +14,9 @@ - +<%-- - +--%>
    @@ -107,8 +107,6 @@
    - -
    diff --git a/Transportes/ListadoBoletos.aspx.vb b/Transportes/RepBoletos.aspx.vb similarity index 98% rename from Transportes/ListadoBoletos.aspx.vb rename to Transportes/RepBoletos.aspx.vb index 24a41e814..5c6020137 100644 --- a/Transportes/ListadoBoletos.aspx.vb +++ b/Transportes/RepBoletos.aspx.vb @@ -28,7 +28,7 @@ Partial Class ListadoBoletos Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not IsPostBack Then If Request.QueryString("CveViaje") Is Nothing Then - Response.Redirect("/Transportes/ListadoViajes.aspx") + Response.Redirect("/Transportes/RepViajes.aspx") End If CveViaje = Request.QueryString("CveViaje").ToEntero Ruta = Request.QueryString("Ruta") diff --git a/Transportes/ListadoContratos.aspx b/Transportes/RepContratos.aspx similarity index 99% rename from Transportes/ListadoContratos.aspx rename to Transportes/RepContratos.aspx index 9f37b10b0..49169da2a 100644 --- a/Transportes/ListadoContratos.aspx +++ b/Transportes/RepContratos.aspx @@ -1,5 +1,5 @@ <%@ Page Language="VB" AutoEventWireup="false" Title="Transportes V&A - Contratos" MasterPageFile="~/Site.master" - CodeFile="ListadoContratos.aspx.vb" + CodeFile="RepContratos.aspx.vb" Inherits="ListadoContratos" %> @@ -38,14 +38,14 @@
  • Agregar Contrato
  • -
  • - + Contratos
  • - Viajes -
  • + --%> diff --git a/Transportes/ListadoContratos.aspx.vb b/Transportes/RepContratos.aspx.vb similarity index 100% rename from Transportes/ListadoContratos.aspx.vb rename to Transportes/RepContratos.aspx.vb diff --git a/Transportes/ListadoViajes.aspx b/Transportes/RepViajes.aspx similarity index 99% rename from Transportes/ListadoViajes.aspx rename to Transportes/RepViajes.aspx index 791cbfd9e..45d4d170c 100644 --- a/Transportes/ListadoViajes.aspx +++ b/Transportes/RepViajes.aspx @@ -1,5 +1,5 @@ <%@ Page Language="VB" Title="Transportes V&A - Viajes" AutoEventWireup="false" MasterPageFile="~/Site.master" - CodeFile="ListadoViajes.aspx.vb" + CodeFile="RepViajes.aspx.vb" Inherits="ListadoViajes" %> @@ -27,14 +27,14 @@
  • Agregar viaje
  • -
  • +<%--
  • Contratos
  • Viajes -
  • + --%>
    diff --git a/Transportes/ListadoViajes.aspx.vb b/Transportes/RepViajes.aspx.vb similarity index 97% rename from Transportes/ListadoViajes.aspx.vb rename to Transportes/RepViajes.aspx.vb index 9a0ca63a4..980136983 100644 --- a/Transportes/ListadoViajes.aspx.vb +++ b/Transportes/RepViajes.aspx.vb @@ -1,6 +1,5 @@ Option Explicit On Option Strict On -Imports ADSNetLibrary.SIGAPI.Helpers Imports Extensiones.ModExtensiones Partial Class ListadoViajes @@ -58,7 +57,7 @@ Partial Class ListadoViajes ObjRutas.Dispose() 'Lista Destinos' - Dim ObjDestinos As New ClsDestinos() + Dim ObjDestinos As New ClsTransportes() If ObjDestinos.GetDestinos() Then If ObjDestinos.DtResultados.Rows.Count > 0 Then @@ -72,8 +71,9 @@ Partial Class ListadoViajes End If End If ObjRutas.Dispose() + 'Lista Chofer' - DdlChofer.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa) + DdlChofer.DataSource = GlobalDTRHPersonal(185) DdlChofer.DataBind() DdlChofer.Items.Insert(0, New ListItem("Seleccione Chofer", "")) @@ -256,7 +256,7 @@ Partial Class ListadoViajes Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim CveViaje As String = GvRow.DataKey("CveViaje") Dim Ruta As String = GvRow.DataKey("Ruta") - Response.Redirect(String.Format("~/Transportes/ListadoBoletos.aspx?CveViaje={0}&Ruta={1}", CveViaje, Ruta)) + Response.Redirect(String.Format("~/Transportes/RepBoletos.aspx?CveViaje={0}&Ruta={1}", CveViaje, Ruta)) End Sub End Class From 7bd9380710c273aa9b8bfe7544979cffa700747f Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 10 Jan 2024 09:56:53 -0700 Subject: [PATCH 3/5] SMS - 2024.01.08 Enviar Cvemedico y CveProcedimiento al facturar remision --- Ventas/Ventas.aspx.vb | 49 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index 6634739e2..9eb41cd72 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -13189,6 +13189,23 @@ Partial Class Ventas Dim DescripcionVenta As String = "" If TxtDescripcionVenta.Text <> "" Then DescripcionVenta = TxtDescripcionVenta.Text + + Dim CveMedico As Integer = -1 + Dim CveProcedimiento As Integer = -1 + + If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then + If SeEstaFActurandoVentaMedica Then + CveMedico = DdlMedicoObservaciones.SelectedValue.ToEntero + CveProcedimiento = DdlProcedimientoObservaciones.SelectedValue.ToEntero + Else + CveMedico = DdlMedico.SelectedValue.ToEntero + CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero + End If + End If + + + + If Not ObjVentas.AddVenta(factura.TipoDocto, factura.Folio, factura.CveCliente, factura.CveClienteSucursal, factura.SubTotalTC, factura.DescuentoTC, factura.AmortizacionTC, factura.IVATC, factura.RetIVATC, factura.RetISRTC, factura.TotalTC, factura.CveMoneda, factura.TipoCambio, factura.CveMetodoPago, factura.CondicionesPago, factura.FormaPago, factura.FechaPago, factura.Fecha, factura.MotivoDescuento, @@ -13206,7 +13223,7 @@ Partial Class Ventas Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text, FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible, CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta, - CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then + CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then ErrorList.Add("Ocurrió un error al Generar la Venta.
    Revise su factura y cualquier detalle comuníquese a Soporte Técnico") Else If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then @@ -32179,6 +32196,8 @@ Partial Class Ventas End Function Private Sub EmitirDocumentoNuevo(TipoDoctoNuevo As String) + + If DdlVendedor.SelectedValue.ToEntero() <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDoctoNuevo = "Ing" Then Alert("Debe seleccionar un vendedor.", TipoMensaje.MsgAdvertencia) Exit Sub @@ -32212,6 +32231,9 @@ Partial Class Ventas End If + If UsuarioActual.Empresa.Funcionalidad(578) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Rem" AndAlso TipoDoctoNuevo = "Ing" Then + SeEstaFActurandoVentaMedica = True + End If If GvPagos.Rows.Count = 0 And UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 And RBLPago.SelectedValue.ToEntero() = 2 Then Alert("No se puede facturar hasta que se haya especificado detalladamente la forma de pago", TipoMensaje.MsgAdvertencia) @@ -33655,6 +33677,11 @@ Partial Class Ventas DdlUsoCFDI.Enabled = True End If + If UsuarioActual.Empresa.Funcionalidad(578) = "1" Then + DdlMedicoObservaciones.Enabled = True + DdlProcedimientoObservaciones.Enabled = True + End If + If UsuarioActual.TienePermisoProceso(289) Then If LblSeTimbro.Text = "No" Then DdlUsoCFDI.Enabled = False @@ -33693,8 +33720,12 @@ Partial Class Ventas Dim ObjVentas As New ClsVentas() ObjVentas.IniciaTransacSQL() + DdlMedicoObservaciones.Enabled = True + DdlProcedimientoObservaciones.Enabled = True + If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text, - TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim) Then + TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim, + CveMedico:=DdlMedicoObservaciones.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimientoObservaciones.SelectedValue.ToEntero) Then TieneError = True End If @@ -35030,6 +35061,20 @@ Partial Class Ventas End Property + Property SeEstaFActurandoVentaMedica As Boolean + Get + If ViewState("SeEstaFActurandoVentaMedica") Is Nothing Then + ViewState("SeEstaFActurandoVentaMedica") = False + End If + + Return Boolean.Parse(ViewState("SeEstaFActurandoVentaMedica").ToString) + + End Get + Set(value As Boolean) + ViewState("SeEstaFActurandoVentaMedica") = value + End Set + End Property + From 2e7e559ea7d57094303aea76e9b489db98dbf51c Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 10 Jan 2024 10:11:45 -0700 Subject: [PATCH 4/5] =?UTF-8?q?SMS=20-=202023.12.13=20RecepcionAlmacen=20p?= =?UTF-8?q?ierde=20lote=20y=20fecha=20caducidad=20del=20Gv=20al=20cambiar?= =?UTF-8?q?=20=20almac=C3=A9n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inventarios/RecepcionAlmacen.aspx | 2 +- Inventarios/RecepcionAlmacen.aspx.vb | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Inventarios/RecepcionAlmacen.aspx b/Inventarios/RecepcionAlmacen.aspx index 1da85b76c..937f907e0 100644 --- a/Inventarios/RecepcionAlmacen.aspx +++ b/Inventarios/RecepcionAlmacen.aspx @@ -192,7 +192,7 @@
    - +
    diff --git a/Inventarios/RecepcionAlmacen.aspx.vb b/Inventarios/RecepcionAlmacen.aspx.vb index 40d70f44a..382b175f2 100644 --- a/Inventarios/RecepcionAlmacen.aspx.vb +++ b/Inventarios/RecepcionAlmacen.aspx.vb @@ -474,7 +474,7 @@ Partial Class Inventarios_RecepcionAlmacen CargaPendientes() CargaPermisos() - If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True + Dim PermisoEspecialCambioFecha As Boolean = False If UsuarioActual.CveUsuario.Contiene(100, 1937) Then PermisoEspecialCambioFecha = True @@ -591,9 +591,7 @@ Partial Class Inventarios_RecepcionAlmacen UpGenerales.Update() End Sub - Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) - RecargaporAlmacenes() - End Sub + Private Sub RecargaporAlmacenes() CveTipoAlmacen = -1 From ce121c268622cb093ff187f5aca899015b8426b4 Mon Sep 17 00:00:00 2001 From: rakcsle Date: Wed, 10 Jan 2024 12:12:37 -0700 Subject: [PATCH 5/5] Rep Ventas. personalizar Detalles Descripcion Venta --- Inventarios/RepEntradasSalidas.aspx | 2 +- Inventarios/RepEntradasSalidas.aspx.vb | 21 ++++++++++++++++++++- Ventas/RepVentaDetalle.aspx | 13 ++++++++++++- Ventas/RepVentaDetalle.aspx.vb | 7 +++++++ 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/Inventarios/RepEntradasSalidas.aspx b/Inventarios/RepEntradasSalidas.aspx index 8a60e98ab..4e6ef9959 100644 --- a/Inventarios/RepEntradasSalidas.aspx +++ b/Inventarios/RepEntradasSalidas.aspx @@ -209,7 +209,7 @@