WS RC informar contingencia
rem remito cárnico
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 = True
bresultado = fe.rcCargarPropiedad("LIMPIAR", "", 0, 0)
fe.ArchivoXMLEnviado = "d:\rcemiir.xml"
fe.ArchivoXMLRecibido = "d:\rcemitirrecibo.xml"
If bresultado Then
bResultado = gFe.rcInformarcontigencia("codigo emito", "observación", "código tipo contingencia")
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcInformarcontigencia", "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
fe.ArchivoXMLEnviado = "d:\enviar.xml"
fe.ArchivoXMLRecibido = "d:\recibido.xml"
bresultado = bresultado And fe.rcCargarPropiedad("arrayMercaderiaPerdida.itemcantidad", "1", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("arrayMercaderiaPerdida.orden", "1", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("arrayMercaderiaPerdida.pesoNetoKG", "5.1", 0, 0)
If bresultado Then
bresultado = fe.rcInformarcontigencia("23235", "perdida", "1")
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcInformarcontigencia", "resultado", "", 0, 0))
MsgBox(fe.UltimoMensajeError)
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error lerr servidor " + fe.rcErrorDescripcion1)
MsgBox(fe.rcLeerPropiedad("rcInformarcontingencia", "resultado", "", 0, 0))
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 azucarero
dim fe As New WSAFIPFE.Factura
Dim bresultado As Boolean = True
If fe.iniciar(0, "cuit emisor", "ruta certificado.pfx", "") Then
fe.rcVersion = 2
fe.ArchivoXMLRecibido = "d:\raecontingencia.xml"
fe.ArchivoCertificadoPassword = ""
If fe.rcObtenerTicketAcceso() Then
bresultado = fe.rcCargarPropiedad("LIMPIAR", "", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("arrayMercaderiaPerdida.itemcantidad", "1", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("arrayMercaderiaPerdida.cantidad", "5", 0, 0)
bresultado = bresultado And fe.rcCargarPropiedad("arrayMercaderiaPerdida.orden", "1", 0, 0)
If bresultado Then
bresultado = fe.rcInformarcontigencia("23235", "perdida", "1")
If fe.UltimoMensajeError = "" And fe.rcErrorDescripcion1 = "" Then
MsgBox("resultado " + fe.rcLeerPropiedad("rcInformarcontigencia", "resultado", "", 0, 0))
MsgBox(fe.UltimoMensajeError)
Else
MsgBox("error leer" + fe.UltimoMensajeError)
MsgBox("error lerr servidor " + fe.rcErrorDescripcion1)
MsgBox(fe.rcLeerPropiedad("rcInformarcontingencia", "resultado", "", 0, 0))
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