- cambios y mejoras en carta porte
This commit is contained in:
@@ -590,7 +590,7 @@ End Class
|
|||||||
|
|
||||||
<Serializable>
|
<Serializable>
|
||||||
Public Class CFDICartaPorteAutoTransporte
|
Public Class CFDICartaPorteAutoTransporte
|
||||||
Public Property PermSCT As String = ""
|
Public Property PermisoSCT As String = ""
|
||||||
Public Property NumPermisoSCT As String = ""
|
Public Property NumPermisoSCT As String = ""
|
||||||
Public Property NombreSeguroResponsabilidadCivil As String = ""
|
Public Property NombreSeguroResponsabilidadCivil As String = ""
|
||||||
Public Property PolizaSeguroResponsabilidadCivil As String = ""
|
Public Property PolizaSeguroResponsabilidadCivil As String = ""
|
||||||
|
|||||||
@@ -2171,7 +2171,7 @@ Public Class Timbrado
|
|||||||
|
|
||||||
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
|
||||||
|
|
||||||
cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
|
||||||
|
|
||||||
cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
|
||||||
|
|
||||||
@@ -3918,8 +3918,8 @@ Public Class Timbrado
|
|||||||
|
|
||||||
ComCartaPorte.FiguraTransporte.CveTransporte = ProfactCartaPorte.c_CveTransporte.Item02
|
ComCartaPorte.FiguraTransporte.CveTransporte = ProfactCartaPorte.c_CveTransporte.Item02
|
||||||
ComCartaPorte.Mercancias.AutotransporteFederal = New ProfactCartaPorte.CartaPorteMercanciasAutotransporteFederal
|
ComCartaPorte.Mercancias.AutotransporteFederal = New ProfactCartaPorte.CartaPorteMercanciasAutotransporteFederal
|
||||||
If Carta.FiguraTransporte.AutoTransporte.PermSCT <> "" Then
|
If Carta.FiguraTransporte.AutoTransporte.PermisoSCT <> "" Then
|
||||||
ComCartaPorte.Mercancias.AutotransporteFederal.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermSCT), ProfactCartaPorte.c_TipoPermiso)
|
ComCartaPorte.Mercancias.AutotransporteFederal.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermisoSCT), ProfactCartaPorte.c_TipoPermiso)
|
||||||
End If
|
End If
|
||||||
ComCartaPorte.Mercancias.AutotransporteFederal.NumPermisoSCT = Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT
|
ComCartaPorte.Mercancias.AutotransporteFederal.NumPermisoSCT = Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT
|
||||||
'pendiente RMF
|
'pendiente RMF
|
||||||
|
|||||||
@@ -136,41 +136,46 @@ Public Class Timbres
|
|||||||
Timbre.Comprobante.Serie = Obj.Serie
|
Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
|
|
||||||
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
If drT("FolioFiscalRelacionado").ToString <> "" Then
|
||||||
DtMovimientos = ObjGrales.DtResultados
|
|
||||||
Else
|
Timbre.CFDIRelacionados.TipoRelacion = "05"
|
||||||
TieneError = True
|
Timbre.CFDIRelacionados.UUID.Add(drT("FolioFiscalRelacionado").ToString)
|
||||||
_MsgError.AppendLine("Error al obtener Movimientos")
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjFactura.DtDetalle = DtMovimientos
|
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
||||||
|
DtMovimientos = ObjGrales.DtResultados
|
||||||
|
Else
|
||||||
|
TieneError = True
|
||||||
|
_MsgError.AppendLine("Error al obtener Movimientos")
|
||||||
|
End If
|
||||||
|
|
||||||
AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
|
ObjFactura.DtDetalle = DtMovimientos
|
||||||
|
|
||||||
ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
|
AplicaCP = Boolean.Parse(drT("AplicaCP").ToString)
|
||||||
|
|
||||||
ObjFactura.SetSubProyecto()
|
ObjFactura.CveSubProyecto = drT("CveSubProyecto").ToString.ToEntero
|
||||||
ObjFactura.SetSubProyectoMatriz()
|
|
||||||
|
|
||||||
If AplicaCP Then
|
ObjFactura.SetSubProyecto()
|
||||||
|
ObjFactura.SetSubProyectoMatriz()
|
||||||
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PermSCT = drT("TipoPermisoSCT").ToString '"TPAF01"
|
If AplicaCP Then
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = drT("NumPolizaSeguroMedioAmbiente").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
|
||||||
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
|
||||||
|
|
||||||
CPCliente = drT("CPCliente").ToString.ToEntero
|
CartaPorte.FiguraTransporte.AutoTransporte.PermisoSCT = drT("ClaveTipoPermisoSCT").ToString '"TPAF01"
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.NumPermisoSCT = drT("NumPermisoSCT").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil = drT("NombreAseguradora").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil = drT("NumPolizaSeguro").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente = drT("NombreAseguradoraMedioAmbiente").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente = drT("NumPolizaSeguroMedioAmbiente").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.NombreSeguroCarga = drT("NombreAseguradoraCarga").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.PolizaSeguroCarga = drT("NumPolizaSeguroCarga").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular = drT("ConfigCartaPorte").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM = drT("Placa").ToString
|
||||||
|
CartaPorte.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM = drT("Anio").ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
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,
|
||||||
@@ -178,10 +183,10 @@ Public Class Timbres
|
|||||||
.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,
|
||||||
@@ -190,23 +195,23 @@ Public Class Timbres
|
|||||||
.Localidad = drT("DirDesClaveSATLocalidad").ToString}
|
.Localidad = drT("DirDesClaveSATLocalidad").ToString}
|
||||||
|
|
||||||
|
|
||||||
Dim Ubica As New CFDICartaPorteUbicacion
|
Dim Ubica As New CFDICartaPorteUbicacion
|
||||||
Ubica.TipoEstacion = ""
|
Ubica.TipoEstacion = ""
|
||||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC,
|
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC,
|
||||||
.FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
.FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
|
||||||
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
|
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
|
||||||
.Domicilio = DomOrigen}
|
.Domicilio = DomOrigen}
|
||||||
CartaPorte.Ubicaciones.Add(Ubica)
|
CartaPorte.Ubicaciones.Add(Ubica)
|
||||||
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = UsuarioActual.Empresa.RFC,'UsuarioActual.Empresa.RFC,'"CAMJ841219I33",
|
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Destino", .IDUbicacion = "DE000001", .RFCRemitenteDestinatario = drT("DestinatarioRFC").ToString,
|
||||||
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
|
.FechaHoraSalidaLlegada = FechaLlegada.ToString("yyyy-MM-ddTHH:mm:ss"),
|
||||||
.NombreRemitenteDestinatario = UsuarioActual.Empresa.Empresa,
|
.NombreRemitenteDestinatario = drT("DestinatarioNombre").ToString,
|
||||||
.Domicilio = DomDestino,
|
.Domicilio = DomDestino,
|
||||||
.DistanciaRecorrida = Distancia}
|
.DistanciaRecorrida = Distancia}
|
||||||
|
|
||||||
CartaPorte.Ubicaciones.Add(Ubica)
|
CartaPorte.Ubicaciones.Add(Ubica)
|
||||||
CartaPorte.FiguraTransporte.ClaveTransporte = "01"
|
CartaPorte.FiguraTransporte.ClaveTransporte = "01"
|
||||||
|
|
||||||
Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString,
|
Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString,
|
||||||
.NumeroExterior = drT("FiguraNumeroExterior").ToString,
|
.NumeroExterior = drT("FiguraNumeroExterior").ToString,
|
||||||
.NumeroInterior = drT("FiguraNumeroInterior").ToString,
|
.NumeroInterior = drT("FiguraNumeroInterior").ToString,
|
||||||
.Colonia = drT("FiguraClaveSATColonia").ToString,
|
.Colonia = drT("FiguraClaveSATColonia").ToString,
|
||||||
@@ -216,7 +221,7 @@ Public Class Timbres
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
|
CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
|
||||||
.RFCFigura = drT("FiguraRFC").ToString,
|
.RFCFigura = drT("FiguraRFC").ToString,
|
||||||
.NombreFigura = drT("FiguraChofer").ToString,
|
.NombreFigura = drT("FiguraChofer").ToString,
|
||||||
.NumLicencia = drT("FiguraLicencia").ToString,
|
.NumLicencia = drT("FiguraLicencia").ToString,
|
||||||
@@ -225,8 +230,8 @@ Public Class Timbres
|
|||||||
.Domicilio = DomicilioOperador})
|
.Domicilio = DomicilioOperador})
|
||||||
|
|
||||||
|
|
||||||
'concepto único
|
'concepto único
|
||||||
Dim concepto As New CFDIConceptos With {.Cantidad = 1,
|
Dim concepto As New CFDIConceptos With {.Cantidad = 1,
|
||||||
.Descripcion = "Flete",
|
.Descripcion = "Flete",
|
||||||
.ValorUnitario = 0,
|
.ValorUnitario = 0,
|
||||||
.Importe = 0,
|
.Importe = 0,
|
||||||
@@ -237,20 +242,20 @@ Public Class Timbres
|
|||||||
.Noidentificacion = "",
|
.Noidentificacion = "",
|
||||||
.CuentaPredial = ""}
|
.CuentaPredial = ""}
|
||||||
|
|
||||||
Timbre.Conceptos.Add(concepto)
|
Timbre.Conceptos.Add(concepto)
|
||||||
|
|
||||||
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
|
|
||||||
If drr("PS").ToString.Length = 0 Then
|
|
||||||
tPS = ""
|
|
||||||
Else
|
Else
|
||||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
If drr("PS").ToString.Length = 0 Then
|
||||||
|
tPS = ""
|
||||||
|
Else
|
||||||
|
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Dim conceptoCarta As New CFDICartaPorteMercancia With {
|
||||||
Dim conceptoCarta As New CFDICartaPorteMercancia With {
|
|
||||||
.BienesTransp = drr("SATClaveProdServ").ToString,
|
.BienesTransp = drr("SATClaveProdServ").ToString,
|
||||||
.ClaveSTCC = "", 'para metodo ferroviario
|
.ClaveSTCC = "", 'para metodo ferroviario
|
||||||
.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||||
@@ -269,40 +274,40 @@ Public Class Timbres
|
|||||||
.UUIDComercioExt = ""
|
.UUIDComercioExt = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal}
|
Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal}
|
||||||
conceptoCarta.DetalleMercancia = DetalleMercancia
|
conceptoCarta.DetalleMercancia = DetalleMercancia
|
||||||
|
|
||||||
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
|
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
|
||||||
conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta)
|
conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta)
|
||||||
|
|
||||||
totSubTotal = totSubTotal - concepto.Importe
|
totSubTotal = totSubTotal - concepto.Importe
|
||||||
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
|
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
|
||||||
|
|
||||||
i += 1
|
i += 1
|
||||||
Next
|
Next
|
||||||
Timbre.Complementos.CartaPorte = CartaPorte
|
Timbre.Complementos.CartaPorte = CartaPorte
|
||||||
|
|
||||||
Else
|
Else
|
||||||
'' 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
|
|
||||||
If drr("PS").ToString.Length = 0 Then
|
|
||||||
tPS = ""
|
|
||||||
Else
|
Else
|
||||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
If drr("PS").ToString.Length = 0 Then
|
||||||
|
tPS = ""
|
||||||
|
Else
|
||||||
|
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,
|
||||||
@@ -312,24 +317,24 @@ Public Class Timbres
|
|||||||
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
.ClaveProdServ = drr("SATClaveProdServ").ToString,
|
||||||
.Noidentificacion = drr("Noidentificacion").ToString,
|
.Noidentificacion = drr("Noidentificacion").ToString,
|
||||||
.CuentaPredial = drr("CuentaPredial").ToString}
|
.CuentaPredial = drr("CuentaPredial").ToString}
|
||||||
'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
|
||||||
|
|
||||||
'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
'SIEMPRE ESTAMOS AGREGANDO EL IVA
|
||||||
'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
'concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||||
|
|
||||||
|
Timbre.Conceptos.Add(concepto)
|
||||||
|
i += 1
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
Timbre.Conceptos.Add(concepto)
|
|
||||||
i += 1
|
|
||||||
Next
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
Else
|
||||||
|
TieneError = True
|
||||||
Else
|
|
||||||
TieneError = True
|
|
||||||
_MsgError.AppendLine("Consultar datos de timbrado")
|
_MsgError.AppendLine("Consultar datos de timbrado")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1313,7 +1313,7 @@ Partial Class PopUpVerFactura
|
|||||||
DescargarArchivoPDFTraslado(Archivo, Path)
|
DescargarArchivoPDFTraslado(Archivo, Path)
|
||||||
Else
|
Else
|
||||||
If Exten = "pdf" Then
|
If Exten = "pdf" Then
|
||||||
Dim ObjTimbres As New Timbres("Rec", cvetimbre, UsuarioActual)
|
Dim ObjTimbres As New Timbres(Parametros("TIPODOCTO").ToString, cvetimbre, UsuarioActual)
|
||||||
|
|
||||||
GeneraPDFFactura(ObjTimbres.ObjFactura)
|
GeneraPDFFactura(ObjTimbres.ObjFactura)
|
||||||
Archivo = New System.IO.FileInfo(Path)
|
Archivo = New System.IO.FileInfo(Path)
|
||||||
|
|||||||
@@ -666,6 +666,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtHoraInicio.SelectedTime = Mov.Fecha
|
TxtHoraInicio.SelectedTime = Mov.Fecha
|
||||||
EstatusAlmacenCompra = Mov.EstatusAlmacenCompra
|
EstatusAlmacenCompra = Mov.EstatusAlmacenCompra
|
||||||
Folio = Mov.Folio
|
Folio = Mov.Folio
|
||||||
|
Dim drM As DataRow = DtMov.Rows(0)
|
||||||
|
|
||||||
|
|
||||||
If DtMov.Rows(0)("CveConcepto").ToString.ToEntero = 2 Then
|
If DtMov.Rows(0)("CveConcepto").ToString.ToEntero = 2 Then
|
||||||
@@ -773,13 +774,13 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
CveCompra = Mov.CveCompra
|
CveCompra = Mov.CveCompra
|
||||||
CveConcepto = Mov.CveConcepto
|
CveConcepto = Mov.CveConcepto
|
||||||
|
|
||||||
If DtMov.Rows(0)("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
If drM("CveEstatusTimbrado").ToString.ToEntero > 0 Then
|
||||||
HplDescargaXml.Visible = True
|
HplDescargaXml.Visible = True
|
||||||
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", $"Tra-{Folio}", "Tra")))
|
HplDescargaXml.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesXmlTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "XML", drM("TimbreSerieFolio"), "Tra")))
|
||||||
HplDescargaPdf.Visible = True
|
HplDescargaPdf.Visible = True
|
||||||
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", $"Tra-{Folio}", "Tra")))
|
HplDescargaPdf.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=DesPdfTra&CVEMOVIMIENTO={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", CveMovimiento, "PDF", drM("TimbreSerieFolio"), "Tra")))
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(161) = "1" Then
|
If drM("AplicaCP").ToString = "True" Then
|
||||||
HplCartaPorteTimbre.Visible = True
|
HplCartaPorteTimbre.Visible = True
|
||||||
HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimiento)))
|
HplCartaPorteTimbre.NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CARPOTIMBRE&CVEMOV={0}", CveMovimiento)))
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -339,7 +339,7 @@ public partial class General_RepEntregaAlmacenRuta : ClsPaginas
|
|||||||
Timbres ObjTimbres = new Timbres("Tra", cvetimbre, UsuarioActual);
|
Timbres ObjTimbres = new Timbres("Tra", cvetimbre, UsuarioActual);
|
||||||
StringBuilder MensajeAlert = new StringBuilder();
|
StringBuilder MensajeAlert = new StringBuilder();
|
||||||
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
MensajeAlert.AppendFormat("Folio: <b>{0}</b> ", ObjTimbres.ObjFactura.SerieFolio);
|
||||||
if (ObjTimbres.Timbrar())
|
if (ObjTimbres.MsgError =="" && ObjTimbres.Timbrar())
|
||||||
{
|
{
|
||||||
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
MensajeAlert.AppendFormat("<a class='texto' style='color:#337ab7' href='/Compras/PopUpVerFactura.aspx?P={0}' target='_blank'>XML <i class='fa fa-file'></i></i></a> ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto)));
|
||||||
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
Alert(MensajeAlert.ToString(), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
|
|||||||
@@ -1154,8 +1154,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
|
|
||||||
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
Dim ObjGral As New ClsGenerales(ObjInventario.IniciaTransacSQL)
|
||||||
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
Dim CveSubProyectoTimbre As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros($"CveAlmacen = {DdlAlmacenOrigen.SelectedValue}").Rows(0)("CveSubProyecto").ToString.ToEntero
|
||||||
|
Dim Fechallegada As DateTime = (TxtFechaLlegada.Text & " 23:59:59").ToDateTime
|
||||||
|
|
||||||
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, TxtFechaLlegada.Text.ToDatetime, "T", 1, 1, 1)
|
Dim CveEntregaAlmacen As Integer = ObjGral.AddInvEntregaAlmacenRuta(CveSubProyectoTimbre, -1, -1, CveMovimientoSalida, DdlChofer.SelectedValue.ToEntero, DdlUnidadCamion.SelectedValue.ToEntero, TxtFechaEntrega.Text.ToDate, Fechallegada, "T", 1, 1, 1)
|
||||||
|
|
||||||
If CveEntregaAlmacen > 0 Then
|
If CveEntregaAlmacen > 0 Then
|
||||||
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
|
CveTimbre = ObjGral.AddGralTimbre("Tra", CveSubProyectoTimbre, TxtFechaEntrega.Text.ToDate, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveEntregaAlmacen:=CveEntregaAlmacen, AplicaCP:=ChkEmitirCartaPorte.Checked)
|
||||||
|
|||||||
Reference in New Issue
Block a user