This commit is contained in:
rakcsle
2022-05-30 20:38:24 -07:00
36 changed files with 2230 additions and 1389 deletions

View File

@@ -2201,6 +2201,21 @@ Public Class ClsGPS
OnError("Ocurrió un error al obtener la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) OnError("Ocurrió un error al obtener la ruta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try End Try
Return Retorno Return Retorno
End Function
Public Function GetRutasPuntosRecoleecion(CveRuta As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_GPS_RutasPuntosRecoleecionGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveRuta", SqlDbType.Int).Value = CveRuta
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener los puntos de recoleecion.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End Try
Return Retorno
End Function End Function
Public Function UpdateRuta(CveRuta As Integer, Ruta As String, CveCliente As Integer) As Boolean Public Function UpdateRuta(CveRuta As Integer, Ruta As String, CveCliente As Integer) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False

View File

@@ -5511,6 +5511,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Ventas/RepVentasMensuales.aspx".ToUpper(), 720) PaginaDict.Add("/Ventas/RepVentasMensuales.aspx".ToUpper(), 720)
PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 720) PaginaDict.Add("/Ventas/RepVentasMensualesDetalle.aspx".ToUpper(), 720)
PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722) PaginaDict.Add("/Ventas/MetasVendedores.aspx".ToUpper(), 722)
PaginaDict.Add("/Ventas/MetasVendedoresDetalle.aspx".ToUpper(), 722)
PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723) PaginaDict.Add("/Ventas/CatMetasVendedores.aspx".ToUpper(), 723)
PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 567) PaginaDict.Add("/Ventas/RepAuxiliarFacturas.aspx".ToUpper(), 567)
PaginaDict.Add("/Ventas/CatAutorizacionLimites.aspx".ToUpper(), 781) PaginaDict.Add("/Ventas/CatAutorizacionLimites.aspx".ToUpper(), 781)

View File

@@ -3158,8 +3158,8 @@ Public Class ClsVentas
Dim retorno As Boolean = False Dim retorno As Boolean = False
Try Try
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient() Dim objServicio As Cancelacion2022.CancelacionSoapClient = New Cancelacion2022.CancelacionSoapClient()
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890") Dim resp As Cancelacion2022.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
If resp.Estado = 0 Then If resp.Estado = 0 Then
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)) Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes) Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
@@ -4953,6 +4953,34 @@ Public Class ClsVentas
Return retorno Return retorno
End Function End Function
Public Function GetRepMetasVendedoresDetalle(FechaMesActual As String, CveEmpresa As Integer, CveVendedor As Integer, CveCategoria As Integer, CveClasificacion As Integer,
CveClasificacion2 As Integer, CveMarca As Integer, CveSubProyecto As Integer, CveCliente As Integer, EsDistribuidor As Integer,
Optional GrupoSuperior As Integer = 0) As Boolean
Dim retorno As Boolean = False
DataAdapter("PA_Vta_MetasVendedoresDetalle", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters
.Add("@FechaMesActual", SqlDbType.DateTime).Value = FechaMesActual
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@CveCategoria", SqlDbType.Int).Value = CveCategoria
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveClasificacion2", SqlDbType.Int).Value = CveClasificacion2
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
.Add("@EsDistribuidor", SqlDbType.Int).Value = EsDistribuidor
.Add("@GrupoSuperior", SqlDbType.Int).Value = GrupoSuperior
End With
Try
SqlAdapter.Fill(Data)
retorno = True
Catch ex As Exception
OnError("Ocurrió un error al obtener el reporte de metas por vendedores", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return retorno
End Function
Public Function GetRepTopClientesVentas(CveEmpresa As Integer, Mes As Integer, Año As Integer, Optional Top As Integer = 20, Optional CveSubProyecto As Integer = -1) As Boolean Public Function GetRepTopClientesVentas(CveEmpresa As Integer, Mes As Integer, Año As Integer, Optional Top As Integer = 20, Optional CveSubProyecto As Integer = -1) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Vta_Top20ClientesMasVendidos", CommandType.StoredProcedure) DataAdapter("PA_Vta_Top20ClientesMasVendidos", CommandType.StoredProcedure)

View File

@@ -3826,46 +3826,9 @@ Namespace Modelos
OcurrioError = True OcurrioError = True
End If End If
' COMIENZA: GARANTIAS ' GENERA EL MOVIMIENTO DE GARANTIA SI TIENE
Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero() If Not GenerarMovimientoGarantia(14, "Entrada Garantía", Now, factura, ObjAcum, ObjInventario, ObjConta) Then
Dim DtGarantias As DataTable = Nothing OcurrioError = True
If ObjAcum.GetGarantiasDetalle(factura.CveVenta) Then
DtGarantias = ObjAcum.DtResultados.Copy()
End If
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
Dim TotalGarantia As Decimal = 0
Dim CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 2, 1, factura.Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Guia:="", Modulo:="Modelos/SDGA")
Dim FolioGarantia = ObjInventario.Folio
For Each RowGarantia As DataRow In DtGarantias.Rows
Dim CvePS = RowGarantia("CvePS").ToString().ToEntero()
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
Dim Serie As String = RowGarantia("Comprobante").ToString
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie, CveVentaDetalle:=RowGarantia("CveVentaDetalle").ToString.ToEntero) Then
OcurrioError = True
Exit For
End If
TotalGarantia += (RowGarantia("Cantidad").ToString().ToDecimal() * PU)
Next
Dim CvePrePolizaTraspaso As Integer = ObjConta.AddPrePolizas("EA/Gar", 53, 0, 0, 1, factura.Fecha, "Entrada Garantía", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaTraspaso > 0 Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, False, TotalGarantia, "MOVIMIENTO DE GARANTIA", 68, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
OcurrioError = True
End If
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaTraspaso, True, TotalGarantia, "MOVIMIENTO DE GARANTIA", 331, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
OcurrioError = True
End If
Else
OcurrioError = True
End If
End If End If
Else Else
@@ -3902,6 +3865,75 @@ Namespace Modelos
Return OcurrioError Return OcurrioError
End Function End Function
Private Function GenerarMovimientoGarantia(CveConceptoMovimiento As Integer, ConceptoPoliza As String, FechaMovimiento As DateTime, factura As Factura, ByRef ObjAcum As ClsAcumuladores, ByRef ObjInventario As ClsInventarios, ObjConta As ClsContabilidad, Optional Modulo As String = "Modelos/SDGA") As Boolean
Dim OcurrioError As Boolean = False
Try
Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={factura.CveSubProyecto}").ToEntero()
Dim DtGarantias As DataTable = Nothing
If ObjAcum.GetGarantiasDetalle(factura.CveVenta) Then
DtGarantias = ObjAcum.DtResultados.Copy()
Else
OcurrioError = True
End If
'SI TIENE UNA GARANTIA, GENERAR EL MOVIMIENTO DE ALMACEN
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
Dim TotalGarantia As Decimal = 0
Dim CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, CveConceptoMovimiento, 1, FechaMovimiento, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, factura.CveVenta, -1, -1, Observaciones:="", Guia:="", Modulo:=Modulo)
Dim FolioGarantia = ObjInventario.Folio
For Each RowGarantia As DataRow In DtGarantias.Rows
Dim CvePS = RowGarantia("CvePS").ToString().ToEntero()
Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero()
Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero()
Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
Dim Serie As String = RowGarantia("Comprobante").ToString
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie, CveVentaDetalle:=RowGarantia("CveVentaDetalle").ToString.ToEntero) Then
OcurrioError = True
Exit For
End If
Next
If Not OcurrioError Then
If ObjInventario.GetMovimientosDetalle(CveMovimientoGarantia, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
TotalGarantia = ObjInventario.DtResultados.SUMD("Total").RoundSQL
Else
OcurrioError = True
End If
End If
If Not OcurrioError Then
Dim CvePrePolizaGarantia As Integer = ObjConta.AddPrePolizas("EA/Gar", 53, 0, 0, 1, FechaMovimiento, ConceptoPoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePolizaGarantia > 0 Then
Dim TipoMovto As Boolean = False
If CveConceptoMovimiento = 15 Then
TipoMovto = True
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaGarantia, TipoMovto, TotalGarantia, "MOVIMIENTO DE GARANTIA", 68, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
OcurrioError = True
End If
If Not OcurrioError AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaGarantia, Not TipoMovto, TotalGarantia, "MOVIMIENTO DE GARANTIA", 331, "MOVIMIENTO DE GARANTIA", factura.Fecha, -1, -1, CveMovimientoAlmacen:=CveMovimientoGarantia, Contabilizable:=True, ImporteMX:=TotalGarantia) Then
OcurrioError = True
End If
Else
OcurrioError = True
End If
End If
End If
Catch ex As Exception
OcurrioError = True
OnError("Ocurrió un error al generar el movimiento de garantía", ex)
End Try
Return Not OcurrioError
End Function
Private Function CuadrarFacturaMovimientos(MovDetalle As DataTable) As DataTable Private Function CuadrarFacturaMovimientos(MovDetalle As DataTable) As DataTable
Dim MovDTCuadrados As New DataTable Dim MovDTCuadrados As New DataTable
MovDTCuadrados = MovDetalle.Clone MovDTCuadrados = MovDetalle.Clone
@@ -5540,6 +5572,21 @@ Namespace Modelos
End If End If
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjRemision, ObjAcum, ObjInventario, ObjConta) Then
ErrorCancelar = True
End If
End If
'CANCELA LOS FOLIOS DE GARANTIA
If Not ErrorCancelar Then
If Not ObjAcum.UpdateGarantiaCancelacion(ObjRemision.CveVenta) Then
ErrorCancelar = True
MensajeError = "Ocurrió un error al actualizar la garantía"
End If
End If
If DtDevRemision IsNot Nothing Then If DtDevRemision IsNot Nothing Then
DtDevRemision.Dispose() DtDevRemision.Dispose()
End If End If
@@ -5629,6 +5676,13 @@ Namespace Modelos
End If End If
End If End If
'CANCELAR MOVIMIENTOS DE GARANTIA SI TIENE
If Not ErrorCancelar AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
If Not GenerarMovimientoGarantia(15, "Salida Garantía", Now, ObjFactura, ObjAcum, ObjInventario, ObjConta) Then
ErrorCancelar = True
End If
End If
End If End If
'VERIFICAR MOVIMIENTOS DE APARTADOS 'VERIFICAR MOVIMIENTOS DE APARTADOS
@@ -6617,6 +6671,7 @@ Namespace Modelos
Public Property SubProyecto As Modelos.SubProyectoModel Public Property SubProyecto As Modelos.SubProyectoModel
Public Property DtDetalle As Data.DataTable Public Property DtDetalle As Data.DataTable
Public Property DtMercancias As Data.DataTable
Public Property DtDetalleAC As Data.DataTable Public Property DtDetalleAC As Data.DataTable
Public Property DtAjustes As Data.DataTable Public Property DtAjustes As Data.DataTable
Public Property DtRecepcionUsados As Data.DataTable Public Property DtRecepcionUsados As Data.DataTable
@@ -7166,6 +7221,7 @@ Namespace Modelos
If Not DtRemisiones Is Nothing Then DtRemisiones.Dispose() : DtRemisiones = Nothing If Not DtRemisiones Is Nothing Then DtRemisiones.Dispose() : DtRemisiones = Nothing
If Not DtRemisionesPS Is Nothing Then DtRemisionesPS.Dispose() : DtRemisionesPS = Nothing If Not DtRemisionesPS Is Nothing Then DtRemisionesPS.Dispose() : DtRemisionesPS = Nothing
If Not DtVentasNC Is Nothing Then DtVentasNC.Dispose() : DtVentasNC = Nothing If Not DtVentasNC Is Nothing Then DtVentasNC.Dispose() : DtVentasNC = Nothing
If Not DtMercancias Is Nothing Then DtMercancias.Dispose() : DtMercancias = Nothing
End If End If
End If End If
Me.disposedValue = True Me.disposedValue = True

View File

@@ -259,39 +259,39 @@ Public Class E141 : Implements IHttpHandler
End Property End Property
#End Region #End Region
#Region "V A L I D A - D A T O S" #Region "V A L I D A - D A T O S"
Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario Private Function ValidaUsuarioSistema(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
Dim UsuarioActual As Usuario = Nothing Dim UsuarioActual As Usuario = Nothing
Dim ObjUsuarios As New ClsSisUsuarios Dim ObjUsuarios As New ClsSisUsuarios
If ObjUsuarios.GetUsuarios(CveUsuario) Then If ObjUsuarios.GetUsuarios(CveUsuario) Then
If ObjUsuarios.DtResultados.Rows.Count > 0 Then If ObjUsuarios.DtResultados.Rows.Count > 0 Then
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString() Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString() Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa) UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI, CveEmpresa)
UsuarioActual.CveEmpresa = CveEmpresa UsuarioActual.CveEmpresa = CveEmpresa
CreaObjetoEmpresa(UsuarioActual) CreaObjetoEmpresa(UsuarioActual)
End If End If
End If End If
ObjUsuarios.Dispose() ObjUsuarios.Dispose()
Return UsuarioActual Return UsuarioActual
End Function End Function
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario) Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
Dim ObjEmpresa As New ClsSisEmpresas() Dim ObjEmpresa As New ClsSisEmpresas()
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
Dim EmpresasFuncionalidades As New HybridDictionary Dim EmpresasFuncionalidades As New HybridDictionary
For Each Row As Data.DataRow In dttmp.Rows For Each Row As Data.DataRow In dttmp.Rows
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString) EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
Next Next
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades) ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
End If End If
UsuarioActual.Empresa = ObjEmpresa.Empresa UsuarioActual.Empresa = ObjEmpresa.Empresa
End If End If
ObjEmpresa.Dispose() ObjEmpresa.Dispose()
End Sub End Sub
#End Region #End Region
@@ -766,7 +766,7 @@ Public Class E141 : Implements IHttpHandler
End Function End Function
#Region "D E F I N I R - O B J E T O S" #Region "D E F I N I R - O B J E T O S"
Private Function CrearCliente(TipoDocto As String, ObjClientes As ClsClientes, ByRef Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Integer Private Function CrearCliente(TipoDocto As String, ObjClientes As ClsClientes, ByRef Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Integer
Dim CveCliente As Integer = -1 Dim CveCliente As Integer = -1
@@ -892,9 +892,9 @@ Public Class E141 : Implements IHttpHandler
End Function End Function
Private Function CreaFactura(ObjInventario As ClsInventarios, ObjClientes As ClsClientes, TipoDocto As String, Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Modelos.Factura Private Function CreaFactura(ObjInventario As ClsInventarios, ObjClientes As ClsClientes, TipoDocto As String, Resp As Modelos.Factura.MMensajeFactura, JsonRequest As JObject, UsuarioActual As Usuario) As Modelos.Factura
Try Try
Resp.TieneError = False Resp.TieneError = False
Dim Serie As String = "-1" Dim Serie As String = "-1"
Dim CveMoneda As Integer = 1 Dim CveMoneda As Integer = 1
@@ -914,52 +914,52 @@ Public Class E141 : Implements IHttpHandler
If CveCliente <= 0 Then If CveCliente <= 0 Then
Return Nothing Return Nothing
End If End If
Dim ObjFactura = New Modelos.Factura(UsuarioActual) Dim ObjFactura = New Modelos.Factura(UsuarioActual)
ObjFactura.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.TextoLimpio ObjFactura.TipoMensajeRespuesta = Modelos.TipoMensajeRespuesta.TextoLimpio
ObjFactura.Serie = Serie ObjFactura.Serie = Serie
ObjFactura.Folio = -1 ObjFactura.Folio = -1
ObjFactura.Version = "3.3" ObjFactura.Version = "3.3"
ObjFactura.FolioFiscal = "" ObjFactura.FolioFiscal = ""
ObjFactura.CveUsuario = UsuarioActual.CveUsuario ObjFactura.CveUsuario = UsuarioActual.CveUsuario
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
ObjFactura.TipoCambio = 1 ObjFactura.TipoCambio = 1
ObjFactura.ConvertirPesos = False ObjFactura.ConvertirPesos = False
ObjFactura.CveMoneda = CveMoneda ObjFactura.CveMoneda = CveMoneda
ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda)) ObjFactura.Moneda = GlobalDTMonedas.FiltroPrimeroValor("Moneda", String.Format("CveMoneda = {0} ", CveMoneda))
ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda)) ObjFactura.MonedaSAT = GlobalDTMonedas.FiltroPrimeroValor("AbreviaturaSAT", String.Format("CveMoneda = {0} ", CveMoneda))
ObjFactura.TipoDocto = TipoDocto ObjFactura.TipoDocto = TipoDocto
ObjFactura.RefDocto = "" ObjFactura.RefDocto = ""
ObjFactura.CveMesa = -1 ObjFactura.CveMesa = -1
ObjFactura.Fecha = Now ObjFactura.Fecha = Now
ObjFactura.CvePrePoliza = -1 ObjFactura.CvePrePoliza = -1
ObjFactura.FechaPago = Now ObjFactura.FechaPago = Now
ObjFactura.MotivoDescuento = "" ObjFactura.MotivoDescuento = ""
ObjFactura.FechaEjecucion = Now ObjFactura.FechaEjecucion = Now
ObjFactura.UsuarioCreo = UsuarioActual.Usuario ObjFactura.UsuarioCreo = UsuarioActual.Usuario
ObjFactura.CveCondicionEntrega = -1 ObjFactura.CveCondicionEntrega = -1
ObjFactura.CondicionEntrega = "" ObjFactura.CondicionEntrega = ""
ObjFactura.NumeroCuenta = "" ObjFactura.NumeroCuenta = ""
ObjFactura.CondicionesPago = 0 ObjFactura.CondicionesPago = 0
ObjFactura.FormaPago = 0 ObjFactura.FormaPago = 0
ObjFactura.PedidoContrato = "" ObjFactura.PedidoContrato = ""
ObjFactura.NumeroContrato = "" ObjFactura.NumeroContrato = ""
ObjFactura.DescripcionContrato = "" ObjFactura.DescripcionContrato = ""
ObjFactura.CveCorte = -1 ObjFactura.CveCorte = -1
ObjFactura.TipoDocumento = ObjFactura.TipodeComprobante ObjFactura.TipoDocumento = ObjFactura.TipodeComprobante
ObjFactura.Alfa1 = "" ObjFactura.Alfa1 = ""
ObjFactura.Alfa2 = "" ObjFactura.Alfa2 = ""
ObjFactura.Alfa3 = "" ObjFactura.Alfa3 = ""
ObjFactura.CveContrato = -1 ObjFactura.CveContrato = -1
ObjFactura.ConvertirPesos = False ObjFactura.ConvertirPesos = False
ObjFactura.CveSubProyecto = CveSubProyecto ObjFactura.CveSubProyecto = CveSubProyecto
ObjFactura.CveSubProyectoCobranza = CveSubProyecto ObjFactura.CveSubProyectoCobranza = CveSubProyecto
ObjFactura.CveSubProyectoEjecucion = CveSubProyecto ObjFactura.CveSubProyectoEjecucion = CveSubProyecto
ObjFactura.SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto))) ObjFactura.SubProyecto = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveEmpresa:=CveEmpresa).FiltroPrimero(String.Format("CveSubProyecto = {0}", CveSubProyecto)))
ObjFactura.SubProyectoMatriz = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1")) ObjFactura.SubProyectoMatriz = New Modelos.SubProyectoModel(GlobalDTSubProyectos(-1, CveSubProyecto:=-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimero("TipoSucursal=1"))
'CLIENTE 'CLIENTE
ObjFactura.CveCliente = CveCliente ObjFactura.CveCliente = CveCliente
ObjFactura.CveClienteSucursal = -1 ObjFactura.CveClienteSucursal = -1
@@ -1147,24 +1147,24 @@ Public Class E141 : Implements IHttpHandler
End If End If
'IMPORTES 'IMPORTES
Dim TotalImporte As Decimal = ObjFactura.DtDetalle.SUMD("TotalImporte") Dim TotalImporte As Decimal = ObjFactura.DtDetalle.SUMD("TotalImporte")
Dim ImporteIVA As Decimal = ObjFactura.DtDetalle.SUMD("ImporteIVA") Dim ImporteIVA As Decimal = ObjFactura.DtDetalle.SUMD("ImporteIVA")
Dim ImporteRetIVA As Decimal = ObjFactura.DtDetalle.SUMD("ImporteRetIVA") Dim ImporteRetIVA As Decimal = ObjFactura.DtDetalle.SUMD("ImporteRetIVA")
Dim ImporteRetISR As Decimal = ObjFactura.DtDetalle.SUMD("ImporteRetISR") Dim ImporteRetISR As Decimal = ObjFactura.DtDetalle.SUMD("ImporteRetISR")
Dim ImporteIEPS As Decimal = ObjFactura.DtDetalle.SUMD("ImporteIEPS") Dim ImporteIEPS As Decimal = ObjFactura.DtDetalle.SUMD("ImporteIEPS")
Dim Descuento As Decimal = ObjFactura.DtDetalle.SUMD("Descuento") Dim Descuento As Decimal = ObjFactura.DtDetalle.SUMD("Descuento")
Dim Amortizacion As Decimal = 0 Dim Amortizacion As Decimal = 0
Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion) Dim Total As Decimal = (TotalImporte + ImporteIVA + ImporteIEPS) - (ImporteRetIVA + ImporteRetISR + Descuento + Amortizacion)
ObjFactura.SubTotal = TotalImporte ObjFactura.SubTotal = TotalImporte
ObjFactura.Descuento = Descuento ObjFactura.Descuento = Descuento
ObjFactura.Amortizacion = Amortizacion ObjFactura.Amortizacion = Amortizacion
ObjFactura.IVA = ImporteIVA ObjFactura.IVA = ImporteIVA
ObjFactura.RetIVA = ImporteRetIVA ObjFactura.RetIVA = ImporteRetIVA
ObjFactura.RetISR = ImporteRetISR ObjFactura.RetISR = ImporteRetISR
ObjFactura.IEPS = ImporteIEPS ObjFactura.IEPS = ImporteIEPS
ObjFactura.Total = Total ObjFactura.Total = Total
ObjFactura.TotalOtrosConceptos = 0 ObjFactura.TotalOtrosConceptos = 0
'SI HAY DIFERENCIA DE UN CENTAVO AJUSTA 'SI HAY DIFERENCIA DE UN CENTAVO AJUSTA
@@ -1200,224 +1200,224 @@ Public Class E141 : Implements IHttpHandler
ObjFactura.Observaciones = "PEDIDO PROVENIENTE DE ECOMMERCE" ObjFactura.Observaciones = "PEDIDO PROVENIENTE DE ECOMMERCE"
ElseIf TipoDocto = "Cot" Then ElseIf TipoDocto = "Cot" Then
ObjFactura.Observaciones = "COTIZACION PROVENIENTE DE ECOMMERCE" ObjFactura.Observaciones = "COTIZACION PROVENIENTE DE ECOMMERCE"
End If End If
ObjFactura.OrdenCompra = "" ObjFactura.OrdenCompra = ""
ObjFactura.PedidoContrato = "" ObjFactura.PedidoContrato = ""
ObjFactura.ObservacionesAlmacen = "" ObjFactura.ObservacionesAlmacen = ""
ObjFactura.EnviarCorreo = False ObjFactura.EnviarCorreo = False
ObjFactura.Timbre = PreParaTimbre(ObjFactura) ObjFactura.Timbre = PreParaTimbre(ObjFactura)
ObjFactura.FemsaFactura = New Modelos.FemsaFactura() With { ObjFactura.FemsaFactura = New Modelos.FemsaFactura() With {
.AplicaFEMSA = False, .AplicaFEMSA = False,
.FEMSA_Version = 1 .FEMSA_Version = 1
} }
Return ObjFactura Return ObjFactura
Catch ex As Exception Catch ex As Exception
Resp.Mensajes.Add(ex.ToString()) Resp.Mensajes.Add(ex.ToString())
Return Nothing Return Nothing
End Try End Try
End Function End Function
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
Dim Timbre As New CFDITimbre Dim Timbre As New CFDITimbre
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", "")) Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
Timbre.Comprobante.Folio = Obj.Folio.ToString Timbre.Comprobante.Folio = Obj.Folio.ToString
Timbre.Comprobante.Serie = Obj.Serie Timbre.Comprobante.Serie = Obj.Serie
Timbre.Comprobante.Fecha = Obj.FechaCP Timbre.Comprobante.Fecha = Obj.FechaCP
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33 Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33 Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
Timbre.Comprobante.Subtotal = Obj.SubTotal Timbre.Comprobante.Subtotal = Obj.SubTotal
Timbre.Comprobante.Descuentos = Obj.Descuento Timbre.Comprobante.Descuentos = Obj.Descuento
Timbre.Comprobante.Moneda = Obj.MonedaSAT Timbre.Comprobante.Moneda = Obj.MonedaSAT
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString) Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
Timbre.Comprobante.Total = Obj.Total Timbre.Comprobante.Total = Obj.Total
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
Timbre.Comprobante.Confirmacion = "" Timbre.Comprobante.Confirmacion = ""
Timbre.Receptor.RFC = Obj.Cliente.RFC Timbre.Receptor.RFC = Obj.Cliente.RFC
Timbre.Receptor.Nombre = Obj.Cliente.Nombre Timbre.Receptor.Nombre = Obj.Cliente.Nombre
Timbre.Receptor.ResidenciaFiscal = "" Timbre.Receptor.ResidenciaFiscal = ""
Timbre.Receptor.NumeroRegistroTributario = "" Timbre.Receptor.NumeroRegistroTributario = ""
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
If Obj.CveTipoRelacion > 0 Then If Obj.CveTipoRelacion > 0 Then
Select Case Obj.CveTipoRelacion Select Case Obj.CveTipoRelacion
Case 1 Case 1
Timbre.CFDIRelacionados.TipoRelacion = "01" Timbre.CFDIRelacionados.TipoRelacion = "01"
Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso" Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
Case 2 Case 2
Timbre.CFDIRelacionados.TipoRelacion = "02" Timbre.CFDIRelacionados.TipoRelacion = "02"
Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados" Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
Case 3 Case 3
Timbre.CFDIRelacionados.TipoRelacion = "03" Timbre.CFDIRelacionados.TipoRelacion = "03"
Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso" Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
Case 4 Case 4
Timbre.CFDIRelacionados.TipoRelacion = "04" Timbre.CFDIRelacionados.TipoRelacion = "04"
Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso" Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
Case 7 Case 7
Timbre.CFDIRelacionados.TipoRelacion = "07" Timbre.CFDIRelacionados.TipoRelacion = "07"
Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo" Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
Case 8 Case 8
Timbre.CFDIRelacionados.TipoRelacion = "08" Timbre.CFDIRelacionados.TipoRelacion = "08"
Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades " Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
Case 9 Case 9
Timbre.CFDIRelacionados.TipoRelacion = "09" Timbre.CFDIRelacionados.TipoRelacion = "09"
Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos" Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
End Select End Select
End If End If
Dim totSubTotal As Decimal = Obj.SubTotal Dim totSubTotal As Decimal = Obj.SubTotal
Dim totIVA As Decimal = Obj.IVA Dim totIVA As Decimal = Obj.IVA
Dim totRetIVA As Decimal = Obj.RetIVA Dim totRetIVA As Decimal = Obj.RetIVA
Dim totRetISR As Decimal = Obj.RetISR Dim totRetISR As Decimal = Obj.RetISR
Dim i As Integer = 1 Dim i As Integer = 1
'DETALLES 'DETALLES
Dim tPS As String = "" Dim tPS As String = ""
For Each drr As DataRow In Obj.DtDetalle.Rows For Each drr As DataRow In Obj.DtDetalle.Rows
If drr("PS").ToString.Length = 1 Then If drr("PS").ToString.Length = 1 Then
tPS = drr("Obs").ToString tPS = drr("Obs").ToString
Else Else
If drr("PS").ToString.Length = 0 Then If drr("PS").ToString.Length = 0 Then
tPS = "" tPS = ""
Else Else
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs")) tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
End If End If
End If End If
'CONDICIONANTE, ESPECIAL 'CONDICIONANTE, ESPECIAL
If Obj.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO If Obj.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal, Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
.Descripcion = tPS, .Descripcion = tPS,
.ValorUnitario = drr("PU").ToString.ToDecimal, .ValorUnitario = drr("PU").ToString.ToDecimal,
.Importe = drr("TotalImporte").ToString.ToDecimal, .Importe = drr("TotalImporte").ToString.ToDecimal,
.Descuento = drr("Descuento").ToString.ToDecimal, .Descuento = drr("Descuento").ToString.ToDecimal,
.Unidad = drr("UM").ToString, .Unidad = drr("UM").ToString,
.ClaveUnidad = drr("SATClaveUM").ToString, .ClaveUnidad = drr("SATClaveUM").ToString,
.ClaveProdServ = drr("SATClaveProdServ").ToString, .ClaveProdServ = drr("SATClaveProdServ").ToString,
.Noidentificacion = drr("Noidentificacion").ToString, .Noidentificacion = drr("Noidentificacion").ToString,
.CuentaPredial = drr("CuentaPredial").ToString} .CuentaPredial = drr("CuentaPredial").ToString}
'VERIFICA SUMA SUBTOTALES 'VERIFICA SUMA SUBTOTALES
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
concepto.Importe = totSubTotal concepto.Importe = totSubTotal
End If End If
totSubTotal = totSubTotal - concepto.Importe totSubTotal = totSubTotal - concepto.Importe
'SIEMPRE ESTAMOS AGREGANDO EL IVA 'SIEMPRE ESTAMOS AGREGANDO EL IVA
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal}) concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
If drr("ImporteIEPS").ToString.ToDouble > 0 Then If drr("ImporteIEPS").ToString.ToDouble > 0 Then
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal}) concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
End If End If
If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal}) concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
End If End If
If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetISR").ToString.ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal}) concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeRetISR").ToString.ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
End If End If
Timbre.Conceptos.Add(concepto) Timbre.Conceptos.Add(concepto)
i += 1 i += 1
Next Next
Return Timbre Return Timbre
End Function End Function
Private Function CreaDTDetalle(ByRef ObjInventarios As ClsInventarios, ObjFactura As Modelos.Factura, ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, JsonRequest As JObject) As DataTable Private Function CreaDTDetalle(ByRef ObjInventarios As ClsInventarios, ObjFactura As Modelos.Factura, ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, JsonRequest As JObject) As DataTable
Dim TmpDT = New DataTable Dim TmpDT = New DataTable
TmpDT.Columns.Add("CveVenta", GetType(Integer)) TmpDT.Columns.Add("CveVenta", GetType(Integer))
TmpDT.Columns.Add("Consec", GetType(Integer)) TmpDT.Columns.Add("Consec", GetType(Integer))
TmpDT.Columns.Add("Cantidad", GetType(Decimal)) TmpDT.Columns.Add("Cantidad", GetType(Decimal))
TmpDT.Columns.Add("Codigo", GetType(String)) TmpDT.Columns.Add("Codigo", GetType(String))
TmpDT.Columns.Add("CveUM", GetType(Integer)) TmpDT.Columns.Add("CveUM", GetType(Integer))
TmpDT.Columns.Add("UM", GetType(String)) TmpDT.Columns.Add("UM", GetType(String))
TmpDT.Columns.Add("SATClaveUM", GetType(String)) TmpDT.Columns.Add("SATClaveUM", GetType(String))
TmpDT.Columns.Add("CveClasificacion", GetType(Integer)) TmpDT.Columns.Add("CveClasificacion", GetType(Integer))
TmpDT.Columns.Add("Clasificacion", GetType(String)) TmpDT.Columns.Add("Clasificacion", GetType(String))
TmpDT.Columns.Add("CvePS", GetType(Integer)) TmpDT.Columns.Add("CvePS", GetType(Integer))
TmpDT.Columns.Add("PS", GetType(String)) TmpDT.Columns.Add("PS", GetType(String))
TmpDT.Columns.Add("CodigoPS", GetType(String)) TmpDT.Columns.Add("CodigoPS", GetType(String))
TmpDT.Columns.Add("SATClaveProdServ", GetType(String)) TmpDT.Columns.Add("SATClaveProdServ", GetType(String))
TmpDT.Columns.Add("NoIdentificacion", GetType(String)) TmpDT.Columns.Add("NoIdentificacion", GetType(String))
TmpDT.Columns.Add("CveTipoPS", GetType(Integer)) TmpDT.Columns.Add("CveTipoPS", GetType(Integer))
TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer)) TmpDT.Columns.Add("CveTipoInvPS", GetType(Integer))
TmpDT.Columns.Add("Serie", GetType(String)) TmpDT.Columns.Add("Serie", GetType(String))
TmpDT.Columns.Add("CuentaPredial", GetType(String)) TmpDT.Columns.Add("CuentaPredial", GetType(String))
TmpDT.Columns.Add("Obs", GetType(String)) TmpDT.Columns.Add("Obs", GetType(String))
TmpDT.Columns.Add("TiempoEntrega", GetType(String)) TmpDT.Columns.Add("TiempoEntrega", GetType(String))
TmpDT.Columns.Add("PU", GetType(Decimal)) TmpDT.Columns.Add("PU", GetType(Decimal))
TmpDT.Columns.Add("IVA", GetType(Decimal)) TmpDT.Columns.Add("IVA", GetType(Decimal))
TmpDT.Columns.Add("ImporteIVA", GetType(Decimal)) TmpDT.Columns.Add("ImporteIVA", GetType(Decimal))
TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal)) TmpDT.Columns.Add("PorcentajeIVA", GetType(Decimal))
TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal)) TmpDT.Columns.Add("ImporteRetIVA", GetType(Decimal))
TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal)) TmpDT.Columns.Add("ImporteRetISR", GetType(Decimal))
TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal)) TmpDT.Columns.Add("PorcentajeRetIVA", GetType(Decimal))
TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal)) TmpDT.Columns.Add("PorcentajeRetISR", GetType(Decimal))
TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal)) TmpDT.Columns.Add("ImporteIEPS", GetType(Decimal))
TmpDT.Columns.Add("IEPS", GetType(Decimal)) TmpDT.Columns.Add("IEPS", GetType(Decimal))
TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal)) TmpDT.Columns.Add("PorcentajeIEPS", GetType(Decimal))
TmpDT.Columns.Add("Descuento", GetType(Decimal)) TmpDT.Columns.Add("Descuento", GetType(Decimal))
TmpDT.Columns.Add("TipoDescuento", GetType(Integer)) TmpDT.Columns.Add("TipoDescuento", GetType(Integer))
TmpDT.Columns.Add("TotalImporte", GetType(Decimal)) TmpDT.Columns.Add("TotalImporte", GetType(Decimal))
TmpDT.Columns.Add("Total", GetType(Decimal)) TmpDT.Columns.Add("Total", GetType(Decimal))
'Para uso del módulo contable 'Para uso del módulo contable
TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer)) TmpDT.Columns.Add("AsientoContableVentas", GetType(Integer))
TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer)) TmpDT.Columns.Add("IdCtaContVentas", GetType(Integer))
TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean)) TmpDT.Columns.Add("AplicaParaConcepto", GetType(Boolean))
TmpDT.Columns.Add("CveProyecto", GetType(Integer)) TmpDT.Columns.Add("CveProyecto", GetType(Integer))
TmpDT.Columns.Add("Proyecto", GetType(String)) TmpDT.Columns.Add("Proyecto", GetType(String))
TmpDT.Columns.Add("CveSubProyecto", GetType(Integer)) TmpDT.Columns.Add("CveSubProyecto", GetType(Integer))
TmpDT.Columns.Add("SubProyecto", GetType(String)) TmpDT.Columns.Add("SubProyecto", GetType(String))
'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto 'TipoDescuento: 1 = Descuento * PU; 2 = Descuento por Total del concepto
TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer)) TmpDT.Columns.Add("CvePresupuestoIngreso", GetType(Integer))
TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer)) TmpDT.Columns.Add("CveFuenteRecaudacion", GetType(Integer))
'Contratos 'Contratos
TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer)) TmpDT.Columns.Add("CveContratoDetalle", GetType(Integer))
'Remisiones a Facturas 'Remisiones a Facturas
TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer)) TmpDT.Columns.Add("CveVentaDetalle", GetType(Integer))
TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer)) TmpDT.Columns.Add("CveVentaDetalleRemision", GetType(Integer))
TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer)) TmpDT.Columns.Add("CveVentaDetalleCotizacion", GetType(Integer))
'Pedido2 a Facturas 'Pedido2 a Facturas
TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer)) TmpDT.Columns.Add("CveVentaDetallePedido2", GetType(Integer))
TmpDT.Columns.Add("Origen", GetType(Integer)) TmpDT.Columns.Add("Origen", GetType(Integer))
'Ordenes Servicio 'Ordenes Servicio
TmpDT.Columns.Add("CveOS", GetType(Integer)) TmpDT.Columns.Add("CveOS", GetType(Integer))
TmpDT.Columns.Add("CveOSDetalle", GetType(Integer)) TmpDT.Columns.Add("CveOSDetalle", GetType(Integer))
TmpDT.Columns.Add("SeFacturara", GetType(Integer)) TmpDT.Columns.Add("SeFacturara", GetType(Integer))
TmpDT.Columns.Add("Folio", GetType(Integer)) TmpDT.Columns.Add("Folio", GetType(Integer))
TmpDT.Columns.Add("Estatus", GetType(String)) TmpDT.Columns.Add("Estatus", GetType(String))
'Ordenamiento 'Ordenamiento
TmpDT.Columns.Add("Orden", GetType(Integer)) TmpDT.Columns.Add("Orden", GetType(Integer))
TmpDT.Columns.Add("TipoDocto", GetType(String)) TmpDT.Columns.Add("TipoDocto", GetType(String))
'OC 'OC
TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer)) TmpDT.Columns.Add("CveOrdenCompraDetalle", GetType(Integer))
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer)) TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer)) TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal)) TmpDT.Columns.Add("CantidadFacturadaRem", GetType(Decimal))
TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal)) TmpDT.Columns.Add("CantidadFacturadaCot", GetType(Decimal))
TmpDT.Columns.Add("CantidadInventario", GetType(Decimal)) TmpDT.Columns.Add("CantidadInventario", GetType(Decimal))
TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String)) TmpDT.Columns.Add("ClaveSATFraccionArancelaria", GetType(String))
TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String)) TmpDT.Columns.Add("ClaveSATUnidadAduana", GetType(String))
TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String)) TmpDT.Columns.Add("ClaveSATFraccionArancelariaDescripcion", GetType(String))
TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String)) TmpDT.Columns.Add("ClaveSATUnidadAduanaDescripcion", GetType(String))
TmpDT.Columns.Add("CveTamaño", GetType(Integer)) TmpDT.Columns.Add("CveTamaño", GetType(Integer))
Try Try
Dim ListaPS = JArray.Parse(JsonRequest("details").ToString()) Dim ListaPS = JArray.Parse(JsonRequest("details").ToString())
Dim DescuentoTotal As Decimal = JsonRequest("discount").ToString().ToDecimal() Dim DescuentoTotal As Decimal = JsonRequest("discount").ToString().ToDecimal()
@@ -1490,142 +1490,142 @@ Public Class E141 : Implements IHttpHandler
End If End If
Consec += 1 Consec += 1
Next Next
Catch ex As Exception Catch ex As Exception
Retorno.TieneError = True Retorno.TieneError = True
Retorno.Mensajes.Add(ex.ToString()) Retorno.Mensajes.Add(ex.ToString())
End Try End Try
If Retorno.TieneError = True Then If Retorno.TieneError = True Then
TmpDT.Clear() TmpDT.Clear()
TmpDT = Nothing TmpDT = Nothing
End If End If
Return TmpDT Return TmpDT
End Function End Function
Private Function AgregarProductoServicio(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, TmpDT As DataTable, Consec As Integer, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String, Private Function AgregarProductoServicio(ByRef Retorno As Modelos.Factura.MMensajeFactura, UsuarioActual As Usuario, TmpDT As DataTable, Consec As Integer, Cantidad As Decimal, CveUM As Integer, UM As String, CveClasificacion As Integer, Clasificacion As String, CvePS As Integer, PS As String, Obs As String,
PU As Decimal, Descuento As Decimal, CveSubProyecto As Integer, PU As Decimal, Descuento As Decimal, CveSubProyecto As Integer,
Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0, Optional Serie As String = "", Optional TiempoEntrega As String = "", Optional EntregaDirecta As Integer = 0,
Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0, Optional CveContratoDetalle As Integer = 0, Optional CveVentaDetalle As Integer = 0, Optional CveMovimientoDetallePedido As Integer = 0,
Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0, Optional CveOrdenCompraDetalle As Integer = 0, Optional CveVentaDetalleRemision As Integer = 0, Optional CveVentaDetalleCotizacion As Integer = 0,
Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0, Optional CuentaPredial As String = "", Optional RegeneraIEPS As Boolean = True, Optional CveVentaDetallePedido2 As Integer = 0,
Optional ClienteRetIVA As Double = 0, Optional ClienteRetISR As Double = 0, Optional ClienteDesglosaIEPS As Boolean = True) As DataRow Optional ClienteRetIVA As Double = 0, Optional ClienteRetISR As Double = 0, Optional ClienteDesglosaIEPS As Boolean = True) As DataRow
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("") Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS Is Nothing Then If DrPS Is Nothing Then
Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.") Retorno.Mensajes.Add("Ocurrió un error al cargar la información del Producto. Por favor vuelva a intentar.")
Return Nothing Return Nothing
End If End If
'verifica si tiene ventaminima 'verifica si tiene ventaminima
If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDouble() > 0 Then If Cantidad > 0 AndAlso DrPS("VentaMinima").ToString.ToDouble() > 0 Then
'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15... 'verifico que la cantidad sea multiplo de venta minima, es decir ventaminima =5, solo puede vender 5,10,15...
If Cantidad < DrPS("VentaMinima").ToString.ToDouble() Then If Cantidad < DrPS("VentaMinima").ToString.ToDouble() Then
Retorno.Mensajes.Add("La cantidad es menor que la venta minima") Retorno.Mensajes.Add("La cantidad es menor que la venta minima")
Return Nothing Return Nothing
End If End If
End If End If
If (DrPS("SATClaveUnidadMedida").ToString = "" Or DrPS("SATClavePS").ToString = "") Then If (DrPS("SATClaveUnidadMedida").ToString = "" Or DrPS("SATClavePS").ToString = "") Then
'VALIDA CLAVESAT 'VALIDA CLAVESAT
If DrPS("SATClavePS").ToString = "" Then If DrPS("SATClavePS").ToString = "" Then
Retorno.Mensajes.Add(String.Format("<b>{0}-{1}</b>: Sin producto SAT<br/>", DrPS("Codigo").ToString, DrPS("PS").ToString)) Retorno.Mensajes.Add(String.Format("<b>{0}-{1}</b>: Sin producto SAT<br/>", DrPS("Codigo").ToString, DrPS("PS").ToString))
Return Nothing Return Nothing
ElseIf DrPS("SATClaveUnidadMedida").ToString = "" Then ElseIf DrPS("SATClaveUnidadMedida").ToString = "" Then
Retorno.Mensajes.Add(String.Format("<b>{0}-{1}</b>: Sin Unidad Medida SAT<br/>", DrPS("Codigo").ToString, DrPS("PS").ToString)) Retorno.Mensajes.Add(String.Format("<b>{0}-{1}</b>: Sin Unidad Medida SAT<br/>", DrPS("Codigo").ToString, DrPS("PS").ToString))
Return Nothing Return Nothing
End If End If
End If End If
If Not ClienteDesglosaIEPS Then If Not ClienteDesglosaIEPS Then
If Not RegeneraIEPS Then If Not RegeneraIEPS Then
PU = PU * (1 + DrPS("IEPSPorcentaje").ToString.ToDecimal) PU = PU * (1 + DrPS("IEPSPorcentaje").ToString.ToDecimal)
End If End If
DrPS("IEPSPorcentaje") = 0 DrPS("IEPSPorcentaje") = 0
End If End If
Dim Row As DataRow = Nothing Dim Row As DataRow = Nothing
Dim TotalCalculableImpuestos As Decimal = 0 Dim TotalCalculableImpuestos As Decimal = 0
PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos PU = Math.Round(PU, 6) ' el precio unitario puede llevar hasta 6 decimales permitidos
Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0) Dim DrSubProyecto As DataRow = GlobalDTSubProyectos(-1, CveSubProyecto).Rows(0)
Row = TmpDT.NewRow() Row = TmpDT.NewRow()
Row("CveProyecto") = DrSubProyecto("CveProyecto").ToString().ToEntero() Row("CveProyecto") = DrSubProyecto("CveProyecto").ToString().ToEntero()
Row("Proyecto") = DrSubProyecto("Proyecto").ToString() Row("Proyecto") = DrSubProyecto("Proyecto").ToString()
Row("CveSubProyecto") = CveSubProyecto Row("CveSubProyecto") = CveSubProyecto
Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString() Row("SubProyecto") = DrSubProyecto("SubProyecto").ToString()
Row("Serie") = Serie Row("Serie") = Serie
Row("TiempoEntrega") = TiempoEntrega Row("TiempoEntrega") = TiempoEntrega
Row("Orden") = TmpDT.Rows.Count + 1 Row("Orden") = TmpDT.Rows.Count + 1
Row("Cantidad") = Cantidad Row("Cantidad") = Cantidad
Row("CveUM") = CveUM Row("CveUM") = CveUM
Row("UM") = UM Row("UM") = UM
Row("CveClasificacion") = CveClasificacion Row("CveClasificacion") = CveClasificacion
Row("Clasificacion") = Clasificacion Row("Clasificacion") = Clasificacion
Row("CvePS") = CvePS Row("CvePS") = CvePS
Row("Obs") = Obs Row("Obs") = Obs
TotalCalculableImpuestos = (Cantidad * PU) - Descuento TotalCalculableImpuestos = (Cantidad * PU) - Descuento
Row("PU") = PU Row("PU") = PU
Row("Codigo") = DrPS("Codigo") Row("Codigo") = DrPS("Codigo")
Row("NoIdentificacion") = DrPS("Codigo") Row("NoIdentificacion") = DrPS("Codigo")
Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria") Row("ClaveSATFraccionArancelaria") = DrPS("ClaveSATFraccionArancelaria")
Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana") Row("ClaveSATUnidadAduana") = DrPS("ClaveSATUnidadAduana")
Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion") Row("ClaveSATFraccionArancelariaDescripcion") = DrPS("ClaveSATFraccionArancelariaDescripcion")
Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion") Row("ClaveSATUnidadAduanaDescripcion") = DrPS("ClaveSATUnidadAduanaDescripcion")
Row("Consec") = Consec Row("Consec") = Consec
Row("PS") = DrPS("PS") Row("PS") = DrPS("PS")
Row("CodigoPS") = DrPS("PSCodigo").ToString Row("CodigoPS") = DrPS("PSCodigo").ToString
Row("CveTipoPS") = DrPS("CveTipoPS") Row("CveTipoPS") = DrPS("CveTipoPS")
Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario") Row("CveTipoInvPS") = DrPS("Inv_CveMetodoInventario")
Row("CveTamaño") = DrPS("CveTamaño") Row("CveTamaño") = DrPS("CveTamaño")
If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion") If CveClasificacion <= 0 Then Row("CveClasificacion") = DrPS("CveClasificacion")
If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion") If Clasificacion = "" Then Row("Clasificacion") = DrPS("Clasificacion")
If DrPS("IVA").ToString.Contiene("-1", "") Then If DrPS("IVA").ToString.Contiene("-1", "") Then
Row("PorcentajeIVA") = DrSubProyecto("IVA") Row("PorcentajeIVA") = DrSubProyecto("IVA")
Else Else
Row("PorcentajeIVA") = DrPS("IVA") Row("PorcentajeIVA") = DrPS("IVA")
End If End If
Row("IVA") = Row("PorcentajeIVA") Row("IVA") = Row("PorcentajeIVA")
Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, 2) Row("ImporteIVA") = Math.Round(Row("PorcentajeIVA").ToString.ToDecimal * TotalCalculableImpuestos, 2)
Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, 2) Row("ImporteRetIVA") = Math.Round(ClienteRetIVA * TotalCalculableImpuestos, 2)
Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, 2) Row("ImporteRetISR") = Math.Round(ClienteRetISR * TotalCalculableImpuestos, 2)
Row("PorcentajeRetIVA") = ClienteRetIVA Row("PorcentajeRetIVA") = ClienteRetIVA
Row("PorcentajeRetISR") = ClienteRetISR Row("PorcentajeRetISR") = ClienteRetISR
Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje") Row("PorcentajeIEPS") = DrPS("IEPSPorcentaje")
Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, 2) Row("ImporteIEPS") = Math.Round(DrPS("IEPSPorcentaje").ToString.ToDecimal * TotalCalculableImpuestos, 2)
Row("IEPS") = Row("ImporteIEPS") Row("IEPS") = Row("ImporteIEPS")
Row("Descuento") = Math.Round(Descuento, 2) Row("Descuento") = Math.Round(Descuento, 2)
Row("TipoDescuento") = "2" Row("TipoDescuento") = "2"
Row("Total") = Cantidad * PU Row("Total") = Cantidad * PU
Row("TotalImporte") = Math.Round(Cantidad * PU, 2) Row("TotalImporte") = Math.Round(Cantidad * PU, 2)
Row("SATClaveProdServ") = DrPS("SATClavePS") Row("SATClaveProdServ") = DrPS("SATClavePS")
Row("SATClaveUM") = DrPS("SATClaveUnidadMedida") Row("SATClaveUM") = DrPS("SATClaveUnidadMedida")
Row("EntregaDirecta") = EntregaDirecta Row("EntregaDirecta") = EntregaDirecta
'Contratos 'Contratos
Row("CveContratoDetalle") = CveContratoDetalle Row("CveContratoDetalle") = CveContratoDetalle
Row("CveVentaDetalle") = CveVentaDetalle Row("CveVentaDetalle") = CveVentaDetalle
Row("CveMovimientoDetallePedido") = CveMovimientoDetallePedido Row("CveMovimientoDetallePedido") = CveMovimientoDetallePedido
Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle Row("CveOrdenCompraDetalle") = CveOrdenCompraDetalle
Row("CveVentaDetalleRemision") = CveVentaDetalleRemision Row("CveVentaDetalleRemision") = CveVentaDetalleRemision
Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion Row("CveVentaDetalleCotizacion") = CveVentaDetalleCotizacion
Row("CveVentaDetallePedido2") = CveVentaDetallePedido2 Row("CveVentaDetallePedido2") = CveVentaDetallePedido2
Row("CuentaPredial") = CuentaPredial Row("CuentaPredial") = CuentaPredial
'RECARGAR GV 'RECARGAR GV
Return Row Return Row
End Function End Function
#End Region #End Region
@@ -2353,7 +2353,7 @@ Public Class E141 : Implements IHttpHandler
#Region "D E S C A R G A - P D F" #Region "D E S C A R G A - P D F"
Private Function DescargarFactura(FilePDF As String) As Byte() Private Function DescargarFactura(FilePDF As String) As Byte()
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?TipoDocto=Ing&File={1}&TipoArchivo=PDF", "http://localhost/", FilePDF)) Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?TipoDocto=Ing&File={3}&TipoArchivo=PDF", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, FilePDF))
Dim File As Byte() = Nothing Dim File As Byte() = Nothing
Try Try
Using httpClient = New HttpClient() Using httpClient = New HttpClient()

View File

@@ -175,9 +175,7 @@
<div class="col-md-2" runat="server" style="text-align: left;"> <div class="col-md-2" runat="server" style="text-align: left;">
<asp:TextBox ID="TxtObservaciones" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500"></asp:TextBox> <asp:TextBox ID="TxtObservaciones" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtObservaciones" runat="server" ControlToValidate="TxtObservaciones" Display="None" ErrorMessage="El campo <b>''Observaciones''</b> es requerido por la aplicación." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VceRfvTxtObservaciones" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtObservaciones" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>

View File

@@ -38,10 +38,10 @@ Partial Class Bancos_DepositosCaja
End Sub End Sub
Private Sub CargaCuentas() Private Sub CargaCuentas()
DdlCuentaDeposito.DataSource = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1", "", {"CveCuenta", "NumCuentaMoneda"}) DdlCuentaDeposito.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta <> 1", "", {"CveCuenta", "NumCuentaMoneda"})
DdlCuentaDeposito.DataBind() DdlCuentaDeposito.DataBind()
DdlCajaChica.DataSource = GlobalDTBancosCuentas(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"}) DdlCajaChica.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros(" CveTipoCuenta = 1", "", {"CveCuenta", "NumCuentaMoneda"})
DdlCajaChica.DataBind() DdlCajaChica.DataBind()
DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectos.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)

View File

@@ -231,7 +231,7 @@
<asp:Literal ID="LtlTotalIngreso" runat="server" Text='<%# Eval("TotalIngresos", "{0:N2}") %>'></asp:Literal> <asp:Literal ID="LtlTotalIngreso" runat="server" Text='<%# Eval("TotalIngresos", "{0:N2}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate> <HeaderTemplate>
<asp:Label Text="Devoluciones" runat="server" CausesValidation="false"> </asp:Label> <asp:Label Text="Devoluciones" runat="server" CausesValidation="false"> </asp:Label>
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
@@ -240,7 +240,16 @@
<asp:Literal ID="LtlDevoluciones" runat="server" Text='<%# Eval("Devoluciones", "{0:#,###.##}") %>'></asp:Literal> <asp:Literal ID="LtlDevoluciones" runat="server" Text='<%# Eval("Devoluciones", "{0:#,###.##}") %>'></asp:Literal>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Center"> <asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate>
<asp:Label Text="Importe Inicial" runat="server" CausesValidation="false"> </asp:Label>
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>
</HeaderTemplate>
<ItemTemplate>
<asp:Literal ID="LtlImporteInicial" runat="server" Text='<%# Eval("ImporteInicial", "{0:N2}") %>'></asp:Literal>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField ItemStyle-HorizontalAlign="Right">
<HeaderTemplate> <HeaderTemplate>
<asp:Label Text="Total Caja" runat="server" CausesValidation="false"> </asp:Label> <asp:Label Text="Total Caja" runat="server" CausesValidation="false"> </asp:Label>
<asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal> <asp:Literal runat="server" Text=" <i class='fa fa-sort' style='color:#999' ></i>"></asp:Literal>

View File

@@ -8,10 +8,17 @@ Imports System.Collections.Generic
Partial Class Bancos_RepCortes Partial Class Bancos_RepCortes
Inherits ClsPaginas Inherits ClsPaginas
Private Shared missing As Object = System.Reflection.Missing.Value Private Shared missing As Object = System.Reflection.Missing.Value
#Region "PROPIEDADES" #Region "PROPIEDADES"
Private Property DtCortes As DataTable
Get
Return CType(ViewState("DtCortes"), DataTable)
End Get
Set(value As DataTable)
ViewState("DtCortes") = value
End Set
End Property
Private Property DtCortesVentasResumen As DataTable Private Property DtCortesVentasResumen As DataTable
Get Get
Return CType(ViewState("DtCortesVentasResumen"), DataTable) Return CType(ViewState("DtCortesVentasResumen"), DataTable)
@@ -67,16 +74,20 @@ Partial Class Bancos_RepCortes
#Region " C A R G A - D A T O S " #Region " C A R G A - D A T O S "
Public Sub CargaDatos() Public Sub CargaDatos()
Dim ObjPuntoVenta As New ClsPuntoVenta
Dim FechaI As Date = If(txtFechaVI.Text <> "", txtFechaVI.Text.ToDate, MinFecha) Dim FechaI As Date = If(txtFechaVI.Text <> "", txtFechaVI.Text.ToDate, MinFecha)
Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha) Dim FechaF As Date = If(txtFechaVF.Text <> "", txtFechaVF.Text.ToDate, MaxFecha)
Dim ObjPuntoVenta As New ClsPuntoVenta
If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then If ObjPuntoVenta.GetVta_ReporteCortes(UsuarioActual.CveEmpresa, FechaI, FechaF, DdlSubProyectos.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjPuntoVenta.DtResultados DtCortes = ObjPuntoVenta.DtResultados.Copy()
GvDatos.DataBind()
UPDatos.Update()
End If End If
ObjPuntoVenta.Dispose() ObjPuntoVenta.Dispose()
GvDatos.DataSource = DtCortes
GvDatos.DataBind()
UPDatos.Update()
End Sub End Sub
#End Region #End Region
@@ -85,6 +96,9 @@ Partial Class Bancos_RepCortes
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If e.Row.DBCampo("CveCorte").ToString = "" Then If e.Row.DBCampo("CveCorte").ToString = "" Then
e.Row.CssClass = "SubTotales2" e.Row.CssClass = "SubTotales2"
If DtCortes IsNot Nothing Then
e.Row.FCLiteral("LtlImporteInicial").Text = DtCortes.SUMD("ImporteInicial").FormatoNumero(2)
End If
End If End If
End If End If
End Sub End Sub

View File

@@ -156,7 +156,7 @@
<asp:GridView ID="GvCxC" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" AlternatingRowStyle-BackColor="" Width="100%" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" CssClass="table table-striped table-hover Widthall" GridLines="None"> <asp:GridView ID="GvCxC" ClientIDMode="Static" runat="server" AutoGenerateColumns="False" AlternatingRowStyle-BackColor="" Width="100%" EmptyDataText="No se encontraron Cuentas X Cobrar Pendientes" CssClass="table table-striped table-hover Widthall" GridLines="None">
<Columns> <Columns>
<asp:TemplateField ItemStyle-Width="30%" HeaderText="Cliente"> <asp:TemplateField HeaderText="Cliente">
<ItemTemplate> <ItemTemplate>
<asp:HyperLink ID="Hpl" runat="server" Text='<%#String.Format("{0}{1}{2}", Eval("NombreComercial"), If(Eval("SucursalCliente").ToString.Length > 0, " - ", " "), Eval("SucursalCliente")) %>' NavigateUrl='<%# String.Format("/Ventas/Clientes.aspx?CveCliente={0}", Eval("CveCliente"))%>'> <asp:HyperLink ID="Hpl" runat="server" Text='<%#String.Format("{0}{1}{2}", Eval("NombreComercial"), If(Eval("SucursalCliente").ToString.Length > 0, " - ", " "), Eval("SucursalCliente")) %>' NavigateUrl='<%# String.Format("/Ventas/Clientes.aspx?CveCliente={0}", Eval("CveCliente"))%>'>
</asp:HyperLink> </asp:HyperLink>
@@ -164,8 +164,8 @@
</asp:TemplateField> </asp:TemplateField>
<asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="10%" Visible="false" /> <asp:BoundField HeaderText="Sucursal" DataField="SubProyecto" ItemStyle-Width="10%" Visible="false" />
<asp:BoundField HeaderText="# Fact" DataField="NumFacturas" ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%" /> <asp:BoundField HeaderText="# Fact" DataField="NumFacturas" ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%" />
<asp:BoundField HeaderText="Último Vencimiento" DataField="UltimoVencimiento" ItemStyle-HorizontalAlign="center" ItemStyle-Width="10%" /> <asp:BoundField HeaderText="Último Venc." DataField="UltimoVencimiento" ItemStyle-HorizontalAlign="center" ItemStyle-Width="5%" />
<asp:TemplateField HeaderText="Original" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Original" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15%">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlO" runat="server" Text='<%# Eval("Original","{0:C}") %>'></asp:Literal> <asp:Literal ID="LtlO" runat="server" Text='<%# Eval("Original","{0:C}") %>'></asp:Literal>
<asp:Literal ID="LtlA" runat="server" Text='<%# Eval("Abreviatura","{0:C}") %>'></asp:Literal> <asp:Literal ID="LtlA" runat="server" Text='<%# Eval("Abreviatura","{0:C}") %>'></asp:Literal>

View File

@@ -15074,7 +15074,10 @@ Partial Class Compras_Compras
dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero, dr("CveVenta").ToString.ToEntero, dr("CveCompra").ToString.ToEntero, dr("CveSubProyecto").ToString.ToEntero, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, dr("CvePersonal").ToString.ToEntero,
If(cvemovimientoentrada > 0, cvemovimientoentrada, dr("CveMovimientoAlmacen").ToString.ToEntero), If(cvemovimientoentrada > 0, cvemovimientoentrada, dr("CveMovimientoAlmacen").ToString.ToEntero),
dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero, dr("CveActivoFijo").ToString.ToEntero, -1, -1, dr("CveCreditoDetalle").ToString.ToEntero,
ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1, CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero, CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then ImporteMX:=dr("Importe").ToString.ToDecimal * -1, ImporteME:=dr("Importe").ToString.ToDecimal * -1,
CveTipoGasto:=dr("CveTipoGasto").ToString.ToEntero, CveClasificacion:=dr("CveClasificacion").ToString.ToEntero,
PorcentajeImpuesto:=dr("PorcentajeImpuesto").ToString.ToDecimal,
CveOCDetalle:=dr("CveOCDetalle").ToString.ToEntero) Then
ErrorCancelar = True ErrorCancelar = True
Exit For Exit For
End If End If

View File

@@ -268,7 +268,7 @@ Partial Class PopUpAuxiliar
End If End If
If Not TieneError Then If Not TieneError Then
If IdPoliza > 0 Then If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso IdPoliza > 0 Then
If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then If UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.UsaContabilidad Then
ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa) ObjContPaq = New ClsContPAQi(UsuarioActual.Empresa)
ObjContPaq.IniciaTransacSQL() ObjContPaq.IniciaTransacSQL()
@@ -410,8 +410,9 @@ Partial Class PopUpAuxiliar
RegistraScript(" $('#DivCancelar').modal('hide'); ") RegistraScript(" $('#DivCancelar').modal('hide'); ")
If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then If UsuarioActual.Empresa.Funcionalidad(200) = "1" Then
If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then If ObjContabilidad.ContabilizarPrePoliza(CvePrePolizaNueva, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza) If UsuarioActual.Empresa.TipoContabilidad = 2 Then
Str.AppendFormat("<a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>Ver Poliza</a>", ObjContabilidad.ContaIdPoliza)
End If
End If End If
End If End If
Alert(Str.ToString) Alert(Str.ToString)
@@ -420,8 +421,6 @@ Partial Class PopUpAuxiliar
End If End If
ObjContabilidad.Dispose() ObjContabilidad.Dispose()
CargaDatos() CargaDatos()

View File

@@ -37,6 +37,14 @@
<DataField>Envase</DataField> <DataField>Envase</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
</Field> </Field>
<Field Name="ImpManifiesto">
<DataField>ImpManifiesto</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="TipoTarima">
<DataField>TipoTarima</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
<Field Name="Cultivo"> <Field Name="Cultivo">
<DataField>Cultivo</DataField> <DataField>Cultivo</DataField>
<rd:TypeName>System.String</rd:TypeName> <rd:TypeName>System.String</rd:TypeName>
@@ -68,16 +76,16 @@
<TablixBody> <TablixBody>
<TablixColumns> <TablixColumns>
<TablixColumn> <TablixColumn>
<Width>2.45401cm</Width> <Width>2.59615cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>2.30818cm</Width> <Width>2.45032cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>1.99068cm</Width> <Width>2.13282cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>2.2288cm</Width> <Width>2.37094cm</Width>
</TablixColumn> </TablixColumn>
</TablixColumns> </TablixColumns>
<TablixRows> <TablixRows>
@@ -505,9 +513,9 @@
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<Top>0.3175cm</Top> <Top>0.3175cm</Top>
<Left>10.3553cm</Left> <Left>9.78675cm</Left>
<Height>3cm</Height> <Height>3cm</Height>
<Width>8.98167cm</Width> <Width>9.55023cm</Width>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>
@@ -1146,7 +1154,7 @@
<TablixMember /> <TablixMember />
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<Top>18.67696cm</Top> <Top>19.44425cm</Top>
<Left>3.27925cm</Left> <Left>3.27925cm</Left>
<Height>1.58833cm</Height> <Height>1.58833cm</Height>
<Width>14.27209cm</Width> <Width>14.27209cm</Width>
@@ -4568,7 +4576,7 @@
</TextRun> </TextRun>
</TextRuns> </TextRuns>
<Style> <Style>
<TextAlign>Right</TextAlign> <TextAlign>Left</TextAlign>
</Style> </Style>
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
@@ -6845,13 +6853,16 @@
<Width>1.68042cm</Width> <Width>1.68042cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>7.32708cm</Width> <Width>5.85895cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>3.69064cm</Width> <Width>3.10853cm</Width>
</TablixColumn> </TablixColumn>
<TablixColumn> <TablixColumn>
<Width>4.65604cm</Width> <Width>3.16148cm</Width>
</TablixColumn>
<TablixColumn>
<Width>3.5448cm</Width>
</TablixColumn> </TablixColumn>
</TablixColumns> </TablixColumns>
<TablixRows> <TablixRows>
@@ -7011,6 +7022,57 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="Textbox12">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Tarima</Value>
<Style />
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox12</rd:DefaultName>
<Style>
<Border>
<Style>Solid</Style>
<Width>2pt</Width>
</Border>
<TopBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>2pt</Width>
</TopBorder>
<BottomBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>2pt</Width>
</BottomBorder>
<LeftBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>2pt</Width>
</LeftBorder>
<RightBorder>
<Color>Black</Color>
<Style>Solid</Style>
<Width>2pt</Width>
</RightBorder>
<BackgroundColor>Silver</BackgroundColor>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Textbox1"> <Textbox Name="Textbox1">
@@ -7214,6 +7276,38 @@
</Textbox> </Textbox>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell>
<CellContents>
<Textbox Name="TipoTarima">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=IIf(Fields!ImpManifiesto.Value.ToString() ="1",Fields!TipoTarima.Value.ToString() ,"")</Value>
<Style>
<FontSize>8pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs>
<rd:DefaultName>TipoTarima</rd:DefaultName>
<Style>
<Border>
<Color>LightGrey</Color>
<Style>Solid</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</CellContents>
</TablixCell>
<TablixCell> <TablixCell>
<CellContents> <CellContents>
<Textbox Name="Etiqueta"> <Textbox Name="Etiqueta">
@@ -7287,6 +7381,11 @@
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
<TablixMember>
<Visibility>
<Hidden>=(MAX(Fields!ImpManifiesto.Value.ToString() )&lt;&gt;"1")</Hidden>
</Visibility>
</TablixMember>
<TablixMember /> <TablixMember />
<TablixMember /> <TablixMember />
</TablixMembers> </TablixMembers>
@@ -7314,10 +7413,10 @@
</Style> </Style>
</Tablix> </Tablix>
</ReportItems> </ReportItems>
<Height>8.07349in</Height> <Height>8.28054in</Height>
<Style /> <Style />
</Body> </Body>
<Width>7.64435in</Width> <Width>7.67548in</Width>
<Page> <Page>
<PageHeight>29.7cm</PageHeight> <PageHeight>29.7cm</PageHeight>
<PageWidth>21cm</PageWidth> <PageWidth>21cm</PageWidth>

View File

@@ -18,8 +18,8 @@ Partial Class Inicio
Dim retorno As Boolean = False Dim retorno As Boolean = False
Try Try
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient() Dim objServicio As New Cancelacion2022.CancelacionSoapClient()
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890") Dim resp As Cancelacion2022.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
If resp.Estado = 0 Then If resp.Estado = 0 Then
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)) Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes) Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
@@ -1256,11 +1256,11 @@ Partial Class Inicio
' Dim filePath As String = $"{Server.MapPath("~")}\Documentacion\140\{DirectCast(sender, LinkButton).Attributes("NombreArchivo")}" ' Dim filePath As String = $"{Server.MapPath("~")}\Documentacion\140\{DirectCast(sender, LinkButton).Attributes("NombreArchivo")}"
' Dim Archivo As New System.IO.FileInfo(filePath) ' Dim Archivo As New System.IO.FileInfo(filePath)
' Dim mimeType As String = Nothing ' Dim mimeType As String = Nothing
' If Archivo.Exists Then ' If Archivo.Exists Then
' HttpContext.Current.Response.Buffer = True ' HttpContext.Current.Response.Buffer = True

View File

@@ -85,9 +85,13 @@
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<asp:Label runat="server" CssClass="col-md-1">Cliente: </asp:Label>
<div class="col-md-2">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesfilter" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 140px"></ADS:Dropdownlost>
</div>
</div> </div>
<ul class="list-inline"> <ul class="list-inline">
<%--<li>Cliente: <%--<li>
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" /> <asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
<asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;"> <asp:DropDownList ID="DdlCliente" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveCliente" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 250px !important;">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -176,8 +180,8 @@
<asp:TemplateField> <asp:TemplateField>
<HeaderTemplate>Turno</HeaderTemplate> <HeaderTemplate>Turno</HeaderTemplate>
<ItemTemplate> <ItemTemplate>
<asp:Literal runat="server" Text='<%# Eval("Turno") %>'></asp:Literal> <%--<asp:Literal runat="server" Text='<%# Eval("Turno") %>'></asp:Literal>--%>
<%--<asp:DropDownList ID="DdlTurno" runat="server" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>--%> <asp:DropDownList ID="DdlTurno" runat="server" DataTextField="Turno" DataValueField="CveTurno" Class="table-group-action-input form-control input-inline input-small input-sm" Style="width: 90px !important;"></asp:DropDownList>
</ItemTemplate> </ItemTemplate>
<ItemStyle HorizontalAlign="Left" /> <ItemStyle HorizontalAlign="Left" />
</asp:TemplateField> </asp:TemplateField>

View File

@@ -88,9 +88,16 @@ Partial Class RH_ActualizacionMasiva
End Sub End Sub
Private Sub CargaTurnos() Private Sub CargaTurnos()
ViewState("DTTurno") = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) Dim dt = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
DdlTurno.DataSource = GlobalDTTurno.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa)) DdlTurno.DataSource = dt
DdlTurno.DataBind() DdlTurno.DataBind()
Dim row = dt.NewRow
row("CveTurno") = "-1"
row("Turno") = "Sin Asignar"
dt.Rows.InsertAt(row, 0)
dt.AcceptChanges()
ViewState("DTTurno") = dt
End Sub End Sub
Private Sub CargaSupervisores() Private Sub CargaSupervisores()
@@ -180,6 +187,10 @@ Partial Class RH_ActualizacionMasiva
e.Row.FCDropDownList("DdlSupervisor").DataBind() e.Row.FCDropDownList("DdlSupervisor").DataBind()
e.Row.FCDropDownList("DdlSupervisor").Items.Insert(0, New ListItem("Sin Supervisor Asignado", "-1")) e.Row.FCDropDownList("DdlSupervisor").Items.Insert(0, New ListItem("Sin Supervisor Asignado", "-1"))
e.Row.FCDropDownList("DdlSupervisor").SelectedValueExist(e.Row.DBCampo("CveSupervisor").ToString()) e.Row.FCDropDownList("DdlSupervisor").SelectedValueExist(e.Row.DBCampo("CveSupervisor").ToString())
e.Row.FCDropDownList("DdlTurno").DataSource = ViewState("DTTurno")
e.Row.FCDropDownList("DdlTurno").DataBind()
e.Row.FCDropDownList("DdlTurno").SelectedValueExist("-1")
e.Row.FCDropDownList("DdlTurno").SelectedValueExist(e.Row.DBCampo("CveTurno").ToString())
e.Row.FCDropDownLost("DdlClientes").SelectedValue = e.Row.DBCampo("CveCliente") e.Row.FCDropDownLost("DdlClientes").SelectedValue = e.Row.DBCampo("CveCliente")
e.Row.FCDropDownLost("DdlClientes").SelectedText = e.Row.DBCampo("Cliente") e.Row.FCDropDownLost("DdlClientes").SelectedText = e.Row.DBCampo("Cliente")

View File

@@ -10,6 +10,9 @@
Registro de Asistencias Registro de Asistencias
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:HyperLink ID="HyperLink1" NavigateUrl="#" runat="server"><i class="fa fa-file-pdf-o" style="color: #6D0C2E;" aria-hidden="true"></i>Lista asistencia</asp:HyperLink>
</li>
<asp:Panel ID="PnlMasivo" runat="server" Visible="False"> <asp:Panel ID="PnlMasivo" runat="server" Visible="False">
<li> <li>
<asp:HyperLink ID="HypCargaAsistenciaMasiva" data-toggle="modal" data-target="#DModalCargaASistenciaMasiva" runat="server"><i class="fa fa-check" aria-hidden="true"></i>Carga masiva de asistencia</asp:HyperLink> <asp:HyperLink ID="HypCargaAsistenciaMasiva" data-toggle="modal" data-target="#DModalCargaASistenciaMasiva" runat="server"><i class="fa fa-check" aria-hidden="true"></i>Carga masiva de asistencia</asp:HyperLink>

View File

@@ -42,15 +42,14 @@
} }
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2) .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2)
/*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */ /*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */ {
{
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3), .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4), .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4),
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5)/*, .reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5) /*,
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3), .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3),
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4), .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4),
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ { .reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ {
@@ -66,15 +65,15 @@
text-align: right !important; text-align: right !important;
white-space: nowrap; white-space: nowrap;
} }
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*, .reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ { .reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7))/*, .reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7)) /*,
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/{ .reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/ {
background-color: #3598dc; background-color: #3598dc;
color: #FFF; color: #FFF;
} }
@@ -94,15 +93,15 @@
} }
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2), .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20)/*, .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20) /*,
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2), .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2),
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/{ .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/ {
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1), .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1),
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20))/*, .reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20)) /*,
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1), .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1),
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ { .reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ {
background-color: #3598dc; background-color: #3598dc;
@@ -115,25 +114,26 @@
text-align: right !important; text-align: right !important;
white-space: nowrap; white-space: nowrap;
} }
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*, .reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ { .reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6))/*, .reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) /*,
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ { .reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ {
background-color: #3598dc; background-color: #3598dc;
color: #FFF; color: #FFF;
} }
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2)/*, .reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ { .reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3)/*,
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3) /*,
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ { .reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ {
background-color: #3598dc; background-color: #3598dc;
color: #FFF; color: #FFF;
@@ -143,7 +143,7 @@
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) { .reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) {
white-space: nowrap; white-space: nowrap;
} }
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4), .reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4),
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) { .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) {
text-align: right !important; text-align: right !important;
@@ -153,13 +153,14 @@
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) { .reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) {
background-color: #3598dc; background-color: #3598dc;
color: #FFF; color: #FFF;
} }
.reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3), .reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3),
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) { .reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) {
text-align: right !important; text-align: right !important;
@@ -169,14 +170,15 @@
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) { .reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
background-color: #3598dc; background-color: #3598dc;
color: #FFF; color: #FFF;
} }
.reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6), .reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6),
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) { .reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) {
text-align: right !important; text-align: right !important;
@@ -186,16 +188,18 @@
background-color: #900; background-color: #900;
color: #FFF; color: #FFF;
} }
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) { .reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) {
background-color: #3598dc; background-color: #3598dc;
color: #FFF; color: #FFF;
} }
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1), .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) { .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) {
white-space: nowrap; white-space: nowrap;
} }
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(2), .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(2),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(3), .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(3),
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(n+40) { .reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(n+40) {
@@ -210,14 +214,14 @@
</asp:Content> </asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server"> <asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li> <li>
<asp:LinkButton ID="LnkDownloadExcel" OnClick="LnkDownloadExcel_Click" runat="server"><i class="fa fa-download"></i>Descargar</asp:LinkButton> <asp:LinkButton ID="LnkDownloadExcel" OnClick="LnkDownloadExcel_Click" runat="server"><i class="fa fa-download"></i>Descargar</asp:LinkButton>
</li> </li>
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
<ContentTemplate> <contenttemplate>
<li> <li>
<asp:LinkButton ID="LnkShowSolicitudes" OnClick="LnkShowSolicitudes_Click" runat="server">Solicitudes</asp:LinkButton> <asp:LinkButton ID="LnkShowSolicitudes" OnClick="LnkShowSolicitudes_Click" runat="server">Solicitudes</asp:LinkButton>
</li> </li>
</ContentTemplate> </contenttemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</asp:Content> </asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server"> <asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
@@ -225,7 +229,7 @@
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel ID="upDatosChec" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="upDatosChec" runat="server" UpdateMode="Conditional">
<ContentTemplate> <contenttemplate>
<div class="portlet solid grey-cascade portlet-filter"> <div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle"> <div class="portlet-title portlet-filterT smalltitle">
<div class="titlefiltros caption"> <div class="titlefiltros caption">
@@ -246,7 +250,7 @@
</asp:DropDownList> </asp:DropDownList>
</div> </div>
<label class="col-md-1 mediocol">Fecha inicio:</label> <label class="col-md-1 mediocol">Fecha inicio:</label>
<div class="col-md-1"> <div class="col-md-2">
<%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%> <%--<asp:TextBox ID="TxtPeriodoInicio" Text="0" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
@@ -254,27 +258,27 @@
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkRpdFechaInicio" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
<ajax:MaskedEditExtender ID="MaskedEditExtender3" runat="server" TargetControlID="TxtRpdFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:maskededitextender id="MaskedEditExtender3" runat="server" targetcontrolid="TxtRpdFechaInicio" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender3" TargetControlID="TxtRpdFechaInicio" PopupButtonID="LnkRpdFechaInicio" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> <ajax:calendarextender runat="server" id="CalendarExtender3" targetcontrolid="TxtRpdFechaInicio" popupbuttonid="LnkRpdFechaInicio" popupposition="BottomRight" enabled="True" format="dd/MM/yyyy"></ajax:calendarextender>
<asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvRpdFechaInicio" runat="server" ControlToValidate="TxtRpdFechaInicio" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Inicio''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaInicio"></ajax:ValidatorCalloutExtender> <ajax:validatorcalloutextender id="ValidatorCalloutExtender1" runat="server" highlightcssclass="vco" targetcontrolid="rfvRpdFechaInicio"></ajax:validatorcalloutextender>
</div> </div>
</div> </div>
<label class="col-md-1 mediocol">Fecha fin:</label> <label class="col-md-1 mediocol">Fecha fin:</label>
<div class="col-md-1"> <div class="col-md-2">
<%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%> <%--<asp:TextBox ID="TxtPeriodoFin" Text="99" CssClass="form-control" runat="server"></asp:TextBox>--%>
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox> <asp:TextBox ID="TxtRpdFechaFin" CssClass="form-control input-sm ADSMaskDate" Style="width: 80px" runat="server"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkFechaFin" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
<ajax:MaskedEditExtender ID="MaskedEditExtender5" runat="server" TargetControlID="TxtRpdFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender> <ajax:maskededitextender id="MaskedEditExtender5" runat="server" targetcontrolid="TxtRpdFechaFin" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender4" TargetControlID="TxtRpdFechaFin" PopupButtonID="LnkFechaFin" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender> <ajax:calendarextender runat="server" id="CalendarExtender4" targetcontrolid="TxtRpdFechaFin" popupbuttonid="LnkFechaFin" popupposition="BottomRight" enabled="True" format="dd/MM/yyyy"></ajax:calendarextender>
<asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="rfvRpdFechaFin" runat="server" ControlToValidate="TxtRpdFechaFin" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha Fin''</b> es necesario, por favor ingréselo." ValidationGroup="VGReporterepperde"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="rfvRpdFechaFin"></ajax:ValidatorCalloutExtender> <ajax:validatorcalloutextender id="ValidatorCalloutExtender2" runat="server" highlightcssclass="vco" targetcontrolid="rfvRpdFechaFin"></ajax:validatorcalloutextender>
</div> </div>
</div> </div>
<div class="col-md-3"> <div class="col-md-2">
<asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" /> <asp:LinkButton ID="LnkConsultar" OnClick="LnkConsultar_Click" runat="server" Text="Consultar" Visible="true" class="btn btn-primary" />
</div> </div>
</div> </div>
@@ -385,18 +389,18 @@
<%--DataKeyNames="Periodo,Version CFDI,Version Nómina,UUID,UUIDs relacionados,Tipo relacion,Tipo nomina,Serie,Folio,Fecha emision,Fecha certificacion,Fecha cancelacion,Fecha pago,Fecha inicial pago,Fecha final pago,Dias pagados,RFC emisor,Razon emisor,Registro patronal,RFC receptor,Razon receptor,Fecha inicio relacion laboral,Tipo contrato,Tipo jornada,Tipo regimen,Num empleado,Antiguedad,Sindicalizado,ClaveEntFed,Banco,Cuenta bancaria,CURP,No Seguro social,Departamento,Puesto,Periodicidad pago,Salario base cot apor,Salario diario integrado,Estado"--%> <%--DataKeyNames="Periodo,Version CFDI,Version Nómina,UUID,UUIDs relacionados,Tipo relacion,Tipo nomina,Serie,Folio,Fecha emision,Fecha certificacion,Fecha cancelacion,Fecha pago,Fecha inicial pago,Fecha final pago,Dias pagados,RFC emisor,Razon emisor,Registro patronal,RFC receptor,Razon receptor,Fecha inicio relacion laboral,Tipo contrato,Tipo jornada,Tipo regimen,Num empleado,Antiguedad,Sindicalizado,ClaveEntFed,Banco,Cuenta bancaria,CURP,No Seguro social,Departamento,Puesto,Periodicidad pago,Salario base cot apor,Salario diario integrado,Estado"--%>
<asp:GridView ID="GVSolicitudTimbreNominaGral" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVSolicitudTimbreNominaGral" AutoGenerateColumns="true"> <asp:GridView ID="GVSolicitudTimbreNominaGral" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVSolicitudTimbreNominaGral" AutoGenerateColumns="true">
<Columns></Columns> <columns></columns>
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
</ContentTemplate> </contenttemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
<div id="ModalViewSolicitudes" class="modal ADS fade" role="dialog"> <div id="ModalViewSolicitudes" class="modal ADS fade" role="dialog">
<asp:UpdatePanel ID="UPModalViewSolicitudes" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UPModalViewSolicitudes" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
<ContentTemplate> <contenttemplate>
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">
<button type="button" class="close" data-dismiss="modal">&times;</button> <button type="button" class="close" data-dismiss="modal">&times;</button>
@@ -417,50 +421,53 @@
</div> </div>
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom " style="display: none"> <div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom " style="display: none">
<div class="row"> <div class="row">
<div class="col-md-4">
<div class="col-md-4" data-date-format="dd/mm/yyyy" style="padding-right: 0px;"> <asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="txtFechaIAdd"></asp:Label>
<div class="form-group form-md-line-input form-md-floating-label input-iconright">
<asp:TextBox ID="txtFechaIAdd" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<asp:Label runat="server" Text="Fecha Inicio" AssociatedControlID="txtFechaIAdd"></asp:Label>
</div>
<ajax:MaskedEditExtender ID="MEEFechaIAdd" runat="server" TargetControlID="txtFechaIAdd" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtFechaIAdd" PopupButtonID="LnkFechaIAdd" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaIAdd" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaIAdd" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="col-md-2" style="padding-top: 14px; padding-left: 0px;"> <div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " style="padding-left: 0px;" data-date-format="dd/mm/yyyy">
<asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="txtFechaFAdd"></asp:Label>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="txtFechaIAdd" CssClass="form-control input-sm ADSMaskDate" Style="" runat="server"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaIAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkFechaIAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
<ajax:maskededitextender id="MEEFechaIAdd" runat="server" targetcontrolid="txtFechaIAdd" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
<ajax:calendarextender runat="server" id="CalendarExtender1" targetcontrolid="txtFechaIAdd" popupbuttonid="LnkFechaIAdd" popupposition="BottomRight" enabled="True"></ajax:calendarextender>
<asp:RequiredFieldValidator ID="rfvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaIAdd" runat="server" ControlToValidate="txtFechaIAdd" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender3" runat="server" highlightcssclass="vco" targetcontrolid="rfvFechaIAdd" width="350px"></ajax:validatorcalloutextender>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender4" runat="server" highlightcssclass="vco" targetcontrolid="cvFechaIAdd" width="350px"></ajax:validatorcalloutextender>
</div> </div>
</div> </div>
<div class="col-md-4" data-date-format="dd/mm/yyyy" style="padding-right: 0px;"> <div class="col-md-4">
<div class="form-group form-md-line-input form-md-floating-label input-iconright"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 138px !important; padding: 0px; margin-bottom: -10px;">
<asp:TextBox ID="txtFechaFAdd" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox> <asp:TextBox ID="txtFechaFAdd" CssClass="form-control input-sm ADSMaskDate" Style="" runat="server"></asp:TextBox>
<asp:Label runat="server" Text="Fecha Fin" AssociatedControlID="txtFechaFAdd"></asp:Label>
</div>
<ajax:MaskedEditExtender ID="MEEFechaFAdd" runat="server" TargetControlID="txtFechaFAdd" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="txtFechaFAdd" PopupButtonID="LnkFechaFAdd" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender5" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender6" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaFAdd" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
<div class="col-md-2" style="padding-top: 14px; padding-left: 0px;">
<div class="input-group input-sm input-small date date-picker " style="padding-left: 0px;" data-date-format="dd/mm/yyyy">
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="LnkFechaFAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="LnkFechaFAdd" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
<ajax:maskededitextender id="MEEFechaFAdd" runat="server" targetcontrolid="txtFechaFAdd" mask="99/99/9999" masktype="Date" displaymoney="Left" acceptnegative="Left"></ajax:maskededitextender>
<ajax:calendarextender runat="server" id="CalendarExtender2" targetcontrolid="txtFechaFAdd" popupbuttonid="LnkFechaFAdd" popupposition="BottomRight" enabled="True"></ajax:calendarextender>
<asp:RequiredFieldValidator ID="rfvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="VGAdd"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaFAdd" runat="server" ControlToValidate="txtFechaFAdd" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender5" runat="server" highlightcssclass="vco" targetcontrolid="rfvFechaFAdd" width="350px"></ajax:validatorcalloutextender>
<ajax:validatorcalloutextender id="ValidatorCalloutExtender6" runat="server" highlightcssclass="vco" targetcontrolid="cvFechaFAdd" width="350px"></ajax:validatorcalloutextender>
</div> </div>
</div> </div>
</div> <div class="col-md-4">
<div class="text-right">
<asp:LinkButton ID="LnkSolicitarSat" CssClass="btn btn-primary" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton> <div class="text-right">
<asp:LinkButton ID="LnkSolicitarSat" CssClass="btn btn-primary" OnClick="LnkSolicitarSat_Click" runat="server">Solicitar</asp:LinkButton>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -480,43 +487,43 @@
<asp:GridView ID="GVSolicitudesPendientes" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" <asp:GridView ID="GVSolicitudesPendientes" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="idSolicitudNominas,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa"> DataKeyNames="idSolicitudNominas,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
<Columns> <columns>
<asp:TemplateField HeaderText="Folio"> <asp:TemplateField HeaderText="Folio">
<ItemTemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("idSolicitudNominas")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("idSolicitudNominas")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Inicio"> <asp:TemplateField HeaderText="Fecha Inicio">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Fin"> <asp:TemplateField HeaderText="Fecha Fin">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Estatus"> <asp:TemplateField HeaderText="Estatus">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblestatus" runat="server" Text='<%# Eval("EstatusText")%>'> </asp:Label> <asp:Label ID="lblestatus" runat="server" Text='<%# Eval("EstatusText")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Observaciones"> <asp:TemplateField HeaderText="Observaciones">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'> </asp:Label> <asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha solicitud"> <asp:TemplateField HeaderText="Fecha solicitud">
<ItemTemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Solicitó"> <asp:TemplateField HeaderText="Solicitó">
<ItemTemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </columns>
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
@@ -535,51 +542,52 @@
<asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False" <asp:GridView ID="GVSolicitudesNominas" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall" AutoGenerateColumns="False"
ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros" ShowHeaderWhenEmpty="true" EmptyDataText="No se encontraron registros"
DataKeyNames="idSolicitudNominas,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa"> DataKeyNames="idSolicitudNominas,idSolicitudCFDI,idSolicitudMetadata,Estatus,Observaciones,FechaInicio,FechaFin,FechaIng,CveUsuarioIng,CveEmpresa">
<Columns> <columns>
<asp:TemplateField HeaderText="Folio"> <asp:TemplateField HeaderText="Folio">
<ItemTemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("idSolicitudNominas")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("idSolicitudNominas")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Inicio"> <asp:TemplateField HeaderText="Fecha Inicio">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label ID="lblfechaInicio" runat="server" Text='<%# Eval("FechaInicio","{0:dd/MM/yyyy}")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha Fin"> <asp:TemplateField HeaderText="Fecha Fin">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'> </asp:Label> <asp:Label ID="lblfechaFin" runat="server" Text='<%# Eval("FechaFin","{0:dd/MM/yyyy}")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="No CFDI"> <asp:TemplateField HeaderText="No CFDI">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("numeroCFDIs")%>'> </asp:Label> <asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("numeroCFDIs")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Observaciones"> <asp:TemplateField HeaderText="Observaciones">
<ItemTemplate> <itemtemplate>
<asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'> </asp:Label> <asp:Label ID="lblobservaciones" runat="server" Text='<%# Eval("Observaciones")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Fecha solicitud"> <asp:TemplateField HeaderText="Fecha solicitud">
<ItemTemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("FechaIng","{0:dd/MM/yyyy HH:mm}")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Solicitó"> <asp:TemplateField HeaderText="Solicitó">
<ItemTemplate> <itemtemplate>
<asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'> </asp:Label> <asp:Label runat="server" Text='<%# Eval("UsuarioIng")%>'></asp:Label>
</ItemTemplate> </itemtemplate>
</asp:TemplateField> </asp:TemplateField>
</Columns> </columns>
</asp:GridView> </asp:GridView>
</div> </div>
</div> </div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:LinkButton ID="LnkverificarSolicitudes" CssClass="btn btn-primary" OnClick="LnkverificarSolicitudes_Click" runat="server">Verificar pendientes</asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
</div> </div>
</ContentTemplate> </contenttemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
</div> </div>
</asp:Content> </asp:Content>

View File

@@ -179,9 +179,6 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
} }
} }
UPModalViewSolicitudes.Update(); UPModalViewSolicitudes.Update();
var api = new GeneralesAPI();
api.GeneraSolicitud();
api.VerificaSolicitudesNominas();
} }
protected void LnkShowSolicitudes_Click(object sender, EventArgs e) protected void LnkShowSolicitudes_Click(object sender, EventArgs e)
{ {
@@ -218,8 +215,17 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
} }
} }
protected void LnkverificarSolicitudes_Click(object sender, EventArgs e)
{
var api = new GeneralesAPI();
api.GeneraSolicitud();
api.VerificaSolicitudesNominas();
cargasolicitudes();
}
} }
public class GeneralesAPI : ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI public class GeneralesAPI : ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI
{ {
public GeneralesAPI(string domainApi = "http://localhost:4001/", string token = "") : base(domainApi, token) { } public GeneralesAPI(string domainApi = "http://localhost:4001/", string token = "") : base(domainApi, token) { }

View File

@@ -1496,8 +1496,8 @@
<tr> <tr>
<td>Porcentaje Máximo:</td> <td>Porcentaje Máximo:</td>
<td> <td>
<asp:TextBox ID="TxtPorcentajeMaximoAutorizacion" runat="server" Width="400px"></asp:TextBox> <asp:TextBox ID="TxtPorcentajeMaximoAutorizacion" runat="server" Width="100px"></asp:TextBox>
<asp:RangeValidator ID="RVPM" runat="server" Type="Integer" MinimumValue="0" MaximumValue="999999" ErrorMessage="El campo <b>''Porcentaje Máximo''</b> no tiene el formato correcto, por favor ingréselo." ControlToValidate="TxtPorcentajeMaximoAutorizacion" Display="None" ValidationGroup="GrpGuardar"></asp:RangeValidator> <asp:RangeValidator ID="RVPM" runat="server" Type="Double" MinimumValue="0" MaximumValue="999999" ErrorMessage="El campo <b>''Porcentaje Máximo''</b> no tiene el formato correcto, por favor ingréselo." ControlToValidate="TxtPorcentajeMaximoAutorizacion" Display="None" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCEPM" runat="server" HighlightCssClass="vco" TargetControlID="RVPM" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEPM" runat="server" HighlightCssClass="vco" TargetControlID="RVPM" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>
<td></td> <td></td>
@@ -1505,7 +1505,7 @@
<tr> <tr>
<td>Días vencidos:</td> <td>Días vencidos:</td>
<td> <td>
<asp:TextBox ID="TxtDiasVencidos" runat="server" Width="400px"></asp:TextBox> <asp:TextBox ID="TxtDiasVencidos" runat="server" Width="100px"></asp:TextBox>
<asp:RangeValidator ID="RVDV" runat="server" Type="Integer" MinimumValue="0" MaximumValue="999999" ErrorMessage="El campo <b>''Dias Vencidos''</b> no tiene el formato correcto, por favor ingréselo." ControlToValidate="TxtDiasVencidos" Display="None" ValidationGroup="GrpGuardar"></asp:RangeValidator> <asp:RangeValidator ID="RVDV" runat="server" Type="Integer" MinimumValue="0" MaximumValue="999999" ErrorMessage="El campo <b>''Dias Vencidos''</b> no tiene el formato correcto, por favor ingréselo." ControlToValidate="TxtDiasVencidos" Display="None" ValidationGroup="GrpGuardar"></asp:RangeValidator>
<ajax:ValidatorCalloutExtender ID="VCEDV" runat="server" HighlightCssClass="vco" TargetControlID="RVDV" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCEDV" runat="server" HighlightCssClass="vco" TargetControlID="RVDV" Width="300px"></ajax:ValidatorCalloutExtender>
</td> </td>

View File

@@ -178,10 +178,10 @@
<asp:BoundField DataField="PrecioLista" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" /> <asp:BoundField DataField="PrecioLista" NullDisplayText="N/A" ItemStyle-Width="10%" HeaderText="Importe" DataFormatString="$ {0:N2}" ItemStyle-HorizontalAlign="right" />
<asp:TemplateField HeaderText=""> <asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:N2}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox> <asp:TextBox ID="TxtPrecio" runat="server" Text='<%# Eval("PrecioLista", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." /> <%--<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecio" FilterType="Numbers,Custom" ValidChars="." />
<asp:RegularExpressionValidator ID="REVTxtPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" /> <asp:RegularExpressionValidator ID="REVTxtPrecio" runat="server" ControlToValidate="TxtPrecio" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
<ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCPrecio" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecio" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right"> <asp:TemplateField HeaderText="Precio Mínimo" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Right">
@@ -191,10 +191,10 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText=""> <asp:TemplateField HeaderText="">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:N2}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px"></asp:TextBox> <asp:TextBox ID="TxtPrecioMinimo" runat="server" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' CssClass="CssCamviaPrecio" MaxLength="39" Width="60px" onkeypress="return onlyNumberKey(event)"></asp:TextBox>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." /> <%-- <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." />
<asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" /> <asp:RegularExpressionValidator ID="REVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" EnableClientScript="True" ErrorMessage="El campo <b>''PrecioLista''</b> no tiene el formato correcto, por favor corrija e intente de nuevo (Solo formato numérico)." ValidationGroup="GrpGuardar" ValidationExpression="^[0-9]{1,15}(?:\.[0-9]{1,4})?$" />
<ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="REVTxtPrecioMinimo" Width="300px"></ajax:ValidatorCalloutExtender>--%>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
@@ -239,7 +239,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="col-md-3" style="text-align: left"> <div class="col-md-3" style="text-align: left">
<input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" /> <input id="ChkSeleccionarTodos" type="checkbox" title="Seleccionar Todos" onclick="SeleccionarTodosChkGvSucursa()" />
Seleccionar Todos Seleccionar Todos
</div> </div>
<div class="col-md-9" style="text-align: right"> <div class="col-md-9" style="text-align: right">
@@ -266,7 +266,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Precio Mínimo"> <asp:TemplateField HeaderText="Precio Mínimo">
<ItemTemplate> <ItemTemplate>
<asp:TextBox ID="TxtPrecioMinimo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="39" Text='<%# Eval("PrecioMinimo", "{0:N2}")%>' ValidationGroup="GrpEditGuardarO" Width="90px" CssClass="CssMCamviaPrecio"></asp:TextBox> <asp:TextBox ID="TxtPrecioMinimo" Style="text-align: right" runat="server" CausesValidation="true" MaxLength="39" Text='<%# Eval("PrecioMinimo", "{0:0.######}")%>' ValidationGroup="GrpEditGuardarO" Width="90px" CssClass="CssMCamviaPrecio"></asp:TextBox>
<asp:RequiredFieldValidator ID="RFVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarS"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVTxtPrecioMinimo" runat="server" ControlToValidate="TxtPrecioMinimo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Importe''</b> es necesario, por favor ingréselo." ValidationGroup="GrpEditGuardarS"></asp:RequiredFieldValidator>
<ajax:ValidatorCalloutExtender ID="VCOTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPrecioMinimo" Width="100px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="VCOTxtPrecioMinimo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTxtPrecioMinimo" Width="100px"></ajax:ValidatorCalloutExtender>
<ajax:FilteredTextBoxExtender ID="FilTxtPrecioMinimo" runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." InvalidChars=",-+" /> <ajax:FilteredTextBoxExtender ID="FilTxtPrecioMinimo" runat="server" TargetControlID="TxtPrecioMinimo" FilterType="Numbers,Custom" ValidChars="." InvalidChars=",-+" />
@@ -364,84 +364,99 @@
</div> </div>
</asp:Content> </asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script> <script>
function onlyNumberKey(evt) {
// Only ASCII character in that range allowed
var ASCIICode = (evt.which) ? evt.which : evt.keyCode
if (ASCIICode > 31 && (ASCIICode < 48 || ASCIICode > 57))
{
if (ASCIICode == 46) {
return true
} else {
return false;
}
}
return true;
}
function CambiaImporte() { function CambiaImporte() {
var topLevelElem = document.getElementById("form1"); var topLevelElem = document.getElementById("form1");
var checks = topLevelElem.getElementsByTagName("input"); var checks = topLevelElem.getElementsByTagName("input");
var idd = ''; var idd = '';
var valor = $('#<%= TxtImporte.ClientID %>').val(); var valor = $('#<%= TxtImporte.ClientID %>').val();
for (var i = 0; i < checks.length; i++) { for (var i = 0; i < checks.length; i++) {
if (checks[i].type == "checkbox") { if (checks[i].type == "checkbox") {
debugger; debugger;
if (checks[i].checked) { if (checks[i].checked) {
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '') idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
if ($get('C_GVPrecios_TxtPrecio_' + idd) != null) { if ($get('C_GVPrecios_TxtPrecio_' + idd) != null) {
$get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2); $get('C_GVPrecios_TxtPrecio_' + idd).value = FormatoNumero(ToDouble(valor), 2);
} }
} }
} }
} }
} }
function CambiaPrecio() { function CambiaPrecio() {
var topLevelElem = document.getElementById("form1"); var topLevelElem = document.getElementById("form1");
var checks = topLevelElem.getElementsByTagName("input"); var checks = topLevelElem.getElementsByTagName("input");
var idd = ''; var idd = '';
var valor = $('#<%= TxtPrecio.ClientID %>').val(); var valor = $('#<%= TxtPrecio.ClientID %>').val();
//if (!isNaN(valor) && valor.length > 0) { //if (!isNaN(valor) && valor.length > 0) {
// $('.CssCamviaPrecio').val(valor); // $('.CssCamviaPrecio').val(valor);
//} //}
for (var i = 0; i < checks.length; i++) { for (var i = 0; i < checks.length; i++) {
if (checks[i].type == "checkbox") { if (checks[i].type == "checkbox") {
debugger; debugger;
if (checks[i].checked) { if (checks[i].checked) {
idd = checks[i].id.replace('C_GVPrecios_chkPS_', '') idd = checks[i].id.replace('C_GVPrecios_chkPS_', '')
if ($get('C_GVPrecios_TxtPrecioMinimo_' + idd) != null) { if ($get('C_GVPrecios_TxtPrecioMinimo_' + idd) != null) {
$get('C_GVPrecios_TxtPrecioMinimo_' + idd).value = FormatoNumero(ToDouble(valor), 2); $get('C_GVPrecios_TxtPrecioMinimo_' + idd).value = FormatoNumero(ToDouble(valor), 2);
} }
} }
} }
} }
} }
function CambiaPrecioModal() { function CambiaPrecioModal() {
var ChecksGv = $('.CsMCheckGvSucursal').find('input[type=checkbox]'); var ChecksGv = $('.CsMCheckGvSucursal').find('input[type=checkbox]');
var valor = $('#<%= TxtAplicarPrecio.ClientID %>').val(); var valor = $('#<%= TxtAplicarPrecio.ClientID %>').val();
if (!isNaN(valor) && valor.length > 0) { if (!isNaN(valor) && valor.length > 0) {
$(".CssMCamviaPrecio").each(function (index) { $(".CssMCamviaPrecio").each(function (index) {
if ($($(ChecksGv).get(index)).attr('checked')) { if ($($(ChecksGv).get(index)).attr('checked')) {
$(this).val(valor); $(this).val(valor);
} }
}); });
} }
} }
function SeleccionarTodosChkGvSucursa() { function SeleccionarTodosChkGvSucursa() {
if ($('#ChkSeleccionarTodos').attr('checked')) { if ($('#ChkSeleccionarTodos').attr('checked')) {
$('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', true); $('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', true);
} else { } else {
$('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', false); $('.CsMCheckGvSucursal').find('input[type=checkbox]').prop('checked', false);
} }
} }
function FncSeleccionaChk(chk) { function FncSeleccionaChk(chk) {
chk.checked = true; chk.checked = true;
} }
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -1503,7 +1503,7 @@ Partial Class Clientes
'End If 'End If
'Campos para Modificación 'Campos para Modificación
LtlCliente.Text = ObjClientes.Nombre LtlCliente.Text = ObjClientes.NombreComercial
TxtNombre.Text = ObjClientes.Nombre TxtNombre.Text = ObjClientes.Nombre
TxtRegimenSociedad.Text = ObjClientes.RegimenSociedad TxtRegimenSociedad.Text = ObjClientes.RegimenSociedad
TxtNombreComercial.Text = ObjClientes.NombreComercial TxtNombreComercial.Text = ObjClientes.NombreComercial

View File

@@ -44,9 +44,9 @@
font-weight: bold; font-weight: bold;
} }
.GrupoSuperior:hover { .GrupoSuperior:hover {
background-color: #000077; background-color: #000077;
} }
</style> </style>
</asp:Content> </asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server"> <asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
@@ -162,7 +162,7 @@
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="Real" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="Real" ItemStyle-HorizontalAlign="Center">
<ItemTemplate> <ItemTemplate>
<asp:Label ID="lblRealMes" runat="server" Target="_blank" Text='<%# Eval("RealMes", "{0:#,###}").ToString() %>'> </asp:Label> <asp:HyperLink ID="HplRealMes" runat="server" Target="_blank" Text='<%# Eval("RealMes", "{0:#,###}").ToString() %>'> </asp:HyperLink>
</ItemTemplate> </ItemTemplate>
</asp:TemplateField> </asp:TemplateField>
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center"> <asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Center">

View File

@@ -25,17 +25,13 @@ Partial Class MetasVendedores
DdlSubProyectoFiltro.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa) DdlSubProyectoFiltro.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyectoFiltro.DataBind() DdlSubProyectoFiltro.DataBind()
DdlSubProyectoFiltro.Items.Insert(0, New ListItem("Todos", "-1")) DdlSubProyectoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
Dim ObjPS As New ClsProductosServicios DdlMarcaFiltro.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
If ObjPS.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarcaFiltro.DataSource = ObjPS.DtResultados
End If
ObjPS.Dispose()
DdlMarcaFiltro.DataBind() DdlMarcaFiltro.DataBind()
DdlMarcaFiltro.Items.Insert(0, New ListItem("Todos", "-1")) DdlMarcaFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlVendedorFiltro.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) DdlVendedorFiltro.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
DdlVendedorFiltro.DataBind() DdlVendedorFiltro.DataBind()
DdlVendedorFiltro.Items.Insert(0, New ListItem("Todos", "-1")) DdlVendedorFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
@@ -79,9 +75,14 @@ Partial Class MetasVendedores
Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound Protected Sub GV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GV.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.FCLabel("lblRealMesPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealMesPorcentaje").Text, "%") e.Row.FCLabel("lblRealMesPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealMesPorcentaje").Text, "%")
e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text, "%") e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text = String.Format("{0}{1}", e.Row.FCLabel("lblRealAcumuladoPorcentaje").Text, "%")
'e.Row.FCLabel("lblVarVSAAPerc").Text = String.Format("{0}{1}", e.Row.FCLabel("lblVarVSAAPerc").Text, "%") 'e.Row.FCLabel("lblVarVSAAPerc").Text = String.Format("{0}{1}", e.Row.FCLabel("lblVarVSAAPerc").Text, "%")
e.Row.FCHyperLink("HplRealMes").NavigateUrl = String.Format("/Ventas/MetasVendedoresDetalle.aspx?CveSubProyecto={0}&CveCategoria={1}&CveClasificacion={2}&CveCliente={3}&CveVendedor={4}&Fecha={5}&Grupo={6}&CveMarca={7}&EsGarantia={8}&EsDistribuidor={9}&CveClasificacion2={10}",
e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveVendedor"),
e.Row.DBCampo("Fecha"), e.Row.DBCampo("Grupo"), e.Row.DBCampo("CveMarca"), e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClasificacion2"))
Select Case e.Row.DBCampo("TipoFila") Select Case e.Row.DBCampo("TipoFila")
Case "1" Case "1"
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"

View File

@@ -0,0 +1,179 @@
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="MetasVendedoresDetalle.aspx.vb" Inherits="MetasVendedoresDetalle" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
<style>
.table-scrollable {
margin-top: 0px !important;
margin-bottom: 0px !important;
}
.dataTables_scrollHeadInner {
width: 100% !important;
background-color: #dddddd;
padding-left: 0px !important;
}
.dataTables_scrollFoot {
display: none;
position: static;
}
.table-scrollable {
margin: 0px !important;
}
.dataTables_scroll {
margin-bottom: 0px;
}
.table.dataTable {
margin-top: 0px !important;
}
.dataTables_scrollBody table th {
padding: 0px !important;
padding-right: 4px !important;
padding-left: 4px !important;
}
.GrupoSuperior {
background-color: #000077;
color: white;
font-weight: bold;
}
.GrupoSuperior:hover {
background-color: #000077;
}
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
Scorecard Ventas
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
<li>
<asp:LinkButton ID="LnkPDF" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
</li>
<li>
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
</li>
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
<asp:UpdatePanel runat="server" ID="UpFiltros">
<ContentTemplate>
<div class="portlet solid grey-cascade portlet-filter">
<div class="portlet-title portlet-filterT smalltitle" style="min-height: 45px; position: relative;">
<div class="tools">
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" ValidationGroup="GrpConsultar" Text="Consultar" /></td>
<a href="javascript;" data-idchekbox="<%= chkexpand.ClientID%>" class=" <%= IIf(chkexpand.Checked = True, "collapse", "expand")%>"></a>
<asp:CheckBox ID="chkexpand" CssClass="hidden" runat="server" />
</div>
<div class="titlefiltros caption magindate">
<div class="row">
<div class="col-md-1 truncate text-right">Fecha del mes: </div>
<div class="col-md-3 col-sm-2">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 95px !important; padding: 0px;">
<asp:TextBox Style="width: 80px !important;" ID="TxtFechaMes" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgFechaMes" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
</div>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaMes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaMes" PopupButtonID="ImgFechaMes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1 text-right">Sucursal: </div>
<div class="col-md-3">
<asp:DropDownList ID="DdlSubProyectoFiltro" runat="server" CssClass="form-control input-sm select2me" Width="50%" DataValueField="CveSubProyecto" DataTextField="SubProyecto"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Grupo: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlGrupo" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%">
<asp:ListItem Value="0" Text="Por Vendedor"></asp:ListItem>
<asp:ListItem Value="1" Text="Por Sucursal"></asp:ListItem>
<asp:ListItem Value="2" Text="General"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
</div>
</div>
<div class="portlet-body magindate" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
<div class="row">
<label class="col-md-1 text-right">Vendedor: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlVendedorFiltro" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveVendedor" DataTextField="Vendedor"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Categoria: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlCategoria" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveCategoria" DataTextField="Categoria" AutoPostBack="true"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Clasificaciones: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlClasificaciones" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
</div>
<div class="row">
<label class="col-md-1 text-right">Sub Clasif: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlClasificacion2" runat="server" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%" DataValueField="CveClasificacion" DataTextField="Clasificacion"></asp:DropDownList>
</div>
<label class="col-md-1 text-right">Cliente: </label>
<div class="col-md-3">
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
</div>
<label class="col-md-1 text-right">Marca: </label>
<div class="col-md-3">
<asp:DropDownList ID="DdlMarcaFiltro" runat="server" DataTextField="Marca" DataValueField="CveMarca" Class="table-group-action-input form-control input-inline input-sm select2me" Width="50%"></asp:DropDownList>
</div>
</div>
<div class="row">
<label title="Distr" data-toggle="tooltip" class="col-md-1 truncate">Distribuidor:</label>
<div class="col-md-2">
<asp:DropDownList ID="DdlDistribuidor" runat="server" AppendDataBoundItems="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
<asp:ListItem Text="Distribuidor" Value="1"></asp:ListItem>
<asp:ListItem Text="No Distribuidor" Value="0"></asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div id="DivFamiliaSubFamilia" class="row" runat="server" visible="false">
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div id="dvCuerpo" style="width: 100%">
<asp:UpdatePanel ID="UPDatos" runat="server" RenderMode="Inline" UpdateMode="Conditional">
<ContentTemplate>
<asp:GridView ID="GV" runat="server" GridLines="None" BorderWidth="0" UseAccessibleHeader="true"
CssClass="table table-advance Widthall ScrollAD" data-sort="true" ShowHeader="True" EmptyDataText="No se encontraron resultados." ShowHeaderWhenEmpty="true"
AutoGenerateColumns="false" AllowPaging="False" ShowFooter="False">
<Columns>
<asp:BoundField DataField="RowNum" HeaderText="#" />
<asp:BoundField DataField="Cantidad" HeaderText="Cantidad" />
<asp:BoundField DataField="Vendedor" HeaderText="Vendedor" />
<asp:BoundField DataField="SubProyecto" HeaderText="SubProyecto" />
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificacion" />
<asp:BoundField DataField="Clasificacion2" HeaderText="Clasificacion2" />
<asp:BoundField DataField="Marca" HeaderText="Marca" />
<asp:BoundField DataField="SerieFolio" HeaderText="SerieFolio" />
<asp:BoundField DataField="TipoDocto" HeaderText="TipoDocto" />
<asp:BoundField DataField="Fecha" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField DataField="CodigoPS" HeaderText="CodigoPS" />
</Columns>
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
</asp:Content>

View File

@@ -0,0 +1,120 @@
Imports System.Data
Imports Extensiones
Imports Microsoft.Reporting.WebForms
Partial Class MetasVendedoresDetalle
Inherits ClsPaginas
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
CargaDatosFiltros()
End If
End Sub
Private Sub CargaDatosFiltros()
TxtFechaMes.Text = IfNull(Request("Fecha"), "2000/01/01").ToString
DdlSubProyectoFiltro.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa)
DdlSubProyectoFiltro.DataBind()
DdlSubProyectoFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlMarcaFiltro.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
DdlMarcaFiltro.DataBind()
DdlMarcaFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlVendedorFiltro.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
DdlVendedorFiltro.DataBind()
DdlVendedorFiltro.Items.Insert(0, New ListItem("Todos", "-1"))
DdlCategoria.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
DdlCategoria.DataBind()
DdlCategoria.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, UsoClasificacion:=1)
DdlClasificaciones.DataBind()
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
DdlClasificacion2.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
DdlClasificacion2.DataBind()
DdlClasificacion2.Items.Insert(0, New ListItem("Todos", "-1"))
DdlSubProyectoFiltro.SelectedValueExist(IfNull(Request("CveSubProyecto"), "-1").ToString)
DdlMarcaFiltro.SelectedValueExist(IfNull(Request("CveMarca"), "-1").ToString)
DdlVendedorFiltro.SelectedValueExist(IfNull(Request("CveVendedor"), "-1").ToString)
DdlCategoria.SelectedValueExist(IfNull(Request("CveCategoria"), "-1").ToString)
DdlClasificaciones.SelectedValueExist(IfNull(Request("CveClasificacion"), "-1").ToString)
DdlClasificacion2.SelectedValueExist(IfNull(Request("CveClasificacion2"), "-1").ToString)
CargarDatos()
End Sub
Private Sub CargarDatos()
Dim CveCliente As Integer = -1
If DdlClientes.SelectedValue.ToEntero > 0 Then
CveCliente = DdlClientes.SelectedValue.ToEntero
End If
Dim ObjVentas As New ClsVentas
If ObjVentas.GetRepMetasVendedoresDetalle(TxtFechaMes.Text, UsuarioActual.CveEmpresa, DdlVendedorFiltro.SelectedValue.ToEntero, DdlCategoria.SelectedValue.ToEntero,
DdlClasificaciones.SelectedValue.ToEntero, DdlClasificacion2.SelectedValue.ToEntero, DdlMarcaFiltro.SelectedValue.ToEntero,
DdlSubProyectoFiltro.SelectedValue.ToEntero, CveCliente, DdlDistribuidor.SelectedValue.ToEntero, DdlGrupo.SelectedValue.ToEntero) Then
GV.DataSource = ObjVentas.DtResultados
End If
ObjVentas.Dispose()
GV.DataBind()
End Sub
Protected Sub btConsultar_Click(sender As Object, e As EventArgs) Handles btConsultar.Click
CargarDatos()
UPDatos.Update()
End Sub
'Protected Sub LnkPDF_RowDataBound(sender As Object, e As EventArgs) Handles LnkPDF.Click
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
' Dim params As New List(Of ReportParameter)
' params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
' If Imagen.Exists Then
' params.Add(New ReportParameter("pImg", logouri))
' Else
' params.Add(New ReportParameter("pImg", ""))
' End If
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
' params.Add(New ReportParameter("FechaImpresion", Today))
' params.Add(New ReportParameter("SubProyecto", DdlSubProyectoFiltro.SelectedItem.ToString))
' params.Add(New ReportParameter("Agente", DdlVendedorFiltro.SelectedItem.ToString))
' ImprimirPDF("Empresas/Grales/Formatos/MetasVendedores.rdlc", DtDatos, params, "Rep. Metas por vendedores", "PDF", RDSName:="DataSet1")
'End Sub
'Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
' Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
' Dim params As New List(Of ReportParameter)
' params.Add(New ReportParameter("pEmp", UsuarioActual.Empresa.Empresa))
' If Imagen.Exists Then
' params.Add(New ReportParameter("pImg", logouri))
' Else
' params.Add(New ReportParameter("pImg", ""))
' End If
' params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
' params.Add(New ReportParameter("FechaImpresion", Today))
' params.Add(New ReportParameter("SubProyecto", DdlSubProyectoFiltro.SelectedItem.ToString))
' params.Add(New ReportParameter("Agente", DdlVendedorFiltro.SelectedItem.ToString))
' ImprimirPDF("Empresas/Grales/Formatos/MetasVendedores.rdlc", DtDatos, params, "Rep. Metas por vendedores", "Excel", RDSName:="DataSet1")
'End Sub
Private Sub DdlCategoria_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlCategoria.SelectedIndexChanged
DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa, CveCategoria:=DdlCategoria.SelectedValue.ToEntero, UsoClasificacion:=1)
DdlClasificaciones.DataBind()
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub
End Class

View File

@@ -3284,10 +3284,10 @@ Partial Class PV
Exit Sub Exit Sub
End If End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) <= 0 Then 'If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) <= 0 Then
Alert("Debe tener producto seleccionados para servicio a domicilio.", TipoMensaje.MsgAdvertencia) ' Alert("Debe tener producto seleccionados para servicio a domicilio.", TipoMensaje.MsgAdvertencia)
Exit Sub ' Exit Sub
End If 'End If
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso ChkServicioDomicilio.Checked AndAlso GvInv.Rows.Cast(Of GridViewRow)().Count(Function(gvr) gvr.FCCheckBox("cbInv").Checked) > 0 Then
For Each GvRow As GridViewRow In GvInv.Rows For Each GvRow As GridViewRow In GvInv.Rows
@@ -4393,7 +4393,7 @@ Partial Class PV
End If End If
Else Else
If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then If DrPS("CveClasificacion").ToString.ToEntero.Contiene(20516, 20515) Then
Descuento = PU * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero) Descuento = ((Cantidad * PU) * ClasificacionesDescuentos(DrPS("CveClasificacion").ToString.ToEntero)).RoundSQL(2)
End If End If
End If End If

View File

@@ -133,7 +133,7 @@ Partial Class PopUpBuscarClientes
End If End If
e.Row.FCLiteral("LtlCodigo").Text = String.Format("<div class='truncate' style='width:60px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Codigo")) e.Row.FCLiteral("LtlCodigo").Text = String.Format("<div class='truncate' style='width:60px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Codigo"))
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:190px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Nombre")) e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:190px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))
e.Row.FCLiteral("LtlRFC").Text = String.Format("<div class='truncate' style='width:100px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("RFC")) e.Row.FCLiteral("LtlRFC").Text = String.Format("<div class='truncate' style='width:100px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("RFC"))
e.Row.FCLiteral("LtlDireccion").Text = String.Format("<div class='truncate' style='width:165px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Direccion")) e.Row.FCLiteral("LtlDireccion").Text = String.Format("<div class='truncate' style='width:165px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Direccion"))
e.Row.FCLiteral("LtlCiudad").Text = String.Format("<div class='truncate' style='width:90px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Ciudad")) e.Row.FCLiteral("LtlCiudad").Text = String.Format("<div class='truncate' style='width:90px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Ciudad"))

View File

@@ -170,7 +170,7 @@ Partial Class PopUpBuscarFolio
e.Row.FCLiteral("LtlTipo").Text = String.Format("<div class='truncate' style='width:27px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto")) e.Row.FCLiteral("LtlTipo").Text = String.Format("<div class='truncate' style='width:27px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("TipoDocto"))
e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:95px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio")) e.Row.FCLiteral("LtlFolio").Text = String.Format("<div class='truncate' style='width:95px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Folio"))
e.Row.FCLiteral("LtlFecha").Text = String.Format("<div class='truncate' style='width:64px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString) e.Row.FCLiteral("LtlFecha").Text = String.Format("<div class='truncate' style='width:64px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Fecha").ToDate.ToShortDateString)
e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Nombre")) e.Row.FCLiteral("LtlNombre").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("NombreComercial"))
'e.Row.FCLiteral("LtlSubTotal").Text = Liga & e.Row.DBCampo("SubTotal").FormatoNumero & "&nbsp;</a>" 'e.Row.FCLiteral("LtlSubTotal").Text = Liga & e.Row.DBCampo("SubTotal").FormatoNumero & "&nbsp;</a>"
e.Row.FCLiteral("LtlTotal").Text = String.Format("<div class='truncate' style='width:56px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Total").FormatoNumero) e.Row.FCLiteral("LtlTotal").Text = String.Format("<div class='truncate' style='width:56px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Total").FormatoNumero)
e.Row.FCLiteral("LtlMon").Text = String.Format("<div class='truncate' style='width:30px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Abreviatura")) e.Row.FCLiteral("LtlMon").Text = String.Format("<div class='truncate' style='width:30px;'>{0}{1}</a></div>", Liga, e.Row.DBCampo("Abreviatura"))

View File

@@ -6,10 +6,10 @@ Imports Microsoft.Reporting.WebForms
Imports System.Data Imports System.Data
Partial Class Ventas_RepProductosServicios Partial Class Ventas_RepProductosServicios
Inherits ClsPaginas Inherits ClsPaginas
#Region "PROPIEDADES" #Region "PROPIEDADES"
Private Property DtVentas As DataTable Private Property DtVentas As DataTable
Get Get
Return DirectCast(ViewState("DtVentas"), DataTable) Return DirectCast(ViewState("DtVentas"), DataTable)
@@ -52,24 +52,24 @@ Partial Class Ventas_RepProductosServicios
Set(value As Integer) Set(value As Integer)
ViewState("TipoCambio") = value ViewState("TipoCambio") = value
End Set End Set
End Property End Property
#End Region #End Region
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
CargarMarcas() CargarMarcas()
SetValues() SetValues()
End If End If
End Sub End Sub
#Region " CARGA DATOS INICIALES " #Region " CARGA DATOS INICIALES "
Private Sub CargaGrupo() Private Sub CargaGrupo()
DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3")) DdlGrupo.Items.Insert(0, New ListItem("Categoria", "3"))
DdlGrupo.Items.Insert(1, New ListItem("Clasificación", "4")) DdlGrupo.Items.Insert(1, New ListItem("Clasificación", "4"))
@@ -89,7 +89,7 @@ Partial Class Ventas_RepProductosServicios
DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20")) DdlGrupo.Items.Insert(15, New ListItem("Cliente - PS", "20"))
DdlGrupo.Items.Insert(16, New ListItem("Sucursal - PS", "21")) DdlGrupo.Items.Insert(16, New ListItem("Sucursal - PS", "21"))
DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22")) DdlGrupo.Items.Insert(17, New ListItem("Familia - Marca - Tipo", "22"))
DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23")) DdlGrupo.Items.Insert(18, New ListItem("Tipo Cliente", "23"))
DdlGrupo.Items.Insert(18, New ListItem("Marca", "24")) DdlGrupo.Items.Insert(18, New ListItem("Marca", "24"))
DdlGrupo.Items.Insert(18, New ListItem("Cliente Sucursal", "26")) DdlGrupo.Items.Insert(18, New ListItem("Cliente Sucursal", "26"))
@@ -168,24 +168,24 @@ Partial Class Ventas_RepProductosServicios
'Cargo Clasificaciones 'Cargo Clasificaciones
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa) DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
DdlClasificacion.DataBind() DdlClasificacion.DataBind()
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
DvLitraje.Visible = True DvLitraje.Visible = True
'garantia 'garantia
divgarantia1.Visible = True divgarantia1.Visible = True
divgarantia2.Visible = True divgarantia2.Visible = True
divdistribuidor1.Visible = True divdistribuidor1.Visible = True
divdistribuidor2.Visible = True divdistribuidor2.Visible = True
DdlClasificacion2.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa) DdlClasificacion2.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
DdlClasificacion2.DataBind() DdlClasificacion2.DataBind()
divClasif2texto.Visible = True divClasif2texto.Visible = True
divClasif2.Visible = True divClasif2.Visible = True
DdlGrupo.Items.Add(New ListItem("Clasificacion2", "25")) DdlGrupo.Items.Add(New ListItem("Clasificacion2", "25"))
End If End If
@@ -196,7 +196,7 @@ Partial Class Ventas_RepProductosServicios
DdlSubProyectoEjecucion.DataBind() DdlSubProyectoEjecucion.DataBind()
'Vendedor 'Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
DdlVendedor.DataBind() DdlVendedor.DataBind()
'CargaUsuarios 'CargaUsuarios
@@ -259,21 +259,28 @@ Partial Class Ventas_RepProductosServicios
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
DdlClientes.DataBind() DdlClientes.DataBind()
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If End If
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString()) DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
DdlVendedor.Attributes.Add("disabled", "disabled") DdlVendedor.Attributes.Add("disabled", "disabled")
DdlVendedor.Enabled = False DdlVendedor.Enabled = False
End If End If
txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString txtFechaI.Text = Now.FirstDayOfMonth.ToShortDateString
txtFechaF.Text = Now.ToShortDateString txtFechaF.Text = Now.ToShortDateString
End Sub If UsuarioActual.TienePermisoProceso(339) Then
GvDatos.Columns(2).Visible = False
GvDatos.Columns(3).Visible = False
GvDatos.Columns(4).Visible = False
GvDatos.Columns(5).Visible = False
End If
End Sub
#End Region #End Region
#Region " CARGA DATOS " #Region " CARGA DATOS "
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos() CargaDatos()
@@ -300,7 +307,7 @@ Partial Class Ventas_RepProductosServicios
DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente, DdlPS.SelectedValue.ToEntero, FechaI, FechaF, FechaIEjec, FechaFEjec, CveCliente,
DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1", DdlSubProyectoEjecucion.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, "-1",
UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=TipoComprobante,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, MostrarLitraje:=ChkLitraje.Checked, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, ModalidadContable:=ModalidadContable,
CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
@@ -324,55 +331,55 @@ Partial Class Ventas_RepProductosServicios
DivMarca.Visible = True DivMarca.Visible = True
LblMarca.Visible = True LblMarca.Visible = True
Using ObjMarcas As New ClsProductosServicios Using ObjMarcas As New ClsProductosServicios
If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
DdlMarcaPSDes.DataBind() DdlMarcaPSDes.DataBind()
End If End If
End Using End Using
End If End If
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1")) DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
End Sub End Sub
#End Region #End Region
#Region " GV DATOS - PERSONALIZAR " #Region " GV DATOS - PERSONALIZAR "
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
Dim Css As String = "Texto" Dim Css As String = "Texto"
Dim CveClasificacionDetalle As String = "-1" Dim CveClasificacionDetalle As String = "-1"
Dim cveMarca As String = DdlMarcaPSDes.SelectedValue Dim cveMarca As String = DdlMarcaPSDes.SelectedValue
If DdlGrupo.SelectedValue.ToEntero = 22 Then If DdlGrupo.SelectedValue.ToEntero = 22 Then
Dim tipo As Integer = If(e.Row.DBCampo("CveClasificacionDetalle").ToEntero() > 0, 4, If(e.Row.DBCampo("CveMarca").ToEntero() > 0, 3, If(e.Row.DBCampo("CveClasificacion").ToEntero() > 0, 2, 1))) Dim tipo As Integer = If(e.Row.DBCampo("CveClasificacionDetalle").ToEntero() > 0, 4, If(e.Row.DBCampo("CveMarca").ToEntero() > 0, 3, If(e.Row.DBCampo("CveClasificacion").ToEntero() > 0, 2, 1)))
Select Case tipo Select Case tipo
Case 4 Case 4
CveClasificacionDetalle = e.Row.DBCampo("CveClasificacionDetalle").ToString() ' String.Format("{0}&CveClasificacionDetalle={1}&CveMarca={2}", squery, e.Row.DBCampo("CveClasificacionDetalle").ToEntero(), e.Row.DBCampo("CveMarca").ToEntero()) CveClasificacionDetalle = e.Row.DBCampo("CveClasificacionDetalle").ToString() ' String.Format("{0}&CveClasificacionDetalle={1}&CveMarca={2}", squery, e.Row.DBCampo("CveClasificacionDetalle").ToEntero(), e.Row.DBCampo("CveMarca").ToEntero())
cveMarca = e.Row.DBCampo("CveMarca").ToString() cveMarca = e.Row.DBCampo("CveMarca").ToString()
Case 3 Case 3
'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero()) 'squery = String.Format("{0}&CveMarca{1}", squery, e.Row.DBCampo("CveMarca").ToEntero())
cveMarca = e.Row.DBCampo("CveMarca").ToString() cveMarca = e.Row.DBCampo("CveMarca").ToString()
e.Row.CssClass = "SubTotalesB" e.Row.CssClass = "SubTotalesB"
Case 2 Case 2
e.Row.CssClass = "SubTotales" e.Row.CssClass = "SubTotales"
Case 1 Case 1
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
End Select End Select
Else Else
If e.Row.DBCampo("Orden") = "" Then If e.Row.DBCampo("Orden") = "" Then
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(0).Width = Unit.Pixel(200) e.Row.Cells(0).Width = Unit.Pixel(200)
e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center
e.Row.Cells(1).Width = Unit.Pixel(60) e.Row.Cells(1).Width = Unit.Pixel(60)
e.Row.Cells(2).Width = Unit.Pixel(90) e.Row.Cells(2).Width = Unit.Pixel(90)
e.Row.Cells(3).Width = Unit.Pixel(90) e.Row.Cells(3).Width = Unit.Pixel(90)
e.Row.Cells(5).Width = Unit.Pixel(80) e.Row.Cells(5).Width = Unit.Pixel(80)
e.Row.Cells(8).Width = Unit.Pixel(100) e.Row.Cells(8).Width = Unit.Pixel(100)
e.Row.CssClass = "Totales" e.Row.CssClass = "Totales"
Css = "Totales" Css = "Totales"
ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then ElseIf DdlGrupo.SelectedValue.Contiene("20", "21") And Not e.Row.DBCampo("CvePS").ToEntero > 0 Then
e.Row.CssClass = "SubTotales" e.Row.CssClass = "SubTotales"
End If End If
End If End If
' PARA LIGA ' PARA LIGA
@@ -382,13 +389,13 @@ Partial Class Ventas_RepProductosServicios
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1") FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim(), "-1")
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1") FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim(), "-1")
Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}", Dim Liga = String.Format("/Ventas/RepProductosServiciosDetalle.aspx?CveProyecto={0}&CveSubProyecto={1}&CveCategoria={2}&CveClasificacion={3}&CvePS={4}&CveCliente={5}&CveSubProyectoEjecucion={6}&CveVendedor={7}&CveUsuario={8}&CveEstatus={9}&Anio={10}&Mes={11}&AnioMes={12}&Fecha={13}&AnioEjec={14}&MesEjec={15}&AnioMesEjec={16}&FechaEjec={17}&FechaI={18}&FechaF={19}&FechaEI={20}&FechaEF={21}&TipoDocto={22}&Grupo={23}&CveMoneda={24}&TipoCambio={25}&TCEspecifico={26}&CveClienteClasificacion={27}&CveProveedorCompra={28}&CveMarca={29}&CveClasificacionDetalle={30}&TipoCliente={31}&ModalidadContable={32}&EsGarantia={33}&CveCondicionesPago={34}&MostrarLitraje={35}&EsDistribuidor={36}&CveClienteSucursal={37}&CveClasificacion2={38}",
e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("CvePS"),
e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyectoEjecucion"), e.Row.DBCampo("Vendedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"),
e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"), e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("AnioEjec"), e.Row.DBCampo("MesEjec"), e.Row.DBCampo("AnioMesEjec"), e.Row.DBCampo("FechaEjec"),
FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca, FechaI, FechaF, FechaIEjec, FechaFEjec, e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("CveGpo"), e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveClienteClasificacion"), e.Row.DBCampo("CveProveedorCompra"), cveMarca,
CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0), CveClasificacionDetalle, If(DdlGrupo.SelectedValue.ToEntero = 23, e.Row.DBCampo("TipoCliente"), DdlTipoCliente.SelectedValue), If(Not ChkLecturaAdmin.Checked, 1, 0),
e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClienteSucursal").ToString.ToEntero) e.Row.DBCampo("EsGarantia"), e.Row.DBCampo("CveCondicionesPago"), IIf(e.Row.DBCampo("MostrarLitraje") = "True", 1, 0), e.Row.DBCampo("EsDistribuidor"), e.Row.DBCampo("CveClienteSucursal").ToString.ToEntero, DdlClasificacion2.SelectedValue)
e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo")) e.Row.FCLiteral("LtlGrupo").Text = String.Format("<a target=""_blank"" Class=""{0}"" href=""{1}"">{2}</a>", Css, Liga, e.Row.DBCampo("Gpo"))
@@ -437,10 +444,10 @@ Partial Class Ventas_RepProductosServicios
End If End If
UPDatos.Update() UPDatos.Update()
End Sub End Sub
#End Region #End Region
#Region " SELECTED INDEX CHANGED" #Region " SELECTED INDEX CHANGED"
Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlClienteClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaClientes() CargaClientes()
@@ -492,8 +499,8 @@ Partial Class Ventas_RepProductosServicios
If DdlTipoComprobante.SelectedValue <> "-1" Then If DdlTipoComprobante.SelectedValue <> "-1" Then
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue)) DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(String.Format("TipoDocto = '{0}'", DdlTipoComprobante.SelectedValue))
Else Else
DdlEstatus.DataSource = GlobalDTEstatusFactura DdlEstatus.DataSource = GlobalDTEstatusFactura
End If End If
DdlEstatus.Items.Add(New ListItem("Todos", "-1")) DdlEstatus.Items.Add(New ListItem("Todos", "-1"))
DdlEstatus.DataBind() DdlEstatus.DataBind()
@@ -511,10 +518,10 @@ Partial Class Ventas_RepProductosServicios
LiEspecifico.Visible = False LiEspecifico.Visible = False
End If End If
UpBodyTipoCambio.Update() UpBodyTipoCambio.Update()
End Sub End Sub
#End Region #End Region
#Region " IMPRIMIR " #Region " IMPRIMIR "
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click Protected Sub LnkPdf_Click(sender As Object, e As EventArgs) Handles LnkPdf.Click
If GvDatos.Rows.Count > 0 Then If GvDatos.Rows.Count > 0 Then
@@ -531,21 +538,21 @@ Partial Class Ventas_RepProductosServicios
FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha) FechaI = If(IsDate(txtFechaI.Text.Trim()), txtFechaI.Text.ToDate, MinFecha)
FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha) FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.ToDate, MaxFecha)
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha) FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.ToDate, MinFecha)
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha) FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.ToDate, MaxFecha)
Dim Cliente = If(DdlClientes.SelectedText = "", "", $"&emsp;<b>Cliente:</b>&nbsp;{DdlClientes.SelectedText}") Dim Cliente = If(DdlClientes.SelectedText = "", "", $"&emsp;<b>Cliente:</b>&nbsp;{DdlClientes.SelectedText}")
Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $"&emsp;<b>Proveedor:</b>&nbsp;{DdlProveedor.SelectedText}") Dim Proveedor = If(DdlProveedor.SelectedValue = "", "", $"&emsp;<b>Proveedor:</b>&nbsp;{DdlProveedor.SelectedText}")
Dim FechaInicio = If(txtFechaI.Text = "", "", $"&emsp;<b>Fecha Inicio:</b>&nbsp;{txtFechaI.Text}") Dim FechaInicio = If(txtFechaI.Text = "", "", $"&emsp;<b>Fecha Inicio:</b>&nbsp;{txtFechaI.Text}")
Dim FechaFin = If(txtFechaF.Text = "", "", $"&emsp;<b>Fecha Fin:</b>&nbsp;{txtFechaF.Text}") Dim FechaFin = If(txtFechaF.Text = "", "", $"&emsp;<b>Fecha Fin:</b>&nbsp;{txtFechaF.Text}")
Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $"&emsp;<b>Agrupado por:</b>&nbsp;{DdlGrupo.SelectedItem.Text}") Dim Grupo = If(DdlGrupo.SelectedValue = "-1", "", $"&emsp;<b>Agrupado por:</b>&nbsp;{DdlGrupo.SelectedItem.Text}")
Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $"&emsp;<b>Categoria:</b>&nbsp;{DdlCategoria.SelectedItem.Text }") Dim Categoria = If(DdlCategoria.SelectedValue = "-1", "", $"&emsp;<b>Categoria:</b>&nbsp;{DdlCategoria.SelectedItem.Text }")
Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $"&emsp;<b>Clasificación:</b>&nbsp;{DdlClasificacion.SelectedItem.Text}") Dim Clasificacion = If(DdlClasificacion.SelectedValue = "-1", "", $"&emsp;<b>Clasificación:</b>&nbsp;{DdlClasificacion.SelectedItem.Text}")
Dim PS = If(DdlPS.SelectedValue = "-1", "", $"&emsp;<b>P.S.:</b>&nbsp;{DdlPS.SelectedText}") Dim PS = If(DdlPS.SelectedValue = "-1", "", $"&emsp;<b>P.S.:</b>&nbsp;{DdlPS.SelectedText}")
Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $"&emsp;<b>Proyecto:</b>&nbsp;{DdlSubProyecto.SelectedItem.Text}") Dim Proyecto = If(DdlSubProyecto.SelectedValue = "-1", "", $"&emsp;<b>Proyecto:</b>&nbsp;{DdlSubProyecto.SelectedItem.Text}")
Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $"&emsp;<b>Estatus:</b>&nbsp;{DdlEstatus.SelectedItem.Text}") Dim Estatus = If(DdlEstatus.SelectedValue = "-1", "", $"&emsp;<b>Estatus:</b>&nbsp;{DdlEstatus.SelectedItem.Text}")
Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Usuario:</b>&nbsp;{DdlUsuario.SelectedItem.Text}") Dim Usuario = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Usuario:</b>&nbsp;{DdlUsuario.SelectedItem.Text}")
If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then If DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", 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", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
@@ -555,7 +562,7 @@ Partial Class Ventas_RepProductosServicios
params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, ""))) params.Add(New ReportParameter("FechaFin", If(txtFechaF.Text <> "", FechaF.ToShortDateString, "")))
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre)) params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString)) params.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
params.Add(New ReportParameter("Filtros", $"{Grupo}{Cliente}{FechaInicio}{FechaFin}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{Proveedor}")) params.Add(New ReportParameter("Filtros", $"{Grupo}{Cliente}{FechaInicio}{FechaFin}{Categoria}{Clasificacion}{PS}{Proyecto}{Estatus}{Usuario}{Proveedor}"))
If Imagen.Exists Then If Imagen.Exists Then
params.Add(New ReportParameter("LogoPath", logouri)) params.Add(New ReportParameter("LogoPath", logouri))
@@ -567,12 +574,12 @@ Partial Class Ventas_RepProductosServicios
Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia) Alert("No hay información para mostrar.", TipoMensaje.MsgAdvertencia)
End If End If
End Sub End Sub
#End Region #End Region
#Region "GRAFICA" #Region "GRAFICA"
Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs) Protected Sub LnkVerGrafica_Click(sender As Object, e As EventArgs)
If Not DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then If Not DtVentas IsNot Nothing AndAlso DtVentas.Rows.Count > 0 Then
Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia) Alert("No hay datos disponibles", TipoMensaje.MsgAdvertencia)
@@ -704,9 +711,9 @@ Partial Class Ventas_RepProductosServicios
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
CambioGrafica() CambioGrafica()
End Sub End Sub
#End Region #End Region
End Class End Class

View File

@@ -364,6 +364,12 @@
<div class="col-md-2"> <div class="col-md-2">
<asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" /> <asp:CheckBox ID="ChkLecturaAdmin" runat="server" Checked="false" CssClass="input-sm" Text="Lectura admiva:" TextAlign="Left" />
</div> </div>
<label class="col-md-1 truncate" id="divClasif2texto" runat="server" visible="false">Clasificación 2:</label>
<div class="col-md-2" id="divClasif2" runat="server" visible="false">
<asp:DropDownList ID="DdlClasificacion2" AutoPostBack="true" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Style="width: 100%">
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
</asp:DropDownList>
</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -239,8 +239,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1")) DdlPS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End If End If
'CargaEstatus 'CargaEstatus
DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura NOT IN (1, 4, 5) ") DdlEstatus.DataSource = GlobalDTEstatusFactura.FiltraParametros(" CveEstatusFactura NOT IN (1, 4, 5) ")
DdlEstatus.DataBind() DdlEstatus.DataBind()
@@ -256,8 +254,6 @@ Partial Class Ventas_RepProductosServiciosDetalle
DdlClienteClasificacion.DataBind() DdlClienteClasificacion.DataBind()
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
If UsuarioActual.CveEmpresa.Contiene(141) Then If UsuarioActual.CveEmpresa.Contiene(141) Then
DivDdlTipo.Visible = True DivDdlTipo.Visible = True
lblDdlTipoPSDes.Visible = True lblDdlTipoPSDes.Visible = True
@@ -274,6 +270,14 @@ Partial Class Ventas_RepProductosServiciosDetalle
TCEspecifico = 0 TCEspecifico = 0
TipoCambio = 1 TipoCambio = 1
If UsuarioActual.TienePermisoProceso(339) Then
GvDatos.Columns(10).Visible = False
GvDatos.Columns(11).Visible = False
GvDatos.Columns(12).Visible = False
GvDatos.Columns(13).Visible = False
GvDatos.Columns(14).Visible = False
End If
End Sub End Sub
Private Sub CargaSucursales(CveCliente As Integer, CveClienteSucursal As Integer) Private Sub CargaSucursales(CveCliente As Integer, CveClienteSucursal As Integer)
@@ -309,7 +313,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
End Sub End Sub
Private Sub CargaParametrosDetalle() Private Sub CargaParametrosDetalle()
Dim CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CvePS, FechaI, FechaF, FechaIEjec, FechaFEjec, CveSubProyectoEjecucion, CveEstatus, CveUsuario, Anio, Mes, AnioMes, Fecha, AnioEjec, MesEjec, AnioMesEjec, FechaEjec, GPO, TipoDocto, CveClienteClasificacion As String Dim CveProyecto, CveSubProyecto, CveCategoria, CveClasificacion, CveClasificacion2, CvePS, FechaI, FechaF, FechaIEjec, FechaFEjec, CveSubProyectoEjecucion, CveEstatus, CveUsuario, Anio, Mes, AnioMes, Fecha, AnioEjec, MesEjec, AnioMesEjec, FechaEjec, GPO, TipoDocto, CveClienteClasificacion As String
Dim CveCliente As Integer = -1 Dim CveCliente As Integer = -1
Dim CveProveedorCompra As Integer = -1 Dim CveProveedorCompra As Integer = -1
Dim CveVendedor As Integer Dim CveVendedor As Integer
@@ -325,6 +329,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
CveCategoria = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria").ToEntero() > 0, Request("CveCategoria").ToEntero(), -1).ToString CveCategoria = If(Request("CveCategoria") IsNot Nothing AndAlso Request("CveCategoria").ToEntero() > 0, Request("CveCategoria").ToEntero(), -1).ToString
CveClasificacion = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion").ToEntero() > 0, Request("CveClasificacion").ToEntero(), -1).ToString CveClasificacion = If(Request("CveClasificacion") IsNot Nothing AndAlso Request("CveClasificacion").ToEntero() > 0, Request("CveClasificacion").ToEntero(), -1).ToString
CvePS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS").ToEntero() > 0, Request("CvePS").ToEntero(), -1).ToString CvePS = If(Request("CvePS") IsNot Nothing AndAlso Request("CvePS").ToEntero() > 0, Request("CvePS").ToEntero(), -1).ToString
CveClasificacion2 = If(Request("CveClasificacion2") IsNot Nothing AndAlso Request("CveClasificacion2").ToEntero() > 0, Request("CveClasificacion2").ToEntero(), -1).ToString
Anio = If(Request("Anio") IsNot Nothing AndAlso Request("Anio").ToEntero() > 0, Request("Anio").ToEntero(), -1).ToString Anio = If(Request("Anio") IsNot Nothing AndAlso Request("Anio").ToEntero() > 0, Request("Anio").ToEntero(), -1).ToString
Mes = If(Request("Mes") IsNot Nothing AndAlso Request("Mes").ToEntero() > 0, Request("Mes").ToEntero(), -1).ToString Mes = If(Request("Mes") IsNot Nothing AndAlso Request("Mes").ToEntero() > 0, Request("Mes").ToEntero(), -1).ToString
@@ -436,6 +441,11 @@ Partial Class Ventas_RepProductosServiciosDetalle
If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then If UsuarioActual.Empresa.Funcionalidad(531).ToEntero = 1 Then
DvLitraje.Visible = True DvLitraje.Visible = True
'garantia 'garantia
DdlClasificacion2.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa)
DdlClasificacion2.DataBind()
divClasif2texto.Visible = True
divClasif2.Visible = True
divgarantia1.Visible = True divgarantia1.Visible = True
divgarantia2.Visible = True divgarantia2.Visible = True
divdistribuidor1.Visible = True divdistribuidor1.Visible = True
@@ -472,6 +482,8 @@ Partial Class Ventas_RepProductosServiciosDetalle
DdlSubProyecto.SelectedValueExist(CveSubProyecto) DdlSubProyecto.SelectedValueExist(CveSubProyecto)
DdlCategoria.SelectedValueExist(CveCategoria) DdlCategoria.SelectedValueExist(CveCategoria)
DdlClasificacion.SelectedValueExist(CveClasificacion) DdlClasificacion.SelectedValueExist(CveClasificacion)
DdlClasificacion2.SelectedValueExist(CveClasificacion2)
If CvePS.ToEntero > 0 Then If CvePS.ToEntero > 0 Then
DdlPS.SelectedValue = CvePS DdlPS.SelectedValue = CvePS
DdlPS.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS.ToEntero)(0)("PSCodigo").ToString DdlPS.SelectedText = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS.ToEntero)(0)("PSCodigo").ToString
@@ -531,7 +543,7 @@ Partial Class Ventas_RepProductosServiciosDetalle
TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra, TipoCambio:=TipoCambio, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProveedorCompra:=CveProveedorCompra,
CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveMarca:=DdlMarcaPSDes.SelectedValue.ToEntero, CveClasificacionDetalle:=DdlTipoPSDes.SelectedValue.ToEntero(), TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, MostrarLitraje:=ChkLitraje.Checked, EsGarantia:=DdlGarantia.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero,
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero) Then EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero, CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero, CveClasificacion2:=DdlClasificacion2.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjVentas.DtResultados GvDatos.DataSource = ObjVentas.DtResultados
TmpDT = ObjVentas.DtResultados TmpDT = ObjVentas.DtResultados
Else Else

File diff suppressed because it is too large Load Diff

View File

@@ -2152,7 +2152,14 @@ Partial Class Ventas
ViewState("EsGarantia") = value ViewState("EsGarantia") = value
End Set End Set
End Property End Property
Private Property DtMercancias As DataTable
Get
Return If(IsNothing(ViewState("DtMercancias")), Nothing, CType(ViewState("DtMercancias"), DataTable))
End Get
Set(value As DataTable)
ViewState("DtMercancias") = value
End Set
End Property
#End Region #End Region
'#Region "AuxiliarConta" '#Region "AuxiliarConta"
@@ -2452,6 +2459,7 @@ Partial Class Ventas
CargaClasificaciones() CargaClasificaciones()
CargaPS(-1, DdlPS) CargaPS(-1, DdlPS)
CargaPS(-1, DdlPSMercancia)
'CargaPSRemision(-1, DdlPSRemision) 'CargaPSRemision(-1, DdlPSRemision)
CargaPSPyME(-1, DdlPSPyME) CargaPSPyME(-1, DdlPSPyME)
@@ -5322,6 +5330,11 @@ Partial Class Ventas
BtnsFacturar.Visible = True BtnsFacturar.Visible = True
End If End If
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
BtnsFacturar.Visible = False
End If
'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES 'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES
If BtnsFacturar.Visible Then If BtnsFacturar.Visible Then
If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then
@@ -5963,7 +5976,7 @@ Partial Class Ventas
If ObjCliente.DtResultados.Rows.Count > 0 Then If ObjCliente.DtResultados.Rows.Count > 0 Then
TxtCodigo.Text = ObjCliente.Codigo TxtCodigo.Text = ObjCliente.Codigo
DdlFormaEntrega.SelectedValueExist(ObjCliente.DtResultados(0)("CveCondicionEntrega").ToString()) DdlFormaEntrega.SelectedValueExist(ObjCliente.DtResultados(0)("CveCondicionEntrega").ToString())
LblCliente.Text = String.Format("<a Class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente={0}"">{1}</a>", CveCliente, ObjCliente.Nombre) LblCliente.Text = String.Format("<a Class=""Texto"" href=""/Ventas/Clientes.aspx?CveCliente={0}"">{1}</a>", CveCliente, ObjCliente.NombreComercial)
ViewState("NombreCliente") = ObjCliente.Nombre ViewState("NombreCliente") = ObjCliente.Nombre
LtlCliente.Text = ObjCliente.Nombre LtlCliente.Text = ObjCliente.Nombre
ViewState("RequiereOC") = ObjCliente.RequiereOC ViewState("RequiereOC") = ObjCliente.RequiereOC
@@ -11021,12 +11034,18 @@ Partial Class Ventas
ObjFactura.EsGarantia = Me.EsGarantia ObjFactura.EsGarantia = Me.EsGarantia
If UsuarioActual.Empresa.Funcionalidad(558).ToEntero() = 1 AndAlso TrKilometraje.Visible Then
ObjFactura.Kilometraje = TxtKilometraje.Text.Trim.ToDecimal()
End If
'ASIGNAR RFC RECEPTOR 'ASIGNAR RFC RECEPTOR
If ObjFactura.Timbre IsNot Nothing Then If ObjFactura.Timbre IsNot Nothing Then
If ObjFactura.Timbre.Receptor IsNot Nothing Then If ObjFactura.Timbre.Receptor IsNot Nothing Then
ObjFactura.RFCReceptor = ObjFactura.Timbre.Receptor.RFC ObjFactura.RFCReceptor = ObjFactura.Timbre.Receptor.RFC
End If End If
End If End If
ObjFactura.DtMercancias = DtMercancias
End Sub End Sub
Private Sub CreaObjetosVentaDevolucion() Private Sub CreaObjetosVentaDevolucion()
@@ -11358,7 +11377,7 @@ Partial Class Ventas
Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.ClienteSucursal.CP
Else Else
Timbre.Receptor.RFC = Obj.Cliente.RFC Timbre.Receptor.RFC = Obj.Cliente.RFC
Timbre.Receptor.Nombre = Obj.Cliente.Nombre Timbre.Receptor.Nombre = Obj.Cliente.NombreComercial
Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP Timbre.Receptor.DomicilioFiscalReceptor = Obj.Cliente.CP
End If End If
@@ -14383,15 +14402,16 @@ Partial Class Ventas
End If End If
End If 'DEBE GENERAR MOVIMIENTO SI SE FACTURAON PRODUCTOS, O NO SE REALIZA UNA REFACTURACION
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0 AndAlso (NuevaFactura <> 1)
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0 'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN If Not OcurrioError AndAlso DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
If DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then OcurrioError = True
OcurrioError = True ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico") End If
End If End If
End If End If
End If End If
@@ -14831,12 +14851,11 @@ Partial Class Ventas
'TIMBRADO NUEVO 'TIMBRADO NUEVO
Try Try
PdfFactura(ObjFactura) Dim ObjetoPDF As Byte() = DescargarFactura(ObjFactura.CveVenta, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario)
'If DdlTipoComprobante.SelectedValue = "Ing" Or DdlTipoComprobante.SelectedValue = "Ant" Then
' PdfFactura(ObjFactura) If ObjetoPDF Is Nothing OrElse ObjetoPDF.Length = 0 Then
' 'Else PdfFactura(ObjFactura, AplicaPagare:=If(ObjFactura.TipoDocto.Contiene("Ing", "Rem", "Ant"), "1", "0"))
' ' pdf = PdfFactura(ObjFactura) End If
'End If
Catch ex As Exception Catch ex As Exception
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError) Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
@@ -14935,7 +14954,7 @@ Partial Class Ventas
'TIMBRADO NUEVO 'TIMBRADO NUEVO
Try Try
pdf = PdfFactura(ObjFactura) pdf = PdfFactura(ObjFactura, AplicaPagare:="1")
Catch ex As Exception Catch ex As Exception
Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError) Alert("Ocurrió un error al generar el PDF", TipoMensaje.MsgError)
End Try End Try
@@ -22241,10 +22260,10 @@ Partial Class Ventas
Return Retorno Return Retorno
End If End If
If Not PermiteCredito AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then If (Not PermiteCredito OrElse RBLPago.SelectedValue = "2") AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC
If TotalPago < TxtTotal.Text.ToDecimal Then If TotalPago <> TxtTotal.Text.ToDecimal Then
If MostrarAlertas Then If MostrarAlertas Then
Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia) Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -22319,7 +22338,7 @@ Partial Class Ventas
If Not PermiteCredito AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then If Not PermiteCredito AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC
If TotalPago < TxtTotal.Text.ToDecimal Then If TotalPago <> TxtTotal.Text.ToDecimal Then
If MostrarAlertas Then If MostrarAlertas Then
Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia) Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia)
End If End If
@@ -22640,6 +22659,7 @@ Partial Class Ventas
GvInv.DataSource = DtTemporal GvInv.DataSource = DtTemporal
GvInv.DataBind() GvInv.DataBind()
UpINV.Update() UpINV.Update()
End Sub End Sub
#End Region #End Region
@@ -32994,27 +33014,27 @@ Partial Class Ventas
' Return File ' Return File
'End Function 'End Function
'Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, Optional GetBytes As Boolean = True) As Byte() Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer, Optional GetBytes As Boolean = True) As Byte()
' Dim Url = New Uri(String.Format("http://{0}:{1}/Compras/PopUpVerFactura.aspx?P={2}", HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))) Dim Url = New Uri(String.Format("{0}://{1}:{2}/Compras/PopUpVerFactura.aspx?P={3}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port, Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
' Dim File As Byte() = Nothing Dim File As Byte() = Nothing
' Try Try
' Using httpClient = New HttpClient() Using httpClient = New HttpClient()
' httpClient.Timeout = New TimeSpan(0, 15, 0) httpClient.Timeout = New TimeSpan(0, 2, 0)
' Using request = New HttpRequestMessage(HttpMethod.Get, Url) Using request = New HttpRequestMessage(HttpMethod.Get, Url)
' request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CveUsuario=100", CveEmpresa, DateTime.UtcNow.Ticks))) request.Headers.Add("ADSToken", Encripta(String.Format("CVEEMPRESA={0}&TICKS={1}&CveUsuario={2}", CveEmpresa, DateTime.UtcNow.Ticks, CveUsuarioCreo)))
' Dim response = httpClient.SendAsync(request).Result Dim response = httpClient.SendAsync(request).Result
' If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then If GetBytes AndAlso response.StatusCode = Net.HttpStatusCode.OK Then
' File = response.Content.ReadAsByteArrayAsync().Result File = response.Content.ReadAsByteArrayAsync().Result
' End If End If
' End Using End Using
' End Using End Using
' Catch ex As Exception Catch ex As Exception
' File = Nothing File = Nothing
' OnError("Ocurrió un error al descargar la factura", ex) OnError("Ocurrió un error al descargar la factura", ex)
' End Try End Try
' Return File Return File
'End Function End Function
Protected Sub LnkGenerarOC_Click(sender As Object, e As EventArgs) Protected Sub LnkGenerarOC_Click(sender As Object, e As EventArgs)
Response.Redirect($"~/OC/OC.aspx?CveCotizacion={Me.CveVenta}&Tipo=OC") Response.Redirect($"~/OC/OC.aspx?CveCotizacion={Me.CveVenta}&Tipo=OC")
End Sub End Sub
@@ -34281,7 +34301,7 @@ Partial Class Ventas
If CveEntregaAlmacen > 0 Then If CveEntregaAlmacen > 0 Then
For Each RowPS As DataRow In ObjFactura.DtDetalle.FiltraParametros("CveTipoPS = 2").Rows For Each RowPS As DataRow In ObjFactura.DtMercancias.Rows
If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, RowPS("CvePS").ToString().ToEntero, RowPS("Cantidad").ToString().ToEntero, RowPS("CveUM").ToString().ToEntero, UsuarioActual.CveUsuario) Then If Not ObjGral.AddEntregaAlmacenRutaDetalle(CveEntregaAlmacen, RowPS("CvePS").ToString().ToEntero, RowPS("Cantidad").ToString().ToEntero, RowPS("CveUM").ToString().ToEntero, UsuarioActual.CveUsuario) Then
ErrorProceso = True ErrorProceso = True
Exit For Exit For
@@ -34458,6 +34478,65 @@ Partial Class Ventas
UpEmitirTransitorio.Update() UpEmitirTransitorio.Update()
End Sub End Sub
Protected Sub LnkAgregarMercancia_Click(sender As Object, e As EventArgs)
TxtCantidadMercancia.Text = ""
DdlPSMercancia.SelectedValue = ""
DdlPSMercancia.SelectedText = "Seleccione"
UpAgregarMercancia.Update()
RegistraScript("$('#DivAddMercancia').modal('show');", "M1")
End Sub
Protected Sub LnkAddPSMercancia_Click(sender As Object, e As EventArgs)
If DtMercancias Is Nothing Then
DtMercancias = New DataTable()
DtMercancias.Columns.Add(New DataColumn("Consec", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("CvePS", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("CveUM", GetType(Integer)))
DtMercancias.Columns.Add(New DataColumn("CodigoPS", GetType(String)))
End If
Dim CvePS As Integer = DdlPSMercancia.SelectedValue.ToEntero()
Dim DrPS As DataRow = GlobalDTPSSimplificado(CveEmpresa:=UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
If DrPS Is Nothing Then
Alert("No se encontró el producto/servicio", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
Dim NewRow As DataRow = DtMercancias.NewRow
NewRow("Consec") = DtMercancias.MAX("Consec").ToEntero() + 1
NewRow("Cantidad") = TxtCantidadMercancia.Text.ToDecimal()
NewRow("CvePS") = DrPS("CvePS")
NewRow("CveUM") = DrPS("CveUnidadMedida")
NewRow("CodigoPS") = DrPS("PSCodigo")
DtMercancias.Rows.Add(NewRow)
GvMercanciasCP.DataSource = DtMercancias
GvMercanciasCP.DataBind()
TxtCantidadMercancia.Text = ""
DdlPSMercancia.SelectedValue = ""
DdlPSMercancia.SelectedText = "Seleccione"
UpAgregarMercancia.Update()
UpEmitirTransitorio.Update()
End Sub
Protected Sub GvMercanciasCP_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvMercanciasCP.RowDeleting
Dim DbRow As DataRow = Nothing
DbRow = DtMercancias.Rows(e.RowIndex)
DtMercancias.Rows.Remove(DbRow)
GvMercanciasCP.DataSource = DtMercancias
GvMercanciasCP.DataBind()
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
UpEmitirTransitorio.Update()
End Sub
#End Region #End Region
Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs) Protected Sub BtnGenerarPoliza_Click(sender As Object, e As EventArgs)
@@ -34499,5 +34578,7 @@ Partial Class Ventas
End Sub End Sub
End Class End Class

View File

@@ -1150,6 +1150,54 @@ Public Class WSGPSApp
End Function End Function
<WebMethod>
Public Function GetRutas(CveCliente As Integer, CveRuta As Integer, MostrarPuntos As Boolean) As String
Dim DtRutas As DataTable = Nothing
Using ObjGPS As New ClsGPS
If ObjGPS.GetRutas(CveRuta, CveCliente) Then
DtRutas = ObjGPS.DtResultados.Copy()
End If
End Using
Dim Rutas As New List(Of Object)
If DtRutas IsNot Nothing Then
For Each Row As DataRow In DtRutas.Rows
Dim Coordenadas As List(Of MWSGeolocation2) = Nothing
If MostrarPuntos Then
Coordenadas = SQLToGmapsPolyline(Row("Poligono").ToString())
End If
Rutas.Add(New With {
.CveRuta = Row("CveRuta").ToString().ToEntero(),
.Ruta = Row("Ruta").ToString(),
.Folio = Row("Folio").ToString(),
.Fecha = Row("FechaIng").ToString(),
.CveDispositivo = Row("CveDispositivo").ToString().ToEntero(),
.CveUsuarioIngreso = Row("CveUsuarioIngreso").ToString().ToEntero(),
.Coordenadas = Coordenadas
})
Next
End If
Return JsonConvert.SerializeObject(Rutas)
End Function
<WebMethod>
Public Function GetRutaPuntosRecoleecion(CveRuta As Integer) As String
Dim Retorno As String = "[]"
Using ObjGPS As New ClsGPS
If ObjGPS.GetRutasPuntosRecoleecion(CveRuta) Then
Retorno = ObjGPS.DtResultados.DataTableToJSONIPP()
End If
End Using
Return Retorno
End Function
#Region "F U N C I O N E S" #Region "F U N C I O N E S"
Private Function CargarEventos(CveCliente As Integer, FechaI As DateTime, FechaF As DateTime) As MWSDashboard2 Private Function CargarEventos(CveCliente As Integer, FechaI As DateTime, FechaF As DateTime) As MWSDashboard2
Dim ObjGPS As New ClsGPS Dim ObjGPS As New ClsGPS
@@ -1225,6 +1273,28 @@ Public Class WSGPSApp
Next Next
Return Var Return Var
End Function End Function
Private Function SQLToGmapsPolyline(CoordsSQL As String) As List(Of MWSGeolocation2)
Dim CoordsPoligono As String = CoordsSQL.Replace($"LINESTRING", "").Replace(")", "").Replace("(", "")
Dim CoordsPuntos() As String = CoordsPoligono.Split(","c)
Dim puntos As New List(Of MWSGeolocation2)
For Each coordenada As String In CoordsPuntos
Dim Var As New MWSGeolocation2
If coordenada Is CoordsPuntos.Last Then
Dim latlng() As String = coordenada.Trim.Split(" "c)
Var.Latitud = latlng(1).ToDouble()
Var.Longitud = latlng(0).ToDouble()
Else
Dim latlng() As String = coordenada.Trim.Split(" "c)
Var.Latitud = latlng(1).ToDouble()
Var.Longitud = latlng(0).ToDouble()
End If
puntos.Add(Var)
Next
Return puntos
End Function
Private Function GetJson(ByVal dt As DataTable) As String Private Function GetJson(ByVal dt As DataTable) As String
Dim serializer As New System.Web.Script.Serialization.JavaScriptSerializer() Dim serializer As New System.Web.Script.Serialization.JavaScriptSerializer()
Dim rows As New List(Of Dictionary(Of String, Object))() Dim rows As New List(Of Dictionary(Of String, Object))()

View File

@@ -492,6 +492,10 @@