WSRC anular remito
rem remito carnico
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "ruta y archivo al certificado AFIP *.pfx", "archivo de licencia no es necesario en modo prueba") Then
fe.ArchivoCertificadoPassword = "contraseña generada al crear *.pfx"
If fe.rcObtenerTicketAcceso() Then
bresultado = fe.rcCargarPropiedad("LIMPIAR", "", 0, 0
fe.ArchivoXMLEnviado = "d:\rcemiir.xml"
fe.ArchivoXMLRecibido = "d:\rcemitirrecibo.xml"
If bresultado Then
bresultado = fe.rcAnularRemito("codigoremito")
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcAnularRemito", "resultado", "", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error del servidor " + fe.rcErrorDescripcion1)
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 remito harinero
Dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit", "ruta y archivo al certificado AFIP *.pfx", "archivo de licencia no es necesario en modo prueba") Then
fe.rcVersion = 1
fe.ArchivoCertificadoPassword = "contraseña generada al crear *.pfx"
If fe.rcObtenerTicketAcceso() Then
bresultado = fe.rcCargarPropiedad("LIMPIAR", "", 0, 0)
fe.ArchivoXMLEnviado = "d:\raut.xml"
fe.ArchivoXMLRecibido = "d:\rcrecibo.xml"
If bresultado Then
bresultado = fe.rcAnularRemitoConObservacion("3523", "prueba1")
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcAnularRemito", "resultado", "", 0, 0))
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error del servidor " + fe.rcErrorDescripcion1)
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