-- mejoras en timbrado 4.0 y complementos de carta porte
This commit is contained in:
@@ -3749,7 +3749,7 @@ Public Class ClsGenerales
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateTimbreTimbrado(CveTimbre As Integer, FolioFiscal As String, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
|
Public Function UpdateTimbreTimbrado(CveTimbre As Integer, FolioFiscal As String, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
|
||||||
CvePAC As Integer) As Boolean
|
CvePAC As Integer, CFDIVersion As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Gral_TimbreTimbrado")
|
DataAdapter("PA_Gral_TimbreTimbrado")
|
||||||
|
|
||||||
@@ -3759,6 +3759,7 @@ Public Class ClsGenerales
|
|||||||
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
|
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
|
||||||
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha
|
||||||
.Add("@CvePAC", SqlDbType.Int).Value = CvePAC
|
.Add("@CvePAC", SqlDbType.Int).Value = CvePAC
|
||||||
|
.Add("@CDFIVersion", SqlDbType.VarChar).Value = CFDIVersion
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -2832,7 +2832,7 @@ Public Class Timbrado
|
|||||||
Case "T"
|
Case "T"
|
||||||
|
|
||||||
Dim objGrales As New ClsGenerales
|
Dim objGrales As New ClsGenerales
|
||||||
If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC) Then
|
If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC, "3.3") Then
|
||||||
Retorno = ""
|
Retorno = ""
|
||||||
Else
|
Else
|
||||||
Retorno = "Error"
|
Retorno = "Error"
|
||||||
@@ -5658,7 +5658,7 @@ Public Class Timbrado
|
|||||||
Case "T"
|
Case "T"
|
||||||
|
|
||||||
Dim objGrales As New ClsGenerales
|
Dim objGrales As New ClsGenerales
|
||||||
If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC) 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"
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ Public Class Timbres
|
|||||||
Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
|
Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
|
||||||
ObjFactura = New Modelos.Factura
|
ObjFactura = New Modelos.Factura
|
||||||
ObjFactura.Version = "3.3"
|
ObjFactura.Version = "3.3"
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFactura.Version = "4.0"
|
||||||
|
|
||||||
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
ObjFactura.CveUsuario = UsuarioActual.CveUsuario
|
||||||
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
|
||||||
ObjFactura.UsuarioActual = UsuarioActual
|
ObjFactura.UsuarioActual = UsuarioActual
|
||||||
@@ -85,7 +87,9 @@ Public Class Timbres
|
|||||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||||
Timbre.Comprobante.Moneda = "XXX"
|
Timbre.Comprobante.Moneda = "XXX"
|
||||||
Timbre.Comprobante.TipoCambio = "" ' CONDICIÓN SI LA MONEDA ES 'XXX'
|
Timbre.Comprobante.TipoCambio = "" ' CONDICIÓN SI LA MONEDA ES 'XXX'
|
||||||
Timbre.Receptor.UsoCFDI = "P01"
|
|
||||||
|
Timbre.Receptor.UsoCFDI = "S01"
|
||||||
|
If ObjFactura.Version = "3.3" Then Timbre.Receptor.UsoCFDI = "P01"
|
||||||
|
|
||||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
Dim totSubTotal As Decimal = Obj.SubTotal
|
||||||
Dim totIVA As Decimal = Obj.IVA
|
Dim totIVA As Decimal = Obj.IVA
|
||||||
@@ -124,7 +128,7 @@ Public Class Timbres
|
|||||||
|
|
||||||
Timbre.Receptor.RFC = drT("EmpresaRFC").ToString
|
Timbre.Receptor.RFC = drT("EmpresaRFC").ToString
|
||||||
Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString
|
Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString
|
||||||
Timbre.Receptor.DomicilioFiscalReceptor = drT("DirDesCP").ToString
|
Timbre.Receptor.DomicilioFiscalReceptor = drT("DomicilioFiscalReceptor").ToString
|
||||||
Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
|
Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
|
||||||
|
|
||||||
CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
|
CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
|
||||||
@@ -261,7 +265,8 @@ Public Class Timbres
|
|||||||
.ClaveUnidad = "E48",
|
.ClaveUnidad = "E48",
|
||||||
.ClaveProdServ = "78101802",
|
.ClaveProdServ = "78101802",
|
||||||
.Noidentificacion = "",
|
.Noidentificacion = "",
|
||||||
.CuentaPredial = ""}
|
.CuentaPredial = "",
|
||||||
|
.ObjetoImpuesto = "01"}
|
||||||
|
|
||||||
Timbre.Conceptos.Add(concepto)
|
Timbre.Conceptos.Add(concepto)
|
||||||
|
|
||||||
@@ -290,7 +295,7 @@ Public Class Timbres
|
|||||||
.Embalaje = drr("ClaveEmbalaje").ToString,
|
.Embalaje = drr("ClaveEmbalaje").ToString,
|
||||||
.DescripEmbalaje = drr("Embalaje").ToString,
|
.DescripEmbalaje = drr("Embalaje").ToString,
|
||||||
.ValorMercancia = drr("PU").ToString.ToDecimal,
|
.ValorMercancia = drr("PU").ToString.ToDecimal,
|
||||||
.Moneda = "MXN", 'temporal
|
.Moneda = IIf(drr("PU").ToString.ToDecimal > 0, "MXN", ""), 'temporal
|
||||||
.FraccionArrancelaria = "",
|
.FraccionArrancelaria = "",
|
||||||
.UUIDComercioExt = ""
|
.UUIDComercioExt = ""
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
Bin/GoCfdi.dll
BIN
Bin/GoCfdi.dll
Binary file not shown.
@@ -1692,12 +1692,17 @@ Partial Class PopUpVerFactura
|
|||||||
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||||
|
|
||||||
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
Dim nodo As XmlNode = XMLDoc.DocumentElement
|
||||||
|
Dim Version = ValorXML(nodo, "version")
|
||||||
|
|
||||||
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||||
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||||
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||||
|
If Version = "3.3" Then
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/3"
|
||||||
|
Else ' se considera que es la version 4.0
|
||||||
|
cfdVer = "http://www.sat.gob.mx/cfd/4"
|
||||||
|
End If
|
||||||
|
|
||||||
If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
|
|
||||||
namespaces.AddNamespace(Prefijo, cfdVer)
|
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||||
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
|
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
|
||||||
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
|
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
|
||||||
@@ -1737,7 +1742,6 @@ Partial Class PopUpVerFactura
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", Prefijo), namespaces)
|
Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", Prefijo), namespaces)
|
||||||
|
|
||||||
Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", "cartaporte20"), namespaces)
|
Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", "cartaporte20"), namespaces)
|
||||||
|
|||||||
@@ -1268,8 +1268,6 @@ Partial Class Clientes
|
|||||||
|
|
||||||
CargaCombosComercioExterior()
|
CargaCombosComercioExterior()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaSubProyectoss()
|
Private Sub CargaSubProyectoss()
|
||||||
|
|
||||||
@@ -2478,6 +2476,25 @@ Partial Class Clientes
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||||
|
|
||||||
|
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then
|
||||||
|
|
||||||
|
Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
|
||||||
|
|
||||||
|
Alert("El Regimen fiscal del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CargaSucursal()
|
'CargaSucursal()
|
||||||
|
|||||||
Reference in New Issue
Block a user