-- corrección impresión manifiesto
This commit is contained in:
@@ -2,14 +2,10 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.Entity.Core.Metadata.Edm
|
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports iText.Barcodes.Dmcode
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports Modelos
|
|
||||||
Imports Stimulsoft.Base.Context
|
|
||||||
Imports ZXing
|
Imports ZXing
|
||||||
|
|
||||||
|
|
||||||
@@ -245,6 +241,575 @@ Partial Class PopUpVerFactura
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
'temporal
|
||||||
|
|
||||||
|
Protected Sub ImprimeFormatoCartaPorteTimbrado(CveTimbre As Integer)
|
||||||
|
Dim resp As Modelos.MSubReportData = PreParaImpresionCartaPorte(CveTimbre)
|
||||||
|
If resp.DataSources.Count > 0 AndAlso resp.Parametros.Count > 0 Then
|
||||||
|
ImprimirPDF("Empresas/Grales/Formatos/CartaPorteTimbrado.rdlc", resp.DataSources, resp.Parametros, resp.SerieFolio)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Function PreParaImpresionCartaPorte(CveTimbre As Integer, Optional AplicaSubReporte As Boolean = False) As Modelos.MSubReportData
|
||||||
|
Dim retorno As New Modelos.MSubReportData
|
||||||
|
retorno.Nombre = "CartaPorte"
|
||||||
|
Try
|
||||||
|
If CveTimbre > 0 Then
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
'01 Autotransporte Federal
|
||||||
|
'02 Transporte Marítimo
|
||||||
|
'03 Transporte Aéreo
|
||||||
|
'04 Transporte Ferroviario
|
||||||
|
'05 Ducto
|
||||||
|
Dim HtTransporte As New Hashtable()
|
||||||
|
HtTransporte.Add("01", "Autotransporte Federal")
|
||||||
|
HtTransporte.Add("02", "Transporte Marítimo")
|
||||||
|
HtTransporte.Add("03", "Transporte Aéreo")
|
||||||
|
HtTransporte.Add("04", "Transporte Ferroviario")
|
||||||
|
HtTransporte.Add("05", "Ducto")
|
||||||
|
|
||||||
|
'EMISOR
|
||||||
|
Dim LugarExpedicion As String = ""
|
||||||
|
Dim ImgCBB As String = ""
|
||||||
|
Dim ImgCCP As String = ""
|
||||||
|
'COMPROBANTE
|
||||||
|
Dim SerieFolio As String = ""
|
||||||
|
Dim Telefono As String = ""
|
||||||
|
Dim SubTotal As Decimal = 0
|
||||||
|
Dim Descuentos As Decimal = 0
|
||||||
|
Dim Total As Decimal = 0
|
||||||
|
'DATOS DEL CLIENTE
|
||||||
|
Dim ClienteRFC As String = ""
|
||||||
|
Dim ClienteNombre As String = ""
|
||||||
|
Dim ClienteUsoCFDi As String = ""
|
||||||
|
|
||||||
|
'TRANSPORTE
|
||||||
|
Dim MedioTransporte As String = ""
|
||||||
|
Dim TransporteInternacional As String = ""
|
||||||
|
Dim PermisoSTCC As String = ""
|
||||||
|
Dim NumPermiso As String = ""
|
||||||
|
Dim AseguradoraRespCivil As String = ""
|
||||||
|
Dim NumPolizaSeguroRespCivil As String = ""
|
||||||
|
Dim NombreAseguradoraMedioAmbiente As String = ""
|
||||||
|
Dim NumPolizaSeguroMedioAmbiente As String = ""
|
||||||
|
Dim NombreAseguradoraCarga As String = ""
|
||||||
|
Dim NumPolizaSeguroCarga As String = ""
|
||||||
|
|
||||||
|
Dim RemolquePlaca1 As String = ""
|
||||||
|
Dim RemolquePlaca2 As String = ""
|
||||||
|
Dim RemolqueSubtimo1 As String = ""
|
||||||
|
Dim RemolqueSubtimo2 As String = ""
|
||||||
|
|
||||||
|
Dim PlacaVM As String = ""
|
||||||
|
Dim AnioModeloVM As String = ""
|
||||||
|
Dim PesoBrutoVehicular As String = ""
|
||||||
|
'TIMBRADO
|
||||||
|
Dim FolioFiscal As String = ""
|
||||||
|
Dim NoCertificadoSAT As String = ""
|
||||||
|
Dim CadenaOriginal As String = ""
|
||||||
|
Dim NoSerieCertificado As String = ""
|
||||||
|
Dim FechaCertificacion As DateTime = Nothing
|
||||||
|
Dim SelloCFDi As String = ""
|
||||||
|
Dim SelloSAT As String = ""
|
||||||
|
Dim TipoDocto As String = ""
|
||||||
|
Dim PermisoSCTR1 As String = ""
|
||||||
|
Dim PermisoSCTR2 As String = ""
|
||||||
|
Dim ConfATR1 As String = ""
|
||||||
|
Dim ConfATR2 As String = ""
|
||||||
|
Dim ObjInv As New ClsGenerales
|
||||||
|
|
||||||
|
If ObjInv.GetGralTimbre(CveTimbre, "-1", MinFecha, MaxFecha, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||||
|
Dim Dr As DataRow = ObjInv.DtResultados.Rows(0)
|
||||||
|
If Dr IsNot Nothing Then
|
||||||
|
SerieFolio = Dr("SerieFolio").ToString
|
||||||
|
Telefono = Dr("FiguraTelefono").ToString
|
||||||
|
TipoDocto = Dr("TipoDocto").ToString
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 13 Then
|
||||||
|
PermisoSCTR1 = Dr("PermisoSCTR1").ToString
|
||||||
|
PermisoSCTR2 = Dr("PermisoSCTR2").ToString
|
||||||
|
ConfATR1 = Dr("ConfATR1").ToString
|
||||||
|
ConfATR2 = Dr("ConfATR2").ToString
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
ObjInv.Dispose()
|
||||||
|
|
||||||
|
retorno.SerieFolio = SerieFolio
|
||||||
|
|
||||||
|
Dim DtConceptos As New DataTable()
|
||||||
|
DtConceptos.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||||
|
DtConceptos.Columns.Add(New DataColumn("Unidad", GetType(String)))
|
||||||
|
DtConceptos.Columns.Add(New DataColumn("Descripcion", GetType(String)))
|
||||||
|
DtConceptos.Columns.Add(New DataColumn("ValorUnitario", GetType(Decimal)))
|
||||||
|
DtConceptos.Columns.Add(New DataColumn("Importe", GetType(Decimal)))
|
||||||
|
|
||||||
|
Dim DtUbicaciones As New DataTable()
|
||||||
|
DtUbicaciones.Columns.Add(New DataColumn("Distancia", GetType(String)))
|
||||||
|
DtUbicaciones.Columns.Add(New DataColumn("TipoUbicacion", GetType(String)))
|
||||||
|
DtUbicaciones.Columns.Add(New DataColumn("RFC", GetType(String)))
|
||||||
|
DtUbicaciones.Columns.Add(New DataColumn("Nombre", GetType(String)))
|
||||||
|
DtUbicaciones.Columns.Add(New DataColumn("FechaHoraSalida", GetType(DateTime)))
|
||||||
|
DtUbicaciones.Columns.Add(New DataColumn("Direccion", GetType(String)))
|
||||||
|
|
||||||
|
Dim DtMercancias As New DataTable()
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Cantidad", GetType(Decimal)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("UnidadMedida", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Descripcion", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("PesoEnKg", GetType(String)))
|
||||||
|
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CveMaterialPeligroso", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Embalaje", GetType(String)))
|
||||||
|
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("SectorCOFEPRIS", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("NombreIngredienteActivo", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("NomQuimico", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("DenominacionGenerica", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("DenominacionDistintiva", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("Fabricante", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("FormaFarmaceutica", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("CondicionesTransporte", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("RegistroSanitarioAutorizacion", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("PermisoImportacion", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("FolioImportacionVUCEM", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("NumCAS", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("RazonSocialEmpImportacion", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("NumRegistroPlagCOFEPRIS", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("DatosFabricante", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("DatosFormulador", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("DatosMaquilador", GetType(String)))
|
||||||
|
DtMercancias.Columns.Add(New DataColumn("UsoAutorizado", GetType(String)))
|
||||||
|
|
||||||
|
|
||||||
|
Dim DtOperadores As New DataTable()
|
||||||
|
DtOperadores.Columns.Add(New DataColumn("RFC", GetType(String)))
|
||||||
|
DtOperadores.Columns.Add(New DataColumn("NumLicencia", GetType(String)))
|
||||||
|
DtOperadores.Columns.Add(New DataColumn("NombreOperador", GetType(String)))
|
||||||
|
|
||||||
|
Dim DTRelacionados As New DataTable()
|
||||||
|
DTRelacionados.Columns.Add(New DataColumn("Relacion", GetType(String)))
|
||||||
|
DTRelacionados.Columns.Add(New DataColumn("UUID", GetType(String)))
|
||||||
|
|
||||||
|
Dim XMLDoc As New XmlDocument
|
||||||
|
Dim Path As String = String.Format("{0}\{1}\{2}\{3}.{4}", UsuarioActual.Empresa.Ruta, "XML", TipoDocto, String.Format("{0}", SerieFolio), "xml")
|
||||||
|
Dim Archivo As New System.IO.FileInfo(Path)
|
||||||
|
|
||||||
|
If Archivo.Exists Then
|
||||||
|
Try
|
||||||
|
XMLDoc.Load(Path)
|
||||||
|
Catch ex As Exception
|
||||||
|
Try
|
||||||
|
Dim oReader As New StreamReader(Path, Encoding.GetEncoding("ISO-8859-1"))
|
||||||
|
XMLDoc.Load(oReader)
|
||||||
|
oReader.Dispose()
|
||||||
|
Catch ex2 As Exception
|
||||||
|
GuardaLog("Error al intentar leer el XML del SAT. Error:" & ex2.ToString())
|
||||||
|
End Try
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
|
||||||
|
If XMLDoc IsNot Nothing AndAlso Archivo.Exists Then
|
||||||
|
|
||||||
|
Dim RutaCBB As String = String.Format("{0}\CBB\{1}.jpg", UsuarioActual.Empresa.Ruta, SerieFolio)
|
||||||
|
Dim ImagenCBB As New System.IO.FileInfo(RutaCBB)
|
||||||
|
|
||||||
|
Dim RutaCCP As String = String.Format("{0}\CBB\{1}_CCP.jpg", UsuarioActual.Empresa.Ruta, SerieFolio)
|
||||||
|
Dim ImagenCCP As New System.IO.FileInfo(RutaCCP)
|
||||||
|
|
||||||
|
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
|
||||||
|
Dim cfdVer As String = "http://www.sat.gob.mx/cfd/3"
|
||||||
|
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
|
||||||
|
Dim Version As String = ValorXML(XMLDoc.DocumentElement, "version")
|
||||||
|
Dim VersionCCP As String = ""
|
||||||
|
Dim PrefijoCCP As String = ""
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("CFDIVersion", Version))
|
||||||
|
|
||||||
|
namespaces.AddNamespace(Prefijo, cfdVer)
|
||||||
|
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
|
||||||
|
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
|
||||||
|
namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal")
|
||||||
|
namespaces.AddNamespace("cartaporte", "http://www.sat.gob.mx/CartaPorte")
|
||||||
|
namespaces.AddNamespace("cartaporte20", "http://www.sat.gob.mx/CartaPorte20")
|
||||||
|
namespaces.AddNamespace("cartaporte30", "http://www.sat.gob.mx/CartaPorte30")
|
||||||
|
|
||||||
|
Dim Nodos30 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte30:CartaPorte", namespaces)
|
||||||
|
Dim Nodos20 As XmlNode = XMLDoc.SelectSingleNode("//cartaporte20:CartaPorte", namespaces)
|
||||||
|
|
||||||
|
If Nodos30 IsNot Nothing Then
|
||||||
|
VersionCCP = "3.0"
|
||||||
|
PrefijoCCP = "cartaporte30"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Nodos20 IsNot Nothing Then
|
||||||
|
VersionCCP = "2.0"
|
||||||
|
PrefijoCCP = "cartaporte20"
|
||||||
|
End If
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("CartaPorteVersion", VersionCCP))
|
||||||
|
|
||||||
|
Dim nodeComprobante As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante", Prefijo), namespaces)
|
||||||
|
If nodeComprobante IsNot Nothing Then
|
||||||
|
LugarExpedicion = ValorXML(nodeComprobante, "LugarExpedicion")
|
||||||
|
SubTotal = ValorXML(nodeComprobante, "SubTotal").ToDecimal()
|
||||||
|
Total = ValorXML(nodeComprobante, "Total").ToDecimal()
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeCliente As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Receptor", Prefijo), namespaces)
|
||||||
|
|
||||||
|
If nodeCliente IsNot Nothing Then
|
||||||
|
ClienteRFC = ValorXML(nodeCliente, "RFC")
|
||||||
|
ClienteNombre = ValorXML(nodeCliente, "Nombre")
|
||||||
|
Dim UsoCFDI As String = ValorXML(nodeCliente, "UsoCFDI")
|
||||||
|
ClienteUsoCFDi = String.Format("{0} - {1}", UsoCFDI, GlobalDTSATUsosCFDI().FiltroPrimeroValor("Descripcion", String.Format("UsoCFDI = '{0}'", UsoCFDI)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeConceptos As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Conceptos", Prefijo), namespaces)
|
||||||
|
|
||||||
|
If nodeConceptos IsNot Nothing Then
|
||||||
|
For Each node As XmlNode In nodeConceptos.ChildNodes
|
||||||
|
Dim Row As DataRow = DtConceptos.NewRow
|
||||||
|
|
||||||
|
Row("Cantidad") = ValorXML(node, "Cantidad", "")
|
||||||
|
Row("Unidad") = ValorXML(node, "Unidad", "")
|
||||||
|
Row("Descripcion") = ValorXML(node, "Descripcion", "")
|
||||||
|
Row("ValorUnitario") = ValorXML(node, "ValorUnitario", "")
|
||||||
|
Row("Importe") = ValorXML(node, "Importe", "")
|
||||||
|
DtConceptos.Rows.Add(Row)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Dim nodeComp As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:Comprobante/{0}:Complemento", Prefijo), namespaces)
|
||||||
|
|
||||||
|
Dim nodeCartaPorte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:CartaPorte", PrefijoCCP), namespaces)
|
||||||
|
If nodeCartaPorte IsNot Nothing Then
|
||||||
|
TransporteInternacional = ValorXML(nodeCartaPorte, "TranspInternac", "")
|
||||||
|
Dim CveTransporte As String = ValorXML(nodeCartaPorte, "ViaEntradaSalida", "")
|
||||||
|
'Dim nodeFiguraTransporte As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:FiguraTransporte", "cartaporte20"), namespaces)
|
||||||
|
If CveTransporte <> "" Then MedioTransporte = String.Format("{0} - {1}", CveTransporte, HtTransporte(CveTransporte).ToString())
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeAutotransporteFederal As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Autotransporte", PrefijoCCP), namespaces)
|
||||||
|
If nodeAutotransporteFederal IsNot Nothing Then
|
||||||
|
PermisoSTCC = ValorXML(nodeAutotransporteFederal, "PermSCT", "")
|
||||||
|
NumPermiso = ValorXML(nodeAutotransporteFederal, "NumPermisoSCT", "")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeIdentificacionVehicular As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:IdentificacionVehicular", PrefijoCCP), namespaces)
|
||||||
|
If nodeIdentificacionVehicular IsNot Nothing Then
|
||||||
|
PlacaVM = ValorXML(nodeIdentificacionVehicular, "PlacaVM", "")
|
||||||
|
AnioModeloVM = ValorXML(nodeIdentificacionVehicular, "AnioModeloVM", "")
|
||||||
|
PesoBrutoVehicular = ValorXML(nodeIdentificacionVehicular, "PesoBrutoVehicular", "")
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeSeguros As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Seguros", PrefijoCCP), namespaces)
|
||||||
|
If nodeIdentificacionVehicular IsNot Nothing Then
|
||||||
|
AseguradoraRespCivil = ValorXML(nodeSeguros, "AseguraRespCivil", "")
|
||||||
|
NumPolizaSeguroRespCivil = ValorXML(nodeSeguros, "PolizaRespCivil", "")
|
||||||
|
|
||||||
|
'Por Definir de donde sale
|
||||||
|
NombreAseguradoraMedioAmbiente = ValorXML(nodeSeguros, "AseguraMedAmbiente", "")
|
||||||
|
NumPolizaSeguroMedioAmbiente = ValorXML(nodeSeguros, "PolizaMedAmbiente", "")
|
||||||
|
NombreAseguradoraCarga = ValorXML(nodeSeguros, "AseguraCarga", "")
|
||||||
|
NumPolizaSeguroCarga = ValorXML(nodeSeguros, "PolizaCarga", "")
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim nodeRemolques As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:Remolques", PrefijoCCP), namespaces)
|
||||||
|
|
||||||
|
If nodeRemolques IsNot Nothing Then
|
||||||
|
If nodeRemolques.ChildNodes.Count = 1 Then
|
||||||
|
RemolquePlaca1 = ValorXML(nodeRemolques.ChildNodes(0), "Placa", "")
|
||||||
|
RemolqueSubtimo1 = ValorXML(nodeRemolques.ChildNodes(0), "SubTipoRem", "")
|
||||||
|
ElseIf nodeRemolques.ChildNodes.Count > 1 Then
|
||||||
|
RemolquePlaca1 = ValorXML(nodeRemolques.ChildNodes(0), "Placa", "")
|
||||||
|
RemolqueSubtimo1 = ValorXML(nodeRemolques.ChildNodes(0), "SubTipoRem", "")
|
||||||
|
RemolquePlaca2 = ValorXML(nodeRemolques.ChildNodes(1), "Placa", "")
|
||||||
|
RemolqueSubtimo2 = ValorXML(nodeRemolques.ChildNodes(1), "SubTipoRem", "")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeMercancias As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancia", PrefijoCCP), namespaces)
|
||||||
|
For Each node As XmlNode In nodeMercancias
|
||||||
|
Dim Row As DataRow = DtMercancias.NewRow
|
||||||
|
|
||||||
|
Row("Cantidad") = ValorXML(node, "Cantidad", "")
|
||||||
|
Row("UnidadMedida") = ValorXML(node, "Unidad", "")
|
||||||
|
Row("Descripcion") = ValorXML(node, "Descripcion", "")
|
||||||
|
Row("PesoEnKg") = ValorXML(node, "PesoEnKg", "")
|
||||||
|
|
||||||
|
Row("CveMaterialPeligroso") = ValorXML(node, "CveMaterialPeligroso", "")
|
||||||
|
Row("Embalaje") = ValorXML(node, "Embalaje", "")
|
||||||
|
|
||||||
|
Row("SectorCOFEPRIS") = ValorXML(node, "SectorCOFEPRIS", "")
|
||||||
|
Row("NombreIngredienteActivo") = ValorXML(node, "NombreIngredienteActivo", "")
|
||||||
|
Row("NomQuimico") = ValorXML(node, "NomQuimico", "")
|
||||||
|
Row("DenominacionGenerica") = ValorXML(node, "DenominacionGenerica", "")
|
||||||
|
Row("DenominacionDistintiva") = ValorXML(node, "DenominacionDistintiva", "")
|
||||||
|
Row("Fabricante") = ValorXML(node, "Fabricante", "")
|
||||||
|
Row("FormaFarmaceutica") = ValorXML(node, "FormaFarmaceutica", "")
|
||||||
|
Row("CondicionesTransporte") = ValorXML(node, "CondicionesTransporte", "")
|
||||||
|
Row("RegistroSanitarioAutorizacion") = ValorXML(node, "RegistroSanitarioAutorizacion", "")
|
||||||
|
Row("PermisoImportacion") = ValorXML(node, "PermisoImportacion", "")
|
||||||
|
Row("FolioImportacionVUCEM") = ValorXML(node, "FolioImportacionVUCEM", "")
|
||||||
|
Row("NumCAS") = ValorXML(node, "NumCAS", "")
|
||||||
|
Row("RazonSocialEmpImportacion") = ValorXML(node, "RazonSocialEmpImportacion", "")
|
||||||
|
Row("NumRegistroPlagCOFEPRIS") = ValorXML(node, "NumRegistroPlagCOFEPRIS", "")
|
||||||
|
Row("DatosFabricante") = ValorXML(node, "DatosFabricante", "")
|
||||||
|
Row("DatosFormulador") = ValorXML(node, "DatosFormulador", "")
|
||||||
|
Row("DatosMaquilador") = ValorXML(node, "DatosMaquilador", "")
|
||||||
|
Row("UsoAutorizado") = ValorXML(node, "UsoAutorizado", "")
|
||||||
|
|
||||||
|
DtMercancias.Rows.Add(Row)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim nodeMercanciaPadre As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Mercancias", PrefijoCCP), namespaces)
|
||||||
|
If UsuarioActual.CveEmpresa = 13 AndAlso nodeMercanciaPadre IsNot Nothing Then
|
||||||
|
Dim PesoNetoTotal As String = ValorXML(nodeMercanciaPadre(0), "PesoNetoTotal", "")
|
||||||
|
Dim UnidadPeso As String = ValorXML(nodeMercanciaPadre(0), "UnidadPeso", "")
|
||||||
|
Dim NumTotalMercancias As String = ValorXML(nodeMercanciaPadre(0), "NumTotalMercancias", "")
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("PesoNetoTotal", PesoNetoTotal))
|
||||||
|
params.Add(New ReportParameter("UnidadPeso", UnidadPeso))
|
||||||
|
params.Add(New ReportParameter("NumTotalMercancias", NumTotalMercancias))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeOperadores As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:TiposFigura", PrefijoCCP), namespaces)
|
||||||
|
For Each node As XmlNode In nodeOperadores
|
||||||
|
Dim Row As DataRow = DtOperadores.NewRow
|
||||||
|
|
||||||
|
Row("RFC") = ValorXML(node, "RFCFigura", "")
|
||||||
|
Row("NumLicencia") = ValorXML(node, "NumLicencia", "")
|
||||||
|
Row("NombreOperador") = ValorXML(node, "NombreFigura", "")
|
||||||
|
|
||||||
|
DtOperadores.Rows.Add(Row)
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim DistanciaTotal As Decimal = 0
|
||||||
|
Dim nodeUbicaciones As XmlNodeList = nodeComp.SelectNodes(String.Format("//{0}:Ubicacion", PrefijoCCP), namespaces)
|
||||||
|
For Each node As XmlNode In nodeUbicaciones
|
||||||
|
Dim Row As DataRow = DtUbicaciones.NewRow
|
||||||
|
|
||||||
|
Row("Distancia") = ValorXML(node, "DistanciaRecorrida", "")
|
||||||
|
DistanciaTotal += Row("Distancia").ToString().ToDecimal()
|
||||||
|
Row("TipoUbicacion") = ValorXML(node, "TipoUbicacion", "")
|
||||||
|
Row("FechaHoraSalida") = ValorXML(node, "FechaHoraSalidaLlegada", "")
|
||||||
|
Row("RFC") = ValorXML(node, "RFCRemitenteDestinatario", "")
|
||||||
|
Row("Nombre") = ValorXML(node, "NombreRemitenteDestinatario", "")
|
||||||
|
|
||||||
|
Dim nodeDomicilio As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = $"{PrefijoCCP}:Domicilio") 'node.SelectSingleNode(String.Format("//{0}:Domicilio", "cartaporte"), namespaces)
|
||||||
|
If nodeDomicilio IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim Estado As String = ""
|
||||||
|
Dim Municipio As String = ""
|
||||||
|
Dim Colonia As String = ""
|
||||||
|
Dim calle As String = ValorXML(nodeDomicilio, "Calle", "")
|
||||||
|
Dim CP As String = ValorXML(nodeDomicilio, "CodigoPostal", "")
|
||||||
|
|
||||||
|
Dim dr As DataRow = GlobalDTGralColonias(ValorXML(nodeDomicilio, "Estado", ""), ValorXML(nodeDomicilio, "Municipio", ""), ValorXML(nodeDomicilio, "Colonia", "")).FiltroPrimero("")
|
||||||
|
If dr IsNot Nothing Then
|
||||||
|
Estado = dr("NombreEstado").ToString
|
||||||
|
Municipio = dr("NombreMunicipio").ToString
|
||||||
|
Colonia = dr("NombreAsentamiento").ToString
|
||||||
|
End If
|
||||||
|
Row("Direccion") = String.Format("{0} Col.{1},{2},{3}. CP {4}", calle, Colonia, Municipio, Estado, CP)
|
||||||
|
End If
|
||||||
|
DtUbicaciones.Rows.Add(Row)
|
||||||
|
Next
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 13 Then
|
||||||
|
params.Add(New ReportParameter("DistanciaTotal", DistanciaTotal.ToString()))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeRelacion As XmlNode = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||||
|
|
||||||
|
If nodeRelacion IsNot Nothing Then
|
||||||
|
Dim RelacionCodigo As String = ValorXML(nodeRelacion, "TipoRelacion")
|
||||||
|
Dim Relacion As String = ""
|
||||||
|
|
||||||
|
Select Case RelacionCodigo
|
||||||
|
Case "01"
|
||||||
|
Relacion = "01 - Nota de crédito de los documentos relacionados"
|
||||||
|
Case "02"
|
||||||
|
Relacion = "02 - Nota de débito de los documentos relacionados"
|
||||||
|
Case "03"
|
||||||
|
Relacion = "03 - Devolución de mercancía sobre facturas o traslados previos"
|
||||||
|
Case "04"
|
||||||
|
Relacion = "04 - Sustitución de los CFDI previos"
|
||||||
|
Case "05"
|
||||||
|
Relacion = "05 - Traslados de mercancias facturados previamente"
|
||||||
|
Case "06"
|
||||||
|
Relacion = "06 - Factura generada por los traslados previos"
|
||||||
|
Case "07"
|
||||||
|
Relacion = "07 - CFDI por aplicación de anticipo"
|
||||||
|
Case "08"
|
||||||
|
Relacion = "08 - Factura generada por pagos en parcialidades"
|
||||||
|
Case "09"
|
||||||
|
Relacion = "09 - Factura generada por pagos diferidos"
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim nodoDocumentosRelacionados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
|
||||||
|
For Each node As XmlNode In nodoDocumentosRelacionados
|
||||||
|
|
||||||
|
Dim nRow As DataRow = DTRelacionados.NewRow
|
||||||
|
nRow("Relacion") = Relacion
|
||||||
|
|
||||||
|
Try
|
||||||
|
Dim nodoUUID As XmlNode = node.ChildNodes.Cast(Of XmlNode).FirstOrDefault(Function(x) x.Name = "cfdi:CfdiRelacionado")
|
||||||
|
nRow("UUID") = ValorXML(nodoUUID, "UUID", "")
|
||||||
|
Catch ex As Exception
|
||||||
|
nRow("UUID") = ""
|
||||||
|
End Try
|
||||||
|
|
||||||
|
DTRelacionados.Rows.Add(nRow)
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim nodeTFD As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:TimbreFiscalDigital", "tfd"), namespaces)
|
||||||
|
If nodeTFD IsNot Nothing Then
|
||||||
|
FolioFiscal = ValorXML(nodeTFD, "UUID", "")
|
||||||
|
NoSerieCertificado = ValorXML(nodeTFD, "NoCertificadoSAT", "")
|
||||||
|
FechaCertificacion = ValorXML(nodeTFD, "FechaTimbrado", "").ToDateTime
|
||||||
|
SelloCFDi = ValorXML(nodeTFD, "SelloCFD", "")
|
||||||
|
SelloSAT = ValorXML(nodeTFD, "SelloSAT", "")
|
||||||
|
NoCertificadoSAT = ValorXML(nodeTFD, "NoCertificadoSAT", "")
|
||||||
|
|
||||||
|
CadenaOriginal = "||1.0|" + FolioFiscal + "|" + FechaCertificacion.ToString("yyyy-MM-dd") + "T" + FechaCertificacion.ToString("HH:mm:ss") + "|" + SelloCFDi + "|" + NoSerieCertificado + "||"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ImagenCBB.Exists Then GeneraQRSAT(UsuarioActual.Empresa.RFC, ClienteRFC, Total, FolioFiscal, RutaGuardado:=RutaCBB)
|
||||||
|
ImagenCBB = New System.IO.FileInfo(RutaCBB)
|
||||||
|
If ImagenCBB.Exists Then
|
||||||
|
ImgCBB = String.Format("file://{0}", ImagenCBB.FullName)
|
||||||
|
Else
|
||||||
|
ImgCBB = ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
ImagenCCP = New System.IO.FileInfo(RutaCCP)
|
||||||
|
If ImagenCCP.Exists Then
|
||||||
|
ImgCCP = String.Format("file://{0}", ImagenCCP.FullName)
|
||||||
|
Else
|
||||||
|
ImgCCP = ""
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DtConceptos.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("LogoPath", RutaImagenLogo))
|
||||||
|
'EMPRESA
|
||||||
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
params.Add(New ReportParameter("RegimenFiscal", UsuarioActual.Empresa.Regimen))
|
||||||
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
|
params.Add(New ReportParameter("FechaImpresion", NowADS().ToDateTime.ToShortDateString))
|
||||||
|
params.Add(New ReportParameter("DomicilioFiscal", $"{UsuarioActual.Empresa.Direccion}, {UsuarioActual.Empresa.Colonia}, {UsuarioActual.Empresa.Localidad}, {UsuarioActual.Empresa.Estado}, Tel. {Telefono}"))
|
||||||
|
params.Add(New ReportParameter("SerieFolio", SerieFolio))
|
||||||
|
params.Add(New ReportParameter("RFC", UsuarioActual.Empresa.RFC))
|
||||||
|
params.Add(New ReportParameter("DomicilioExpedicion", LugarExpedicion))
|
||||||
|
'CLIENTE
|
||||||
|
params.Add(New ReportParameter("ClienteNombre", ClienteNombre))
|
||||||
|
params.Add(New ReportParameter("ClienteRFC", ClienteRFC))
|
||||||
|
params.Add(New ReportParameter("UsoCFDi", ClienteUsoCFDi))
|
||||||
|
'TRANSPORTE
|
||||||
|
params.Add(New ReportParameter("MedioTransporte", MedioTransporte))
|
||||||
|
params.Add(New ReportParameter("TransporteInternacional", TransporteInternacional))
|
||||||
|
params.Add(New ReportParameter("PermisoSTCC", PermisoSTCC))
|
||||||
|
params.Add(New ReportParameter("NumPermiso", NumPermiso))
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("Aseguradora", AseguradoraRespCivil))
|
||||||
|
params.Add(New ReportParameter("NumPoliza", NumPolizaSeguroRespCivil))
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("NombreAseguradoraMedioAmbiente", NombreAseguradoraMedioAmbiente))
|
||||||
|
params.Add(New ReportParameter("NumPolizaSeguroMedioAmbiente", NumPolizaSeguroMedioAmbiente))
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("NombreAseguradoraCarga", NombreAseguradoraCarga))
|
||||||
|
params.Add(New ReportParameter("NumPolizaSeguroCarga", NumPolizaSeguroCarga))
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("PlacaVM", PlacaVM))
|
||||||
|
params.Add(New ReportParameter("AnioVM", AnioModeloVM))
|
||||||
|
params.Add(New ReportParameter("PesoBrutoVehicular", PesoBrutoVehicular))
|
||||||
|
|
||||||
|
'TIMBRADO
|
||||||
|
params.Add(New ReportParameter("FolioFiscal", FolioFiscal))
|
||||||
|
params.Add(New ReportParameter("QR", ImgCBB))
|
||||||
|
params.Add(New ReportParameter("QRCCP", ImgCCP))
|
||||||
|
params.Add(New ReportParameter("SelloCFDI", SelloCFDi))
|
||||||
|
params.Add(New ReportParameter("CertificadoContribuyente", NoCertificadoSAT))
|
||||||
|
params.Add(New ReportParameter("CadenaOriginal", CadenaOriginal))
|
||||||
|
params.Add(New ReportParameter("SerieCertificadoSAT", NoSerieCertificado))
|
||||||
|
params.Add(New ReportParameter("FechaCertificacion", FechaCertificacion.ToString("dd/MM/yyyy HH:mm:ss")))
|
||||||
|
params.Add(New ReportParameter("SelloSAT", SelloSAT))
|
||||||
|
'TOTALES
|
||||||
|
params.Add(New ReportParameter("SubTotal", SubTotal.ToString()))
|
||||||
|
params.Add(New ReportParameter("Descuentos", Descuentos.ToString()))
|
||||||
|
params.Add(New ReportParameter("Total", Total.ToString()))
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("RemolquePlaca1", RemolquePlaca1))
|
||||||
|
params.Add(New ReportParameter("RemolqueSubtimo1", RemolqueSubtimo1))
|
||||||
|
|
||||||
|
params.Add(New ReportParameter("RemolquePlaca2", RemolquePlaca2))
|
||||||
|
params.Add(New ReportParameter("RemolqueSubtimo2", RemolqueSubtimo2))
|
||||||
|
|
||||||
|
If UsuarioActual.CveEmpresa = 13 Then
|
||||||
|
params.Add(New ReportParameter("PermisoSCTRemolque1", PermisoSCTR1))
|
||||||
|
params.Add(New ReportParameter("PermisoSCTRemolque2", PermisoSCTR2))
|
||||||
|
params.Add(New ReportParameter("ConfATR1", ConfATR1))
|
||||||
|
params.Add(New ReportParameter("ConfATR2", ConfATR2))
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
|
||||||
|
Dim rds As New ReportDataSource
|
||||||
|
rds.Name = "DataSet1"
|
||||||
|
rds.Value = DtConceptos
|
||||||
|
lrds.Add(rds)
|
||||||
|
|
||||||
|
Dim rds2 As New ReportDataSource
|
||||||
|
rds2.Name = "DataSet2"
|
||||||
|
rds2.Value = DtUbicaciones
|
||||||
|
lrds.Add(rds2)
|
||||||
|
|
||||||
|
Dim rds3 As New ReportDataSource
|
||||||
|
rds3.Name = "DataSet3"
|
||||||
|
rds3.Value = DtMercancias
|
||||||
|
lrds.Add(rds3)
|
||||||
|
|
||||||
|
Dim rds4 As New ReportDataSource
|
||||||
|
rds4.Name = "DataSet4"
|
||||||
|
rds4.Value = DtOperadores
|
||||||
|
lrds.Add(rds4)
|
||||||
|
|
||||||
|
|
||||||
|
Dim rds5 As New ReportDataSource
|
||||||
|
rds5.Name = "DataSet5"
|
||||||
|
rds5.Value = DTRelacionados
|
||||||
|
lrds.Add(rds5)
|
||||||
|
|
||||||
|
If AplicaSubReporte Then
|
||||||
|
For Each parametro As ReportParameter In params
|
||||||
|
retorno.Parametros.Add(New ReportParameter($"SRP_{parametro.Name}", parametro.Values.Item(0)))
|
||||||
|
Next
|
||||||
|
retorno.Parametros.Add(New ReportParameter($"TieneCartaPorte", "True"))
|
||||||
|
Else
|
||||||
|
retorno.Parametros.AddRange(params)
|
||||||
|
End If
|
||||||
|
|
||||||
|
retorno.DataSources.AddRange(lrds)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al generar el pdf de la carta porte", ex)
|
||||||
|
End Try
|
||||||
|
Return retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub DescargaArchivoDirecto(RutaArchivo As String)
|
Private Sub DescargaArchivoDirecto(RutaArchivo As String)
|
||||||
If RutaArchivo <> "" Then
|
If RutaArchivo <> "" Then
|
||||||
|
|
||||||
@@ -351,7 +916,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim totalPallets As String = ""
|
Dim totalPallets As String = ""
|
||||||
Dim totalBachas As String = ""
|
Dim totalBachas As String = ""
|
||||||
Dim dfec As DateTime = fecha.ToDateTime()
|
Dim dfec As DateTime = fecha.ToDateTime()
|
||||||
Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0:dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper()
|
Dim fechas As String = String.Format(New System.Globalization.CultureInfo("es-MX"), "{0dd} DE {0:MMMM} DEL {0:yyyy}", dfec).ToUpper()
|
||||||
Dim totalcajas As String = ""
|
Dim totalcajas As String = ""
|
||||||
Dim TotalBins As String = ""
|
Dim TotalBins As String = ""
|
||||||
|
|
||||||
@@ -385,7 +950,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim rds2 As New ReportDataSource With {.Name = "DataSetBins", .Value = tablaReporteBins}
|
Dim rds2 As New ReportDataSource With {.Name = "DataSetBins", .Value = tablaReporteBins}
|
||||||
lrds.Add(rds2)
|
lrds.Add(rds2)
|
||||||
|
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim rutardlc As String = "Formatos\RepAgroInventarioDiario.rdlc"
|
Dim rutardlc As String = "Formatos\RepAgroInventarioDiario.rdlc"
|
||||||
If EnviarCorrreo Then
|
If EnviarCorrreo Then
|
||||||
Dim para As String = ""
|
Dim para As String = ""
|
||||||
@@ -540,7 +1105,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
|
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim rutardlc As String = "Formatos\Agro\EmbarqueManifiesto.rdlc"
|
Dim rutardlc As String = "Formatos\Agro\EmbarqueManifiesto.rdlc"
|
||||||
If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then
|
If Not IsNothing(tablaReporte.FiltroPrimero("TipoManifiesto=1")) Then
|
||||||
rutardlc = "Formatos\Agro\EmbarqueManifiesto2.rdlc"
|
rutardlc = "Formatos\Agro\EmbarqueManifiesto2.rdlc"
|
||||||
@@ -599,15 +1164,15 @@ Partial Class PopUpVerFactura
|
|||||||
NoEmbarque = row("NoEmbarque").ToString()
|
NoEmbarque = row("NoEmbarque").ToString()
|
||||||
Cliente = row("Cliente").ToString()
|
Cliente = row("Cliente").ToString()
|
||||||
Direccion = row("Direccion").ToString()
|
Direccion = row("Direccion").ToString()
|
||||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
Fecha = String.Format("{0dd/MM/yyyy}", row("Fecha"))
|
||||||
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
DivisoresdeCarton = String.Format("{0N0}", row("DivisoresdeCarton"))
|
||||||
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
BolsasdePlastico = String.Format("{0N0}", row("BolsasdePlastico"))
|
||||||
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
|
TapaderasdeCarton = String.Format("{0N0}", row("TapaderasdeCarton"))
|
||||||
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
CAJASDECARTON = String.Format("{0N0}", row("CAJASDECARTON"))
|
||||||
RPC = String.Format("{0:N0}", row("RPC"))
|
RPC = String.Format("{0N0}", row("RPC"))
|
||||||
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
BINSDECARTON = String.Format("{0N0}", row("BINSDECARTON"))
|
||||||
BinsPrecio = String.Format("{0:N0}", row("BINSDECARTON").ToString().ToDecimal() * 5)
|
BinsPrecio = String.Format("{0N0}", row("BINSDECARTON").ToString().ToDecimal() * 5)
|
||||||
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
TotalDlls = String.Format("{0N0}", row("TotalDlls"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -615,7 +1180,7 @@ Partial Class PopUpVerFactura
|
|||||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||||
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
||||||
Temperatura = row("Temperatura").ToString()
|
Temperatura = row("Temperatura").ToString()
|
||||||
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
Hora = String.Format("{0hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
||||||
Chofer = row("Chofer").ToString()
|
Chofer = row("Chofer").ToString()
|
||||||
CamPlaca = row("CamPlaca").ToString()
|
CamPlaca = row("CamPlaca").ToString()
|
||||||
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||||
@@ -698,7 +1263,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
ImprimirPDF("Formatos\Agro\EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión") ', Content_Disposition:="Inline")
|
ImprimirPDF("Formatos\Agro\EmbarqueManifiestoRemision.rdlc", lrds, params, "Remisión") ', Content_Disposition:="Inline")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -754,14 +1319,14 @@ Partial Class PopUpVerFactura
|
|||||||
Cliente = row("Cliente").ToString()
|
Cliente = row("Cliente").ToString()
|
||||||
Direccion = row("Direccion").ToString()
|
Direccion = row("Direccion").ToString()
|
||||||
Correo = row("Correo").ToString()
|
Correo = row("Correo").ToString()
|
||||||
Fecha = String.Format("{0:dd/MM/yyyy}", row("Fecha"))
|
Fecha = String.Format("{0dd/MM/yyyy}", row("Fecha"))
|
||||||
DivisoresdeCarton = String.Format("{0:N0}", row("DivisoresdeCarton"))
|
DivisoresdeCarton = String.Format("{0N0}", row("DivisoresdeCarton"))
|
||||||
BolsasdePlastico = String.Format("{0:N0}", row("BolsasdePlastico"))
|
BolsasdePlastico = String.Format("{0N0}", row("BolsasdePlastico"))
|
||||||
TapaderasdeCarton = String.Format("{0:N0}", row("TapaderasdeCarton"))
|
TapaderasdeCarton = String.Format("{0N0}", row("TapaderasdeCarton"))
|
||||||
CAJASDECARTON = String.Format("{0:N0}", row("CAJASDECARTON"))
|
CAJASDECARTON = String.Format("{0N0}", row("CAJASDECARTON"))
|
||||||
RPC = String.Format("{0:N0}", row("RPC"))
|
RPC = String.Format("{0N0}", row("RPC"))
|
||||||
BINSDECARTON = String.Format("{0:N0}", row("BINSDECARTON"))
|
BINSDECARTON = String.Format("{0N0}", row("BINSDECARTON"))
|
||||||
TotalDlls = String.Format("{0:N0}", row("TotalDlls"))
|
TotalDlls = String.Format("{0N0}", row("TotalDlls"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -769,7 +1334,7 @@ Partial Class PopUpVerFactura
|
|||||||
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
AgenciaAduanalUSA = row("AgenciaAduanalUSA").ToString()
|
||||||
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
AgenciaAduanalMEX = row("AgenciaAduanalMEX").ToString()
|
||||||
Temperatura = row("Temperatura").ToString()
|
Temperatura = row("Temperatura").ToString()
|
||||||
Hora = String.Format("{0:hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
Hora = String.Format("{0hh }:{0:mm }:{0:ss tt}:", row("FechaIng"))
|
||||||
Chofer = row("Chofer").ToString()
|
Chofer = row("Chofer").ToString()
|
||||||
CamPlaca = row("CamPlaca").ToString()
|
CamPlaca = row("CamPlaca").ToString()
|
||||||
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
Camion = String.Format("{0} {1}", row("CamEspecificacion"), row("CamAnio"))
|
||||||
@@ -850,7 +1415,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = tablaReporte}
|
||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim pdf As Byte() = StreamPDF("Formatos\Agro\EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
Dim pdf As Byte() = StreamPDF("Formatos\Agro\EmbarqueManifiestoCartaPorte.rdlc", lrds, params, "DatosCartaPorte")
|
||||||
|
|
||||||
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
Dim LSRutasMail As New List(Of ClsSisMail.ArchivoMail)
|
||||||
@@ -891,7 +1456,7 @@ Partial Class PopUpVerFactura
|
|||||||
Cultivo = row("Cultivo").ToString()
|
Cultivo = row("Cultivo").ToString()
|
||||||
noPallet = row("Codigo").ToString()
|
noPallet = row("Codigo").ToString()
|
||||||
Variedad = row("CultivoVariedad").ToString()
|
Variedad = row("CultivoVariedad").ToString()
|
||||||
NoCajas = String.Format("{0:N0}", row("NoCajas"))
|
NoCajas = String.Format("{0N0}", row("NoCajas"))
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -932,7 +1497,7 @@ Partial Class PopUpVerFactura
|
|||||||
lrds.Add(rds2)
|
lrds.Add(rds2)
|
||||||
'endimg
|
'endimg
|
||||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
ImprimirPDF("Formatos\Agro\PalletEtiqueta2.rdlc", lrds, params, "Pallet") ', Content_Disposition:="Inline")
|
ImprimirPDF("Formatos\Agro\PalletEtiqueta2.rdlc", lrds, params, "Pallet") ', Content_Disposition:="Inline")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -972,9 +1537,9 @@ Partial Class PopUpVerFactura
|
|||||||
NoCajas = row("NoCajas").ToString()
|
NoCajas = row("NoCajas").ToString()
|
||||||
Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
|
Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
|
||||||
CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero()
|
CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero()
|
||||||
NumberOfCode = String.Format("(00)00000000000000(00){1:ddMMyy}(00){0}00", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
|
NumberOfCode = String.Format("(00)00000000000000(00){1ddMMyy}(00){0}00", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
|
||||||
'NumberSmall = String.Format("{0:00}", noPallet.ToEntero())
|
'NumberSmall = String.Format("{000}", noPallet.ToEntero())
|
||||||
'NumberBig = String.Format("{0:00}", row("Consecutivo").ToString().ToEntero()) ' String.Format("{0:dd}", row("Fecha"))
|
'NumberBig = String.Format("{000}", row("Consecutivo").ToString().ToEntero()) ' String.Format("{0:dd}", row("Fecha"))
|
||||||
|
|
||||||
|
|
||||||
NumberSmall = row("NumberSmall").ToString()
|
NumberSmall = row("NumberSmall").ToString()
|
||||||
@@ -1058,7 +1623,7 @@ Partial Class PopUpVerFactura
|
|||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
|
|
||||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim ruta As String = "Formatos\Agro\PalletEtiquetaWalmart.rdlc"
|
Dim ruta As String = "Formatos\Agro\PalletEtiquetaWalmart.rdlc"
|
||||||
'If CvetypeImpresion = 2 Then
|
'If CvetypeImpresion = 2 Then
|
||||||
' ruta = "Formatos\Agro\PalletEtiqueta_2.rdlc"
|
' ruta = "Formatos\Agro\PalletEtiqueta_2.rdlc"
|
||||||
@@ -1097,9 +1662,9 @@ Partial Class PopUpVerFactura
|
|||||||
NoCajas = row("NoCajas").ToString()
|
NoCajas = row("NoCajas").ToString()
|
||||||
Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
|
Fecha = String.Format("{0:MMM dd}", row("Fecha")).Replace(".", "").ToUpper()
|
||||||
CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero()
|
CvetypeImpresion = row("CvetypeImpresion").ToString().ToEntero()
|
||||||
NumberOfCode = String.Format("(00)00000000000000(00){1:ddMMyy}(00){0}00", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
|
NumberOfCode = String.Format("(00)00000000000000(00){1ddMMyy}(00){0}00", Right(String.Format("0{0}", Regex.Match(row("Cuadro").ToString(), "\d+")), 2), row("Fecha"))
|
||||||
NumberSmall = String.Format("{0:00}", noPallet.ToEntero())
|
NumberSmall = String.Format("{000}", noPallet.ToEntero())
|
||||||
NumberBig = String.Format("{0:00}", row("Consecutivo").ToString().ToEntero()) ' String.Format("{0:dd}", row("Fecha"))
|
NumberBig = String.Format("{000}", row("Consecutivo").ToString().ToEntero()) ' String.Format("{0:dd}", row("Fecha"))
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
@@ -1156,7 +1721,7 @@ Partial Class PopUpVerFactura
|
|||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
|
|
||||||
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
'"Empresas/Grales/Formatos/EquiposGPS.rdlc"
|
||||||
'"D:\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
'"D\\ADSistemas\\Proyectos\\SIG\\SIGIT\\GPS\\PalletEtiqueta.rdlc"
|
||||||
Dim ruta As String = "Formatos\Agro\PalletEtiquetaCaja.rdlc"
|
Dim ruta As String = "Formatos\Agro\PalletEtiquetaCaja.rdlc"
|
||||||
'If CvetypeImpresion = 2 Then
|
'If CvetypeImpresion = 2 Then
|
||||||
' ruta = "Formatos\Agro\PalletEtiqueta_2.rdlc"
|
' ruta = "Formatos\Agro\PalletEtiqueta_2.rdlc"
|
||||||
@@ -1610,8 +2175,8 @@ Partial Class PopUpVerFactura
|
|||||||
ObjVenta.Dispose()
|
ObjVenta.Dispose()
|
||||||
ObjPuntoVenta.Dispose()
|
ObjPuntoVenta.Dispose()
|
||||||
|
|
||||||
Dim FechaCorte As String = $" <b>Fecha fin:</b> {Fecha}"
|
Dim FechaCorte As String = $" <b>Fecha fin</b> {Fecha}"
|
||||||
Dim Usuario As String = $" <b>Usuario:</b> {Nombre}"
|
Dim Usuario As String = $" <b>Usuario</b> {Nombre}"
|
||||||
If DtCortesVentas.Rows.Count > 0 Or DtCortesVentasResumen.Rows.Count > 0 Then
|
If DtCortesVentas.Rows.Count > 0 Or DtCortesVentasResumen.Rows.Count > 0 Then
|
||||||
Dim lrds As New List(Of ReportDataSource)
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
|
||||||
@@ -1621,13 +2186,12 @@ Partial Class PopUpVerFactura
|
|||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
DtMetodosPago = DtCortesVentasResumen.FiltraParametros("MetodoPago <> 'Crédito'")
|
DtMetodosPago = DtCortesVentasResumen.FiltraParametros("MetodoPago <> 'Crédito'")
|
||||||
End If
|
End If
|
||||||
|
Dim DirFormato As String = "Empresas/Grales/Formatos/RepCortes.rdlc"
|
||||||
Dim DirFormato As String = "Empresas/Grales/Formatos/RepCortes.rdlc"
|
If File.Exists(UsuarioActual.Empresa.Ruta + "\Formatos\RepCortes.rdlc") Then
|
||||||
If File.Exists(UsuarioActual.Empresa.Ruta + "\Formatos\RepCortes.rdlc") Then
|
|
||||||
DirFormato = UsuarioActual.Empresa.Ruta + "\Formatos\RepCortes.rdlc"
|
DirFormato = UsuarioActual.Empresa.Ruta + "\Formatos\RepCortes.rdlc"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
params.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")))
|
params.Add(New ReportParameter("FechaImpresion", ClsPaginas.NowADS().ToString("dd/MM/yyyy hh:mm:ss tt")))
|
||||||
@@ -1769,32 +2333,31 @@ Partial Class PopUpVerFactura
|
|||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa = 193 Then
|
If UsuarioActual.CveEmpresa = 193 Then
|
||||||
|
Dim CveCuenta As Integer = 186367
|
||||||
Dim CveCuenta As Integer = 186367
|
Using ObjConta As New ClsContabilidad
|
||||||
Using ObjConta As New ClsContabilidad
|
If ObjConta.GetAnexoCatalogo(CveCuenta, Fecha.ToDate(), Fecha.ToDate(), -1, -1, -1, UsuarioActual.CveEmpresa, 1) Then
|
||||||
If ObjConta.GetAnexoCatalogo(CveCuenta, Fecha.ToDate(), Fecha.ToDate(), -1, -1, -1, UsuarioActual.CveEmpresa, 1) Then
|
Dim rdsConta As New ReportDataSource With {.Name = "DsContabilidad", .Value = ObjConta.DtResultados}
|
||||||
Dim rdsConta As New ReportDataSource With {.Name = "DsContabilidad", .Value = ObjConta.DtResultados}
|
|
||||||
lrds.Add(rdsConta)
|
lrds.Add(rdsConta)
|
||||||
End If
|
End If
|
||||||
End Using
|
End Using
|
||||||
|
|
||||||
If DtDepositos IsNot Nothing Then
|
If DtDepositos IsNot Nothing Then
|
||||||
Dim rdsDepositos As New ReportDataSource With {.Name = "DsDepositos", .Value = DtDepositos}
|
Dim rdsDepositos As New ReportDataSource With {.Name = "DsDepositos", .Value = DtDepositos}
|
||||||
lrds.Add(rdsDepositos)
|
lrds.Add(rdsDepositos)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString()))
|
'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString()))
|
||||||
'params.Add(New ReportParameter("NotasCredito", RowCorte("NotasCredito").ToString()))
|
'params.Add(New ReportParameter("NotasCredito", RowCorte("NotasCredito").ToString()))
|
||||||
'params.Add(New ReportParameter("NotasCredito", RowCorte("NotasCredito").ToString()))
|
'params.Add(New ReportParameter("NotasCredito", RowCorte("NotasCredito").ToString()))
|
||||||
'params.Add(New ReportParameter("VentasCredito", RowCorte("VentasCorte").ToString()))
|
'params.Add(New ReportParameter("VentasCredito", RowCorte("VentasCorte").ToString()))
|
||||||
'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString()))
|
'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString()))
|
||||||
'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString()))
|
'params.Add(New ReportParameter("VentasCorte", RowCorte("VentasCorte").ToString()))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DtMetodosPago}
|
Dim rds As New ReportDataSource With {.Name = "DataSet1", .Value = DtMetodosPago}
|
||||||
lrds.Add(rds)
|
lrds.Add(rds)
|
||||||
Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = DtCortesVentas}
|
Dim rds2 As New ReportDataSource With {.Name = "DataSet2", .Value = DtCortesVentas}
|
||||||
lrds.Add(rds2)
|
lrds.Add(rds2)
|
||||||
@@ -4693,7 +5256,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim ObjAcum As New ClsAcumuladores
|
Dim ObjAcum As New ClsAcumuladores
|
||||||
Dim DatosEntradasUsados As New DataTable
|
Dim DatosEntradasUsados As New DataTable
|
||||||
Dim CveAlmacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", String.Format("Almacen = '{0}'", Almacen))
|
Dim CveAlmacen As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", String.Format("Almacen = '{0}'", Almacen))
|
||||||
If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, CveAlmacen.ToEntero, Convert.ToDateTime(Fecha.ToString), Convert.ToDateTime(Today.ToString)) Then
|
If ObjAcum.EntradasUsadosGet(UsuarioActual.CveEmpresa, CveAlmacen.ToEntero, Fecha.ToDate, Today.ToDate) Then
|
||||||
DatosEntradasUsados = ObjAcum.DtResultados
|
DatosEntradasUsados = ObjAcum.DtResultados
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -5959,7 +6522,7 @@ Partial Class PopUpVerFactura
|
|||||||
Dim QrDescarga As String = ""
|
Dim QrDescarga As String = ""
|
||||||
Dim Cfdi As New RVCFDI33.GeneraCFDI()
|
Dim Cfdi As New RVCFDI33.GeneraCFDI()
|
||||||
Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
|
Dim b As Byte() = Cfdi.ConvertirQrCode(String.Format("?CvePS={0}&Lote={1}&Fecha={2}", CvePS, Lote, Format(FechaCaducidad, "dd/MM/yyyy").ToString()))
|
||||||
QrDescarga = Convert.ToBase64String(b)
|
QrDescarga = System.Convert.ToBase64String(b)
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
params.Add(New ReportParameter("QR", QrDescarga))
|
params.Add(New ReportParameter("QR", QrDescarga))
|
||||||
params.Add(New ReportParameter("PS", PS))
|
params.Add(New ReportParameter("PS", PS))
|
||||||
@@ -6286,7 +6849,7 @@ Partial Class PopUpVerFactura
|
|||||||
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||||
|
|
||||||
For Each Row As DataRow In DtPrecios.Rows
|
For Each Row As DataRow In DtPrecios.Rows
|
||||||
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
Row("CBBase64") = system.Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
|
|||||||
Reference in New Issue
Block a user