Visualizar intermediario en formato de complemento de pago de VSH
This commit is contained in:
@@ -7321,6 +7321,7 @@ Public Class ClsPaginas
|
|||||||
Dim Importe = ""
|
Dim Importe = ""
|
||||||
Dim TotalLetra = ""
|
Dim TotalLetra = ""
|
||||||
Dim FechaRecibo = ""
|
Dim FechaRecibo = ""
|
||||||
|
Dim ProveedorIntermediario As String = ""
|
||||||
Dim RegimenFiscalCodigo As String = ""
|
Dim RegimenFiscalCodigo As String = ""
|
||||||
Dim CFDIVersion As String = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3")
|
Dim CFDIVersion As String = If(UsuarioActual.Empresa.Funcionalidad(350) = "1", "4.0", "3.3")
|
||||||
|
|
||||||
@@ -7385,6 +7386,7 @@ Public Class ClsPaginas
|
|||||||
CveCliente = ObjBancos.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero
|
CveCliente = ObjBancos.DtResultados.FiltroPrimeroValor("CveCliente").ToEntero
|
||||||
CveMoneda = ObjBancos.DtResultados.FiltroPrimeroValor("CveMoneda").ToEntero
|
CveMoneda = ObjBancos.DtResultados.FiltroPrimeroValor("CveMoneda").ToEntero
|
||||||
FechaComprobante = ObjBancos.DtResultados.FiltroPrimeroValor("Fecha").ToDate
|
FechaComprobante = ObjBancos.DtResultados.FiltroPrimeroValor("Fecha").ToDate
|
||||||
|
ProveedorIntermediario = ObjBancos.DtResultados.FiltroPrimeroValor("ProveedorIntermediario")
|
||||||
SerieFolio = $"{Serie}-{Folio}"
|
SerieFolio = $"{Serie}-{Folio}"
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
@@ -7628,6 +7630,11 @@ Public Class ClsPaginas
|
|||||||
Else
|
Else
|
||||||
params.Add(New ReportParameter("LogoPath", ""))
|
params.Add(New ReportParameter("LogoPath", ""))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 145 Then
|
||||||
|
params.Add(New ReportParameter("ProveedorIntermediario", ProveedorIntermediario))
|
||||||
|
End If
|
||||||
|
|
||||||
If File.Exists($"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc") Then
|
If File.Exists($"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc") Then
|
||||||
rutaArchivo = $"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc"
|
rutaArchivo = $"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc"
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1,176 +1,176 @@
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Public Class Timbres
|
Public Class Timbres
|
||||||
Private _MsgError As StringBuilder
|
Private _MsgError As StringBuilder
|
||||||
Private _MensajeAlert As StringBuilder
|
Private _MensajeAlert As StringBuilder
|
||||||
Public Property TieneError As Boolean
|
Public Property TieneError As Boolean
|
||||||
Public ReadOnly Property MsgError As String
|
Public ReadOnly Property MsgError As String
|
||||||
Get
|
Get
|
||||||
Return _MsgError.ToString
|
Return _MsgError.ToString
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property MensajeAlert As String
|
Public ReadOnly Property MensajeAlert As String
|
||||||
Get
|
Get
|
||||||
Return _MensajeAlert.ToString
|
Return _MensajeAlert.ToString
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property CveMovimiento As Integer
|
Private Property CveMovimiento As Integer
|
||||||
Private Property UsuarioActual As Usuario
|
Private Property UsuarioActual As Usuario
|
||||||
Private Property AplicaCP As Boolean
|
Private Property AplicaCP As Boolean
|
||||||
Private Property FechaSalida As Date
|
Private Property FechaSalida As Date
|
||||||
Private Property Serie As String
|
Private Property Serie As String
|
||||||
Private Property Folio As Integer
|
Private Property Folio As Integer
|
||||||
Private Property CveTimbre As Integer
|
Private Property CveTimbre As Integer
|
||||||
|
|
||||||
Private Property CPCliente As Integer
|
Private Property CPCliente As Integer
|
||||||
Public Property ObjFactura As Modelos.Factura
|
Public Property ObjFactura As Modelos.Factura
|
||||||
|
|
||||||
Public Sub New()
|
Public Sub New()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub New(TipoDocto As String, tCveTimbre As Integer, tUsuarioActual As Usuario)
|
Public Sub New(TipoDocto As String, tCveTimbre As Integer, tUsuarioActual As Usuario)
|
||||||
_MsgError = New StringBuilder
|
_MsgError = New StringBuilder
|
||||||
UsuarioActual = tUsuarioActual
|
UsuarioActual = tUsuarioActual
|
||||||
CveTimbre = tCveTimbre
|
CveTimbre = tCveTimbre
|
||||||
CreaObjetosTraslados(TipoDocto, tCveTimbre)
|
CreaObjetosTraslados(TipoDocto, tCveTimbre)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
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"
|
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
|
||||||
'ObjFactura.TipoCambio = 1
|
'ObjFactura.TipoCambio = 1
|
||||||
ObjFactura.ConvertirPesos = False
|
ObjFactura.ConvertirPesos = False
|
||||||
ObjFactura.CveMoneda = 1
|
ObjFactura.CveMoneda = 1
|
||||||
ObjFactura.Moneda = "XXX"
|
ObjFactura.Moneda = "XXX"
|
||||||
ObjFactura.MonedaSAT = "XXX"
|
ObjFactura.MonedaSAT = "XXX"
|
||||||
ObjFactura.MonedaAbreviatura = "XXX"
|
ObjFactura.MonedaAbreviatura = "XXX"
|
||||||
ObjFactura.TipoDocto = TipoDocto
|
ObjFactura.TipoDocto = TipoDocto
|
||||||
ObjFactura.TipoComprobante = "T"
|
ObjFactura.TipoComprobante = "T"
|
||||||
|
|
||||||
ObjFactura.Fecha = Now
|
ObjFactura.Fecha = Now
|
||||||
ObjFactura.FechaPago = Now
|
ObjFactura.FechaPago = Now
|
||||||
ObjFactura.FechaEjecucion = Now
|
ObjFactura.FechaEjecucion = Now
|
||||||
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
ObjFactura.UsuarioCreo = UsuarioActual.Usuario
|
||||||
ObjFactura.TipoDocumento = "Traspaso"
|
ObjFactura.TipoDocumento = "Traspaso"
|
||||||
|
|
||||||
|
|
||||||
ObjFactura.RFCReceptor = "XAXX010101000" ' RFC empresa traslado , si es entrega RFC Cliente
|
ObjFactura.RFCReceptor = "XAXX010101000" ' RFC empresa traslado , si es entrega RFC Cliente
|
||||||
|
|
||||||
ObjFactura.Inv_CveMovimiento = CveMovimiento
|
ObjFactura.Inv_CveMovimiento = CveMovimiento
|
||||||
ObjFactura.CveTimbre = CveTimbre
|
ObjFactura.CveTimbre = CveTimbre
|
||||||
|
|
||||||
If CveTimbre > 0 AndAlso ObjFactura.TipoComprobante = "T" Then
|
If CveTimbre > 0 AndAlso ObjFactura.TipoComprobante = "T" Then
|
||||||
|
|
||||||
ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
|
ObjFactura.Timbre = PreParaTimbreCartaPorte(ObjFactura)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
|
Private Function PreParaTimbreCartaPorte(Obj As Modelos.Factura) As CFDITimbre
|
||||||
Dim Timbre As New CFDITimbre
|
Dim Timbre As New CFDITimbre
|
||||||
Timbre.Comprobante.TipoComprobante = "T"
|
Timbre.Comprobante.TipoComprobante = "T"
|
||||||
Timbre.Comprobante.Fecha = Obj.Fecha
|
Timbre.Comprobante.Fecha = Obj.Fecha
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||||
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
Timbre.Comprobante.SubTotal = Obj.SubTotal
|
||||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||||
Timbre.Comprobante.Moneda = "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 = "S01"
|
Timbre.Receptor.UsoCFDI = "S01"
|
||||||
If ObjFactura.Version = "3.3" Then Timbre.Receptor.UsoCFDI = "P01"
|
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
|
||||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
Dim totRetIVA As Decimal = Obj.RetIVA
|
||||||
Dim totRetISR As Decimal = Obj.RetISR
|
Dim totRetISR As Decimal = Obj.RetISR
|
||||||
Dim i As Integer = 1
|
Dim i As Integer = 1
|
||||||
|
|
||||||
|
|
||||||
Timbre.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
|
Timbre.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
|
||||||
|
|
||||||
|
|
||||||
'DETALLES
|
'DETALLES
|
||||||
Dim tPS As String = ""
|
Dim tPS As String = ""
|
||||||
|
|
||||||
Dim CartaPorte As New CFDICartaPorte
|
Dim CartaPorte As New CFDICartaPorte
|
||||||
CartaPorte.TranspInternac = "No"
|
CartaPorte.TranspInternac = "No"
|
||||||
CartaPorte.EntradaSalidaMercancia = ""
|
CartaPorte.EntradaSalidaMercancia = ""
|
||||||
CartaPorte.ViaEntradaSalida = ""
|
CartaPorte.ViaEntradaSalida = ""
|
||||||
|
|
||||||
CartaPorte.Mercancias.UnidadPeso = "KGM"
|
CartaPorte.Mercancias.UnidadPeso = "KGM"
|
||||||
CartaPorte.Mercancias.CargoporTasacion = 0
|
CartaPorte.Mercancias.CargoporTasacion = 0
|
||||||
|
|
||||||
Dim FI As Date = New Date(1900, 1, 1)
|
Dim FI As Date = New Date(1900, 1, 1)
|
||||||
Dim FF As Date = New Date(9999, 1, 1)
|
Dim FF As Date = New Date(9999, 1, 1)
|
||||||
|
|
||||||
Dim FechaLlegada As DateTime
|
Dim FechaLlegada As DateTime
|
||||||
Dim Distancia As Integer = 1
|
Dim Distancia As Integer = 1
|
||||||
|
|
||||||
Dim ObjGrales As New ClsGenerales
|
Dim ObjGrales As New ClsGenerales
|
||||||
|
|
||||||
If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, -1, UsuarioActual.CveEmpresa, -1) Then
|
If ObjGrales.GetGralTimbre(CveTimbre, Obj.TipoDocto, FI, FF, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
|
||||||
If ObjGrales.DtResultados.Rows.Count = 1 Then
|
If ObjGrales.DtResultados.Rows.Count = 1 Then
|
||||||
Dim DtMovimientos As DataTable = Nothing
|
Dim DtMovimientos As DataTable = Nothing
|
||||||
Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
|
Dim drT As DataRow = ObjGrales.DtResultados.Rows(0)
|
||||||
|
|
||||||
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("DomicilioFiscalReceptor").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
|
||||||
FechaSalida = drT("FechaEntrega").ToString.ToDateTime
|
FechaSalida = drT("FechaEntrega").ToString.ToDateTime
|
||||||
FechaLlegada = drT("FechaLlegada").ToString.ToDateTime
|
FechaLlegada = drT("FechaLlegada").ToString.ToDateTime
|
||||||
Distancia = drT("Distancia").ToString.ToEntero
|
Distancia = drT("Distancia").ToString.ToEntero
|
||||||
|
|
||||||
ObjFactura.Folio = drT("Folio").ToString.ToEntero
|
ObjFactura.Folio = drT("Folio").ToString.ToEntero
|
||||||
ObjFactura.Serie = drT("Serie").ToString
|
ObjFactura.Serie = drT("Serie").ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
|
|
||||||
If drT("FolioFiscalRelacionado").ToString <> "" Then
|
If drT("FolioFiscalRelacionado").ToString <> "" Then
|
||||||
|
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "05"
|
Timbre.CFDIRelacionados.TipoRelacion = "05"
|
||||||
Timbre.CFDIRelacionados.UUID.Add(drT("FolioFiscalRelacionado").ToString)
|
Timbre.CFDIRelacionados.UUID.Add(drT("FolioFiscalRelacionado").ToString)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
||||||
DtMovimientos = ObjGrales.DtResultados
|
DtMovimientos = ObjGrales.DtResultados
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
_MsgError.AppendLine("Error al obtener Movimientos")
|
_MsgError.AppendLine("Error al obtener Movimientos")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjFactura.DtDetalle = DtMovimientos
|
ObjFactura.DtDetalle = DtMovimientos
|
||||||
|
|
||||||
AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
|
AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
|
||||||
|
|
||||||
ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
|
ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
|
||||||
|
|
||||||
ObjFactura.SetSubProyecto()
|
ObjFactura.SetSubProyecto()
|
||||||
ObjFactura.SetSubProyectoMatriz()
|
ObjFactura.SetSubProyectoMatriz()
|
||||||
|
|
||||||
If AplicaCP Then
|
If AplicaCP Then
|
||||||
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PermisoSCT = drT("ClaveTipoPermisoSCT").ToString '"TPAF01"
|
CartaPorte.FiguraTransporte.AutoTransporte.PermisoSCT = drT("ClaveTipoPermisoSCT").ToString '"TPAF01"
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
|
||||||
|
|
||||||
If Obj.DtDetalle IsNot Nothing AndAlso Obj.DtDetalle.Rows.Count > 0 Then
|
If Obj.DtDetalle IsNot Nothing AndAlso Obj.DtDetalle.Rows.Count > 0 Then
|
||||||
If Obj.DtDetalle.MAX("ClaveMaterialPeligroso") <> "" Then
|
If Obj.DtDetalle.MAX("ClaveMaterialPeligroso") <> "" Then
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
|
||||||
@@ -178,43 +178,43 @@ Public Class Timbres
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
||||||
|
|
||||||
If drT("ClaveTipoRemolque1").ToString <> "" Then
|
If drT("ClaveTipoRemolque1").ToString <> "" Then
|
||||||
Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")}
|
Dim Rem1 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque1"), .Placa = drT("PlacaRemolque1")}
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1)
|
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem1)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If drT("ClaveTipoRemolque2").ToString <> "" Then
|
If drT("ClaveTipoRemolque2").ToString <> "" Then
|
||||||
Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")}
|
Dim Rem2 As New CFDICartaPorteRemolque With {.SubTipoRemolque = drT("ClaveTipoRemolque2"), .Placa = drT("PlacaRemolque2")}
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
|
CartaPorte.FiguraTransporte.AutoTransporte.Remolques.Add(Rem2)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
Dim DomOrigen As CFDICartaPorteDomicilio = Nothing
|
||||||
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
|
DomOrigen = New CFDICartaPorteDomicilio With {.Calle = drT("DirOriCalle").ToString,
|
||||||
.Colonia = drT("DirOriClaveSATColonia").ToString,
|
.Colonia = drT("DirOriClaveSATColonia").ToString,
|
||||||
.CP = drT("DirOriCP").ToString,
|
.CP = drT("DirOriCP").ToString,
|
||||||
.Estado = drT("DirOriClaveSATEstado").ToString,
|
.Estado = drT("DirOriClaveSATEstado").ToString,
|
||||||
.Pais = drT("DirOriClaveSATPais").ToString,
|
.Pais = drT("DirOriClaveSATPais").ToString,
|
||||||
.Municipio = drT("DIrOriClaveSATMunicipio").ToString,
|
.Municipio = drT("DIrOriClaveSATMunicipio").ToString,
|
||||||
.Localidad = drT("DirOriClaveSATLocalidad").ToString}
|
.Localidad = drT("DirOriClaveSATLocalidad").ToString}
|
||||||
|
|
||||||
Dim DomDestino As CFDICartaPorteDomicilio = Nothing
|
Dim DomDestino As CFDICartaPorteDomicilio = Nothing
|
||||||
|
|
||||||
|
|
||||||
DomDestino = New CFDICartaPorteDomicilio With {.Calle = drT("DirDesCalle").ToString,
|
DomDestino = New CFDICartaPorteDomicilio With {.Calle = drT("DirDesCalle").ToString,
|
||||||
.Colonia = drT("DirDesClaveSATColonia").ToString,
|
.Colonia = drT("DirDesClaveSATColonia").ToString,
|
||||||
.CP = drT("DirDesCP").ToString,
|
.CP = drT("DirDesCP").ToString,
|
||||||
.Estado = drT("DirDesClaveSATEstado").ToString,
|
.Estado = drT("DirDesClaveSATEstado").ToString,
|
||||||
.Pais = drT("DirDesClaveSATPais").ToString,
|
.Pais = drT("DirDesClaveSATPais").ToString,
|
||||||
.Municipio = drT("DirDesClaveSATMunicipio").ToString,
|
.Municipio = drT("DirDesClaveSATMunicipio").ToString,
|
||||||
.Localidad = drT("DirDesClaveSATLocalidad").ToString}
|
.Localidad = drT("DirDesClaveSATLocalidad").ToString}
|
||||||
|
|
||||||
Dim NumRegIdTrib As String = ""
|
Dim NumRegIdTrib As String = ""
|
||||||
Dim ResidenciaFiscal As String = ""
|
Dim ResidenciaFiscal As String = ""
|
||||||
If drT("DestinatarioRFC").ToString.Contiene("XEXX010101000") Then ' cuando es Extranjero, debe de llevar un numregidtrib
|
If drT("DestinatarioRFC").ToString.Contiene("XEXX010101000") Then ' cuando es Extranjero, debe de llevar un numregidtrib
|
||||||
ResidenciaFiscal = DomDestino.Pais
|
ResidenciaFiscal = DomDestino.Pais
|
||||||
@@ -324,62 +324,62 @@ Public Class Timbres
|
|||||||
'' T R A S L A D O S
|
'' T R A S L A D O S
|
||||||
|
|
||||||
'DETALLES
|
'DETALLES
|
||||||
If Obj.DtDetalle IsNot Nothing Then
|
If Obj.DtDetalle IsNot Nothing Then
|
||||||
For Each drr As DataRow In Obj.DtDetalle.Rows
|
For Each drr As DataRow In Obj.DtDetalle.Rows
|
||||||
|
|
||||||
If drr("PS").ToString.Length = 1 Then
|
If drr("PS").ToString.Length = 1 Then
|
||||||
tPS = drr("Obs").ToString
|
tPS = drr("Obs").ToString
|
||||||
Else
|
Else
|
||||||
If drr("PS").ToString.Length = 0 Then
|
If drr("PS").ToString.Length = 0 Then
|
||||||
tPS = ""
|
tPS = ""
|
||||||
Else
|
Else
|
||||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'CONDICIONANTE, ESPECIAL
|
'CONDICIONANTE, ESPECIAL
|
||||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" 'LES COMENTAN QUE NO DEBE IR LA ETIQUETA DE LA UNIDAD EN EL PRODUCTO
|
||||||
|
|
||||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||||
.Descripcion = tPS,
|
.Descripcion = tPS,
|
||||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
.Descuento = drr("Descuento").ToString.ToDecimal,
|
||||||
.Unidad = drr("UM").ToString,
|
.Unidad = drr("UM").ToString,
|
||||||
.ClaveUnidad = drr("SATClaveUM").ToString,
|
.ClaveUnidad = drr("SATClaveUM").ToString,
|
||||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||||
.CuentaPredial = "",
|
.CuentaPredial = "",
|
||||||
.ObjetoImpuesto = "01"}
|
.ObjetoImpuesto = "01"}
|
||||||
'VERIFICA SUMA SUBTOTALES
|
'VERIFICA SUMA SUBTOTALES
|
||||||
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
|
||||||
concepto.Importe = totSubTotal
|
concepto.Importe = totSubTotal
|
||||||
End If
|
End If
|
||||||
totSubTotal = totSubTotal - concepto.Importe
|
totSubTotal = totSubTotal - concepto.Importe
|
||||||
|
|
||||||
Timbre.Conceptos.Add(concepto)
|
Timbre.Conceptos.Add(concepto)
|
||||||
i += 1
|
i += 1
|
||||||
Next
|
Next
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
_MsgError.AppendLine("timbrado son detalle de productos")
|
_MsgError.AppendLine("timbrado son detalle de productos")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
TieneError = True
|
TieneError = True
|
||||||
_MsgError.AppendLine("Consultar datos de timbrado")
|
_MsgError.AppendLine("Consultar datos de timbrado")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjGrales.Dispose()
|
ObjGrales.Dispose()
|
||||||
Else
|
Else
|
||||||
Timbre = Nothing
|
Timbre = Nothing
|
||||||
_MsgError.AppendLine("Consultar datos de timbrado")
|
_MsgError.AppendLine("Consultar datos de timbrado")
|
||||||
End If
|
End If
|
||||||
Return Timbre
|
Return Timbre
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Class MMensajeCartaPorte
|
Public Class MMensajeCartaPorte
|
||||||
Public Property TieneError As Boolean
|
Public Property TieneError As Boolean
|
||||||
Public Property Mensaje As String
|
Public Property Mensaje As String
|
||||||
@@ -633,4 +633,4 @@ Public Class Timbres
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user