Bancos Contabilidad tipo 2 , Impresion traslado sim carta porte en reporte
This commit is contained in:
@@ -1024,8 +1024,15 @@ Partial Class PopUpVerFactura
|
||||
'IMPRIME CARTA PORTE
|
||||
If UrlParametros("OP").ToString = "CARPO" Then
|
||||
If UrlParametros("CVEMOV") IsNot Nothing AndAlso UrlParametros("CVEMOV").ToString.ToEntero > 0 Then
|
||||
ImprimeFormatoCartaPorte(UrlParametros("CVEMOV").ToString.ToEntero)
|
||||
ImprimeFormatoCartaPorte(UrlParametros("CVEMOV").ToString.ToEntero, -1)
|
||||
End If
|
||||
|
||||
|
||||
If UrlParametros("CVETIMBRE") IsNot Nothing AndAlso UrlParametros("CVETIMBRE").ToString.ToEntero > 0 Then
|
||||
ImprimeFormatoCartaPorte(-1, UrlParametros("CVETIMBRE").ToString.ToEntero)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If UrlParametros("OP").ToString = "CARPOTIMBRE" Then
|
||||
@@ -1416,9 +1423,9 @@ Partial Class PopUpVerFactura
|
||||
#End Region
|
||||
|
||||
#Region "OP = 'CARPO' - IMPRIME FORMATO CARTA PORTE TIMBRADO"
|
||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer)
|
||||
If CveMovimiento > 0 Then
|
||||
Dim ObjInv As New ClsInventarios
|
||||
Private Sub ImprimeFormatoCartaPorte(CveMovimiento As Integer, Optional CveTimbre As Integer = -1)
|
||||
If CveMovimiento > 0 Or CveTimbre > 0 Then
|
||||
|
||||
|
||||
Dim SerieFolio As String = ""
|
||||
Dim DomicilioSucursal As String = ""
|
||||
@@ -1447,70 +1454,156 @@ Partial Class PopUpVerFactura
|
||||
Dim SBDireccionO As New StringBuilder()
|
||||
Dim SBDireccionD As New StringBuilder()
|
||||
|
||||
If ObjInv.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
SerieFolio = Dr("Folio").ToString
|
||||
DomicilioSucursal = $"{Dr("CalleOrigen").ToString} {Dr("NoExtOrigen").ToString}, Col. {Dr("ColoniaOrigen").ToString} "
|
||||
LugarFecha = $"{Dr("MunicipioOrigen").ToString}, {Dr("EstadoOrigen").ToString} {Dr("FechaMovto").ToString.ToDate.ToShortDateString}"
|
||||
Origen = Dr("AlmacenOrigen").ToString
|
||||
Destino = Dr("AlmacenDestino").ToString
|
||||
Observaciones = Dr("Observaciones").ToString
|
||||
CveChofer = Dr("CveChofer").ToString
|
||||
Dim Dt As DataTable = Nothing
|
||||
|
||||
If CveMovimiento > 0 Then
|
||||
|
||||
Dim ObjInv As New ClsInventarios
|
||||
If ObjInv.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
|
||||
If Dr IsNot Nothing Then
|
||||
SerieFolio = Dr("Folio").ToString
|
||||
DomicilioSucursal = $"{Dr("CalleOrigen").ToString} {Dr("NoExtOrigen").ToString}, Col. {Dr("ColoniaOrigen").ToString} "
|
||||
LugarFecha = $"{Dr("MunicipioOrigen").ToString}, {Dr("EstadoOrigen").ToString} {Dr("FechaMovto").ToString.ToDate.ToShortDateString}"
|
||||
Origen = Dr("AlmacenOrigen").ToString
|
||||
Destino = Dr("AlmacenDestino").ToString
|
||||
Observaciones = Dr("Observaciones").ToString
|
||||
CveChofer = Dr("CveChofer").ToString
|
||||
|
||||
|
||||
Placa = Dr("Traslado_Placa").ToString
|
||||
Recibio = Dr("Recibio").ToString
|
||||
FechaEntrega = Dr("FechaEntrega").ToString
|
||||
EspecifUnidad = Dr("EspecificacionUnidad").ToString
|
||||
|
||||
|
||||
If Dr("CalleOrigen").ToString.Length > 0 Then
|
||||
SBDireccionO.AppendFormat("{0}", Dr("CalleOrigen").ToString)
|
||||
If Dr("NoExtOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", Dr("NoExtOrigen").ToString)
|
||||
If Dr("ColoniaOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Col: {0}", Dr("ColoniaOrigen").ToString)
|
||||
If Dr("CPOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", CP: {0}", Dr("CPOrigen").ToString)
|
||||
If Dr("LocalidadOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Loc: {0}", Dr("LocalidadOrigen").ToString)
|
||||
If Dr("MunicipioOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Cd: {0}", Dr("MunicipioOrigen").ToString)
|
||||
If Dr("EstadoOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Edo: {0}", Dr("EstadoOrigen").ToString)
|
||||
If Dr("PaisOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", País: {0}", Dr("PaisOrigen").ToString)
|
||||
End If
|
||||
If Dr("CalleDestino").ToString.Length > 0 Then
|
||||
SBDireccionD.AppendFormat("{0}", Dr("CalleDestino").ToString)
|
||||
If Dr("NoExtDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", No.Ext: {0}", Dr("NoExtDestino").ToString)
|
||||
If Dr("ColoniaDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Col: {0}", Dr("ColoniaDestino").ToString)
|
||||
If Dr("CPDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", CP: {0}", Dr("CPDestino").ToString)
|
||||
If Dr("LocalidadDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Loc: {0}", Dr("LocalidadDestino").ToString)
|
||||
If Dr("MunicipioDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Cd: {0}", Dr("MunicipioDestino").ToString)
|
||||
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
|
||||
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
|
||||
End If
|
||||
|
||||
ResponsableCarga = Dr("ResponsableCarga").ToString
|
||||
ResponsableRecibio = Dr("ResponsableRecibio").ToString
|
||||
Identificacion = Dr("Identificacion").ToString
|
||||
Domicilio = Dr("Domicilio").ToString
|
||||
Telefono = Dr("Telefono1").ToString
|
||||
Ciudad = Dr("Ciudad").ToString
|
||||
Licencia = Dr("Licencia").ToString
|
||||
|
||||
|
||||
Chofer = Dr("Chofer").ToString
|
||||
Placa = Dr("Placa").ToString
|
||||
EspecifUnidad = Dr("Especificacion").ToString
|
||||
|
||||
|
||||
Placa = Dr("Traslado_Placa").ToString
|
||||
Recibio = Dr("Recibio").ToString
|
||||
FechaEntrega = Dr("FechaEntrega").ToString
|
||||
EspecifUnidad = Dr("EspecificacionUnidad").ToString
|
||||
|
||||
If Dr("CalleOrigen").ToString.Length > 0 Then
|
||||
SBDireccionO.AppendFormat("{0}", Dr("CalleOrigen").ToString)
|
||||
If Dr("NoExtOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", Dr("NoExtOrigen").ToString)
|
||||
If Dr("ColoniaOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Col: {0}", Dr("ColoniaOrigen").ToString)
|
||||
If Dr("CPOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", CP: {0}", Dr("CPOrigen").ToString)
|
||||
If Dr("LocalidadOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Loc: {0}", Dr("LocalidadOrigen").ToString)
|
||||
If Dr("MunicipioOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Cd: {0}", Dr("MunicipioOrigen").ToString)
|
||||
If Dr("EstadoOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Edo: {0}", Dr("EstadoOrigen").ToString)
|
||||
If Dr("PaisOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", País: {0}", Dr("PaisOrigen").ToString)
|
||||
End If
|
||||
If Dr("CalleDestino").ToString.Length > 0 Then
|
||||
SBDireccionD.AppendFormat("{0}", Dr("CalleDestino").ToString)
|
||||
If Dr("NoExtDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", No.Ext: {0}", Dr("NoExtDestino").ToString)
|
||||
If Dr("ColoniaDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Col: {0}", Dr("ColoniaDestino").ToString)
|
||||
If Dr("CPDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", CP: {0}", Dr("CPDestino").ToString)
|
||||
If Dr("LocalidadDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Loc: {0}", Dr("LocalidadDestino").ToString)
|
||||
If Dr("MunicipioDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Cd: {0}", Dr("MunicipioDestino").ToString)
|
||||
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
|
||||
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
|
||||
End If
|
||||
|
||||
ResponsableCarga = Dr("ResponsableCarga").ToString
|
||||
ResponsableRecibio = Dr("ResponsableRecibio").ToString
|
||||
Identificacion = Dr("Identificacion").ToString
|
||||
Domicilio = Dr("Domicilio").ToString
|
||||
Telefono = Dr("Telefono1").ToString
|
||||
Ciudad = Dr("Ciudad").ToString
|
||||
Licencia = Dr("Licencia").ToString
|
||||
|
||||
|
||||
Chofer = Dr("Chofer").ToString
|
||||
Placa = Dr("Placa").ToString
|
||||
EspecifUnidad = Dr("Especificacion").ToString
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
Dt = ObjInv.DtResultados
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
|
||||
|
||||
ElseIf CveTimbre > 0 Then
|
||||
|
||||
|
||||
Dim ObjGral As New ClsGenerales
|
||||
|
||||
|
||||
If ObjGral.GetGralTimbre(CveTimbre, "-1", MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||
|
||||
Dim Dr As DataRow = ObjGral.DtResultados.Rows(0)
|
||||
|
||||
SerieFolio = Dr("SerieFolio").ToString
|
||||
DomicilioSucursal = $"{Dr("DirOriCalle").ToString} {Dr("NoExtOrigen").ToString}, Col. {Dr("ColoniaOrigen").ToString} "
|
||||
LugarFecha = $"{Dr("MunicipioOrigen").ToString}, {Dr("EstadoOrigen").ToString} {Dr("FechaMovto").ToString.ToDate.ToShortDateString}"
|
||||
Origen = Dr("SPOrigen").ToString
|
||||
Destino = Dr("SPDestino").ToString
|
||||
Observaciones = ""
|
||||
CveChofer = Dr("CveChofer").ToString
|
||||
Chofer = Dr("FiguraChofer").ToString
|
||||
|
||||
|
||||
Placa = Dr("Placa").ToString
|
||||
Recibio = ""
|
||||
FechaEntrega = Dr("FechaEntrega").ToString
|
||||
EspecifUnidad = Dr("EspecificacionUnidad").ToString
|
||||
|
||||
|
||||
If Dr("CalleOrigen").ToString.Length > 0 Then
|
||||
SBDireccionO.AppendFormat("{0}", Dr("CalleOrigen").ToString)
|
||||
If Dr("NoExtOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", No.Ext: {0}", Dr("NoExtOrigen").ToString)
|
||||
If Dr("ColoniaOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Col: {0}", Dr("ColoniaOrigen").ToString)
|
||||
If Dr("CPOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", CP: {0}", Dr("CPOrigen").ToString)
|
||||
If Dr("LocalidadOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Loc: {0}", Dr("LocalidadOrigen").ToString)
|
||||
If Dr("MunicipioOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Cd: {0}", Dr("MunicipioOrigen").ToString)
|
||||
If Dr("EstadoOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", Edo: {0}", Dr("EstadoOrigen").ToString)
|
||||
If Dr("PaisOrigen").ToString.Length > 0 Then SBDireccionO.AppendFormat(", País: {0}", Dr("PaisOrigen").ToString)
|
||||
End If
|
||||
If Dr("CalleDestino").ToString.Length > 0 Then
|
||||
SBDireccionD.AppendFormat("{0}", Dr("CalleDestino").ToString)
|
||||
If Dr("NoExtDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", No.Ext: {0}", Dr("NoExtDestino").ToString)
|
||||
If Dr("ColoniaDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Col: {0}", Dr("ColoniaDestino").ToString)
|
||||
If Dr("CPDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", CP: {0}", Dr("CPDestino").ToString)
|
||||
If Dr("LocalidadDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Loc: {0}", Dr("LocalidadDestino").ToString)
|
||||
If Dr("MunicipioDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Cd: {0}", Dr("MunicipioDestino").ToString)
|
||||
If Dr("EstadoDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", Edo: {0}", Dr("EstadoDestino").ToString)
|
||||
If Dr("PaisDestino").ToString.Length > 0 Then SBDireccionD.AppendFormat(", País: {0}", Dr("PaisDestino").ToString)
|
||||
End If
|
||||
|
||||
ResponsableCarga = Dr("ResponsableCarga").ToString
|
||||
ResponsableRecibio = Dr("ResponsableRecibio").ToString
|
||||
Identificacion = Dr("Identificacion").ToString
|
||||
Domicilio = Dr("Domicilio").ToString
|
||||
Telefono = Dr("Telefono1").ToString
|
||||
Ciudad = Dr("Ciudad").ToString
|
||||
Licencia = Dr("Licencia").ToString
|
||||
|
||||
|
||||
Chofer = Dr("Chofer").ToString
|
||||
Placa = Dr("Placa").ToString
|
||||
EspecifUnidad = Dr("Especificacion").ToString
|
||||
|
||||
|
||||
End If
|
||||
|
||||
ObjGral.Dispose()
|
||||
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
|
||||
If ObjGrales.GetGralMovimientosDetalleTimbre(CveTimbre, UsuarioActual.CveEmpresa) Then
|
||||
Dt = ObjGrales.DtResultados
|
||||
End If
|
||||
|
||||
ObjGrales.Dispose()
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Dim Dt As DataTable = Nothing
|
||||
If ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
Dt = ObjInv.DtResultados
|
||||
End If
|
||||
ObjInv.Dispose()
|
||||
If Dt.Rows.Count > 0 Then
|
||||
Dim params As New List(Of ReportParameter)
|
||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||
|
||||
Reference in New Issue
Block a user