Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
134
App_Code/CFDITimbreRetenciones.vb
Normal file
134
App_Code/CFDITimbreRetenciones.vb
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
Option Strict On
|
||||||
|
Option Explicit On
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
<Serializable>
|
||||||
|
Public Class CFDITimbreRetenciones
|
||||||
|
Private StrMsg As StringBuilder
|
||||||
|
Public Property Retencion As CFDIRetencion
|
||||||
|
Public Property CFDIRelacionados As CFDIRelacionados
|
||||||
|
Public Property Fecha As DateTime
|
||||||
|
Public Property Emisor As CFDIEmisor
|
||||||
|
Public Property Receptor As CFDIReceptorR
|
||||||
|
Public Property RetencionesImpuestos As List(Of CFDIImpuestosRetenidos)
|
||||||
|
Public Property ISRCorrespondiente As Decimal = 0
|
||||||
|
'Public Property Complementos As CFDIComplementos
|
||||||
|
Public Property Timbrado As Boolean
|
||||||
|
Public Property IStimbreFiniquito As Boolean
|
||||||
|
|
||||||
|
Public ReadOnly Property TotalOperacionRetenidos As Decimal
|
||||||
|
Get
|
||||||
|
Return (From c In RetencionesImpuestos
|
||||||
|
Where c.ImpuestoRetencion = "001"
|
||||||
|
Select c.MontoRetencion).Sum
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TotalImpuestosGravado As Decimal
|
||||||
|
Get
|
||||||
|
Return (From c In RetencionesImpuestos
|
||||||
|
Where c.ImpuestoRetencion = "001"
|
||||||
|
Select c.MontoRetencion).Sum
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property TotalImpuestosRetenidos As Decimal
|
||||||
|
Get
|
||||||
|
Return (From c In RetencionesImpuestos
|
||||||
|
Where c.ImpuestoRetencion = "001"
|
||||||
|
Select c.MontoRetencion).Sum
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public ReadOnly Property TotalImpuestosExento As Decimal
|
||||||
|
Get
|
||||||
|
Return (From c In RetencionesImpuestos
|
||||||
|
Where c.ImpuestoRetencion = "001"
|
||||||
|
Select c.MontoRetencion).Sum
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
'Public ReadOnly Property Retenciones As List(Of CFDIRetenciones)
|
||||||
|
' Get
|
||||||
|
' Dim tRetorno As New List(Of CFDIRetenciones)
|
||||||
|
' Dim TRetenciones As New List(Of CFDIRetenciones)
|
||||||
|
' For Each c As CFDIConceptos In Conceptos
|
||||||
|
' For Each imp As CFDIConceptosImpuestos In c.Impuestos
|
||||||
|
' If imp.TrasladooRetencion = "R" Then
|
||||||
|
' tRetorno.Add(New CFDIRetenciones With {.Impuesto = imp.Impuesto, .Importe = imp.Importe})
|
||||||
|
' 'If imp.Impuesto = "001" Then RetencionISR += imp.Importe
|
||||||
|
' 'If imp.Impuesto = "002" Then RetencionIVA += imp.Importe
|
||||||
|
' 'If imp.Impuesto = "003" Then RetencionIEPS += imp.Importe
|
||||||
|
' End If
|
||||||
|
' Next
|
||||||
|
' Next
|
||||||
|
' If tRetorno.Count > 0 Then
|
||||||
|
' TRetenciones = tRetorno.GroupBy(Function(t) New With {Key t.Impuesto}) _
|
||||||
|
' .Select(Function(t) New CFDIRetenciones With {.Impuesto = t.Key.Impuesto,
|
||||||
|
' .Importe = t.Sum(Function(tt) tt.Importe)}) _
|
||||||
|
' .OrderBy(Function(x) x.Impuesto).ToList
|
||||||
|
' End If
|
||||||
|
' 'If RetencionISR > 0 Then Retorno.Add(New CFDIRetenciones With {.Impuesto = "001", .Importe = RetencionISR})
|
||||||
|
' 'if RetencionIVA > 0 Then Retorno.Add(New CFDIRetenciones With {.Impuesto = "002", .Importe = RetencionIVA})
|
||||||
|
' 'If RetencionIEPS > 0 Then Retorno.Add(New CFDIRetenciones With {.Impuesto = "003", .Importe = RetencionIEPS})
|
||||||
|
' tRetorno = Nothing
|
||||||
|
' Return TRetenciones
|
||||||
|
|
||||||
|
' End Get
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Mensaje As String
|
||||||
|
Get
|
||||||
|
Return StrMsg.ToString
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Sub New()
|
||||||
|
StrMsg = New StringBuilder
|
||||||
|
Retencion = New CFDIRetencion
|
||||||
|
CFDIRelacionados = New CFDIRelacionados
|
||||||
|
Emisor = New CFDIEmisor
|
||||||
|
Receptor = New CFDIReceptorR
|
||||||
|
RetencionesImpuestos = New List(Of CFDIImpuestosRetenidos)
|
||||||
|
'Complementos = New CFDIComplementos
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub AddMsg(Msg As String)
|
||||||
|
StrMsg.AppendLine(Msg)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
<Serializable>
|
||||||
|
Public Class CFDIRetencion
|
||||||
|
Public Property Version As String
|
||||||
|
Public Property Serie As String = ""
|
||||||
|
Public Property Folio As String = ""
|
||||||
|
Public ReadOnly Property SerieFolio As String
|
||||||
|
Get
|
||||||
|
'sino tiene serie no pone el guión
|
||||||
|
Return If(Serie = "", Folio, $"{Serie}-{Folio}")
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
Public Property ClaveRetencion As String = "28"
|
||||||
|
Public Property Fecha As Date
|
||||||
|
Public Property LugarExpedicion As String = ""
|
||||||
|
Public Property PeriodoMesInicio As String = ""
|
||||||
|
Public Property PeriodoMesFin As String = ""
|
||||||
|
Public Property PeriodoEjercicio As Integer = 0
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
<Serializable>
|
||||||
|
Public Class CFDIReceptorR
|
||||||
|
Public Property RFCR As String
|
||||||
|
Public Property NombreDenominacionR As String
|
||||||
|
Public Property NacionalidadR As String = "Nacional"
|
||||||
|
Public Property DomicilioFiscalR As String = ""
|
||||||
|
End Class
|
||||||
|
Public Class CFDIImpuestosRetenidos
|
||||||
|
Public Property BaseRetencion As Decimal = 0.00D
|
||||||
|
Public Property ImpuestoRetencion As String = "" '001,002,003
|
||||||
|
Public Property MontoRetencion As Decimal = 0.00D ' propiedad utilizada solo para hacer ajustes, por default toma la multiplicación de base * tasa
|
||||||
|
Public Property TipoPagoRetencion As String = ""
|
||||||
|
Public Property BaseRetencionGravado As Decimal = 0.00D
|
||||||
|
Public Property BaseRetencionExento As Decimal = 0.00D
|
||||||
|
End Class
|
||||||
@@ -3577,7 +3577,7 @@ Public Class ClsContabilidad
|
|||||||
Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
|
Public Function GetMovimientosAuxiliaresCatalogo(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGetOIC")
|
DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
@@ -3599,6 +3599,32 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function GetLibroMayor2(CveCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Conta_LibroMayor2Get")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@Tipo", SqlDbType.Int).Value = TipoReporte
|
||||||
|
.Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas
|
||||||
|
End With
|
||||||
|
SqlAdapter.SelectCommand.CommandTimeout = 0
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
Me.OnError("Ocurrió un error al obtener los Movimientos Libro mayor", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function PolizaGet(CvePoliza As Integer) As Boolean
|
Public Function PolizaGet(CvePoliza As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|||||||
@@ -4495,24 +4495,24 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateOSEstatusInventario(CveOS As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
|
Public Function UpdateOSEstatusInventario(CveOS As Integer, Estatus As Boolean, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_OS_OSEstatusInventarioUpdate")
|
DataAdapter("PA_OS_OSEstatusInventarioUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar el estatus de OS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("Ocurrió un error al actualizar el estatus de OS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -1541,7 +1541,7 @@ Public Class ClsMovimientos
|
|||||||
Public Function GetRepRecuperacion(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer,
|
Public Function GetRepRecuperacion(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer,
|
||||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String,
|
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String,
|
||||||
CveEmpresa As Integer, Gpo As Integer, CveResponsable As Integer,
|
CveEmpresa As Integer, Gpo As Integer, CveResponsable As Integer,
|
||||||
Optional TipoDocto As String = "-1",
|
Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1,
|
||||||
Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
Optional EstatusCliente As Integer = -1, Optional CveUsuarioConsulta As Integer = -1,
|
||||||
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
|
Optional CveBanco As Integer = -1, Optional CveCuenta As Integer = -1,
|
||||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0, Optional CveClienteClasificacion As Integer = -1,
|
||||||
@@ -1556,6 +1556,7 @@ Public Class ClsMovimientos
|
|||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
@@ -1590,7 +1591,7 @@ Public Class ClsMovimientos
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetRepRecuperacionPerido(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer,
|
Public Function GetRepRecuperacionPerido(FechaI As Date, FechaF As Date, CveCliente As Integer, CveProyecto As Integer, CveSubProyecto As Integer,
|
||||||
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String,
|
CveVendedor As Integer, CveUsuario As Integer, CveEstatus As Integer, IVA As String,
|
||||||
CveEmpresa As Integer, Gpo As Integer, CveResponsable As Integer,
|
CveEmpresa As Integer, Gpo As Integer, CveResponsable As Integer,
|
||||||
TipoDocto As String, EstatusCliente As Integer, CveUsuarioConsulta As Integer,
|
TipoDocto As String, EstatusCliente As Integer, CveUsuarioConsulta As Integer,
|
||||||
@@ -1602,6 +1603,7 @@ Public Class ClsMovimientos
|
|||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
@@ -1629,7 +1631,7 @@ Public Class ClsMovimientos
|
|||||||
Public Function GetRepRecuperacionDetalle(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer,
|
Public Function GetRepRecuperacionDetalle(FechaI As Date, FechaF As Date, CveCliente As Integer, CveSubProyecto As Integer,
|
||||||
CveVendedor As Integer, CveUsuario As Integer, CveClienteSucursal As Integer,
|
CveVendedor As Integer, CveUsuario As Integer, CveClienteSucursal As Integer,
|
||||||
CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
|
CveEstatus As Integer, IVA As String, Agrupador As Integer, CveEmpresa As Integer,
|
||||||
CveResponsable As Integer, Optional TipoDocto As String = "-1",
|
CveResponsable As Integer, Optional TipoDocto As String = "-1", Optional CveProyecto As Integer = -1,
|
||||||
Optional CveUsuarioConsulta As Integer = -1, Optional CveBanco As Integer = -1,
|
Optional CveUsuarioConsulta As Integer = -1, Optional CveBanco As Integer = -1,
|
||||||
Optional CveCuenta As Integer = -1, Optional Grupo As String = "-1",
|
Optional CveCuenta As Integer = -1, Optional Grupo As String = "-1",
|
||||||
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
|
Optional TipoCambio As Integer = -1, Optional TCEspecifico As Double = 0,
|
||||||
@@ -1646,6 +1648,7 @@ Public Class ClsMovimientos
|
|||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.VarChar).Value = CveVendedor
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
|||||||
@@ -9719,6 +9719,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/General/JAMComparativos.aspx".ToUpper(), 643)
|
PaginaDict.Add("/General/JAMComparativos.aspx".ToUpper(), 643)
|
||||||
PaginaDict.Add("/General/CatMotivoRechazoGuias.aspx".ToUpper(), 729)
|
PaginaDict.Add("/General/CatMotivoRechazoGuias.aspx".ToUpper(), 729)
|
||||||
PaginaDict.Add("/General/FolioFechaCancelacion.aspx".ToUpper(), -1)
|
PaginaDict.Add("/General/FolioFechaCancelacion.aspx".ToUpper(), -1)
|
||||||
|
PaginaDict.Add("/General/TimbraRetencion.aspx".ToUpper(), 588)
|
||||||
|
|
||||||
#Region "####### Q U I T A R #######"
|
#Region "####### Q U I T A R #######"
|
||||||
'PaginaDict.Add("/Contratos/Estimaciones.aspx".ToUpper(), -1)
|
'PaginaDict.Add("/Contratos/Estimaciones.aspx".ToUpper(), -1)
|
||||||
@@ -10172,7 +10173,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Contabilidad/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
|
PaginaDict.Add("/Contabilidad/RepEstadoResultadosHorizontal.aspx".ToUpper(), 420)
|
||||||
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Contabilidad/RepAnexoCatalogoMensualHorizontal.aspx".ToUpper(), -1)
|
||||||
PaginaDict.Add("/Contabilidad/CatBloqueoDiario.aspx".ToUpper(), 680)
|
PaginaDict.Add("/Contabilidad/CatBloqueoDiario.aspx".ToUpper(), 680)
|
||||||
PaginaDict.Add("/Contabilidad/LibroMayor2.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Contabilidad/LibroMayor2.aspx".ToUpper(), 1353)
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -34,34 +34,6 @@ Public Class ClsSisUsuarioAutenticacion
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
Public Property CveUsuario As Integer
|
|
||||||
Public Property Usuario As String
|
|
||||||
Public Property Nombre As String
|
|
||||||
Public Property CveRol As Integer
|
|
||||||
Public Property Correo As String
|
|
||||||
Public Property CveSupervisa As Integer
|
|
||||||
Public Property CveAutoriza As Integer
|
|
||||||
Public Property CveEmpresa As Integer
|
|
||||||
Public Property CveAlmacen As Integer
|
|
||||||
Public Property CveEmpresaPredeterminada As Integer
|
|
||||||
Public Property CvePersonal As Integer
|
|
||||||
Public Property CveVendedor As Integer
|
|
||||||
Public Property CveTipoDocumento As String
|
|
||||||
Public Property Estado As Boolean
|
|
||||||
Public Property Fecha As DateTime
|
|
||||||
Public Property Registro As Integer
|
|
||||||
Public Property UsuarioCreo As String
|
|
||||||
Public Property Contraseña As String
|
|
||||||
Public Property EsLogIn As Integer
|
|
||||||
Public Property FechaUltimoAcceso As Date
|
|
||||||
Public Property FechaUltimoCambioContraseña As Date
|
|
||||||
Public Property PolCambiarContraseña As Boolean
|
|
||||||
Public Property TipoControl As Integer
|
|
||||||
Public Property CveSubProyecto As Integer
|
|
||||||
Public Property AsignarAutomaticamenteSubProyecto As Boolean
|
|
||||||
Public Property AsignarAutomaticamenteOC As Boolean
|
|
||||||
Public Property DescuentoAutorizado As Double
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing, Optional NombreCadena As String = "Conexion")
|
Sub New(Optional TransaccionCompartida As SqlTransaction = Nothing, Optional NombreCadena As String = "Conexion")
|
||||||
@@ -342,7 +314,7 @@ Public Class ClsSisUsuarioAutenticacion
|
|||||||
|
|
||||||
Retorno.Acceso = Data.Rows(0)("Acceso").ToString().ToEntero()
|
Retorno.Acceso = Data.Rows(0)("Acceso").ToString().ToEntero()
|
||||||
Retorno.CveUsuario = Data.Rows(0)("CveUsuario").ToString().ToEntero()
|
Retorno.CveUsuario = Data.Rows(0)("CveUsuario").ToString().ToEntero()
|
||||||
Retorno.Usuario = Usuario
|
Retorno.Usuario = Data.Rows(0)("Usuario").ToString()
|
||||||
Retorno.Contraseña = Data.Rows(0)("Contraseña").ToString()
|
Retorno.Contraseña = Data.Rows(0)("Contraseña").ToString()
|
||||||
Retorno.Nombre = Data.Rows(0)("Nombre").ToString()
|
Retorno.Nombre = Data.Rows(0)("Nombre").ToString()
|
||||||
Retorno.CveRol = Data.Rows(0)("CveRol").ToString().ToEntero()
|
Retorno.CveRol = Data.Rows(0)("CveRol").ToString().ToEntero()
|
||||||
@@ -354,6 +326,7 @@ Public Class ClsSisUsuarioAutenticacion
|
|||||||
Retorno.FechaUltimoAcceso = Data.Rows(0)("FechaUltimoAcceso").ToString().ToDate()
|
Retorno.FechaUltimoAcceso = Data.Rows(0)("FechaUltimoAcceso").ToString().ToDate()
|
||||||
Retorno.FechaUltimoCambioContraseña = Data.Rows(0)("FechaUltimoCambioContraseña").ToString().ToDate()
|
Retorno.FechaUltimoCambioContraseña = Data.Rows(0)("FechaUltimoCambioContraseña").ToString().ToDate()
|
||||||
Retorno.ActCambiarContraseña = If(Data.Rows(0)("ActCambiarContraseña").ToString() = "SI", True, False)
|
Retorno.ActCambiarContraseña = If(Data.Rows(0)("ActCambiarContraseña").ToString() = "SI", True, False)
|
||||||
|
'Retorno.PolCambiarContraseña = If(Data.Rows(0)("PolCambiarContraseña").ToString() = "SI", True, False)
|
||||||
Retorno.TipoControl = Data.Rows(0)("TipoControl").ToString().ToEntero()
|
Retorno.TipoControl = Data.Rows(0)("TipoControl").ToString().ToEntero()
|
||||||
'*
|
'*
|
||||||
Retorno.CveProveedor = Data.Rows(0)("CveProveedor").ToString().ToEntero()
|
Retorno.CveProveedor = Data.Rows(0)("CveProveedor").ToString().ToEntero()
|
||||||
@@ -400,6 +373,8 @@ Public Class ClsSisUsuarioAutenticacion
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Public Function ValidaUsuarioAsignacion(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
|
'Public Function ValidaUsuarioAsignacion(CveUsuario As Integer, CveEmpresa As Integer) As Usuario
|
||||||
' Dim Retorno As Usuario = Nothing
|
' Dim Retorno As Usuario = Nothing
|
||||||
|
|
||||||
|
|||||||
@@ -575,6 +575,35 @@ Public Class ClsSisUsuarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateUsuarioContrasenia(Contrasenia As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("UPDATE U SET [Contraseña] = @Contrasenia, FechaUltimoCambioContraseña = GETDATE() FROM Usuarios U WHERE U.CveUsuario = @CveUsuario ", CommandType.Text)
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|
||||||
|
.Add("@Contrasenia", SqlDbType.VarChar).Value = Contrasenia
|
||||||
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
If Ex1.Message.Contains("Número: 2627;") Then
|
||||||
|
Alert("Ya existe un Usuario con el mismo nombre: " & Usuario & ".", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
Me.OnError("Ocurrió un error al guardar los cambios en el Usuario", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al guardar los cambios en el Usuario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function AddUsuarioAsignar(CvePersonal As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveAlmacen As Integer, CveTipoDocumento As String, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
Public Function AddUsuarioAsignar(CvePersonal As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveAlmacen As Integer, CveTipoDocumento As String, CveEmpresa As Integer, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -723,34 +752,6 @@ Public Class ClsSisUsuarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateUsuarioContrasenia(Contrasenia As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
|
|
||||||
DataAdapter("UPDATE U SET [Contraseña] = @Contrasenia, FechaUltimoCambioContraseña = GETDATE() FROM Usuarios U WHERE U.CveUsuario = @CveUsuario ", CommandType.Text)
|
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
|
|
||||||
.Add("@Contrasenia", SqlDbType.VarChar).Value = Contrasenia
|
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
|
||||||
|
|
||||||
End With
|
|
||||||
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch Ex1 As SqlException
|
|
||||||
If Ex1.Message.Contains("Número: 2627;") Then
|
|
||||||
Alert("Ya existe un Usuario con el mismo nombre: " & Usuario & ".", TipoMensaje.MsgAdvertencia)
|
|
||||||
Else
|
|
||||||
Me.OnError("Ocurrió un error al guardar los cambios en el Usuario", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al guardar los cambios en el Usuario.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
Public Function RemoveUsuario(CveUsuario As Integer) As Boolean
|
Public Function RemoveUsuario(CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
|||||||
@@ -433,8 +433,7 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<asp:UpdatePanel ID="UpVentas" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpVentas" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:CheckBox ID="ChkEmitirComplementoPago" CssClass="md-checksd" Text="Emitir Complemento de Pago" runat="server" align="Right" />
|
|
||||||
<br />
|
|
||||||
<asp:GridView ID="GvVentas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveVenta,SerieFolio,Saldo,Folio,CveCliente,CveMoneda,RetISR,RetIVA,IVA,IEPS,TipoCambio,Total,PorcentajeIVA,CveSubProyecto"
|
<asp:GridView ID="GvVentas" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron movimientos" DataKeyNames="CveVenta,SerieFolio,Saldo,Folio,CveCliente,CveMoneda,RetISR,RetIVA,IVA,IEPS,TipoCambio,Total,PorcentajeIVA,CveSubProyecto"
|
||||||
ToolTip="Listado de Movimientos" data-height="200" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" HeaderStyle-ForeColor="Black">
|
ToolTip="Listado de Movimientos" data-height="200" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None" HeaderStyle-ForeColor="Black">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -485,7 +484,8 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
<asp:CheckBox ID="ChkEmitirComplementoPago" CssClass="md-checksd" Text="Emitir Complemento de Pago" runat="server" align="Right" />
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1501,7 +1501,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End If
|
End If
|
||||||
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
If RBLContado.SelectedValue.ToEntero = 6 And ChkEmitirComplementoPago.Checked Then GeneraTimbre(CvePrePoliza) Else Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, "self.parent.tb_remove();self.parent.location.reload();")
|
||||||
|
|
||||||
EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False)
|
If NotificarA <> "" Then EnviarCorreoNotificacion(CveIE, NotificarA, "", UsuarioActual, False)
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjIE.RollBack()
|
ObjIE.RollBack()
|
||||||
@@ -1574,7 +1574,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
Banco.IniciaTransacSQL()
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
|
||||||
If Banco.GeneraTimbrePago(CveIE, -1, UsuarioActual, CvePrePoliza:=CvePrePoliza) Then
|
If Banco.GeneraTimbrePago(-1, -1, UsuarioActual, CvePrePoliza:=CvePrePoliza) Then
|
||||||
If Banco.Mensaje = "" Then
|
If Banco.Mensaje = "" Then
|
||||||
Banco.Commit()
|
Banco.Commit()
|
||||||
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
||||||
|
|||||||
@@ -21252,8 +21252,8 @@ Partial Class Compras_Compras
|
|||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim TmpImporteRNC As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, (ImporteRNC * AjusteProntoPagoPorcentajeIVA), ImporteRNC)
|
Dim TmpImporteRNC As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNC + (ImporteRNC * AjusteProntoPagoPorcentajeIVA), ImporteRNC)
|
||||||
Dim TmpImporteRNCProntoPago As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, (TmpImporteRNCProntoPago * AjusteProntoPagoPorcentajeIVA), ImporteRNCProntoPago)
|
Dim TmpImporteRNCProntoPago As Decimal = If(AjusteProntoPagoPorcentajeIVA > 0, ImporteRNCProntoPago + (ImporteRNCProntoPago * AjusteProntoPagoPorcentajeIVA), ImporteRNCProntoPago)
|
||||||
|
|
||||||
Dim StrMsg As String = $"Existe una diferencia de ${(TmpImporteRNC + TmpImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra. <br/> Se generaran Remisiones de Nota de Crédito. <br/> - Descuento de ${TmpImporteRNC.ToString("###,###,###.00")}.<br/>"
|
Dim StrMsg As String = $"Existe una diferencia de ${(TmpImporteRNC + TmpImporteRNCProntoPago).ToString("###,###,###.00")} entre la compra y la Orden de Compra. <br/> Se generaran Remisiones de Nota de Crédito. <br/> - Descuento de ${TmpImporteRNC.ToString("###,###,###.00")}.<br/>"
|
||||||
If TmpImporteRNCProntoPago > 0 Then
|
If TmpImporteRNCProntoPago > 0 Then
|
||||||
|
|||||||
@@ -25,15 +25,15 @@
|
|||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="ImgExcel" runat="server"><i class="fa fa-ad-excel"></i> Generar EXCEL</asp:LinkButton>
|
<asp:LinkButton ID="ImgExcel" runat="server" Visible="false"><i class="fa fa-ad-excel" ></i> Generar EXCEL</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
<asp:LinkButton ID="Imprimir" runat="server" Visible="false"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
Movimientos Auxiliares del Catálogo
|
Libro Mayor
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
@@ -97,10 +97,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style=""display:none;""")%>>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1 truncate">
|
<div class="col-md-1 ">
|
||||||
Tipo Movto
|
Tipo Movto
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2 truncate">
|
<div class="col-md-3 ">
|
||||||
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlOpcionCuentas" runat="server" DataTextField="Cuenta" DataValueField="CveCuenta" TabIndex="4" CssClass="form-control input-sm select2me" Width="100%">
|
||||||
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
<asp:ListItem Text="Todos" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Con movimientos" Value="1"></asp:ListItem>
|
||||||
@@ -109,7 +109,7 @@
|
|||||||
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
<asp:ListItem Text="Con movimientos o saldo no igual a cero" Value="4"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate" id="tdTipoReporte" visible="false" runat="server">
|
<div class="col-md-1 " id="tdTipoReporte" visible="false" runat="server">
|
||||||
Tipo
|
Tipo
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
<div class="col-md-2" id="tdTipoReporte2" visible="false" runat="server">
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ Partial Class Conta_LibroMayor2
|
|||||||
|
|
||||||
Cuenta = DdlCuentas.SelectedItem.ToString
|
Cuenta = DdlCuentas.SelectedItem.ToString
|
||||||
Dim ObjConta As New ClsContabilidad
|
Dim ObjConta As New ClsContabilidad
|
||||||
If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
If ObjConta.GetLibroMayor2(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then
|
||||||
DtDatos = ObjConta.DtResultados
|
DtDatos = ObjConta.DtResultados
|
||||||
DtTotales = DtDatos.Clone
|
DtTotales = DtDatos.Clone
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
<asp:LinkButton ID="BtnImprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||||
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
<%--<asp:ImageButton ID="BtnImprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" Visible="true" /> --%>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="BtnImprimirPoSubProyecto" runat="server" OnClick="BtnImprimirPoSubProyecto_Click" Visible="false" ><i class="fa fa-print"></i> Imprimir por Sub Proyecto</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ Imports System
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports ClosedXML.Excel
|
||||||
|
Imports Profact.TimbraCFDI40
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Drawing
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Partial Class Contabilidad2_RepBalanzaComprobacion
|
Partial Class Contabilidad2_RepBalanzaComprobacion
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -105,6 +111,10 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
|||||||
End If
|
End If
|
||||||
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
|
CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto)
|
||||||
|
|
||||||
|
If UsuarioActual.CveRol = 1 Then
|
||||||
|
BtnImprimirPoSubProyecto.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -254,4 +264,238 @@ Partial Class Contabilidad2_RepBalanzaComprobacion
|
|||||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnImprimirPoSubProyecto_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim WBAnexoBalanza = New ClosedXML.Excel.XLWorkbook
|
||||||
|
Dim TipoReporte = DdlTipoReporte.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
FechaInicio = If(TxtFechaDel.Text = "" Or TxtFechaDel.Text = "__/__/____", NowADS(), TxtFechaDel.Text.ToDate)
|
||||||
|
FechaFin = If(TxtFechaAl.Text = "" Or TxtFechaAl.Text = "__/__/____", NowADS(), TxtFechaAl.Text.ToDate)
|
||||||
|
|
||||||
|
Dim SPCounter As Integer = 1
|
||||||
|
For Each drSP As DataRow In GlobalDTSubProyectos(UsuarioActual.CveEmpresa).Rows
|
||||||
|
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
If ObjConta.GetBalanzaComprobacion(FechaInicio, FechaFin, 2, TipoReporte, -1, drSP("CveSubProyecto").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlVista.SelectedValue.ToEntero, DdlNivel.SelectedValue.ToEntero) Then
|
||||||
|
DtDatos = ObjConta.DtResultados
|
||||||
|
Else
|
||||||
|
DtDatos = Nothing
|
||||||
|
Alert("Ocurrio un error al cargar los datos del Anexo del Catálogo", TipoMensaje.MsgError)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
|
|
||||||
|
If DtDatos.Rows.Count > 0 Then
|
||||||
|
WBAnexoBalanza.AddWorksheet(WSDocumento(drSP("SubProyecto").ToString, DtDatos))
|
||||||
|
Dim spNombre As String = drSP("SubProyecto").ToString().Replace(":", "_").Replace("/", "_").Replace("\", "_").Replace("?", "_").Replace("*", "_").Replace("[", "_").Replace("]", "_")
|
||||||
|
WBAnexoBalanza.Worksheet(SPCounter).Name = $"{SPCounter}_{spNombre}"
|
||||||
|
SPCounter = SPCounter + 1
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim msB = New MemoryStream()
|
||||||
|
WBAnexoBalanza.SaveAs(msB)
|
||||||
|
|
||||||
|
Dim BB As Byte() = msB.ToArray
|
||||||
|
msB.Dispose()
|
||||||
|
|
||||||
|
Response.Clear()
|
||||||
|
Response.Buffer = True
|
||||||
|
Response.AddHeader("content-disposition", "attachment; filename=Balanza_" & Now.ToString("yyyyMMddhhmmss") & ".xlsx")
|
||||||
|
Response.ContentType = "application/vnd.ms-excel"
|
||||||
|
Response.BinaryWrite(BB)
|
||||||
|
Response.End()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Function WSDocumento(SubProyecto As String, DtDatos As DataTable) As IXLWorksheet
|
||||||
|
|
||||||
|
|
||||||
|
Dim WBAnexoSalvar = New ClosedXML.Excel.XLWorkbook
|
||||||
|
Dim WBReporte = New ClosedXML.Excel.XLWorkbook()
|
||||||
|
WBReporte.Worksheets.Add("1")
|
||||||
|
|
||||||
|
Dim WSReporte = WBReporte.Worksheet(1)
|
||||||
|
|
||||||
|
Dim RutaLogo As String = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
|
||||||
|
If File.Exists(RutaLogo) Then
|
||||||
|
|
||||||
|
Dim imagePath As String = RutaLogo
|
||||||
|
Dim img As Bitmap = New Bitmap(imagePath)
|
||||||
|
Dim picture = WSReporte.AddPicture(img).MoveTo(WSReporte.Cell("A1"))
|
||||||
|
picture.Scale(0.5)
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim Tamaniofuente As Integer = 13
|
||||||
|
Dim Range = WSReporte.Range("A1:D1")
|
||||||
|
|
||||||
|
WSReporte.Style.Font.FontSize = 10
|
||||||
|
WSReporte.Style.Font.FontName = "Arial Narrow"
|
||||||
|
|
||||||
|
WSReporte.Style.Alignment.WrapText = True
|
||||||
|
|
||||||
|
Range.Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
|
||||||
|
|
||||||
|
WSReporte.Range("A1:F1").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
|
||||||
|
WSReporte.Range("A2:F2").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
|
||||||
|
WSReporte.Range("A3:F3").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
|
||||||
|
WSReporte.Range("A4:F4").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
|
||||||
|
WSReporte.Range("A5:F5").Merge().Style.Font.SetBold().Font.FontSize = Tamaniofuente
|
||||||
|
|
||||||
|
WSReporte.Range("A1:A5").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
|
||||||
|
|
||||||
|
WSReporte.Column(1).Width = 15
|
||||||
|
WSReporte.Column(2).Width = 35
|
||||||
|
WSReporte.Column(3).Width = 14
|
||||||
|
WSReporte.Column(4).Width = 14
|
||||||
|
WSReporte.Column(5).Width = 14
|
||||||
|
WSReporte.Column(6).Width = 14
|
||||||
|
WSReporte.Column(7).Width = 14
|
||||||
|
|
||||||
|
WSReporte.Cell(1, 1).Value = UsuarioActual.Empresa.Empresa
|
||||||
|
WSReporte.Cell(2, 1).Value = $"Balanza de Comprobación del {TxtFechaDel.Text} al {TxtFechaAl.Text}"
|
||||||
|
|
||||||
|
WSReporte.Cell(5, 1).Value = $"Sub Proyecto: {SubProyecto}"
|
||||||
|
WSReporte.Cell(5, 1).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.Left
|
||||||
|
WSReporte.Cell(5, 1).Style.Font.Bold = True
|
||||||
|
|
||||||
|
WSReporte.Cell(6, 1).Value = "Cuenta"
|
||||||
|
WSReporte.Cell(6, 2).Value = "Nombre"
|
||||||
|
WSReporte.Cell(6, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
|
||||||
|
WSReporte.Cell(6, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
|
||||||
|
|
||||||
|
WSReporte.Cell(6, 3).Value = $"Saldos Iniciales{vbCrLf}Deudor Acreedor"
|
||||||
|
WSReporte.Cell(6, 4).Value = $"Cargos"
|
||||||
|
WSReporte.Cell(6, 5).Value = $"Abonos"
|
||||||
|
WSReporte.Cell(6, 6).Value = $"Saldo Actuales{vbCrLf} Deudor Acreedo"
|
||||||
|
|
||||||
|
WSReporte.Range("A6:F6").Style.Font.Bold = True
|
||||||
|
WSReporte.Range("A6:F6").Style.Font.FontSize = 10
|
||||||
|
WSReporte.Range("A6:F6").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
|
||||||
|
WSReporte.Range("A6:F6").Style.Border.TopBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Range("A6:F6").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Range("A6:F6").Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
|
||||||
|
Dim CuerrentRow As Integer = 7
|
||||||
|
|
||||||
|
CuerrentRow = CuerrentRow + 1
|
||||||
|
|
||||||
|
For Each Drow As DataRow In DtDatos.Rows
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Value = Drow("Codigo").ToString
|
||||||
|
WSReporte.Cell(CuerrentRow, 2).Value = Drow("Nombre").ToString
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Value = Drow("SaldoInicial").ToString
|
||||||
|
WSReporte.Cell(CuerrentRow, 4).Value = Drow("Cargos").ToString
|
||||||
|
WSReporte.Cell(CuerrentRow, 5).Value = Drow("Abonos").ToString
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Value = Drow("SaldoActual").ToString
|
||||||
|
|
||||||
|
If Drow("CtaMayor").ToString.ToEntero.Contiene(1) Then
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Style.Font.Bold = True
|
||||||
|
WSReporte.Cell(CuerrentRow, 2).Style.Font.Bold = True
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Style.Font.Bold = True
|
||||||
|
WSReporte.Cell(CuerrentRow, 4).Style.Font.Bold = True
|
||||||
|
WSReporte.Cell(CuerrentRow, 5).Style.Font.Bold = True
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Style.Font.Bold = True
|
||||||
|
|
||||||
|
If Drow("CtaMayor").ToString.ToEntero.Contiene(1) Then
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Indent = 1
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Style.Font.Italic = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.WrapText = True
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Indent = 2
|
||||||
|
End If
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 2).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 4).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 5).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
|
||||||
|
CuerrentRow = CuerrentRow + 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
For xy As Integer = 6 To CuerrentRow
|
||||||
|
WSReporte.Cell(xy, 6).Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Cell(xy, 1).Style.Border.LeftBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
Next
|
||||||
|
|
||||||
|
CuerrentRow = CuerrentRow + 1
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
|
||||||
|
WSReporte.Cell(CuerrentRow, 2).Style.Alignment.Vertical = XLAlignmentVerticalValues.Center
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Value = $"Saldos Iniciales{vbCrLf}Deudor Acreedor"
|
||||||
|
WSReporte.Cell(CuerrentRow, 4).Value = $"Cargos"
|
||||||
|
WSReporte.Cell(CuerrentRow, 5).Value = $"Abonos"
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Value = $"Saldo Actuales{vbCrLf} Deudor Acreedo"
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 1).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Cell(CuerrentRow, 2).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Cell(CuerrentRow, 4).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Cell(CuerrentRow, 5).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Font.Bold = True
|
||||||
|
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Font.FontSize = 10
|
||||||
|
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Alignment.SetHorizontal(XLAlignmentHorizontalValues.Center)
|
||||||
|
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.TopBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
WSReporte.Range($"A{CuerrentRow}:F{CuerrentRow}").Style.Border.RightBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
|
||||||
|
CuerrentRow = CuerrentRow + 1
|
||||||
|
|
||||||
|
Dim ultimaFila As DataRow = DtDatos.Rows(DtDatos.Rows.Count - 1)
|
||||||
|
|
||||||
|
Dim LastSaldoID As Decimal = ultimaFila("SaldoID").ToString.ToDecimal
|
||||||
|
Dim LastTotalAbonos As Decimal = ultimaFila("TotalAbonos").ToString.ToDecimal
|
||||||
|
Dim LastTotalCargos As Decimal = ultimaFila("TotalCargos").ToString.ToDecimal
|
||||||
|
Dim LastSaldoAD As Decimal = ultimaFila("SaldoAD").ToString.ToDecimal
|
||||||
|
Dim LastSaldoIA As Decimal = ultimaFila("SaldoIA").ToString.ToDecimal
|
||||||
|
Dim LastSaldoAA As Decimal = ultimaFila("SaldoAA").ToString.ToDecimal
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 2).Value = "Sumas Iguales"
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoID
|
||||||
|
WSReporte.Cell(CuerrentRow, 4).Value = LastTotalCargos
|
||||||
|
WSReporte.Cell(CuerrentRow, 5).Value = LastTotalAbonos
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Value = LastSaldoAD
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 4).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 5).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
|
||||||
|
|
||||||
|
CuerrentRow = CuerrentRow + 1
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Value = LastSaldoIA
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Value = LastSaldoAA
|
||||||
|
|
||||||
|
|
||||||
|
WSReporte.Cell(CuerrentRow, 3).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
WSReporte.Cell(CuerrentRow, 6).Style.NumberFormat.Format = "#,##0.00; [Black] - #,##0.00 ;""-"""
|
||||||
|
|
||||||
|
WSReporte.Range($"B{CuerrentRow}:F{CuerrentRow}").Style.Border.BottomBorder = ClosedXML.Excel.XLBorderStyleValues.Medium
|
||||||
|
|
||||||
|
WSReporte.PageSetup.PrintAreas.Add($"A1:G{CuerrentRow + 0 + 1}")
|
||||||
|
WSReporte.PageSetup.Margins.Top = 0.3
|
||||||
|
WSReporte.PageSetup.Margins.Left = 0.8
|
||||||
|
WSReporte.PageSetup.Margins.Right = 0.8
|
||||||
|
WSReporte.PageSetup.FitToPages(1, 1)
|
||||||
|
|
||||||
|
WBReporte.Worksheet(1).CopyTo(WBAnexoSalvar, "SubProyecto")
|
||||||
|
|
||||||
|
Return WBReporte.Worksheet(1)
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
171
General/TimbraRetencion.aspx
Normal file
171
General/TimbraRetencion.aspx
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="TimbraRetencion.aspx.vb" Inherits="General_TimbraRetencion" %>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
Timbrados de retenciones
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkAgregarRetencion" OnClick="LnkAgregarRetencion_Click" runat="server"><i class="fa fa-plus"></i>Agregar Retención</asp:LinkButton></li>
|
||||||
|
</li>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-ad-excel"></i> Genera Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
<div id="DModalRetencion" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModal" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="ltlMotititulo" Text="Retención" runat="server"> </asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= DdlClaveRetencion.ClientID.ToString()%>">Clave Retención:</label>
|
||||||
|
<asp:DropDownList ID="DdlClaveRetencion" runat="server" CssClass="select2me">
|
||||||
|
<asp:ListItem Text="01-Servicios profesionales" Value="01"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="14-Dividendos o utilidades distribuidas" Value="14"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="28-Pagos y retenciones a Contribuyentes del RIF" Value="28"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= DdlClientes.ClientID%>">Cliente:</label>
|
||||||
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" EsWebService="true" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-md-4">
|
||||||
|
<label for="<%= DdlPeriodoInicio.ClientID.ToString()%>">P. Inicial:</label>
|
||||||
|
<asp:DropDownList ID="DdlPeriodoInicio" runat="server" CssClass="select2me">
|
||||||
|
<asp:ListItem Text="Enero" Value="01"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Febrero" Value="02"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Marzo" Value="03"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Abril" Value="04"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Mayo" Value="05"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Junio" Value="06"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Julio" Value="07"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Agosto" Value="08"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Septiembre" Value="09"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-md-4">
|
||||||
|
<label for="<%= DdlPeriodoFin.ClientID.ToString()%>">P. Fin:</label>
|
||||||
|
<asp:DropDownList ID="DdlPeriodoFin" runat="server" CssClass="select2me">
|
||||||
|
<asp:ListItem Text="Enero" Value="01"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Febrero" Value="02"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Marzo" Value="03"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Abril" Value="04"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Mayo" Value="05"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Junio" Value="06"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Julio" Value="07"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Agosto" Value="08"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Septiembre" Value="09"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Octubre" Value="10"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Noviembre" Value="11"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Diciembre" Value="12"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright col-md-4">
|
||||||
|
<label for="<%= DdlEjercicio.ClientID.ToString()%>">Ejercicio:</label>
|
||||||
|
<asp:DropDownList ID="DdlEjercicio" runat="server" CssClass="select2me">
|
||||||
|
<asp:ListItem Text="2023" Value="2023"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2024" Value="2024"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2025" Value="2025"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2026" Value="2026"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="2027" Value="2027"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= TxtBase.ClientID.ToString()%>">Base Impuesto:</label>
|
||||||
|
<asp:TextBox ID="TxtBase" runat="server" Width="100px"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= DdlTipoImpuesto.ClientID.ToString()%>">Tipo Impuesto:</label>
|
||||||
|
<asp:DropDownList ID="DdlTipoImpuesto" runat="server" CssClass="select2me">
|
||||||
|
<asp:ListItem Text="ISR" Value="01"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="IVA" Value="02"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="IEPS" Value="03"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= TxtImpuestoRetenido.ClientID.ToString()%>">Impuesto Retenido:</label>
|
||||||
|
<asp:TextBox ID="TxtImpuestoRetenido" runat="server" Width="100px"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= DdlTipoPagoRet.ClientID.ToString()%>">Tipo Impuesto:</label>
|
||||||
|
<asp:DropDownList ID="DdlTipoPagoRet" runat="server" CssClass="select2me">
|
||||||
|
<asp:ListItem Text="Pago definitivo IVA" Value="01"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pago definitivo IEPS" Value="02"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pago definitivo ISR" Value="03"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="Pago provisional ISR" Value="04"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<asp:Button ID="BtnAgregar" runat="server" Text="++" OnClick="BtnAgregar_Click" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:GridView ID="GvD" runat="server" DataKeyNames="TipoImpuesto,ClaveTipoImpuesto,BaseRetencion,ClaveTipoPago,TipoPago,ImpuestoRetenido"></asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= TxtTotal1.ClientID.ToString()%>">Base Impuesto:</label>
|
||||||
|
<asp:TextBox ID="TxtTotal1" runat="server" Width="100px"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= TxtTotal2.ClientID.ToString()%>">Base Impuesto:</label>
|
||||||
|
<asp:TextBox ID="TxtTotal2" runat="server" Width="100px"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<label for="<%= TxtTotal3.ClientID.ToString()%>">Base Impuesto:</label>
|
||||||
|
<asp:TextBox ID="TxtTotal3" runat="server" Width="100px"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnEmitirRetencion" runat="server" Text="Emitir Retención" OnClick="BtnEmitirRetencion_Click" CssClass ="btn btn-primary" ValidationGroup="VgmGuardar" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
345
General/TimbraRetencion.aspx.vb
Normal file
345
General/TimbraRetencion.aspx.vb
Normal file
@@ -0,0 +1,345 @@
|
|||||||
|
Option Explicit On
|
||||||
|
Option Strict On
|
||||||
|
Imports System.IO
|
||||||
|
Imports System.Data
|
||||||
|
Imports System.Xml
|
||||||
|
Imports System.Xml.Serialization
|
||||||
|
Imports ADSNetLibrary.PacsTimbrado.SAT
|
||||||
|
Imports Extensiones
|
||||||
|
Imports Profact.TimbraCFDI40
|
||||||
|
|
||||||
|
Partial Class General_TimbraRetencion
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
#Region "PROPIEDADES"
|
||||||
|
Private Property CveMarca() As Integer
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("CveMarca")), -1, CInt(ViewState("CveMarca")))
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
ViewState("CveMarca") = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
Private Property Modalidad() As String
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("Modalidad")), "", (ViewState("Modalidad").ToString))
|
||||||
|
End Get
|
||||||
|
Set
|
||||||
|
ViewState("Modalidad") = Value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property DtDetalle As Data.DataTable
|
||||||
|
Get
|
||||||
|
Return If(IsNothing(ViewState("DtDetalle")), Nothing, CType(ViewState("DtDetalle"), DataTable))
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DtDetalle") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Private Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
If Not IsPostBack Then
|
||||||
|
DdlClientes.setEsWebService(True)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#Region "Timbra"
|
||||||
|
Private Function TimbraRetencion(cfditimbre As CFDITimbreRetenciones, UsuarioActual As Usuario) As String
|
||||||
|
Dim sw As New Diagnostics.Stopwatch
|
||||||
|
Dim swTiempo As New StringBuilder
|
||||||
|
Dim swmili As Long = 0
|
||||||
|
sw.Start()
|
||||||
|
Dim ArchivoLLave As String = $"{UsuarioActual.Empresa.Ruta}Certificados\{UsuarioActual.Empresa.ArchivoKey}"
|
||||||
|
Dim ArchivoCertificado As String = $"{UsuarioActual.Empresa.Ruta}Certificados\{UsuarioActual.Empresa.ArchivoCer}"
|
||||||
|
|
||||||
|
Dim Clave As String = UsuarioActual.Empresa.ContraseñaKey
|
||||||
|
Dim EmisorRFC As String = UsuarioActual.Empresa.RFC
|
||||||
|
Dim EmisorNombre As String = UsuarioActual.Empresa.Empresa
|
||||||
|
Dim SubTotal As Decimal = 0
|
||||||
|
Dim AmbienteProductivo As Boolean = True
|
||||||
|
Dim NumDecimalesImporte As Integer = 2
|
||||||
|
|
||||||
|
|
||||||
|
If Not ClsPaginas.EsProduccion AndAlso (Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
||||||
|
AmbienteProductivo = False
|
||||||
|
Clave = "12345678a"
|
||||||
|
EmisorRFC = "EKU9003173C9"
|
||||||
|
EmisorNombre = "ESCUELA KEMPER URGATE"
|
||||||
|
ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.key"
|
||||||
|
ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}\1\Certificados\EKU9003173C9.cer"
|
||||||
|
UsuarioActual.Empresa.CodigoRegimenFiscal = "601"
|
||||||
|
End If
|
||||||
|
|
||||||
|
#Region "Valida"
|
||||||
|
If Not File.Exists(ArchivoCertificado) Then
|
||||||
|
Alert("El archivo de certificado no existe", TipoMensaje.MsgError)
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
If Not File.Exists(ArchivoLLave) Then
|
||||||
|
Alert("El archivo de llave privada no existe", TipoMensaje.MsgError)
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
If UsuarioActual.Empresa.ContraseñaKey = "" Then
|
||||||
|
Alert("La clave no puede ser vacía", TipoMensaje.MsgError)
|
||||||
|
Return ""
|
||||||
|
End If
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "Variables"
|
||||||
|
Dim llaveByte As Byte(), certByte As Byte()
|
||||||
|
Dim llaveBase64 As String, certBase64 As String
|
||||||
|
|
||||||
|
Dim complemento As String = ""
|
||||||
|
Dim complementoConcepto As String = ""
|
||||||
|
'//Inicializamos el conector el parámetro indica el ambiente en el que se utilizará
|
||||||
|
'//Fasle = Ambiente de pruebas
|
||||||
|
'//True = Ambiente de producción
|
||||||
|
Dim cfdi As New Profact.TimbraCFDI40.Conector(AmbienteProductivo)
|
||||||
|
Dim comprobante As New Profact.TimbraCFDI40.Comprobante()
|
||||||
|
|
||||||
|
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 OrElse Not ClsPaginas.EsProduccion Then
|
||||||
|
cfdi.EstableceCredenciales("mvpNUXmQfK8=")
|
||||||
|
Else
|
||||||
|
cfdi.EstableceCredenciales($"vSGxMFWnNRy/nDoowxqrqw==|Sia123654")
|
||||||
|
End If
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Verifica"
|
||||||
|
Try
|
||||||
|
llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave)
|
||||||
|
llaveBase64 = Convert.ToBase64String(llaveByte)
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert($"Error al leer la llave privada: {ex.Message}", TipoMensaje.MsgError)
|
||||||
|
Return ""
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Try
|
||||||
|
certByte = System.IO.File.ReadAllBytes(ArchivoCertificado)
|
||||||
|
certBase64 = Convert.ToBase64String(certByte)
|
||||||
|
Catch ex As Exception
|
||||||
|
Alert($"Error al leer el certificado: {ex.Message}", TipoMensaje.MsgError)
|
||||||
|
Return ""
|
||||||
|
End Try
|
||||||
|
sw.Stop()
|
||||||
|
swTiempo.AppendFormat("Verificado : ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
|
swmili = sw.ElapsedMilliseconds
|
||||||
|
sw.Start()
|
||||||
|
#End Region
|
||||||
|
'CType([Enum].Parse(GetType(ProfactCartaPorte.CartaPorteTranspInternac), Carta.TranspInternac), ProfactCartaPorte.CartaPorteTranspInternac)
|
||||||
|
|
||||||
|
Dim retenciones As Retenciones = New Profact.TimbraCFDI40.Retenciones()
|
||||||
|
retenciones.Version = "2.0"
|
||||||
|
retenciones.FechaExp = cfditimbre.Fecha
|
||||||
|
retenciones.CveRetenc = CType([Enum].Parse(GetType(c_CveRetenc), "Item" & cfditimbre.Retencion.ClaveRetencion), c_CveRetenc)
|
||||||
|
retenciones.Emisor = New RetencionesEmisor()
|
||||||
|
retenciones.Emisor.RfcE = EmisorRFC
|
||||||
|
retenciones.Emisor.NomDenRazSocE = EmisorNombre
|
||||||
|
retenciones.Emisor.RegimenFiscalE = CType([Enum].Parse(GetType(c_RegimenFiscal), "Item" & UsuarioActual.Empresa.CodigoRegimenFiscal), c_RegimenFiscal)
|
||||||
|
retenciones.LugarExpRetenc = cfditimbre.Retencion.LugarExpedicion
|
||||||
|
|
||||||
|
Dim retencionNacional As RetencionesReceptorNacional = New RetencionesReceptorNacional()
|
||||||
|
retenciones.Receptor = New RetencionesReceptor()
|
||||||
|
retenciones.Receptor.NacionalidadR = If(cfditimbre.Receptor.NacionalidadR = "Nacional", RetencionesReceptorNacionalidadR.Nacional, RetencionesReceptorNacionalidadR.Extranjero)
|
||||||
|
retencionNacional.RfcR = cfditimbre.Receptor.RFCR
|
||||||
|
retencionNacional.NomDenRazSocR = cfditimbre.Receptor.NombreDenominacionR
|
||||||
|
retencionNacional.DomicilioFiscalR = cfditimbre.Receptor.DomicilioFiscalR
|
||||||
|
retenciones.Receptor.Item = retencionNacional
|
||||||
|
If cfditimbre.CFDIRelacionados.TipoRelacion <> "" Then
|
||||||
|
For Each uid As String In cfditimbre.CFDIRelacionados.UUID
|
||||||
|
Dim uuidrela As New RetencionesCfdiRetenRelacionados
|
||||||
|
uuidrela.TipoRelacion = CType([Enum].Parse(GetType(c_TipoRelacion), "Item" & cfditimbre.CFDIRelacionados.TipoRelacion), c_TipoRelacion)
|
||||||
|
uuidrela.UUID = uid
|
||||||
|
retenciones.CfdiRetenRelacionados = uuidrela
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
retenciones.Periodo = New RetencionesPeriodo()
|
||||||
|
retenciones.Periodo.MesIni = CType([Enum].Parse(GetType(c_Periodo), "Item" & cfditimbre.Retencion.PeriodoMesInicio), c_Periodo)
|
||||||
|
retenciones.Periodo.MesFin = CType([Enum].Parse(GetType(c_Periodo), "Item" & cfditimbre.Retencion.PeriodoMesFin), c_Periodo)
|
||||||
|
retenciones.Periodo.Ejercicio = CType([Enum].Parse(GetType(c_Ejercicio), "Item" & cfditimbre.Retencion.PeriodoEjercicio.ToString), c_Ejercicio)
|
||||||
|
retenciones.Totales = New RetencionesTotales()
|
||||||
|
retenciones.Totales.MontoTotOperacion = 0
|
||||||
|
retenciones.Totales.MontoTotGrav = 0
|
||||||
|
retenciones.Totales.MontoTotExent = 0
|
||||||
|
retenciones.Totales.MontoTotRet = cfditimbre.TotalImpuestosRetenidos
|
||||||
|
retenciones.Totales.UtilidadBimestral = 1
|
||||||
|
retenciones.Totales.UtilidadBimestralSpecified = True
|
||||||
|
retenciones.Totales.ISRCorrespondiente = cfditimbre.ISRCorrespondiente
|
||||||
|
retenciones.Totales.ISRCorrespondienteSpecified = True
|
||||||
|
retenciones.Totales.ImpRetenidos = New RetencionesTotalesImpRetenidos(cfditimbre.RetencionesImpuestos.Count - 1) {}
|
||||||
|
Dim i As Integer = 0
|
||||||
|
For Each drimp As CFDIImpuestosRetenidos In cfditimbre.RetencionesImpuestos
|
||||||
|
retenciones.Totales.ImpRetenidos(i) = New RetencionesTotalesImpRetenidos()
|
||||||
|
retenciones.Totales.ImpRetenidos(i).BaseRet = 0
|
||||||
|
retenciones.Totales.ImpRetenidos(i).BaseRetSpecified = True
|
||||||
|
retenciones.Totales.ImpRetenidos(i).ImpuestoRet = CType([Enum].Parse(GetType(c_Impuesto), "Item0" & drimp.ImpuestoRetencion), c_Impuesto) ' c_Impuesto.Item001
|
||||||
|
retenciones.Totales.ImpRetenidos(i).ImpuestoRetSpecified = True
|
||||||
|
retenciones.Totales.ImpRetenidos(i).MontoRet = drimp.MontoRetencion
|
||||||
|
retenciones.Totales.ImpRetenidos(i).TipoPagoRet = CType([Enum].Parse(GetType(c_TipoPagoRet), "Item" & drimp.TipoPagoRetencion), c_TipoPagoRet) 'c_TipoPagoRet.Item04
|
||||||
|
i += 1
|
||||||
|
Next
|
||||||
|
|
||||||
|
'retenciones.Totales.ImpRetenidos(i) = New RetencionesTotalesImpRetenidos()
|
||||||
|
'retenciones.Totales.ImpRetenidos(i).BaseRet = 0
|
||||||
|
'retenciones.Totales.ImpRetenidos(i).BaseRetSpecified = True
|
||||||
|
'retenciones.Totales.ImpRetenidos(i).ImpuestoRet = c_Impuesto.Item001
|
||||||
|
'retenciones.Totales.ImpRetenidos(i).ImpuestoRetSpecified = True
|
||||||
|
'retenciones.Totales.ImpRetenidos(i).MontoRet = 705
|
||||||
|
'retenciones.Totales.ImpRetenidos(i).TipoPagoRet = c_TipoPagoRet.Item04
|
||||||
|
|
||||||
|
'' dividendos
|
||||||
|
'Dim dividendos As Profact.TimbraCFDI.Dividendos = New Profact.TimbraCFDI.Dividendos()
|
||||||
|
'dividendos.Version = "1.0"
|
||||||
|
'dividendos.DividOUtil = New Profact.TimbraCFDI.DividendosDividOUtil()
|
||||||
|
'dividendos.DividOUtil.CveTipDivOUtil = Profact.TimbraCFDI.c_TipoDividendoOUtilidadDistribuida.Item06
|
||||||
|
'dividendos.DividOUtil.MontISRAcredRetMexico = 0.00D
|
||||||
|
'dividendos.DividOUtil.MontISRAcredRetExtranjero = 0.00D
|
||||||
|
'dividendos.DividOUtil.TipoSocDistrDiv = Profact.TimbraCFDI.DividendosDividOUtilTipoSocDistrDiv.SociedadNacional
|
||||||
|
'dividendos.DividOUtil.MontDivAcumNal = 426180D
|
||||||
|
'dividendos.DividOUtil.MontDivAcumNalSpecified = True
|
||||||
|
'dividendos.DividOUtil.MontISRAcredNal = 127586D
|
||||||
|
'dividendos.DividOUtil.MontDivAcumNalSpecified = True
|
||||||
|
Dim LXmlComplementos As List(Of XmlElement) = New List(Of XmlElement)()
|
||||||
|
'Dim nombres As System.Xml.Serialization.XmlSerializerNamespaces = New System.Xml.Serialization.XmlSerializerNamespaces()
|
||||||
|
'nombres.Add("dividendos", "http://www.sat.gob.mx/esquemas/retencionpago/1/dividendos")
|
||||||
|
'Dim xmlDividendos As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(dividendos, GetType(Profact.TimbraCFDI.Dividendos), nombres)
|
||||||
|
'Dim docDividendos As XmlDocument = New XmlDocument()
|
||||||
|
'docDividendos.LoadXml(xmlDividendos)
|
||||||
|
'retenciones.DividendosSpecified = True
|
||||||
|
'LXmlComplementos.Add(docDividendos.DocumentElement)
|
||||||
|
''fin dividendos
|
||||||
|
|
||||||
|
'retenciones.Complemento = New RetencionesComplemento()
|
||||||
|
'retenciones.Complemento.Any = LXmlComplementos.ToArray()
|
||||||
|
Dim xmlEncode As String
|
||||||
|
|
||||||
|
Using sww As New System.IO.StringWriter()
|
||||||
|
Dim xs As XmlSerializer
|
||||||
|
xs = New System.Xml.Serialization.XmlSerializer(GetType(Profact.TimbraCFDI40.Retenciones))
|
||||||
|
xs.Serialize(sww, retenciones)
|
||||||
|
xmlEncode = sww.ToString()
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Dim resultadoTimbre As Profact.TimbraCFDI.ResultadoTimbre
|
||||||
|
resultadoTimbre = cfdi.TimbraRetencion(retenciones)
|
||||||
|
|
||||||
|
If resultadoTimbre.Exitoso Then
|
||||||
|
Dim Retorno As String = ""
|
||||||
|
Dim RutaArchivo As String = $"{UsuarioActual.Empresa.Ruta}XML\Ret\"
|
||||||
|
Dim NombreArchivoXML As String = ""
|
||||||
|
Dim objGrales As New ClsGenerales
|
||||||
|
objGrales.IniciaTransacSQL()
|
||||||
|
Dim tCveTimbre As Integer = objGrales.AddGralTimbre("Ret", 12679, cfditimbre.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
NombreArchivoXML = $"{objGrales.SerieInsertada}-{objGrales.FolioInsertado}.xml"
|
||||||
|
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
||||||
|
|
||||||
|
If tCveTimbre > 0 Then
|
||||||
|
If objGrales.UpdateTimbreTimbrado(tCveTimbre, resultadoTimbre.FolioUUID, cfditimbre.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 3, "4.0") Then
|
||||||
|
resultadoTimbre.GuardaXml(RutaArchivo, NombreArchivoXML)
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
If Retorno = "" Then
|
||||||
|
objGrales.Commit()
|
||||||
|
Else
|
||||||
|
objGrales.RollBack()
|
||||||
|
End If
|
||||||
|
objGrales.Dispose()
|
||||||
|
|
||||||
|
'If resultadoTimbre.GuardaXml("C:/", "EjemploRetencion_nombre") Then
|
||||||
|
' Alert("El xml fue guardado correctamente")
|
||||||
|
'Else
|
||||||
|
' Alert("Ocurrió un error al guardar el comprobante, por favor verifica los permisos de la carpeta")
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'If resultadoTimbre.GuardaCodigoBidimensional("C:/", "codigoRetencion_nombre") Then
|
||||||
|
' Alert("El código bidimensional fue guardado correctamente")
|
||||||
|
'Else
|
||||||
|
' Alert("Ocurrió un error al guardar el código bidimensional, por favor verifica los permisos de la carpeta")
|
||||||
|
'End If
|
||||||
|
|
||||||
|
'Dim folioFiscal As String = resultadoTimbre.FolioUUID
|
||||||
|
'Dim noCertificado As String = resultadoTimbre.No_Certificado
|
||||||
|
'Dim noCertificadoSAT As String = resultadoTimbre.No_Certificado_SAT
|
||||||
|
'Dim fechaCert As String = resultadoTimbre.FechaCertificacion
|
||||||
|
'Dim selloCFDI As String = resultadoTimbre.SelloCFDI
|
||||||
|
'Dim selloSAT As String = resultadoTimbre.SelloSAT
|
||||||
|
'Dim cadena As String = resultadoTimbre.CadenaTimbre
|
||||||
|
Alert("Timbrado Exitoso")
|
||||||
|
Else
|
||||||
|
Alert(resultadoTimbre.Descripcion)
|
||||||
|
Dim detalle As String = resultadoTimbre.Detalle
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnEmitirRetencion_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim cfditimbre As New CFDITimbreRetenciones
|
||||||
|
cfditimbre.Fecha = Now
|
||||||
|
cfditimbre.Retencion.ClaveRetencion = DdlClaveRetencion.SelectedValue
|
||||||
|
cfditimbre.Retencion.PeriodoMesInicio = DdlPeriodoInicio.SelectedValue
|
||||||
|
cfditimbre.Retencion.PeriodoMesFin = DdlPeriodoFin.SelectedValue
|
||||||
|
cfditimbre.Retencion.PeriodoEjercicio = DdlEjercicio.SelectedValue.ToEntero
|
||||||
|
cfditimbre.Retencion.LugarExpedicion = UsuarioActual.Empresa.CP
|
||||||
|
cfditimbre.Receptor.RFCR = "AEMV690902NM5"
|
||||||
|
cfditimbre.Receptor.NacionalidadR = "Nacional"
|
||||||
|
cfditimbre.Receptor.DomicilioFiscalR = "11950"
|
||||||
|
cfditimbre.Receptor.NombreDenominacionR = "VERONICA MICHELLE ARMENTA MASON"
|
||||||
|
cfditimbre.CFDIRelacionados.TipoRelacion = "01"
|
||||||
|
cfditimbre.CFDIRelacionados.UUID.Add("671fdb07-406a-42a6-9a89-40219f663ea1")
|
||||||
|
cfditimbre.ISRCorrespondiente = 705
|
||||||
|
cfditimbre.RetencionesImpuestos.Add(New CFDIImpuestosRetenidos With {.MontoRetencion = 705, .BaseRetencion = 0, .ImpuestoRetencion = "01", .TipoPagoRetencion = "04"})
|
||||||
|
|
||||||
|
For Each gvr As GridViewRow In GvD.Rows
|
||||||
|
Dim ret As New CFDIImpuestosRetenidos With {.BaseRetencion = gvr.DataKey("BaseRetencion").ToDecimal,
|
||||||
|
.ImpuestoRetencion = gvr.DataKey("ImpuestoRetencion")}
|
||||||
|
cfditimbre.RetencionesImpuestos.Add(ret)
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
TimbraRetencion(cfditimbre, UsuarioActual)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub LnkAgregarRetencion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
UpModal.Update()
|
||||||
|
RegistraScript("$('#DModalRetencion').modal()")
|
||||||
|
|
||||||
|
DtDetalle = New DataTable
|
||||||
|
DtDetalle.Columns.Add("TipoImpuesto", GetType(String))
|
||||||
|
DtDetalle.Columns.Add("ClaveTipoImpuesto", GetType(String))
|
||||||
|
DtDetalle.Columns.Add("BaseRetencion", GetType(Decimal))
|
||||||
|
DtDetalle.Columns.Add("ClaveTipoPago", GetType(String))
|
||||||
|
DtDetalle.Columns.Add("TipoPago", GetType(String))
|
||||||
|
DtDetalle.Columns.Add("ImpuestoRetenido", GetType(Decimal))
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnAgregar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim dr As DataRow = DtDetalle.NewRow
|
||||||
|
dr("TipoImpuesto") = DdlTipoImpuesto.Text
|
||||||
|
dr("ClaveTipoImpuesto") = DdlTipoImpuesto.SelectedValue
|
||||||
|
dr("BaseRetencion") = TxtBase.Text.ToDecimal
|
||||||
|
dr("ClaveTipoPago") = DdlTipoPagoRet.SelectedValue
|
||||||
|
dr("TipoPago") = DdlTipoPagoRet.Text
|
||||||
|
dr("ImpuestoRetenido") = TxtImpuestoRetenido.Text.ToDecimal
|
||||||
|
|
||||||
|
DtDetalle.Rows.Add(dr)
|
||||||
|
|
||||||
|
GvD.DataSource = DtDetalle
|
||||||
|
GvD.DataBind()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -79,7 +79,7 @@
|
|||||||
<div class="portlet solid grey-cascade portlet-filter" style="min-height: 80px !important;">
|
<div class="portlet solid grey-cascade portlet-filter" style="min-height: 80px !important;">
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" Text="Consultar" /></td>
|
<asp:Button ID="btConsultar" CssClass="btn btn-primary" runat="server" Text="Consultar" /></td>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
@@ -136,11 +136,11 @@
|
|||||||
<asp:ListItem Text="Devolución" Value="DEV"></asp:ListItem>
|
<asp:ListItem Text="Devolución" Value="DEV"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<%-- <div class="col-md-1 truncate" id="DivSucursal" runat="server" style="text-align: right!important;">Sucursal:</div>
|
<%-- <div class="col-md-1 truncate" id="DivSucursal" runat="server" style="text-align: right!important;">Sucursal:</div>
|
||||||
<div class="col-md-1" id="DivSucursal2" runat="server">
|
<div class="col-md-1" id="DivSucursal2" runat="server">
|
||||||
<asp:DropDownList ID="DdlSucursal" runat="server" AppendDataBoundItems="true" DataTextField="Sucursal" DataValueField="CveSucursal" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100px">
|
<asp:DropDownList ID="DdlSucursal" runat="server" AppendDataBoundItems="true" DataTextField="Sucursal" DataValueField="CveSucursal" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100px">
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>--%>
|
</div>--%>
|
||||||
<div class="col-md-1 truncate" id="DivSubProyecto" runat="server" style="text-align: right!important;"><asp:Label runat="server" ID="LblSubProyecto" text="Proyecto" /></div>
|
<div class="col-md-1 truncate" id="DivSubProyecto" runat="server" style="text-align: right!important;"><asp:Label runat="server" ID="LblSubProyecto" text="Proyecto" /></div>
|
||||||
<div class="col-md-1" id="DivSubProyecto2" runat="server">
|
<div class="col-md-1" id="DivSubProyecto2" runat="server">
|
||||||
@@ -243,51 +243,51 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<%--<script src="/Scripts/DataTables.js"></script>
|
<%--<script src="/Scripts/DataTables.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|
||||||
function pageLoad(sender, e) {
|
function pageLoad(sender, e) {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('a[class="ajax__tab_tab"]').click(function () {
|
$('a[class="ajax__tab_tab"]').click(function () {
|
||||||
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
$.fn.dataTable.tables({ visible: true, api: true }).columns.adjust();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function OrdenarGvVentas() {
|
function OrdenarGvVentas() {
|
||||||
var Tam = TamañoVentana();
|
var Tam = TamañoVentana();
|
||||||
var Alto = Tam.height - 330;
|
var Alto = Tam.height - 330;
|
||||||
if (Alto < 100) {
|
if (Alto < 100) {
|
||||||
Alto = 100;
|
Alto = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#GvVentas').DataTable({
|
$('#GvVentas').DataTable({
|
||||||
scrollY: Alto + 'px',
|
scrollY: Alto + 'px',
|
||||||
scrollCollapse: true,
|
scrollCollapse: true,
|
||||||
paging: false,
|
paging: false,
|
||||||
searching: false,
|
searching: false,
|
||||||
info: false
|
info: false
|
||||||
});
|
});
|
||||||
$('#GvVentas').parent().parent().children().first().css("position", "static");
|
$('#GvVentas').parent().parent().children().first().css("position", "static");
|
||||||
}
|
}
|
||||||
|
|
||||||
function OrdenarGvCompras() {
|
function OrdenarGvCompras() {
|
||||||
var Tam = TamañoVentana();
|
var Tam = TamañoVentana();
|
||||||
var Alto = Tam.height - 330;
|
var Alto = Tam.height - 330;
|
||||||
if (Alto < 100) {
|
if (Alto < 100) {
|
||||||
Alto = 100;
|
Alto = 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#GvCompras').DataTable({
|
$('#GvCompras').DataTable({
|
||||||
scrollY: Alto + 'px',
|
scrollY: Alto + 'px',
|
||||||
scrollCollapse: true,
|
scrollCollapse: true,
|
||||||
paging: false,
|
paging: false,
|
||||||
searching: false,
|
searching: false,
|
||||||
info: false
|
info: false
|
||||||
});
|
});
|
||||||
$('#GvCompras').parent().parent().children().first().css("position", "static");
|
$('#GvCompras').parent().parent().children().first().css("position", "static");
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>--%>
|
</script>--%>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<asp:LinkButton ID="LnkMostrarTraspaso" runat="server" AlternateText="Editar" OnClick="LnkMostrarTraspaso_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-pencil'></i>" />
|
<asp:LinkButton ID="LnkMostrarTraspaso" runat="server" AlternateText="Editar" OnClick="LnkMostrarTraspaso_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-pencil'></i>" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4" style="text-align:left">
|
<div class="col-lg-4" style="text-align:left">
|
||||||
<asp:HyperLink ID="HypRecibeTraspaso" runat="server" Target="_blank" CssClass="btn btn-circle btn-sm blue" ToolTip="Recivir traspaso" Text="<i class='fa fa-arrow-right'></i>" Visible="false" />
|
<asp:HyperLink ID="HypRecibeTraspaso" runat="server" Target="_blank" CssClass="btn btn-circle btn-sm blue" ToolTip="Recibir traspaso" Text="<i class='fa fa-arrow-right'></i>" Visible="false" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4" style="text-align:left"></div>
|
<div class="col-lg-4" style="text-align:left"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
103
LogIn.aspx.vb
103
LogIn.aspx.vb
@@ -116,35 +116,25 @@ Partial Class LogIn
|
|||||||
PnlLogin.Visible = False
|
PnlLogin.Visible = False
|
||||||
|
|
||||||
If elapsedSpan.Days < 3 Then
|
If elapsedSpan.Days < 3 Then
|
||||||
|
Dim tGrupoEmpresa As String = ClsPaginas.GlobalGrupoEmpresa(Request.Url.Host.ToUpper())
|
||||||
|
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexionDominio(Request.Url.Host.ToUpper())
|
||||||
|
|
||||||
Dim Usr As New ClsSisUsuarios
|
Dim ObjUsuario As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
|
||||||
If Usr.GetUsuarios(CveUsuario, -1, -1) Then
|
Dim Usuario As Usuario = ObjUsuario.GetUsuarioDetalle(CveUsuario, CveEmpresa:=CveEmpresa)
|
||||||
|
|
||||||
Dim dr As DataRow = Usr.DtResultados.FiltroPrimero("")
|
If Usuario IsNot Nothing Then
|
||||||
|
If Usuario.Contraseña = ClsPaginas.ContraseñaPredeterminadaEncriptada Then
|
||||||
If dr IsNot Nothing Then
|
PnlContra.Visible = True
|
||||||
If dr("PolCambiarContraseña").ToString = "SI" Then
|
Me.Form.DefaultButton = BtnGuardar.ClientID
|
||||||
PnlContra.Visible = True
|
|
||||||
'HCambio.Visible = True
|
|
||||||
'HdnCveUsr.Value = CveUsuario.ToString
|
|
||||||
Me.Form.DefaultButton = BtnGuardar.ClientID
|
|
||||||
'If Usr.UpdateUsuarioPortal(dr("Usuario").ToString, dr("Nombre").ToString,
|
|
||||||
' dr("Permiso1").ToString = "True", dr("Permiso2").ToString = "True", dr("Permiso3").ToString = "True", dr("Permiso4").ToString = "True", dr("Permiso5").ToString = "True",
|
|
||||||
' dr("Permiso6").ToString = "True", dr("Permiso7").ToString = "True", dr("Permiso8").ToString = "True", dr("Permiso9").ToString = "True", dr("Permiso10").ToString = "True",
|
|
||||||
' True, TxtContrasenia1.Text, dr("CveCliente").ToString.ToEntero, dr("CveProveedor").ToString.ToEntero, CveUsr) Then
|
|
||||||
|
|
||||||
' Alert("Contraseña Modificada.", TipoMensaje.MsgConfirmacion, JSBtnAceptar:="location.href=""ConsultaCliente.aspx""")
|
|
||||||
|
|
||||||
'End If
|
|
||||||
Else
|
|
||||||
Alert("El usuario ya cambio su contraseña, inicie sesión normalmente.", TipoMensaje.MsgInformacion)
|
|
||||||
PnlLogin.Visible = True
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
Alert("El Usuario no existe", TipoMensaje.MsgError)
|
Alert("El usuario ya cambio su contraseña, inicie sesión normalmente.", TipoMensaje.MsgInformacion)
|
||||||
|
PnlLogin.Visible = True
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
Alert("El Usuario no existe", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
Usr.Dispose()
|
ObjUsuario.Dispose()
|
||||||
|
Usuario = Nothing
|
||||||
Else
|
Else
|
||||||
Alert("La Activación expiró", TipoMensaje.MsgError)
|
Alert("La Activación expiró", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -177,20 +167,6 @@ Partial Class LogIn
|
|||||||
Return URLParametros
|
Return URLParametros
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
'Property GlobalDTUsuarios(Optional CveUsuario As Integer = -1, Optional CveEmpresa As Integer = -1) As Data.DataTable
|
|
||||||
' Get
|
|
||||||
' If CveUsuario <> -1 Then
|
|
||||||
' Dim Dv As New Data.DataView(DirectCast(Application("GlobalDTUsuarios"), Data.DataTable), "CveUsuario =" & CveUsuario, "", Data.DataViewRowState.CurrentRows)
|
|
||||||
' GlobalDTUsuarios = Dv.ToTable
|
|
||||||
' Dv.Dispose()
|
|
||||||
' Else
|
|
||||||
' GlobalDTUsuarios = DirectCast(Application("GlobalDTUsuarios"), Data.DataTable)
|
|
||||||
' End If
|
|
||||||
' End Get
|
|
||||||
' Set(value As Data.DataTable)
|
|
||||||
' Application("GlobalDTUsuarios") = value
|
|
||||||
' End Set
|
|
||||||
'End Property
|
|
||||||
Dim BtnLogIn_Clickenter As Integer = 0
|
Dim BtnLogIn_Clickenter As Integer = 0
|
||||||
Protected Sub BtnLogIn_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles CmdLogIn.Click
|
Protected Sub BtnLogIn_Click(ByVal sender As Object, ByVal e As EventArgs) 'Handles CmdLogIn.Click
|
||||||
Dim ReturnUrl As String = "/"
|
Dim ReturnUrl As String = "/"
|
||||||
@@ -218,7 +194,6 @@ Partial Class LogIn
|
|||||||
If Usuario IsNot Nothing Then
|
If Usuario IsNot Nothing Then
|
||||||
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
|
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
|
||||||
|
|
||||||
'CreaObjetoEmpresa(Usuario, NombreCadena)
|
|
||||||
ADSSessionConfig.sessionUser.MultipleEmpresa = True
|
ADSSessionConfig.sessionUser.MultipleEmpresa = True
|
||||||
|
|
||||||
Dim x As New ADSSessionObj(Usuario.CveUsuario, Usuario.CveEmpresa)
|
Dim x As New ADSSessionObj(Usuario.CveUsuario, Usuario.CveEmpresa)
|
||||||
@@ -227,21 +202,14 @@ Partial Class LogIn
|
|||||||
|
|
||||||
If Usuario.CvePlataforma = 6 And Usuario.CveRol = 10 Then
|
If Usuario.CvePlataforma = 6 And Usuario.CveRol = 10 Then
|
||||||
'PLATAFORMA PORTAL CLIENTE
|
'PLATAFORMA PORTAL CLIENTE
|
||||||
'FormsAuthentication.RedirectFromLoginPage(_sessionid, False)
|
|
||||||
'Response.Redirect("/PortalCliente/PortalCliente.aspx", True)
|
|
||||||
|
|
||||||
ReturnUrl = "/PortalCliente/PortalCliente.aspx"
|
ReturnUrl = "/PortalCliente/PortalCliente.aspx"
|
||||||
|
If Usuario.CveEmpresa = 194 Then ReturnUrl = "/Ventas/RepPedidosSTF.aspx"
|
||||||
ElseIf Usuario.CvePlataforma = 7 And Usuario.CveRol = 11 Then
|
ElseIf Usuario.CvePlataforma = 7 And Usuario.CveRol = 11 Then
|
||||||
'PLATAFORMA PORTAL PROVEEDOR
|
'PLATAFORMA PORTAL PROVEEDOR
|
||||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
|
||||||
'Response.Redirect("/PortalProveedor/PortalProveedor.aspx", True)
|
|
||||||
|
|
||||||
ReturnUrl = "/PortalProveedor/PortalProveedor.aspx"
|
ReturnUrl = "/PortalProveedor/PortalProveedor.aspx"
|
||||||
ElseIf Usuario.CveRol = 1200 And Usuario.Acceso > 0 Then
|
ElseIf Usuario.CveRol = 1200 And Usuario.Acceso > 0 Then
|
||||||
'PLATAFORMA GPS
|
'PLATAFORMA GPS
|
||||||
Usuario.CvePlataforma = 3
|
Usuario.CvePlataforma = 3
|
||||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
|
||||||
'Response.Redirect("/PortalGPS/InicioGPS.aspx", True)
|
|
||||||
ReturnUrl = "/PortalGPS/InicioGPS.aspx"
|
ReturnUrl = "/PortalGPS/InicioGPS.aspx"
|
||||||
Else
|
Else
|
||||||
'PLATAFORMA SIG
|
'PLATAFORMA SIG
|
||||||
@@ -308,51 +276,28 @@ Partial Class LogIn
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
'Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario, Optional NombreCadena As String = "Conexion")
|
|
||||||
|
|
||||||
' Dim ObjEmpresa As New ClsSisEmpresas(UsuarioActual:=UsuarioActual)
|
|
||||||
' If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
|
||||||
' If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
|
||||||
' Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
|
||||||
|
|
||||||
' Dim EmpresasFuncionalidades As New HybridDictionary
|
|
||||||
' For Each Row As Data.DataRow In dttmp.Rows
|
|
||||||
' EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
|
||||||
' Next
|
|
||||||
' ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' UsuarioActual.Empresa = ObjEmpresa.Empresa
|
|
||||||
' Else
|
|
||||||
' End If
|
|
||||||
' ObjEmpresa.Dispose()
|
|
||||||
'End Sub
|
|
||||||
Dim BtnGuardar_Clickenter As Integer = 0
|
Dim BtnGuardar_Clickenter As Integer = 0
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
If BtnGuardar_Clickenter = 0 Then 'esta variable se recicla con cada postaback
|
If BtnGuardar_Clickenter = 0 Then 'esta variable se recicla con cada postaback
|
||||||
BtnGuardar_Clickenter = 1
|
BtnGuardar_Clickenter = 1
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
Dim ObjUsuario As New ClsSisUsuarios
|
Dim tGrupoEmpresa As String = ClsPaginas.GlobalGrupoEmpresa(Request.Url.Host.ToUpper())
|
||||||
|
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexionDominio(Request.Url.Host.ToUpper())
|
||||||
|
|
||||||
If ObjUsuario.UpdateUsuarioContrasenia(Encripta(TxtContrasenia1.Text), CveUsuario, CveEmpresa) Then
|
Dim ObjUsuario As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
|
||||||
If ObjUsuario.GetUsuarios(CveUsuario) Then
|
Dim Usuario As Usuario = ObjUsuario.GetUsuarioDetalle(CveUsuario, CveEmpresa:=CveEmpresa)
|
||||||
If ObjUsuario.DtResultados.Rows.Count = 1 Then
|
If Usuario IsNot Nothing Then
|
||||||
Dim dr As DataRow = ObjUsuario.DtResultados.Rows(0)
|
Dim ObjUsuario2 As New ClsSisUsuarios(UsuarioActual:=Usuario)
|
||||||
|
If ObjUsuario2.UpdateUsuarioContrasenia(Encripta(TxtContrasenia1.Text), CveUsuario, CveEmpresa) Then
|
||||||
txtUsuario.Text = dr("Usuario").ToString
|
txtUsuario.Text = Usuario.Usuario
|
||||||
Dim Contraseña As String = Decripta(dr("Contraseña").ToString)
|
TxtContraseña.Text = TxtContrasenia1.Text
|
||||||
TxtContraseña.Text = Contraseña
|
|
||||||
|
|
||||||
Else
|
|
||||||
TieneError = True
|
|
||||||
End If
|
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjUsuario.Dispose()
|
ObjUsuario.Dispose()
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
|
|||||||
@@ -196,8 +196,15 @@ Partial Class OC_PopUpBuscarReq
|
|||||||
Folio = Array(2).ToEntero
|
Folio = Array(2).ToEntero
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Serie = "-1"
|
Serie = "-1"
|
||||||
Folio = TxtFolio.Text.Trim.ToEntero
|
Folio = -1
|
||||||
|
|
||||||
|
If TxtFolio.Text.Trim.ToEntero > 0 Then
|
||||||
|
Folio = TxtFolio.Text.Trim.ToEntero
|
||||||
|
Else
|
||||||
|
Serie = TxtFolio.Text.Trim
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -479,12 +479,23 @@ Partial Class OS_OrdenesServicios
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoEstatus.Contiene(1, 2, 3, 4) And CveVenta <= 0 And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
|
If TipoEstatus.Contiene(1, 2, 3) And CveVenta <= 0 And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
|
||||||
BtnCancelar.Visible = True
|
BtnCancelar.Visible = True
|
||||||
Else
|
ElseIf TipoEstatus.Contiene(4) And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
|
||||||
|
BtnCancelar.Visible = False
|
||||||
|
BtnGuardar.Visible = True
|
||||||
|
DdlEstatusOS.Enabled = False
|
||||||
|
ElseIf TipoEstatus.Contiene(5) And (UsuarioActual.TienePermisoProceso(370) Or UsuarioActual.TienePermisoProceso(382)) Then
|
||||||
|
BtnCancelar.Visible = False
|
||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
|
DdlEstatusOS.Enabled = False
|
||||||
|
Else
|
||||||
|
If UsuarioActual.TienePermisoProceso(369) Then ' terminado
|
||||||
|
BtnGuardar.Visible = True
|
||||||
|
Else
|
||||||
|
BtnGuardar.Visible = False
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1190,27 +1201,27 @@ Partial Class OS_OrdenesServicios
|
|||||||
'ObjEstatusPermisos.Dispose()
|
'ObjEstatusPermisos.Dispose()
|
||||||
|
|
||||||
'OS Estatus Inicial
|
'OS Estatus Inicial
|
||||||
If tipoEstatus = 1 And UsuarioActual.TienePermisoProceso(366) Then
|
If tipoEstatus = 1 AndAlso UsuarioActual.TienePermisoProceso(366) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'OS Estatus Asignación
|
'OS Estatus Asignación
|
||||||
If tipoEstatus = 2 And UsuarioActual.TienePermisoProceso(367) Then
|
If tipoEstatus = 2 AndAlso UsuarioActual.TienePermisoProceso(367) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'OS Estatus Proceso
|
'OS Estatus Proceso
|
||||||
If tipoEstatus = 3 And UsuarioActual.TienePermisoProceso(368) Then
|
If tipoEstatus.Contiene(2, 3) AndAlso UsuarioActual.TienePermisoProceso(368) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'OS Estatus Terminado
|
'OS Estatus Terminado
|
||||||
If tipoEstatus = 4 And UsuarioActual.TienePermisoProceso(369) Then
|
If tipoEstatus.Contiene(2, 3, 4) AndAlso UsuarioActual.TienePermisoProceso(369) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'OS Estatus Cancelada
|
'OS Estatus Cancelada
|
||||||
If tipoEstatus = 5 And UsuarioActual.TienePermisoProceso(370) Then
|
If tipoEstatus.Contiene(2, 3, 4, 5) AndAlso UsuarioActual.TienePermisoProceso(370) Then
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ Partial Class CatFolios
|
|||||||
DdlTipoDocto.Items.Insert(33, New ListItem("Productos/Servicios", "PS"))
|
DdlTipoDocto.Items.Insert(33, New ListItem("Productos/Servicios", "PS"))
|
||||||
DdlTipoDocto.Items.Insert(34, New ListItem("NC de Remisión", "RNC"))
|
DdlTipoDocto.Items.Insert(34, New ListItem("NC de Remisión", "RNC"))
|
||||||
DdlTipoDocto.Items.Insert(35, New ListItem("Traspaso Carta Porte", "Tra"))
|
DdlTipoDocto.Items.Insert(35, New ListItem("Traspaso Carta Porte", "Tra"))
|
||||||
|
DdlTipoDocto.Items.Insert(35, New ListItem("Retenciones", "Ret"))
|
||||||
ElseIf UsuarioActual.Empresa.CvePlataforma = 2 Then
|
ElseIf UsuarioActual.Empresa.CvePlataforma = 2 Then
|
||||||
DdlTipoDocto.Items.Insert(1, New ListItem("Facturas", "Ing"))
|
DdlTipoDocto.Items.Insert(1, New ListItem("Facturas", "Ing"))
|
||||||
DdlTipoDocto.Items.Insert(2, New ListItem("Notas de Crédito", "Egs"))
|
DdlTipoDocto.Items.Insert(2, New ListItem("Notas de Crédito", "Egs"))
|
||||||
|
|||||||
@@ -83,11 +83,13 @@ Partial Class CatProyectos
|
|||||||
Private Sub RecargaGlobal()
|
Private Sub RecargaGlobal()
|
||||||
|
|
||||||
GlobalDTProyectos(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTProyectos(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
GlobalDTProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa, -1) = Nothing
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaSuproyectos()
|
Private Sub CargaSuproyectos()
|
||||||
GlobalDTSubProyectos(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTSubProyectos(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
GlobalDTProyectosUsuarios(-1, -1, UsuarioActual.CveEmpresa, -1) = Nothing
|
||||||
'Dim ObjSubProyectos As New ClsSubProyectos
|
'Dim ObjSubProyectos As New ClsSubProyectos
|
||||||
'If ObjSubProyectos.GetSubProyectos(UsuarioActual.CveEmpresa) Then
|
'If ObjSubProyectos.GetSubProyectos(UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
|||||||
@@ -1471,14 +1471,16 @@ Partial Class Sistemas_UsuarioDetalle
|
|||||||
|
|
||||||
|
|
||||||
#Region " CONTRASEÑA "
|
#Region " CONTRASEÑA "
|
||||||
Protected Sub LnkRestablecer_Click(sender As Object, e As EventArgs) Handles LnkRestablecer.Click
|
Protected Sub LnkRestablecer_Click(sender As Object, e As EventArgs) Handles LnkRestablecer.Click
|
||||||
Dim Usuario As New ClsSisUsuarios
|
|
||||||
|
|
||||||
|
Dim ObjUsuario As New ClsSisUsuarios()
|
||||||
|
|
||||||
If Usuario.UpdateUsuarioContrasenia(Encripta(ContraseñaPredeterminada), CveUsuario, CveEmpresa) Then
|
If ObjUsuario.UpdateUsuarioContrasenia(Encripta(ContraseñaPredeterminada), CveUsuario, CveEmpresa) Then
|
||||||
Alert("Contraseña Restablecida.<br> La nueva contraseña es: """ & ContraseñaPredeterminada & "", TipoMensaje.MsgInformacion)
|
Alert("Contraseña Restablecida.<br> La nueva contraseña es: """ & ContraseñaPredeterminada & "", TipoMensaje.MsgInformacion)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Usuario.Dispose()
|
ObjUsuario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkVerPass_Click(sender As Object, e As EventArgs) Handles LnkVerPass.Click
|
Protected Sub LnkVerPass_Click(sender As Object, e As EventArgs) Handles LnkVerPass.Click
|
||||||
|
|||||||
@@ -458,7 +458,7 @@ Partial Class ProductosyServicios
|
|||||||
DivCitricos.Visible = True
|
DivCitricos.Visible = True
|
||||||
CargaPanelCitricos()
|
CargaPanelCitricos()
|
||||||
End If
|
End If
|
||||||
If UsuarioActual.CveEmpresa = 119 Then
|
If UsuarioActual.CveEmpresa.Contiene(119, 194) Then
|
||||||
DiveCommerce.Visible = True
|
DiveCommerce.Visible = True
|
||||||
Dim CveCategoria2 As Integer = GlobalDTGralCategorias2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "Categoria = 'Ecommerce'").ToEntero
|
Dim CveCategoria2 As Integer = GlobalDTGralCategorias2(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveCategoria", "Categoria = 'Ecommerce'").ToEntero
|
||||||
DdlEcommerceClasificacion.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa, CveCategoria2)
|
DdlEcommerceClasificacion.DataSource = GlobalDTClasificaciones2(UsuarioActual.CveEmpresa, CveCategoria2)
|
||||||
|
|||||||
@@ -151,11 +151,20 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
//VERIFICA EL ESTATUS DE LA FACTURA NUEVA, SI ESTA ESTÁ CANCELADA, SE MANDA UNA CANCELACIÓN SIN FOLIO DE SUSTITUCIÓN Y CON EL CÓDIGO 02
|
//VERIFICA EL ESTATUS DE LA FACTURA NUEVA, SI ESTA ESTÁ CANCELADA, SE MANDA UNA CANCELACIÓN SIN FOLIO DE SUSTITUCIÓN Y CON EL CÓDIGO 02
|
||||||
Timbrado.AcuseCancelacionSAT VigenciaExtra = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptorSustitucion, Total.ToString(), true);
|
Timbrado.AcuseCancelacionSAT VigenciaExtra = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptorSustitucion, Total.ToString(), true);
|
||||||
if (VigenciaExtra.Estado.ToUpper() == "CANCELADO")
|
if (VigenciaExtra != null)
|
||||||
{
|
{
|
||||||
FolioSustitucion = "";
|
if (VigenciaExtra.Estado.ToUpper() == "CANCELADO")
|
||||||
CveMotivoSustitucion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
{
|
||||||
|
FolioSustitucion = "";
|
||||||
|
CveMotivoSustitucion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert("No se pudo comprobar la vigencia de la factura ante el SAT. El servicio no se encuentra disponible", TipoMensaje.MsgError);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -221,11 +230,20 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
|||||||
{
|
{
|
||||||
//VERIFICA EL ESTATUS DE LA FACTURA NUEVA, SI ESTA ESTÁ CANCELADA, SE MANDA UNA CANCELACIÓN SIN FOLIO DE SUSTITUCIÓN Y CON EL CÓDIGO 02
|
//VERIFICA EL ESTATUS DE LA FACTURA NUEVA, SI ESTA ESTÁ CANCELADA, SE MANDA UNA CANCELACIÓN SIN FOLIO DE SUSTITUCIÓN Y CON EL CÓDIGO 02
|
||||||
Timbrado.AcuseCancelacionSAT VigenciaExtra = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptorSustitucion, Total.ToString(), true);
|
Timbrado.AcuseCancelacionSAT VigenciaExtra = Timbrado.VerificarVigenciaSAT(FolioSustitucion, UsuarioActual.Empresa.RFC, RFCReceptorSustitucion, Total.ToString(), true);
|
||||||
if (VigenciaExtra.Estado.ToUpper() == "CANCELADO")
|
if (VigenciaExtra != null)
|
||||||
{
|
{
|
||||||
FolioSustitucion = "";
|
if (VigenciaExtra.Estado.ToUpper() == "CANCELADO")
|
||||||
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
{
|
||||||
}
|
FolioSustitucion = "";
|
||||||
|
CveMotivoCancelacion = get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa, CveSATMotivoCancelacion: 2).FiltroPrimeroValor("CveMotivoCancelacion").ToEntero();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Alert("No se pudo comprobar la vigencia de la factura ante el SAT. El servicio no se encuentra disponible", TipoMensaje.MsgError);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", NowADS(), TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion, CveMotivoCancelacion: CveMotivoCancelacion);
|
var respCancelacion = CancelarDocumento(CveVenta, -1, CveCliente, Folio, Uuid, "", NowADS(), TipoDocto, Total.ToDouble(), UsuarioActual.Empresa.CvePAC, EsRefacturacion: true, FolioSustitucion: FolioSustitucion, CveEstatusRefacturacion: CveEstatusRefacturacion, CveMotivoCancelacion: CveMotivoCancelacion);
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ Partial Class Ventas_RepPS
|
|||||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(130) = "1" Then
|
||||||
DivMarca.Visible = True
|
DivMarca.Visible = True
|
||||||
LblMarca.Visible = True
|
LblMarca.Visible = True
|
||||||
@@ -78,17 +77,12 @@ Partial Class Ventas_RepPS
|
|||||||
DivLinea.Visible = True
|
DivLinea.Visible = True
|
||||||
|
|
||||||
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
DdlMarcaPSDes.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||||
'Using ObjMarcas As New ClsProductosServicios
|
DdlMarcaPSDes.DataBind()
|
||||||
' If ObjMarcas.GetMarcas(UsuarioActual.CveEmpresa) Then
|
|
||||||
' DdlMarcaPSDes.DataSource = ObjMarcas.DtResultados
|
|
||||||
' DdlMarcaPSDes.DataBind()
|
|
||||||
' End If
|
|
||||||
'End Using
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
DdlLinea.DataSource = GlobalDTClasificacionesDetalle(UsuarioActual.CveEmpresa)
|
||||||
DdlLinea.DataBind()
|
DdlLinea.DataBind()
|
||||||
'DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
DdlMarcaPSDes.Items.Insert(0, New ListItem(" Todos ", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
Private Sub CargaDatos()
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -120,13 +120,17 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontraron Ventas con los filtros especificados"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle,GastosEnvio" data-sort="true" GridLines="None" Width="99%">
|
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" DataKeyNames="CveCliente,CveVendedor,CveSubProyecto,CvePS,CveUnidadMedida,Cantidad,PU,CveVentaDetalle,GastosEnvio" data-sort="true" GridLines="None" Width="99%">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cliente" DataField="NombreComercial" ItemStyle-Width="25%" />
|
<asp:TemplateField >
|
||||||
<asp:BoundField HeaderText="Dirección" DataField="DireccionEnvio" ItemStyle-Width="25%" />
|
<ItemTemplate>
|
||||||
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" ItemStyle-Width="5%" />
|
<asp:Label ID="LblCliente" runat="server" Text='<%#Eval("NombreComercial") %>'></asp:Label><br />
|
||||||
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" ItemStyle-Width="7.5%" />
|
<asp:Label ID="LblDir" Font-Italic="true" runat="server" Text='<%#Eval("DireccionEnvio") %>'></asp:Label>
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="2.5%" />
|
</ItemTemplate>
|
||||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-Width="25%" />
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="SerieFolio" DataField="SerieFolio" />
|
||||||
|
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" />
|
||||||
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
|
||||||
|
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" />
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-Width="2.5%">
|
<asp:TemplateField ItemStyle-Width="2.5%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ Partial Class Ventas_RepPedidosSTF
|
|||||||
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
|
||||||
|
|
||||||
If e.Row.DBCampo("CveVendedor") = "" Then e.Row.FCCheckBox("Chk").Visible = False
|
If e.Row.DBCampo("CveVendedor") = "" OrElse e.Row.DBCampo("CvePS") = "" Then e.Row.FCCheckBox("Chk").Visible = False
|
||||||
|
If e.Row.DBCampo("TipoRenglon") = "1" Then e.Row.CssClass = "SubTotales"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -76,14 +76,18 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">Sucursal:</div>
|
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||||
<div class="col-md-2 ">
|
<div runat="server" id="DivProyecto" class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;"></asp:DropDownList>
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
</div>
|
||||||
</asp:DropDownList>
|
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||||
</div>
|
<div runat="server" id="DivSubProyecto" class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
<div class="col-md-1 truncate">Grupo:</div>
|
<div class="col-md-1 truncate">Grupo:</div>
|
||||||
<div class="col-md-2 truncate">
|
<div class="col-md-1 truncate">
|
||||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
<asp:ListItem Text="Año Venta" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Año Venta" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Mes Venta" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Mes Venta" Value="2"></asp:ListItem>
|
||||||
@@ -100,7 +104,7 @@
|
|||||||
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
||||||
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
||||||
<asp:ListItem Text="Forma de Pago" Value="15"></asp:ListItem>
|
<asp:ListItem Text="Forma de Pago" Value="15"></asp:ListItem>
|
||||||
<asp:ListItem Text="Vendedor/Cliente" Value="16"></asp:ListItem>
|
<asp:ListItem Text="Vendedor/Cliente" Value="16"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -108,8 +108,12 @@ Partial Class Ventas_RepRecuperacion
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Carga SubProyectos
|
'Carga SubProyectos
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
DdlSubProyecto.DataBind()
|
'DdlSubProyecto.DataBind()
|
||||||
|
|
||||||
|
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1)
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Add(New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "18"))
|
||||||
|
|
||||||
'Carga Vendedor
|
'Carga Vendedor
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
@@ -149,7 +153,6 @@ Partial Class Ventas_RepRecuperacion
|
|||||||
txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"
|
txtFechaI.Text = $"01/{NowADS().Month}/{NowADS().Year}"
|
||||||
txtFechaF.Text = NowADS().ToShortDateString
|
txtFechaF.Text = NowADS().ToShortDateString
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
lblEsDistribuidor.Visible = True
|
lblEsDistribuidor.Visible = True
|
||||||
divEsDistribuidor.Visible = True
|
divEsDistribuidor.Visible = True
|
||||||
@@ -169,13 +172,12 @@ Partial Class Ventas_RepRecuperacion
|
|||||||
|
|
||||||
Dim FechaAplicadoI As Date = If(IsDate(TxtFechaAplicadoI.Text), TxtFechaAplicadoI.Text.ToDate, MinFecha)
|
Dim FechaAplicadoI As Date = If(IsDate(TxtFechaAplicadoI.Text), TxtFechaAplicadoI.Text.ToDate, MinFecha)
|
||||||
Dim FechaAplicadoF As Date = If(IsDate(TxtFechaAplicadoF.Text), TxtFechaAplicadoF.Text.ToDate, MaxFecha)
|
Dim FechaAplicadoF As Date = If(IsDate(TxtFechaAplicadoF.Text), TxtFechaAplicadoF.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
Dim FechaRegistroIEI As Date = If(IsDate(TxtFechaRegistroIEI.Text), TxtFechaRegistroIEI.Text.ToDate, MinFecha)
|
Dim FechaRegistroIEI As Date = If(IsDate(TxtFechaRegistroIEI.Text), TxtFechaRegistroIEI.Text.ToDate, MinFecha)
|
||||||
Dim FechaRegistroIEF As Date = If(IsDate(TxtFechaRegistroIEF.Text), TxtFechaRegistroIEF.Text.ToDate, MaxFecha)
|
Dim FechaRegistroIEF As Date = If(IsDate(TxtFechaRegistroIEF.Text), TxtFechaRegistroIEF.Text.ToDate, MaxFecha)
|
||||||
|
|
||||||
|
|
||||||
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
|
If ObjMovtos.GetRepRecuperacion(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, -1,
|
||||||
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
|
"-1", UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlResponsable.SelectedValue.ToEntero, DdlTipoDocto.SelectedValue.ToString, CveProyecto:=DdlProyecto.SelectedValue.ToEntero, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero,
|
||||||
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
|
||||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero,
|
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero,
|
||||||
CveMoneda:=DdlMoneda.SelectedValue.ToEntero) Then
|
CveMoneda:=DdlMoneda.SelectedValue.ToEntero) Then
|
||||||
@@ -220,15 +222,15 @@ Partial Class Ventas_RepRecuperacion
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}&CveCondicionesPago={24}&CveTipoTransaccion={25}",
|
Dim Liga4 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}&CveCondicionesPago={24}&CveTipoTransaccion={25}&CveProyecto={26}",
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
||||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF, e.Row.DBCampo("CveCondicionesPago"), e.Row.DBCampo("CveTipoTransaccion"))
|
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 2, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF, e.Row.DBCampo("CveCondicionesPago"), e.Row.DBCampo("CveTipoTransaccion"), e.Row.DBCampo("CveProyecto"))
|
||||||
|
|
||||||
e.Row.FCHyperLink("HplPagado").NavigateUrl = Liga4
|
e.Row.FCHyperLink("HplPagado").NavigateUrl = Liga4
|
||||||
|
|
||||||
Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}&CveCondicionesPago={24}&CveTipoTransaccion={25}",
|
Dim Liga5 As String = String.Format("/Ventas/RepRecuperacionDetalle.aspx?GPO={0}&CveCliente={1}&CveSubProyecto={2}&Vendedor={3}&CveUsuario={4}&CveEstatusFactura={5}&IVA={6}&FechaI={7}&FechaF={8}&CveResponsable={9}&TipoDocto={10}&CveClienteSucursal={11}&CveBanco{12}&CveCuenta{13}&Grupo={14}&TipoCambio={15}&TCEspecifico={16}&CveMoneda={17}&Tipo={18}&EsDistribuidor={19}&FechaAplicadoI={20}&FechaAplicadoF={21}&FechaRegistroIEI={22}&FechaRegistroIEF={23}&CveCondicionesPago={24}&CveTipoTransaccion={25}&CveProyecto={26}",
|
||||||
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
DdlGrupo.SelectedValue, e.Row.DBCampo("CveCliente"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveVendedor"),
|
||||||
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF, e.Row.DBCampo("CveCondicionesPago"), e.Row.DBCampo("CveTipoTransaccion"))
|
e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), e.Row.DBCampo("GPO_IVA"), FechaI, FechaF, DdlResponsable.SelectedValue, e.Row.DBCampo("TipoDocto"), CveClienteSucursal, e.Row.DBCampo("CveBanco"), e.Row.DBCampo("CveCuenta"), e.Row.DBCampo("GPO"), e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), e.Row.DBCampo("CveMoneda"), 1, e.Row.DBCampo("EsDistribuidor"), FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF, e.Row.DBCampo("CveCondicionesPago"), e.Row.DBCampo("CveTipoTransaccion"), e.Row.DBCampo("CveProyecto"))
|
||||||
|
|
||||||
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
|
e.Row.FCHyperLink("HplVendido").NavigateUrl = Liga5
|
||||||
|
|
||||||
@@ -241,28 +243,43 @@ Partial Class Ventas_RepRecuperacion
|
|||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales"
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SELECTED INDEX CHANGE"
|
#Region "SELECTED INDEX CHANGE"
|
||||||
|
|
||||||
Protected Sub DdlBanco_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlBanco_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
DdlCuentaBancaria.Items.Clear()
|
DdlCuentaBancaria.Items.Clear()
|
||||||
DdlCuentaBancaria.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveBanco = {DdlBanco.SelectedValue.ToEntero}")
|
DdlCuentaBancaria.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros($"CveBanco = {DdlBanco.SelectedValue.ToEntero}")
|
||||||
DdlCuentaBancaria.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlCuentaBancaria.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
DdlCuentaBancaria.DataBind()
|
DdlCuentaBancaria.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||||
|
CargaSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
|
||||||
|
End Sub
|
||||||
|
Public Sub CargaSubProyecto(DdlSubProyecto As DropDownList, CveProyecto As String, Optional AplicaTodos As String = "Todos")
|
||||||
|
DdlSubProyecto.Items.Clear()
|
||||||
|
DdlSubProyecto.ClearSelection()
|
||||||
|
DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, CveProyecto.ToEntero(), UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(UsuarioActual.CveEmpresa, CveProyecto:=CveProyecto.ToEntero(), Estatus:=1))
|
||||||
|
DdlSubProyecto.DataBind()
|
||||||
|
If AplicaTodos <> "" Then
|
||||||
|
If DdlSubProyecto.GetType() Is GetType(ListBox) Then
|
||||||
|
'DdlSubProyecto.Text = "Seleccione"
|
||||||
|
Else
|
||||||
|
DdlSubProyecto.Items.Insert(0, New ListItem(If(CveProyecto <> "-1", AplicaTodos, "Todos"), "-1"))
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "IMPRESIONES"
|
#Region "IMPRESIONES"
|
||||||
|
|
||||||
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkPdf_Click(sender As Object, e As EventArgs)
|
||||||
Imprimir("PDF")
|
Imprimir("PDF")
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -81,14 +81,18 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate">Sucursal: </div>
|
<asp:Label ID="LblProyecto" runat="server" class="col-md-1 truncate">Proyecto:</asp:Label>
|
||||||
<div class="col-md-2 ">
|
<div runat="server" id="DivProyecto" class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlProyecto" runat="server" AutoPostBack="true" AppendDataBoundItems="true" DataTextField="Proyecto" DataValueField="CveProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me" Style="width: 100%;"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<asp:Label ID="LblSubProyecto" runat="server" class="col-md-1 truncate">SubProyecto:</asp:Label>
|
||||||
|
<div runat="server" id="DivSubProyecto" class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1 truncate"> Grupo: </div>
|
<div class="col-md-1 truncate"> Grupo: </div>
|
||||||
<div class="col-md-2 truncate">
|
<div class="col-md-1 truncate">
|
||||||
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
<asp:DropDownList ID="DdlGrupo" runat="server" CssClass="form-control input-small input-sm select2me" Width="100%">
|
||||||
<asp:ListItem Text="Año de Venta" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Año de Venta" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Mes de Venta" Value="2"></asp:ListItem>
|
<asp:ListItem Text="Mes de Venta" Value="2"></asp:ListItem>
|
||||||
@@ -104,7 +108,7 @@
|
|||||||
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
|
<asp:ListItem Text="Usuario" Value="8"></asp:ListItem>
|
||||||
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
<asp:ListItem Text="Estatus Fact." Value="9"></asp:ListItem>
|
||||||
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
<asp:ListItem Text="% IVA" Value="10"></asp:ListItem>
|
||||||
<asp:ListItem Text="Forma de Pago" Value="15"></asp:ListItem>
|
<asp:ListItem Text="Forma de Pago" Value="15"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
#Region "CARGAS"
|
#Region "CARGAS"
|
||||||
|
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
Dim CveCliente, CveVendedor, CveUsuario, CveSubProyecto,
|
Dim CveCliente, CveVendedor, CveUsuario, CveProyecto, CveSubProyecto,
|
||||||
CveEstatus, CveResponsable, CveAgrupador, CveBanco, CveCuenta, CveClienteSucursal, CveMoneda, CveClienteClasificacion As Integer
|
CveEstatus, CveResponsable, CveAgrupador, CveBanco, CveCuenta, CveClienteSucursal, CveMoneda, CveClienteClasificacion As Integer
|
||||||
Dim FechaI, FechaF, TipoDocto, TipoCambio, FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF As String
|
Dim FechaI, FechaF, TipoDocto, TipoCambio, FechaAplicadoI, FechaAplicadoF, FechaRegistroIEI, FechaRegistroIEF As String
|
||||||
|
|
||||||
@@ -111,9 +111,11 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(307) <> "" Then DdlGrupo.Items.Add(New ListItem(UsuarioActual.Empresa.Funcionalidad(307), "18"))
|
||||||
'Carga SubProyectos
|
'Carga SubProyectos
|
||||||
DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
'DdlSubProyecto.DataSource = GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1)
|
||||||
DdlSubProyecto.DataBind()
|
'DdlSubProyecto.DataBind()
|
||||||
|
CargarCentrosDeCosto(DdlProyecto, DdlSubProyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto, VisualizacionReporte:=1)
|
||||||
|
|
||||||
'Carga Vendedor
|
'Carga Vendedor
|
||||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
|
||||||
@@ -179,7 +181,8 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TipoDocto = IfNull(Request("TipoDocto"), "-1").ToString
|
TipoDocto = IfNull(Request("TipoDocto"), "-1").ToString
|
||||||
CveClienteSucursal = IfNull(Request("CveClienteSucursal"), "-1").ToString.ToEntero
|
CveClienteSucursal = IfNull(Request("CveClienteSucursal"), "-1").ToString.ToEntero
|
||||||
|
CveProyecto = IfNull(Request("CveProyecto"), "-1").ToString.ToEntero
|
||||||
CveSubProyecto = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero
|
CveSubProyecto = IfNull(Request("CveSubProyecto"), "-1").ToString.ToEntero
|
||||||
CveVendedor = IfNull(Request("Vendedor"), "-1").ToString.ToEntero
|
CveVendedor = IfNull(Request("Vendedor"), "-1").ToString.ToEntero
|
||||||
CveCliente = IfNull(Request("CveCliente"), "-1").ToString.ToEntero
|
CveCliente = IfNull(Request("CveCliente"), "-1").ToString.ToEntero
|
||||||
@@ -225,6 +228,7 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todas", "-1"))
|
||||||
|
|
||||||
DdlVendedor.SelectedValueExist(CveVendedor)
|
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||||
|
DdlProyecto.SelectedValueExist(CveProyecto)
|
||||||
DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
DdlSubProyecto.SelectedValueExist(CveSubProyecto)
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
|
DdlClientes.SelectedText = GlobalDTCliente(UsuarioActual.CveEmpresa, Estatus:=-1, CveCliente:=CveCliente).FiltroPrimeroValor("NombreComercial", "")
|
||||||
@@ -268,7 +272,7 @@ Partial Class Ventas_RepRecuperacionDetalle
|
|||||||
If ObjMovtos.GetRepRecuperacionDetalle(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero,
|
If ObjMovtos.GetRepRecuperacionDetalle(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, DdlClientes.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero,
|
||||||
DdlClienteSucursal.SelectedValue.ToEntero, -1,
|
DdlClienteSucursal.SelectedValue.ToEntero, -1,
|
||||||
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
|
Iva.ToString, DdlGrupo.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlResponsable.SelectedValue.ToEntero,
|
||||||
DdlTipoDocto.SelectedValue, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, Grupo:=Grupo,
|
DdlTipoDocto.SelectedValue, CveProyecto:=DdlProyecto.SelectedValue.ToEntero, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveBanco:=DdlBanco.SelectedValue.ToEntero, CveCuenta:=DdlCuentaBancaria.SelectedValue.ToEntero, Grupo:=Grupo,
|
||||||
TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, Tipo:=Tipo,
|
TipoCambio:=RblTipoCambio.SelectedValue.ToEntero, TCEspecifico:=TCEspecifico, CveMoneda:=DdlMoneda.SelectedValue.ToEntero, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, Tipo:=Tipo,
|
||||||
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF,
|
EsDistribuidor:=DdlDistribuidor.SelectedValue.ToEntero(), FechaAplicadoI:=FechaAplicadoI, FechaAplicadoF:=FechaAplicadoF, FechaRegistroIEI:=FechaRegistroIEI, FechaRegistroIEF:=FechaRegistroIEF,
|
||||||
CveTipoTransaccion:=DdlTipoTransaccion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero) Then
|
CveTipoTransaccion:=DdlTipoTransaccion.SelectedValue.ToEntero, CveCondicionesPago:=DdlCondicionesPago.SelectedValue.ToEntero) Then
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public partial class Ventas_RepRecuperacionPeriodo : ClsPaginas
|
|||||||
|
|
||||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Consulta();
|
Consulta();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Consulta()
|
private void Consulta()
|
||||||
|
|||||||
@@ -4240,7 +4240,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr align="left">
|
<tr align="left">
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="100%" MaxLength="800" CssClass="form-control input-sm"></asp:TextBox></td>
|
<asp:TextBox ID="TxtObsFact" runat="server" Rows="3" TextMode="MultiLine" Width="100%" MaxLength="2000" CssClass="form-control input-sm"></asp:TextBox></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr id="TrOC" runat="server">
|
<tr id="TrOC" runat="server">
|
||||||
<td>Orden de Compra:
|
<td>Orden de Compra:
|
||||||
|
|||||||
Reference in New Issue
Block a user