Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -305,7 +305,7 @@ Public Class CFDINominaReceptor
|
|||||||
Public Property Departamento As String = ""
|
Public Property Departamento As String = ""
|
||||||
Public Property Puesto As String = ""
|
Public Property Puesto As String = ""
|
||||||
Public Property CodigoRiesgoPuesto As String = ""
|
Public Property CodigoRiesgoPuesto As String = ""
|
||||||
Public Property TipoPeriodo As String = ""
|
Public Property PeriodicidadPago As String = ""
|
||||||
Public Property CodigoBanco As String = ""
|
Public Property CodigoBanco As String = ""
|
||||||
Public Property NumeroCuenta As String = ""
|
Public Property NumeroCuenta As String = ""
|
||||||
Public Property SDI As Decimal = 0
|
Public Property SDI As Decimal = 0
|
||||||
|
|||||||
@@ -137,7 +137,7 @@ Public Class LogicNominas
|
|||||||
Dim Departamento As String = ""
|
Dim Departamento As String = ""
|
||||||
Dim Puesto As String = ""
|
Dim Puesto As String = ""
|
||||||
Dim CveSATRiesgoPuesto As String = ""
|
Dim CveSATRiesgoPuesto As String = ""
|
||||||
Dim TipoPeriodoPago As String = ""
|
Dim PeriodicidadPago As String = ""
|
||||||
Dim ClaveBanco As String = ""
|
Dim ClaveBanco As String = ""
|
||||||
Dim BancoNumCuenta As String = ""
|
Dim BancoNumCuenta As String = ""
|
||||||
Dim SDI As Decimal = 0
|
Dim SDI As Decimal = 0
|
||||||
@@ -203,7 +203,7 @@ Public Class LogicNominas
|
|||||||
Departamento = objPersonal.Departamento
|
Departamento = objPersonal.Departamento
|
||||||
Puesto = objPersonal.Puesto
|
Puesto = objPersonal.Puesto
|
||||||
CveSATRiesgoPuesto = objPersonal.CveSATRiesgoPuesto.ToString()
|
CveSATRiesgoPuesto = objPersonal.CveSATRiesgoPuesto.ToString()
|
||||||
TipoPeriodoPago = objPersonal.TipoPeriodoPago
|
|
||||||
'If Not MetodoPagoFijo Then
|
'If Not MetodoPagoFijo Then
|
||||||
' ClaveBanco = objPersonal.ClaveBanco
|
' ClaveBanco = objPersonal.ClaveBanco
|
||||||
' BancoNumCuenta = objPersonal.BancoNumCuenta
|
' BancoNumCuenta = objPersonal.BancoNumCuenta
|
||||||
@@ -213,7 +213,6 @@ Public Class LogicNominas
|
|||||||
SalarioDiarioSS = objPersonal.SalarioDiarioSS
|
SalarioDiarioSS = objPersonal.SalarioDiarioSS
|
||||||
ClaveEstado = objPersonal.ClaveEstado
|
ClaveEstado = objPersonal.ClaveEstado
|
||||||
|
|
||||||
AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero()
|
|
||||||
FormatoReciboCFDi = objPersonal.FormatoReciboCFDi
|
FormatoReciboCFDi = objPersonal.FormatoReciboCFDi
|
||||||
Else
|
Else
|
||||||
If continuar Then GetError = "No se pudo obtener la información del empleado" 'si continuar= true el error se origino en este nodo y le asigno el error
|
If continuar Then GetError = "No se pudo obtener la información del empleado" 'si continuar= true el error se origino en este nodo y le asigno el error
|
||||||
@@ -266,6 +265,8 @@ Public Class LogicNominas
|
|||||||
|
|
||||||
FechaFin = DrPeriodo("FechaFin").ToString().ToDate()
|
FechaFin = DrPeriodo("FechaFin").ToString().ToDate()
|
||||||
FechaPago = DrPeriodo("FechaPago").ToString().ToDate()
|
FechaPago = DrPeriodo("FechaPago").ToString().ToDate()
|
||||||
|
PeriodicidadPago = DrPeriodo("ClavePerioricidadPago").ToString()
|
||||||
|
AntiguedadSemanas = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, FechaFin).ToEntero()
|
||||||
|
|
||||||
If Not TimbreIndemnizacion Then
|
If Not TimbreIndemnizacion Then
|
||||||
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
FechaInicio = DrPeriodo("FechaInicio").ToString().ToDate()
|
||||||
@@ -491,7 +492,7 @@ Public Class LogicNominas
|
|||||||
cfdi.Nomina.Receptor.Departamento = Departamento
|
cfdi.Nomina.Receptor.Departamento = Departamento
|
||||||
cfdi.Nomina.Receptor.Puesto = Puesto
|
cfdi.Nomina.Receptor.Puesto = Puesto
|
||||||
cfdi.Nomina.Receptor.CodigoRiesgoPuesto = CveSATRiesgoPuesto.ToString()
|
cfdi.Nomina.Receptor.CodigoRiesgoPuesto = CveSATRiesgoPuesto.ToString()
|
||||||
cfdi.Nomina.Receptor.TipoPeriodo = TipoPeriodoPago
|
cfdi.Nomina.Receptor.PeriodicidadPago = PeriodicidadPago
|
||||||
cfdi.Nomina.Receptor.CodigoBanco = ClaveBanco
|
cfdi.Nomina.Receptor.CodigoBanco = ClaveBanco
|
||||||
cfdi.Nomina.Receptor.NumeroCuenta = BancoNumCuenta
|
cfdi.Nomina.Receptor.NumeroCuenta = BancoNumCuenta
|
||||||
cfdi.Nomina.Receptor.SDI = SDI
|
cfdi.Nomina.Receptor.SDI = SDI
|
||||||
|
|||||||
@@ -516,7 +516,7 @@ Public Class Timbrado
|
|||||||
Dim UrlServicio As String = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL"
|
Dim UrlServicio As String = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL"
|
||||||
Dim AmbienteProductivo As Boolean = True
|
Dim AmbienteProductivo As Boolean = True
|
||||||
|
|
||||||
If Not Empresa.FacturaProduccion OrElse Empresa.CveEmpresa = 1 Then
|
If Not Empresa.FacturaProduccion OrElse Empresa.CveEmpresa = 1 OrElse Not ClsPaginas.EsProduccion Then
|
||||||
UsuarioServicio = "fgomez"
|
UsuarioServicio = "fgomez"
|
||||||
ClaveServicio = "12121212"
|
ClaveServicio = "12121212"
|
||||||
Clave = "12345678a"
|
Clave = "12345678a"
|
||||||
@@ -713,12 +713,15 @@ Public Class Timbrado
|
|||||||
Dim UsuarioServicio As String = "rene.molina@adssistemas.mx"
|
Dim UsuarioServicio As String = "rene.molina@adssistemas.mx"
|
||||||
Dim ClaveServicio As String = "Facturacion2021#"
|
Dim ClaveServicio As String = "Facturacion2021#"
|
||||||
|
|
||||||
If Not Empresa.FacturaProduccion OrElse Empresa.CveEmpresa = 1 Then
|
If Not Empresa.FacturaProduccion OrElse Empresa.CveEmpresa = 1 OrElse Not ClsPaginas.EsProduccion Then
|
||||||
EmisorRFC = "ZUÑ920208KL4"
|
EmisorRFC = "EKU9003173C9"
|
||||||
ArchivoLLave = $"{Empresa.Ruta}Certificados\CSD01_ZUÑ920208KL4.key"
|
ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.key"
|
||||||
ArchivoCertificado = $"{Empresa.Ruta}Certificados\CSD01_ZUÑ920208KL4.cer"
|
ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.cer"
|
||||||
|
|
||||||
Clave = "12345678a"
|
Clave = "12345678a"
|
||||||
TimbraProduccion = False
|
TimbraProduccion = False
|
||||||
|
UsuarioServicio = "UserTest"
|
||||||
|
ClaveServicio = "1234567890"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim llaveByte As Byte(), certByte As Byte()
|
Dim llaveByte As Byte(), certByte As Byte()
|
||||||
@@ -1325,7 +1328,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
|
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 OrElse Not ClsPaginas.EsProduccion Then
|
||||||
AmbienteProductivo = False
|
AmbienteProductivo = False
|
||||||
Clave = "12345678a"
|
Clave = "12345678a"
|
||||||
EmisorRFC = "EKU9003173C9"
|
EmisorRFC = "EKU9003173C9"
|
||||||
@@ -1362,7 +1365,7 @@ Public Class Timbrado
|
|||||||
Dim cfdi As New Profact.TimbraCFDI40.Conector(AmbienteProductivo)
|
Dim cfdi As New Profact.TimbraCFDI40.Conector(AmbienteProductivo)
|
||||||
Dim comprobante As New Profact.TimbraCFDI40.Comprobante()
|
Dim comprobante As New Profact.TimbraCFDI40.Comprobante()
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
|
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 OrElse Not ClsPaginas.EsProduccion Then
|
||||||
cfdi.EstableceCredenciales("mvpNUXmQfK8=")
|
cfdi.EstableceCredenciales("mvpNUXmQfK8=")
|
||||||
Else
|
Else
|
||||||
cfdi.EstableceCredenciales($"vSGxMFWnNRy/nDoowxqrqw==|Sia123654")
|
cfdi.EstableceCredenciales($"vSGxMFWnNRy/nDoowxqrqw==|Sia123654")
|
||||||
@@ -2326,7 +2329,7 @@ Public Class Timbrado
|
|||||||
Nom.Receptor.Puesto = ObjCFDITimbre.Nomina.Receptor.Puesto
|
Nom.Receptor.Puesto = ObjCFDITimbre.Nomina.Receptor.Puesto
|
||||||
Nom.Receptor.RiesgoPuestoSpecified = True
|
Nom.Receptor.RiesgoPuestoSpecified = True
|
||||||
Nom.Receptor.RiesgoPuesto = ObjCFDITimbre.Nomina.Receptor.CodigoRiesgoPuesto
|
Nom.Receptor.RiesgoPuesto = ObjCFDITimbre.Nomina.Receptor.CodigoRiesgoPuesto
|
||||||
Nom.Receptor.PeriodicidadPago = ObjCFDITimbre.Nomina.Receptor.TipoPeriodo
|
Nom.Receptor.PeriodicidadPago = ObjCFDITimbre.Nomina.Receptor.PeriodicidadPago
|
||||||
If ObjCFDITimbre.Nomina.Receptor.CodigoBanco <> "" AndAlso ObjCFDITimbre.Nomina.Receptor.NumeroCuenta <> "" Then
|
If ObjCFDITimbre.Nomina.Receptor.CodigoBanco <> "" AndAlso ObjCFDITimbre.Nomina.Receptor.NumeroCuenta <> "" Then
|
||||||
Nom.Receptor.BancoSpecified = True
|
Nom.Receptor.BancoSpecified = True
|
||||||
Nom.Receptor.Banco = ObjCFDITimbre.Nomina.Receptor.CodigoBanco
|
Nom.Receptor.Banco = ObjCFDITimbre.Nomina.Receptor.CodigoBanco
|
||||||
@@ -2403,30 +2406,62 @@ Public Class Timbrado
|
|||||||
FolioFiscal = resultadoTimbre.FolioUUID
|
FolioFiscal = resultadoTimbre.FolioUUID
|
||||||
If FolioFiscal <> "" Then
|
If FolioFiscal <> "" Then
|
||||||
resultadoTimbre.GuardaXml(RutaArchivo, NombreArchivoXML)
|
resultadoTimbre.GuardaXml(RutaArchivo, NombreArchivoXML)
|
||||||
|
'----------------------
|
||||||
|
|
||||||
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
|
Select Case ObjCFDITimbre.Comprobante.TipoComprobante
|
||||||
|
Case "N"
|
||||||
|
Using ObjNomina2 As New ClsNominas()
|
||||||
|
|
||||||
'Actualiza Estatus Factura
|
If ObjNomina2.UpdateEstatusNomNominas(3, UsuarioActual.Empresa.CvePAC, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0, isFiniquito:=Ventas.Timbre.IStimbreFiniquito) Then
|
||||||
If Ventas.CveVenta > 0 Then
|
Retorno = ""
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
Case "T"
|
||||||
Dim ObjVentas As New ClsVentas()
|
Dim objGrales As New ClsGenerales
|
||||||
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", Now, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC, RFCReceptor:=ObjCFDITimbre.Receptor.RFC, CFDIVersion:="4.0") Then
|
If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC, "4.0") Then
|
||||||
Retorno = ""
|
Retorno = ""
|
||||||
Else
|
Else
|
||||||
Retorno = "Error"
|
Retorno = "Error"
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
objGrales.Dispose()
|
||||||
|
|
||||||
|
Using ObjInv As New ClsInventarios()
|
||||||
|
If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then
|
||||||
|
Retorno = ""
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
Case Else
|
||||||
|
|
||||||
''Actualiza Cliente (NumeroCuenta)
|
'Actualiza Estatus Factura
|
||||||
'If Not UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
If Ventas.CveVenta > 0 Then
|
||||||
' Dim Hilo2 As New System.Threading.Thread(Sub() ActualizaCliente(UsuarioActual.CveUsuario, Ventas.Cliente.NumCtaPago, Ventas.CveMetodoPago, Ventas.CveCliente))
|
|
||||||
' Hilo2.Start()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
End If
|
Using ObjVentas As New ClsVentas()
|
||||||
End If
|
|
||||||
|
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=UsuarioActual.Empresa.CvePAC, RFCReceptor:=ObjCFDITimbre.Receptor.RFC, CFDIVersion:="4.0") Then
|
||||||
|
Retorno = ""
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
|
'Genero la addenda Ford
|
||||||
|
If Ventas.Cliente.Ford_GSDB <> "" Then
|
||||||
|
|
||||||
|
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML) 'If(UsuarioActual.Empresa.FacturaProduccion, String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.SerieFolio), String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.TipoDocto, Ventas.SerieFolio))
|
||||||
|
|
||||||
|
Dim FolioFactura As String = ""
|
||||||
|
If UsuarioActual.CveEmpresa = 8 Then FolioFactura = Ventas.Folio.ToString ' sogo, pordefault manda el folio de la factura
|
||||||
|
GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
|
||||||
|
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Select
|
||||||
|
'----------------------
|
||||||
|
|
||||||
If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\")
|
If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\")
|
||||||
|
|
||||||
@@ -2445,25 +2480,6 @@ Public Class Timbrado
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjCFDITimbre.Comprobante.TipoComprobante = "T" Then
|
|
||||||
Dim objGrales As New ClsGenerales
|
|
||||||
If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC, "4.0") Then
|
|
||||||
Retorno = ""
|
|
||||||
Else
|
|
||||||
Retorno = "Error"
|
|
||||||
End If
|
|
||||||
objGrales.Dispose()
|
|
||||||
|
|
||||||
Using ObjInv As New ClsInventarios()
|
|
||||||
If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then
|
|
||||||
Retorno = ""
|
|
||||||
Else
|
|
||||||
Retorno = "Error"
|
|
||||||
End If
|
|
||||||
End Using
|
|
||||||
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Pendiente. Ruta guardar archivos
|
'Pendiente. Ruta guardar archivos
|
||||||
sw.Stop()
|
sw.Stop()
|
||||||
swTiempo.AppendFormat("Actualizado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
swTiempo.AppendFormat("Actualizado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
@@ -2950,7 +2966,7 @@ Public Class Timbrado
|
|||||||
ObjCFDITimbre.Nomina.Receptor.Departamento,
|
ObjCFDITimbre.Nomina.Receptor.Departamento,
|
||||||
ObjCFDITimbre.Nomina.Receptor.Puesto,
|
ObjCFDITimbre.Nomina.Receptor.Puesto,
|
||||||
ObjCFDITimbre.Nomina.Receptor.CodigoRiesgoPuesto,
|
ObjCFDITimbre.Nomina.Receptor.CodigoRiesgoPuesto,
|
||||||
If(ObjCFDITimbre.Nomina.TipoNomina = "E", "99", ObjCFDITimbre.Nomina.Receptor.TipoPeriodo),
|
ObjCFDITimbre.Nomina.Receptor.PeriodicidadPago,
|
||||||
ObjCFDITimbre.Nomina.Receptor.CodigoBanco,
|
ObjCFDITimbre.Nomina.Receptor.CodigoBanco,
|
||||||
ObjCFDITimbre.Nomina.Receptor.NumeroCuenta,
|
ObjCFDITimbre.Nomina.Receptor.NumeroCuenta,
|
||||||
ObjCFDITimbre.Nomina.Receptor.SBC,
|
ObjCFDITimbre.Nomina.Receptor.SBC,
|
||||||
@@ -3075,18 +3091,18 @@ Public Class Timbrado
|
|||||||
|
|
||||||
UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL"
|
UrlServicio = "https://cfdi.gofac.com.mx/timbrado.asmx?WSDL"
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
|
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 OrElse Not ClsPaginas.EsProduccion Then
|
||||||
|
|
||||||
EmisorRFC = "EKU9003173C9"
|
EmisorRFC = "EKU9003173C9"
|
||||||
UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE"
|
UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE"
|
||||||
ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key"
|
ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.key"
|
||||||
ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer"
|
ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.cer"
|
||||||
|
|
||||||
Clave = "12345678a"
|
Clave = "12345678a"
|
||||||
TimbraProduccion = False
|
TimbraProduccion = False
|
||||||
UsuarioServicio = "UserTest"
|
UsuarioServicio = "UserTest"
|
||||||
ClaveServicio = "1234567890"
|
ClaveServicio = "1234567890"
|
||||||
|
UsuarioActual.Empresa.CodigoRegimenFiscal = "601"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
#Region "Valida"
|
#Region "Valida"
|
||||||
@@ -3298,15 +3314,18 @@ Public Class Timbrado
|
|||||||
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
||||||
|
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
|
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 OrElse Not ClsPaginas.EsProduccion Then
|
||||||
|
|
||||||
EmisorRFC = "EKU9003173C9"
|
EmisorRFC = "EKU9003173C9"
|
||||||
UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE"
|
UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE"
|
||||||
ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key"
|
ArchivoLLave = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.key"
|
||||||
ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer"
|
ArchivoCertificado = $"{Extensiones.ModExtensiones.DirectorioEmpresas}1\Certificados\EKU9003173C9.cer"
|
||||||
|
|
||||||
Clave = "12345678a"
|
Clave = "12345678a"
|
||||||
TimbraProduccion = False
|
TimbraProduccion = False
|
||||||
|
UsuarioServicio = "UserTest"
|
||||||
|
ClaveServicio = "1234567890"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
#Region "Valida"
|
#Region "Valida"
|
||||||
|
|||||||
@@ -821,7 +821,7 @@
|
|||||||
<i class="fa fa-user font-yellow-gold"></i>
|
<i class="fa fa-user font-yellow-gold"></i>
|
||||||
<span class="caption-subject bold font-black uppercase">Trabajador : </span>
|
<span class="caption-subject bold font-black uppercase">Trabajador : </span>
|
||||||
<asp:Label ID="LblCodigoEmpleado" runat="server"></asp:Label>
|
<asp:Label ID="LblCodigoEmpleado" runat="server"></asp:Label>
|
||||||
<asp:HyperLink ID="LblEmpleado" runat="server" Text=""></asp:HyperLink>
|
<asp:HyperLink ID="LblEmpleado" runat="server" CssClass="Texto" Text=""></asp:HyperLink>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
@@ -3348,7 +3348,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="DModalNominas" class="modal ADS fade" role="dialog">
|
<div id="DModalNominas" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpCargarNomina" class="modal-dialog modal-lg" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-content rowpadding">
|
<div class="modal-content rowpadding">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
@@ -3359,26 +3359,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="portlet light smmallpadding bordered">
|
<div class="row">
|
||||||
<div class="portlet-title">
|
<div class="col-md-8">
|
||||||
<div class="caption font-green">
|
<div class="portlet light xspadding bordered">
|
||||||
<i class="fa fa-download font-green"></i>
|
|
||||||
<span class="caption-subject bold uppercase">Paso 1: Descargar plantilla</span>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body rowpadding " id="showConceptos">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-1"></div>
|
|
||||||
<div class="col-xs-10">
|
|
||||||
|
|
||||||
<div class="portlet light smmallpadding bordered">
|
|
||||||
<div class="portlet-title">
|
<div class="portlet-title">
|
||||||
<div class="caption font-green">
|
<div class="caption font-green">
|
||||||
<i class="fa fa-download font-green"></i>
|
<i class="fa fa-download font-green"></i>
|
||||||
<span class="caption-subject bold uppercase">Conceptos</span>
|
<span class="caption-subject bold uppercase">Paso 1: Descargar plantilla Conceptos</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="tools">
|
<div class="tools">
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
@@ -3415,10 +3402,29 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="col-md-4">
|
||||||
|
<div class="portlet light xspadding bordered">
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="fa fa-upload font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Paso 2: cargar plantilla </span>
|
||||||
|
</div>
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body rowpadding ">
|
||||||
|
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class=" text-right">
|
||||||
|
<asp:CheckBox ID="ChkRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
|
<%-- -recuerda Solo editar de las tercer fila en adelante.<br />
|
||||||
-No se debe editar el nombre de la hoja 'Nómina'.<br />
|
-No se debe editar el nombre de la hoja 'Nómina'.<br />
|
||||||
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
|
-la columna para referenciar al emplado es la primer columna 'Codigo', la columna empleado es solo es informativa.<br />
|
||||||
@@ -3426,23 +3432,7 @@
|
|||||||
-si no desea insertar un concepto puede borrar la columna.<br />
|
-si no desea insertar un concepto puede borrar la columna.<br />
|
||||||
-no se debe borrar la columna código.<br />--%>
|
-no se debe borrar la columna código.<br />--%>
|
||||||
|
|
||||||
<div class="portlet light smmallpadding bordered">
|
|
||||||
<div class="portlet-title">
|
|
||||||
<div class="caption font-green">
|
|
||||||
<i class="fa fa-upload font-green"></i>
|
|
||||||
<span class="caption-subject bold uppercase">Paso 2: cargar plantilla </span>
|
|
||||||
</div>
|
|
||||||
<div class="tools">
|
|
||||||
<a href="javascript:;" class="collapse" data-original-title="" title=""></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body rowpadding ">
|
|
||||||
<asp:TextBox ID="TxtArchivoNomina" CssClass="ADSdropzone hidden" runat="server"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class=" text-right">
|
|
||||||
<asp:CheckBox ID="ChkRecalcularNomina" Text="¿Volver a calcular la nómina?" runat="server" />
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1434,7 +1434,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
LogicNominas lognom = new LogicNominas();
|
LogicNominas lognom = new LogicNominas();
|
||||||
|
|
||||||
string Msg = "";
|
string Msg = "";
|
||||||
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, UsuarioActual.Empresa.CvePAC);
|
Msg = lognom.TimbrarNomina(CveNomina, CvePersonal, CvePeriodo, UsuarioActual, CvePAC: UsuarioActual.Empresa.CvePAC);
|
||||||
|
|
||||||
if (Msg != null && Msg.Length > 0)
|
if (Msg != null && Msg.Length > 0)
|
||||||
{
|
{
|
||||||
@@ -1852,8 +1852,6 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
|||||||
{
|
{
|
||||||
int CveNomina = CveNominaCancelar;
|
int CveNomina = CveNominaCancelar;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (CveNomina > 0)
|
if (CveNomina > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -417,10 +417,17 @@
|
|||||||
<div class='portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom <%= clasegrid %>'>
|
<div class='portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom <%= clasegrid %>'>
|
||||||
|
|
||||||
<%--DataKeyNames="Periodo,Version CFDI,Version Nómina,UUID,UUIDs relacionados,Tipo relacion,Tipo nomina,Serie,Folio,Fecha emision,Fecha certificacion,Fecha cancelacion,Fecha pago,Fecha inicial pago,Fecha final pago,Dias pagados,RFC emisor,Razon emisor,Registro patronal,RFC receptor,Razon receptor,Fecha inicio relacion laboral,Tipo contrato,Tipo jornada,Tipo regimen,Num empleado,Antiguedad,Sindicalizado,ClaveEntFed,Banco,Cuenta bancaria,CURP,No Seguro social,Departamento,Puesto,Periodicidad pago,Salario base cot apor,Salario diario integrado,Estado"--%>
|
<%--DataKeyNames="Periodo,Version CFDI,Version Nómina,UUID,UUIDs relacionados,Tipo relacion,Tipo nomina,Serie,Folio,Fecha emision,Fecha certificacion,Fecha cancelacion,Fecha pago,Fecha inicial pago,Fecha final pago,Dias pagados,RFC emisor,Razon emisor,Registro patronal,RFC receptor,Razon receptor,Fecha inicio relacion laboral,Tipo contrato,Tipo jornada,Tipo regimen,Num empleado,Antiguedad,Sindicalizado,ClaveEntFed,Banco,Cuenta bancaria,CURP,No Seguro social,Departamento,Puesto,Periodicidad pago,Salario base cot apor,Salario diario integrado,Estado"--%>
|
||||||
<asp:GridView ID="GVSolicitudTimbreNominaGral" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVSolicitudTimbreNominaGral" AutoGenerateColumns="true">
|
<asp:GridView ID="GVSolicitudTimbreNominaGral" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD Widthall GVSolicitudTimbreNominaGral" OnRowDataBound="GVSolicitudTimbreNominaGral_RowDataBound" AutoGenerateColumns="true">
|
||||||
<Columns></Columns>
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton runat="server" ID="BtnCancelar" OnClick="BtnCancelar_Click" Visible="false" CssClass="btn btn-circle btn-sm btn-xs red mysmallbtn" Text="<i class='fa fa-ban'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar la nómina?" data-btn-ok-label="si" ></asp:LinkButton>
|
||||||
|
<asp:CheckBox ID="ChkC" runat="server" Visible="false" />
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
<asp:LinkButton runat="server" ID="BtnCancelarMasivo" OnClick="BtnCancelarMasivo_Click" Visible="false" CssClass="btn btn-circle btn-sm btn-xs red mysmallbtn" Text="<i class='fa fa-ban'></i> Cancelar solo en SAT" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea cancelar la nómina?" data-btn-ok-label="si" ></asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using DocumentFormat.OpenXml.Wordprocessing;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@@ -10,7 +11,7 @@ using System.Threading.Tasks;
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Web.UI.WebControls;
|
using System.Web.UI.WebControls;
|
||||||
using Extensiones;
|
using static Extensiones.ModExtensiones;
|
||||||
|
|
||||||
|
|
||||||
public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
||||||
@@ -30,7 +31,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (ViewState["fechaInicio"] == null) { return ModExtensiones.MinFecha; }
|
if (ViewState["fechaInicio"] == null) { return MinFecha; }
|
||||||
else { return ViewState["fechaInicio"].ToString().ToDate(); }
|
else { return ViewState["fechaInicio"].ToString().ToDate(); }
|
||||||
}
|
}
|
||||||
set { ViewState["fechaInicio"] = value; }
|
set { ViewState["fechaInicio"] = value; }
|
||||||
@@ -39,7 +40,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (ViewState["fechaFin"] == null) { return ModExtensiones.MaxFecha; }
|
if (ViewState["fechaFin"] == null) { return MaxFecha; }
|
||||||
else { return ViewState["fechaFin"].ToString().ToDate(); }
|
else { return ViewState["fechaFin"].ToString().ToDate(); }
|
||||||
}
|
}
|
||||||
set { ViewState["fechaFin"] = value; }
|
set { ViewState["fechaFin"] = value; }
|
||||||
@@ -155,6 +156,16 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DdlReporte.SelectedValue == "3")
|
||||||
|
{
|
||||||
|
GVSolicitudTimbreNominaGral.DataKeyNames = new string[] { "UUID", "RFCReceptor", "Total" };
|
||||||
|
BtnCancelarMasivo.Visible = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GVSolicitudTimbreNominaGral.DataKeyNames = null;
|
||||||
|
BtnCancelarMasivo.Visible = false;
|
||||||
|
}
|
||||||
|
|
||||||
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero());
|
nom.SATSolicitudTimbreNominaGral(DdlReporte.SelectedValue.ToString().ToEntero(), UsuarioActual.CveEmpresa, fechaInicio, fechaFin, DdlTipoNomina.SelectedValue.ToEntero(), DdlRegimenContratacion.SelectedValue.ToEntero());
|
||||||
GVSolicitudTimbreNominaGral.DataSource = nom.DtResultados;
|
GVSolicitudTimbreNominaGral.DataSource = nom.DtResultados;
|
||||||
@@ -221,7 +232,7 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
|||||||
//RegistraScript("$('#DModalSolicitudesNominas').modal('hide');");
|
//RegistraScript("$('#DModalSolicitudesNominas').modal('hide');");
|
||||||
RegistraScript("$('#ModalAgregarSolicitud').modal('hide');");
|
RegistraScript("$('#ModalAgregarSolicitud').modal('hide');");
|
||||||
cargasolicitudes();
|
cargasolicitudes();
|
||||||
Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", ModExtensiones.TipoMensaje.ToastInformacion);
|
Alert("se a envia la solicitud al sat, le enviaremos un correo en cuanto tengamos una respuesta", TipoMensaje.ToastInformacion);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -234,6 +245,60 @@ public partial class SAT_SolicitudesNominaSat : ClsPaginas
|
|||||||
cargasolicitudes();
|
cargasolicitudes();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void BtnCancelar_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
GridViewRow GvRow = (GridViewRow)((LinkButton)sender).NamingContainer;
|
||||||
|
string FolioFiscal = GvRow.DataKey("UUID");
|
||||||
|
string RFCReceptor = GvRow.DataKey("RFCReceptor");
|
||||||
|
decimal Total = GvRow.DataKey("Total").ToDecimal();
|
||||||
|
int CveMotivoCancelacion = 3; // no se llevó a cabo //get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimeroValor ("CveMotivoCancelacion", "CveSATMotivoCancelacion IN (2,3)").ToEntero();
|
||||||
|
|
||||||
|
Timbrado ObjTimbrado = new Timbrado();
|
||||||
|
var resultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC, 4, CveSATMotivoCancelacion: CveMotivoCancelacion);
|
||||||
|
if (resultado != null)
|
||||||
|
{
|
||||||
|
Alert("Folio Fiscal Cancelado", TipoMensaje.MsgInformacion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void BtnCancelarMasivo_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
foreach (GridViewRow GvRow in GVSolicitudTimbreNominaGral.Rows)
|
||||||
|
{
|
||||||
|
if (GvRow.FCCheckBox("ChkC").Checked)
|
||||||
|
{
|
||||||
|
string FolioFiscal = GvRow.DataKey("UUID");
|
||||||
|
string RFCReceptor = GvRow.DataKey("RFCReceptor");
|
||||||
|
decimal Total = GvRow.DataKey("Total").ToDecimal();
|
||||||
|
int CveMotivoCancelacion = 3; // no se llevó a cabo //get_GlobalDTMotivosCancelacionEmpresa(UsuarioActual.CveEmpresa).FiltroPrimeroValor ("CveMotivoCancelacion", "CveSATMotivoCancelacion IN (2,3)").ToEntero();
|
||||||
|
|
||||||
|
Timbrado ObjTimbrado = new Timbrado();
|
||||||
|
var resultado = ObjTimbrado.CFDICancelar(UsuarioActual.Empresa, FolioFiscal, Total, RFCReceptor, UsuarioActual.Empresa.RFC, 4, CveSATMotivoCancelacion: CveMotivoCancelacion);
|
||||||
|
if (resultado != null)
|
||||||
|
{
|
||||||
|
GvRow.FCCheckBox("ChkC").Checked = false;
|
||||||
|
sb.AppendFormat("UUID: {0}<br/>", FolioFiscal);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (sb.Length > 0)
|
||||||
|
{
|
||||||
|
Alert("Folios Cancelados: <br/><br/>" + sb.ToString() , TipoMensaje.MsgInformacion);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void GVSolicitudTimbreNominaGral_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||||
|
{
|
||||||
|
//solo cuando es vista por recibo, y que no esté en sig
|
||||||
|
if (DdlReporte.SelectedValue == "3" && e.Row.RowType == DataControlRowType.DataRow && e.Row.DBCampo("SIG") =="NO")
|
||||||
|
{
|
||||||
|
//e.Row.FCLinkButton("BtnCancelar").Visible = true;
|
||||||
|
e.Row.FCCheckBox("ChkC").Visible = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GeneralesAPI : ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI
|
public class GeneralesAPI : ADSNetLibrary.Helpers.Conexiones.SIGAPI.BaseSIGAPI
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
|
<asp:HiddenField ID="HiddenField2" runat="server" ClientIDMode="Static" Value="0" />
|
||||||
<div>
|
<div>
|
||||||
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
|
<asp:GridView ID="GvDatos" runat="server" data-sort="true" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
DataKeyNames="CveClasificacion, CveCategoria, Clasificacion, UsoClasificacion, CuentaGasto, CuentaCostos, CuentaIngresos, IdCuentaGasto, IdCuentaCostos, IdCuentaIngresos,RequiereSerieLote,CveSATPS,SATClaveProductoServicio, RequiereAFCompra, RequiereAFInsumo, RequierePersonal, Estatus,EsAcumulador,TopVentas,TopCompras,PrecioBaseCosto,CveCuentaAsignacionGasto, CveCuentaGasto" EmptyDataText="No se encontraron Clasificaciones Registradas" ToolTip="Listado de Clasificaciones" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Clasificación">
|
<asp:TemplateField HeaderText="Clasificación">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -233,13 +233,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group input-iconright" id="DivCuentaCostos" runat="server">
|
<div class="form-group input-iconright" id="DivCuentaCostos" visible="false" runat="server">
|
||||||
<label for="<%= DdlCuentaCostos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Costos:</label>
|
<label for="<%= DdlCuentaCostos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Costos:</label>
|
||||||
<asp:DropDownList ID="DdlCuentaCostos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlCuentaCostos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="form-group input-iconright" id="DivCuentaIngresos" runat="server">
|
<div class="form-group input-iconright" id="DivCuentaIngresos" visible="false" runat="server">
|
||||||
<label for="<%= DdlCuentaIngresos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Ingresos:</label>
|
<label for="<%= DdlCuentaIngresos.ClientID.ToString()%>" style="color: #888888; font-size: 13px;">Cuenta Ingresos:</label>
|
||||||
<asp:DropDownList ID="DdlCuentaIngresos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
|
<asp:DropDownList ID="DdlCuentaIngresos" CssClass="form-control input-sm js-cuenta-programmatic" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" Width="340px"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -109,25 +109,15 @@ Partial Class CatClasificaciones
|
|||||||
End If
|
End If
|
||||||
UpModalClasif.Update()
|
UpModalClasif.Update()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 1 Then
|
|
||||||
|
|
||||||
''COMENTADO DF 30 JUNIO 2017
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
'Dim Cuenta As New ClsContPAQi(UsuarioActual.Empresa)
|
DivCuentaIngresos.Visible = False
|
||||||
'If Cuenta.GetCuentas(-1, "-1", 1, 20000) Then
|
DivCuentaCostos.Visible = False
|
||||||
' DtCuentas = Cuenta.DtResultados
|
'DivCuentaGasto.Visible = False
|
||||||
'End If
|
|
||||||
'Cuenta.Dispose()
|
|
||||||
Else
|
|
||||||
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
|
||||||
DivCuentaIngresos.Visible = False
|
|
||||||
DivCuentaCostos.Visible = False
|
|
||||||
DivCuentaGasto.Visible = False
|
|
||||||
|
|
||||||
GvDatos.Columns(1).Visible = False
|
|
||||||
GvDatos.Columns(2).Visible = False
|
|
||||||
GvDatos.Columns(3).Visible = False
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
' GvDatos.Columns(1).Visible = False
|
||||||
|
GvDatos.Columns(2).Visible = False
|
||||||
|
GvDatos.Columns(3).Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
DdlCuentaGasto.Items.Insert(0, New ListItem("-", "-1"))
|
DdlCuentaGasto.Items.Insert(0, New ListItem("-", "-1"))
|
||||||
@@ -174,6 +164,7 @@ Partial Class CatClasificaciones
|
|||||||
If DdlCuentaCostos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(69, UsuarioActual.CveEmpresa, DdlCuentaCostos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
If DdlCuentaCostos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(69, UsuarioActual.CveEmpresa, DdlCuentaCostos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||||
If DdlCuentaIngresos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(4, UsuarioActual.CveEmpresa, DdlCuentaIngresos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
If DdlCuentaIngresos.SelectedValue.ToEntero > 0 Then objConta.AddCuentasAsignaciones(4, UsuarioActual.CveEmpresa, DdlCuentaIngresos.SelectedValue.ToEntero, CveClasificacion:=ObjClasificaciones.CveClasificacion)
|
||||||
End If
|
End If
|
||||||
|
ObjClasificaciones.Commit()
|
||||||
TxtClasificacion.Text = ""
|
TxtClasificacion.Text = ""
|
||||||
TxtPrecioBaseCosto.Text = ""
|
TxtPrecioBaseCosto.Text = ""
|
||||||
DdlCuentaGasto.SelectedValueExist("0")
|
DdlCuentaGasto.SelectedValueExist("0")
|
||||||
@@ -181,6 +172,9 @@ Partial Class CatClasificaciones
|
|||||||
DdlCuentaIngresos.SelectedValueExist("0")
|
DdlCuentaIngresos.SelectedValueExist("0")
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "ModalClasificaciones"))
|
||||||
Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La nueva Clasificación se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al agregar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
|
ObjClasificaciones.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ElseIf HdnModalidadClasificacion.Value = "U" Then
|
ElseIf HdnModalidadClasificacion.Value = "U" Then
|
||||||
@@ -226,14 +220,12 @@ Partial Class CatClasificaciones
|
|||||||
|
|
||||||
DdlCuentaGasto.DataValueField = "CveCuenta"
|
DdlCuentaGasto.DataValueField = "CveCuenta"
|
||||||
DdlCuentaGasto.DataTextField = "Cuenta"
|
DdlCuentaGasto.DataTextField = "Cuenta"
|
||||||
Dim ObjContabilidad As New ClsContabilidad
|
|
||||||
If ObjContabilidad.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
DtCuentasContables = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa, Afectable:=1)
|
||||||
DtCuentasContables = ObjContabilidad.DtResultados
|
'Cuenta, CtaCodigo
|
||||||
'Cuenta, CtaCodigo
|
DtCuentasContables.Columns("CtaCodigo").ColumnName = "Cuenta"
|
||||||
DtCuentasContables.Columns("CtaCodigo").ColumnName = "Cuenta"
|
|
||||||
End If
|
ElseIf UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
ObjContabilidad.Dispose()
|
|
||||||
ElseIf UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
|
||||||
|
|
||||||
Dim ObjEmpresa As New ClsSisEmpresas
|
Dim ObjEmpresa As New ClsSisEmpresas
|
||||||
Dim Empresa As Empresa = Nothing
|
Dim Empresa As Empresa = Nothing
|
||||||
@@ -319,7 +311,7 @@ Partial Class CatClasificaciones
|
|||||||
If e.Row.DBCampo("CuentaIngresos") = "Seleccione" Or e.Row.DBCampo("CuentaIngresos") = "" Then e.Row.FCLabel("LtlCuentaIngresos").Text = "-"
|
If e.Row.DBCampo("CuentaIngresos") = "Seleccione" Or e.Row.DBCampo("CuentaIngresos") = "" Then e.Row.FCLabel("LtlCuentaIngresos").Text = "-"
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
|
|
||||||
If UsuarioActual.Empresa.UsaContabilidad Then
|
If UsuarioActual.CveEmpresa.Contiene(13, 83) Then
|
||||||
e.Row.FCLabel("LtlClasificacion").Text = String.Format("<a Class='Texto' href='/Ventas/CatClasificacionesDetalle.aspx?CveClasificacion={0}'>{1}</a>", e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("Clasificacion"))
|
e.Row.FCLabel("LtlClasificacion").Text = String.Format("<a Class='Texto' href='/Ventas/CatClasificacionesDetalle.aspx?CveClasificacion={0}'>{1}</a>", e.Row.DBCampo("CveClasificacion"), e.Row.DBCampo("Clasificacion"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -328,18 +320,15 @@ Partial Class CatClasificaciones
|
|||||||
|
|
||||||
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
Protected Sub GvDatos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvDatos.RowDeleting
|
||||||
Dim ObjClasificaciones As New ClsClasificaciones
|
Dim ObjClasificaciones As New ClsClasificaciones
|
||||||
|
|
||||||
If ObjClasificaciones.RemoveClasificacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
If ObjClasificaciones.RemoveClasificacion(GvDatos.DataKeys(e.RowIndex).Value.ToString.ToEntero) Then
|
||||||
GvDatos.EditIndex = -1
|
GvDatos.EditIndex = -1
|
||||||
ViewState("DTClasificaciones") = ObjClasificaciones.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
|
||||||
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTClasificaciones(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
CargaDatos()
|
||||||
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La Clasificación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al eliminar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al eliminar la clasificación. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjClasificaciones.Dispose()
|
ObjClasificaciones.Dispose()
|
||||||
CargaGrid()
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -420,7 +409,14 @@ Partial Class CatClasificaciones
|
|||||||
If CuentaGasto.Length > 1 And CargaGastos Then
|
If CuentaGasto.Length > 1 And CargaGastos Then
|
||||||
DdlCuentaGasto.Items.Insert(0, New ListItem(CuentaGasto, CveCuentaGastoActual.ToString))
|
DdlCuentaGasto.Items.Insert(0, New ListItem(CuentaGasto, CveCuentaGastoActual.ToString))
|
||||||
DdlCuentaGasto.SelectedIndex = 0
|
DdlCuentaGasto.SelectedIndex = 0
|
||||||
CargaGastos = False
|
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
|
DdlCuentaGasto.Items.Clear() : DdlCuentaGasto.Items.Add(New ListItem("-", "-1"))
|
||||||
|
'DdlCuentaGasto.Text = ""
|
||||||
|
DdlCuentaGasto.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa, Afectable:=1) : DdlCuentaGasto.DataBind()
|
||||||
|
DdlCuentaGasto.SelectedValueExist(GvRow.DataKey("CveCuentaGasto"))
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
DdlCuentaGasto.SelectedValueExist(CveCuentaGastoActual)
|
DdlCuentaGasto.SelectedValueExist(CveCuentaGastoActual)
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user