Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -974,7 +974,7 @@ Public Class ClsInventarios
|
||||
Retorno = SqlAdapter.SelectCommand.Parameters("@Folio").Value.ToString.ToEntero
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener los movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
OnError("Ocurrió un error al obtener los folios de movimientos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
@@ -1175,14 +1175,13 @@ Public Class ClsInventarios
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetMovimientosDetalle(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveCompra As Integer = -1, Optional CveMovimientoDetalle As Integer = -1, Optional Resumen As Boolean = False) As Boolean
|
||||
Public Function GetMovimientosDetalle(CveMovimiento As Integer, CveEmpresa As Integer, Optional CveMovimientoDetalle As Integer = -1, Optional Resumen As Boolean = False) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Inv_MovimientosDetalleGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||
.Add("@CveMovimientoDetalle", SqlDbType.Int).Value = CveMovimientoDetalle
|
||||
.Add("@Resumen", SqlDbType.Int).Value = Resumen
|
||||
|
||||
|
||||
@@ -852,15 +852,13 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer, Opcion As Integer, Optional FiltraTipoAlmacen As Boolean = False) As Boolean
|
||||
Public Function GetDetalleMateriales(CveOSDetalle As Integer, CveOS As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_OS_OrdenesServicioDetallesMaterialesGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOSDetalle", SqlDbType.Int).Value = CveOSDetalle
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@FiltraTipoAlmacen", SqlDbType.Bit).Value = FiltraTipoAlmacen
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -1328,14 +1326,14 @@ Public Class ClsOS
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetOrdenesServicioDevolucionMaterial(CveOS As Integer, CveVenta As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function GetOrdenesServicioDevolucionMaterial(CveOS As Integer, CveVenta As Integer, Opcion As Integer, CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_OrdenesServicioDevolucionMaterialGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
|
||||
|
||||
@@ -1807,6 +1807,26 @@ Public Class ClsPaginas
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property GlobalDTGralCartaPorteConfigAutoTransportes() As DataTable
|
||||
Get
|
||||
Dim AppNombre As String = "GetCartaPorteConfigAutoTransportes"
|
||||
If Application(AppNombre) Is Nothing Then
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
Application(AppNombre) = ObjGrales.DtResultados
|
||||
End If
|
||||
End Using
|
||||
End If
|
||||
GlobalDTGralCartaPorteConfigAutoTransportes = DirectCast(Application(AppNombre), DataTable)
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
Dim AppNombre As String = "GetCartaPorteConfigAutoTransportes"
|
||||
Application(AppNombre) = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Property GlobalDTAFCaracteristicasOpciones() As DataTable
|
||||
Get
|
||||
GlobalDTAFCaracteristicasOpciones = DirectCast(Application("GlobalDTAFCaracteristicasOpciones"), DataTable)
|
||||
|
||||
@@ -1976,7 +1976,7 @@ Public Class ClsVentas
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double) As Integer
|
||||
Public Function AddPrecioLista(CveUsuario As Integer, CveEmpresa As Integer, PrecioLista As String, Predeterminada As Boolean, Porcentaje As Double, Optional CvePrecioListaClonar As Integer = -1) As Integer
|
||||
Dim Retorno As Integer = -1
|
||||
|
||||
DataAdapter("PA_Vta_PrecioListaAdd")
|
||||
@@ -1987,6 +1987,7 @@ Public Class ClsVentas
|
||||
.Add("@PrecioLista", SqlDbType.VarChar).Value = PrecioLista
|
||||
.Add("@Porcentaje", SqlDbType.SmallMoney).Value = Porcentaje
|
||||
.Add("@Predeterminada", SqlDbType.Bit).Value = Predeterminada
|
||||
.Add("@CvePrecioListaClonar", SqlDbType.Int).Value = CvePrecioListaClonar
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
|
||||
@@ -3850,24 +3851,24 @@ Public Class ClsVentas
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " FLETES "
|
||||
Public Function GetFletes(CveEmpresa As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_WT_Viajes")
|
||||
'#Region " FLETES "
|
||||
' Public Function GetFletes(CveEmpresa As Integer) As Boolean
|
||||
' Dim Retorno As Boolean = False
|
||||
' DataAdapter("PA_WT_Viajes")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
End With
|
||||
' With SqlAdapter.SelectCommand.Parameters
|
||||
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
' End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex As SqlException
|
||||
Me.OnError("Ocurrió un error al intentar obtener los Fletes", Ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
#End Region
|
||||
' Try
|
||||
' SqlAdapter.Fill(Data)
|
||||
' Retorno = True
|
||||
' Catch Ex As SqlException
|
||||
' Me.OnError("Ocurrió un error al intentar obtener los Fletes", Ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
' End Try
|
||||
' Return Retorno
|
||||
' End Function
|
||||
'#End Region
|
||||
|
||||
#Region "Metodos y Forma de Pago"
|
||||
|
||||
|
||||
@@ -2153,7 +2153,8 @@ Namespace Modelos
|
||||
PedidoContrato:=factura.PedidoContrato, ObservacionesAlmacen:=factura.ObservacionesAlmacen, CveSubProyecto:=factura.CveSubProyecto, CveSubProyectoCobranza:=factura.CveSubProyectoCobranza, CveSubProyectoEjecucion:=factura.CveSubProyectoEjecucion, CveFormaPago33:=factura.CveFormaPago33,
|
||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta) Then
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta,
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -7669,6 +7670,9 @@ Namespace Modelos
|
||||
Public Property CveContratoSecciones As String = ""
|
||||
Public Property CveEstatus As Integer
|
||||
Public Property GenerarPDFFactura As Boolean = False
|
||||
Public Property CveMedico As Integer = -1
|
||||
Public Property CveProcedimiento As Integer = -1
|
||||
Public Property CveTipoVenta As Integer = -1
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -92,7 +92,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional context As HttpContext = Nothing) As Boolean
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
Dim ErrorEventos = False
|
||||
Dim ErrorEventos As Boolean = False
|
||||
Dim CveEmpresaCRM As Integer = 0
|
||||
|
||||
Dim DT_SubProyectos As New System.Data.DataTable
|
||||
@@ -100,7 +100,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||
|
||||
Dim DT_EstatusOS = New DataTable
|
||||
Dim DT_EstatusOS As New DataTable
|
||||
DT_EstatusOS.Columns.Add("", GetType(Integer))
|
||||
|
||||
|
||||
@@ -126,8 +126,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
If DtTempSubproyectos.Rows.Count > 0 Then
|
||||
For Each drow As DataRow In DtTempSubproyectos.Rows
|
||||
|
||||
|
||||
Dim Subrow = DT_SubProyectos.NewRow
|
||||
Dim Subrow As DataRow = DT_SubProyectos.NewRow
|
||||
Subrow("CveSubProyecto") = drow("CveSubProyecto").ToString.ToEntero
|
||||
Subrow("backgroundColor") = Colores(ColorIndex)
|
||||
|
||||
@@ -278,9 +277,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
'EMPIEZA METODO PARA AGREGAR CUANDO SI ES RECURRENTE
|
||||
|
||||
Dim FinRecurrencia = cevent.recurrenciafin.ToEntero
|
||||
Dim FinRecurrencia As Integer = cevent.recurrenciafin.ToEntero
|
||||
Dim FI As DateTime, FF As DateTime, FT As DateTime
|
||||
Dim DiasSemana = cevent.diassemana.Split(","c)
|
||||
Dim DiasSemana As String() = cevent.diassemana.Split(","c)
|
||||
FI = cevent.start.ToDateTime
|
||||
FF = cevent.end.ToDateTime
|
||||
|
||||
@@ -311,7 +310,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Do
|
||||
If DiasSemana.Length > 0 AndAlso DiasSemana(0) <> "" Then
|
||||
For Each drDias As String In DiasSemana
|
||||
Dim FIT = FI, FFT = FF
|
||||
Dim FIT As Date = FI, FFT As Date = FF
|
||||
|
||||
FIT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FI)).ToString.ToDouble, FI)
|
||||
FFT = DateAdd(DateInterval.Day, (drDias.ToEntero - Weekday(FF)).ToString.ToDouble, FF)
|
||||
@@ -376,9 +375,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
|
||||
cevent.Prospecto = dr("Prospecto").ToString
|
||||
|
||||
|
||||
|
||||
|
||||
'11/05/2018 - Evento Gasto Recurrente
|
||||
cevent.CveTipoEvento = dr("CveTipoEvento").ToString.ToEntero
|
||||
If cevent.CveTipoEvento = 10 Then
|
||||
@@ -415,11 +411,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Loop Until FI > FT
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
Catch ex As Exception
|
||||
GuardaLog(ex.ToString())
|
||||
|
||||
@@ -330,8 +330,8 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
If DtEmpresas IsNot Nothing Then
|
||||
For Each Row As DataRow In DtEmpresas.Rows
|
||||
Dim Usuario = ValidaUsuarioSistema(Row("CveEmpresa").ToString().ToEntero())
|
||||
Dim obj = EjecutarEnvioEstadoCuenta(Usuario, FechaEnvio, FechaActual, pCveCliente:=pCveCliente)
|
||||
Dim Usuario As Usuario = ValidaUsuarioSistema(Row("CveEmpresa").ToString().ToEntero())
|
||||
Dim obj As JObject = EjecutarEnvioEstadoCuenta(Usuario, FechaEnvio, FechaActual, pCveCliente:=pCveCliente)
|
||||
|
||||
Retorno.Add(obj)
|
||||
Next
|
||||
@@ -350,8 +350,8 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuarios(100) Then
|
||||
If ObjUsuarios.DtResultados.Rows.Count > 0 Then
|
||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
Dim Usuario As String = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia As String = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
|
||||
UsuarioActual.CveEmpresa = CveEmpresa
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
@@ -402,7 +402,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
Dim FechaF As String = "-1"
|
||||
Dim FechaVI As String = "-1"
|
||||
Dim FechaVF As String = "-1"
|
||||
Dim TCEspecifico = -1
|
||||
Dim TCEspecifico As Decimal = -1
|
||||
|
||||
Dim CveCobranzaEstatus As Integer = -1
|
||||
Dim CveClienteClasificacion As Integer = -1
|
||||
@@ -417,7 +417,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
Dim FechaCorte As DateTime = New DateTime(ClsPaginas.NowADS().Year, 12, 31)
|
||||
|
||||
If ObjMov.GetCxC(FechaI, FechaF, CveCliente, CveSubProyecto, CveVendedor, -1, -1, "-1", UsuarioActual.CveEmpresa, Grupo, -1, TipoCambio, TCEspecifico, TipoDocto, FechaVI, FechaVF, FechaCorte:=FechaCorte,
|
||||
EstatusCliente:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=-1, TipoCliente:=-1, AplicaAnticiposPagados:=AplicaAnticipos) Then
|
||||
EstatusCliente:=1, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=CveCobranzaEstatus, CveClienteClasificacion:=-1, TipoCliente:=-1 ) Then
|
||||
DTClientes = ObjMov.DtResultados.FiltraParametros("CveCliente > 0", DistinctColumns:={"CveCliente"})
|
||||
End If
|
||||
|
||||
@@ -536,7 +536,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
Dim Formato As String = "PDF"
|
||||
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.rpt", UsuarioActual.Empresa.Ruta))
|
||||
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", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
'OBTENEMOS LOS DATOS
|
||||
Dim DtCxCFact As DataTable = Nothing
|
||||
|
||||
@@ -672,7 +672,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
If DtCxCFact2 IsNot Nothing AndAlso DtCxCFact2.Rows.Count > 0 Then
|
||||
Dim dr As DataRow = DtCxCFact2.Rows(0)
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
Dim lista As New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("TipoCuentas", "Con Saldo"))
|
||||
lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre))
|
||||
@@ -714,7 +714,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
GuardaLog("Ocurrió un erro al obtener el CxC" + ex.ToString())
|
||||
End Try
|
||||
Else
|
||||
Dim lista = New List(Of CrystalParametro)
|
||||
Dim lista As New List(Of CrystalParametro)
|
||||
lista.Add(New CrystalParametro("Empresa", UsuarioActual.Empresa.Empresa))
|
||||
lista.Add(New CrystalParametro("TipoCuentas", "Con Saldo"))
|
||||
lista.Add(New CrystalParametro("NombreCliente", Cliente.Nombre))
|
||||
@@ -893,8 +893,8 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
#Region "S C O R E C A R D"
|
||||
Private Sub CargaScoreCard(ByVal context As HttpContext, pCveEmpresa As Integer, FechaEnvio As DateTime)
|
||||
Dim Usuario = ValidaUsuarioSistema(pCveEmpresa)
|
||||
Dim obj = EjecutarEnvioScoreCard(Usuario, FechaEnvio)
|
||||
Dim Usuario As Usuario = ValidaUsuarioSistema(pCveEmpresa)
|
||||
Dim obj As Boolean = EjecutarEnvioScoreCard(Usuario, FechaEnvio)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -977,7 +977,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
Dim PDFSucursales As Byte() = GenerarScoredCardDirectivo(UsuarioActual, DtGrupoSucursales)
|
||||
Dim PDFVendedores As Byte() = GenerarScoredCardDirectivo(UsuarioActual, DtGrupoVendedores)
|
||||
|
||||
For Each UsuarioEnviar In ListaDirectivos
|
||||
For Each UsuarioEnviar As MUsuarioEnviar In ListaDirectivos
|
||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||
|
||||
If UsuarioEnviar.ReporteEnviar.Empresa Then
|
||||
@@ -1028,7 +1028,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
'GERMAN LUNA
|
||||
ListaVendedores.Add(New MUsuarioEnviar(DtUsuarios.FiltroPrimero($"CveUsuario = {3354} AND CveSubProyecto > 0"), TipoUsuarioEnviar.Vendedor))
|
||||
|
||||
For Each UsuarioEnviar In ListaVendedores
|
||||
For Each UsuarioEnviar As MUsuarioEnviar In ListaVendedores
|
||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||
Dim DtReporteVendedor As DataTable = Nothing
|
||||
|
||||
@@ -1082,7 +1082,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
Protected Function GenerarScoredCard(UsuarioActual As Usuario, UsuarioEnviar As MUsuarioEnviar, DtDatos As DataTable) As Byte()
|
||||
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", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
@@ -1108,7 +1108,7 @@ Public Class TareasProgramadas : Implements IHttpHandler
|
||||
|
||||
Protected Function GenerarScoredCardDirectivo(UsuarioActual As Usuario, DtDatos As DataTable) As Byte()
|
||||
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", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
|
||||
Dim params As New List(Of ReportParameter)
|
||||
params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
|
||||
|
||||
@@ -12653,7 +12653,7 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
End If
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1, -1) Then
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
For Each drow As DataRow In ObjInventario.DtResultados.Rows
|
||||
TotalSumaPU = TotalSumaPU + drow("Total").ToString.ToDecimal
|
||||
@@ -12883,7 +12883,7 @@ Partial Class Compras_Compras
|
||||
Protected Sub BtnRefacturacionVer_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionVer.Click
|
||||
Dim Opcion As Integer = 1
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 1, 140, 172, 173, 174) Then Opcion = 2
|
||||
If UsuarioActual.CveEmpresa.Contiene(119, 1, 140, 141, 172, 173, 174) Then Opcion = 2
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ Partial Class Contratos_Presupuestos
|
||||
Protected Sub GvPresupuestos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvPresupuestos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
Dim TipoGasto = e.Row.DBCampo("TipoGasto")
|
||||
Dim TipoGasto As String = e.Row.DBCampo("TipoGasto")
|
||||
Select Case e.Row.DBCampo("TipoTotal").ToEntero
|
||||
Case 1
|
||||
e.Row.CssClass = "SubTotales"
|
||||
@@ -118,14 +118,14 @@ Partial Class Contratos_Presupuestos
|
||||
e.Row.FCTextBox("TxtImporteClasi").Visible = False
|
||||
e.Row.FCTextBox("TxtObservacion").Visible = False
|
||||
Case 3
|
||||
Dim Importe = e.Row.FCTextBox("TxtImporteClasi").Text.ToDouble
|
||||
Dim Importe As Double = e.Row.FCTextBox("TxtImporteClasi").Text.ToDouble
|
||||
e.Row.FCTextBox("TxtImporteClasi").Text = Importe.FormatoNumero()
|
||||
e.Row.FCTextBox("TxtImporteClasi").CssClass = $"form-control input-sm sumaGV txt{TipoGasto}"
|
||||
e.Row.FCTextBox("TxtImporteClasi").Attributes.Add("onKeyUp ", $"calculaTotal();calculaTotalTipoGasto('{TipoGasto}');")
|
||||
End Select
|
||||
End If
|
||||
If e.Row.RowType = DataControlRowType.Footer Then
|
||||
Dim Importe = DtClasificaciones.SUM("Importe", "CveAgrupador IS NOT NULL")
|
||||
Dim Importe As Decimal = DtClasificaciones.SUM("Importe", "CveAgrupador IS NOT NULL")
|
||||
e.Row.FCLabel("LblTotal").Text = String.Format("{0:C}", Importe)
|
||||
End If
|
||||
End Sub
|
||||
@@ -144,20 +144,20 @@ Partial Class Contratos_Presupuestos
|
||||
|
||||
If ObjContrato.DtResultados.Rows.Count = 1 Then
|
||||
|
||||
Dim DrContrato = ObjContrato.DtResultados.Copy(0)
|
||||
Dim DrContrato As DataRow = ObjContrato.DtResultados.Copy(0)
|
||||
If DrContrato IsNot Nothing Then
|
||||
|
||||
Dim ImporteOriginal = DrContrato("Importe").ToString.ToDecimal
|
||||
Dim ImporteOriginal As Decimal = DrContrato("Importe").ToString.ToDecimal
|
||||
|
||||
TxtPresupuesto.Text = DrContrato("Nombre").ToString
|
||||
TxtDescripcion.Text = DrContrato("Observacion").ToString
|
||||
|
||||
EstatusActual = DrContrato("Estatus").ToString.ToEntero
|
||||
|
||||
Dim CveProyecto = DrContrato("CveProyecto").ToString.ToEntero
|
||||
Dim CveSubProyecto = DrContrato("CveSubProyecto").ToString.ToEntero
|
||||
Dim CveProyecto As Integer = DrContrato("CveProyecto").ToString.ToEntero
|
||||
Dim CveSubProyecto As Integer = DrContrato("CveSubProyecto").ToString.ToEntero
|
||||
|
||||
Dim EstatusTexto = DrContrato("EstatusTexto").ToString
|
||||
Dim EstatusTexto As String = DrContrato("EstatusTexto").ToString
|
||||
|
||||
LtlEstatus.Text = EstatusTexto
|
||||
|
||||
@@ -180,18 +180,13 @@ Partial Class Contratos_Presupuestos
|
||||
If ObjContrato.GetPresupuestosRep(CvePresupuesto, -1, 1, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, DdlProyecto.SelectedValue.ToEntero,
|
||||
DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveUsuario, -1) Then
|
||||
If ObjContrato.DtResultados.Rows.Count > 0 Then
|
||||
Dim DrRep = ObjContrato.DtResultados.Copy(0)
|
||||
Dim Importe = DrRep("Autorizado").ToString.ToDecimal.FormatoNumero
|
||||
Dim Ejercido = DrRep("Ejercido").ToString.ToDecimal.FormatoNumero
|
||||
Dim PorEjercer = DrRep("PorEjercer").ToString.ToDecimal.FormatoNumero
|
||||
Dim DrRep As DataRow = ObjContrato.DtResultados.Copy(0)
|
||||
Dim EjercidoPorcentaje As Integer = DrRep("EjercidoPorcentaje").ToString.ToEntero
|
||||
Dim PorEjercerPorcentaje As Integer = DrRep("PorEjercerPorcentaje").ToString.ToEntero
|
||||
|
||||
|
||||
Dim EjercidoPorcentaje = DrRep("EjercidoPorcentaje").ToString.ToEntero
|
||||
Dim PorEjercerPorcentaje = DrRep("PorEjercerPorcentaje").ToString.ToEntero
|
||||
|
||||
LtlAutorizado.Text = Importe
|
||||
LtlEjercido.Text = Ejercido
|
||||
LtlPorEjercer.Text = PorEjercer
|
||||
LtlAutorizado.Text = DrRep("Autorizado").ToString.ToDecimal.FormatoNumero
|
||||
LtlEjercido.Text = DrRep("Ejercido").ToString.ToDecimal.FormatoNumero
|
||||
LtlPorEjercer.Text = DrRep("PorEjercer").ToString.ToDecimal.FormatoNumero
|
||||
|
||||
PBEjercido.Style.Remove("width")
|
||||
PBEjercido.Style.Add("width", $"{EjercidoPorcentaje.ToString}%")
|
||||
@@ -283,7 +278,7 @@ Partial Class Contratos_Presupuestos
|
||||
If ValidaDatos() Then
|
||||
If CvePresupuesto > 0 Then
|
||||
If ActualizarPresupuesto() Then
|
||||
Dim Liga = $"document.location.href=""/Contratos/CatPresupuestos.aspx"""
|
||||
Dim Liga As String = $"document.location.href=""/Contratos/CatPresupuestos.aspx"""
|
||||
|
||||
Alert("El Presupuesto se actualizo correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
Else
|
||||
@@ -301,16 +296,16 @@ Partial Class Contratos_Presupuestos
|
||||
End Sub
|
||||
Private Function ActualizarPresupuesto() As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
Dim Nombre = TxtPresupuesto.Text.Trim
|
||||
Dim Observacion = TxtDescripcion.Text.Trim
|
||||
Dim CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
Dim FechaI = TxtFechaI.Text.ToDate
|
||||
Dim FechaF = TxtFechaF.Text.ToDate
|
||||
Dim FechaIng = NowADS()
|
||||
Dim CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
Dim Archivo = ""
|
||||
Dim Estatus = 1
|
||||
Dim TieneError = False
|
||||
Dim Nombre As String = TxtPresupuesto.Text.Trim
|
||||
Dim Observacion As String = TxtDescripcion.Text.Trim
|
||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||
Dim FechaI As Date = TxtFechaI.Text.ToDate
|
||||
Dim FechaF As Date = TxtFechaF.Text.ToDate
|
||||
Dim FechaIng As DateTime = NowADS()
|
||||
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
|
||||
Dim Archivo As String = ""
|
||||
Dim Estatus As Integer = 1
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Dim ObjCont As New ClsContratos
|
||||
ObjCont.IniciaTransacSQL()
|
||||
@@ -319,10 +314,10 @@ Partial Class Contratos_Presupuestos
|
||||
|
||||
For Each GvRow As GridViewRow In GvPresupuestos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
Dim CveAgrupador = GvRow.DataKey("CveAgrupador").ToEntero
|
||||
Dim CveAgrupador As Integer = GvRow.DataKey("CveAgrupador").ToEntero
|
||||
Dim Tipo As Integer = GvRow.DataKey("Tipo").ToEntero
|
||||
|
||||
Dim CveTipoGasto = -1
|
||||
Dim CveTipoGasto As Integer = -1
|
||||
Dim CveClasificacion As Integer = -1
|
||||
Dim CveConceptoContableNom As Integer = -1
|
||||
|
||||
@@ -336,9 +331,9 @@ Partial Class Contratos_Presupuestos
|
||||
End If
|
||||
|
||||
|
||||
Dim CvePresupuestoDetalle = GvRow.DataKey("CvePresupuestoDetalle").ToEntero
|
||||
Dim Importe = GvRow.FCTextBox("TxtImporteClasi").Text.ToDecimal
|
||||
Dim Obs = GvRow.FCTextBox("TxtObservacion").Text.Trim
|
||||
Dim CvePresupuestoDetalle As Integer = GvRow.DataKey("CvePresupuestoDetalle").ToEntero
|
||||
Dim Importe As Decimal = GvRow.FCTextBox("TxtImporteClasi").Text.ToDecimal
|
||||
Dim Obs As String = GvRow.FCTextBox("TxtObservacion").Text.Trim
|
||||
|
||||
'ACTUALIZA EL REGISTRO EXISTENTE
|
||||
If CvePresupuestoDetalle > 0 Then
|
||||
@@ -373,27 +368,27 @@ Partial Class Contratos_Presupuestos
|
||||
Return Retorno
|
||||
End Function
|
||||
Private Sub AgregarPresupuesto()
|
||||
Dim Nombre = TxtPresupuesto.Text.Trim
|
||||
Dim Observacion = TxtDescripcion.Text.Trim
|
||||
Dim CveProyecto = DdlProyecto.SelectedValue.ToEntero
|
||||
Dim FechaI = TxtFechaI.Text.ToDate
|
||||
Dim FechaF = TxtFechaF.Text.ToDate
|
||||
Dim FechaIng = NowADS()
|
||||
Dim CveSubProyecto = DdlSubProyecto.SelectedValue.ToEntero
|
||||
Dim Archivo = ""
|
||||
Dim TieneError = False
|
||||
Dim Estatus = 1
|
||||
Dim Nombre As String = TxtPresupuesto.Text.Trim
|
||||
Dim Observacion As String = TxtDescripcion.Text.Trim
|
||||
Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero
|
||||
Dim FechaI As Date = TxtFechaI.Text.ToDate
|
||||
Dim FechaF As Date = TxtFechaF.Text.ToDate
|
||||
Dim FechaIng As DateTime = NowADS()
|
||||
Dim CveSubProyecto As Integer = DdlSubProyecto.SelectedValue.ToEntero
|
||||
Dim Archivo As String = ""
|
||||
Dim TieneError As Boolean = False
|
||||
Dim Estatus As Integer = 1
|
||||
|
||||
Dim ObjCont As New ClsContratos
|
||||
ObjCont.IniciaTransacSQL()
|
||||
|
||||
If ObjCont.GetContratosEstatus(UsuarioActual.CveEmpresa) Then
|
||||
|
||||
Dim CvePresupuestoNuevo = ObjCont.AddPresupuesto(Nombre, Observacion, CveSubProyecto, FechaI, FechaF, Estatus, Archivo, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
Dim CvePresupuestoNuevo As Integer = ObjCont.AddPresupuesto(Nombre, Observacion, CveSubProyecto, FechaI, FechaF, Estatus, Archivo, NowADS(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If CvePresupuestoNuevo > 0 Then
|
||||
Dim ImporteClasi = 0.0D
|
||||
Dim ObsDetalle = ""
|
||||
Dim ImporteClasi As Decimal = 0
|
||||
Dim ObsDetalle As String = ""
|
||||
|
||||
For Each GvRow As GridViewRow In GvPresupuestos.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
@@ -401,7 +396,7 @@ Partial Class Contratos_Presupuestos
|
||||
|
||||
ObsDetalle = GvRow.FCTextBox("TxtObservacion").Text.Trim
|
||||
|
||||
Dim CveAgrupador = GvRow.DataKey("CveAgrupador").ToEntero
|
||||
Dim CveAgrupador As Integer = GvRow.DataKey("CveAgrupador").ToEntero
|
||||
Dim Tipo As Integer = GvRow.DataKey("Tipo").ToEntero
|
||||
|
||||
Dim CveClasificacion As Integer = -1
|
||||
@@ -445,7 +440,7 @@ Partial Class Contratos_Presupuestos
|
||||
Else
|
||||
ObjCont.Commit()
|
||||
ObjCont.Dispose()
|
||||
Dim Liga = $"document.location.href=""/Contratos/CatPresupuestos.aspx"""
|
||||
Dim Liga As String = $"document.location.href=""/Contratos/CatPresupuestos.aspx"""
|
||||
|
||||
Alert("Se agregó el presupuesto correctamente.", TipoMensaje.MsgInformacion, Liga)
|
||||
End If
|
||||
@@ -453,8 +448,6 @@ Partial Class Contratos_Presupuestos
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkAutorizar_Click(sender As Object, e As EventArgs) Handles LnkAutorizar.Click
|
||||
If ValidaDatos() Then
|
||||
If ActualizarPresupuesto() Then
|
||||
@@ -516,8 +509,8 @@ Partial Class Contratos_Presupuestos
|
||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||
|
||||
Dim DTExcel As New DataTable
|
||||
Dim ErrorArchivo = False
|
||||
Dim ErrorExcel = False
|
||||
Dim ErrorArchivo As Boolean = False
|
||||
Dim ErrorExcel As Boolean = False
|
||||
DTExcel = ReadExcelFile(Ruta + FileName, True)
|
||||
|
||||
If Not ErrorArchivo Then
|
||||
|
||||
@@ -664,7 +664,7 @@
|
||||
<asp:Button ID="BtnVinculaAFEdit" ClientIDMode="Static" OnClick="BtnVinculaAFEdit_Click" Style="display: none;" runat="server" />
|
||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
|
||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" EmptyDataText="Aún no hay registros."
|
||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,Lote,FechaCaducidad,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" >
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||
@@ -684,14 +684,13 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:#,##0.######}")%>'> </asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="60px"></ItemStyle>
|
||||
<ItemStyle Width="60px" HorizontalAlign="Right"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField HeaderText="Producto" ReadOnly="true" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:TemplateField HeaderText="Unidad">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbUnidad" runat="server" Text='<%# Eval("UnidadMedida")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="80px"></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Precio unitario" Visible="false">
|
||||
<EditItemTemplate>
|
||||
@@ -732,8 +731,7 @@
|
||||
<asp:Literal ID="LtCI" runat="server" Text='<%# Eval("CostoIndirecto", "{0:N2}")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<FooterTemplate>
|
||||
<b>
|
||||
<asp:Literal ID="LtTotCI" runat="server" Text=""></asp:Literal></b>
|
||||
<b><asp:Literal ID="LtTotCI" runat="server" Text=""></asp:Literal></b>
|
||||
</FooterTemplate>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField DataField="CostoIndirecto" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" Visible="false" ItemStyle-Width="63px"/>--%>
|
||||
@@ -749,24 +747,21 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LitMaq" runat="server" Text='<%# If(Eval("CodigoAF").ToString = "-1", "", Eval("CodigoAF").ToString)%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||
<ItemStyle Width="60px" />
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lbSerie" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||
<ItemStyle></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Lote" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbLote" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="90px"></ItemStyle>
|
||||
<FooterStyle ></FooterStyle>
|
||||
</asp:TemplateField>
|
||||
<%--<asp:BoundField HeaderText="Caducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false"/>--%>
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||
<asp:TemplateField HeaderText="Fecha Caducidad" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LbCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
@@ -781,13 +776,10 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="lblObservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="120px" ></ItemStyle>
|
||||
|
||||
<ItemStyle ></ItemStyle>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<EditItemTemplate>
|
||||
|
||||
<EditItemTemplate>
|
||||
<div class="row" style="max-width:80px!important">
|
||||
<div class="col-md-6">
|
||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||
@@ -795,7 +787,6 @@
|
||||
<div class="col-md-6">
|
||||
<asp:LinkButton ID="imgC" runat="server" AlternateText="Cancelar" CausesValidation="False" CommandName="Cancel" CssClass="btn btn-circle btn-sm red" Text="<i class='fa fa-times'></i>" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</EditItemTemplate>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -688,8 +688,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlConcepto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
|
||||
CargaPS()
|
||||
|
||||
' CargaDdlPaqueteria()
|
||||
@@ -701,7 +699,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TxtFechaEntrega.Text = NowADS().ToShortDateString
|
||||
TxtFechaLlegada.Text = NowADS().ToShortDateString
|
||||
|
||||
CargarCamiones()
|
||||
'CargarCamiones()
|
||||
DdlClienteCarta.setEsWebService(True)
|
||||
|
||||
End Sub
|
||||
@@ -743,15 +741,15 @@ Partial Class Inventarios_EntradasSalidas
|
||||
TrPersonal.Visible = True
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
Dim RH As New ClsRH
|
||||
'Dim RH As New ClsRH
|
||||
|
||||
If RH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
||||
dt = RH.DtResultados
|
||||
End If
|
||||
'If RH.GetPersonal(-1, UsuarioActual.CveEmpresa) Then
|
||||
' dt = RH.DtResultados
|
||||
'End If
|
||||
|
||||
RH.Dispose()
|
||||
'RH.Dispose()
|
||||
|
||||
DdlPersonal.DataSource = dt
|
||||
DdlPersonal.DataSource = GlobalDTRHPersonal(UsuarioActual.CveEmpresa)
|
||||
DdlPersonal.DataBind()
|
||||
'DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End Sub
|
||||
@@ -2988,8 +2986,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 53, 0, 0, 1, Fecha, Concepto, CveUsuario, CveEmpresa)
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
@@ -2997,7 +2997,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
If dttCostos IsNot Nothing Then
|
||||
If dttCostos IsNot Nothing AndAlso CveMovimientoSalida > 0 Then
|
||||
For Each RowInv As DataRow In dttCostos.Rows
|
||||
Dim ValorInventario As Decimal = dttCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
|
||||
@@ -3008,7 +3008,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv Then Retorno = CvePrePoliza
|
||||
|
||||
Return Retorno
|
||||
@@ -5553,7 +5552,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
Dim tCveMovtoEntrada As Integer = If(tOrigen > 0, CveMovimientoVirtual, -1)
|
||||
Dim tCveMovtoSalida As Integer = If(tOrigen > 0, -1, CveMovimientoVirtual)
|
||||
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.Replace(",", "").ToDate, "Virtual", "ES/GV", tCveMovtoSalida, tCveMovtoEntrada, DtPSVirtual.SUM("TotalCargo"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True, dttCosto, tCveSubProyecto) > 0 Then
|
||||
If Not ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.Replace(",", "").ToDate, "Virtual", "ES/GV", tCveMovtoSalida, tCveMovtoEntrada, DtPSVirtual.SUM("TotalCargo"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True, dttCosto, tCveSubProyecto) > 0 Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
@@ -5804,38 +5803,28 @@ Partial Class Inventarios_EntradasSalidas
|
||||
DdlRemolque2.SelectedValueExist(-1)
|
||||
|
||||
If DdlConfigAuto.SelectedValue.ToEntero > 0 Then
|
||||
Dim dtt As DataTable = GlobalDTGralCartaPorteConfigAutoTransportes
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
Dim Remolque As String = ObjGrales.DtResultados.FiltroPrimeroValor("Remolque", $" CveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue.ToEntero}'")
|
||||
|
||||
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
Dim Remolque As String = dtt.FiltroPrimeroValor("Remolque", $" CveConfigAutoTransporte ='{DdlConfigAuto.SelectedValue.ToEntero}'")
|
||||
If Remolque = "1" Then
|
||||
RequiereRemolque = True
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
End Using
|
||||
|
||||
If Remolque = "0, 1" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = True
|
||||
End If
|
||||
If Remolque = "0" Then
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
RequiereRemolque = False
|
||||
MostrarRemolques = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If RequiereRemolque Or MostrarRemolques Then
|
||||
If RequiereRemolque OrElse MostrarRemolques Then
|
||||
DvRemolque1.Visible = True
|
||||
End If
|
||||
|
||||
@@ -5844,8 +5833,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Else
|
||||
DvConfiguracionVeiculo.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
UpEmitirTransitorio.Update()
|
||||
End Sub
|
||||
|
||||
@@ -5911,30 +5898,14 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
DdlConfigAuto.Items.Clear()
|
||||
DdlUnidadCamion.Items.Clear()
|
||||
|
||||
Using ObjInv As New ClsInventarios
|
||||
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 1, Estatus:=1) Then
|
||||
DdlUnidadCamion.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
If ObjInv.GetCamiones(-1, UsuarioActual.CveEmpresa, 2, Estatus:=1) Then
|
||||
DdlRemolque1.DataSource = ObjInv.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
DdlUnidadCamion.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
DdlRemolque1.DataSource = GlobalDTInvCamiones(UsuarioActual.CveEmpresa)
|
||||
DdlUnidadCamion.DataBind()
|
||||
DdlUnidadCamion.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
DdlRemolque1.DataBind()
|
||||
DdlRemolque1.Items.Insert(0, New ListItem("Seleccione Uno", "-1"))
|
||||
|
||||
Using ObjGrales As New ClsGenerales
|
||||
|
||||
If ObjGrales.GetCartaPorteConfigAutoTransportes() Then
|
||||
DdlConfigAuto.DataSource = ObjGrales.DtResultados
|
||||
End If
|
||||
|
||||
End Using
|
||||
DdlConfigAuto.DataSource = GlobalDTGralCartaPorteConfigAutoTransportes
|
||||
DdlConfigAuto.DataBind()
|
||||
DdlConfigAuto.Items.Insert(0, New ListItem("Seleccione una", "-1"))
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ Partial Class OS_Asignaciones
|
||||
TmpDTOS = ObjOS.DtResultados
|
||||
End If
|
||||
|
||||
If ObjOS.GetDetalleMateriales(-1, CveOS) Then
|
||||
If ObjOS.GetDetalleMateriales(-1, CveOS, 1, False) Then
|
||||
TmpDTMaterialesOS = ObjOS.DtResultados
|
||||
End If
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<asp:LinkButton ID="ImgImprimir" runat="server"> <i class="fa fa-ad-pdf"></i> Imprimir Orden</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAccionesDevolucion" runat="server" OnClick="LnkAccionesDevolucion_Click" Visible="false"> <i class="fa fa-plus"></i> Devolución Material</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAccionesMaterialUtilizado" runat="server" OnClick="LnkAccionesMaterialUtilizado_Click" Visible="false"> <i class="fa fa-plus"></i> Material Utilizado</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
@@ -1262,24 +1262,24 @@
|
||||
<%--MODAL FINALIZAR ORDEN INICIO --%>
|
||||
|
||||
|
||||
<div id="DVModalSolicitarDevolucion" class="modal ADS fade" role="dialog">
|
||||
<div id="DivModalMaterialUtilizado" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
<asp:UpdatePanel ID="UpModalSolicitarDevolucion" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<asp:UpdatePanel ID="UpModalMaterialUtilizado" class="modal-content rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" >Solicitar Devolución</h4>
|
||||
<h4 class="modal-title" >Material Utilizado</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<asp:GridView ID="GvSolicitarDevolucion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado Historial"
|
||||
DataKeyNames="CveVentaDetalle,Cantidad,CveAlmacenActual,CvePS,CveUM,PU,CveMovimientoDetalle,Lote,Serie,FechaCaducidad,AplicaSerie,AplicaLote,AplicaCaducidad,CodigoPS"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvSolicitarDevolucion_RowDataBound">
|
||||
<asp:GridView ID="GvMaterialUtilizado" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado Historial"
|
||||
DataKeyNames="CveVentaDetalle,Cantidad,CveAlmacenActual,CvePS,CveUM,PU,CveMovimientoDetalle,Lote,Serie,FechaCaducidad,AplicaSerie,AplicaLote,AplicaCaducidad,CodigoPS,Descuento,Observaciones"
|
||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvMaterialUtilizado_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Cant.</HeaderTemplate>
|
||||
@@ -1288,7 +1288,7 @@
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Dev</HeaderTemplate>
|
||||
<HeaderTemplate>Utilizado</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtDev" runat="server" Width="50px" ></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender runat="server" FilterType="Custom" TargetControlID="TxtDev" ValidChars="123456789." />
|
||||
@@ -1300,37 +1300,22 @@
|
||||
<asp:Literal ID="LtlcodigoPS" runat="server" Text='<%# Eval("CodigoPS") %>' ></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Lote</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblLote" runat="server" Width="50px" Text='<%# Eval("Lote") %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Serie</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblSerie" runat="server" Width="50px" Text='<%# Eval("Serie") %>' ></asp:Label>
|
||||
<asp:Label ID="LblLote" runat="server" Text='<%# Eval("Lote") %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Lote</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblSerie" runat="server" Text='<%# Eval("Serie") %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Fecha Cad.</HeaderTemplate>
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblFechaCaducidad" runat="server" Width="50px" Text='<%# Eval("FechaCaducidad", "{0:dd/MM/yyyy}") %>' ></asp:Label>
|
||||
<%--<div runat="server" id="DVFechaCaducidad" visible="false">
|
||||
|
||||
<asp:TextBox ID="TxtFechaCaducidad" runat="server" Width="70px" Text='<%# Eval("FechaCaducidad") %>' ></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="METxtFechaCaducidad" runat="server" TargetControlID="TxtFechaCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CCTxtFechaCaducidad" TargetControlID="TxtFechaCaducidad" PopupButtonID="TxtFechaCaducidad" PopupPosition="BottomLeft" ></ajax:CalendarExtender>
|
||||
<asp:CompareValidator ID="CVTxtFechaCaducidad" runat="server" ControlToValidate="TxtFechaCaducidad" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Caducidad''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)."
|
||||
Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpDevolucion">
|
||||
</asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCTxtFechaCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaCaducidad" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div> --%>
|
||||
<asp:Label ID="LblFechaCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:dd/MM/yyyy}") %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -1346,8 +1331,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:LinkButton ID="LnkModalSolicitarDevolucion" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" ValidationGroup="GrpDevolucion"
|
||||
OnClick="LnkModalSolicitarDevolucion_Click" >Guardar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkModalMaterialUtilizado" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="El material definido es el correcto?" data-btn-ok-label="si" ValidationGroup="GrpDevolucion"
|
||||
OnClick="LnkModalMaterialUtilizado_Click" >Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,8 @@ Imports Extensiones
|
||||
Imports System.IO
|
||||
Imports System.Data
|
||||
Imports Telerik.Web.UI
|
||||
Imports System.Data.SqlClient
|
||||
Imports Stimulsoft.Report.StiOptions.Export
|
||||
|
||||
Partial Class OS_OrdenesServicios
|
||||
Inherits ClsPaginas
|
||||
@@ -703,8 +705,8 @@ Partial Class OS_OrdenesServicios
|
||||
CargaHistorial()
|
||||
|
||||
|
||||
If CveVenta > 0 And TipoEstatus.Contiene(1, 2, 3) Then
|
||||
LnkAccionesDevolucion.Visible = True
|
||||
If TipoEstatus.Contiene(1, 2, 3) Then
|
||||
LnkAccionesMaterialUtilizado.Visible = True
|
||||
End If
|
||||
Else
|
||||
Alert("La Orden de Servicio Solicitado no existe, por favor revise su búsqueda.", TipoMensaje.MsgAdvertencia)
|
||||
@@ -837,7 +839,7 @@ Partial Class OS_OrdenesServicios
|
||||
Private Sub CargaMaterialesDetalle(CveOsDetalle As Integer, Consecutivo As Integer, CveConsecutivoDetalle As Integer)
|
||||
Dim ObjMateriales As New ClsOS
|
||||
|
||||
If ObjMateriales.GetDetalleMateriales(CveOsDetalle, CveOS, -1) Then
|
||||
If ObjMateriales.GetDetalleMateriales(CveOsDetalle, CveOS) Then
|
||||
|
||||
For Each RowE As DataRow In ObjMateriales.DtResultados.Rows
|
||||
|
||||
@@ -868,8 +870,8 @@ Partial Class OS_OrdenesServicios
|
||||
End Sub
|
||||
Private Sub CargaMateriales()
|
||||
Dim objOS As New ClsOS
|
||||
Dim Opcion As Integer = If(DdlTipoVenta.SelectedValue.Contiene("2", "3"), 2, 1)
|
||||
If objOS.GetDetalleMateriales(-1, CveOS, Opcion, True) Then
|
||||
|
||||
If objOS.GetDetalleMateriales(-1, CveOS) Then
|
||||
GvMateriales.DataSource = objOS.DtResultados
|
||||
End If
|
||||
objOS.Dispose()
|
||||
@@ -1195,7 +1197,7 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
#Region "P E R M I S O S"
|
||||
Private Sub PermisosSegunEstatus()
|
||||
Dim TipoEstatus = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor(String.Format("TipoEstatus", "CveEstatusOrdenServicio = {0}", "CveEstatusOrdenServicio ASC", DdlEstatusOS.SelectedValue.ToEntero))
|
||||
Dim TipoEstatus As String = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor(String.Format("TipoEstatus", "CveEstatusOrdenServicio = {0}", "CveEstatusOrdenServicio ASC", DdlEstatusOS.SelectedValue.ToEntero))
|
||||
|
||||
Select Case TipoEstatus.ToEntero
|
||||
Case 1
|
||||
@@ -1261,7 +1263,7 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
Dim Errores As Boolean = False
|
||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
||||
Dim DirectorioEmpresa = UsuarioActual.Empresa.Ruta
|
||||
Dim DirectorioEmpresa As String = UsuarioActual.Empresa.Ruta
|
||||
|
||||
|
||||
If Not CveOS > 0 Then
|
||||
@@ -1357,8 +1359,7 @@ Partial Class OS_OrdenesServicios
|
||||
MensajeAlert.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/><br/>", ObjOrdenServicio.Folio))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
||||
|
||||
|
||||
Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
||||
Dim Liga As String = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
||||
|
||||
ObjOrdenServicio.Commit()
|
||||
|
||||
@@ -1606,7 +1607,7 @@ Partial Class OS_OrdenesServicios
|
||||
Protected Sub imgEstatus_Click(sender As Object, e As EventArgs)
|
||||
Dim Row As GridViewRow = DirectCast(DirectCast(sender, Control).NamingContainer, GridViewRow)
|
||||
|
||||
Dim Estatus = TmpDT(Row.RowIndex)("Estatus").ToString
|
||||
Dim Estatus As String = TmpDT(Row.RowIndex)("Estatus").ToString
|
||||
|
||||
If Estatus = "False" Then
|
||||
TmpDT.Rows(Row.RowIndex)("Estatus") = "True"
|
||||
@@ -1619,7 +1620,7 @@ Partial Class OS_OrdenesServicios
|
||||
End Sub
|
||||
Private Sub BtnAddGvDetalle_Click(sender As Object, e As EventArgs) Handles BtnAddGvDetalle.Click
|
||||
Dim ObjOS As New ClsOS
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If CveCliente > 0 Then
|
||||
If DdlPSDetalle.SelectedValue.ToEntero > 0 Then
|
||||
@@ -2975,7 +2976,7 @@ Partial Class OS_OrdenesServicios
|
||||
End Sub
|
||||
Private Sub BtnCambiarTecnico_Click(sender As Object, e As EventArgs) Handles BtnCambiarTecnico.Click
|
||||
Dim ObjOS As New ClsOS
|
||||
Dim TieneError = False
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(151).ToString = "1" Then
|
||||
If Not ObjOS.UpdateTecnicoOS(DdlTecnico.SelectedValue.ToEntero, CveOS) Then
|
||||
@@ -3040,87 +3041,56 @@ Partial Class OS_OrdenesServicios
|
||||
Alert("Orden Finalizada Correctamente", TipoMensaje.MsgInformacion, "location.reload(true);")
|
||||
RegistraScript("$('#DVModalFinalizarOrden').modal('hide');")
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAccionesDevolucion_Click(sender As Object, e As EventArgs)
|
||||
Protected Sub LnkAccionesMaterialUtilizado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LnkModalSolicitarDevolucion.Visible = True
|
||||
|
||||
GvSolicitarDevolucion.DataSource = Nothing
|
||||
LnkModalMaterialUtilizado.Visible = True
|
||||
GvMaterialUtilizado.DataSource = Nothing
|
||||
DTSolicitudDev = New DataTable
|
||||
|
||||
GvSolicitarDevolucion.Columns(3).Visible = False 'Lote
|
||||
GvSolicitarDevolucion.Columns(4).Visible = False 'Serie
|
||||
GvSolicitarDevolucion.Columns(5).Visible = False 'Fecha Caducidad
|
||||
|
||||
Dim Opcion As Integer = If(DdlTipoVenta.SelectedValue.Contiene("2", "3"), 2, 1)
|
||||
Dim ObjOS As New ClsOS
|
||||
|
||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, UsuarioActual.CveEmpresa) Then
|
||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, Opcion, UsuarioActual.CveEmpresa) Then
|
||||
DTSolicitudDev = ObjOS.DtResultados
|
||||
GvSolicitarDevolucion.DataSource = DTSolicitudDev
|
||||
GvMaterialUtilizado.DataSource = DTSolicitudDev
|
||||
GvMaterialUtilizado.Columns(3).Visible = DTSolicitudDev.MIN("Serie") <> ""
|
||||
GvMaterialUtilizado.Columns(4).Visible = DTSolicitudDev.MIN("Lote") <> ""
|
||||
GvMaterialUtilizado.Columns(5).Visible = DTSolicitudDev.MIN("FechaCaducidad") <> ""
|
||||
End If
|
||||
|
||||
GvSolicitarDevolucion.Columns(3).Visible = DTSolicitudDev.MAX("Lote").ToString.Trim().Length > 0
|
||||
GvSolicitarDevolucion.Columns(4).Visible = DTSolicitudDev.MAX("Serie").ToString.Trim().Length > 0
|
||||
GvSolicitarDevolucion.Columns(5).Visible = DTSolicitudDev.MAX("FechaCaducidad").ToString.Trim().Length > 0
|
||||
|
||||
|
||||
ObjOS.Dispose()
|
||||
GvSolicitarDevolucion.DataBind()
|
||||
GvMaterialUtilizado.DataBind()
|
||||
|
||||
Dim EsDevolucionVenta As Boolean = (DTSolicitudDev.FiltroPrimeroValor("EsDevolucionVenta", "").ToEntero > 0)
|
||||
|
||||
RegistraScript("$('#DVModalSolicitarDevolucion').modal();")
|
||||
RegistraScript("$('#DivModalMaterialUtilizado').modal();")
|
||||
|
||||
If EsDevolucionVenta Then
|
||||
Alert("Ya existe una solicitud de devolución", TipoMensaje.MsgAdvertencia)
|
||||
LnkModalSolicitarDevolucion.Visible = False
|
||||
Alert("En la orden de servicio ya se determinó el material utilizado.", TipoMensaje.MsgAdvertencia)
|
||||
LnkModalMaterialUtilizado.Visible = False
|
||||
End If
|
||||
|
||||
UpModalSolicitarDevolucion.Update()
|
||||
UpModalMaterialUtilizado.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub GvSolicitarDevolucion_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
Protected Sub GvMaterialUtilizado_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
e.Row.FCTextBox("TxtDev").Attributes.Add("onblur", String.Format("ValidarCantidad(this, {0})", e.Row.DataKey("Cantidad")))
|
||||
|
||||
'AplicaSerie, AplicaLote, AplicaCaducidad
|
||||
'If Boolean.Parse(e.Row.DataKey("AplicaSerie")) Then
|
||||
' e.Row.FCTextBox("TxtSerie").Visible = True
|
||||
'End If
|
||||
|
||||
'If Boolean.Parse(e.Row.DataKey("AplicaLote")) Then
|
||||
' e.Row.FCTextBox("TxtLote").Visible = True
|
||||
'End If
|
||||
|
||||
'If Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
|
||||
|
||||
' e.Row.FCHtmlGenericControl("DVFechaCaducidad").Visible = True
|
||||
' 'e.Row.FCTextBox("TxtFechaCaducidad").Visible = True
|
||||
' 'e.Row.FCMaskedEditExtender("METxtFechaCaducidad").Visible = True
|
||||
' 'e.Row.FCCalendarExtender("CCTxtFechaCaducidad").Visible = True
|
||||
' 'e.Row.FCCompareValidator("CVTxtFechaCaducidad").Visible = True
|
||||
' 'e.Row.FCValidatorCalloutExtender("VCTxtFechaCaducidad").Visible = True
|
||||
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkModalSolicitarDevolucion_Click(sender As Object, e As EventArgs)
|
||||
Protected Sub LnkModalMaterialUtilizado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero
|
||||
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
|
||||
Dim CveSubProyectoPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero
|
||||
|
||||
|
||||
|
||||
Dim CveAlmacenDestino As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {CveSubProyectoPedido}").ToEntero
|
||||
|
||||
If Not CveAlmacenDestino > 0 Then
|
||||
@@ -3129,130 +3099,139 @@ Partial Class OS_OrdenesServicios
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim SbErroresDev As New StringBuilder
|
||||
|
||||
For Each GvRow As GridViewRow In GvSolicitarDevolucion.Rows
|
||||
|
||||
For Each GvRow As GridViewRow In GvMaterialUtilizado.Rows
|
||||
|
||||
If GvRow.DataKey("Cantidad").ToDecimal > 0 Then
|
||||
|
||||
Dim sbTemperror As New StringBuilder
|
||||
Dim ErrorCountDev As Integer = 0
|
||||
'sbTemperror.Append($"Producto: {GvRow.DataKey("CodigoPS") } requiere: ")
|
||||
'If Boolean.Parse(GvRow.DataKey("AplicaSerie")) Then
|
||||
' If GvRow.FCTextBox("TxtSerie").Text.Trim = String.Empty Then
|
||||
' sbTemperror.Append($" Serie, ")
|
||||
' ErrorCountDev = ErrorCountDev + 1
|
||||
' End If
|
||||
'End If
|
||||
|
||||
sbTemperror.Append($"Producto: {GvRow.DataKey("CodigoPS") } requiere: ")
|
||||
|
||||
|
||||
If Boolean.Parse(GvRow.DataKey("AplicaSerie")) Then
|
||||
If GvRow.FCTextBox("TxtSerie").Text.Trim = String.Empty Then
|
||||
sbTemperror.Append($" Serie, ")
|
||||
ErrorCountDev = ErrorCountDev + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If Boolean.Parse(GvRow.DataKey("AplicaLote")) Then
|
||||
If GvRow.FCTextBox("TxtLote").Text = String.Empty Then
|
||||
sbTemperror.Append($" Lote, ")
|
||||
ErrorCountDev = ErrorCountDev + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If Boolean.Parse(GvRow.DataKey("AplicaCaducidad")) Then
|
||||
If Not IsDate(GvRow.FCTextBox("TxtFechaCaducidad").Text) Then
|
||||
sbTemperror.Append($" Fecha de caducidad")
|
||||
ErrorCountDev = ErrorCountDev + 1
|
||||
End If
|
||||
End If
|
||||
|
||||
If ErrorCountDev > 0 Then
|
||||
sbTemperror.Append($"<br/>")
|
||||
SbErroresDev.AppendLine(sbTemperror.ToString)
|
||||
End If
|
||||
'If Boolean.Parse(GvRow.DataKey("AplicaLote")) Then
|
||||
' If GvRow.FCTextBox("TxtLote").Text = String.Empty Then
|
||||
' sbTemperror.Append($" Lote, ")
|
||||
' ErrorCountDev = ErrorCountDev + 1
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'If Boolean.Parse(GvRow.DataKey("AplicaCaducidad")) Then
|
||||
' If Not IsDate(GvRow.FCTextBox("TxtFechaCaducidad").Text) Then
|
||||
' sbTemperror.Append($" Fecha de caducidad")
|
||||
' ErrorCountDev = ErrorCountDev + 1
|
||||
' End If
|
||||
'End If
|
||||
|
||||
'If ErrorCountDev > 0 Then
|
||||
' sbTemperror.Append($"<br/>")
|
||||
' SbErroresDev.AppendLine(sbTemperror.ToString)
|
||||
'End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
'If SbErroresDev.ToString.Length > 0 Then
|
||||
' Alert($"Se encontraron los siguientes errores: <br> {SbErroresDev.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
' Exit Sub
|
||||
'End If
|
||||
|
||||
If SbErroresDev.ToString.Length > 0 Then
|
||||
Alert($"Se encontraron los siguientes errores: <br> {SbErroresDev.ToString}", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
Dim PropcesoOK As Boolean = True
|
||||
Dim ProcesoOK As Boolean = True
|
||||
Dim ObjV As New ClsVentas
|
||||
ObjV.IniciaTransacSQL()
|
||||
|
||||
If Not ObjV.UpdateVentasDevolucionAlmacen(1, CveVenta) Then
|
||||
PropcesoOK = False
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
If PropcesoOK Then
|
||||
For Each GvRow As GridViewRow In GvSolicitarDevolucion.Rows
|
||||
If ProcesoOK Then
|
||||
For Each GvRow As GridViewRow In GvMaterialUtilizado.Rows
|
||||
|
||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
Dim CantidadDev As Decimal = GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||
Dim CantidadDev As Decimal = GvRow.DataKey("Cantidad").ToDecimal - GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||
|
||||
If CantidadDev > 0 Then
|
||||
If Not ObjV.UpdateVentasDetalleCantidadDevolucion(CveVentaDetalle, CantidadDev) Then
|
||||
PropcesoOK = False
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
If PropcesoOK Then
|
||||
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
Dim DtVentaDetalle As New DataTable
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
Respuesta = GeneraRemision(CveVentaPedido, ObjV.IniciaTransacSQL())
|
||||
|
||||
If Respuesta.CveVenta > 0 Then
|
||||
If ObjV.GetVentaDetalle(Respuesta.CveVenta) Then
|
||||
Dim dtClon As DataTable = ObjV.DtResultados.Copy
|
||||
dtClon.DefaultView.Sort = "CveVentaDetalle ASC"
|
||||
DtVentaDetalle = dtClon.DefaultView.ToTable()
|
||||
End If
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||
|
||||
Dim CveMovimiento As Integer = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaPedido, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino)
|
||||
Dim CveMovimiento As Integer = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino)
|
||||
Dim Folio As Integer = ObjInventario.Folio
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
|
||||
For Each GvRow As GridViewRow In GvSolicitarDevolucion.Rows
|
||||
Dim IndexMov1 As Integer = 0
|
||||
For Each GvRow As GridViewRow In GvMaterialUtilizado.Rows
|
||||
|
||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||
Dim CantidadDev As Decimal = GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||
Dim CantidadRegistro = Cantidad - CantidadDev
|
||||
Dim CantidadRegistro As Decimal = GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CveUM As Integer = GvRow.DataKey("CveUM").ToEntero
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||
Dim CveVentaDetalle As Integer = DtVentaDetalle.Rows(IndexMov1)("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||
|
||||
Dim Lote As String = GvRow.DataKey("Lote")
|
||||
Dim Serie As String = GvRow.DataKey("Serie")
|
||||
Dim Lote As String = GvRow.DataKey("Lote")
|
||||
Dim FechaCaducidad As DateTime = GvRow.DataKey("FechaCaducidad").ToDate
|
||||
|
||||
|
||||
|
||||
If CantidadRegistro > 0 Then
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadRegistro, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||
Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia)
|
||||
PropcesoOK = False
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
IndexMov1 = IndexMov1 + 1
|
||||
Next
|
||||
|
||||
If PropcesoOK Then
|
||||
If ProcesoOK Then
|
||||
|
||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaPedido, CveSubProyectoPedido, -1, CveOS:=CveOS, CveMovimientoRelacionado:=CveMovimiento)
|
||||
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, Respuesta.CveVenta, CveSubProyectoPedido, -1, CveOS:=CveOS, CveMovimientoRelacionado:=CveMovimiento)
|
||||
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Dim IndexMov2 As Integer = 0
|
||||
For Each dRow As DataRow In ObjInventario.DtResultados.Rows
|
||||
|
||||
Dim Cantidad As Decimal = dRow("Cantidad").ToString.ToDecimal
|
||||
Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero
|
||||
Dim CveUM As Integer = dRow("CveUM").ToString.ToEntero
|
||||
Dim PU As Decimal = dRow("PU").ToString.ToDecimal
|
||||
Dim CveVentaDetalle As Integer = dRow("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveVentaDetalle As Integer = DtVentaDetalle.Rows(IndexMov2)("CveVentaDetalle").ToString.ToEntero
|
||||
Dim CveMovimientoDetalle As Integer = dRow("CveMovimientoDetalle").ToString.ToEntero
|
||||
|
||||
Dim Lote As String = dRow("Lote").ToString
|
||||
@@ -3261,50 +3240,115 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||
Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia)
|
||||
PropcesoOK = False
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
|
||||
IndexMov2 = IndexMov2 + 1
|
||||
Next
|
||||
|
||||
If PropcesoOK Then
|
||||
|
||||
If ProcesoOK Then
|
||||
Dim ObjEventos As New ClsOIEventos(ObjInventario.IniciaTransacSQL)
|
||||
Dim LigaVenta As String = String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, "Material utilizado")
|
||||
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaPedido, CveOS:=CveOS) Then
|
||||
PropcesoOK = False
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=Respuesta.CveVenta, CveOS:=CveOS) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
PropcesoOK = False
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
PropcesoOK = False
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If PropcesoOK Then
|
||||
'ObjV.RollBack()
|
||||
If ProcesoOK Then
|
||||
ObjV.Commit()
|
||||
Alert("La solicitud de Devolución de Almacén se guardó correctamente")
|
||||
RegistraScript("$('#DVModalSolicitarDevolucion').modal('hide');")
|
||||
Alert("El material utilizado se guardó correctamente")
|
||||
RegistraScript("$('#DivModalMaterialUtilizado').modal('hide');")
|
||||
Else
|
||||
ObjV.RollBack()
|
||||
End If
|
||||
|
||||
|
||||
|
||||
ObjV.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GeneraRemision(CveVentaPedido As Integer, ByRef TransaccionSQL As SqlTransaction) As RespuestaFacturacion
|
||||
|
||||
Dim Respuesta As New RespuestaFacturacion()
|
||||
|
||||
Dim CveRemiocionGenerada As Integer = -1
|
||||
|
||||
Dim ObjVentas As New ClsVentas(TransaccionSQL)
|
||||
Dim ProcesoOK As Boolean = True
|
||||
|
||||
Dim CveSubProyectoPedido As Integer = -1
|
||||
Dim CveMoneda As Integer = -1
|
||||
|
||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||
Dim DbRowVenta As DataRow = ObjVentas.DtResultados.Copy().Rows(0)
|
||||
CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
|
||||
CveSubProyectoPedido = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
Dim ObjFactura As Modelos.Factura = Modelos.Factura.CrearVentaNueva(UsuarioActual, CveSubProyectoPedido, CveCliente, CveMoneda, "Rem")
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso ProcesoOK Then
|
||||
|
||||
|
||||
|
||||
ObjFactura.CveMedico = DdlMedico.SelectedValue.ToEntero
|
||||
ObjFactura.CveProcedimiento = DdlProcedimiento.SelectedValue.ToEntero
|
||||
ObjFactura.CveTipoVenta = DdlTipoVenta.SelectedValue.ToEntero
|
||||
|
||||
For Each GvRow As GridViewRow In GvMaterialUtilizado.Rows
|
||||
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||
Dim CantidadDev As Decimal = GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||
Dim CantidadRegistro As Decimal = Cantidad - CantidadDev
|
||||
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||
Dim Descuento As Decimal = GvRow.DataKey("Descuento").ToDecimal
|
||||
Dim Obs As String = GvRow.DataKey("Observaciones")
|
||||
|
||||
If Not ObjFactura.AgregarPS(CvePS, CantidadRegistro, PU, Descuento, Obs, CveSubProyecto:=CveSubProyectoPedido) Then
|
||||
Alert("Error al agregar producto", TipoMensaje.MsgAdvertencia)
|
||||
ProcesoOK = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
ObjFactura.CalculaTotales()
|
||||
Dim Resp As New Modelos.Factura.MMensajeFactura
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=TransaccionSQL)
|
||||
|
||||
If Resp.CveVenta > 0 Then
|
||||
Respuesta.CveVenta = Resp.CveVenta
|
||||
Respuesta.SerieFolio = Resp.SerieFolio
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
Return Respuesta
|
||||
|
||||
End Function
|
||||
|
||||
Friend Class RespuestaFacturacion
|
||||
Public Property CveVenta As Integer = -1
|
||||
Public Property SerieFolio As String = "-1"
|
||||
Public Sub New()
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
End Class
|
||||
@@ -1,4 +1,4 @@
|
||||
<%@ Page Title="Reporte de Ordenes de Servicio Medicas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOSMedicas.aspx.vb" Inherits="OS_RepOSMedicas" %>
|
||||
<%@ Page Title="Reporte de Ordenes de Servicio Médicas" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepOSMedicas.aspx.vb" Inherits="OS_RepOSMedicas" %>
|
||||
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Ordenes de Servicio Medicas
|
||||
Reporte de Ordenes de Servicio Médicas
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UpAcciones">
|
||||
@@ -169,11 +169,11 @@
|
||||
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveOS" DataNavigateUrlFormatString="/OS/OrdenesServicios.aspx?CveOS={0}" DataTextField="Folio" Target="_blank" />
|
||||
<%--<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-HorizontalAlign="Left" />--%>
|
||||
<%--1--%>
|
||||
<asp:BoundField DataField="FechaCita" HeaderText="Fech aCita" DataFormatString="{0:dd/MM/yyyy HH:mm}" HtmlEncode="False" />
|
||||
<asp:BoundField DataField="FechaCita" HeaderText="Fecha Cita" DataFormatString="{0:dd/MM/yyyy HH:mm}" HtmlEncode="False" />
|
||||
<%--2--%>
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--3--%>
|
||||
<asp:BoundField HeaderText="Medico" DataField="Medico" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField HeaderText="Médico" DataField="Medico" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--4--%>
|
||||
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" ItemStyle-HorizontalAlign="Left" />
|
||||
<%--5--%>
|
||||
|
||||
@@ -2,18 +2,11 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Web.Compilation
|
||||
Imports Extensiones
|
||||
Imports Microsoft.Reporting.WebForms
|
||||
Imports System.Xml.Serialization
|
||||
Imports System.IO
|
||||
Imports System.Xml
|
||||
|
||||
Partial Class OS_RepOSMedicas
|
||||
Inherits ClsPaginas
|
||||
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
|
||||
@@ -28,21 +21,15 @@ Partial Class OS_RepOSMedicas
|
||||
#Region " CARGA COMBOS "
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CargaCombos()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto)
|
||||
|
||||
|
||||
'CargaEstatus
|
||||
DdlEstatusOS.DataSource = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa)
|
||||
DdlEstatusOS.DataBind()
|
||||
DdlEstatusOS.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
|
||||
Dim DTTecnicos = New DataTable
|
||||
|
||||
Dim DTTecnicos As New DataTable
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
|
||||
If ObjUsuarios.GetPermisosPorUsuarioProcesos(-1, -1, -1, -1, 351, UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) Then
|
||||
@@ -134,7 +121,6 @@ Partial Class OS_RepOSMedicas
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
Private Sub CargaClientes()
|
||||
DdlClientes.ddl.Items.Clear()
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) '.FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
|
||||
@@ -147,8 +133,6 @@ Partial Class OS_RepOSMedicas
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " GV DATOS - ROW DATABOUND "
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -172,18 +156,9 @@ Partial Class OS_RepOSMedicas
|
||||
|
||||
GvDatos.ExportToExcelGembox("OrdenesServicio", UsuarioActual, "Ordenes de Servicio Medicas", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -402,8 +402,11 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" AppendDataBoundItems="true" DataTextField="PrecioLista" DataValueField="CvePrecioLista" CssClass="form-control select2me" Width="100%"></asp:DropDownList>
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" id="DVModalPrecioLista" visible="false">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" CausesValidation="true" AppendDataBoundItems="true" DataTextField="PrecioLista" DataValueField="CvePrecioLista" CssClass="form-control select2me" Width="100%"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlPrecioLista" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlPrecioLista"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lista de Precio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Lista de Precio:</label>
|
||||
</div>
|
||||
|
||||
@@ -449,7 +452,7 @@
|
||||
<div class="modal-footer">
|
||||
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:LinkButton ID="BtnGuardar" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||
<asp:LinkButton ID="BtnGuardar" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio" CausesValidation="true"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
@@ -92,6 +92,11 @@ Partial Class CatSubProyectos
|
||||
DivSegmentoNegocio.Visible = True
|
||||
End If
|
||||
BtnGuardar.OnClientClick = $"ValidaGuardar();"
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(404) = "20" Then
|
||||
DVModalPrecioLista.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -285,6 +290,9 @@ Partial Class CatSubProyectos
|
||||
End Sub
|
||||
Public Sub Edit_Click(sender As Object, e As EventArgs)
|
||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||
|
||||
Tab.ActiveTabIndex = 0
|
||||
|
||||
CveCentroCosto = (GvRow.DataKey("CveSubProyecto")).ToEntero
|
||||
HdnModalidad.Value = "U"
|
||||
TxtCentroCosto.Text = (GvRow.DataKey("SubProyecto"))
|
||||
|
||||
@@ -1107,6 +1107,16 @@ function FormatoNumero(Importe, Decimales) {
|
||||
}
|
||||
|
||||
|
||||
function filtraListBox(txtBusqueda, listBox) {
|
||||
|
||||
var value = txtBusqueda.value.toLowerCase();
|
||||
$(`#${listBox} option`).filter(function () {
|
||||
$(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
jQuery.fn.center = function() {
|
||||
this.css("position", "absolute");
|
||||
var widthh = $(this).width();
|
||||
|
||||
@@ -38,26 +38,91 @@
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDatos" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<asp:ListBox runat="server" ID="ListModulosDisponible" DataTextField="Padres" DataValueField="CveModulo" Height="300px" Width="450px" SelectionMode="Multiple"></asp:ListBox>
|
||||
</td>
|
||||
<td width="100px" align="center">
|
||||
|
||||
<asp:Button Text=">" runat="server" ID="BtnAdd" ToolTip="Añadir Seleccionados" OnClick="BtnAdd_Click" class="btn btn-primary" /><br />
|
||||
<br />
|
||||
<asp:Button Text="<" runat="server" ID="BtnRemove" ToolTip="Quitar Seleccionados" OnClick="BtnRemove_Click" class="btn btn-primary" /><br />
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<asp:ListBox runat="server" ID="ListModulosEmpresa" DataTextField="Padres" DataValueField="CveModulo" Height="300px" Width="450px" SelectionMode="Multiple"></asp:ListBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
|
||||
<div class="row" id="DvGeneral">
|
||||
<div class="col-md-4" id="Dv1" >
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px; max-width: 900px" align="left;">
|
||||
<input type="text" id="TxtBusquedaModulosDisponibles" class="form-control input-sm" onkeyup="<%= String.Format("filtraListBox(this,'{0}')", ListModulosDisponible.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("filtraListBox( this,'{0}')", ListModulosDisponible.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
|
||||
<asp:ListBox runat="server" ID="ListModulosDisponible" DataTextField="Padres" DataValueField="CveModulo" Height="300px" SelectionMode="Multiple" ClientIDMode="Static"></asp:ListBox>
|
||||
|
||||
</div>
|
||||
<div class="col-md-1" style="text-align:center!important;max-width:100px;vertical-align:central!important" id="Dv2">
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<asp:Button Text=">" runat="server" ID="BtnAdd" ToolTip="Añadir Seleccionados" OnClick="BtnAdd_Click" class="btn btn-primary" style="margin-left:30px" /><br />
|
||||
<br />
|
||||
<asp:Button Text="<" runat="server" ID="BtnRemove" ToolTip="Quitar Seleccionados" OnClick="BtnRemove_Click" class="btn btn-primary" style="margin-left:30px" /><br />
|
||||
|
||||
</div>
|
||||
<div class="col-md-4" id="Dv3">
|
||||
|
||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px; max-width: 900px" align="left;">
|
||||
<input type="text" id="TxtBusquedaModulosEmpresas" class="form-control input-sm" onkeyup="<%= String.Format("filtraListBox(this,'{0}')", ListModulosEmpresa.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||
<a href="javascript:;" onclick="<%= String.Format("filtraListBox( this,'{0}')", ListModulosEmpresa.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||
</div>
|
||||
<asp:ListBox runat="server" ID="ListModulosEmpresa" DataTextField="Padres" DataValueField="CveModulo" Height="300px" SelectionMode="Multiple" ClientIDMode="Static" ></asp:ListBox>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
|
||||
function fncAjustaTamaños() {
|
||||
|
||||
$(document).ready(function () {
|
||||
|
||||
let tamanio1 = parseFloat($('#ListModulosDisponible').width());
|
||||
let tamanio2 = parseFloat($('#ListModulosEmpresa').width());
|
||||
let TamanioFinal = 0.0;
|
||||
|
||||
if (tamanio1 > tamanio2) {
|
||||
TamanioFinal = tamanio1;
|
||||
} else {
|
||||
TamanioFinal = tamanio2;
|
||||
}
|
||||
|
||||
if (TamanioFinal < 300) {
|
||||
TamanioFinal = 300;
|
||||
}
|
||||
|
||||
$('#ListModulosDisponible').css('max-width', `${TamanioFinal}px`);
|
||||
$('#ListModulosEmpresa').css('max-width', `${TamanioFinal}px`);
|
||||
|
||||
$('#Dv1').css('max-width', `${TamanioFinal}px`);
|
||||
$('#Dv2').css('max-width', `100px`);
|
||||
$('#Dv3').css('max-width', `${TamanioFinal}px`);
|
||||
|
||||
$('#Dv1').css('min-width', `${TamanioFinal}px`);
|
||||
$('#Dv2').css('min-width', `100px`);
|
||||
$('#Dv3').css('min-width', `${TamanioFinal}px`);
|
||||
|
||||
$('#DvGeneral').css('max-width', `${(TamanioFinal * 2) + 100}px`);
|
||||
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
</asp:Content>
|
||||
|
||||
@@ -28,8 +28,9 @@ Partial Class Sistemas_EmpresasModulos
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
CargarEmpresa()
|
||||
|
||||
End If
|
||||
|
||||
RegistraScript("fncAjustaTamaños();")
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
@@ -1453,7 +1453,7 @@
|
||||
</tr>
|
||||
</table>
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvClasificacion" DataKeyNames="CveClasificacion" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de clasificaciones del Usuario" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
||||
<asp:GridView ID="GvClasificacion" DataKeyNames="CveClasificacion" runat="server" ShowHeader="false" AutoGenerateColumns="False" EmptyDataText="" ToolTip="Listado de clasificaciones del Usuario" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
|
||||
@@ -1556,16 +1556,12 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
If UsuarioControlado Then
|
||||
DdlProyecto.DataSource = GetProyectosSinGV(DtSubProyectosControlado.FiltraParametros($"CveEmpresa = {DdlEmpresaAsignaciones.SelectedValue}"))
|
||||
Else
|
||||
DdlProyecto.DataSource = GetProyectosSinGV(GlobalDTSubProyectos(-1, -1, DdlEmpresaAsignaciones.SelectedValue.ToEntero).FiltraParametros("", DistinctColumns:={"CveProyecto", "Proyecto"}))
|
||||
DdlProyecto.DataSource = GetProyectosSinGV(GlobalDTSubProyectos(-1, -1, DdlEmpresaAsignaciones.SelectedValue.ToEntero))
|
||||
End If
|
||||
End If
|
||||
DdlProyecto.DataBind()
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Seleccione el Proyecto", "-1"))
|
||||
|
||||
'CARGA SOLO PROYECTO (SUBRPOYECTOS)
|
||||
If DdlEmpresaAsignaciones.SelectedValue.ToEntero = 66 Then
|
||||
SoloSubProyectos()
|
||||
End If
|
||||
DdlProyecto.Items.Insert(0, New ListItem("Seleccione el Proyecto", "-1"))
|
||||
|
||||
End Sub
|
||||
Private Function GetSubProyectosSinGV() As String
|
||||
Dim SB As New StringBuilder
|
||||
|
||||
@@ -735,6 +735,9 @@
|
||||
<div class="col-md-10">
|
||||
<div runat="server" class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlPrecioLista" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="PrecioLista" DataValueField="CvePrecioLista"></asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlPrecioLista" InitialValue="-1" runat="server" CssClass="help-block errorimput" ControlToValidate="DdlPrecioLista"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Lista de Precio''</b> es necesario, por favor ingréselo."
|
||||
ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<label for="<%= DdlPrecioLista.ClientID.ToString()%>">Precio Lista:</label>
|
||||
<i></i>
|
||||
</div>
|
||||
@@ -1211,7 +1214,7 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input" id="DivAplicaProductoAlterno" runat="server">
|
||||
Aplica Producto Alterno:
|
||||
<asp:CheckBox ID="ChkProductoAlterno" Checked="true" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
<asp:CheckBox ID="ChkProductoAlterno" Checked="false" CssClass="make-switchsd" data-size="small" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Option Strict On
|
||||
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Net
|
||||
@@ -12,9 +13,9 @@ Imports Newtonsoft.Json
|
||||
Imports Newtonsoft.Json.Linq
|
||||
|
||||
Partial Class Clientes
|
||||
Inherits ClsPaginas
|
||||
|
||||
'Configuración
|
||||
Inherits ClsPaginas
|
||||
|
||||
'Configuración
|
||||
#Region "P R O P I E D A D E S"
|
||||
Private Const NumeroDecimales As Integer = 2
|
||||
Private CveVentaDeduccion As Integer
|
||||
@@ -455,13 +456,13 @@ Partial Class Clientes
|
||||
Set(value As DateTime)
|
||||
ViewState("FechaIngLineaAdicional") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Documentacion"
|
||||
Private Property DTDocumentacion As DataTable
|
||||
Get
|
||||
@@ -586,24 +587,24 @@ Partial Class Clientes
|
||||
Set(value As Integer)
|
||||
ViewState("CveVendedorOriginal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
'Private ReadOnly Property CvePersonal As Integer
|
||||
' Get
|
||||
' If ViewState("CvePersonal") Is Nothing Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return ViewState("CvePersonal").ToString().Toentero()
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
'Private ReadOnly Property CvePersonal As Integer
|
||||
' Get
|
||||
' If ViewState("CvePersonal") Is Nothing Then
|
||||
' Return -1
|
||||
' Else
|
||||
' Return ViewState("CvePersonal").ToString().Toentero()
|
||||
' End If
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#Region " A C U M U L A D O R E S"
|
||||
Property CveVentaNota As Integer
|
||||
Get
|
||||
@@ -643,10 +644,23 @@ Partial Class Clientes
|
||||
Set(value As String)
|
||||
ViewState("SerieNotaAcumulador") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Property CvePrecioListaOriginal As Integer
|
||||
Get
|
||||
If ViewState("CvePrecioListaOriginal") Is Nothing Then
|
||||
Return 0
|
||||
Else
|
||||
Return ViewState("CvePrecioListaOriginal").ToString().ToEntero()
|
||||
End If
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CvePrecioListaOriginal") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not IsPostBack Then
|
||||
|
||||
@@ -911,12 +925,12 @@ Partial Class Clientes
|
||||
ChkPermiso5.Enabled = False
|
||||
ChkPermiso6.Enabled = False
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
#Region " PERMISOS PAGINAS "
|
||||
|
||||
|
||||
Private Sub MostrarTxtDireccionesClienteEnvio()
|
||||
|
||||
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
|
||||
@@ -953,15 +967,15 @@ Partial Class Clientes
|
||||
If Not ChkEsDistribuidor.Checked Then
|
||||
BtnGuardar.Visible = PermiteEditar()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "C A R G A S"
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CreaDtPago()
|
||||
DtPagos = New DataTable
|
||||
DtPagos.Columns.Add("CveTipoMovimiento", GetType(String))
|
||||
@@ -1132,9 +1146,9 @@ Partial Class Clientes
|
||||
|
||||
Select Case HdnCuenta.Value
|
||||
Case "1"
|
||||
CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
|
||||
CargaDdlCuentasContables(DdlCtaContableClientes, 1)'UsuarioActual.Empresa.Funcionalidad(246).Toentero()
|
||||
Case "2"
|
||||
CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
|
||||
CargaDdlCuentasContables(DdlCtaContableAnticipos, 1)' UsuarioActual.Empresa.Funcionalidad(237).Toentero()
|
||||
Case "3"
|
||||
CargaDdlCuentasContables(DdlCtaContableRetIVA, -1)
|
||||
Case "4"
|
||||
@@ -1142,11 +1156,11 @@ Partial Class Clientes
|
||||
Case "5"
|
||||
CargaDdlCuentasContables(DdlCtaContableFondoGarantia, -1)
|
||||
Case "6"
|
||||
CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
|
||||
CargaDdlCuentasContables(DdlCtaContableCompClientes, 1)'UsuarioActual.Empresa.Funcionalidad(248).Toentero()
|
||||
Case "7"
|
||||
CargaDdlCuentasContables(DdlCtaContableCompAnticipos, -1)
|
||||
Case "8"
|
||||
CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
|
||||
CargaDdlCuentasContables(DdlMonedaExtranjeraClientes, 1)'UsuarioActual.Empresa.Funcionalidad(247).Toentero()
|
||||
Case "9"
|
||||
CargaDdlCuentasContables(DdlMonedaExtranjeraAnticipos, 1) 'UsuarioActual.Empresa.Funcionalidad(542).Toentero()
|
||||
End Select
|
||||
@@ -1231,7 +1245,7 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -1452,7 +1466,8 @@ Partial Class Clientes
|
||||
TxtNotificar.Text = ObjClientes.NotificarA
|
||||
TxtPagina.Text = ObjClientes.Pagina
|
||||
'TxtGiro.Text = ObjClientes.Giro
|
||||
DdlPrecioLista.SelectedValue = ObjClientes.CvePrecioLista.ToString()
|
||||
DdlPrecioLista.SelectedValueExist(ObjClientes.CvePrecioLista.ToString())
|
||||
CvePrecioListaOriginal = ObjClientes.CvePrecioLista
|
||||
|
||||
TxtCC.Text = ObjClientes.NotificarA
|
||||
ChkMail.Checked = ObjClientes.EnviarFactura
|
||||
@@ -1552,7 +1567,8 @@ Partial Class Clientes
|
||||
DdlCorporativo.SelectedValueExist(ObjClientes.CveClienteCorporativo.ToString())
|
||||
ChkCargoUsado.Checked = ObjClientes.CargoUsados
|
||||
ChkBonificacionUsado.Checked = ObjClientes.BonificacionUsado
|
||||
ChkProductoAlterno.Checked = ObjClientes.UsaProductoAlterno
|
||||
ChkProductoAlterno.Checked = ObjClientes.UsaProductoAlterno
|
||||
DdlAlmacenAsignado.SelectedValueExist(ObjClientes.CveAlmacenAsignado)
|
||||
|
||||
'COMERCIO EXTERIOR
|
||||
ChkAplicaComercioExterior.Checked = ObjClientes.AplicaComercioExterior
|
||||
@@ -1996,11 +2012,11 @@ Partial Class Clientes
|
||||
DdlSucursalUsoCFDI.DataSource = GlobalDTSATUsosCFDI(UsuarioActual.Empresa.EsPersonaFisica, RegimenFiscalReceptor:=RegimenFiscalCliente)
|
||||
DdlSucursalUsoCFDI.DataBind()
|
||||
UpFiscalContable.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "V E R M Á S"
|
||||
|
||||
|
||||
Protected Sub BtnVerMasVentas_Click(sender As Object, e As EventArgs)
|
||||
If BtnVerMasVentas.Text = "Ver Más" Then
|
||||
CargaHistorial(-1)
|
||||
@@ -2030,12 +2046,12 @@ Partial Class Clientes
|
||||
CargaBancos(51)
|
||||
BtnVerMasBancos.Text = "Ver Más"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "B A N C O S"
|
||||
'CuentasxCobrar Activas (Pagos Recibidos)
|
||||
'CuentasxCobrar Activas (Pagos Recibidos)
|
||||
Private Sub CargaBancos(Optional SelectTop As Integer = 51, Optional CveClienteSucursal As Integer = -1)
|
||||
Dim ObjMovtos As New ClsMovimientos()
|
||||
'CxC Activas
|
||||
@@ -2105,9 +2121,9 @@ Partial Class Clientes
|
||||
TxtParaMail.Text = TxtCobranzaCorreo.Text
|
||||
UpSendMail.Update()
|
||||
RegistraScript("$('#ModalDivMail').modal('show');")
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "B T N ´ S"
|
||||
Protected Sub BtnEliminar_Click(sender As Object, e As System.EventArgs) Handles BtnEliminar.Click
|
||||
Dim ObjClientes As New ClsClientes()
|
||||
@@ -2482,7 +2498,7 @@ Partial Class Clientes
|
||||
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
|
||||
Dim CvePrecioLista As Integer = DdlPrecioLista.SelectedValue.ToEntero()
|
||||
|
||||
|
||||
'If DivCrearPrecioLista.Visible AndAlso ChkCrearPrecioLista.Checked Then
|
||||
' CvePrecioListaNuevo = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, 0)
|
||||
@@ -2493,6 +2509,17 @@ Partial Class Clientes
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If Not ErrorProceso AndAlso UsuarioActual.Empresa.Funcionalidad(404).Contiene("10", "30") Then
|
||||
If DdlPrecioLista.SelectedValue.ToEntero.Contiene(-2, -3) Then
|
||||
If Not AsignaLista(ObjClientes.IniciaTransacSQL) Then
|
||||
ErrorProceso = True
|
||||
Alert("Error al generar lista de precios.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim CvePrecioLista As Integer = DdlPrecioLista.SelectedValue.ToEntero()
|
||||
|
||||
If Not ErrorProceso Then
|
||||
'VERIFICA SI ES CLIENTE NUEVO O ACTUALIZACION
|
||||
If Me.CveCliente = -1 Then
|
||||
@@ -2613,6 +2640,7 @@ Partial Class Clientes
|
||||
|
||||
If ErrorProceso Then
|
||||
ObjClientes.RollBack()
|
||||
CargaPrecioLista()
|
||||
Alert("Ocurrió un error al guardar.", TipoMensaje.MsgError)
|
||||
Else
|
||||
ObjClientes.Commit()
|
||||
@@ -2693,11 +2721,11 @@ Partial Class Clientes
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "G L O B L A L"
|
||||
Private Sub RecargaGlobal()
|
||||
|
||||
@@ -2706,10 +2734,10 @@ Partial Class Clientes
|
||||
Private Sub GeneraGlobalDT()
|
||||
GlobalDTCliente(UsuarioActual.CveEmpresa) = Nothing
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "G R I D V I E W S"
|
||||
Protected Sub GVHistorial_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVHistorial.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -2850,11 +2878,11 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "R H"
|
||||
|
||||
|
||||
Private Sub CargaPersonalAsignado()
|
||||
Dim ObjPersonal As New ClsRH
|
||||
If ObjPersonal.GetPersonal(-1, "-1", "-1", "-1", "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, CveCliente, "-1", -1, -1, -1, -1, -1, -1, "-1", "-1", "-1", "-1", UsuarioActual.CveEmpresa) Then
|
||||
@@ -2927,9 +2955,9 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "S U C U R S A L E S"
|
||||
Private Sub LbAgregarSucursal_Click(sender As Object, e As EventArgs) Handles LbAgregarSucursal.Click
|
||||
ChkEstatusSucursal.Checked = True
|
||||
@@ -3061,7 +3089,7 @@ Partial Class Clientes
|
||||
|
||||
UpModalDivMapa.Update()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#Region "G V S U C U R S A L E S"
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GVSucursales.RowDataBound
|
||||
|
||||
@@ -3183,9 +3211,9 @@ Partial Class Clientes
|
||||
Else
|
||||
CargaGrid("", 0)
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G V U S U A R I O S P O R T A L"
|
||||
Protected Sub GvUsuariosPortal_RowCommand(sender As Object, e As GridViewCommandEventArgs) Handles GvUsuariosPortal.RowCommand
|
||||
If e.CommandName = "RestablecerContraseña" Then
|
||||
@@ -3337,9 +3365,9 @@ Partial Class Clientes
|
||||
CargaGrid("", 1)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "O R D E N A M I E N T O"
|
||||
Private Sub CargaGrid(Orden As String, gvi As Integer)
|
||||
If gvi = 0 Then
|
||||
@@ -3371,12 +3399,12 @@ Partial Class Clientes
|
||||
UPPUsuarios.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "U S U A R I O S"
|
||||
Protected Sub LbSolicitudPortal_Click(sender As Object, e As EventArgs) Handles LbEnviarActivacionPortal.Click
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
@@ -3558,9 +3586,9 @@ Partial Class Clientes
|
||||
ChkPermiso5.Checked = False
|
||||
ChkPermiso6.Checked = False
|
||||
ChkPermiso7.Checked = False
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "E V E N T O - B I T A C O R A"
|
||||
Protected Sub GVEventoBitacora_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvEB.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -5215,9 +5243,9 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "GPS"
|
||||
Protected Sub btnCargaArrayDisp_Click(sender As Object, e As EventArgs) Handles btnCargaArrayDisp.Click
|
||||
If hdnArrayDispositivo.Value.Length > 0 Then
|
||||
@@ -5358,10 +5386,10 @@ Partial Class Clientes
|
||||
UpMoverDispositivo.Update()
|
||||
RegistraScript($"CargaModalMoverDispositivo({GvRow.DataKey("CveDispositivo")});")
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Sucursales"
|
||||
Public Sub CreaDTSucursales()
|
||||
|
||||
@@ -5652,14 +5680,14 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "G P S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub EnviaCorreoGPS(Liga As String, LigaActivar As String)
|
||||
|
||||
Try
|
||||
@@ -5730,16 +5758,16 @@ Partial Class Clientes
|
||||
End If
|
||||
|
||||
ObjClientes.Dispose()
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O N T R A T O S"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CargaDatosContrato()
|
||||
If CveCliente <= 0 Then
|
||||
Exit Sub
|
||||
@@ -5784,10 +5812,10 @@ Partial Class Clientes
|
||||
e.Row.CssClass = "Totales white"
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "M E T O D O S "
|
||||
Protected Sub RblTipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles RblTipo.SelectedIndexChanged
|
||||
If DTHistorialVentas IsNot Nothing AndAlso RblTipo.SelectedValue <> "-1" Then
|
||||
@@ -5951,6 +5979,7 @@ Partial Class Clientes
|
||||
divAlmacenAsignado.Visible = True
|
||||
DdlAlmacenAsignado.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
||||
DdlAlmacenAsignado.DataBind()
|
||||
DdlAlmacenAsignado.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -6170,12 +6199,12 @@ Partial Class Clientes
|
||||
Else
|
||||
Alert("No hay saldo pendiente del cliente. Por lo cual no se envió el mensaje.", TipoMensaje.MsgInformacion)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "IMPRIMIR GVHistorial"
|
||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||
Protected Sub BtnExcelHistorial_Click(sender As Object, e As EventArgs)
|
||||
Dim retorno As Byte() = Nothing
|
||||
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
|
||||
Dim logouri As String = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||
@@ -6249,18 +6278,18 @@ Partial Class Clientes
|
||||
ObjClientes.Dispose()
|
||||
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C O B R A N Z A"
|
||||
Public Sub Visitas_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivVisitas"))
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Usuarios"
|
||||
Protected Sub GvUsuarios_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvUsuarios.RowDeleting
|
||||
Dim CveUsuario As Integer = GvUsuarios.Rows(e.RowIndex).DataKey("CveUsuario").ToEntero()
|
||||
@@ -6296,12 +6325,12 @@ Partial Class Clientes
|
||||
e.Row.Cells(5).Visible = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "C U E N T A S - B A N C A R I A S"
|
||||
|
||||
|
||||
Private Sub CargaCuentasBancarias(Optional RecargaGlobal As Boolean = False)
|
||||
|
||||
If CveCliente <= 0 Then Exit Sub
|
||||
@@ -6473,8 +6502,8 @@ Partial Class Clientes
|
||||
TxtNumeroCuenta2.Text = ""
|
||||
TxtConvenioCIE2.Text = ""
|
||||
TxtReferencia2.Text = ""
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "GRIDVIEW - CUENTAS BANCARIAS"
|
||||
Protected Sub GvBancosCuentas_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvBancosCuentas.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
@@ -6525,10 +6554,10 @@ Partial Class Clientes
|
||||
GlobalDTCuentasDepositosClientes(UsuarioActual.CveEmpresa, -1) = Nothing
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
Private Sub CargaPSGridCuentasBancos()
|
||||
If CveCliente > 0 Then
|
||||
GvBancosCuentas.DataSource = DTCuentasBancos
|
||||
@@ -6582,9 +6611,9 @@ Partial Class Clientes
|
||||
divestatus.Visible = True
|
||||
UpAddBancos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivAddCuentasBancarias"))
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C L I E N T E S P A G O S R E A L I Z A D O S I M P R I M I R P D F/Excel"
|
||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkPagosClientesBancosExcel.Click
|
||||
GenerarPDF("Excel")
|
||||
@@ -6606,11 +6635,11 @@ Partial Class Clientes
|
||||
ImprimirPDF("Empresas\Grales\Formatos\RepClientesPagosBancos.rdlc", DTCobrosRealizados, params, "RepClientesPagosBancos_" & NowADS().ToString("yyyyMMddhhmmss"), Formato:=Formato)
|
||||
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "VENTAS"
|
||||
|
||||
|
||||
Public Function imprimirFacturaVenta(CveVenta As Integer) As Byte()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim Vta As Modelos.Factura = Nothing
|
||||
@@ -6841,10 +6870,10 @@ Partial Class Clientes
|
||||
ObjVentas.Dispose()
|
||||
|
||||
Return PdfFactura(Vta)
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "COMERCIO EXTERIOR"
|
||||
Public Sub CargaCombosComercioExterior()
|
||||
|
||||
@@ -6968,12 +6997,12 @@ Partial Class Clientes
|
||||
End Sub
|
||||
Protected Sub DdlMunicipio_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaColonia()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "D O C U M E N T A C I O N "
|
||||
|
||||
|
||||
Private Sub CargaDocumentacionCliente()
|
||||
Dim objRH As New ClsEdocumentacion()
|
||||
|
||||
@@ -7575,12 +7604,12 @@ Partial Class Clientes
|
||||
|
||||
RegistraScript("Download('" & baseUrl & "')")
|
||||
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "D O C U M E N T O S V E N T A S"
|
||||
|
||||
|
||||
Private Sub CargaDocumentosVenta(tCveCliente As Integer)
|
||||
Dim objInv As New ClsEdocumentacion
|
||||
|
||||
@@ -7748,11 +7777,11 @@ Partial Class Clientes
|
||||
|
||||
objRH.Dispose()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PERSONA FISICA"
|
||||
Protected Sub LnkPersonaFisica_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript("$('#DivModalPersonaFisica').modal();")
|
||||
@@ -7777,9 +7806,9 @@ Partial Class Clientes
|
||||
|
||||
ObjCliente.Dispose()
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "USUARIOS PLATAFORMA CLIENTE - 6 "
|
||||
Protected Sub CargaUsuariosPortalCliente()
|
||||
Dim objUsuario As ClsSisUsuarios = New ClsSisUsuarios
|
||||
@@ -7788,19 +7817,19 @@ Partial Class Clientes
|
||||
GvUsuarios.DataBind()
|
||||
End If
|
||||
objUsuario.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region " DEVOLVER DINERO ANT/NC "
|
||||
Private Sub InicializaDevolverDinero()
|
||||
If UsuarioActual.TienePermisoProceso(247) Then
|
||||
GVAnticipos.Columns(6).Visible = True
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "MODAL GRAFICA/PEDIDOS"
|
||||
|
||||
|
||||
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
|
||||
If CargaDatatables() Then
|
||||
RegistraScript("$('#DivModalGrafica').modal('show')")
|
||||
@@ -8137,13 +8166,13 @@ Partial Class Clientes
|
||||
RegistraScript($"CargaGraficaCompratamientoSaldoMensual({Dt5.ToJson},{Dt6.ToJson.Replace($"{Chr(34)}True{Chr(34)}", "true").Replace($"{Chr(34)}False{Chr(34)}", "false")})", "55")
|
||||
|
||||
UPModalProd.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "TAB - COMPORTAMIENTO DE VENTAS"
|
||||
|
||||
|
||||
Private Sub CargaGrupo()
|
||||
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
|
||||
DdlGrupo.Items.Insert(1, New ListItem("Clasificacion", "4"))
|
||||
@@ -8260,12 +8289,12 @@ Partial Class Clientes
|
||||
ObjVentas.Dispose()
|
||||
GvComportamientoVenta.DataBind()
|
||||
UpDatosComportamientoVenta.Update()
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "DISPOSITIVOS"
|
||||
|
||||
|
||||
Protected Sub LnkMoverDispositivo_Click(sender As Object, e As EventArgs)
|
||||
Dim CveDispositivo As Integer = HdnCveDispositivoMover.Value.ToEntero()
|
||||
Dim CveCliente As Integer = DdlClienteDispositivo.SelectedValue.ToEntero()
|
||||
@@ -8303,10 +8332,10 @@ Partial Class Clientes
|
||||
CargaEventoBitacora()
|
||||
NombreDispositivo = ""
|
||||
RegistraScript("$('#DivMoverDispositivo').modal('hide');")
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "CRM"
|
||||
Protected Sub CargaDatosCRM()
|
||||
Dim ObjCRM As New ClsCRM()
|
||||
@@ -8406,9 +8435,9 @@ Partial Class Clientes
|
||||
Alert("Se Unificó correctamente al Cliente con la Empresa CRM.")
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE MARCAS"
|
||||
Private Sub LnkPorcentajeMarcas_Click(sender As Object, e As EventArgs) Handles LnkPorcentajeMarcas.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajeMarcas"))
|
||||
@@ -8633,9 +8662,9 @@ Partial Class Clientes
|
||||
|
||||
ObjPS.Dispose()
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "PORCENTAJE PRECIO DE PRODUCTOS"
|
||||
Private Sub LnkPorcentajePrecios_Click(sender As Object, e As EventArgs) Handles LnkPorcentajePrecios.Click
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivPorcentajePrecios"))
|
||||
@@ -9507,11 +9536,11 @@ Partial Class Clientes
|
||||
|
||||
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "C L I E N T E S G R I D S I M P R I M I R P D F/Excel"
|
||||
Private Sub LnkCotizacionesPDF_Click(sender As Object, e As EventArgs) Handles LnkCotizacionesPDF.Click
|
||||
ImprimeGridsProveedores("PDF", DtCotizaciones, "RepClientesCotizaciones")
|
||||
@@ -9580,7 +9609,7 @@ Partial Class Clientes
|
||||
Alert("Puntuación Inicializada")
|
||||
End If
|
||||
Acum.Dispose()
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Protected Sub DdlTipoRetencion_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UsuarioActual.Empresa.Funcionalidad(579) = "1" Then
|
||||
@@ -10298,25 +10327,75 @@ Partial Class Clientes
|
||||
RegistraScript("$('#DivAgregarPrecioLista').modal('show');")
|
||||
End Sub
|
||||
Protected Sub BtnGuardarPL_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjVentas As New ClsVentas()
|
||||
Dim CvePrecioListaNuevo As Integer = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, False, 0)
|
||||
If CvePrecioListaNuevo > 0 Then
|
||||
Alert("La lista de precio se guardo correctamente")
|
||||
RegistraScript("$('#DivAgregarPrecioLista').modal('hide');")
|
||||
|
||||
LimpiaItemsListaPrecion()
|
||||
|
||||
If DdlPrecioListaClonar.SelectedValue.ToEntero > 0 Then
|
||||
DdlPrecioLista.Items.Add(New ListItem(TxtPrecioLista.Text, "-3"))
|
||||
DdlPrecioLista.SelectedValueExist("-3")
|
||||
Else
|
||||
Alert("Ocurrió un error al guardar la lista de precio", TipoMensaje.MsgError)
|
||||
DdlPrecioLista.Items.Add(New ListItem(TxtPrecioLista.Text, "-2"))
|
||||
DdlPrecioLista.SelectedValueExist("-2")
|
||||
End If
|
||||
|
||||
'Alert("La lista de precio se guardo correctamente")
|
||||
|
||||
UpDatos.Update()
|
||||
|
||||
RegistraScript("$('#DivAgregarPrecioLista').modal('hide');")
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LimpiaItemsListaPrecion()
|
||||
|
||||
DdlPrecioLista.SelectedValue = Nothing
|
||||
DdlPrecioLista.ClearSelection()
|
||||
|
||||
For i As Integer = DdlPrecioLista.Items.Count - 1 To 0 Step -1
|
||||
If DdlPrecioLista.Items(i).Value.Contiene("-2", "-3") Then
|
||||
DdlPrecioLista.Items.RemoveAt(i)
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Function AsignaLista(ByRef transaccionSQL As SqlTransaction) As Boolean
|
||||
|
||||
Dim respuesta As Boolean = True
|
||||
Dim CvePrecioListaClonar As Integer = -1
|
||||
|
||||
If DdlPrecioLista.SelectedValue.ToEntero = -3 Then 'Clñonar
|
||||
CvePrecioListaClonar = DdlPrecioListaClonar.SelectedValue.ToEntero
|
||||
End If
|
||||
|
||||
Dim ObjVentas As New ClsVentas(transaccionSQL)
|
||||
Dim CvePrecioListaNuevo As Integer = ObjVentas.AddPrecioLista(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtPrecioLista.Text, False, 0, CvePrecioListaClonar:=CvePrecioListaClonar)
|
||||
|
||||
If Not CvePrecioListaNuevo > 0 Then
|
||||
respuesta = False
|
||||
End If
|
||||
|
||||
'RECARGA GLOBAL DE LISTA DE PRECIOS SI SE GENERO UNO NUEVO
|
||||
If CvePrecioListaNuevo > 0 Then
|
||||
|
||||
|
||||
GlobalDTPrecioListas(UsuarioActual.CveEmpresa) = Nothing
|
||||
If ObjVentas.GetPrecioListas(UsuarioActual.CveEmpresa) Then
|
||||
DdlPrecioLista.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
DdlPrecioLista.DataSource = Nothing
|
||||
End If
|
||||
|
||||
CargaPrecioLista()
|
||||
|
||||
DdlPrecioLista.DataBind()
|
||||
DdlPrecioLista.Items.Insert(0, New ListItem(" - ", "-1"))
|
||||
'CargaPrecioLista()
|
||||
DdlPrecioLista.SelectedValueExist(CvePrecioListaNuevo)
|
||||
End If
|
||||
|
||||
UpDatos.Update()
|
||||
End Sub
|
||||
|
||||
Return respuesta
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Partial Class ProductosyServicios
|
||||
#Region " Propiedades "
|
||||
Private ReadOnly Property CvePS As Integer
|
||||
Get
|
||||
Return ViewState("CvePS").ToString.ToEntero
|
||||
Return IfNull(ViewState("CvePS"), "-1").ToString.ToEntero
|
||||
End Get
|
||||
End Property
|
||||
Public Property PSAdicionalAnterior As String
|
||||
@@ -186,7 +186,7 @@ Partial Class ProductosyServicios
|
||||
ViewState("CvePS") = Request("CvePS")
|
||||
|
||||
If CargaDatos() Then
|
||||
CargarMarcas()
|
||||
|
||||
'Configuración de Modalidad Update
|
||||
BtnGuardar.Text = "Guardar Cambios"
|
||||
CargarAlias()
|
||||
@@ -197,7 +197,6 @@ Partial Class ProductosyServicios
|
||||
RegistraScript("$('#C_Tab_TabPaquetes_tab').css('display' , 'none')")
|
||||
|
||||
ViewState("CvePS") = -1
|
||||
CargarMarcas()
|
||||
|
||||
ChkEstado.Enabled = False
|
||||
ChkEstado.Checked = True
|
||||
@@ -367,6 +366,7 @@ Partial Class ProductosyServicios
|
||||
CargaTipoProductos()
|
||||
CargaUnidadesMedida()
|
||||
CargarMetodosInv()
|
||||
CargarMarcas()
|
||||
'CargaPSAdicional(DdlPSAdicional)
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
|
||||
@@ -593,9 +593,6 @@
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" step="1"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -8474,33 +8471,22 @@
|
||||
<asp:GridView ID="GvProductosProcedimiento" runat="server" CssClass="table table-hover table-striped ScrollAD mysmallbtn" data-sort="true" AutoGenerateColumns="False" Width="100%" OnRowDataBound="GvProductosProcedimiento_RowDataBound"
|
||||
DataKeyNames="CveProcedimientoProducto,CveProcedimiento,Cantidad,CvePS,CodigoPS,Autogenerado,Estatus,CveVenta,CveUnidadMedida,Abreviatura,CveClasificacion,Clasificacion,Precio" GridLines="None">
|
||||
<Columns>
|
||||
|
||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="40px">
|
||||
<ItemTemplate>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text="0" Width="40px" style="text-align:right!important"></asp:TextBox>
|
||||
<asp:TextBox ID="TxtCantidad" runat="server" Text="" Width="40px" style="text-align:right!important"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cant." DataFormatString="{0:N3}" ItemStyle-Width="30px" >
|
||||
</asp:TemplateField>
|
||||
<asp:BoundField DataField="Cantidad" HeaderText="Cant." DataFormatString="{0:#,###.##}" ItemStyle-Width="30px" >
|
||||
<ItemStyle HorizontalAlign="Right" />
|
||||
</asp:BoundField>
|
||||
|
||||
|
||||
|
||||
<asp:BoundField DataField="CodigoPS" HeaderText="Producto">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Abreviatura" HeaderText="UM">
|
||||
<ItemStyle HorizontalAlign="Left" />
|
||||
</asp:BoundField>
|
||||
|
||||
|
||||
<asp:BoundField DataField="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />
|
||||
|
||||
|
||||
|
||||
</asp:BoundField>
|
||||
<asp:BoundField DataField="Precio" HeaderText="Precio" DataFormatString="{0:#,##0.###}" HtmlEncode="False" />
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" Height="15px"></HeaderStyle>
|
||||
</asp:GridView>
|
||||
|
||||
@@ -3145,8 +3145,6 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
CargaFletes()
|
||||
|
||||
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyectoHeader, LblSubProyecto, AplicaTodos:="")
|
||||
DdlSubProyecto.SelectedValueExist(DdlSubProyectoDatos.SelectedValue)
|
||||
BrSubProyecto.Visible = DdlProyecto.Visible
|
||||
@@ -3343,7 +3341,7 @@ Partial Class Ventas
|
||||
End If
|
||||
TxtFecha.Enabled = True
|
||||
|
||||
BloqueaCondiconesPago()
|
||||
BloqueaCondicionesPago()
|
||||
|
||||
BloqueaClasificaciones()
|
||||
|
||||
@@ -3450,7 +3448,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BloqueaCondiconesPago()
|
||||
Private Sub BloqueaCondicionesPago()
|
||||
If UsuarioActual.TienePermisoProceso(289) Then
|
||||
DdlFormaEntrega.Enabled = False
|
||||
DdlUsoCFDI.Enabled = False
|
||||
@@ -4483,7 +4481,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
For Each Row As DataRow In DtDetalle.Rows
|
||||
If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS, -1) Then
|
||||
If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS) Then
|
||||
If OS.DtResultados.FiltraParametros("SeFacturara = 1").Rows.Count > 0 Then
|
||||
Alert("Hay materiales en la Orden de Servicio, ¿Desea facturar los materiales?", TipoMensaje.MsgConfirmacion, "BtnMateriales()")
|
||||
End If
|
||||
@@ -6856,7 +6854,7 @@ Partial Class Ventas
|
||||
UPObservaciones.Update()
|
||||
|
||||
End If
|
||||
BloqueaCondiconesPago()
|
||||
BloqueaCondicionesPago()
|
||||
DeshabilitarAplicarNotaDeCredito(LblRFC.Text)
|
||||
|
||||
Dim CveVentaRef As Integer = -1
|
||||
@@ -21641,7 +21639,7 @@ Partial Class Ventas
|
||||
DtDetalle = TmpDT.Copy
|
||||
|
||||
For Each Row As DataRow In DtDetalle.Rows
|
||||
If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS, -1) Then
|
||||
If OS.GetDetalleMateriales(Row("CveOSDetalle").ToString().ToEntero(), CveOS) Then
|
||||
Dim Cons As Integer = TmpDT.Rows.Count + 1
|
||||
|
||||
For Each dr As DataRow In OS.DtResultados.FiltraParametros("SeFacturara = 1 ").Rows
|
||||
@@ -25152,31 +25150,31 @@ Partial Class Ventas
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " FLETES "
|
||||
'#Region " FLETES "
|
||||
|
||||
Private Sub CargaFletes()
|
||||
'Private Sub CargaFletes()
|
||||
|
||||
If UsuarioActual.CveEmpresa <> 125 Or CveVenta > 0 Then
|
||||
Exit Sub
|
||||
End If
|
||||
' If UsuarioActual.CveEmpresa <> 125 Or CveVenta > 0 Then
|
||||
' Exit Sub
|
||||
' End If
|
||||
|
||||
HLModalFletes.Visible = True
|
||||
' HLModalFletes.Visible = True
|
||||
|
||||
Dim ObjVentas As New ClsVentas
|
||||
' Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetFletes(UsuarioActual.CveEmpresa) Then
|
||||
GVFletes.DataSource = ObjVentas.DtResultados
|
||||
GVFletes.DataBind()
|
||||
End If
|
||||
' If ObjVentas.GetFletes(UsuarioActual.CveEmpresa) Then
|
||||
' GVFletes.DataSource = ObjVentas.DtResultados
|
||||
' GVFletes.DataBind()
|
||||
' End If
|
||||
|
||||
UpFletes.Update()
|
||||
' UpFletes.Update()
|
||||
|
||||
ObjVentas.Dispose()
|
||||
End Sub
|
||||
' ObjVentas.Dispose()
|
||||
'End Sub
|
||||
|
||||
|
||||
|
||||
#End Region
|
||||
'#End Region
|
||||
|
||||
#Region "A G R E G A R P S M O D A L"
|
||||
Private Sub CargaMetodosPSModal()
|
||||
@@ -29272,7 +29270,7 @@ Partial Class Ventas
|
||||
UPCondicionesPago.Update()
|
||||
UpDetalle.Update()
|
||||
|
||||
BloqueaCondiconesPago()
|
||||
BloqueaCondicionesPago()
|
||||
End Sub
|
||||
Private Sub InicializaDTAnticiposAmortizacion()
|
||||
Me.DtAnticipoAmortizacion = New DataTable
|
||||
@@ -29630,7 +29628,7 @@ Partial Class Ventas
|
||||
End If
|
||||
Next
|
||||
|
||||
BloqueaCondiconesPago()
|
||||
BloqueaCondicionesPago()
|
||||
|
||||
UpAnticipos.Update()
|
||||
UpParametros.Update()
|
||||
@@ -30204,7 +30202,7 @@ Partial Class Ventas
|
||||
DdlIVA.Visible = True
|
||||
End If
|
||||
|
||||
BloqueaCondiconesPago()
|
||||
BloqueaCondicionesPago()
|
||||
|
||||
CargaVendedores()
|
||||
|
||||
@@ -31965,8 +31963,7 @@ Partial Class Ventas
|
||||
CargaGVInv(TmpDT.FiltraParametros("CveTipoPS = 2"))
|
||||
End If
|
||||
|
||||
BloqueaCondiconesPago()
|
||||
|
||||
BloqueaCondicionesPago()
|
||||
|
||||
DivDdlFacturaRela.Visible = True
|
||||
BtnAgregarFacturasRelaciondas.Visible = True
|
||||
@@ -31988,7 +31985,6 @@ Partial Class Ventas
|
||||
HabilitarControlesCartaPorte(True)
|
||||
End If
|
||||
|
||||
|
||||
Dim FolioNuevo As String = TxtFolio.Text
|
||||
If FolioNuevo <> FolioOriginal Then
|
||||
If Adjunto <> "" Then
|
||||
|
||||
Reference in New Issue
Block a user