-- timbrado nómina 4.0
This commit is contained in:
@@ -28,7 +28,7 @@ Public Class LogicNominas
|
||||
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero()
|
||||
ObjFactura.Serie = cfdi.Comprobante.Serie
|
||||
ObjFactura.Timbre = cfdi
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC, False) Then
|
||||
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura, CvePAC) Then
|
||||
Retorno = ObjTimbrado.MensajeErrorCFDI
|
||||
End If
|
||||
End If
|
||||
@@ -175,7 +175,7 @@ Public Class LogicNominas
|
||||
If continuar AndAlso objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa) AndAlso objPersonal.DtResultados.Rows.Count > 0 Then
|
||||
RFC = objPersonal.RFC
|
||||
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
|
||||
NombreCompleto = objPersonal.NombreCompleto
|
||||
NombreCompleto = String.Format("{0} {1} {2}", objPersonal.Nombres, objPersonal.APaterno, objPersonal.AMaterno)
|
||||
CodigoPostal = objPersonal.CP
|
||||
Sindicalizado = objPersonal.DtResultados.Rows(0)("Sindicalizado").ToString().ToUpper().Contiene("TRUE", "1")
|
||||
CURP = objPersonal.CURP
|
||||
@@ -318,7 +318,8 @@ Public Class LogicNominas
|
||||
cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP
|
||||
End If
|
||||
cfdi.Nomina.CveNomina = CveNomina
|
||||
cfdi.Receptor.UsoCFDI = "P01"
|
||||
|
||||
cfdi.Receptor.UsoCFDI = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "CN01", "P01")
|
||||
cfdi.Receptor.RFC = RFC
|
||||
cfdi.Receptor.Nombre = NombreCompleto
|
||||
|
||||
@@ -426,7 +427,7 @@ Public Class LogicNominas
|
||||
If ObjDeducciones IsNot Nothing AndAlso ObjDeducciones.Count > 0 Then cfdi.Nomina.Deducciones = ObjDeducciones
|
||||
|
||||
|
||||
cfdi.Comprobante.Version = "3.3"
|
||||
cfdi.Comprobante.Version = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "4.0", "3.3")
|
||||
cfdi.Comprobante.Serie = Serie
|
||||
cfdi.Comprobante.Folio = Folio
|
||||
cfdi.Comprobante.Fecha = Now
|
||||
@@ -439,7 +440,7 @@ Public Class LogicNominas
|
||||
cfdi.Comprobante.TipoDocto = "Egs"
|
||||
cfdi.Comprobante.MetodoPago = "PUE"
|
||||
cfdi.Comprobante.CondicionesdePago = "" '"CONTADO"
|
||||
cfdi.Comprobante.FormadePago = "99"
|
||||
cfdi.Comprobante.FormadePago = If(UsuarioActual.Empresa.Funcionalidad(350).Contiene("1"), "", "99")
|
||||
cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString() ' AHORITA SOLO SE REQUIERE ESPECIFICAR EL CODIGO POSTAL
|
||||
cfdi.Comprobante.NumCuentaPago = "" 'objPersonal.BancoNumCuenta
|
||||
'4.0
|
||||
@@ -466,7 +467,7 @@ Public Class LogicNominas
|
||||
cfdi.Nomina.Receptor.Sindicalizado = If(Sindicalizado, "Si", "No")
|
||||
cfdi.Nomina.Receptor.CodigoEntidadFederativa = ClaveEstado
|
||||
|
||||
cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.Subtotal, .Importe = cfdi.Comprobante.Subtotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal()})
|
||||
cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Comprobante.SubTotal, .Importe = cfdi.Comprobante.SubTotal, .Descuento = cfdi.Nomina.TotalDeducciones.ToString().ToDecimal(), .ObjetoImpuesto = "01"})
|
||||
|
||||
|
||||
If continuar Then
|
||||
|
||||
@@ -1192,7 +1192,7 @@ Public Class Timbrado
|
||||
Return Timbre
|
||||
|
||||
End Function
|
||||
Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1, Optional NomUsaPac4 As Boolean = True) As Boolean
|
||||
Public Function TimbrarFactura(UsuarioActual As Usuario, Ventas As Modelos.Factura, Optional CvePACEspecial As Integer = -1) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
Dim tCvePAC As Integer = UsuarioActual.Empresa.CvePAC
|
||||
@@ -1228,7 +1228,7 @@ Public Class Timbrado
|
||||
Retorno = If(Ret = "", True, False)
|
||||
|
||||
Case 3
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Retorno = TimbrarFacturaProFactV40(UsuarioActual, Ventas)
|
||||
Else
|
||||
Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas)
|
||||
@@ -1236,7 +1236,7 @@ Public Class Timbrado
|
||||
|
||||
'Retorno = TimbrarFacturaProFact(UsuarioActual, Ventas, TmpDTConceptos, TmpDTImpuestos, TmpDTComplementos, Ruta, LstFordASN, FordGSDBM, ObjV)
|
||||
Case 4
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
Retorno = If(Ret = "", True, False)
|
||||
@@ -1248,7 +1248,7 @@ Public Class Timbrado
|
||||
|
||||
|
||||
Case 5
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" AndAlso NomUsaPac4 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
Dim Ret As String = TimbrarFacturaPADEv40(Ventas, UsuarioActual, CvePACEspecial)
|
||||
If Ret <> "" Then MensajeErrorCFDI = Ret
|
||||
Retorno = If(Ret = "", True, False)
|
||||
|
||||
Reference in New Issue
Block a user