REM consultarCPEAutomotor instalador 99 o superior
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "certificado pfx tramitado en AFIP", "") Then
REM fe.cpeversion = 0
fe.ArchivoXMLEnviado = "d:\aenvio.xml"
fe.ArchivoXMLRecibido = "d:\arecibo.xml"
fe.ArchivoCertificadoPassword = ""
If fe.cpeObtenerTicketAcceso() Then
If bresultado Then
bresultado = fe.cpeConsultar("cuitsolicitante", tipocomprobante, puntoventa, "numero")
If fe.UltimoMensajeError = "" And fe.cpeErrorDescripcion1 = "" Then
MsgBox("estado " + fe.cpeLeerPropiedad("cpeConsultar", "cabecera.estado", "", 0, 0))
MsgBox("km. " + fe.cpeLeerPropiedad("cpeConsultar", "transporte.kmRecorrer", "", 0, 0))
MsgBox("peso " + fe.cpeLeerPropiedad("cpeConsultar", "datosCarga.pesoBruto", "", 0, 0))
MsgBox("PDF " + fe.cpeLeerPropiedad("cpeConsultar", "PDF", "d:\comprobante.pdf", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error ller servidor " + fe.cpeErrorDescripcion1)
End If
Else
MsgBox("fallo cargar propiedad " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo acceso " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo iniciar " + fe.UltimoMensajeError)
End If
REM consultarCPEFerroviario instalador 99 o superior
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "certificado pfx tramitado en AFIP", "") Then
REM fe.cpeversion = 1
fe.ArchivoXMLEnviado = "d:\aenvio.xml"
fe.ArchivoXMLRecibido = "d:\arecibo.xml"
fe.ArchivoCertificadoPassword = ""
If fe.cpeObtenerTicketAcceso() Then
If bresultado Then
bresultado = fe.cpeConsultar("cuit solicitante", tipocomprobante, puntoventa, "numero")
If fe.UltimoMensajeError = "" And fe.cpeErrorDescripcion1 = "" Then
MsgBox("fecha " + fe.cpeLeerPropiedad("cpeConsultar", "cabecera.fechaEmision", "", 0, 0))
MsgBox("operativo " + fe.cpeLeerPropiedad("cpeConsultar", "transporte.nroOperativo", "", 0, 0))
MsgBox("peso " + fe.cpeLeerPropiedad("cpeConsultar", "transporte.ramal.descripcion", "", 0, 0))
MsgBox("PDF " + fe.cpeLeerPropiedad("cpeConsultar", "PDF", "d:\comprobante.pdf", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error ller servidor " + fe.cpeErrorDescripcion1)
End If
Else
MsgBox("fallo cargar propiedad " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo acceso " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo iniciar " + fe.UltimoMensajeError)
End If
REM consultar derivados granarios instalador 99.94 o superior
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "certificado pfx tramitado en AFIP", "") Then
fe.cpeversion = 220
fe.ArchivoXMLEnviado = "d:\aenvio.xml"
fe.ArchivoXMLRecibido = "d:\arecibo.xml"
fe.ArchivoCertificadoPassword = ""
If fe.cpeObtenerTicketAcceso() Then
If bresultado Then
bresultado = fe.cpeConsultar("cuitsolicitante", tipocomprobante, puntoventa, "numero")
If fe.UltimoMensajeError = "" And fe.cpeErrorDescripcion1 = "" Then
MsgBox("estado " + fe.cpeLeerPropiedad("cpeConsultar", "cabecera.estado", "", 0, 0))
MsgBox("km. " + fe.cpeLeerPropiedad("cpeConsultar", "transporte.kmRecorrer", "", 0, 0))
MsgBox("peso " + fe.cpeLeerPropiedad("cpeConsultar", "datosCarga.pesoBruto", "", 0, 0))
MsgBox("PDF " + fe.cpeLeerPropiedad("cpeConsultar", "PDF", "d:\comprobante.pdf", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error ller servidor " + fe.cpeErrorDescripcion1)
End If
Else
MsgBox("fallo cargar propiedad " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo acceso " + fe.UltimoMensajeError)
End If
Else
MsgBox("fallo iniciar " + fe.UltimoMensajeError)
End If